diff --git a/.github/workflows/deploy_production.yml b/.github/workflows/deploy_production.yml index fa814f7..cd4f44a 100644 --- a/.github/workflows/deploy_production.yml +++ b/.github/workflows/deploy_production.yml @@ -6,7 +6,7 @@ on: - "production" env: - MONGO_VERSION: 8.0.3 + MONGO_VERSION: 8.0.13 UBUNTU_VERSION: linux-x86_64-ubuntu2204 # name of the binary, the service and the user running the # service @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: "1.24" + go-version: "1.25" - name: Vet code run: go vet ./... diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 05d0e47..2e5279c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ on: - production env: - MONGO_VERSION: 8.0.3 + MONGO_VERSION: 8.0.13 UBUNTU_VERSION: linux-x86_64-ubuntu2204 jobs: @@ -21,7 +21,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: "1.24" + go-version: "1.25" - name: Lint code uses: golangci/golangci-lint-action@v8 diff --git a/go.mod b/go.mod index 177aa06..4a636cb 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/feliixx/mongoplayground -go 1.23.0 +go 1.24.0 -toolchain go1.24.2 +toolchain go1.25.1 require ( github.com/dgraph-io/badger/v2 v2.2007.4 @@ -11,7 +11,7 @@ require ( github.com/feliixx/mongoextjson v1.2.0 github.com/prometheus/client_golang v1.21.1 go.mongodb.org/mongo-driver v1.17.3 - golang.org/x/oauth2 v0.29.0 + golang.org/x/oauth2 v0.31.0 google.golang.org/api v0.209.0 ) diff --git a/go.sum b/go.sum index 5e66589..1498d83 100644 --- a/go.sum +++ b/go.sum @@ -1,16 +1,10 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go/auth v0.10.2 h1:oKF7rgBfSHdp/kuhXtqU/tNDr0mZqhYbEh+6SiqzkKo= cloud.google.com/go/auth v0.10.2/go.mod h1:xxA5AqpDrvS+Gkmo9RqrGGRh6WSNKKOXhY3zNOr38tI= -cloud.google.com/go/auth v0.16.1 h1:XrXauHMd30LhQYVRHLGvJiYeczweKQXZxsTbV9TiguU= -cloud.google.com/go/auth v0.16.1/go.mod h1:1howDHJ5IETh/LwYs3ZxvlkXF48aSqqJUM+5o02dNOI= cloud.google.com/go/auth/oauth2adapt v0.2.5 h1:2p29+dePqsCHPP1bqDJcKj4qxRyYCcbzKpFyKGt3MTk= cloud.google.com/go/auth/oauth2adapt v0.2.5/go.mod h1:AlmsELtlEBnaNTL7jCj8VQFLy6mbZv0s4Q7NGBeQ5E8= -cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= -cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= -cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU= -cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/MichaelTJones/pcg v0.0.0-20180122055547-df440c6ed7ed h1:hQC4FSwvsLH6rOLJTndsHnANARF9RwW4PbrDTjks/0A= github.com/MichaelTJones/pcg v0.0.0-20180122055547-df440c6ed7ed/go.mod h1:NQ4UMHqyfXyYVmZopcfwPRWJa0rw2aH16eDIltReVUo= @@ -21,8 +15,6 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/brianvoe/gofakeit/v6 v6.2.2 h1:EcE/d5MiDA2xhg6Uc03Xh2OR6w2Sd8dpbuJXO99bcSc= github.com/brianvoe/gofakeit/v6 v6.2.2/go.mod h1:palrJUk4Fyw38zIFB/uBZqsgzW5VsNllhHKKwAebzew= -github.com/brianvoe/gofakeit/v6 v6.28.0 h1:Xib46XXuQfmlLS2EXRuJpqcw8St6qSZz75OUo0tgAW4= -github.com/brianvoe/gofakeit/v6 v6.28.0/go.mod h1:Xj58BMSnFqcn/fAQeSK+/PLtC5kSb7FJIq4JyGa8vEs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -41,22 +33,14 @@ github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdw github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de h1:t0UHb5vdojIDUqktM6+xJAfScFBsVpXZmqC9dsgJmeA= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.2.0 h1:XAfl+7cmoUDWW/2Lx8TGZQjjxIQ2Ley9DSf52dru4WE= -github.com/dgraph-io/ristretto v0.2.0/go.mod h1:8uBHCU/PBV4Ag0CJrP47b9Ofby5dqWNh4FicAdoqFNU= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da h1:aIftn67I1fkbMa512G+w+Pxci9hJPB8oMnkcP3iZF38= -github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/feliixx/boa v0.2.2 h1:+4CkYRjP0YbZviuQzd3FoDok2nXWB0rGrr/LiBYiw68= github.com/feliixx/boa v0.2.2/go.mod h1:3T1GrqbwbOXzbNFh7rWGCOSJTubAn8hUswWm4X3TQyc= github.com/feliixx/mgodatagen v0.12.0 h1:eJGi+RRYsS8PbFuEhb6Agtt5Y80hMrzUebm+N5uJyMM= @@ -75,8 +59,6 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= -github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -93,8 +75,6 @@ github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6 github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= -github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -105,19 +85,13 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= -github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= -github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.4 h1:XYIDZApgAnrN1c855gTgghdIA6Stxb52D5RnLI1SLyw= github.com/googleapis/enterprise-certificate-proxy v0.3.4/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA= -github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4= -github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= github.com/googleapis/gax-go/v2 v2.14.0 h1:f+jMrjBPl+DL9nI4IQzLUxMq7XrAqFYB7hBPqMNIe8o= github.com/googleapis/gax-go/v2 v2.14.0/go.mod h1:lhBCnjdLrWRaPvLWhmc8IS24m9mr07qSYnHncrgo+zk= -github.com/googleapis/gax-go/v2 v2.14.2 h1:eBLnkZ9635krYIPD+ag1USrOAI0Nr0QYF3+/3GqO0k0= -github.com/googleapis/gax-go/v2 v2.14.2/go.mod h1:ON64QhlJkhVtSqp4v1uaK92VyZ2gmvDQsweuyLV+8+w= github.com/gosuri/uilive v0.0.4 h1:hUEBpQDj8D8jXgtCdBu7sWsy5sbW/5GhuO8KBwJ2jyY= github.com/gosuri/uilive v0.0.4/go.mod h1:V/epo5LjjlDE5RJUcqx8dbw+zc93y5Ya3yg8tfZ74VI= github.com/gosuri/uiprogress v0.0.1 h1:0kpv/XY/qTmFWl/SkaJykZXrBBzwwadmW8fRb7RJSxw= @@ -126,44 +100,27 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= -github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= -github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= -github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/olekukonko/errors v0.0.0-20250405072817-4e6d85265da6 h1:r3FaAI0NZK3hSmtTDrBVREhKULp8oUeqLT5Eyl2mSPo= -github.com/olekukonko/errors v0.0.0-20250405072817-4e6d85265da6/go.mod h1:ppzxA5jBKcO1vIpCXQ9ZqgDh8iwODz6OXIGKU8r5m4Y= -github.com/olekukonko/ll v0.0.8-0.20250516010636-22ea57d81985 h1:V2wKiwjwAfRJRtUP6pC7wt4opeF14enO0du2dRV6Llo= -github.com/olekukonko/ll v0.0.8-0.20250516010636-22ea57d81985/go.mod h1:En+sEW0JNETl26+K8eZ6/W4UQ7CYSrrgg/EdIYT2H8g= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/olekukonko/tablewriter v1.0.6 h1:/T45mIHc5hcEvibgzBzvMy7ruT+RjgoQRvkHbnl6OWA= -github.com/olekukonko/tablewriter v1.0.6/go.mod h1:SJ0MV1aHb/89fLcsBMXMp30Xg3g5eGoOUu0RptEk4AU= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -172,23 +129,13 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk= github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg= -github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= -github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= -github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= -github.com/prometheus/common v0.64.0 h1:pdZeA+g617P7oGv1CzdTzyeShxAGrTBsolKNOLQPGO4= -github.com/prometheus/common v0.64.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= -github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= @@ -224,32 +171,20 @@ go.mongodb.org/mongo-driver v1.17.3 h1:TQyXhnsWfWtgAhMtOgtYHMTkZIfBTpMTsMnd9ZBeH go.mongodb.org/mongo-driver v1.17.3/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= -golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -266,21 +201,15 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= -golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= -golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.29.0 h1:WdYw2tdTK1S8olAzWHdgeqfy+Mtm9XNhv/xJsY65d98= -golang.org/x/oauth2 v0.29.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= -golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= -golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= +golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo= +golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= -golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -292,12 +221,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= -golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -306,8 +231,6 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= -golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -319,22 +242,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.209.0 h1:Ja2OXNlyRlWCWu8o+GgI4yUn/wz9h/5ZfFbKz+dQX+w= google.golang.org/api v0.209.0/go.mod h1:I53S168Yr/PNDNMi5yPnDc0/LGRZO6o7PoEbl/HY3CM= -google.golang.org/api v0.234.0 h1:d3sAmYq3E9gdr2mpmiWGbm9pHsA/KJmyiLkwKfHBqU4= -google.golang.org/api v0.234.0/go.mod h1:QpeJkemzkFKe5VCE/PMv7GsUfn9ZF+u+q1Q7w6ckxTg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20241113202542-65e8d215514f h1:zDoHYmMzMacIdjNe+P2XiTmPsLawi/pCbSPfxt6lTfw= -google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 h1:1tXaIXCracvtsRxSBsYDiSBN0cuJvM7QYW+MrpIRY78= google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= -google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2 h1:vPV0tzlsK6EzEDHNNH5sa7Hs9bd7iXR7B1tSiPepkV0= google.golang.org/genproto/googleapis/rpc v0.0.0-20241113202542-65e8d215514f h1:C1QccEa9kUwvMgEUORqQD9S17QesQijxjZ84sO82mfo= google.golang.org/genproto/googleapis/rpc v0.0.0-20241113202542-65e8d215514f/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237 h1:cJfm9zPbe1e873mHJzmQ1nwVEeRDU/T1wXDK2kUSU34= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -342,8 +259,6 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= -google.golang.org/grpc v1.72.2 h1:TdbGzwb82ty4OusHWepvFWGLgIbNo1/SUynEN0ssqv8= -google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -355,8 +270,6 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/internal/web/package-lock.json b/internal/web/package-lock.json index 600630c..af585a3 100644 --- a/internal/web/package-lock.json +++ b/internal/web/package-lock.json @@ -10,14 +10,30 @@ "hasInstallScript": true, "license": "MIT", "devDependencies": { - "@playwright/test": "^1.30.0", - "esbuild": "0.17.7" + "@playwright/test": "^1.55.0", + "esbuild": "0.25.10" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.10.tgz", + "integrity": "sha512-0NFWnA+7l41irNuaSVlLfgNT12caWJVLzp5eAVhZ0z1qpxbockccEt3s+149rE64VUI3Ml2zt8Nv5JVc4QXTsw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/android-arm": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.7.tgz", - "integrity": "sha512-Np6Lg8VUiuzHP5XvHU7zfSVPN4ILdiOhxA1GQ1uvCK2T2l3nI8igQV0c9FJx4hTkq8WGqhGEvn5UuRH8jMkExg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.10.tgz", + "integrity": "sha512-dQAxF1dW1C3zpeCDc5KqIYuZ1tgAdRXNoZP7vkBIRtKZPYe2xVr/d3SkirklCHudW1B45tGiUlz2pUWDfbDD4w==", "cpu": [ "arm" ], @@ -27,13 +43,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.7.tgz", - "integrity": "sha512-fOUBZvcbtbQJIj2K/LMKcjULGfXLV9R4qjXFsi3UuqFhIRJHz0Fp6kFjsMFI6vLuPrfC5G9Dmh+3RZOrSKY2Lg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.10.tgz", + "integrity": "sha512-LSQa7eDahypv/VO6WKohZGPSJDq5OVOo3UoFR1E4t4Gj1W7zEQMUhI+lo81H+DtB+kP+tDgBp+M4oNCwp6kffg==", "cpu": [ "arm64" ], @@ -43,13 +59,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.7.tgz", - "integrity": "sha512-6YILpPvop1rPAvaO/n2iWQL45RyTVTR/1SK7P6Xi2fyu+hpEeX22fE2U2oJd1sfpovUJOWTRdugjddX6QCup3A==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.10.tgz", + "integrity": "sha512-MiC9CWdPrfhibcXwr39p9ha1x0lZJ9KaVfvzA0Wxwz9ETX4v5CHfF09bx935nHlhi+MxhA63dKRRQLiVgSUtEg==", "cpu": [ "x64" ], @@ -59,13 +75,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.7.tgz", - "integrity": "sha512-7i0gfFsDt1BBiurZz5oZIpzfxqy5QkJmhXdtrf2Hma/gI9vL2AqxHhRBoI1NeWc9IhN1qOzWZrslhiXZweMSFg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.10.tgz", + "integrity": "sha512-JC74bdXcQEpW9KkV326WpZZjLguSZ3DfS8wrrvPMHgQOIEIG/sPXEN/V8IssoJhbefLRcRqw6RQH2NnpdprtMA==", "cpu": [ "arm64" ], @@ -75,13 +91,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.7.tgz", - "integrity": "sha512-hRvIu3vuVIcv4SJXEKOHVsNssM5tLE2xWdb9ZyJqsgYp+onRa5El3VJ4+WjTbkf/A2FD5wuMIbO2FCTV39LE0w==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.10.tgz", + "integrity": "sha512-tguWg1olF6DGqzws97pKZ8G2L7Ig1vjDmGTwcTuYHbuU6TTjJe5FXbgs5C1BBzHbJ2bo1m3WkQDbWO2PvamRcg==", "cpu": [ "x64" ], @@ -91,13 +107,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.7.tgz", - "integrity": "sha512-2NJjeQ9kiabJkVXLM3sHkySqkL1KY8BeyLams3ITyiLW10IwDL0msU5Lq1cULCn9zNxt1Seh1I6QrqyHUvOtQw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.10.tgz", + "integrity": "sha512-3ZioSQSg1HT2N05YxeJWYR+Libe3bREVSdWhEEgExWaDtyFbbXWb49QgPvFH8u03vUPX10JhJPcz7s9t9+boWg==", "cpu": [ "arm64" ], @@ -107,13 +123,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.7.tgz", - "integrity": "sha512-8kSxlbjuLYMoIgvRxPybirHJeW45dflyIgHVs+jzMYJf87QOay1ZUTzKjNL3vqHQjmkSn8p6KDfHVrztn7Rprw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.10.tgz", + "integrity": "sha512-LLgJfHJk014Aa4anGDbh8bmI5Lk+QidDmGzuC2D+vP7mv/GeSN+H39zOf7pN5N8p059FcOfs2bVlrRr4SK9WxA==", "cpu": [ "x64" ], @@ -123,13 +139,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.7.tgz", - "integrity": "sha512-07RsAAzznWqdfJC+h3L2UVWwnUHepsFw5GmzySnUspHHb7glJ1+47rvlcH0SeUtoVOs8hF4/THgZbtJRyALaJA==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.10.tgz", + "integrity": "sha512-oR31GtBTFYCqEBALI9r6WxoU/ZofZl962pouZRTEYECvNF/dtXKku8YXcJkhgK/beU+zedXfIzHijSRapJY3vg==", "cpu": [ "arm" ], @@ -139,13 +155,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.7.tgz", - "integrity": "sha512-43Bbhq3Ia/mGFTCRA4NlY8VRH3dLQltJ4cqzhSfq+cdvdm9nKJXVh4NUkJvdZgEZIkf/ufeMmJ0/22v9btXTcw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.10.tgz", + "integrity": "sha512-5luJWN6YKBsawd5f9i4+c+geYiVEw20FVW5x0v1kEMWNq8UctFjDiMATBxLvmmHA4bf7F6hTRaJgtghFr9iziQ==", "cpu": [ "arm64" ], @@ -155,13 +171,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.7.tgz", - "integrity": "sha512-ViYkfcfnbwOoTS7xE4DvYFv7QOlW8kPBuccc4erJ0jx2mXDPR7e0lYOH9JelotS9qe8uJ0s2i3UjUvjunEp53A==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.10.tgz", + "integrity": "sha512-NrSCx2Kim3EnnWgS4Txn0QGt0Xipoumb6z6sUtl5bOEZIVKhzfyp/Lyw4C1DIYvzeW/5mWYPBFJU3a/8Yr75DQ==", "cpu": [ "ia32" ], @@ -171,13 +187,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.7.tgz", - "integrity": "sha512-H1g+AwwcqYQ/Hl/sMcopRcNLY/fysIb/ksDfCa3/kOaHQNhBrLeDYw+88VAFV5U6oJL9GqnmUj72m9Nv3th3hA==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.10.tgz", + "integrity": "sha512-xoSphrd4AZda8+rUDDfD9J6FUMjrkTz8itpTITM4/xgerAZZcFW7Dv+sun7333IfKxGG8gAq+3NbfEMJfiY+Eg==", "cpu": [ "loong64" ], @@ -187,13 +203,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.7.tgz", - "integrity": "sha512-MDLGrVbTGYtmldlbcxfeDPdhxttUmWoX3ovk9u6jc8iM+ueBAFlaXKuUMCoyP/zfOJb+KElB61eSdBPSvNcCEg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.10.tgz", + "integrity": "sha512-ab6eiuCwoMmYDyTnyptoKkVS3k8fy/1Uvq7Dj5czXI6DF2GqD2ToInBI0SHOp5/X1BdZ26RKc5+qjQNGRBelRA==", "cpu": [ "mips64el" ], @@ -203,13 +219,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.7.tgz", - "integrity": "sha512-UWtLhRPKzI+v2bKk4j9rBpGyXbLAXLCOeqt1tLVAt1mfagHpFjUzzIHCpPiUfY3x1xY5e45/+BWzGpqqvSglNw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.10.tgz", + "integrity": "sha512-NLinzzOgZQsGpsTkEbdJTCanwA5/wozN9dSgEl12haXJBzMTpssebuXR42bthOF3z7zXFWH1AmvWunUCkBE4EA==", "cpu": [ "ppc64" ], @@ -219,13 +235,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.7.tgz", - "integrity": "sha512-3C/RTKqZauUwBYtIQAv7ELTJd+H2dNKPyzwE2ZTbz2RNrNhNHRoeKnG5C++eM6nSZWUCLyyaWfq1v1YRwBS/+A==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.10.tgz", + "integrity": "sha512-FE557XdZDrtX8NMIeA8LBJX3dC2M8VGXwfrQWU7LB5SLOajfJIxmSdyL/gU1m64Zs9CBKvm4UAuBp5aJ8OgnrA==", "cpu": [ "riscv64" ], @@ -235,13 +251,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.7.tgz", - "integrity": "sha512-x7cuRSCm998KFZqGEtSo8rI5hXLxWji4znZkBhg2FPF8A8lxLLCsSXe2P5utf0RBQflb3K97dkEH/BJwTqrbDw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.10.tgz", + "integrity": "sha512-3BBSbgzuB9ajLoVZk0mGu+EHlBwkusRmeNYdqmznmMc9zGASFjSsxgkNsqmXugpPk00gJ0JNKh/97nxmjctdew==", "cpu": [ "s390x" ], @@ -251,13 +267,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.7.tgz", - "integrity": "sha512-1Z2BtWgM0Wc92WWiZR5kZ5eC+IetI++X+nf9NMbUvVymt74fnQqwgM5btlTW7P5uCHfq03u5MWHjIZa4o+TnXQ==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.10.tgz", + "integrity": "sha512-QSX81KhFoZGwenVyPoberggdW1nrQZSvfVDAIUXr3WqLRZGZqWk/P4T8p2SP+de2Sr5HPcvjhcJzEiulKgnxtA==", "cpu": [ "x64" ], @@ -267,13 +283,29 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.10.tgz", + "integrity": "sha512-AKQM3gfYfSW8XRk8DdMCzaLUFB15dTrZfnX8WXQoOUpUBQ+NaAFCP1kPS/ykbbGYz7rxn0WS48/81l9hFl3u4A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.7.tgz", - "integrity": "sha512-//VShPN4hgbmkDjYNCZermIhj8ORqoPNmAnwSPqPtBB0xOpHrXMlJhsqLNsgoBm0zi/5tmy//WyL6g81Uq2c6Q==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.10.tgz", + "integrity": "sha512-7RTytDPGU6fek/hWuN9qQpeGPBZFfB4zZgcz2VK2Z5VpdUxEI8JKYsg3JfO0n/Z1E/6l05n0unDCNc4HnhQGig==", "cpu": [ "x64" ], @@ -283,13 +315,29 @@ "netbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.10.tgz", + "integrity": "sha512-5Se0VM9Wtq797YFn+dLimf2Zx6McttsH2olUBsDml+lm0GOCRVebRWUvDtkY4BWYv/3NgzS8b/UM3jQNh5hYyw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.7.tgz", - "integrity": "sha512-IQ8BliXHiOsbQEOHzc7mVLIw2UYPpbOXJQ9cK1nClNYQjZthvfiA6rWZMz4BZpVzHZJ+/H2H23cZwRJ1NPYOGg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.10.tgz", + "integrity": "sha512-XkA4frq1TLj4bEMB+2HnI0+4RnjbuGZfet2gs/LNs5Hc7D89ZQBHQ0gL2ND6Lzu1+QVkjp3x1gIcPKzRNP8bXw==", "cpu": [ "x64" ], @@ -299,13 +347,29 @@ "openbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.10.tgz", + "integrity": "sha512-AVTSBhTX8Y/Fz6OmIVBip9tJzZEUcY8WLh7I59+upa5/GPhh2/aM6bvOMQySspnCCHvFi79kMtdJS1w0DXAeag==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.7.tgz", - "integrity": "sha512-phO5HvU3SyURmcW6dfQXX4UEkFREUwaoiTgi1xH+CAFKPGsrcG6oDp1U70yQf5lxRKujoSCEIoBr0uFykJzN2g==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.10.tgz", + "integrity": "sha512-fswk3XT0Uf2pGJmOpDB7yknqhVkJQkAQOcW/ccVOtfx05LkbWOaRAtn5SaqXypeKQra1QaEa841PgrSL9ubSPQ==", "cpu": [ "x64" ], @@ -315,13 +379,13 @@ "sunos" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.7.tgz", - "integrity": "sha512-G/cRKlYrwp1B0uvzEdnFPJ3A6zSWjnsRrWivsEW0IEHZk+czv0Bmiwa51RncruHLjQ4fGsvlYPmCmwzmutPzHA==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.10.tgz", + "integrity": "sha512-ah+9b59KDTSfpaCg6VdJoOQvKjI33nTaQr4UluQwW7aEwZQsbMCfTmfEO4VyewOxx4RaDT/xCy9ra2GPWmO7Kw==", "cpu": [ "arm64" ], @@ -331,13 +395,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.7.tgz", - "integrity": "sha512-/yMNVlMew07NrOflJdRAZcMdUoYTOCPbCHx0eHtg55l87wXeuhvYOPBQy5HLX31Ku+W2XsBD5HnjUjEUsTXJug==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.10.tgz", + "integrity": "sha512-QHPDbKkrGO8/cz9LKVnJU22HOi4pxZnZhhA2HYHez5Pz4JeffhDjf85E57Oyco163GnzNCVkZK0b/n4Y0UHcSw==", "cpu": [ "ia32" ], @@ -347,13 +411,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.7.tgz", - "integrity": "sha512-K9/YybM6WZO71x73Iyab6mwieHtHjm9hrPR/a9FBPZmFO3w+fJaM2uu2rt3JYf/rZR24MFwTliI8VSoKKOtYtg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.10.tgz", + "integrity": "sha512-9KpxSVFCu0iK1owoez6aC/s/EdUQLDN3adTxGCqxMVhrPDj6bt5dbrHDXUuq+Bs2vATFBBrQS5vdQ/Ed2P+nbw==", "cpu": [ "x64" ], @@ -363,286 +427,357 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@playwright/test": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.30.0.tgz", - "integrity": "sha512-SVxkQw1xvn/Wk/EvBnqWIq6NLo1AppwbYOjNLmyU0R1RoQ3rLEBtmjTnElcnz8VEtn11fptj1ECxK0tgURhajw==", + "version": "1.55.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.55.1.tgz", + "integrity": "sha512-IVAh/nOJaw6W9g+RJVlIQJ6gSiER+ae6mKQ5CX1bERzQgbC1VSeBlwdvczT7pxb0GWiyrxH4TGKbMfDb4Sq/ig==", "dev": true, "dependencies": { - "@types/node": "*", - "playwright-core": "1.30.0" + "playwright": "1.55.1" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=14" + "node": ">=18" } }, - "node_modules/@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==", - "dev": true - }, "node_modules/esbuild": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.7.tgz", - "integrity": "sha512-+5hHlrK108fT6C6/40juy0w4DYKtyZ5NjfBlTccBdsFutR7WBxpIY633JzZJewdsCy8xWA/u2z0MSniIJwufYg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.10.tgz", + "integrity": "sha512-9RiGKvCwaqxO2owP61uQ4BgNborAQskMR6QusfWzQqv7AZOg5oGehdY2pRJMTKuwxd1IDBP4rSbI5lHzU7SMsQ==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.7", - "@esbuild/android-arm64": "0.17.7", - "@esbuild/android-x64": "0.17.7", - "@esbuild/darwin-arm64": "0.17.7", - "@esbuild/darwin-x64": "0.17.7", - "@esbuild/freebsd-arm64": "0.17.7", - "@esbuild/freebsd-x64": "0.17.7", - "@esbuild/linux-arm": "0.17.7", - "@esbuild/linux-arm64": "0.17.7", - "@esbuild/linux-ia32": "0.17.7", - "@esbuild/linux-loong64": "0.17.7", - "@esbuild/linux-mips64el": "0.17.7", - "@esbuild/linux-ppc64": "0.17.7", - "@esbuild/linux-riscv64": "0.17.7", - "@esbuild/linux-s390x": "0.17.7", - "@esbuild/linux-x64": "0.17.7", - "@esbuild/netbsd-x64": "0.17.7", - "@esbuild/openbsd-x64": "0.17.7", - "@esbuild/sunos-x64": "0.17.7", - "@esbuild/win32-arm64": "0.17.7", - "@esbuild/win32-ia32": "0.17.7", - "@esbuild/win32-x64": "0.17.7" + "@esbuild/aix-ppc64": "0.25.10", + "@esbuild/android-arm": "0.25.10", + "@esbuild/android-arm64": "0.25.10", + "@esbuild/android-x64": "0.25.10", + "@esbuild/darwin-arm64": "0.25.10", + "@esbuild/darwin-x64": "0.25.10", + "@esbuild/freebsd-arm64": "0.25.10", + "@esbuild/freebsd-x64": "0.25.10", + "@esbuild/linux-arm": "0.25.10", + "@esbuild/linux-arm64": "0.25.10", + "@esbuild/linux-ia32": "0.25.10", + "@esbuild/linux-loong64": "0.25.10", + "@esbuild/linux-mips64el": "0.25.10", + "@esbuild/linux-ppc64": "0.25.10", + "@esbuild/linux-riscv64": "0.25.10", + "@esbuild/linux-s390x": "0.25.10", + "@esbuild/linux-x64": "0.25.10", + "@esbuild/netbsd-arm64": "0.25.10", + "@esbuild/netbsd-x64": "0.25.10", + "@esbuild/openbsd-arm64": "0.25.10", + "@esbuild/openbsd-x64": "0.25.10", + "@esbuild/openharmony-arm64": "0.25.10", + "@esbuild/sunos-x64": "0.25.10", + "@esbuild/win32-arm64": "0.25.10", + "@esbuild/win32-ia32": "0.25.10", + "@esbuild/win32-x64": "0.25.10" } }, - "node_modules/playwright-core": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.30.0.tgz", - "integrity": "sha512-7AnRmTCf+GVYhHbLJsGUtskWTE33SwMZkybJ0v6rqR1boxq2x36U7p1vDRV7HO2IwTZgmycracLxPEJI49wu4g==", + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/playwright": { + "version": "1.55.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.55.1.tgz", + "integrity": "sha512-cJW4Xd/G3v5ovXtJJ52MAOclqeac9S/aGGgRzLabuF8TnIb6xHvMzKIa6JmrRzUkeXJgfL1MhukP0NK6l39h3A==", "dev": true, + "dependencies": { + "playwright-core": "1.55.1" + }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=14" + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.55.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.55.1.tgz", + "integrity": "sha512-Z6Mh9mkwX+zxSlHqdr5AOcJnfp+xUWLCt9uKV18fhzA8eyxUd8NUWzAjxUh55RZKSYwDGX0cfaySdhZJGMoJ+w==", + "dev": true, + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" } } }, "dependencies": { + "@esbuild/aix-ppc64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.10.tgz", + "integrity": "sha512-0NFWnA+7l41irNuaSVlLfgNT12caWJVLzp5eAVhZ0z1qpxbockccEt3s+149rE64VUI3Ml2zt8Nv5JVc4QXTsw==", + "dev": true, + "optional": true + }, "@esbuild/android-arm": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.7.tgz", - "integrity": "sha512-Np6Lg8VUiuzHP5XvHU7zfSVPN4ILdiOhxA1GQ1uvCK2T2l3nI8igQV0c9FJx4hTkq8WGqhGEvn5UuRH8jMkExg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.10.tgz", + "integrity": "sha512-dQAxF1dW1C3zpeCDc5KqIYuZ1tgAdRXNoZP7vkBIRtKZPYe2xVr/d3SkirklCHudW1B45tGiUlz2pUWDfbDD4w==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.7.tgz", - "integrity": "sha512-fOUBZvcbtbQJIj2K/LMKcjULGfXLV9R4qjXFsi3UuqFhIRJHz0Fp6kFjsMFI6vLuPrfC5G9Dmh+3RZOrSKY2Lg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.10.tgz", + "integrity": "sha512-LSQa7eDahypv/VO6WKohZGPSJDq5OVOo3UoFR1E4t4Gj1W7zEQMUhI+lo81H+DtB+kP+tDgBp+M4oNCwp6kffg==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.7.tgz", - "integrity": "sha512-6YILpPvop1rPAvaO/n2iWQL45RyTVTR/1SK7P6Xi2fyu+hpEeX22fE2U2oJd1sfpovUJOWTRdugjddX6QCup3A==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.10.tgz", + "integrity": "sha512-MiC9CWdPrfhibcXwr39p9ha1x0lZJ9KaVfvzA0Wxwz9ETX4v5CHfF09bx935nHlhi+MxhA63dKRRQLiVgSUtEg==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.7.tgz", - "integrity": "sha512-7i0gfFsDt1BBiurZz5oZIpzfxqy5QkJmhXdtrf2Hma/gI9vL2AqxHhRBoI1NeWc9IhN1qOzWZrslhiXZweMSFg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.10.tgz", + "integrity": "sha512-JC74bdXcQEpW9KkV326WpZZjLguSZ3DfS8wrrvPMHgQOIEIG/sPXEN/V8IssoJhbefLRcRqw6RQH2NnpdprtMA==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.7.tgz", - "integrity": "sha512-hRvIu3vuVIcv4SJXEKOHVsNssM5tLE2xWdb9ZyJqsgYp+onRa5El3VJ4+WjTbkf/A2FD5wuMIbO2FCTV39LE0w==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.10.tgz", + "integrity": "sha512-tguWg1olF6DGqzws97pKZ8G2L7Ig1vjDmGTwcTuYHbuU6TTjJe5FXbgs5C1BBzHbJ2bo1m3WkQDbWO2PvamRcg==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.7.tgz", - "integrity": "sha512-2NJjeQ9kiabJkVXLM3sHkySqkL1KY8BeyLams3ITyiLW10IwDL0msU5Lq1cULCn9zNxt1Seh1I6QrqyHUvOtQw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.10.tgz", + "integrity": "sha512-3ZioSQSg1HT2N05YxeJWYR+Libe3bREVSdWhEEgExWaDtyFbbXWb49QgPvFH8u03vUPX10JhJPcz7s9t9+boWg==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.7.tgz", - "integrity": "sha512-8kSxlbjuLYMoIgvRxPybirHJeW45dflyIgHVs+jzMYJf87QOay1ZUTzKjNL3vqHQjmkSn8p6KDfHVrztn7Rprw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.10.tgz", + "integrity": "sha512-LLgJfHJk014Aa4anGDbh8bmI5Lk+QidDmGzuC2D+vP7mv/GeSN+H39zOf7pN5N8p059FcOfs2bVlrRr4SK9WxA==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.7.tgz", - "integrity": "sha512-07RsAAzznWqdfJC+h3L2UVWwnUHepsFw5GmzySnUspHHb7glJ1+47rvlcH0SeUtoVOs8hF4/THgZbtJRyALaJA==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.10.tgz", + "integrity": "sha512-oR31GtBTFYCqEBALI9r6WxoU/ZofZl962pouZRTEYECvNF/dtXKku8YXcJkhgK/beU+zedXfIzHijSRapJY3vg==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.7.tgz", - "integrity": "sha512-43Bbhq3Ia/mGFTCRA4NlY8VRH3dLQltJ4cqzhSfq+cdvdm9nKJXVh4NUkJvdZgEZIkf/ufeMmJ0/22v9btXTcw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.10.tgz", + "integrity": "sha512-5luJWN6YKBsawd5f9i4+c+geYiVEw20FVW5x0v1kEMWNq8UctFjDiMATBxLvmmHA4bf7F6hTRaJgtghFr9iziQ==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.7.tgz", - "integrity": "sha512-ViYkfcfnbwOoTS7xE4DvYFv7QOlW8kPBuccc4erJ0jx2mXDPR7e0lYOH9JelotS9qe8uJ0s2i3UjUvjunEp53A==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.10.tgz", + "integrity": "sha512-NrSCx2Kim3EnnWgS4Txn0QGt0Xipoumb6z6sUtl5bOEZIVKhzfyp/Lyw4C1DIYvzeW/5mWYPBFJU3a/8Yr75DQ==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.7.tgz", - "integrity": "sha512-H1g+AwwcqYQ/Hl/sMcopRcNLY/fysIb/ksDfCa3/kOaHQNhBrLeDYw+88VAFV5U6oJL9GqnmUj72m9Nv3th3hA==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.10.tgz", + "integrity": "sha512-xoSphrd4AZda8+rUDDfD9J6FUMjrkTz8itpTITM4/xgerAZZcFW7Dv+sun7333IfKxGG8gAq+3NbfEMJfiY+Eg==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.7.tgz", - "integrity": "sha512-MDLGrVbTGYtmldlbcxfeDPdhxttUmWoX3ovk9u6jc8iM+ueBAFlaXKuUMCoyP/zfOJb+KElB61eSdBPSvNcCEg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.10.tgz", + "integrity": "sha512-ab6eiuCwoMmYDyTnyptoKkVS3k8fy/1Uvq7Dj5czXI6DF2GqD2ToInBI0SHOp5/X1BdZ26RKc5+qjQNGRBelRA==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.7.tgz", - "integrity": "sha512-UWtLhRPKzI+v2bKk4j9rBpGyXbLAXLCOeqt1tLVAt1mfagHpFjUzzIHCpPiUfY3x1xY5e45/+BWzGpqqvSglNw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.10.tgz", + "integrity": "sha512-NLinzzOgZQsGpsTkEbdJTCanwA5/wozN9dSgEl12haXJBzMTpssebuXR42bthOF3z7zXFWH1AmvWunUCkBE4EA==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.7.tgz", - "integrity": "sha512-3C/RTKqZauUwBYtIQAv7ELTJd+H2dNKPyzwE2ZTbz2RNrNhNHRoeKnG5C++eM6nSZWUCLyyaWfq1v1YRwBS/+A==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.10.tgz", + "integrity": "sha512-FE557XdZDrtX8NMIeA8LBJX3dC2M8VGXwfrQWU7LB5SLOajfJIxmSdyL/gU1m64Zs9CBKvm4UAuBp5aJ8OgnrA==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.7.tgz", - "integrity": "sha512-x7cuRSCm998KFZqGEtSo8rI5hXLxWji4znZkBhg2FPF8A8lxLLCsSXe2P5utf0RBQflb3K97dkEH/BJwTqrbDw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.10.tgz", + "integrity": "sha512-3BBSbgzuB9ajLoVZk0mGu+EHlBwkusRmeNYdqmznmMc9zGASFjSsxgkNsqmXugpPk00gJ0JNKh/97nxmjctdew==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.7.tgz", - "integrity": "sha512-1Z2BtWgM0Wc92WWiZR5kZ5eC+IetI++X+nf9NMbUvVymt74fnQqwgM5btlTW7P5uCHfq03u5MWHjIZa4o+TnXQ==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.10.tgz", + "integrity": "sha512-QSX81KhFoZGwenVyPoberggdW1nrQZSvfVDAIUXr3WqLRZGZqWk/P4T8p2SP+de2Sr5HPcvjhcJzEiulKgnxtA==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.10.tgz", + "integrity": "sha512-AKQM3gfYfSW8XRk8DdMCzaLUFB15dTrZfnX8WXQoOUpUBQ+NaAFCP1kPS/ykbbGYz7rxn0WS48/81l9hFl3u4A==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.7.tgz", - "integrity": "sha512-//VShPN4hgbmkDjYNCZermIhj8ORqoPNmAnwSPqPtBB0xOpHrXMlJhsqLNsgoBm0zi/5tmy//WyL6g81Uq2c6Q==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.10.tgz", + "integrity": "sha512-7RTytDPGU6fek/hWuN9qQpeGPBZFfB4zZgcz2VK2Z5VpdUxEI8JKYsg3JfO0n/Z1E/6l05n0unDCNc4HnhQGig==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.10.tgz", + "integrity": "sha512-5Se0VM9Wtq797YFn+dLimf2Zx6McttsH2olUBsDml+lm0GOCRVebRWUvDtkY4BWYv/3NgzS8b/UM3jQNh5hYyw==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.7.tgz", - "integrity": "sha512-IQ8BliXHiOsbQEOHzc7mVLIw2UYPpbOXJQ9cK1nClNYQjZthvfiA6rWZMz4BZpVzHZJ+/H2H23cZwRJ1NPYOGg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.10.tgz", + "integrity": "sha512-XkA4frq1TLj4bEMB+2HnI0+4RnjbuGZfet2gs/LNs5Hc7D89ZQBHQ0gL2ND6Lzu1+QVkjp3x1gIcPKzRNP8bXw==", + "dev": true, + "optional": true + }, + "@esbuild/openharmony-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.10.tgz", + "integrity": "sha512-AVTSBhTX8Y/Fz6OmIVBip9tJzZEUcY8WLh7I59+upa5/GPhh2/aM6bvOMQySspnCCHvFi79kMtdJS1w0DXAeag==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.7.tgz", - "integrity": "sha512-phO5HvU3SyURmcW6dfQXX4UEkFREUwaoiTgi1xH+CAFKPGsrcG6oDp1U70yQf5lxRKujoSCEIoBr0uFykJzN2g==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.10.tgz", + "integrity": "sha512-fswk3XT0Uf2pGJmOpDB7yknqhVkJQkAQOcW/ccVOtfx05LkbWOaRAtn5SaqXypeKQra1QaEa841PgrSL9ubSPQ==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.7.tgz", - "integrity": "sha512-G/cRKlYrwp1B0uvzEdnFPJ3A6zSWjnsRrWivsEW0IEHZk+czv0Bmiwa51RncruHLjQ4fGsvlYPmCmwzmutPzHA==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.10.tgz", + "integrity": "sha512-ah+9b59KDTSfpaCg6VdJoOQvKjI33nTaQr4UluQwW7aEwZQsbMCfTmfEO4VyewOxx4RaDT/xCy9ra2GPWmO7Kw==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.7.tgz", - "integrity": "sha512-/yMNVlMew07NrOflJdRAZcMdUoYTOCPbCHx0eHtg55l87wXeuhvYOPBQy5HLX31Ku+W2XsBD5HnjUjEUsTXJug==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.10.tgz", + "integrity": "sha512-QHPDbKkrGO8/cz9LKVnJU22HOi4pxZnZhhA2HYHez5Pz4JeffhDjf85E57Oyco163GnzNCVkZK0b/n4Y0UHcSw==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.7.tgz", - "integrity": "sha512-K9/YybM6WZO71x73Iyab6mwieHtHjm9hrPR/a9FBPZmFO3w+fJaM2uu2rt3JYf/rZR24MFwTliI8VSoKKOtYtg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.10.tgz", + "integrity": "sha512-9KpxSVFCu0iK1owoez6aC/s/EdUQLDN3adTxGCqxMVhrPDj6bt5dbrHDXUuq+Bs2vATFBBrQS5vdQ/Ed2P+nbw==", "dev": true, "optional": true }, "@playwright/test": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.30.0.tgz", - "integrity": "sha512-SVxkQw1xvn/Wk/EvBnqWIq6NLo1AppwbYOjNLmyU0R1RoQ3rLEBtmjTnElcnz8VEtn11fptj1ECxK0tgURhajw==", + "version": "1.55.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.55.1.tgz", + "integrity": "sha512-IVAh/nOJaw6W9g+RJVlIQJ6gSiER+ae6mKQ5CX1bERzQgbC1VSeBlwdvczT7pxb0GWiyrxH4TGKbMfDb4Sq/ig==", "dev": true, "requires": { - "@types/node": "*", - "playwright-core": "1.30.0" + "playwright": "1.55.1" } }, - "@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==", - "dev": true - }, "esbuild": { - "version": "0.17.7", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.7.tgz", - "integrity": "sha512-+5hHlrK108fT6C6/40juy0w4DYKtyZ5NjfBlTccBdsFutR7WBxpIY633JzZJewdsCy8xWA/u2z0MSniIJwufYg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.10.tgz", + "integrity": "sha512-9RiGKvCwaqxO2owP61uQ4BgNborAQskMR6QusfWzQqv7AZOg5oGehdY2pRJMTKuwxd1IDBP4rSbI5lHzU7SMsQ==", + "dev": true, + "requires": { + "@esbuild/aix-ppc64": "0.25.10", + "@esbuild/android-arm": "0.25.10", + "@esbuild/android-arm64": "0.25.10", + "@esbuild/android-x64": "0.25.10", + "@esbuild/darwin-arm64": "0.25.10", + "@esbuild/darwin-x64": "0.25.10", + "@esbuild/freebsd-arm64": "0.25.10", + "@esbuild/freebsd-x64": "0.25.10", + "@esbuild/linux-arm": "0.25.10", + "@esbuild/linux-arm64": "0.25.10", + "@esbuild/linux-ia32": "0.25.10", + "@esbuild/linux-loong64": "0.25.10", + "@esbuild/linux-mips64el": "0.25.10", + "@esbuild/linux-ppc64": "0.25.10", + "@esbuild/linux-riscv64": "0.25.10", + "@esbuild/linux-s390x": "0.25.10", + "@esbuild/linux-x64": "0.25.10", + "@esbuild/netbsd-arm64": "0.25.10", + "@esbuild/netbsd-x64": "0.25.10", + "@esbuild/openbsd-arm64": "0.25.10", + "@esbuild/openbsd-x64": "0.25.10", + "@esbuild/openharmony-arm64": "0.25.10", + "@esbuild/sunos-x64": "0.25.10", + "@esbuild/win32-arm64": "0.25.10", + "@esbuild/win32-ia32": "0.25.10", + "@esbuild/win32-x64": "0.25.10" + } + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "playwright": { + "version": "1.55.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.55.1.tgz", + "integrity": "sha512-cJW4Xd/G3v5ovXtJJ52MAOclqeac9S/aGGgRzLabuF8TnIb6xHvMzKIa6JmrRzUkeXJgfL1MhukP0NK6l39h3A==", "dev": true, "requires": { - "@esbuild/android-arm": "0.17.7", - "@esbuild/android-arm64": "0.17.7", - "@esbuild/android-x64": "0.17.7", - "@esbuild/darwin-arm64": "0.17.7", - "@esbuild/darwin-x64": "0.17.7", - "@esbuild/freebsd-arm64": "0.17.7", - "@esbuild/freebsd-x64": "0.17.7", - "@esbuild/linux-arm": "0.17.7", - "@esbuild/linux-arm64": "0.17.7", - "@esbuild/linux-ia32": "0.17.7", - "@esbuild/linux-loong64": "0.17.7", - "@esbuild/linux-mips64el": "0.17.7", - "@esbuild/linux-ppc64": "0.17.7", - "@esbuild/linux-riscv64": "0.17.7", - "@esbuild/linux-s390x": "0.17.7", - "@esbuild/linux-x64": "0.17.7", - "@esbuild/netbsd-x64": "0.17.7", - "@esbuild/openbsd-x64": "0.17.7", - "@esbuild/sunos-x64": "0.17.7", - "@esbuild/win32-arm64": "0.17.7", - "@esbuild/win32-ia32": "0.17.7", - "@esbuild/win32-x64": "0.17.7" + "fsevents": "2.3.2", + "playwright-core": "1.55.1" } }, "playwright-core": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.30.0.tgz", - "integrity": "sha512-7AnRmTCf+GVYhHbLJsGUtskWTE33SwMZkybJ0v6rqR1boxq2x36U7p1vDRV7HO2IwTZgmycracLxPEJI49wu4g==", + "version": "1.55.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.55.1.tgz", + "integrity": "sha512-Z6Mh9mkwX+zxSlHqdr5AOcJnfp+xUWLCt9uKV18fhzA8eyxUd8NUWzAjxUh55RZKSYwDGX0cfaySdhZJGMoJ+w==", "dev": true } } diff --git a/internal/web/package.json b/internal/web/package.json index 9d03af9..ed30d4b 100644 --- a/internal/web/package.json +++ b/internal/web/package.json @@ -12,7 +12,7 @@ "author": "Adrien Petel", "license": "MIT", "devDependencies": { - "@playwright/test": "^1.30.0", - "esbuild": "0.17.7" + "@playwright/test": "^1.55.0", + "esbuild": "0.25.10" } } diff --git a/internal/web/src/completer.js b/internal/web/src/completer.js index 341521d..1381d3e 100644 --- a/internal/web/src/completer.js +++ b/internal/web/src/completer.js @@ -647,7 +647,7 @@ var Completer = function (config) { }, { caption: "$lookup", - value: '$lookup: {\n "from": "collection to join",\n "localField": "field from the input documents",\n "foreignField": "field from the documents of the from collection",\n "as": "output array field"\n}', + value: '$lookup: {\n "from": "collection to join",\n "localField": "field from the input documents",\n "foreignField": "field from the documents of the from collection",\n "let": {var1: "val1"},\n "pipeline": [],\n "as": "output array field"\n}', meta: "aggregation stage" }, { @@ -1187,6 +1187,11 @@ var Completer = function (config) { value: '$topN: {\n "n": "expression",\n "sortBy": { "field": 1 },\n "output": "expression"\n}', meta: "aggregation accumulator (v5.2+)" }, + { + caption: "$sortArray", + value: '$sortArray: { input: "$arr", sortBy: { field: 1 } }', + meta: "aggregation accumulator (v5.2+)" + }, { caption: "$linearFill", value: '$linearFill: "expression"', @@ -1207,6 +1212,11 @@ var Completer = function (config) { value: '$tsSecond: "expression"', meta: "aggregation (v5.1+)" }, + { + caption: "$toUUID", + value: '$toUUID: "expression"', + meta: "aggregation (v8.0+)" + }, ].map(addInsertMatch).concat(basicBsonSnippet) diff --git a/internal/web/src/playground.html b/internal/web/src/playground.html index 9c1fb60..11459cd 100644 --- a/internal/web/src/playground.html +++ b/internal/web/src/playground.html @@ -8,7 +8,7 @@ - + diff --git a/internal/web/static/playground-min.js b/internal/web/static/playground-min.js index 31f3b07..71f78cd 100644 --- a/internal/web/static/playground-min.js +++ b/internal/web/static/playground-min.js @@ -1,5 +1,5 @@ -(function(){var L="",b=function(){return this}();if(!b&&typeof window<"u"&&(b=window),!L&&typeof requirejs<"u")return;var B=function(t,e,i){if(typeof t!="string"){B.original?B.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(i=e),B.modules[t]||(B.payloads[t]=i,B.modules[t]=null)};B.modules={},B.payloads={};var E=function(t,e,i){if(typeof e=="string"){var r=h(t,e);if(r!=null)return i&&i(),r}else if(Object.prototype.toString.call(e)==="[object Array]"){for(var n=[],o=0,m=e.length;o=0?parseFloat((p.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((p.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),b.isOldIE=b.isIE&&b.isIE<9,b.isGecko=b.isMozilla=p.match(/ Gecko\/\d+/),b.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",b.isWebKit=parseFloat(p.split("WebKit/")[1])||void 0,b.isChrome=parseFloat(p.split(" Chrome/")[1])||void 0,b.isEdge=parseFloat(p.split(" Edge/")[1])||void 0,b.isAIR=p.indexOf("AdobeAIR")>=0,b.isAndroid=p.indexOf("Android")>=0,b.isChromeOS=p.indexOf(" CrOS ")>=0,b.isIOS=/iPad|iPhone|iPod/.test(p)&&!window.MSStream,b.isIOS&&(b.isMac=!0),b.isMobile=b.isIOS||b.isAndroid}),define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(L,b,B){"use strict";var E=L("./useragent"),A="http://www.w3.org/1999/xhtml";if(b.buildDom=function h(u,t,e){if(typeof u=="string"&&u){var i=document.createTextNode(u);return t&&t.appendChild(i),i}if(!Array.isArray(u))return u&&u.appendChild&&t&&t.appendChild(u),u;if(typeof u[0]!="string"||!u[0]){for(var r=[],n=0;n"u"&&(b.importCssString=function(){}),b.computedStyle=function(h,u){return window.getComputedStyle(h,"")||{}},b.setStyle=function(h,u,t){h[u]!==t&&(h[u]=t)},b.HAS_CSS_ANIMATION=!1,b.HAS_CSS_TRANSFORMS=!1,b.HI_DPI=E.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,typeof document<"u"){var p=document.createElement("div");b.HI_DPI&&p.style.transform!==void 0&&(b.HAS_CSS_TRANSFORMS=!0),!E.isEdge&&typeof p.style.animationName<"u"&&(b.HAS_CSS_ANIMATION=!0),p=null}b.HAS_CSS_TRANSFORMS?b.translate=function(h,u,t){h.style.transform="translate("+Math.round(u)+"px, "+Math.round(t)+"px)"}:b.translate=function(h,u,t){h.style.top=Math.round(t)+"px",h.style.left=Math.round(u)+"px"}}),define("ace/lib/oop",["require","exports","module"],function(L,b,B){"use strict";b.inherits=function(E,A){E.super_=A,E.prototype=Object.create(A.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}})},b.mixin=function(E,A){for(var p in A)E[p]=A[p];return E},b.implement=function(E,A){b.mixin(E,A)}}),define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(L,b,B){"use strict";var E=L("./oop"),A=function(){var p={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},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:"*"}},h,u;for(u in p.FUNCTION_KEYS)h=p.FUNCTION_KEYS[u].toLowerCase(),p[h]=parseInt(u,10);for(u in p.PRINTABLE_KEYS)h=p.PRINTABLE_KEYS[u].toLowerCase(),p[h]=parseInt(u,10);return E.mixin(p,p.MODIFIER_KEYS),E.mixin(p,p.PRINTABLE_KEYS),E.mixin(p,p.FUNCTION_KEYS),p.enter=p.return,p.escape=p.esc,p.del=p.delete,p[173]="-",function(){for(var t=["cmd","ctrl","alt","shift"],e=Math.pow(2,t.length);e--;)p.KEY_MODS[e]=t.filter(function(i){return e&p.KEY_MODS[i]}).join("-")+"-"}(),p.KEY_MODS[0]="",p.KEY_MODS[-1]="input-",p}();E.mixin(b,A),b.keyCodeToString=function(p){var h=A[p];return typeof h!="string"&&(h=String.fromCharCode(p)),h.toLowerCase()}}),define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(L,b,B){"use strict";var E=L("./keys"),A=L("./useragent"),p=null,h=0,u;function t(){u=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){u={passive:!1}}})}catch{}}function e(){return u==null&&t(),u}function i(y,c,l){this.elem=y,this.type=c,this.callback=l}i.prototype.destroy=function(){n(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var r=b.addListener=function(y,c,l,g){y.addEventListener(c,l,e()),g&&g.$toDestroy.push(new i(y,c,l))},n=b.removeListener=function(y,c,l){y.removeEventListener(c,l,e())};b.stopEvent=function(y){return b.stopPropagation(y),b.preventDefault(y),!1},b.stopPropagation=function(y){y.stopPropagation&&y.stopPropagation()},b.preventDefault=function(y){y.preventDefault&&y.preventDefault()},b.getButton=function(y){return y.type=="dblclick"?0:y.type=="contextmenu"||A.isMac&&y.ctrlKey&&!y.altKey&&!y.shiftKey?2:y.button},b.capture=function(y,c,l){var g=y&&y.ownerDocument||document;function d(a){c&&c(a),l&&l(a),n(g,"mousemove",c),n(g,"mouseup",d),n(g,"dragstart",d)}return r(g,"mousemove",c),r(g,"mouseup",d),r(g,"dragstart",d),d},b.addMouseWheelListener=function(y,c,l){"onmousewheel"in y?r(y,"mousewheel",function(g){var d=8;g.wheelDeltaX!==void 0?(g.wheelX=-g.wheelDeltaX/d,g.wheelY=-g.wheelDeltaY/d):(g.wheelX=0,g.wheelY=-g.wheelDelta/d),c(g)},l):"onwheel"in y?r(y,"wheel",function(g){var d=.35;switch(g.deltaMode){case g.DOM_DELTA_PIXEL:g.wheelX=g.deltaX*d||0,g.wheelY=g.deltaY*d||0;break;case g.DOM_DELTA_LINE:case g.DOM_DELTA_PAGE:g.wheelX=(g.deltaX||0)*5,g.wheelY=(g.deltaY||0)*5;break}c(g)},l):r(y,"DOMMouseScroll",function(g){g.axis&&g.axis==g.HORIZONTAL_AXIS?(g.wheelX=(g.detail||0)*5,g.wheelY=0):(g.wheelX=0,g.wheelY=(g.detail||0)*5),c(g)},l)},b.addMultiMouseDownListener=function(y,c,l,g,d){var a=0,f,s,v,$={2:"dblclick",3:"tripleclick",4:"quadclick"};function x(C){if(b.getButton(C)!==0?a=0:C.detail>1?(a++,a>4&&(a=1)):a=1,A.isIE){var k=Math.abs(C.clientX-f)>5||Math.abs(C.clientY-s)>5;(!v||k)&&(a=1),v&&clearTimeout(v),v=setTimeout(function(){v=null},c[a-1]||600),a==1&&(f=C.clientX,s=C.clientY)}if(C._clicks=a,l[g]("mousedown",C),a>4)a=0;else if(a>1)return l[g]($[a],C)}Array.isArray(y)||(y=[y]),y.forEach(function(C){r(C,"mousedown",x,d)})};var o=function(y){return 0|(y.ctrlKey?1:0)|(y.altKey?2:0)|(y.shiftKey?4:0)|(y.metaKey?8:0)};b.getModifierString=function(y){return E.KEY_MODS[o(y)]};function m(y,c,l){var g=o(c);if(!A.isMac&&p){if(c.getModifierState&&(c.getModifierState("OS")||c.getModifierState("Win"))&&(g|=8),p.altGr)if((3&g)!=3)p.altGr=0;else return;if(l===18||l===17){var d="location"in c?c.location:c.keyLocation;if(l===17&&d===1)p[l]==1&&(h=c.timeStamp);else if(l===18&&g===3&&d===2){var a=c.timeStamp-h;a<50&&(p.altGr=!0)}}}if(l in E.MODIFIER_KEYS&&(l=-1),!g&&l===13){var d="location"in c?c.location:c.keyLocation;if(d===3&&(y(c,g,-l),c.defaultPrevented))return}if(A.isChromeOS&&g&8){if(y(c,g,l),c.defaultPrevented)return;g&=-9}return!g&&!(l in E.FUNCTION_KEYS)&&!(l in E.PRINTABLE_KEYS)?!1:y(c,g,l)}b.addCommandKeyListener=function(y,c,l){if(A.isOldGecko||A.isOpera&&!("KeyboardEvent"in window)){var g=null;r(y,"keydown",function(a){g=a.keyCode},l),r(y,"keypress",function(a){return m(c,a,g)},l)}else{var d=null;r(y,"keydown",function(a){p[a.keyCode]=(p[a.keyCode]||0)+1;var f=m(c,a,a.keyCode);return d=a.defaultPrevented,f},l),r(y,"keypress",function(a){d&&(a.ctrlKey||a.altKey||a.shiftKey||a.metaKey)&&(b.stopEvent(a),d=null)},l),r(y,"keyup",function(a){p[a.keyCode]=null},l),p||(w(),r(window,"focus",w))}};function w(){p=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!A.isOldIE){var S=1;b.nextTick=function(y,c){c=c||window;var l="zero-timeout-message-"+S++,g=function(d){d.data==l&&(b.stopPropagation(d),n(c,"message",g),y())};r(c,"message",g),c.postMessage(l,"*")}}b.$idleBlocked=!1,b.onIdle=function(y,c){return setTimeout(function l(){b.$idleBlocked?setTimeout(l,100):y()},c)},b.$idleBlockId=null,b.blockIdle=function(y){b.$idleBlockId&&clearTimeout(b.$idleBlockId),b.$idleBlocked=!0,b.$idleBlockId=setTimeout(function(){b.$idleBlocked=!1},y||100)},b.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),b.nextFrame?b.nextFrame=b.nextFrame.bind(window):b.nextFrame=function(y){setTimeout(y,17)}}),define("ace/range",["require","exports","module"],function(L,b,B){"use strict";var E=function(p,h){return p.row-h.row||p.column-h.column},A=function(p,h,u,t){this.start={row:p,column:h},this.end={row:u,column:t}};(function(){this.isEqual=function(p){return this.start.row===p.start.row&&this.end.row===p.end.row&&this.start.column===p.start.column&&this.end.column===p.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(p,h){return this.compare(p,h)==0},this.compareRange=function(p){var h,u=p.end,t=p.start;return h=this.compare(u.row,u.column),h==1?(h=this.compare(t.row,t.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(t.row,t.column),h==-1?-1:h==1?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(p){return this.comparePoint(p.start)==0&&this.comparePoint(p.end)==0},this.intersects=function(p){var h=this.compareRange(p);return h==-1||h==0||h==1},this.isEnd=function(p,h){return this.end.row==p&&this.end.column==h},this.isStart=function(p,h){return this.start.row==p&&this.start.column==h},this.setStart=function(p,h){typeof p=="object"?(this.start.column=p.column,this.start.row=p.row):(this.start.row=p,this.start.column=h)},this.setEnd=function(p,h){typeof p=="object"?(this.end.column=p.column,this.end.row=p.row):(this.end.row=p,this.end.column=h)},this.inside=function(p,h){return this.compare(p,h)==0?!(this.isEnd(p,h)||this.isStart(p,h)):!1},this.insideStart=function(p,h){return this.compare(p,h)==0?!this.isEnd(p,h):!1},this.insideEnd=function(p,h){return this.compare(p,h)==0?!this.isStart(p,h):!1},this.compare=function(p,h){return!this.isMultiLine()&&p===this.start.row?hthis.end.column?1:0:pthis.end.row?1:this.start.row===p?h>=this.start.column?0:-1:this.end.row===p?h<=this.end.column?0:1:0},this.compareStart=function(p,h){return this.start.row==p&&this.start.column==h?-1:this.compare(p,h)},this.compareEnd=function(p,h){return this.end.row==p&&this.end.column==h?1:this.compare(p,h)},this.compareInside=function(p,h){return this.end.row==p&&this.end.column==h?1:this.start.row==p&&this.start.column==h?-1:this.compare(p,h)},this.clipRows=function(p,h){if(this.end.row>h)var u={row:h+1,column:0};else if(this.end.rowh)var t={row:h+1,column:0};else if(this.start.row0;)h&1&&(u+=p),(h>>=1)&&(p+=p);return u};var E=/^\s\s*/,A=/\s\s*$/;b.stringTrimLeft=function(p){return p.replace(E,"")},b.stringTrimRight=function(p){return p.replace(A,"")},b.copyObject=function(p){var h={};for(var u in p)h[u]=p[u];return h},b.copyArray=function(p){for(var h=[],u=0,t=p.length;uDate.now()-50?!0:E=!1},cancel:function(){E=Date.now()}}}),define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(L,b,B){"use strict";var E=L("../lib/event"),A=L("../lib/useragent"),p=L("../lib/dom"),h=L("../lib/lang"),u=L("../clipboard"),t=A.isChrome<18,e=A.isIE,i=A.isChrome>63,r=400,n=L("../lib/keys"),o=n.KEY_MODS,m=A.isIOS,w=m?/\s/:/\n/,S=A.isMobile,y=function(c,l){var g=p.createElement("textarea");g.className="ace_text-input",g.setAttribute("wrap","off"),g.setAttribute("autocorrect","off"),g.setAttribute("autocapitalize","off"),g.setAttribute("spellcheck",!1),g.style.opacity="0",c.insertBefore(g,c.firstChild);var d=!1,a=!1,f=!1,s=!1,v="";S||(g.style.fontSize="1px");var $=!1,x=!1,C="",k=0,R=0,_=0;try{var O=document.activeElement===g}catch{}E.addListener(g,"blur",function(F){x||(l.onBlur(F),O=!1)},l),E.addListener(g,"focus",function(F){if(!x){if(O=!0,A.isEdge)try{if(!document.hasFocus())return}catch{}l.onFocus(F),A.isEdge?setTimeout(I):I()}},l),this.$focusScroll=!1,this.focus=function(){if(v||i||this.$focusScroll=="browser")return g.focus({preventScroll:!0});var F=g.style.top;g.style.position="fixed",g.style.top="0px";try{var H=g.getBoundingClientRect().top!=0}catch{return}var U=[];if(H)for(var Z=g.parentElement;Z&&Z.nodeType==1;)U.push(Z),Z.setAttribute("ace_nocontext",!0),!Z.parentElement&&Z.getRootNode?Z=Z.getRootNode().host:Z=Z.parentElement;g.focus({preventScroll:!0}),H&&U.forEach(function(ne){ne.removeAttribute("ace_nocontext")}),setTimeout(function(){g.style.position="",g.style.top=="0px"&&(g.style.top=F)},0)},this.blur=function(){g.blur()},this.isFocused=function(){return O},l.on("beforeEndOperation",function(){var F=l.curOp,H=F&&F.command&&F.command.name;if(H!="insertstring"){var U=H&&(F.docChanged||F.selectionChanged);f&&U&&(C=g.value="",q()),I()}});var I=m?function(F){if(!(!O||d&&!F||s)){F||(F="");var H=` +(function(){var L="",b=(function(){return this})();if(!b&&typeof window<"u"&&(b=window),!L&&typeof requirejs<"u")return;var B=function(t,e,i){if(typeof t!="string"){B.original?B.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(i=e),B.modules[t]||(B.payloads[t]=i,B.modules[t]=null)};B.modules={},B.payloads={};var E=function(t,e,i){if(typeof e=="string"){var r=h(t,e);if(r!=null)return i&&i(),r}else if(Object.prototype.toString.call(e)==="[object Array]"){for(var n=[],o=0,m=e.length;o=0?parseFloat((p.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((p.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),b.isOldIE=b.isIE&&b.isIE<9,b.isGecko=b.isMozilla=p.match(/ Gecko\/\d+/),b.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",b.isWebKit=parseFloat(p.split("WebKit/")[1])||void 0,b.isChrome=parseFloat(p.split(" Chrome/")[1])||void 0,b.isEdge=parseFloat(p.split(" Edge/")[1])||void 0,b.isAIR=p.indexOf("AdobeAIR")>=0,b.isAndroid=p.indexOf("Android")>=0,b.isChromeOS=p.indexOf(" CrOS ")>=0,b.isIOS=/iPad|iPhone|iPod/.test(p)&&!window.MSStream,b.isIOS&&(b.isMac=!0),b.isMobile=b.isIOS||b.isAndroid}),define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(L,b,B){"use strict";var E=L("./useragent"),A="http://www.w3.org/1999/xhtml";if(b.buildDom=function h(u,t,e){if(typeof u=="string"&&u){var i=document.createTextNode(u);return t&&t.appendChild(i),i}if(!Array.isArray(u))return u&&u.appendChild&&t&&t.appendChild(u),u;if(typeof u[0]!="string"||!u[0]){for(var r=[],n=0;n"u"&&(b.importCssString=function(){}),b.computedStyle=function(h,u){return window.getComputedStyle(h,"")||{}},b.setStyle=function(h,u,t){h[u]!==t&&(h[u]=t)},b.HAS_CSS_ANIMATION=!1,b.HAS_CSS_TRANSFORMS=!1,b.HI_DPI=E.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,typeof document<"u"){var p=document.createElement("div");b.HI_DPI&&p.style.transform!==void 0&&(b.HAS_CSS_TRANSFORMS=!0),!E.isEdge&&typeof p.style.animationName<"u"&&(b.HAS_CSS_ANIMATION=!0),p=null}b.HAS_CSS_TRANSFORMS?b.translate=function(h,u,t){h.style.transform="translate("+Math.round(u)+"px, "+Math.round(t)+"px)"}:b.translate=function(h,u,t){h.style.top=Math.round(t)+"px",h.style.left=Math.round(u)+"px"}}),define("ace/lib/oop",["require","exports","module"],function(L,b,B){"use strict";b.inherits=function(E,A){E.super_=A,E.prototype=Object.create(A.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}})},b.mixin=function(E,A){for(var p in A)E[p]=A[p];return E},b.implement=function(E,A){b.mixin(E,A)}}),define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(L,b,B){"use strict";var E=L("./oop"),A=(function(){var p={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},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:"*"}},h,u;for(u in p.FUNCTION_KEYS)h=p.FUNCTION_KEYS[u].toLowerCase(),p[h]=parseInt(u,10);for(u in p.PRINTABLE_KEYS)h=p.PRINTABLE_KEYS[u].toLowerCase(),p[h]=parseInt(u,10);return E.mixin(p,p.MODIFIER_KEYS),E.mixin(p,p.PRINTABLE_KEYS),E.mixin(p,p.FUNCTION_KEYS),p.enter=p.return,p.escape=p.esc,p.del=p.delete,p[173]="-",(function(){for(var t=["cmd","ctrl","alt","shift"],e=Math.pow(2,t.length);e--;)p.KEY_MODS[e]=t.filter(function(i){return e&p.KEY_MODS[i]}).join("-")+"-"})(),p.KEY_MODS[0]="",p.KEY_MODS[-1]="input-",p})();E.mixin(b,A),b.keyCodeToString=function(p){var h=A[p];return typeof h!="string"&&(h=String.fromCharCode(p)),h.toLowerCase()}}),define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(L,b,B){"use strict";var E=L("./keys"),A=L("./useragent"),p=null,h=0,u;function t(){u=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){u={passive:!1}}})}catch{}}function e(){return u==null&&t(),u}function i(y,c,l){this.elem=y,this.type=c,this.callback=l}i.prototype.destroy=function(){n(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var r=b.addListener=function(y,c,l,g){y.addEventListener(c,l,e()),g&&g.$toDestroy.push(new i(y,c,l))},n=b.removeListener=function(y,c,l){y.removeEventListener(c,l,e())};b.stopEvent=function(y){return b.stopPropagation(y),b.preventDefault(y),!1},b.stopPropagation=function(y){y.stopPropagation&&y.stopPropagation()},b.preventDefault=function(y){y.preventDefault&&y.preventDefault()},b.getButton=function(y){return y.type=="dblclick"?0:y.type=="contextmenu"||A.isMac&&y.ctrlKey&&!y.altKey&&!y.shiftKey?2:y.button},b.capture=function(y,c,l){var g=y&&y.ownerDocument||document;function d(a){c&&c(a),l&&l(a),n(g,"mousemove",c),n(g,"mouseup",d),n(g,"dragstart",d)}return r(g,"mousemove",c),r(g,"mouseup",d),r(g,"dragstart",d),d},b.addMouseWheelListener=function(y,c,l){"onmousewheel"in y?r(y,"mousewheel",function(g){var d=8;g.wheelDeltaX!==void 0?(g.wheelX=-g.wheelDeltaX/d,g.wheelY=-g.wheelDeltaY/d):(g.wheelX=0,g.wheelY=-g.wheelDelta/d),c(g)},l):"onwheel"in y?r(y,"wheel",function(g){var d=.35;switch(g.deltaMode){case g.DOM_DELTA_PIXEL:g.wheelX=g.deltaX*d||0,g.wheelY=g.deltaY*d||0;break;case g.DOM_DELTA_LINE:case g.DOM_DELTA_PAGE:g.wheelX=(g.deltaX||0)*5,g.wheelY=(g.deltaY||0)*5;break}c(g)},l):r(y,"DOMMouseScroll",function(g){g.axis&&g.axis==g.HORIZONTAL_AXIS?(g.wheelX=(g.detail||0)*5,g.wheelY=0):(g.wheelX=0,g.wheelY=(g.detail||0)*5),c(g)},l)},b.addMultiMouseDownListener=function(y,c,l,g,d){var a=0,f,s,v,$={2:"dblclick",3:"tripleclick",4:"quadclick"};function x(C){if(b.getButton(C)!==0?a=0:C.detail>1?(a++,a>4&&(a=1)):a=1,A.isIE){var k=Math.abs(C.clientX-f)>5||Math.abs(C.clientY-s)>5;(!v||k)&&(a=1),v&&clearTimeout(v),v=setTimeout(function(){v=null},c[a-1]||600),a==1&&(f=C.clientX,s=C.clientY)}if(C._clicks=a,l[g]("mousedown",C),a>4)a=0;else if(a>1)return l[g]($[a],C)}Array.isArray(y)||(y=[y]),y.forEach(function(C){r(C,"mousedown",x,d)})};var o=function(y){return 0|(y.ctrlKey?1:0)|(y.altKey?2:0)|(y.shiftKey?4:0)|(y.metaKey?8:0)};b.getModifierString=function(y){return E.KEY_MODS[o(y)]};function m(y,c,l){var g=o(c);if(!A.isMac&&p){if(c.getModifierState&&(c.getModifierState("OS")||c.getModifierState("Win"))&&(g|=8),p.altGr)if((3&g)!=3)p.altGr=0;else return;if(l===18||l===17){var d="location"in c?c.location:c.keyLocation;if(l===17&&d===1)p[l]==1&&(h=c.timeStamp);else if(l===18&&g===3&&d===2){var a=c.timeStamp-h;a<50&&(p.altGr=!0)}}}if(l in E.MODIFIER_KEYS&&(l=-1),!g&&l===13){var d="location"in c?c.location:c.keyLocation;if(d===3&&(y(c,g,-l),c.defaultPrevented))return}if(A.isChromeOS&&g&8){if(y(c,g,l),c.defaultPrevented)return;g&=-9}return!g&&!(l in E.FUNCTION_KEYS)&&!(l in E.PRINTABLE_KEYS)?!1:y(c,g,l)}b.addCommandKeyListener=function(y,c,l){if(A.isOldGecko||A.isOpera&&!("KeyboardEvent"in window)){var g=null;r(y,"keydown",function(a){g=a.keyCode},l),r(y,"keypress",function(a){return m(c,a,g)},l)}else{var d=null;r(y,"keydown",function(a){p[a.keyCode]=(p[a.keyCode]||0)+1;var f=m(c,a,a.keyCode);return d=a.defaultPrevented,f},l),r(y,"keypress",function(a){d&&(a.ctrlKey||a.altKey||a.shiftKey||a.metaKey)&&(b.stopEvent(a),d=null)},l),r(y,"keyup",function(a){p[a.keyCode]=null},l),p||(w(),r(window,"focus",w))}};function w(){p=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!A.isOldIE){var S=1;b.nextTick=function(y,c){c=c||window;var l="zero-timeout-message-"+S++,g=function(d){d.data==l&&(b.stopPropagation(d),n(c,"message",g),y())};r(c,"message",g),c.postMessage(l,"*")}}b.$idleBlocked=!1,b.onIdle=function(y,c){return setTimeout(function l(){b.$idleBlocked?setTimeout(l,100):y()},c)},b.$idleBlockId=null,b.blockIdle=function(y){b.$idleBlockId&&clearTimeout(b.$idleBlockId),b.$idleBlocked=!0,b.$idleBlockId=setTimeout(function(){b.$idleBlocked=!1},y||100)},b.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),b.nextFrame?b.nextFrame=b.nextFrame.bind(window):b.nextFrame=function(y){setTimeout(y,17)}}),define("ace/range",["require","exports","module"],function(L,b,B){"use strict";var E=function(p,h){return p.row-h.row||p.column-h.column},A=function(p,h,u,t){this.start={row:p,column:h},this.end={row:u,column:t}};(function(){this.isEqual=function(p){return this.start.row===p.start.row&&this.end.row===p.end.row&&this.start.column===p.start.column&&this.end.column===p.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(p,h){return this.compare(p,h)==0},this.compareRange=function(p){var h,u=p.end,t=p.start;return h=this.compare(u.row,u.column),h==1?(h=this.compare(t.row,t.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(t.row,t.column),h==-1?-1:h==1?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(p){return this.comparePoint(p.start)==0&&this.comparePoint(p.end)==0},this.intersects=function(p){var h=this.compareRange(p);return h==-1||h==0||h==1},this.isEnd=function(p,h){return this.end.row==p&&this.end.column==h},this.isStart=function(p,h){return this.start.row==p&&this.start.column==h},this.setStart=function(p,h){typeof p=="object"?(this.start.column=p.column,this.start.row=p.row):(this.start.row=p,this.start.column=h)},this.setEnd=function(p,h){typeof p=="object"?(this.end.column=p.column,this.end.row=p.row):(this.end.row=p,this.end.column=h)},this.inside=function(p,h){return this.compare(p,h)==0?!(this.isEnd(p,h)||this.isStart(p,h)):!1},this.insideStart=function(p,h){return this.compare(p,h)==0?!this.isEnd(p,h):!1},this.insideEnd=function(p,h){return this.compare(p,h)==0?!this.isStart(p,h):!1},this.compare=function(p,h){return!this.isMultiLine()&&p===this.start.row?hthis.end.column?1:0:pthis.end.row?1:this.start.row===p?h>=this.start.column?0:-1:this.end.row===p?h<=this.end.column?0:1:0},this.compareStart=function(p,h){return this.start.row==p&&this.start.column==h?-1:this.compare(p,h)},this.compareEnd=function(p,h){return this.end.row==p&&this.end.column==h?1:this.compare(p,h)},this.compareInside=function(p,h){return this.end.row==p&&this.end.column==h?1:this.start.row==p&&this.start.column==h?-1:this.compare(p,h)},this.clipRows=function(p,h){if(this.end.row>h)var u={row:h+1,column:0};else if(this.end.rowh)var t={row:h+1,column:0};else if(this.start.row0;)h&1&&(u+=p),(h>>=1)&&(p+=p);return u};var E=/^\s\s*/,A=/\s\s*$/;b.stringTrimLeft=function(p){return p.replace(E,"")},b.stringTrimRight=function(p){return p.replace(A,"")},b.copyObject=function(p){var h={};for(var u in p)h[u]=p[u];return h},b.copyArray=function(p){for(var h=[],u=0,t=p.length;uDate.now()-50?!0:E=!1},cancel:function(){E=Date.now()}}}),define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(L,b,B){"use strict";var E=L("../lib/event"),A=L("../lib/useragent"),p=L("../lib/dom"),h=L("../lib/lang"),u=L("../clipboard"),t=A.isChrome<18,e=A.isIE,i=A.isChrome>63,r=400,n=L("../lib/keys"),o=n.KEY_MODS,m=A.isIOS,w=m?/\s/:/\n/,S=A.isMobile,y=function(c,l){var g=p.createElement("textarea");g.className="ace_text-input",g.setAttribute("wrap","off"),g.setAttribute("autocorrect","off"),g.setAttribute("autocapitalize","off"),g.setAttribute("spellcheck",!1),g.style.opacity="0",c.insertBefore(g,c.firstChild);var d=!1,a=!1,f=!1,s=!1,v="";S||(g.style.fontSize="1px");var $=!1,x=!1,C="",k=0,R=0,_=0;try{var O=document.activeElement===g}catch{}E.addListener(g,"blur",function(F){x||(l.onBlur(F),O=!1)},l),E.addListener(g,"focus",function(F){if(!x){if(O=!0,A.isEdge)try{if(!document.hasFocus())return}catch{}l.onFocus(F),A.isEdge?setTimeout(I):I()}},l),this.$focusScroll=!1,this.focus=function(){if(v||i||this.$focusScroll=="browser")return g.focus({preventScroll:!0});var F=g.style.top;g.style.position="fixed",g.style.top="0px";try{var H=g.getBoundingClientRect().top!=0}catch{return}var U=[];if(H)for(var Z=g.parentElement;Z&&Z.nodeType==1;)U.push(Z),Z.setAttribute("ace_nocontext",!0),!Z.parentElement&&Z.getRootNode?Z=Z.getRootNode().host:Z=Z.parentElement;g.focus({preventScroll:!0}),H&&U.forEach(function(ne){ne.removeAttribute("ace_nocontext")}),setTimeout(function(){g.style.position="",g.style.top=="0px"&&(g.style.top=F)},0)},this.blur=function(){g.blur()},this.isFocused=function(){return O},l.on("beforeEndOperation",function(){var F=l.curOp,H=F&&F.command&&F.command.name;if(H!="insertstring"){var U=H&&(F.docChanged||F.selectionChanged);f&&U&&(C=g.value="",q()),I()}});var I=m?function(F){if(!(!O||d&&!F||s)){F||(F="");var H=` ab`+F+`cde fg `;H!=g.value&&(g.value=C=H);var U=4,Z=4+(F.length||(l.selection.isEmpty()?0:1));(k!=U||R!=Z)&&g.setSelectionRange(U,Z),k=U,R=Z}}:function(){if(!(f||s)&&!(!O&&!M)){f=!0;var F=0,H=0,U="";if(l.session){var Z=l.selection,ne=Z.getRange(),se=Z.cursor.row;if(F=ne.start.column,H=ne.end.column,U=l.session.getLine(se),ne.start.row!=se){var ae=l.session.getLine(se-1);F=ne.start.rowse+1?oe.length:H,H+=U.length+1,U=U+` @@ -10,7 +10,7 @@ `;if(re!=C&&(g.value=C=re,k=R=re.length),M&&(k=g.selectionStart,R=g.selectionEnd),R!=H||k!=F||g.selectionEnd!=R)try{g.setSelectionRange(F,H),k=F,R=H}catch{}f=!1}};this.resetSelection=I,O&&l.onFocus();var D=function(F){return F.selectionStart===0&&F.selectionEnd>=C.length&&F.value===C&&C&&F.selectionEnd!==R},T=function(F){f||(d?d=!1:D(g)?(l.selectAll(),I()):S&&g.selectionStart!=k&&I())},P=null;this.setInputHandler=function(F){P=F},this.getInputHandler=function(){return P};var M=!1,W=function(F,H){if(M&&(M=!1),a)return I(),F&&l.onPaste(F),a=!1,"";for(var U=g.selectionStart,Z=g.selectionEnd,ne=k,se=C.length-R,ae=F,oe=F.length-U,re=F.length-Z,ie=0;ne>0&&C[ie]==F[ie];)ie++,ne--;for(ae=ae.slice(ie),ie=1;se>0&&C.length-ie>k-1&&C[C.length-ie]==F[F.length-ie];)ie++,se--;oe-=ie-1,re-=ie-1;var ue=ae.length-ie+1;if(ue<0&&(ne=-ue,ue=0),ae=ae.slice(0,ue),!H&&!ae&&!oe&&!ne&&!se&&!re)return"";s=!0;var de=!1;return A.isAndroid&&ae==". "&&(ae=" ",de=!0),ae&&!ne&&!se&&!oe&&!re||$?l.onTextInput(ae):l.onTextInput(ae,{extendLeft:ne,extendRight:se,restoreStart:oe,restoreEnd:re}),s=!1,C=F,k=U,R=Z,_=re,de?` `:ae},N=function(F){if(f)return K();if(F&&F.inputType){if(F.inputType=="historyUndo")return l.execCommand("undo");if(F.inputType=="historyRedo")return l.execCommand("redo")}var H=g.value,U=W(H,!0);(H.length>r+100||w.test(U)||S&&k<1&&k==R)&&I()},G=function(F,H,U){var Z=F.clipboardData||window.clipboardData;if(!(!Z||t)){var ne=e||U?"Text":"text/plain";try{return H?Z.setData(ne,H)!==!1:Z.getData(ne)}catch(se){if(!U)return G(se,H,!0)}}},z=function(F,H){var U=l.getCopyText();if(!U)return E.preventDefault(F);G(F,U)?(m&&(I(U),d=U,setTimeout(function(){d=!1},10)),H?l.onCut():l.onCopy(),E.preventDefault(F)):(d=!0,g.value=U,g.select(),setTimeout(function(){d=!1,I(),H?l.onCut():l.onCopy()}))},J=function(F){z(F,!0)},X=function(F){z(F,!1)},V=function(F){var H=G(F);u.pasteCancelled()||(typeof H=="string"?(H&&l.onPaste(H,F),A.isIE&&setTimeout(I),E.preventDefault(F)):(g.value="",a=!0))};E.addCommandKeyListener(g,l.onCommandKey.bind(l),l),E.addListener(g,"select",T,l),E.addListener(g,"input",N,l),E.addListener(g,"cut",J,l),E.addListener(g,"copy",X,l),E.addListener(g,"paste",V,l),(!("oncut"in g)||!("oncopy"in g)||!("onpaste"in g))&&E.addListener(c,"keydown",function(F){if(!(A.isMac&&!F.metaKey||!F.ctrlKey))switch(F.keyCode){case 67:X(F);break;case 86:V(F);break;case 88:J(F);break}},l);var j=function(F){if(!(f||!l.onCompositionStart||l.$readOnly)&&(f={},!$)){F.data&&(f.useTextareaForIME=!1),setTimeout(K,0),l._signal("compositionStart"),l.on("mousedown",ee);var H=l.getSelectionRange();H.end.row=H.start.row,H.end.column=H.start.column,f.markerRange=H,f.selectionStart=k,l.onCompositionStart(f),f.useTextareaForIME?(C=g.value="",k=0,R=0):(g.msGetInputContext&&(f.context=g.msGetInputContext()),g.getInputContext&&(f.context=g.getInputContext()))}},K=function(){if(!(!f||!l.onCompositionUpdate||l.$readOnly)){if($)return ee();if(f.useTextareaForIME)l.onCompositionUpdate(g.value);else{var F=g.value;W(F),f.markerRange&&(f.context&&(f.markerRange.start.column=f.selectionStart=f.context.compositionStartOffset),f.markerRange.end.column=f.markerRange.start.column+R-f.selectionStart+_)}}},q=function(F){!l.onCompositionEnd||l.$readOnly||(f=!1,l.onCompositionEnd(),l.off("mousedown",ee),F&&N())};function ee(){x=!0,g.blur(),g.focus(),x=!1}var te=h.delayedCall(K,50).schedule.bind(null,null);function Q(F){F.keyCode==27&&g.value.lengthR&&C[re]==` `?ie=n.end:oeR&&C.slice(0,re).split(` -`).length>2?ie=n.down:re>R&&C[re-1]==" "?(ie=n.right,ue=o.option):(re>R||re==R&&R!=k&&oe==re)&&(ie=n.right),oe!==re&&(ue|=o.shift),ie){var de=H.onCommandKey({},ue,ie);if(!de&&H.commands){ie=n.keyCodeToString(ie);var fe=H.commands.findKeyCommand(ue,ie);fe&&H.execCommand(fe)}k=oe,R=re,I("")}}};document.addEventListener("selectionchange",se),H.on("destroy",function(){document.removeEventListener("selectionchange",se)})}};b.TextInput=y,b.$setUserAgentForTests=function(c,l){S=c,m=l}}),define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(L,b,B){"use strict";var E=L("../lib/useragent"),A=0,p=550;function h(e){e.$clickSelection=null;var i=e.editor;i.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),i.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),i.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),i.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),i.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));var r=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];r.forEach(function(n){e[n]=this[n]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}(function(){this.onMouseDown=function(e){var i=e.inSelection(),r=e.getDocumentPosition();this.mousedownEvent=e;var n=this.editor,o=e.getButton();if(o!==0){var m=n.getSelectionRange(),w=m.isEmpty();(w||o==1)&&n.selection.moveToPosition(r),o==2&&(n.textInput.onContextMenu(e.domEvent),E.isMozilla||e.preventDefault());return}if(this.mousedownEvent.time=Date.now(),i&&!n.isFocused()&&(n.focus(),this.$focusTimeout&&!this.$clickSelection&&!n.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(e);return}return this.captureMouse(e),this.startSelect(r,e.domEvent._clicks>1),e.preventDefault()},this.startSelect=function(e,i){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var r=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?r.selection.selectToPosition(e):i||r.selection.moveToPosition(e),i||this.select(),r.renderer.scroller.setCapture&&r.renderer.scroller.setCapture(),r.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,i=this.editor,r=i.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var n=this.$clickSelection.comparePoint(r);if(n==-1)e=this.$clickSelection.end;else if(n==1)e=this.$clickSelection.start;else{var o=t(this.$clickSelection,r);r=o.cursor,e=o.anchor}i.selection.setSelectionAnchor(e.row,e.column)}i.selection.selectToPosition(r),i.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var i,r=this.editor,n=r.renderer.screenToTextCoordinates(this.x,this.y),o=r.selection[e](n.row,n.column);if(this.$clickSelection){var m=this.$clickSelection.comparePoint(o.start),w=this.$clickSelection.comparePoint(o.end);if(m==-1&&w<=0)i=this.$clickSelection.end,(o.end.row!=n.row||o.end.column!=n.column)&&(n=o.start);else if(w==1&&m>=0)i=this.$clickSelection.start,(o.start.row!=n.row||o.start.column!=n.column)&&(n=o.end);else if(m==-1&&w==1)n=o.end,i=o.start;else{var S=t(this.$clickSelection,n);n=S.cursor,i=S.anchor}r.selection.setSelectionAnchor(i.row,i.column)}r.selection.selectToPosition(n),r.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),i=Date.now();(e>A||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var i=e.getDocumentPosition(),r=this.editor,n=r.session,o=n.getBracketRange(i);o?(o.isEmpty()&&(o.start.column--,o.end.column++),this.setState("select")):(o=r.selection.getWordRange(i.row,i.column),this.setState("selectByWords")),this.$clickSelection=o,this.select()},this.onTripleClick=function(e){var i=e.getDocumentPosition(),r=this.editor;this.setState("selectByLines");var n=r.getSelectionRange();n.isMultiLine()&&n.contains(i.row,i.column)?(this.$clickSelection=r.selection.getLineRange(n.start.row),this.$clickSelection.end=r.selection.getLineRange(n.end.row).end):this.$clickSelection=r.selection.getLineRange(i.row),this.select()},this.onQuadClick=function(e){var i=this.editor;i.selectAll(),this.$clickSelection=i.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var i=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var r=this.$lastScroll,n=e.domEvent.timeStamp,o=n-r.t,m=o?e.wheelX/o:r.vx,w=o?e.wheelY/o:r.vy;o=1&&i.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(y=!0),S<=1&&i.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(y=!0),y)r.allowed=n;else if(n-r.allowedi.session.documentToScreenRow(f.row,f.column))return y()}if(w!=g)if(w=g.text.join("
"),n.setHtml(w),n.show(),i._signal("showGutterTooltip",n),i.on("mousewheel",y),e.$tooltipFollowsMouse)c(m);else{var s=m.domEvent.target,v=s.getBoundingClientRect(),$=n.getElement().style;$.left=v.right+"px",$.top=v.bottom+"px"}}function y(){o&&(o=clearTimeout(o)),w&&(n.hide(),w=null,i._signal("hideGutterTooltip",n),i.off("mousewheel",y))}function c(l){n.setPosition(l.x,l.y)}e.editor.setDefaultHandler("guttermousemove",function(l){var g=l.domEvent.target||l.domEvent.srcElement;if(E.hasCssClass(g,"ace_fold-widget"))return y();w&&e.$tooltipFollowsMouse&&c(l),m=l,!o&&(o=setTimeout(function(){o=null,m&&!e.isMousePressed?S():y()},50))}),p.addListener(i.renderer.$gutter,"mouseout",function(l){m=null,!(!w||o)&&(o=setTimeout(function(){o=null,y()},50))},i),i.on("changeSession",y)}function t(e){h.call(this,e)}A.inherits(t,h),function(){this.setPosition=function(e,i){var r=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),m=this.getHeight();e+=15,i+=15,e+o>r&&(e-=e+o-r),i+m>n&&(i-=20+m),h.prototype.setPosition.call(this,e,i)}}.call(t.prototype),b.GutterHandler=u}),define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(L,b,B){"use strict";var E=L("../lib/event"),A=L("../lib/useragent"),p=b.MouseEvent=function(h,u){this.domEvent=h,this.editor=u,this.x=this.clientX=h.clientX,this.y=this.clientY=h.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){E.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){E.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var h=this.editor,u=h.getSelectionRange();if(u.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=u.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return E.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=A.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(p.prototype)}),define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(L,b,B){"use strict";var E=L("../lib/dom"),A=L("../lib/event"),p=L("../lib/useragent"),h=200,u=200,t=5;function e(r){var n=r.editor,o=E.createElement("img");o.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",p.isOpera&&(o.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(M){r[M]=this[M]},this),n.on("mousedown",this.onMouseDown.bind(r));var w=n.container,S,y,c,l,g,d,a=0,f,s,v,$,x;this.onDragStart=function(M){if(this.cancelDrag||!w.draggable){var W=this;return setTimeout(function(){W.startSelect(),W.captureMouse(M)},0),M.preventDefault()}g=n.getSelectionRange();var N=M.dataTransfer;N.effectAllowed=n.getReadOnly()?"copy":"copyMove",p.isOpera&&(n.container.appendChild(o),o.scrollTop=0),N.setDragImage&&N.setDragImage(o,0,0),p.isOpera&&n.container.removeChild(o),N.clearData(),N.setData("Text",n.session.getTextRange()),s=!0,this.setState("drag")},this.onDragEnd=function(M){if(w.draggable=!1,s=!1,this.setState(null),!n.getReadOnly()){var W=M.dataTransfer.dropEffect;!f&&W=="move"&&n.session.remove(n.getSelectionRange()),n.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(M){if(!(n.getReadOnly()||!T(M.dataTransfer)))return y=M.clientX,c=M.clientY,S||_(),a++,M.dataTransfer.dropEffect=f=P(M),A.preventDefault(M)},this.onDragOver=function(M){if(!(n.getReadOnly()||!T(M.dataTransfer)))return y=M.clientX,c=M.clientY,S||(_(),a++),I!==null&&(I=null),M.dataTransfer.dropEffect=f=P(M),A.preventDefault(M)},this.onDragLeave=function(M){if(a--,a<=0&&S)return O(),f=null,A.preventDefault(M)},this.onDrop=function(M){if(d){var W=M.dataTransfer;if(s)switch(f){case"move":g.contains(d.row,d.column)?g={start:d,end:d}:g=n.moveText(g,d);break;case"copy":g=n.moveText(g,d,!0);break}else{var N=W.getData("Text");g={start:d,end:n.session.insert(d,N)},n.focus(),f=null}return O(),A.preventDefault(M)}},A.addListener(w,"dragstart",this.onDragStart.bind(r),n),A.addListener(w,"dragend",this.onDragEnd.bind(r),n),A.addListener(w,"dragenter",this.onDragEnter.bind(r),n),A.addListener(w,"dragover",this.onDragOver.bind(r),n),A.addListener(w,"dragleave",this.onDragLeave.bind(r),n),A.addListener(w,"drop",this.onDrop.bind(r),n);function C(M,W){var N=Date.now(),G=!W||M.row!=W.row,z=!W||M.column!=W.column;if(!$||G||z)n.moveCursorToPosition(M),$=N,x={x:y,y:c};else{var J=i(x.x,x.y,y,c);J>t?$=null:N-$>=u&&(n.renderer.scrollCursorIntoView(),$=null)}}function k(M,W){var N=Date.now(),G=n.renderer.layerConfig.lineHeight,z=n.renderer.layerConfig.characterWidth,J=n.renderer.scroller.getBoundingClientRect(),X={x:{left:y-J.left,right:J.right-y},y:{top:c-J.top,bottom:J.bottom-c}},V=Math.min(X.x.left,X.x.right),j=Math.min(X.y.top,X.y.bottom),K={row:M.row,column:M.column};V/z<=2&&(K.column+=X.x.left=h&&n.renderer.scrollCursorIntoView(K):v=N:v=null}function R(){var M=d;d=n.renderer.screenToTextCoordinates(y,c),C(d,M),k(d,M)}function _(){g=n.selection.toOrientedRange(),S=n.session.addMarker(g,"ace_selection",n.getSelectionStyle()),n.clearSelection(),n.isFocused()&&n.renderer.$cursorLayer.setBlinking(!1),clearInterval(l),R(),l=setInterval(R,20),a=0,A.addListener(document,"mousemove",D)}function O(){clearInterval(l),n.session.removeMarker(S),S=null,n.selection.fromOrientedRange(g),n.isFocused()&&!s&&n.$resetCursorStyle(),g=null,d=null,a=0,v=null,$=null,A.removeListener(document,"mousemove",D)}var I=null;function D(){I==null&&(I=setTimeout(function(){I!=null&&S&&O()},20))}function T(M){var W=M.types;return!W||Array.prototype.some.call(W,function(N){return N=="text/plain"||N=="Text"})}function P(M){var W=["copy","copymove","all","uninitialized"],N=["move","copymove","linkmove","all","uninitialized"],G=p.isMac?M.altKey:M.ctrlKey,z="uninitialized";try{z=M.dataTransfer.effectAllowed.toLowerCase()}catch{}var J="none";return G&&W.indexOf(z)>=0?J="copy":N.indexOf(z)>=0?J="move":W.indexOf(z)>=0&&(J="copy"),J}}(function(){this.dragWait=function(){var r=Date.now()-this.mousedownEvent.time;r>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var r=this.editor.container;r.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(r){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var r=this.editor,n=r.container;n.draggable=!0,r.renderer.$cursorLayer.setBlinking(!1),r.setStyle("ace_dragging");var o=p.isWin?"default":"move";r.renderer.setCursorStyle(o),this.setState("dragReady")},this.onMouseDrag=function(r){var n=this.editor.container;if(p.isIE&&this.state=="dragReady"){var o=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>3&&n.dragDrop()}if(this.state==="dragWait"){var o=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>0&&(n.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(r){if(this.$dragEnabled){this.mousedownEvent=r;var n=this.editor,o=r.inSelection(),m=r.getButton(),w=r.domEvent.detail||1;if(w===1&&m===0&&o){if(r.editor.inMultiSelectMode&&(r.getAccelKey()||r.getShiftKey()))return;this.mousedownEvent.time=Date.now();var S=r.domEvent.target||r.domEvent.srcElement;if("unselectable"in S&&(S.unselectable="on"),n.getDragDelay()){if(p.isWebKit){this.cancelDrag=!0;var y=n.container;y.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(r,this.onMouseDrag.bind(this)),r.defaultPrevented=!0}}}}).call(e.prototype);function i(r,n,o,m){return Math.sqrt(Math.pow(o-r,2)+Math.pow(m-n,2))}b.DragdropHandler=e}),define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(L,b,B){"use strict";var E=L("./mouse_event").MouseEvent,A=L("../lib/event"),p=L("../lib/dom");b.addTouchListeners=function(h,u){var t="scroll",e,i,r,n,o,m,w=0,S,y=0,c=0,l=0,g,d;function a(){var C=window.navigator&&window.navigator.clipboard,k=!1,R=function(){var O=u.getCopyText(),I=u.session.getUndoManager().hasUndo();d.replaceChild(p.buildDom(k?["span",!O&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],O&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],O&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],C&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],I&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),d.firstChild)},_=function(O){var I=O.target.getAttribute("action");if(I=="more"||!k)return k=!k,R();I=="paste"?C.readText().then(function(D){u.execCommand(I,D)}):I&&((I=="cut"||I=="copy")&&(C?C.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand(I)),d.firstChild.style.display="none",k=!1,I!="openCommandPallete"&&u.focus()};d=p.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(O){t="menu",O.stopPropagation(),O.preventDefault(),u.textInput.focus()},ontouchend:function(O){O.stopPropagation(),O.preventDefault(),_(O)},onclick:_},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function f(){d||a();var C=u.selection.cursor,k=u.renderer.textToScreenCoordinates(C.row,C.column),R=u.renderer.textToScreenCoordinates(0,0).pageX,_=u.renderer.scrollLeft,O=u.container.getBoundingClientRect();d.style.top=k.pageY-O.top-3+"px",k.pageX-O.left=2?u.selection.getLineRange(S.row):u.session.getBracketRange(S);C&&!C.isEmpty()?u.selection.setRange(C):u.selection.selectWord(),t="wait"}A.addListener(h,"contextmenu",function(C){if(g){var k=u.textInput.getElement();k.focus()}},u),A.addListener(h,"touchstart",function(C){var k=C.touches;if(o||k.length>1){clearTimeout(o),o=null,r=-1,t="zoom";return}g=u.$mouseHandler.isMousePressed=!0;var R=u.renderer.layerConfig.lineHeight,_=u.renderer.layerConfig.lineHeight,O=C.timeStamp;n=O;var I=k[0],D=I.clientX,T=I.clientY;Math.abs(e-D)+Math.abs(i-T)>R&&(r=-1),e=C.clientX=D,i=C.clientY=T,c=l=0;var P=new E(C,u);if(S=P.getDocumentPosition(),O-r<500&&k.length==1&&!w)y++,C.preventDefault(),C.button=0,$();else{y=0;var M=u.selection.cursor,W=u.selection.isEmpty()?M:u.selection.anchor,N=u.renderer.$cursorLayer.getPixelPosition(M,!0),G=u.renderer.$cursorLayer.getPixelPosition(W,!0),z=u.renderer.scroller.getBoundingClientRect(),J=u.renderer.layerConfig.offset,X=u.renderer.scrollLeft,V=function(q,ee){return q=q/_,ee=ee/R-.75,q*q+ee*ee};if(C.clientXK?"cursor":"anchor"),K<3.5?t="anchor":j<3.5?t="cursor":t="scroll",o=setTimeout(v,450)}r=O},u),A.addListener(h,"touchend",function(C){g=u.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),t=="zoom"?(t="",w=0):o?(u.selection.moveToPosition(S),w=0,f()):t=="scroll"?(x(),s()):f(),clearTimeout(o),o=null},u),A.addListener(h,"touchmove",function(C){o&&(clearTimeout(o),o=null);var k=C.touches;if(!(k.length>1||t=="zoom")){var R=k[0],_=e-R.clientX,O=i-R.clientY;if(t=="wait")if(_*_+O*O>4)t="cursor";else return C.preventDefault();e=R.clientX,i=R.clientY,C.clientX=R.clientX,C.clientY=R.clientY;var I=C.timeStamp,D=I-n;if(n=I,t=="scroll"){var T=new E(C,u);T.speed=1,T.wheelX=_,T.wheelY=O,10*Math.abs(_)1&&(S=m[m.length-2]);var c=t[o+"Path"];return c==null?c=t.basePath:w=="/"&&(o=w=""),c&&c.slice(-1)!="/"&&(c+="/"),c+o+w+S+this.get("suffix")},b.setModuleUrl=function(n,o){return t.$moduleUrls[n]=o},b.$loading={},b.loadModule=function(n,o){var m,w;Array.isArray(n)&&(w=n[0],n=n[1]);try{m=L(n)}catch{}if(m&&!b.$loading[n])return o&&o(m);if(b.$loading[n]||(b.$loading[n]=[]),b.$loading[n].push(o),!(b.$loading[n].length>1)){var S=function(){L([n],function(y){b._emit("load.module",{name:n,module:y});var c=b.$loading[n];b.$loading[n]=null,c.forEach(function(l){l&&l(y)})})};if(!b.get("packaged"))return S();p.loadScript(b.moduleUrl(n,w),S),e()}};var e=function(){!t.basePath&&!t.workerPath&&!t.modePath&&!t.themePath&&!Object.keys(t.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),e=function(){})};i(!0);function i(n){if(!(!u||!u.document)){t.packaged=n||L.packaged||B.packaged||u.define&&define.packaged;for(var o={},m="",w=document.currentScript||document._currentScript,S=w&&w.ownerDocument||document,y=S.getElementsByTagName("script"),c=0;c0)if(le==16){for(F=ce;F-1){for(F=ce;F=0&&K[Z]==v;Z--)V[Z]=p}}}function N(X,V,j){if(!(h=X){for(ee=q+1;ee=X;)ee++;for(te=q,Q=ee-1;te=V.length||(ee=j[K-1])!=l&&ee!=g||(te=V[K+1])!=l&&te!=g?d:(u&&(te=g),te==ee?te:d);case x:return ee=K>0?j[K-1]:a,ee==l&&K+10&&j[K-1]==l)return l;if(u)return d;for(Y=K+1,Q=V.length;Y=1425&&le<=2303||le==64286;if(ee=V[Y],he&&(ee==c||ee==s))return c}return K<1||(ee=V[K-1])==a?d:j[K-1];case a:return u=!1,e=!0,p;case f:return i=!0,d;case R:case _:case I:case D:case O:u=!1;case T:return d}}function z(X){var V=X.charCodeAt(0),j=V>>8;return j==0?V>191?y:P[V]:j==5?/[\u0591-\u05f4]/.test(X)?c:y:j==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(X)?k:/[\u0660-\u0669\u066b-\u066c]/.test(X)?g:V==1642?C:/[\u06f0-\u06f9]/.test(X)?l:s:j==32&&V<=8287?M[V&255]:j==254&&V>=65136?s:d}function J(X){return X>="\u064B"&&X<="\u0655"}b.L=y,b.R=c,b.EN=l,b.ON_R=3,b.AN=4,b.R_H=5,b.B=6,b.RLE=7,b.DOT="\xB7",b.doBidiReorder=function(X,V,j){if(X.length<2)return{};var K=X.split(""),q=new Array(K.length),ee=new Array(K.length),te=[];p=j?S:w,W(K,te,K.length,V);for(var Q=0;Qs&&V[Q]0&&K[Q-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(K[Q])&&(te[Q-1]=te[Q]=b.R_H,Q++);K[K.length-1]===b.DOT&&(te[K.length-1]=b.B),K[0]==="\u202B"&&(te[0]=b.RLE);for(var Q=0;Q2?ie=n.down:re>R&&C[re-1]==" "?(ie=n.right,ue=o.option):(re>R||re==R&&R!=k&&oe==re)&&(ie=n.right),oe!==re&&(ue|=o.shift),ie){var de=H.onCommandKey({},ue,ie);if(!de&&H.commands){ie=n.keyCodeToString(ie);var fe=H.commands.findKeyCommand(ue,ie);fe&&H.execCommand(fe)}k=oe,R=re,I("")}}};document.addEventListener("selectionchange",se),H.on("destroy",function(){document.removeEventListener("selectionchange",se)})}};b.TextInput=y,b.$setUserAgentForTests=function(c,l){S=c,m=l}}),define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(L,b,B){"use strict";var E=L("../lib/useragent"),A=0,p=550;function h(e){e.$clickSelection=null;var i=e.editor;i.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),i.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),i.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),i.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),i.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));var r=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];r.forEach(function(n){e[n]=this[n]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}(function(){this.onMouseDown=function(e){var i=e.inSelection(),r=e.getDocumentPosition();this.mousedownEvent=e;var n=this.editor,o=e.getButton();if(o!==0){var m=n.getSelectionRange(),w=m.isEmpty();(w||o==1)&&n.selection.moveToPosition(r),o==2&&(n.textInput.onContextMenu(e.domEvent),E.isMozilla||e.preventDefault());return}if(this.mousedownEvent.time=Date.now(),i&&!n.isFocused()&&(n.focus(),this.$focusTimeout&&!this.$clickSelection&&!n.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(e);return}return this.captureMouse(e),this.startSelect(r,e.domEvent._clicks>1),e.preventDefault()},this.startSelect=function(e,i){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var r=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?r.selection.selectToPosition(e):i||r.selection.moveToPosition(e),i||this.select(),r.renderer.scroller.setCapture&&r.renderer.scroller.setCapture(),r.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,i=this.editor,r=i.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var n=this.$clickSelection.comparePoint(r);if(n==-1)e=this.$clickSelection.end;else if(n==1)e=this.$clickSelection.start;else{var o=t(this.$clickSelection,r);r=o.cursor,e=o.anchor}i.selection.setSelectionAnchor(e.row,e.column)}i.selection.selectToPosition(r),i.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var i,r=this.editor,n=r.renderer.screenToTextCoordinates(this.x,this.y),o=r.selection[e](n.row,n.column);if(this.$clickSelection){var m=this.$clickSelection.comparePoint(o.start),w=this.$clickSelection.comparePoint(o.end);if(m==-1&&w<=0)i=this.$clickSelection.end,(o.end.row!=n.row||o.end.column!=n.column)&&(n=o.start);else if(w==1&&m>=0)i=this.$clickSelection.start,(o.start.row!=n.row||o.start.column!=n.column)&&(n=o.end);else if(m==-1&&w==1)n=o.end,i=o.start;else{var S=t(this.$clickSelection,n);n=S.cursor,i=S.anchor}r.selection.setSelectionAnchor(i.row,i.column)}r.selection.selectToPosition(n),r.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),i=Date.now();(e>A||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var i=e.getDocumentPosition(),r=this.editor,n=r.session,o=n.getBracketRange(i);o?(o.isEmpty()&&(o.start.column--,o.end.column++),this.setState("select")):(o=r.selection.getWordRange(i.row,i.column),this.setState("selectByWords")),this.$clickSelection=o,this.select()},this.onTripleClick=function(e){var i=e.getDocumentPosition(),r=this.editor;this.setState("selectByLines");var n=r.getSelectionRange();n.isMultiLine()&&n.contains(i.row,i.column)?(this.$clickSelection=r.selection.getLineRange(n.start.row),this.$clickSelection.end=r.selection.getLineRange(n.end.row).end):this.$clickSelection=r.selection.getLineRange(i.row),this.select()},this.onQuadClick=function(e){var i=this.editor;i.selectAll(),this.$clickSelection=i.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var i=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var r=this.$lastScroll,n=e.domEvent.timeStamp,o=n-r.t,m=o?e.wheelX/o:r.vx,w=o?e.wheelY/o:r.vy;o=1&&i.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(y=!0),S<=1&&i.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(y=!0),y)r.allowed=n;else if(n-r.allowedi.session.documentToScreenRow(f.row,f.column))return y()}if(w!=g)if(w=g.text.join("
"),n.setHtml(w),n.show(),i._signal("showGutterTooltip",n),i.on("mousewheel",y),e.$tooltipFollowsMouse)c(m);else{var s=m.domEvent.target,v=s.getBoundingClientRect(),$=n.getElement().style;$.left=v.right+"px",$.top=v.bottom+"px"}}function y(){o&&(o=clearTimeout(o)),w&&(n.hide(),w=null,i._signal("hideGutterTooltip",n),i.off("mousewheel",y))}function c(l){n.setPosition(l.x,l.y)}e.editor.setDefaultHandler("guttermousemove",function(l){var g=l.domEvent.target||l.domEvent.srcElement;if(E.hasCssClass(g,"ace_fold-widget"))return y();w&&e.$tooltipFollowsMouse&&c(l),m=l,!o&&(o=setTimeout(function(){o=null,m&&!e.isMousePressed?S():y()},50))}),p.addListener(i.renderer.$gutter,"mouseout",function(l){m=null,!(!w||o)&&(o=setTimeout(function(){o=null,y()},50))},i),i.on("changeSession",y)}function t(e){h.call(this,e)}A.inherits(t,h),(function(){this.setPosition=function(e,i){var r=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),m=this.getHeight();e+=15,i+=15,e+o>r&&(e-=e+o-r),i+m>n&&(i-=20+m),h.prototype.setPosition.call(this,e,i)}}).call(t.prototype),b.GutterHandler=u}),define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(L,b,B){"use strict";var E=L("../lib/event"),A=L("../lib/useragent"),p=b.MouseEvent=function(h,u){this.domEvent=h,this.editor=u,this.x=this.clientX=h.clientX,this.y=this.clientY=h.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){E.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){E.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var h=this.editor,u=h.getSelectionRange();if(u.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=u.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return E.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=A.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(p.prototype)}),define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(L,b,B){"use strict";var E=L("../lib/dom"),A=L("../lib/event"),p=L("../lib/useragent"),h=200,u=200,t=5;function e(r){var n=r.editor,o=E.createElement("img");o.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",p.isOpera&&(o.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(M){r[M]=this[M]},this),n.on("mousedown",this.onMouseDown.bind(r));var w=n.container,S,y,c,l,g,d,a=0,f,s,v,$,x;this.onDragStart=function(M){if(this.cancelDrag||!w.draggable){var W=this;return setTimeout(function(){W.startSelect(),W.captureMouse(M)},0),M.preventDefault()}g=n.getSelectionRange();var N=M.dataTransfer;N.effectAllowed=n.getReadOnly()?"copy":"copyMove",p.isOpera&&(n.container.appendChild(o),o.scrollTop=0),N.setDragImage&&N.setDragImage(o,0,0),p.isOpera&&n.container.removeChild(o),N.clearData(),N.setData("Text",n.session.getTextRange()),s=!0,this.setState("drag")},this.onDragEnd=function(M){if(w.draggable=!1,s=!1,this.setState(null),!n.getReadOnly()){var W=M.dataTransfer.dropEffect;!f&&W=="move"&&n.session.remove(n.getSelectionRange()),n.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(M){if(!(n.getReadOnly()||!T(M.dataTransfer)))return y=M.clientX,c=M.clientY,S||_(),a++,M.dataTransfer.dropEffect=f=P(M),A.preventDefault(M)},this.onDragOver=function(M){if(!(n.getReadOnly()||!T(M.dataTransfer)))return y=M.clientX,c=M.clientY,S||(_(),a++),I!==null&&(I=null),M.dataTransfer.dropEffect=f=P(M),A.preventDefault(M)},this.onDragLeave=function(M){if(a--,a<=0&&S)return O(),f=null,A.preventDefault(M)},this.onDrop=function(M){if(d){var W=M.dataTransfer;if(s)switch(f){case"move":g.contains(d.row,d.column)?g={start:d,end:d}:g=n.moveText(g,d);break;case"copy":g=n.moveText(g,d,!0);break}else{var N=W.getData("Text");g={start:d,end:n.session.insert(d,N)},n.focus(),f=null}return O(),A.preventDefault(M)}},A.addListener(w,"dragstart",this.onDragStart.bind(r),n),A.addListener(w,"dragend",this.onDragEnd.bind(r),n),A.addListener(w,"dragenter",this.onDragEnter.bind(r),n),A.addListener(w,"dragover",this.onDragOver.bind(r),n),A.addListener(w,"dragleave",this.onDragLeave.bind(r),n),A.addListener(w,"drop",this.onDrop.bind(r),n);function C(M,W){var N=Date.now(),G=!W||M.row!=W.row,z=!W||M.column!=W.column;if(!$||G||z)n.moveCursorToPosition(M),$=N,x={x:y,y:c};else{var J=i(x.x,x.y,y,c);J>t?$=null:N-$>=u&&(n.renderer.scrollCursorIntoView(),$=null)}}function k(M,W){var N=Date.now(),G=n.renderer.layerConfig.lineHeight,z=n.renderer.layerConfig.characterWidth,J=n.renderer.scroller.getBoundingClientRect(),X={x:{left:y-J.left,right:J.right-y},y:{top:c-J.top,bottom:J.bottom-c}},V=Math.min(X.x.left,X.x.right),j=Math.min(X.y.top,X.y.bottom),K={row:M.row,column:M.column};V/z<=2&&(K.column+=X.x.left=h&&n.renderer.scrollCursorIntoView(K):v=N:v=null}function R(){var M=d;d=n.renderer.screenToTextCoordinates(y,c),C(d,M),k(d,M)}function _(){g=n.selection.toOrientedRange(),S=n.session.addMarker(g,"ace_selection",n.getSelectionStyle()),n.clearSelection(),n.isFocused()&&n.renderer.$cursorLayer.setBlinking(!1),clearInterval(l),R(),l=setInterval(R,20),a=0,A.addListener(document,"mousemove",D)}function O(){clearInterval(l),n.session.removeMarker(S),S=null,n.selection.fromOrientedRange(g),n.isFocused()&&!s&&n.$resetCursorStyle(),g=null,d=null,a=0,v=null,$=null,A.removeListener(document,"mousemove",D)}var I=null;function D(){I==null&&(I=setTimeout(function(){I!=null&&S&&O()},20))}function T(M){var W=M.types;return!W||Array.prototype.some.call(W,function(N){return N=="text/plain"||N=="Text"})}function P(M){var W=["copy","copymove","all","uninitialized"],N=["move","copymove","linkmove","all","uninitialized"],G=p.isMac?M.altKey:M.ctrlKey,z="uninitialized";try{z=M.dataTransfer.effectAllowed.toLowerCase()}catch{}var J="none";return G&&W.indexOf(z)>=0?J="copy":N.indexOf(z)>=0?J="move":W.indexOf(z)>=0&&(J="copy"),J}}(function(){this.dragWait=function(){var r=Date.now()-this.mousedownEvent.time;r>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var r=this.editor.container;r.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(r){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var r=this.editor,n=r.container;n.draggable=!0,r.renderer.$cursorLayer.setBlinking(!1),r.setStyle("ace_dragging");var o=p.isWin?"default":"move";r.renderer.setCursorStyle(o),this.setState("dragReady")},this.onMouseDrag=function(r){var n=this.editor.container;if(p.isIE&&this.state=="dragReady"){var o=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>3&&n.dragDrop()}if(this.state==="dragWait"){var o=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>0&&(n.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(r){if(this.$dragEnabled){this.mousedownEvent=r;var n=this.editor,o=r.inSelection(),m=r.getButton(),w=r.domEvent.detail||1;if(w===1&&m===0&&o){if(r.editor.inMultiSelectMode&&(r.getAccelKey()||r.getShiftKey()))return;this.mousedownEvent.time=Date.now();var S=r.domEvent.target||r.domEvent.srcElement;if("unselectable"in S&&(S.unselectable="on"),n.getDragDelay()){if(p.isWebKit){this.cancelDrag=!0;var y=n.container;y.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(r,this.onMouseDrag.bind(this)),r.defaultPrevented=!0}}}}).call(e.prototype);function i(r,n,o,m){return Math.sqrt(Math.pow(o-r,2)+Math.pow(m-n,2))}b.DragdropHandler=e}),define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(L,b,B){"use strict";var E=L("./mouse_event").MouseEvent,A=L("../lib/event"),p=L("../lib/dom");b.addTouchListeners=function(h,u){var t="scroll",e,i,r,n,o,m,w=0,S,y=0,c=0,l=0,g,d;function a(){var C=window.navigator&&window.navigator.clipboard,k=!1,R=function(){var O=u.getCopyText(),I=u.session.getUndoManager().hasUndo();d.replaceChild(p.buildDom(k?["span",!O&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],O&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],O&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],C&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],I&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),d.firstChild)},_=function(O){var I=O.target.getAttribute("action");if(I=="more"||!k)return k=!k,R();I=="paste"?C.readText().then(function(D){u.execCommand(I,D)}):I&&((I=="cut"||I=="copy")&&(C?C.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand(I)),d.firstChild.style.display="none",k=!1,I!="openCommandPallete"&&u.focus()};d=p.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(O){t="menu",O.stopPropagation(),O.preventDefault(),u.textInput.focus()},ontouchend:function(O){O.stopPropagation(),O.preventDefault(),_(O)},onclick:_},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function f(){d||a();var C=u.selection.cursor,k=u.renderer.textToScreenCoordinates(C.row,C.column),R=u.renderer.textToScreenCoordinates(0,0).pageX,_=u.renderer.scrollLeft,O=u.container.getBoundingClientRect();d.style.top=k.pageY-O.top-3+"px",k.pageX-O.left=2?u.selection.getLineRange(S.row):u.session.getBracketRange(S);C&&!C.isEmpty()?u.selection.setRange(C):u.selection.selectWord(),t="wait"}A.addListener(h,"contextmenu",function(C){if(g){var k=u.textInput.getElement();k.focus()}},u),A.addListener(h,"touchstart",function(C){var k=C.touches;if(o||k.length>1){clearTimeout(o),o=null,r=-1,t="zoom";return}g=u.$mouseHandler.isMousePressed=!0;var R=u.renderer.layerConfig.lineHeight,_=u.renderer.layerConfig.lineHeight,O=C.timeStamp;n=O;var I=k[0],D=I.clientX,T=I.clientY;Math.abs(e-D)+Math.abs(i-T)>R&&(r=-1),e=C.clientX=D,i=C.clientY=T,c=l=0;var P=new E(C,u);if(S=P.getDocumentPosition(),O-r<500&&k.length==1&&!w)y++,C.preventDefault(),C.button=0,$();else{y=0;var M=u.selection.cursor,W=u.selection.isEmpty()?M:u.selection.anchor,N=u.renderer.$cursorLayer.getPixelPosition(M,!0),G=u.renderer.$cursorLayer.getPixelPosition(W,!0),z=u.renderer.scroller.getBoundingClientRect(),J=u.renderer.layerConfig.offset,X=u.renderer.scrollLeft,V=function(q,ee){return q=q/_,ee=ee/R-.75,q*q+ee*ee};if(C.clientXK?"cursor":"anchor"),K<3.5?t="anchor":j<3.5?t="cursor":t="scroll",o=setTimeout(v,450)}r=O},u),A.addListener(h,"touchend",function(C){g=u.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),t=="zoom"?(t="",w=0):o?(u.selection.moveToPosition(S),w=0,f()):t=="scroll"?(x(),s()):f(),clearTimeout(o),o=null},u),A.addListener(h,"touchmove",function(C){o&&(clearTimeout(o),o=null);var k=C.touches;if(!(k.length>1||t=="zoom")){var R=k[0],_=e-R.clientX,O=i-R.clientY;if(t=="wait")if(_*_+O*O>4)t="cursor";else return C.preventDefault();e=R.clientX,i=R.clientY,C.clientX=R.clientX,C.clientY=R.clientY;var I=C.timeStamp,D=I-n;if(n=I,t=="scroll"){var T=new E(C,u);T.speed=1,T.wheelX=_,T.wheelY=O,10*Math.abs(_)1&&(S=m[m.length-2]);var c=t[o+"Path"];return c==null?c=t.basePath:w=="/"&&(o=w=""),c&&c.slice(-1)!="/"&&(c+="/"),c+o+w+S+this.get("suffix")},b.setModuleUrl=function(n,o){return t.$moduleUrls[n]=o},b.$loading={},b.loadModule=function(n,o){var m,w;Array.isArray(n)&&(w=n[0],n=n[1]);try{m=L(n)}catch{}if(m&&!b.$loading[n])return o&&o(m);if(b.$loading[n]||(b.$loading[n]=[]),b.$loading[n].push(o),!(b.$loading[n].length>1)){var S=function(){L([n],function(y){b._emit("load.module",{name:n,module:y});var c=b.$loading[n];b.$loading[n]=null,c.forEach(function(l){l&&l(y)})})};if(!b.get("packaged"))return S();p.loadScript(b.moduleUrl(n,w),S),e()}};var e=function(){!t.basePath&&!t.workerPath&&!t.modePath&&!t.themePath&&!Object.keys(t.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),e=function(){})};i(!0);function i(n){if(!(!u||!u.document)){t.packaged=n||L.packaged||B.packaged||u.define&&define.packaged;for(var o={},m="",w=document.currentScript||document._currentScript,S=w&&w.ownerDocument||document,y=S.getElementsByTagName("script"),c=0;c0)if(le==16){for(F=ce;F-1){for(F=ce;F=0&&K[Z]==v;Z--)V[Z]=p}}}function N(X,V,j){if(!(h=X){for(ee=q+1;ee=X;)ee++;for(te=q,Q=ee-1;te=V.length||(ee=j[K-1])!=l&&ee!=g||(te=V[K+1])!=l&&te!=g?d:(u&&(te=g),te==ee?te:d);case x:return ee=K>0?j[K-1]:a,ee==l&&K+10&&j[K-1]==l)return l;if(u)return d;for(Y=K+1,Q=V.length;Y=1425&&le<=2303||le==64286;if(ee=V[Y],he&&(ee==c||ee==s))return c}return K<1||(ee=V[K-1])==a?d:j[K-1];case a:return u=!1,e=!0,p;case f:return i=!0,d;case R:case _:case I:case D:case O:u=!1;case T:return d}}function z(X){var V=X.charCodeAt(0),j=V>>8;return j==0?V>191?y:P[V]:j==5?/[\u0591-\u05f4]/.test(X)?c:y:j==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(X)?k:/[\u0660-\u0669\u066b-\u066c]/.test(X)?g:V==1642?C:/[\u06f0-\u06f9]/.test(X)?l:s:j==32&&V<=8287?M[V&255]:j==254&&V>=65136?s:d}function J(X){return X>="\u064B"&&X<="\u0655"}b.L=y,b.R=c,b.EN=l,b.ON_R=3,b.AN=4,b.R_H=5,b.B=6,b.RLE=7,b.DOT="\xB7",b.doBidiReorder=function(X,V,j){if(X.length<2)return{};var K=X.split(""),q=new Array(K.length),ee=new Array(K.length),te=[];p=j?S:w,W(K,te,K.length,V);for(var Q=0;Qs&&V[Q]0&&K[Q-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(K[Q])&&(te[Q-1]=te[Q]=b.R_H,Q++);K[K.length-1]===b.DOT&&(te[K.length-1]=b.B),K[0]==="\u202B"&&(te[0]=b.RLE);for(var Q=0;Q=0&&(u=this.session.$docRowCache[e])}return u},this.getSplitIndex=function(){var u=0,t=this.session.$screenRowCache;if(t.length)for(var e,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-u>0&&(e=this.session.$getRowCacheIndex(t,this.currentRow-u-1),e===i);)i=e,u++;else u=this.currentRow;return u},this.updateRowLine=function(u,t){u===void 0&&(u=this.getDocumentRow());var e=u===this.session.getLength()-1,i=e?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(u),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var r=this.session.$wrapData[u];r&&(t===void 0&&(t=this.getSplitIndex()),t>0&&r.length?(this.wrapIndent=r.indent,this.wrapOffset=this.wrapIndent*this.charWidths[E.L],this.line=tt?this.session.getOverwrite()?u:u-1:t,i=E.getVisualFromLogicalIdx(e,this.bidiMap),r=this.bidiMap.bidiLevels,n=0;!this.session.getOverwrite()&&u<=t&&r[i]%2!==0&&i++;for(var o=0;ot&&r[i]%2===0&&(n+=this.charWidths[r[i]]),this.wrapIndent&&(n+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(n+=this.rtlLineOffset),n},this.getSelections=function(u,t){var e=this.bidiMap,i=e.bidiLevels,r,n=[],o=0,m=Math.min(u,t)-this.wrapIndent,w=Math.max(u,t)-this.wrapIndent,S=!1,y=!1,c=0;this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var l,g=0;g=m&&li+o/2;){if(i+=o,r===n.length-1){o=0;break}o=this.charWidths[n[++r]]}return r>0&&n[r-1]%2!==0&&n[r]%2===0?(e0&&n[r-1]%2===0&&n[r]%2!==0?t=1+(e>i?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===n.length-1&&o===0&&n[r-1]%2===0||!this.isRtlDir&&r===0&&n[r]%2!==0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&n[r-1]%2!==0&&o!==0&&r--,t=this.bidiMap.logicalFromVisual[r]),t===0&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(h.prototype),b.BidiHandler=h}),define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(L,b,B){"use strict";var E=L("./lib/oop"),A=L("./lib/lang"),p=L("./lib/event_emitter").EventEmitter,h=L("./range").Range,u=function(t){this.session=t,this.doc=t.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var e=this;this.cursor.on("change",function(i){e.$cursorChanged=!0,e.$silent||e._emit("changeCursor"),!e.$isEmpty&&!e.$silent&&e._emit("changeSelection"),!e.$keepDesiredColumnOnChange&&i.old.column!=i.value.column&&(e.$desiredColumn=null)}),this.anchor.on("change",function(){e.$anchorChanged=!0,!e.$isEmpty&&!e.$silent&&e._emit("changeSelection")})};(function(){E.implement(this,p),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(t,e){this.$isEmpty=!1,this.anchor.setPosition(t,e)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var t=this.anchor,e=this.lead;return t.row>e.row||t.row==e.row&&t.column>e.column},this.getRange=function(){var t=this.anchor,e=this.lead;return this.$isEmpty?h.fromPoints(e,e):this.isBackwards()?h.fromPoints(e,t):h.fromPoints(t,e)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(t,e){var i=e?t.end:t.start,r=e?t.start:t.end;this.$setSelection(i.row,i.column,r.row,r.column)},this.$setSelection=function(t,e,i,r){if(!this.$silent){var n=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(t,e),this.cursor.setPosition(i,r),this.$isEmpty=!h.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||n!=this.$isEmpty||o)&&this._emit("changeSelection")}},this.$moveSelection=function(t){var e=this.lead;this.$isEmpty&&this.setSelectionAnchor(e.row,e.column),t.call(this)},this.selectTo=function(t,e){this.$moveSelection(function(){this.moveCursorTo(t,e)})},this.selectToPosition=function(t){this.$moveSelection(function(){this.moveCursorToPosition(t)})},this.moveTo=function(t,e){this.clearSelection(),this.moveCursorTo(t,e)},this.moveToPosition=function(t){this.clearSelection(),this.moveCursorToPosition(t)},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(t,e){if(typeof e>"u"){var i=t||this.lead;t=i.row,e=i.column}return this.session.getWordRange(t,e)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var t=this.getCursor(),e=this.session.getAWordRange(t.row,t.column);this.setSelectionRange(e)},this.getLineRange=function(t,e){var i=typeof t=="number"?t:this.lead.row,r,n=this.session.getFoldLine(i);return n?(i=n.start.row,r=n.end.row):r=i,e===!0?new h(i,0,r,this.session.getLine(r).length):new h(i,0,r+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(t,e,i){var r=t.column,n=t.column+e;return i<0&&(r=t.column-e,n=t.column),this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(r,n).split(" ").length-1==e},this.moveCursorLeft=function(){var t=this.lead.getPosition(),e;if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(t.column===0)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var t=this.lead.getPosition(),e;if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(e.column=r)}}this.moveCursorTo(e.row,e.column)},this.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,e=this.doc.getLine(t).length;this.moveCursorTo(t,e)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var t=this.lead.row,e=this.lead.column,i=this.doc.getLine(t),r=i.substring(e);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var n=this.session.getFoldAt(t,e,1);if(n){this.moveCursorTo(n.end.row,n.end.column);return}if(this.session.nonTokenRe.exec(r)&&(e+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=i.substring(e)),e>=i.length){this.moveCursorTo(t,i.length),this.moveCursorRight(),t0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(n)&&(e-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,e)},this.$shortWordEndIndex=function(t){var e=0,i,r=/\s/,n=this.session.tokenRe;if(n.lastIndex=0,this.session.tokenRe.exec(t))e=this.session.tokenRe.lastIndex;else{for(;(i=t[e])&&r.test(i);)e++;if(e<1){for(n.lastIndex=0;(i=t[e])&&!n.test(i);)if(n.lastIndex=0,e++,r.test(i))if(e>2){e--;break}else{for(;(i=t[e])&&r.test(i);)e++;if(e>2)break}}}return n.lastIndex=0,e},this.moveCursorShortWordRight=function(){var t=this.lead.row,e=this.lead.column,i=this.doc.getLine(t),r=i.substring(e),n=this.session.getFoldAt(t,e,1);if(n)return this.moveCursorTo(n.end.row,n.end.column);if(e==i.length){var o=this.doc.getLength();do t++,r=this.doc.getLine(t);while(t0&&/^\s*$/.test(r));e=r.length,/\s+$/.test(r)||(r="")}var n=A.stringReverse(r),o=this.$shortWordEndIndex(n);return this.moveCursorTo(t,e-o)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(t,e){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column),r;if(e===0&&(t!==0&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(r=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(r/this.session.$bidiHandler.charWidths[0])):r=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),t!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var n=this.session.lineWidgets[this.lead.row];t<0?t-=n.rowsAbove||0:t>0&&(t+=n.rowCount-(n.rowsAbove||0))}var o=this.session.screenToDocumentPosition(i.row+t,i.column,r);t!==0&&e===0&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+e,e===0)},this.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column)},this.moveCursorTo=function(t,e,i){var r=this.session.getFoldAt(t,e,1);r&&(t=r.start.row,e=r.start.column),this.$keepDesiredColumnOnChange=!0;var n=this.session.getLine(t);/[\uDC00-\uDFFF]/.test(n.charAt(e))&&n.charAt(e-1)&&(this.lead.row==t&&this.lead.column==e+1?e=e-1:e=e+1),this.lead.setPosition(t,e),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(t,e,i){var r=this.session.screenToDocumentPosition(t,e);this.moveCursorTo(r.row,r.column,i)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(t){var e=this.getRange();return t?(t.start.column=e.start.column,t.start.row=e.start.row,t.end.column=e.end.column,t.end.row=e.end.row):t=e,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},this.getRangeOfMovements=function(t){var e=this.getCursor();try{t(this);var i=this.getCursor();return h.fromPoints(e,i)}catch{return h.fromPoints(e,e)}finally{this.moveCursorToPosition(e)}},this.toJSON=function(){if(this.rangeCount)var t=this.ranges.map(function(e){var i=e.clone();return i.isBackwards=e.cursor==e.start,i});else{var t=this.getRange();t.isBackwards=this.isBackwards()}return t},this.fromJSON=function(t){if(t.start==null)if(this.rangeList&&t.length>1){this.toSingleRange(t[0]);for(var e=t.length;e--;){var i=h.fromPoints(t[e].start,t[e].end);t[e].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}else t=t[0];this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards)},this.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return!1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var e=this.ranges.length;e--;)if(!this.ranges[e].isEqual(t[e]))return!1;return!0}}).call(u.prototype),b.Selection=u}),define("ace/tokenizer",["require","exports","module","ace/config"],function(L,b,B){"use strict";var E=L("./config"),A=2e3,p=function(h){this.states=h,this.regExps={},this.matchMappings={};for(var u in this.states){for(var t=this.states[u],e=[],i=0,r=this.matchMappings[u]={defaultToken:"text"},n="g",o=[],m=0;m1?w.onMatch=this.$applyToken:w.onMatch=w.token),y>1&&(/\\\d/.test(w.regex)?S=w.regex.replace(/\\([0-9]+)/g,function(c,l){return"\\"+(parseInt(l,10)+i+1)}):(y=1,S=this.removeCapturingGroups(w.regex)),!w.splitRegex&&typeof w.token!="string"&&o.push(w)),r[i]=m,i+=y,e.push(S),w.onMatch||(w.onMatch=null)}}e.length||(r[0]=0,e.push("$")),o.forEach(function(c){c.splitRegex=this.createSplitterRegexp(c.regex,n)},this),this.regExps[u]=new RegExp("("+e.join(")|(")+")|($)",n)}};(function(){this.$setMaxTokenCount=function(h){A=h|0},this.$applyToken=function(h){var u=this.splitRegex.exec(h).slice(1),t=this.token.apply(this,u);if(typeof t=="string")return[{type:t,value:h}];for(var e=[],i=0,r=t.length;iw){var a=h.substring(w,d-g.length);y.type==c?y.value+=a:(y.type&&m.push(y),y={type:c,value:a})}for(var f=0;fA){for(S>2*h.length&&this.reportError("infinite loop with in ace tokenizer",{startState:u,line:h});w1&&t[0]!==e&&t.unshift("#tmp",e),{tokens:m,state:t.length?t:e}},this.reportError=E.reportError}).call(p.prototype),b.Tokenizer=p}),define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(L,b,B){"use strict";var E=L("../lib/lang"),A=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(u,t){if(!t){for(var e in u)this.$rules[e]=u[e];return}for(var e in u){for(var i=u[e],r=0;r=this.$rowTokens.length;){if(this.$row+=1,p||(p=this.$session.getLength()),this.$row>=p)return this.$row=p-1,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 p=this.$rowTokens,h=this.$tokenIndex,u=p[h].start;if(u!==void 0)return u;for(u=0;h>0;)h-=1,u+=p[h].value.length;return u},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var p=this.$rowTokens[this.$tokenIndex],h=this.getCurrentTokenColumn();return new E(this.$row,h,this.$row,h+p.value.length)}}).call(A.prototype),b.TokenIterator=A}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(L,b,B){"use strict";var E=L("../../lib/oop"),A=L("../behaviour").Behaviour,p=L("../../token_iterator").TokenIterator,h=L("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],t=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],e,i={},r={'"':'"',"'":"'"},n=function(w){var S=-1;if(w.multiSelect&&(S=w.selection.index,i.rangeCount!=w.multiSelect.rangeCount&&(i={rangeCount:w.multiSelect.rangeCount})),i[S])return e=i[S];e=i[S]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},o=function(w,S,y,c){var l=w.end.row-w.start.row;return{text:y+S+c,selection:[0,w.start.column+1,l,w.end.column+(l?0:1)]}},m=function(w){this.add("braces","insertion",function(S,y,c,l,g){var d=c.getCursorPosition(),a=l.doc.getLine(d.row);if(g=="{"){n(c);var f=c.getSelectionRange(),s=l.doc.getTextRange(f);if(s!==""&&s!=="{"&&c.getWrapBehavioursEnabled())return o(f,s,"{","}");if(m.isSaneInsertion(c,l))return/[\]\}\)]/.test(a[d.column])||c.inMultiSelectMode||w&&w.braces?(m.recordAutoInsert(c,l,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(c,l,"{"),{text:"{",selection:[1,1]})}else if(g=="}"){n(c);var v=a.substring(d.column,d.column+1);if(v=="}"){var $=l.$findOpeningBracket("}",{column:d.column+1,row:d.row});if($!==null&&m.isAutoInsertedClosing(d,a,g))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(g==` `||g==`\r `){n(c);var x="";m.isMaybeInsertedClosing(d,a)&&(x=h.stringRepeat("}",e.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var v=a.substring(d.column,d.column+1);if(v==="}"){var C=l.findMatchingBracket({row:d.row,column:d.column+1},"}");if(!C)return null;var k=this.$getIndent(l.getLine(C.row))}else if(x)var k=this.$getIndent(a);else{m.clearMaybeInsertedClosing();return}var R=k+l.getTabString();return{text:` @@ -24,32 +24,32 @@ `}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e==`\r `||e=="\r"||e==` `},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,i){return this.$lines.slice(e,i+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var i;if(e.start.row===e.end.row)i=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{i=this.getLines(e.start.row,e.end.row),i[0]=(i[0]||"").substring(e.start.column);var r=i.length-1;e.end.row-e.start.row==r&&(i[r]=i[r].substring(0,e.end.column))}return i},this.insertLines=function(e,i){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,i)},this.removeLines=function(e,i){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,i)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,i){return this.getLength()<=1&&this.$detectNewLine(i),this.insertMergedLines(e,this.$split(i))},this.insertInLine=function(e,i){var r=this.clippedPos(e.row,e.column),n=this.pos(e.row,e.column+i.length);return this.applyDelta({start:r,end:n,action:"insert",lines:[i]},!0),this.clonePos(n)},this.clippedPos=function(e,i){var r=this.getLength();e===void 0?e=r:e<0?e=0:e>=r&&(e=r-1,i=void 0);var n=this.getLine(e);return i==null&&(i=n.length),i=Math.min(Math.max(i,0),n.length),{row:e,column:i}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,i){return{row:e,column:i}},this.$clipPosition=function(e){var i=this.getLength();return e.row>=i?(e.row=Math.max(0,i-1),e.column=this.getLine(i-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,i){e=Math.min(Math.max(e,0),this.getLength());var r=0;e0,n=i=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,i){if(e instanceof h||(e=h.fromPoints(e.start,e.end)),i.length===0&&e.isEmpty())return e.start;if(i==this.getTextRange(e))return e.end;this.remove(e);var r;return i?r=this.insert(e.start,i):r=e.start,r},this.applyDeltas=function(e){for(var i=0;i=0;i--)this.revertDelta(e[i])},this.applyDelta=function(e,i){var r=e.action=="insert";(r?e.lines.length<=1&&!e.lines[0]:!h.comparePoints(e.start,e.end))||(r&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(A(this.$lines,e,i),this._signal("change",e)))},this.$safeApplyDelta=function(e){var i=this.$lines.length;(e.action=="remove"&&e.start.row20){t.running=setTimeout(t.$worker,20);break}}t.currentLine=i,r==-1&&(r=i),o<=r&&t.fireUpdateEvent(o,r)}}};(function(){E.implement(this,A),this.setTokenizer=function(h){this.tokenizer=h,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(h){this.doc=h,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(h,u){var t={first:h,last:u};this._signal("update",{data:t})},this.start=function(h){this.currentLine=Math.min(h||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(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(h){var u=h.start.row,t=h.end.row-u;if(t===0)this.lines[u]=null;else if(h.action=="remove")this.lines.splice(u,t+1,null),this.states.splice(u,t+1,null);else{var e=Array(t+1);e.unshift(u,1),this.lines.splice.apply(this.lines,e),this.states.splice.apply(this.states,e)}this.currentLine=Math.min(u,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(h){return this.lines[h]||this.$tokenizeRow(h)},this.getState=function(h){return this.currentLine==h&&this.$tokenizeRow(h),this.states[h]||"start"},this.$tokenizeRow=function(h){var u=this.doc.getLine(h),t=this.states[h-1],e=this.tokenizer.getLineTokens(u,t,h);return this.states[h]+""!=e.state+""?(this.states[h]=e.state,this.lines[h+1]=null,this.currentLine>h+1&&(this.currentLine=h+1)):this.currentLine==h&&(this.currentLine=h+1),this.lines[h]=e.tokens}}).call(p.prototype),b.BackgroundTokenizer=p}),define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(L,b,B){"use strict";var E=L("./lib/lang"),A=L("./lib/oop"),p=L("./range").Range,h=function(u,t,e){this.setRegexp(u),this.clazz=t,this.type=e||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(u){this.regExp+""!=u+""&&(this.regExp=u,this.cache=[])},this.update=function(u,t,e,i){if(this.regExp)for(var r=i.firstRow,n=i.lastRow,o=r;o<=n;o++){var m=this.cache[o];m==null&&(m=E.getMatchOffsets(e.getLine(o),this.regExp),m.length>this.MAX_RANGES&&(m=m.slice(0,this.MAX_RANGES)),m=m.map(function(S){return new p(o,S.offset,o,S.offset+S.length)}),this.cache[o]=m.length?m:"");for(var w=m.length;w--;)t.drawSingleLineMarker(u,m[w].toScreenRange(e),this.clazz,i)}}}).call(h.prototype),b.SearchHighlight=h}),define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(L,b,B){"use strict";var E=L("../range").Range;function A(p,h){this.foldData=p,Array.isArray(h)?this.folds=h:h=this.folds=[h];var u=h[h.length-1];this.range=new E(h[0].start.row,h[0].start.column,u.end.row,u.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(t){t.setFoldLine(this)},this)}(function(){this.shiftRow=function(p){this.start.row+=p,this.end.row+=p,this.folds.forEach(function(h){h.start.row+=p,h.end.row+=p})},this.addFold=function(p){if(p.sameRow){if(p.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(p),this.folds.sort(function(h,u){return-h.range.compareEnd(u.start.row,u.start.column)}),this.range.compareEnd(p.start.row,p.start.column)>0?(this.end.row=p.end.row,this.end.column=p.end.column):this.range.compareStart(p.end.row,p.end.column)<0&&(this.start.row=p.start.row,this.start.column=p.start.column)}else if(p.start.row==this.end.row)this.folds.push(p),this.end.row=p.end.row,this.end.column=p.end.column;else if(p.end.row==this.start.row)this.folds.unshift(p),this.start.row=p.start.row,this.start.column=p.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");p.foldLine=this},this.containsRow=function(p){return p>=this.start.row&&p<=this.end.row},this.walk=function(p,h,u){var t=0,e=this.folds,i,r,n,o=!0;h==null&&(h=this.end.row,u=this.end.column);for(var m=0;m0)){var o=A(h,r.start);return n===0?u&&o!==0?-i-2:i:o>0||o===0&&!u?i:-i-1}}return-i-1},this.add=function(h){var u=!h.isEmpty(),t=this.pointIndex(h.start,u);t<0&&(t=-t-1);var e=this.pointIndex(h.end,u,t);return e<0?e=-e-1:e++,this.ranges.splice(t,e-t,h)},this.addList=function(h){for(var u=[],t=h.length;t--;)u.push.apply(u,this.add(h[t]));return u},this.substractPoint=function(h){var u=this.pointIndex(h);if(u>=0)return this.ranges.splice(u,1)},this.merge=function(){var h=[],u=this.ranges;u=u.sort(function(n,o){return A(n.start,o.start)});for(var t=u[0],e,i=1;i=0},this.containsPoint=function(h){return this.pointIndex(h)>=0},this.rangeAtPoint=function(h){var u=this.pointIndex(h);if(u>=0)return this.ranges[u]},this.clipRows=function(h,u){var t=this.ranges;if(t[0].start.row>u||t[t.length-1].start.row=e)break}if(h.action=="insert")for(var w=i-e,S=-u.column+t.column;ne)break;if(m.start.row==e&&m.start.column>=u.column&&(m.start.column==u.column&&this.$bias<=0||(m.start.column+=S,m.start.row+=w)),m.end.row==e&&m.end.column>=u.column){if(m.end.column==u.column&&this.$bias<0)continue;m.end.column==u.column&&S>0&&nm.start.column&&m.end.column==r[n+1].start.column&&(m.end.column-=S),m.end.column+=S,m.end.row+=w}}else for(var w=e-i,S=u.column-t.column;ni)break;m.end.rowu.column)&&(m.end.column=u.column,m.end.row=u.row):(m.end.column+=S,m.end.row+=w):m.end.row>i&&(m.end.row+=w),m.start.rowu.column)&&(m.start.column=u.column,m.start.row=u.row):(m.start.column+=S,m.start.row+=w):m.start.row>i&&(m.start.row+=w)}if(w!=0&&n=t)return n;if(n.end.row>t)return null}return null},this.getNextFoldLine=function(t,e){var i=this.$foldData,r=0;for(e&&(r=i.indexOf(e)),r==-1&&(r=0),r;r=t)return n}return null},this.getFoldedRowCount=function(t,e){for(var i=this.$foldData,r=e-t+1,n=0;n=e){w=t?r-=e-w:r=0);break}else m>=t&&(w>=t?r-=m-w:r-=m-t+1)}return r},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort(function(e,i){return e.start.row-i.start.row}),t},this.addFold=function(t,e){var i=this.$foldData,r=!1,n;t instanceof p?n=t:(n=new p(e,t),n.collapseChildren=e.collapseChildren),this.$clipRangeToDocument(n.range);var o=n.start.row,m=n.start.column,w=n.end.row,S=n.end.column,y=this.getFoldAt(o,m,1),c=this.getFoldAt(w,S,-1);if(y&&c==y)return y.addSubFold(n);y&&!y.range.isStart(o,m)&&this.removeFold(y),c&&!c.range.isEnd(w,S)&&this.removeFold(c);var l=this.getFoldsInRange(n.range);l.length>0&&(this.removeFolds(l),n.collapseChildren||l.forEach(function(f){n.addSubFold(f)}));for(var g=0;g0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(t,e){var i,r;if(t==null?(i=new E(0,0,this.getLength(),0),e==null&&(e=!0)):typeof t=="number"?i=new E(t,0,t,this.getLine(t).length):"row"in t?i=E.fromPoints(t,t):i=t,r=this.getFoldsInRangeList(i),e!=!1?this.removeFolds(r):this.expandFolds(r),r.length)return r},this.isRowFolded=function(t,e){return!!this.getFoldLine(t,e)},this.getRowFoldEnd=function(t,e){var i=this.getFoldLine(t,e);return i?i.end.row:t},this.getRowFoldStart=function(t,e){var i=this.getFoldLine(t,e);return i?i.start.row:t},this.getFoldDisplayLine=function(t,e,i,r,n){r==null&&(r=t.start.row),n==null&&(n=0),e==null&&(e=t.end.row),i==null&&(i=this.getLine(e).length);var o=this.doc,m="";return t.walk(function(w,S,y,c){if(!(SS)break;while(n&&m.test(n.type));n=r.stepBackward()}else n=r.getCurrentToken();return w.end.row=r.getCurrentTokenRow(),w.end.column=r.getCurrentTokenColumn()+n.value.length-2,w}},this.foldAll=function(t,e,i,r){i==null&&(i=1e5);var n=this.foldWidgets;if(n){e=e||this.getLength(),t=t||0;for(var o=t;o=t&&(o=m.end.row,m.collapseChildren=i,this.addFold("...",m))}}},this.foldToLevel=function(t){for(this.foldAll();t-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var t=this;this.foldAll(null,null,null,function(e){for(var i=t.getTokens(e),r=0;r=0;){var o=i[r];if(o==null&&(o=i[r]=this.getFoldWidget(r)),o=="start"){var m=this.getFoldWidgetRange(r);if(n||(n=m),m&&m.end.row>=t)break}r--}return{range:r!==-1&&m,firstRange:n}},this.onFoldWidgetClick=function(t,e){e=e.domEvent;var i={children:e.shiftKey,all:e.ctrlKey||e.metaKey,siblings:e.altKey},r=this.$toggleFoldWidget(t,i);if(!r){var n=e.target||e.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(t,e){if(this.getFoldWidget){var i=this.getFoldWidget(t),r=this.getLine(t),n=i==="end"?-1:1,o=this.getFoldAt(t,n===-1?0:r.length,n);if(o)return e.children||e.all?this.removeFold(o):this.expandFold(o),o;var m=this.getFoldWidgetRange(t,!0);if(m&&!m.isMultiLine()&&(o=this.getFoldAt(m.start.row,m.start.column,1),o&&m.isEqual(o.range)))return this.removeFold(o),o;if(e.siblings){var w=this.getParentFoldRangeData(t);if(w.range)var S=w.range.start.row+1,y=w.range.end.row;this.foldAll(S,y,e.all?1e4:0)}else e.children?(y=m?m.end.row:this.getLength(),this.foldAll(t+1,y,e.all?1e4:0)):m&&(e.all&&(m.collapseChildren=1e4),this.addFold("...",m));return m}},this.toggleFoldWidget=function(t){var e=this.selection.getCursor().row;e=this.getRowFoldStart(e);var i=this.$toggleFoldWidget(e,{});if(!i){var r=this.getParentFoldRangeData(e,!0);if(i=r.range||r.firstRange,i){e=i.start.row;var n=this.getFoldAt(e,this.getLine(e).length,1);n?this.removeFold(n):this.addFold("...",i)}}},this.updateFoldWidgets=function(t){var e=t.start.row,i=t.end.row-e;if(i===0)this.foldWidgets[e]=null;else if(t.action=="remove")this.foldWidgets.splice(e,i+1,null);else{var r=Array(i+1);r.unshift(e,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(t){var e=t.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}b.Folding=u}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(L,b,B){"use strict";var E=L("../token_iterator").TokenIterator,A=L("../range").Range;function p(){this.findMatchingBracket=function(h,u){if(h.column==0)return null;var t=u||this.getLine(h.row).charAt(h.column-1);if(t=="")return null;var e=t.match(/([\(\[\{])|([\)\]\}])/);return e?e[1]?this.$findClosingBracket(e[1],h):this.$findOpeningBracket(e[2],h):null},this.getBracketRange=function(h){var u=this.getLine(h.row),t=!0,e,i=u.charAt(h.column-1),r=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(r||(i=u.charAt(h.column),h={row:h.row,column:h.column+1},r=i&&i.match(/([\(\[\{])|([\)\]\}])/),t=!1),!r)return null;if(r[1]){var n=this.$findClosingBracket(r[1],h);if(!n)return null;e=A.fromPoints(h,n),t||(e.end.column++,e.start.column--),e.cursor=e.end}else{var n=this.$findOpeningBracket(r[2],h);if(!n)return null;e=A.fromPoints(n,h),t||(e.start.column++,e.end.column--),e.cursor=e.start}return e},this.getMatchingBracketRanges=function(h){var u=this.getLine(h.row),t=u.charAt(h.column-1),e=t&&t.match(/([\(\[\{])|([\)\]\}])/);if(e||(t=u.charAt(h.column),h={row:h.row,column:h.column+1},e=t&&t.match(/([\(\[\{])|([\)\]\}])/)),!e)return null;var i=new A(h.row,h.column-1,h.row,h.column),r=e[1]?this.$findClosingBracket(e[1],h):this.$findOpeningBracket(e[2],h);if(!r)return[i];var n=new A(r.row,r.column,r.row,r.column+1);return[i,n]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,u,t){var e=this.$brackets[h],i=1,r=new E(this,u.row,u.column),n=r.getCurrentToken();if(n||(n=r.stepForward()),!!n){t||(t=new RegExp("(\\.?"+n.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var o=u.column-r.getCurrentTokenColumn()-2,m=n.value;;){for(;o>=0;){var w=m.charAt(o);if(w==e){if(i-=1,i==0)return{row:r.getCurrentTokenRow(),column:o+r.getCurrentTokenColumn()}}else w==h&&(i+=1);o-=1}do n=r.stepBackward();while(n&&!t.test(n.type));if(n==null)break;m=n.value,o=m.length-1}return null}},this.$findClosingBracket=function(h,u,t){var e=this.$brackets[h],i=1,r=new E(this,u.row,u.column),n=r.getCurrentToken();if(n||(n=r.stepForward()),!!n){t||(t=new RegExp("(\\.?"+n.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var o=u.column-r.getCurrentTokenColumn();;){for(var m=n.value,w=m.length;o$&&(this.$docRowCache.splice($,v),this.$screenRowCache.splice($,v))},this.$getRowCacheIndex=function(s,v){for(var $=0,x=s.length-1;$<=x;){var C=$+x>>1,k=s[C];if(v>k)$=C+1;else if(v=v));k++);return x=$[k],x?(x.index=k,x.start=C-x.value.length,x):null},this.setUndoManager=function(s){if(this.$undoManager=s,this.$informUndoManager&&this.$informUndoManager.cancel(),s){var v=this;s.addSession(this),this.$syncInformUndoManager=function(){v.$informUndoManager.cancel(),v.mergeUndoDeltas=!1},this.$informUndoManager=A.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?A.stringRepeat(" ",this.getTabSize()):" "},this.setUseSoftTabs=function(s){this.setOption("useSoftTabs",s)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(s){this.setOption("tabSize",s)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(s){return this.$useSoftTabs&&s.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(s){this.setOption("navigateWithinSoftTabs",s)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(s){this.setOption("overwrite",s)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(s,v){this.$decorations[s]||(this.$decorations[s]=""),this.$decorations[s]+=" "+v,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(s,v){this.$decorations[s]=(this.$decorations[s]||"").replace(" "+v,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(s){this.$breakpoints=[];for(var v=0;v0&&(x=!!$.charAt(v-1).match(this.tokenRe)),x||(x=!!$.charAt(v).match(this.tokenRe)),x)var C=this.tokenRe;else if(/^\s+$/.test($.slice(v-1,v+1)))var C=/\s/;else var C=this.nonTokenRe;var k=v;if(k>0){do k--;while(k>=0&&$.charAt(k).match(C));k++}for(var R=v;R<$.length&&$.charAt(R).match(C);)R++;return new i(s,k,s,R)},this.getAWordRange=function(s,v){for(var $=this.getWordRange(s,v),x=this.getLine($.end.row);x.charAt($.end.column).match(/[ \t]/);)$.end.column+=1;return $},this.setNewLineMode=function(s){this.doc.setNewLineMode(s)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(s){this.setOption("useWorker",s)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(s){var v=s.data;this.bgTokenizer.start(v.first),this._signal("tokenizerUpdate",s)},this.$modes=h.$modes,this.$mode=null,this.$modeId=null,this.setMode=function(s,v){if(s&&typeof s=="object"){if(s.getTokenizer)return this.$onChangeMode(s);var $=s,x=$.path}else x=s||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new e),this.$modes[x]&&!$){this.$onChangeMode(this.$modes[x]),v&&v();return}this.$modeId=x,h.loadModule(["mode",x],function(C){if(this.$modeId!==x)return v&&v();this.$modes[x]&&!$?this.$onChangeMode(this.$modes[x]):C&&C.Mode&&(C=new C.Mode($),$||(this.$modes[x]=C,C.$id=x),this.$onChangeMode(C)),v&&v()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(s,v){if(v||(this.$modeId=s.$id),this.$mode!==s){var $=this.$mode;this.$mode=s,this.$stopWorker(),this.$useWorker&&this.$startWorker();var x=s.getTokenizer();if(x.on!==void 0){var C=this.onReloadTokenizer.bind(this);x.on("update",C)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(x);else{this.bgTokenizer=new n(x);var k=this;this.bgTokenizer.on("update",function(R){k._signal("tokenizerUpdate",R)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=s.tokenRe,this.nonTokenRe=s.nonTokenRe,v||(s.attachToSession&&s.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(s.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:$,mode:s}))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(s){h.warn("Could not load worker",s),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(s){this.$scrollTop===s||isNaN(s)||(this.$scrollTop=s,this._signal("changeScrollTop",s))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(s){this.$scrollLeft===s||isNaN(s)||(this.$scrollLeft=s,this._signal("changeScrollLeft",s))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var s=0;return this.lineWidgets.forEach(function(v){v&&v.screenWidth>s&&(s=v.screenWidth)}),this.lineWidgetWidth=s},this.$computeWidth=function(s){if(this.$modified||s){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var v=this.doc.getAllLines(),$=this.$rowLengthCache,x=0,C=0,k=this.$foldData[C],R=k?k.start.row:1/0,_=v.length,O=0;O<_;O++){if(O>R){if(O=k.end.row+1,O>=_)break;k=this.$foldData[C++],R=k?k.start.row:1/0}$[O]==null&&($[O]=this.$getStringScreenWidth(v[O])[0]),$[O]>x&&(x=$[O])}this.screenWidth=x}},this.getLine=function(s){return this.doc.getLine(s)},this.getLines=function(s,v){return this.doc.getLines(s,v)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(s){return this.doc.getTextRange(s||this.selection.getRange())},this.insert=function(s,v){return this.doc.insert(s,v)},this.remove=function(s){return this.doc.remove(s)},this.removeFullLines=function(s,v){return this.doc.removeFullLines(s,v)},this.undoChanges=function(s,v){if(s.length){this.$fromUndo=!0;for(var $=s.length-1;$!=-1;$--){var x=s[$];x.action=="insert"||x.action=="remove"?this.doc.revertDelta(x):x.folds&&this.addFolds(x.folds)}!v&&this.$undoSelect&&(s.selectionBefore?this.selection.fromJSON(s.selectionBefore):this.selection.setRange(this.$getUndoSelection(s,!0))),this.$fromUndo=!1}},this.redoChanges=function(s,v){if(s.length){this.$fromUndo=!0;for(var $=0;$s.end.column&&(k.start.column+=_),k.end.row==s.end.row&&k.end.column>s.end.column&&(k.end.column+=_)),R&&k.start.row>=s.end.row&&(k.start.row+=R,k.end.row+=R)}if(k.end=this.insert(k.start,x),C.length){var O=s.start,I=k.start,R=I.row-O.row,_=I.column-O.column;this.addFolds(C.map(function(P){return P=P.clone(),P.start.row==O.row&&(P.start.column+=_),P.end.row==O.row&&(P.end.column+=_),P.start.row+=R,P.end.row+=R,P}))}return k},this.indentRows=function(s,v,$){$=$.replace(/\t/g,this.getTabString());for(var x=s;x<=v;x++)this.doc.insertInLine({row:x,column:0},$)},this.outdentRows=function(s){for(var v=s.collapseRows(),$=new i(0,0,0,0),x=this.getTabSize(),C=v.start.row;C<=v.end.row;++C){var k=this.getLine(C);$.start.row=C,$.end.row=C;for(var R=0;R0){var x=this.getRowFoldEnd(v+$);if(x>this.doc.getLength()-1)return 0;var C=x-v}else{s=this.$clipRowToDocument(s),v=this.$clipRowToDocument(v);var C=v-s+1}var k=new i(s,0,v,Number.MAX_VALUE),R=this.getFoldsInRange(k).map(function(O){return O=O.clone(),O.start.row+=C,O.end.row+=C,O}),_=$==0?this.doc.getLines(s,v):this.doc.removeFullLines(s,v);return this.doc.insertFullLines(s+C,_),R.length&&this.addFolds(R),C},this.moveLinesUp=function(s,v){return this.$moveLines(s,v,-1)},this.moveLinesDown=function(s,v){return this.$moveLines(s,v,1)},this.duplicateLines=function(s,v){return this.$moveLines(s,v,0)},this.$clipRowToDocument=function(s){return Math.max(0,Math.min(s,this.doc.getLength()-1))},this.$clipColumnToRow=function(s,v){return v<0?0:Math.min(this.doc.getLine(s).length,v)},this.$clipPositionToDocument=function(s,v){if(v=Math.max(0,v),s<0)s=0,v=0;else{var $=this.doc.getLength();s>=$?(s=$-1,v=this.doc.getLine($-1).length):v=Math.min(this.doc.getLine(s).length,v)}return{row:s,column:v}},this.$clipRangeToDocument=function(s){s.start.row<0?(s.start.row=0,s.start.column=0):s.start.column=this.$clipColumnToRow(s.start.row,s.start.column);var v=this.doc.getLength()-1;return s.end.row>v?(s.end.row=v,s.end.column=this.doc.getLine(v).length):s.end.column=this.$clipColumnToRow(s.end.row,s.end.column),s},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(s){if(s!=this.$useWrapMode){if(this.$useWrapMode=s,this.$modified=!0,this.$resetRowCache(0),s){var v=this.getLength();this.$wrapData=Array(v),this.$updateWrapData(0,v-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(s,v){(this.$wrapLimitRange.min!==s||this.$wrapLimitRange.max!==v)&&(this.$wrapLimitRange={min:s,max:v},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(s,v){var $=this.$wrapLimitRange;$.max<0&&($={min:v,max:v});var x=this.$constrainWrapLimit(s,$.min,$.max);return x!=this.$wrapLimit&&x>1?(this.$wrapLimit=x,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(s,v,$){return v&&(s=Math.max(v,s)),$&&(s=Math.min($,s)),s},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(s){this.setWrapLimitRange(s,s)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(s){var v=this.$useWrapMode,$=s.action,x=s.start,C=s.end,k=x.row,R=C.row,_=R-k,O=null;if(this.$updating=!0,_!=0)if($==="remove"){this[v?"$wrapData":"$rowLengthCache"].splice(k,_);var I=this.$foldData;O=this.getFoldsInRange(s),this.removeFolds(O);var D=this.getFoldLine(C.row),T=0;if(D){D.addRemoveChars(C.row,C.column,x.column-C.column),D.shiftRow(-_);var P=this.getFoldLine(k);P&&P!==D&&(P.merge(D),D=P),T=I.indexOf(D)+1}for(T;T=C.row&&D.shiftRow(-_)}R=k}else{var M=Array(_);M.unshift(k,0);var W=v?this.$wrapData:this.$rowLengthCache;W.splice.apply(W,M);var I=this.$foldData,D=this.getFoldLine(k),T=0;if(D){var N=D.range.compareInside(x.row,x.column);N==0?(D=D.split(x.row,x.column),D&&(D.shiftRow(_),D.addRemoveChars(R,0,C.column-x.column))):N==-1&&(D.addRemoveChars(k,0,C.column-x.column),D.shiftRow(_)),T=I.indexOf(D)+1}for(T;T=k&&D.shiftRow(_)}}else{_=Math.abs(s.start.column-s.end.column),$==="remove"&&(O=this.getFoldsInRange(s),this.removeFolds(O),_=-_);var D=this.getFoldLine(k);D&&D.addRemoveChars(k,x.column,_)}return v&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,v?this.$updateWrapData(k,R):this.$updateRowLengthCache(k,R),O},this.$updateRowLengthCache=function(s,v,$){this.$rowLengthCache[s]=null,this.$rowLengthCache[v]=null},this.$updateWrapData=function(s,v){var $=this.doc.getAllLines(),x=this.getTabSize(),C=this.$wrapData,k=this.$wrapLimit,R,_,O=s;for(v=Math.min(v,$.length-1);O<=v;)_=this.getFoldLine(O,_),_?(R=[],_.walk(function(I,D,T,P){var M;if(I!=null){M=this.$getDisplayTokens(I,R.length),M[0]=y;for(var W=1;Wv-P;){var M=k+v-P;if(s[M-1]>=g&&s[M]>=g){T(M);continue}if(s[M]==y||s[M]==c){for(M;M!=k-1&&s[M]!=y;M--);if(M>k){T(M);continue}for(M=k+v,M;M>2)),k-1);M>W&&s[M]W&&s[M]W&&s[M]==l;)M--}else for(;M>W&&s[M]W){T(++M);continue}M=k+v,s[M]==S&&M--,T(M-P)}return x},this.$getDisplayTokens=function(s,v){var $=[],x;v=v||0;for(var C=0;C39&&k<48||k>57&&k<64?$.push(l):k>=4352&&f(k)?$.push(w,S):$.push(w)}return $},this.$getStringScreenWidth=function(s,v,$){if(v==0)return[0,0];v==null&&(v=1/0),$=$||0;var x,C;for(C=0;C=4352&&f(x)?$+=2:$+=1,!($>v));C++);return[$,C]},this.lineWidgets=null,this.getRowLength=function(s){var v=1;return this.lineWidgets&&(v+=this.lineWidgets[s]&&this.lineWidgets[s].rowCount||0),!this.$useWrapMode||!this.$wrapData[s]?v:this.$wrapData[s].length+v},this.getRowLineCount=function(s){return!this.$useWrapMode||!this.$wrapData[s]?1:this.$wrapData[s].length+1},this.getRowWrapIndent=function(s){if(this.$useWrapMode){var v=this.screenToDocumentPosition(s,Number.MAX_VALUE),$=this.$wrapData[v.row];return $.length&&$[0]=0)var _=I[D],C=this.$docRowCache[D],P=s>I[T-1];else var P=!T;for(var M=this.getLength()-1,W=this.getNextFoldLine(C),N=W?W.start.row:1/0;_<=s&&(O=this.getRowLength(C),!(_+O>s||C>=M));)_+=O,C++,C>N&&(C=W.end.row+1,W=this.getNextFoldLine(C,W),N=W?W.start.row:1/0),P&&(this.$docRowCache.push(C),this.$screenRowCache.push(_));if(W&&W.start.row<=C)x=this.getFoldDisplayLine(W),C=W.start.row;else{if(_+O<=s||C>M)return{row:M,column:this.getLine(M).length};x=this.getLine(C),W=null}var G=0,z=Math.floor(s-_);if(this.$useWrapMode){var J=this.$wrapData[C];J&&(R=J[z],z>0&&J.length&&(G=J.indent,k=J[z-1]||J[J.length-1],x=x.substring(k)))}return $!==void 0&&this.$bidiHandler.isBidiRow(_+z,C,z)&&(v=this.$bidiHandler.offsetToCol($)),k+=this.$getStringScreenWidth(x,v-G)[1],this.$useWrapMode&&k>=R&&(k=R-1),W?W.idxToPosition(k):{row:C,column:k}},this.documentToScreenPosition=function(s,v){if(typeof v>"u")var $=this.$clipPositionToDocument(s.row,s.column);else $=this.$clipPositionToDocument(s,v);s=$.row,v=$.column;var x=0,C=null,k=null;k=this.getFoldAt(s,v,1),k&&(s=k.start.row,v=k.start.column);var R,_=0,O=this.$docRowCache,I=this.$getRowCacheIndex(O,s),D=O.length;if(D&&I>=0)var _=O[I],x=this.$screenRowCache[I],T=s>O[D-1];else var T=!D;for(var P=this.getNextFoldLine(_),M=P?P.start.row:1/0;_=M){if(R=P.end.row+1,R>s)break;P=this.getNextFoldLine(R,P),M=P?P.start.row:1/0}else R=_+1;x+=this.getRowLength(_),_=R,T&&(this.$docRowCache.push(_),this.$screenRowCache.push(x))}var W="";P&&_>=M?(W=this.getFoldDisplayLine(P,s,v),C=P.start.row):(W=this.getLine(s).substring(0,v),C=s);var N=0;if(this.$useWrapMode){var G=this.$wrapData[C];if(G){for(var z=0;W.length>=G[z];)x++,z++;W=W.substring(G[z-1]||0,W.length),N=z>0?G.indent:0}}return this.lineWidgets&&this.lineWidgets[_]&&this.lineWidgets[_].rowsAbove&&(x+=this.lineWidgets[_].rowsAbove),{row:x,column:N+this.$getStringScreenWidth(W)[0]}},this.documentToScreenColumn=function(s,v){return this.documentToScreenPosition(s,v).column},this.documentToScreenRow=function(s,v){return this.documentToScreenPosition(s,v).row},this.getScreenLength=function(){var s=0,v=null;if(this.$useWrapMode)for(var C=this.$wrapData.length,k=0,x=0,v=this.$foldData[x++],R=v?v.start.row:1/0;kR&&(k=v.end.row+1,v=this.$foldData[x++],R=v?v.start.row:1/0)}else{s=this.getLength();for(var $=this.$foldData,x=0;x<$.length;x++)v=$[x],s-=v.end.row-v.start.row}return this.lineWidgets&&(s+=this.$getWidgetScreenLength()),s},this.$setFontMetrics=function(s){this.$enableVarChar&&(this.$getStringScreenWidth=function(v,$,x){if($===0)return[0,0];$||($=1/0),x=x||0;var C,k;for(k=0;k$));k++);return[x,k]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.selection.detach()},this.isFullWidth=f;function f(s){return s<4352?!1:s>=4352&&s<=4447||s>=4515&&s<=4519||s>=4602&&s<=4607||s>=9001&&s<=9002||s>=11904&&s<=11929||s>=11931&&s<=12019||s>=12032&&s<=12245||s>=12272&&s<=12283||s>=12288&&s<=12350||s>=12353&&s<=12438||s>=12441&&s<=12543||s>=12549&&s<=12589||s>=12593&&s<=12686||s>=12688&&s<=12730||s>=12736&&s<=12771||s>=12784&&s<=12830||s>=12832&&s<=12871||s>=12880&&s<=13054||s>=13056&&s<=19903||s>=19968&&s<=42124||s>=42128&&s<=42182||s>=43360&&s<=43388||s>=44032&&s<=55203||s>=55216&&s<=55238||s>=55243&&s<=55291||s>=63744&&s<=64255||s>=65040&&s<=65049||s>=65072&&s<=65106||s>=65108&&s<=65126||s>=65128&&s<=65131||s>=65281&&s<=65376||s>=65504&&s<=65510}}.call(m.prototype),L("./edit_session/folding").Folding.call(m.prototype),L("./edit_session/bracket_match").BracketMatch.call(m.prototype),h.defineOptions(m.prototype,"session",{wrap:{set:function(w){if(!w||w=="off"?w=!1:w=="free"?w=!0:w=="printMargin"?w=-1:typeof w=="string"&&(w=parseInt(w,10)||!1),this.$wrap!=w)if(this.$wrap=w,!w)this.setUseWrapMode(!1);else{var S=typeof w=="number"?w:null;this.setWrapLimitRange(S,S),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(w){w=w=="auto"?this.$mode.type!="text":w!="text",w!=this.$wrapAsCode&&(this.$wrapAsCode=w,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(w){this.$useWorker=w,this.$stopWorker(),w&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(w){w=parseInt(w),w>0&&this.$tabSize!==w&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=w,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(w){this.setFoldStyle(w)},handlesSet:!0},overwrite:{set:function(w){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(w){this.doc.setNewLineMode(w)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(w){this.setMode(w)},get:function(){return this.$modeId},handlesSet:!0}}),b.EditSession=m}),define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(L,b,B){"use strict";var E=L("./lib/lang"),A=L("./lib/oop"),p=L("./range").Range,h=function(){this.$options={}};(function(){this.set=function(t){return A.mixin(this.$options,t),this},this.getOptions=function(){return E.copyObject(this.$options)},this.setOptions=function(t){this.$options=t},this.find=function(t){var e=this.$options,i=this.$matchIterator(t,e);if(!i)return!1;var r=null;return i.forEach(function(n,o,m,w){return r=new p(n,o,m,w),o==w&&e.start&&e.start.start&&e.skipCurrent!=!1&&r.isEqual(e.start)?(r=null,!1):!0}),r},this.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var i=e.range,r=i?t.getLines(i.start.row,i.end.row):t.doc.getAllLines(),n=[],o=e.re;if(e.$isMultiLine){var m=o.length,w=r.length-m,S;e:for(var y=o.offset||0;y<=w;y++){for(var c=0;cd||(n.push(S=new p(y,d,y+m-1,a)),m>2&&(y=y+m-2))}}else for(var f=0;fx&&n[c].end.row==i.end.row;)c--;for(n=n.slice(f,c+1),f=0,c=n.length;f0)){var o=A(h,r.start);return n===0?u&&o!==0?-i-2:i:o>0||o===0&&!u?i:-i-1}}return-i-1},this.add=function(h){var u=!h.isEmpty(),t=this.pointIndex(h.start,u);t<0&&(t=-t-1);var e=this.pointIndex(h.end,u,t);return e<0?e=-e-1:e++,this.ranges.splice(t,e-t,h)},this.addList=function(h){for(var u=[],t=h.length;t--;)u.push.apply(u,this.add(h[t]));return u},this.substractPoint=function(h){var u=this.pointIndex(h);if(u>=0)return this.ranges.splice(u,1)},this.merge=function(){var h=[],u=this.ranges;u=u.sort(function(n,o){return A(n.start,o.start)});for(var t=u[0],e,i=1;i=0},this.containsPoint=function(h){return this.pointIndex(h)>=0},this.rangeAtPoint=function(h){var u=this.pointIndex(h);if(u>=0)return this.ranges[u]},this.clipRows=function(h,u){var t=this.ranges;if(t[0].start.row>u||t[t.length-1].start.row=e)break}if(h.action=="insert")for(var w=i-e,S=-u.column+t.column;ne)break;if(m.start.row==e&&m.start.column>=u.column&&(m.start.column==u.column&&this.$bias<=0||(m.start.column+=S,m.start.row+=w)),m.end.row==e&&m.end.column>=u.column){if(m.end.column==u.column&&this.$bias<0)continue;m.end.column==u.column&&S>0&&nm.start.column&&m.end.column==r[n+1].start.column&&(m.end.column-=S),m.end.column+=S,m.end.row+=w}}else for(var w=e-i,S=u.column-t.column;ni)break;m.end.rowu.column)&&(m.end.column=u.column,m.end.row=u.row):(m.end.column+=S,m.end.row+=w):m.end.row>i&&(m.end.row+=w),m.start.rowu.column)&&(m.start.column=u.column,m.start.row=u.row):(m.start.column+=S,m.start.row+=w):m.start.row>i&&(m.start.row+=w)}if(w!=0&&n=t)return n;if(n.end.row>t)return null}return null},this.getNextFoldLine=function(t,e){var i=this.$foldData,r=0;for(e&&(r=i.indexOf(e)),r==-1&&(r=0),r;r=t)return n}return null},this.getFoldedRowCount=function(t,e){for(var i=this.$foldData,r=e-t+1,n=0;n=e){w=t?r-=e-w:r=0);break}else m>=t&&(w>=t?r-=m-w:r-=m-t+1)}return r},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort(function(e,i){return e.start.row-i.start.row}),t},this.addFold=function(t,e){var i=this.$foldData,r=!1,n;t instanceof p?n=t:(n=new p(e,t),n.collapseChildren=e.collapseChildren),this.$clipRangeToDocument(n.range);var o=n.start.row,m=n.start.column,w=n.end.row,S=n.end.column,y=this.getFoldAt(o,m,1),c=this.getFoldAt(w,S,-1);if(y&&c==y)return y.addSubFold(n);y&&!y.range.isStart(o,m)&&this.removeFold(y),c&&!c.range.isEnd(w,S)&&this.removeFold(c);var l=this.getFoldsInRange(n.range);l.length>0&&(this.removeFolds(l),n.collapseChildren||l.forEach(function(f){n.addSubFold(f)}));for(var g=0;g0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(t,e){var i,r;if(t==null?(i=new E(0,0,this.getLength(),0),e==null&&(e=!0)):typeof t=="number"?i=new E(t,0,t,this.getLine(t).length):"row"in t?i=E.fromPoints(t,t):i=t,r=this.getFoldsInRangeList(i),e!=!1?this.removeFolds(r):this.expandFolds(r),r.length)return r},this.isRowFolded=function(t,e){return!!this.getFoldLine(t,e)},this.getRowFoldEnd=function(t,e){var i=this.getFoldLine(t,e);return i?i.end.row:t},this.getRowFoldStart=function(t,e){var i=this.getFoldLine(t,e);return i?i.start.row:t},this.getFoldDisplayLine=function(t,e,i,r,n){r==null&&(r=t.start.row),n==null&&(n=0),e==null&&(e=t.end.row),i==null&&(i=this.getLine(e).length);var o=this.doc,m="";return t.walk(function(w,S,y,c){if(!(SS)break;while(n&&m.test(n.type));n=r.stepBackward()}else n=r.getCurrentToken();return w.end.row=r.getCurrentTokenRow(),w.end.column=r.getCurrentTokenColumn()+n.value.length-2,w}},this.foldAll=function(t,e,i,r){i==null&&(i=1e5);var n=this.foldWidgets;if(n){e=e||this.getLength(),t=t||0;for(var o=t;o=t&&(o=m.end.row,m.collapseChildren=i,this.addFold("...",m))}}},this.foldToLevel=function(t){for(this.foldAll();t-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var t=this;this.foldAll(null,null,null,function(e){for(var i=t.getTokens(e),r=0;r=0;){var o=i[r];if(o==null&&(o=i[r]=this.getFoldWidget(r)),o=="start"){var m=this.getFoldWidgetRange(r);if(n||(n=m),m&&m.end.row>=t)break}r--}return{range:r!==-1&&m,firstRange:n}},this.onFoldWidgetClick=function(t,e){e=e.domEvent;var i={children:e.shiftKey,all:e.ctrlKey||e.metaKey,siblings:e.altKey},r=this.$toggleFoldWidget(t,i);if(!r){var n=e.target||e.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(t,e){if(this.getFoldWidget){var i=this.getFoldWidget(t),r=this.getLine(t),n=i==="end"?-1:1,o=this.getFoldAt(t,n===-1?0:r.length,n);if(o)return e.children||e.all?this.removeFold(o):this.expandFold(o),o;var m=this.getFoldWidgetRange(t,!0);if(m&&!m.isMultiLine()&&(o=this.getFoldAt(m.start.row,m.start.column,1),o&&m.isEqual(o.range)))return this.removeFold(o),o;if(e.siblings){var w=this.getParentFoldRangeData(t);if(w.range)var S=w.range.start.row+1,y=w.range.end.row;this.foldAll(S,y,e.all?1e4:0)}else e.children?(y=m?m.end.row:this.getLength(),this.foldAll(t+1,y,e.all?1e4:0)):m&&(e.all&&(m.collapseChildren=1e4),this.addFold("...",m));return m}},this.toggleFoldWidget=function(t){var e=this.selection.getCursor().row;e=this.getRowFoldStart(e);var i=this.$toggleFoldWidget(e,{});if(!i){var r=this.getParentFoldRangeData(e,!0);if(i=r.range||r.firstRange,i){e=i.start.row;var n=this.getFoldAt(e,this.getLine(e).length,1);n?this.removeFold(n):this.addFold("...",i)}}},this.updateFoldWidgets=function(t){var e=t.start.row,i=t.end.row-e;if(i===0)this.foldWidgets[e]=null;else if(t.action=="remove")this.foldWidgets.splice(e,i+1,null);else{var r=Array(i+1);r.unshift(e,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(t){var e=t.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}b.Folding=u}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(L,b,B){"use strict";var E=L("../token_iterator").TokenIterator,A=L("../range").Range;function p(){this.findMatchingBracket=function(h,u){if(h.column==0)return null;var t=u||this.getLine(h.row).charAt(h.column-1);if(t=="")return null;var e=t.match(/([\(\[\{])|([\)\]\}])/);return e?e[1]?this.$findClosingBracket(e[1],h):this.$findOpeningBracket(e[2],h):null},this.getBracketRange=function(h){var u=this.getLine(h.row),t=!0,e,i=u.charAt(h.column-1),r=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(r||(i=u.charAt(h.column),h={row:h.row,column:h.column+1},r=i&&i.match(/([\(\[\{])|([\)\]\}])/),t=!1),!r)return null;if(r[1]){var n=this.$findClosingBracket(r[1],h);if(!n)return null;e=A.fromPoints(h,n),t||(e.end.column++,e.start.column--),e.cursor=e.end}else{var n=this.$findOpeningBracket(r[2],h);if(!n)return null;e=A.fromPoints(n,h),t||(e.start.column++,e.end.column--),e.cursor=e.start}return e},this.getMatchingBracketRanges=function(h){var u=this.getLine(h.row),t=u.charAt(h.column-1),e=t&&t.match(/([\(\[\{])|([\)\]\}])/);if(e||(t=u.charAt(h.column),h={row:h.row,column:h.column+1},e=t&&t.match(/([\(\[\{])|([\)\]\}])/)),!e)return null;var i=new A(h.row,h.column-1,h.row,h.column),r=e[1]?this.$findClosingBracket(e[1],h):this.$findOpeningBracket(e[2],h);if(!r)return[i];var n=new A(r.row,r.column,r.row,r.column+1);return[i,n]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,u,t){var e=this.$brackets[h],i=1,r=new E(this,u.row,u.column),n=r.getCurrentToken();if(n||(n=r.stepForward()),!!n){t||(t=new RegExp("(\\.?"+n.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var o=u.column-r.getCurrentTokenColumn()-2,m=n.value;;){for(;o>=0;){var w=m.charAt(o);if(w==e){if(i-=1,i==0)return{row:r.getCurrentTokenRow(),column:o+r.getCurrentTokenColumn()}}else w==h&&(i+=1);o-=1}do n=r.stepBackward();while(n&&!t.test(n.type));if(n==null)break;m=n.value,o=m.length-1}return null}},this.$findClosingBracket=function(h,u,t){var e=this.$brackets[h],i=1,r=new E(this,u.row,u.column),n=r.getCurrentToken();if(n||(n=r.stepForward()),!!n){t||(t=new RegExp("(\\.?"+n.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var o=u.column-r.getCurrentTokenColumn();;){for(var m=n.value,w=m.length;o$&&(this.$docRowCache.splice($,v),this.$screenRowCache.splice($,v))},this.$getRowCacheIndex=function(s,v){for(var $=0,x=s.length-1;$<=x;){var C=$+x>>1,k=s[C];if(v>k)$=C+1;else if(v=v));k++);return x=$[k],x?(x.index=k,x.start=C-x.value.length,x):null},this.setUndoManager=function(s){if(this.$undoManager=s,this.$informUndoManager&&this.$informUndoManager.cancel(),s){var v=this;s.addSession(this),this.$syncInformUndoManager=function(){v.$informUndoManager.cancel(),v.mergeUndoDeltas=!1},this.$informUndoManager=A.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?A.stringRepeat(" ",this.getTabSize()):" "},this.setUseSoftTabs=function(s){this.setOption("useSoftTabs",s)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(s){this.setOption("tabSize",s)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(s){return this.$useSoftTabs&&s.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(s){this.setOption("navigateWithinSoftTabs",s)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(s){this.setOption("overwrite",s)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(s,v){this.$decorations[s]||(this.$decorations[s]=""),this.$decorations[s]+=" "+v,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(s,v){this.$decorations[s]=(this.$decorations[s]||"").replace(" "+v,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(s){this.$breakpoints=[];for(var v=0;v0&&(x=!!$.charAt(v-1).match(this.tokenRe)),x||(x=!!$.charAt(v).match(this.tokenRe)),x)var C=this.tokenRe;else if(/^\s+$/.test($.slice(v-1,v+1)))var C=/\s/;else var C=this.nonTokenRe;var k=v;if(k>0){do k--;while(k>=0&&$.charAt(k).match(C));k++}for(var R=v;R<$.length&&$.charAt(R).match(C);)R++;return new i(s,k,s,R)},this.getAWordRange=function(s,v){for(var $=this.getWordRange(s,v),x=this.getLine($.end.row);x.charAt($.end.column).match(/[ \t]/);)$.end.column+=1;return $},this.setNewLineMode=function(s){this.doc.setNewLineMode(s)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(s){this.setOption("useWorker",s)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(s){var v=s.data;this.bgTokenizer.start(v.first),this._signal("tokenizerUpdate",s)},this.$modes=h.$modes,this.$mode=null,this.$modeId=null,this.setMode=function(s,v){if(s&&typeof s=="object"){if(s.getTokenizer)return this.$onChangeMode(s);var $=s,x=$.path}else x=s||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new e),this.$modes[x]&&!$){this.$onChangeMode(this.$modes[x]),v&&v();return}this.$modeId=x,h.loadModule(["mode",x],function(C){if(this.$modeId!==x)return v&&v();this.$modes[x]&&!$?this.$onChangeMode(this.$modes[x]):C&&C.Mode&&(C=new C.Mode($),$||(this.$modes[x]=C,C.$id=x),this.$onChangeMode(C)),v&&v()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(s,v){if(v||(this.$modeId=s.$id),this.$mode!==s){var $=this.$mode;this.$mode=s,this.$stopWorker(),this.$useWorker&&this.$startWorker();var x=s.getTokenizer();if(x.on!==void 0){var C=this.onReloadTokenizer.bind(this);x.on("update",C)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(x);else{this.bgTokenizer=new n(x);var k=this;this.bgTokenizer.on("update",function(R){k._signal("tokenizerUpdate",R)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=s.tokenRe,this.nonTokenRe=s.nonTokenRe,v||(s.attachToSession&&s.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(s.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:$,mode:s}))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(s){h.warn("Could not load worker",s),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(s){this.$scrollTop===s||isNaN(s)||(this.$scrollTop=s,this._signal("changeScrollTop",s))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(s){this.$scrollLeft===s||isNaN(s)||(this.$scrollLeft=s,this._signal("changeScrollLeft",s))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var s=0;return this.lineWidgets.forEach(function(v){v&&v.screenWidth>s&&(s=v.screenWidth)}),this.lineWidgetWidth=s},this.$computeWidth=function(s){if(this.$modified||s){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var v=this.doc.getAllLines(),$=this.$rowLengthCache,x=0,C=0,k=this.$foldData[C],R=k?k.start.row:1/0,_=v.length,O=0;O<_;O++){if(O>R){if(O=k.end.row+1,O>=_)break;k=this.$foldData[C++],R=k?k.start.row:1/0}$[O]==null&&($[O]=this.$getStringScreenWidth(v[O])[0]),$[O]>x&&(x=$[O])}this.screenWidth=x}},this.getLine=function(s){return this.doc.getLine(s)},this.getLines=function(s,v){return this.doc.getLines(s,v)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(s){return this.doc.getTextRange(s||this.selection.getRange())},this.insert=function(s,v){return this.doc.insert(s,v)},this.remove=function(s){return this.doc.remove(s)},this.removeFullLines=function(s,v){return this.doc.removeFullLines(s,v)},this.undoChanges=function(s,v){if(s.length){this.$fromUndo=!0;for(var $=s.length-1;$!=-1;$--){var x=s[$];x.action=="insert"||x.action=="remove"?this.doc.revertDelta(x):x.folds&&this.addFolds(x.folds)}!v&&this.$undoSelect&&(s.selectionBefore?this.selection.fromJSON(s.selectionBefore):this.selection.setRange(this.$getUndoSelection(s,!0))),this.$fromUndo=!1}},this.redoChanges=function(s,v){if(s.length){this.$fromUndo=!0;for(var $=0;$s.end.column&&(k.start.column+=_),k.end.row==s.end.row&&k.end.column>s.end.column&&(k.end.column+=_)),R&&k.start.row>=s.end.row&&(k.start.row+=R,k.end.row+=R)}if(k.end=this.insert(k.start,x),C.length){var O=s.start,I=k.start,R=I.row-O.row,_=I.column-O.column;this.addFolds(C.map(function(P){return P=P.clone(),P.start.row==O.row&&(P.start.column+=_),P.end.row==O.row&&(P.end.column+=_),P.start.row+=R,P.end.row+=R,P}))}return k},this.indentRows=function(s,v,$){$=$.replace(/\t/g,this.getTabString());for(var x=s;x<=v;x++)this.doc.insertInLine({row:x,column:0},$)},this.outdentRows=function(s){for(var v=s.collapseRows(),$=new i(0,0,0,0),x=this.getTabSize(),C=v.start.row;C<=v.end.row;++C){var k=this.getLine(C);$.start.row=C,$.end.row=C;for(var R=0;R0){var x=this.getRowFoldEnd(v+$);if(x>this.doc.getLength()-1)return 0;var C=x-v}else{s=this.$clipRowToDocument(s),v=this.$clipRowToDocument(v);var C=v-s+1}var k=new i(s,0,v,Number.MAX_VALUE),R=this.getFoldsInRange(k).map(function(O){return O=O.clone(),O.start.row+=C,O.end.row+=C,O}),_=$==0?this.doc.getLines(s,v):this.doc.removeFullLines(s,v);return this.doc.insertFullLines(s+C,_),R.length&&this.addFolds(R),C},this.moveLinesUp=function(s,v){return this.$moveLines(s,v,-1)},this.moveLinesDown=function(s,v){return this.$moveLines(s,v,1)},this.duplicateLines=function(s,v){return this.$moveLines(s,v,0)},this.$clipRowToDocument=function(s){return Math.max(0,Math.min(s,this.doc.getLength()-1))},this.$clipColumnToRow=function(s,v){return v<0?0:Math.min(this.doc.getLine(s).length,v)},this.$clipPositionToDocument=function(s,v){if(v=Math.max(0,v),s<0)s=0,v=0;else{var $=this.doc.getLength();s>=$?(s=$-1,v=this.doc.getLine($-1).length):v=Math.min(this.doc.getLine(s).length,v)}return{row:s,column:v}},this.$clipRangeToDocument=function(s){s.start.row<0?(s.start.row=0,s.start.column=0):s.start.column=this.$clipColumnToRow(s.start.row,s.start.column);var v=this.doc.getLength()-1;return s.end.row>v?(s.end.row=v,s.end.column=this.doc.getLine(v).length):s.end.column=this.$clipColumnToRow(s.end.row,s.end.column),s},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(s){if(s!=this.$useWrapMode){if(this.$useWrapMode=s,this.$modified=!0,this.$resetRowCache(0),s){var v=this.getLength();this.$wrapData=Array(v),this.$updateWrapData(0,v-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(s,v){(this.$wrapLimitRange.min!==s||this.$wrapLimitRange.max!==v)&&(this.$wrapLimitRange={min:s,max:v},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(s,v){var $=this.$wrapLimitRange;$.max<0&&($={min:v,max:v});var x=this.$constrainWrapLimit(s,$.min,$.max);return x!=this.$wrapLimit&&x>1?(this.$wrapLimit=x,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(s,v,$){return v&&(s=Math.max(v,s)),$&&(s=Math.min($,s)),s},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(s){this.setWrapLimitRange(s,s)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(s){var v=this.$useWrapMode,$=s.action,x=s.start,C=s.end,k=x.row,R=C.row,_=R-k,O=null;if(this.$updating=!0,_!=0)if($==="remove"){this[v?"$wrapData":"$rowLengthCache"].splice(k,_);var I=this.$foldData;O=this.getFoldsInRange(s),this.removeFolds(O);var D=this.getFoldLine(C.row),T=0;if(D){D.addRemoveChars(C.row,C.column,x.column-C.column),D.shiftRow(-_);var P=this.getFoldLine(k);P&&P!==D&&(P.merge(D),D=P),T=I.indexOf(D)+1}for(T;T=C.row&&D.shiftRow(-_)}R=k}else{var M=Array(_);M.unshift(k,0);var W=v?this.$wrapData:this.$rowLengthCache;W.splice.apply(W,M);var I=this.$foldData,D=this.getFoldLine(k),T=0;if(D){var N=D.range.compareInside(x.row,x.column);N==0?(D=D.split(x.row,x.column),D&&(D.shiftRow(_),D.addRemoveChars(R,0,C.column-x.column))):N==-1&&(D.addRemoveChars(k,0,C.column-x.column),D.shiftRow(_)),T=I.indexOf(D)+1}for(T;T=k&&D.shiftRow(_)}}else{_=Math.abs(s.start.column-s.end.column),$==="remove"&&(O=this.getFoldsInRange(s),this.removeFolds(O),_=-_);var D=this.getFoldLine(k);D&&D.addRemoveChars(k,x.column,_)}return v&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,v?this.$updateWrapData(k,R):this.$updateRowLengthCache(k,R),O},this.$updateRowLengthCache=function(s,v,$){this.$rowLengthCache[s]=null,this.$rowLengthCache[v]=null},this.$updateWrapData=function(s,v){var $=this.doc.getAllLines(),x=this.getTabSize(),C=this.$wrapData,k=this.$wrapLimit,R,_,O=s;for(v=Math.min(v,$.length-1);O<=v;)_=this.getFoldLine(O,_),_?(R=[],_.walk(function(I,D,T,P){var M;if(I!=null){M=this.$getDisplayTokens(I,R.length),M[0]=y;for(var W=1;Wv-P;){var M=k+v-P;if(s[M-1]>=g&&s[M]>=g){T(M);continue}if(s[M]==y||s[M]==c){for(M;M!=k-1&&s[M]!=y;M--);if(M>k){T(M);continue}for(M=k+v,M;M>2)),k-1);M>W&&s[M]W&&s[M]W&&s[M]==l;)M--}else for(;M>W&&s[M]W){T(++M);continue}M=k+v,s[M]==S&&M--,T(M-P)}return x},this.$getDisplayTokens=function(s,v){var $=[],x;v=v||0;for(var C=0;C39&&k<48||k>57&&k<64?$.push(l):k>=4352&&f(k)?$.push(w,S):$.push(w)}return $},this.$getStringScreenWidth=function(s,v,$){if(v==0)return[0,0];v==null&&(v=1/0),$=$||0;var x,C;for(C=0;C=4352&&f(x)?$+=2:$+=1,!($>v));C++);return[$,C]},this.lineWidgets=null,this.getRowLength=function(s){var v=1;return this.lineWidgets&&(v+=this.lineWidgets[s]&&this.lineWidgets[s].rowCount||0),!this.$useWrapMode||!this.$wrapData[s]?v:this.$wrapData[s].length+v},this.getRowLineCount=function(s){return!this.$useWrapMode||!this.$wrapData[s]?1:this.$wrapData[s].length+1},this.getRowWrapIndent=function(s){if(this.$useWrapMode){var v=this.screenToDocumentPosition(s,Number.MAX_VALUE),$=this.$wrapData[v.row];return $.length&&$[0]=0)var _=I[D],C=this.$docRowCache[D],P=s>I[T-1];else var P=!T;for(var M=this.getLength()-1,W=this.getNextFoldLine(C),N=W?W.start.row:1/0;_<=s&&(O=this.getRowLength(C),!(_+O>s||C>=M));)_+=O,C++,C>N&&(C=W.end.row+1,W=this.getNextFoldLine(C,W),N=W?W.start.row:1/0),P&&(this.$docRowCache.push(C),this.$screenRowCache.push(_));if(W&&W.start.row<=C)x=this.getFoldDisplayLine(W),C=W.start.row;else{if(_+O<=s||C>M)return{row:M,column:this.getLine(M).length};x=this.getLine(C),W=null}var G=0,z=Math.floor(s-_);if(this.$useWrapMode){var J=this.$wrapData[C];J&&(R=J[z],z>0&&J.length&&(G=J.indent,k=J[z-1]||J[J.length-1],x=x.substring(k)))}return $!==void 0&&this.$bidiHandler.isBidiRow(_+z,C,z)&&(v=this.$bidiHandler.offsetToCol($)),k+=this.$getStringScreenWidth(x,v-G)[1],this.$useWrapMode&&k>=R&&(k=R-1),W?W.idxToPosition(k):{row:C,column:k}},this.documentToScreenPosition=function(s,v){if(typeof v>"u")var $=this.$clipPositionToDocument(s.row,s.column);else $=this.$clipPositionToDocument(s,v);s=$.row,v=$.column;var x=0,C=null,k=null;k=this.getFoldAt(s,v,1),k&&(s=k.start.row,v=k.start.column);var R,_=0,O=this.$docRowCache,I=this.$getRowCacheIndex(O,s),D=O.length;if(D&&I>=0)var _=O[I],x=this.$screenRowCache[I],T=s>O[D-1];else var T=!D;for(var P=this.getNextFoldLine(_),M=P?P.start.row:1/0;_=M){if(R=P.end.row+1,R>s)break;P=this.getNextFoldLine(R,P),M=P?P.start.row:1/0}else R=_+1;x+=this.getRowLength(_),_=R,T&&(this.$docRowCache.push(_),this.$screenRowCache.push(x))}var W="";P&&_>=M?(W=this.getFoldDisplayLine(P,s,v),C=P.start.row):(W=this.getLine(s).substring(0,v),C=s);var N=0;if(this.$useWrapMode){var G=this.$wrapData[C];if(G){for(var z=0;W.length>=G[z];)x++,z++;W=W.substring(G[z-1]||0,W.length),N=z>0?G.indent:0}}return this.lineWidgets&&this.lineWidgets[_]&&this.lineWidgets[_].rowsAbove&&(x+=this.lineWidgets[_].rowsAbove),{row:x,column:N+this.$getStringScreenWidth(W)[0]}},this.documentToScreenColumn=function(s,v){return this.documentToScreenPosition(s,v).column},this.documentToScreenRow=function(s,v){return this.documentToScreenPosition(s,v).row},this.getScreenLength=function(){var s=0,v=null;if(this.$useWrapMode)for(var C=this.$wrapData.length,k=0,x=0,v=this.$foldData[x++],R=v?v.start.row:1/0;kR&&(k=v.end.row+1,v=this.$foldData[x++],R=v?v.start.row:1/0)}else{s=this.getLength();for(var $=this.$foldData,x=0;x<$.length;x++)v=$[x],s-=v.end.row-v.start.row}return this.lineWidgets&&(s+=this.$getWidgetScreenLength()),s},this.$setFontMetrics=function(s){this.$enableVarChar&&(this.$getStringScreenWidth=function(v,$,x){if($===0)return[0,0];$||($=1/0),x=x||0;var C,k;for(k=0;k$));k++);return[x,k]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.selection.detach()},this.isFullWidth=f;function f(s){return s<4352?!1:s>=4352&&s<=4447||s>=4515&&s<=4519||s>=4602&&s<=4607||s>=9001&&s<=9002||s>=11904&&s<=11929||s>=11931&&s<=12019||s>=12032&&s<=12245||s>=12272&&s<=12283||s>=12288&&s<=12350||s>=12353&&s<=12438||s>=12441&&s<=12543||s>=12549&&s<=12589||s>=12593&&s<=12686||s>=12688&&s<=12730||s>=12736&&s<=12771||s>=12784&&s<=12830||s>=12832&&s<=12871||s>=12880&&s<=13054||s>=13056&&s<=19903||s>=19968&&s<=42124||s>=42128&&s<=42182||s>=43360&&s<=43388||s>=44032&&s<=55203||s>=55216&&s<=55238||s>=55243&&s<=55291||s>=63744&&s<=64255||s>=65040&&s<=65049||s>=65072&&s<=65106||s>=65108&&s<=65126||s>=65128&&s<=65131||s>=65281&&s<=65376||s>=65504&&s<=65510}}).call(m.prototype),L("./edit_session/folding").Folding.call(m.prototype),L("./edit_session/bracket_match").BracketMatch.call(m.prototype),h.defineOptions(m.prototype,"session",{wrap:{set:function(w){if(!w||w=="off"?w=!1:w=="free"?w=!0:w=="printMargin"?w=-1:typeof w=="string"&&(w=parseInt(w,10)||!1),this.$wrap!=w)if(this.$wrap=w,!w)this.setUseWrapMode(!1);else{var S=typeof w=="number"?w:null;this.setWrapLimitRange(S,S),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(w){w=w=="auto"?this.$mode.type!="text":w!="text",w!=this.$wrapAsCode&&(this.$wrapAsCode=w,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(w){this.$useWorker=w,this.$stopWorker(),w&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(w){w=parseInt(w),w>0&&this.$tabSize!==w&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=w,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(w){this.setFoldStyle(w)},handlesSet:!0},overwrite:{set:function(w){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(w){this.doc.setNewLineMode(w)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(w){this.setMode(w)},get:function(){return this.$modeId},handlesSet:!0}}),b.EditSession=m}),define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(L,b,B){"use strict";var E=L("./lib/lang"),A=L("./lib/oop"),p=L("./range").Range,h=function(){this.$options={}};(function(){this.set=function(t){return A.mixin(this.$options,t),this},this.getOptions=function(){return E.copyObject(this.$options)},this.setOptions=function(t){this.$options=t},this.find=function(t){var e=this.$options,i=this.$matchIterator(t,e);if(!i)return!1;var r=null;return i.forEach(function(n,o,m,w){return r=new p(n,o,m,w),o==w&&e.start&&e.start.start&&e.skipCurrent!=!1&&r.isEqual(e.start)?(r=null,!1):!0}),r},this.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var i=e.range,r=i?t.getLines(i.start.row,i.end.row):t.doc.getAllLines(),n=[],o=e.re;if(e.$isMultiLine){var m=o.length,w=r.length-m,S;e:for(var y=o.offset||0;y<=w;y++){for(var c=0;cd||(n.push(S=new p(y,d,y+m-1,a)),m>2&&(y=y+m-2))}}else for(var f=0;fx&&n[c].end.row==i.end.row;)c--;for(n=n.slice(f,c+1),f=0,c=n.length;f=w;d--)if(l(d,Number.MAX_VALUE,g))return;if(e.wrap!=!1){for(d=S,w=m.row;d>=w;d--)if(l(d,Number.MAX_VALUE,g))return}}};else var y=function(d){var a=m.row;if(!l(a,m.column,d)){for(a=a+1;a<=S;a++)if(l(a,0,d))return;if(e.wrap!=!1){for(a=w,S=m.row;a<=S;a++)if(l(a,0,d))return}}};if(e.$isMultiLine)var c=i.length,l=function(g,d,a){var f=r?g-c+1:g;if(!(f<0)){var s=t.getLine(f),v=s.search(i[0]);if(!(!r&&vd)&&a(f,v,f+c-1,x))return!0}}};else if(r)var l=function(d,a,f){var s=t.getLine(d),v=[],$,x=0;for(i.lastIndex=0;$=i.exec(s);){var C=$[0].length;if(x=$.index,!C){if(x>=s.length)break;i.lastIndex=x+=1}if($.index+C>a)break;v.push($.index,C)}for(var k=v.length-1;k>=0;k-=2){var R=v[k-1],C=v[k];if(f(d,R,d,R+C))return!0}};else var l=function(d,a,f){var s=t.getLine(d),v,$;for(i.lastIndex=a;$=i.exec(s);){var x=$[0].length;if(v=$.index,f(d,v,d,v+x))return!0;if(!x&&(i.lastIndex=v+=1,v>=s.length))return!1}};return{forEach:y}}}).call(h.prototype);function u(t,e){function i(r){return/\w/.test(r)||e.regExp?"\\b":""}return i(t[0])+t+i(t[t.length-1])}b.Search=h}),define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(L,b,B){"use strict";var E=L("../lib/keys"),A=L("../lib/useragent"),p=E.KEY_MODS;function h(t,e){this.platform=e||(A.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=!0}function u(t,e){h.call(this,t,e),this.$singleCommand=!1}u.prototype=h.prototype,function(){this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,i){var r=e&&(typeof e=="string"?e:e.name);e=this.commands[r],i||delete this.commands[r];var n=this.commandKeyBinding;for(var o in n){var m=n[o];if(m==e)delete n[o];else if(Array.isArray(m)){var w=m.indexOf(e);w!=-1&&(m.splice(w,1),m.length==1&&(n[o]=m[0]))}}},this.bindKey=function(e,i,r){if(typeof e=="object"&&e&&(r==null&&(r=e.position),e=e[this.platform]),!!e){if(typeof i=="function")return this.addCommand({exec:i,bindKey:e,name:i.name||e});e.split("|").forEach(function(n){var o="";if(n.indexOf(" ")!=-1){var m=n.split(/\s+/);n=m.pop(),m.forEach(function(y){var c=this.parseKeys(y),l=p[c.hashId]+c.key;o+=(o?" ":"")+l,this._addCommandToBinding(o,"chainKeys")},this),o+=" "}var w=this.parseKeys(n),S=p[w.hashId]+w.key;this._addCommandToBinding(o+S,i,r)},this)}};function t(e){return typeof e=="object"&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this._addCommandToBinding=function(e,i,r){var n=this.commandKeyBinding,o;if(!i)delete n[e];else if(!n[e]||this.$singleCommand)n[e]=i;else{Array.isArray(n[e])?(o=n[e].indexOf(i))!=-1&&n[e].splice(o,1):n[e]=[n[e]],typeof r!="number"&&(r=t(i));var m=n[e];for(o=0;or)break}m.splice(o,0,i)}},this.addCommands=function(e){e&&Object.keys(e).forEach(function(i){var r=e[i];if(r){if(typeof r=="string")return this.bindKey(r,i);typeof r=="function"&&(r={exec:r}),typeof r=="object"&&(r.name||(r.name=i),this.addCommand(r))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(i){this.removeCommand(e[i])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(i){this.bindKey(i,e[i])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var i=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(S){return S}),r=i.pop(),n=E[r];if(E.FUNCTION_KEYS[n])r=E.FUNCTION_KEYS[n].toLowerCase();else if(i.length){if(i.length==1&&i[0]=="shift")return{key:r.toUpperCase(),hashId:-1}}else return{key:r,hashId:-1};for(var o=0,m=i.length;m--;){var w=E.KEY_MODS[i[m]];if(w==null)return typeof console<"u"&&console.error("invalid modifier "+i[m]+" in "+e),!1;o|=w}return{key:r,hashId:o}},this.findKeyCommand=function(i,r){var n=p[i]+r;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,i,r,n){if(!(n<0)){var o=p[i]+r,m=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,m=this.commandKeyBinding[e.$keyChain]||m),m&&(m=="chainKeys"||m[m.length-1]=="chainKeys")?(e.$keyChain=e.$keyChain||o,{command:"null"}):(e.$keyChain&&((!i||i==4)&&r.length==1?e.$keyChain=e.$keyChain.slice(0,-o.length-1):(i==-1||n>0)&&(e.$keyChain="")),{command:m})}},this.getStatusText=function(e,i){return i.$keyChain||""}}.call(h.prototype),b.HashHandler=h,b.MultiHashHandler=u}),define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(L,b,B){"use strict";var E=L("../lib/oop"),A=L("../keyboard/hash_handler").MultiHashHandler,p=L("../lib/event_emitter").EventEmitter,h=function(u,t){A.call(this,t,u),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};E.inherits(h,A),function(){E.implement(this,p),this.exec=function(u,t,e){if(Array.isArray(u)){for(var i=u.length;i--;)if(this.exec(u[i],t,e))return!0;return!1}if(typeof u=="string"&&(u=this.commands[u]),!u||t&&t.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(t))return!1;var r={editor:t,command:u,args:e};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),r.returnValue!==!1},this.toggleRecording=function(u){if(!this.$inReplay)return u&&u._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(t){this.macro.push([t.command,t.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(u){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(u);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,u):this.exec(t[0],u,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(u){return u.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})}}.call(h.prototype),b.CommandManager=h}),define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(L,b,B){"use strict";var E=L("../lib/lang"),A=L("../config"),p=L("../range").Range;function h(t,e){return{win:t,mac:e}}b.commands=[{name:"showSettingsMenu",bindKey:h("Ctrl-,","Command-,"),exec:function(t){A.loadModule("ace/ext/settings_menu",function(e){e.init(t),t.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:h("Alt-E","F4"),exec:function(t){A.loadModule("./ext/error_marker",function(e){e.showErrorMarker(t,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:h("Alt-Shift-E","Shift-F4"),exec:function(t){A.loadModule("./ext/error_marker",function(e){e.showErrorMarker(t,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:h("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:h(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:h("Ctrl-L","Command-L"),exec:function(t,e){typeof e=="number"&&!isNaN(e)&&t.gotoLine(e),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:h("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:h("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:h("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:h("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:h("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:h("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:h("Ctrl-K","Command-G"),exec:function(t){t.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:h("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:h("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:h("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:h("Ctrl-F","Command-F"),exec:function(t){A.loadModule("ace/ext/searchbox",function(e){e.Search(t)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:h("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:h("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:h("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:h("Up","Up|Ctrl-P"),exec:function(t,e){t.navigateUp(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:h("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:h("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:h("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:h("Down","Down|Ctrl-N"),exec:function(t,e){t.navigateDown(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:h("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:h("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:h("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:h("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:h("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:h("Left","Left|Ctrl-B"),exec:function(t,e){t.navigateLeft(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:h("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:h("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:h("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:h("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:h("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:h("Right","Right|Ctrl-F"),exec:function(t,e){t.navigateRight(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:h(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:h("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:h(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:h("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:h("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:h("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:h("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:h("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:h("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:h("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:h(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(t){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var e=t.$copyWithEmptySelection&&t.selection.isEmpty(),i=e?t.selection.getLineRange():t.selection.getRange();t._emit("cut",i),i.isEmpty()||t.session.remove(i),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,e){t.$handlePaste(e)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:h("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:h("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:h("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:h("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:h("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:h("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:h("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:h("Ctrl-H","Command-Option-F"),exec:function(t){A.loadModule("ace/ext/searchbox",function(e){e.Search(t,!0)})}},{name:"undo",description:"Undo",bindKey:h("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:h("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:h("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:h("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:h("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:h("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:h("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:h("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:h("Shift-Delete",null),exec:function(t){if(t.selection.isEmpty())t.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:h("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:h("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:h("Ctrl-Shift-Backspace",null),exec:function(t){var e=t.selection.getRange();e.start.column=0,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:h("Ctrl-Shift-Delete",null),exec:function(t){var e=t.selection.getRange();e.end.column=Number.MAX_VALUE,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:h("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:h("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:h("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:h("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:h("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:h("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,e){t.insert(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,e){t.insert(E.stringRepeat(e.text||"",e.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:h(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:h("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:h("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:h("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:h(null,null),exec:function(t){t.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:h("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var e=t.selection.getRange();e.start.column=e.end.column=0,e.end.row++,t.selection.setRange(e,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:h(null,null),exec:function(t){for(var e=t.selection.isBackwards(),i=e?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),r=e?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),n=t.session.doc.getLine(i.row).length,o=t.session.doc.getTextRange(t.selection.getRange()),m=o.replace(/\n\s*/," ").length,w=t.session.doc.getLine(i.row),S=i.row+1;S<=r.row+1;S++){var y=E.stringTrimLeft(E.stringTrimRight(t.session.doc.getLine(S)));y.length!==0&&(y=" "+y),w+=y}r.row+10?(t.selection.moveCursorTo(i.row,i.column),t.selection.selectTo(i.row,i.column+m)):(n=t.session.doc.getLine(i.row).length>n?n+1:n,t.selection.moveCursorTo(i.row,n))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:h(null,null),exec:function(t){var e=t.session.doc.getLength()-1,i=t.session.doc.getLine(e).length,r=t.selection.rangeList.ranges,n=[];r.length<1&&(r=[t.selection.getRange()]);for(var o=0;o=w;d--)if(l(d,Number.MAX_VALUE,g))return;if(e.wrap!=!1){for(d=S,w=m.row;d>=w;d--)if(l(d,Number.MAX_VALUE,g))return}}};else var y=function(d){var a=m.row;if(!l(a,m.column,d)){for(a=a+1;a<=S;a++)if(l(a,0,d))return;if(e.wrap!=!1){for(a=w,S=m.row;a<=S;a++)if(l(a,0,d))return}}};if(e.$isMultiLine)var c=i.length,l=function(g,d,a){var f=r?g-c+1:g;if(!(f<0)){var s=t.getLine(f),v=s.search(i[0]);if(!(!r&&vd)&&a(f,v,f+c-1,x))return!0}}};else if(r)var l=function(d,a,f){var s=t.getLine(d),v=[],$,x=0;for(i.lastIndex=0;$=i.exec(s);){var C=$[0].length;if(x=$.index,!C){if(x>=s.length)break;i.lastIndex=x+=1}if($.index+C>a)break;v.push($.index,C)}for(var k=v.length-1;k>=0;k-=2){var R=v[k-1],C=v[k];if(f(d,R,d,R+C))return!0}};else var l=function(d,a,f){var s=t.getLine(d),v,$;for(i.lastIndex=a;$=i.exec(s);){var x=$[0].length;if(v=$.index,f(d,v,d,v+x))return!0;if(!x&&(i.lastIndex=v+=1,v>=s.length))return!1}};return{forEach:y}}}).call(h.prototype);function u(t,e){function i(r){return/\w/.test(r)||e.regExp?"\\b":""}return i(t[0])+t+i(t[t.length-1])}b.Search=h}),define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(L,b,B){"use strict";var E=L("../lib/keys"),A=L("../lib/useragent"),p=E.KEY_MODS;function h(t,e){this.platform=e||(A.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=!0}function u(t,e){h.call(this,t,e),this.$singleCommand=!1}u.prototype=h.prototype,(function(){this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,i){var r=e&&(typeof e=="string"?e:e.name);e=this.commands[r],i||delete this.commands[r];var n=this.commandKeyBinding;for(var o in n){var m=n[o];if(m==e)delete n[o];else if(Array.isArray(m)){var w=m.indexOf(e);w!=-1&&(m.splice(w,1),m.length==1&&(n[o]=m[0]))}}},this.bindKey=function(e,i,r){if(typeof e=="object"&&e&&(r==null&&(r=e.position),e=e[this.platform]),!!e){if(typeof i=="function")return this.addCommand({exec:i,bindKey:e,name:i.name||e});e.split("|").forEach(function(n){var o="";if(n.indexOf(" ")!=-1){var m=n.split(/\s+/);n=m.pop(),m.forEach(function(y){var c=this.parseKeys(y),l=p[c.hashId]+c.key;o+=(o?" ":"")+l,this._addCommandToBinding(o,"chainKeys")},this),o+=" "}var w=this.parseKeys(n),S=p[w.hashId]+w.key;this._addCommandToBinding(o+S,i,r)},this)}};function t(e){return typeof e=="object"&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this._addCommandToBinding=function(e,i,r){var n=this.commandKeyBinding,o;if(!i)delete n[e];else if(!n[e]||this.$singleCommand)n[e]=i;else{Array.isArray(n[e])?(o=n[e].indexOf(i))!=-1&&n[e].splice(o,1):n[e]=[n[e]],typeof r!="number"&&(r=t(i));var m=n[e];for(o=0;or)break}m.splice(o,0,i)}},this.addCommands=function(e){e&&Object.keys(e).forEach(function(i){var r=e[i];if(r){if(typeof r=="string")return this.bindKey(r,i);typeof r=="function"&&(r={exec:r}),typeof r=="object"&&(r.name||(r.name=i),this.addCommand(r))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(i){this.removeCommand(e[i])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(i){this.bindKey(i,e[i])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var i=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(S){return S}),r=i.pop(),n=E[r];if(E.FUNCTION_KEYS[n])r=E.FUNCTION_KEYS[n].toLowerCase();else if(i.length){if(i.length==1&&i[0]=="shift")return{key:r.toUpperCase(),hashId:-1}}else return{key:r,hashId:-1};for(var o=0,m=i.length;m--;){var w=E.KEY_MODS[i[m]];if(w==null)return typeof console<"u"&&console.error("invalid modifier "+i[m]+" in "+e),!1;o|=w}return{key:r,hashId:o}},this.findKeyCommand=function(i,r){var n=p[i]+r;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,i,r,n){if(!(n<0)){var o=p[i]+r,m=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,m=this.commandKeyBinding[e.$keyChain]||m),m&&(m=="chainKeys"||m[m.length-1]=="chainKeys")?(e.$keyChain=e.$keyChain||o,{command:"null"}):(e.$keyChain&&((!i||i==4)&&r.length==1?e.$keyChain=e.$keyChain.slice(0,-o.length-1):(i==-1||n>0)&&(e.$keyChain="")),{command:m})}},this.getStatusText=function(e,i){return i.$keyChain||""}}).call(h.prototype),b.HashHandler=h,b.MultiHashHandler=u}),define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(L,b,B){"use strict";var E=L("../lib/oop"),A=L("../keyboard/hash_handler").MultiHashHandler,p=L("../lib/event_emitter").EventEmitter,h=function(u,t){A.call(this,t,u),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};E.inherits(h,A),(function(){E.implement(this,p),this.exec=function(u,t,e){if(Array.isArray(u)){for(var i=u.length;i--;)if(this.exec(u[i],t,e))return!0;return!1}if(typeof u=="string"&&(u=this.commands[u]),!u||t&&t.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(t))return!1;var r={editor:t,command:u,args:e};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),r.returnValue!==!1},this.toggleRecording=function(u){if(!this.$inReplay)return u&&u._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(t){this.macro.push([t.command,t.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(u){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(u);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,u):this.exec(t[0],u,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(u){return u.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})}}).call(h.prototype),b.CommandManager=h}),define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(L,b,B){"use strict";var E=L("../lib/lang"),A=L("../config"),p=L("../range").Range;function h(t,e){return{win:t,mac:e}}b.commands=[{name:"showSettingsMenu",bindKey:h("Ctrl-,","Command-,"),exec:function(t){A.loadModule("ace/ext/settings_menu",function(e){e.init(t),t.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:h("Alt-E","F4"),exec:function(t){A.loadModule("./ext/error_marker",function(e){e.showErrorMarker(t,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:h("Alt-Shift-E","Shift-F4"),exec:function(t){A.loadModule("./ext/error_marker",function(e){e.showErrorMarker(t,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:h("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:h(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:h("Ctrl-L","Command-L"),exec:function(t,e){typeof e=="number"&&!isNaN(e)&&t.gotoLine(e),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:h("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:h("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:h("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:h("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:h("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:h("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:h("Ctrl-K","Command-G"),exec:function(t){t.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:h("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:h("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:h("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:h("Ctrl-F","Command-F"),exec:function(t){A.loadModule("ace/ext/searchbox",function(e){e.Search(t)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:h("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:h("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:h("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:h("Up","Up|Ctrl-P"),exec:function(t,e){t.navigateUp(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:h("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:h("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:h("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:h("Down","Down|Ctrl-N"),exec:function(t,e){t.navigateDown(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:h("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:h("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:h("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:h("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:h("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:h("Left","Left|Ctrl-B"),exec:function(t,e){t.navigateLeft(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:h("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:h("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:h("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:h("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:h("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:h("Right","Right|Ctrl-F"),exec:function(t,e){t.navigateRight(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:h(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:h("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:h(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:h("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:h("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:h("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:h("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:h("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:h("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:h("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:h(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(t){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var e=t.$copyWithEmptySelection&&t.selection.isEmpty(),i=e?t.selection.getLineRange():t.selection.getRange();t._emit("cut",i),i.isEmpty()||t.session.remove(i),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,e){t.$handlePaste(e)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:h("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:h("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:h("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:h("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:h("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:h("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:h("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:h("Ctrl-H","Command-Option-F"),exec:function(t){A.loadModule("ace/ext/searchbox",function(e){e.Search(t,!0)})}},{name:"undo",description:"Undo",bindKey:h("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:h("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:h("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:h("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:h("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:h("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:h("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:h("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:h("Shift-Delete",null),exec:function(t){if(t.selection.isEmpty())t.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:h("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:h("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:h("Ctrl-Shift-Backspace",null),exec:function(t){var e=t.selection.getRange();e.start.column=0,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:h("Ctrl-Shift-Delete",null),exec:function(t){var e=t.selection.getRange();e.end.column=Number.MAX_VALUE,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:h("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:h("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:h("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:h("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:h("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:h("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,e){t.insert(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,e){t.insert(E.stringRepeat(e.text||"",e.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:h(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:h("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:h("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:h("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:h(null,null),exec:function(t){t.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:h("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var e=t.selection.getRange();e.start.column=e.end.column=0,e.end.row++,t.selection.setRange(e,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:h(null,null),exec:function(t){for(var e=t.selection.isBackwards(),i=e?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),r=e?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),n=t.session.doc.getLine(i.row).length,o=t.session.doc.getTextRange(t.selection.getRange()),m=o.replace(/\n\s*/," ").length,w=t.session.doc.getLine(i.row),S=i.row+1;S<=r.row+1;S++){var y=E.stringTrimLeft(E.stringTrimRight(t.session.doc.getLine(S)));y.length!==0&&(y=" "+y),w+=y}r.row+10?(t.selection.moveCursorTo(i.row,i.column),t.selection.selectTo(i.row,i.column+m)):(n=t.session.doc.getLine(i.row).length>n?n+1:n,t.selection.moveCursorTo(i.row,n))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:h(null,null),exec:function(t){var e=t.session.doc.getLength()-1,i=t.session.doc.getLine(e).length,r=t.selection.rangeList.ranges,n=[];r.length<1&&(r=[t.selection.getRange()]);for(var o=0;o=$.lastRow||v.end.row<=$.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:break}s=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var x=this.selection.toJSON();this.curOp.selectionAfter=x,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(x),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(a){if(this.$mergeUndoDeltas){var f=this.prevOp,s=this.$mergeableCommands,v=f.command&&a.command.name==f.command.name;if(a.command.name=="insertstring"){var $=a.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),v=v&&this.mergeNextCommand&&(!/\s/.test($)||/\s/.test(f.args)),this.mergeNextCommand=!0}else v=v&&s.indexOf(a.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(v=!1),v?this.session.mergeUndoDeltas=!0:s.indexOf(a.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(a,f){if(a&&typeof a=="string"&&a!="ace"){this.$keybindingId=a;var s=this;y.loadModule(["keybinding",a],function(v){s.$keybindingId==a&&s.keyBinding.setKeyboardHandler(v&&v.handler),f&&f()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(a),f&&f()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(a){if(this.session!=a){this.curOp&&this.endOperation(),this.curOp={};var f=this.session;if(f){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var s=this.session.getSelection();s.off("changeCursor",this.$onCursorChange),s.off("changeSelection",this.$onSelectionChange)}this.session=a,a?(this.$onDocumentChange=this.onDocumentChange.bind(this),a.on("change",this.$onDocumentChange),this.renderer.setSession(a),this.$onChangeMode=this.onChangeMode.bind(this),a.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),a.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),a.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),a.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),a.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),a.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=a.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(a)),this._signal("changeSession",{session:a,oldSession:f}),this.curOp=null,f&&f._signal("changeEditor",{oldEditor:this}),a&&a._signal("changeEditor",{editor:this}),a&&a.bgTokenizer&&a.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(a,f){return this.session.doc.setValue(a),f?f==1?this.navigateFileEnd():f==-1&&this.navigateFileStart():this.selectAll(),a},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(a){this.renderer.onResize(a)},this.setTheme=function(a,f){this.renderer.setTheme(a,f)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(a){this.renderer.setStyle(a)},this.unsetStyle=function(a){this.renderer.unsetStyle(a)},this.getFontSize=function(){return this.getOption("fontSize")||A.computedStyle(this.container).fontSize},this.setFontSize=function(a){this.setOption("fontSize",a)},this.$highlightBrackets=function(){if(!this.$highlightPending){var a=this;this.$highlightPending=!0,setTimeout(function(){a.$highlightPending=!1;var f=a.session;if(!(!f||!f.bgTokenizer)){f.$bracketHighlight&&(f.$bracketHighlight.markerIds.forEach(function($){f.removeMarker($)}),f.$bracketHighlight=null);var s=f.getMatchingBracketRanges(a.getCursorPosition());if(!s&&f.$mode.getMatching&&(s=f.$mode.getMatching(a.session)),!!s){var v="ace_bracket";Array.isArray(s)?s.length==1&&(v="ace_error_bracket"):s=[s],s.length==2&&(o.comparePoints(s[0].end,s[1].start)==0?s=[o.fromPoints(s[0].start,s[1].end)]:o.comparePoints(s[0].start,s[1].end)==0&&(s=[o.fromPoints(s[1].start,s[0].end)])),f.$bracketHighlight={ranges:s,markerIds:s.map(function($){return f.addMarker($,v,"text")})}}}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var a=this;this.$highlightTagPending=!0,setTimeout(function(){a.$highlightTagPending=!1;var f=a.session;if(!(!f||!f.bgTokenizer)){var s=a.getCursorPosition(),v=new c(a.session,s.row,s.column),$=v.getCurrentToken();if(!$||!/\b(?:tag-open|tag-name)/.test($.type)){f.removeMarker(f.$tagHighlight),f.$tagHighlight=null;return}if(!($.type.indexOf("tag-open")!==-1&&($=v.stepForward(),!$))){var x=$.value,C=$.value,k=0,R=v.stepBackward();if(R.value==="<")do R=$,$=v.stepForward(),$&&($.type.indexOf("tag-name")!==-1?(C=$.value,x===C&&(R.value==="<"?k++:R.value===""&&k--);while($&&k>=0);else{do if($=R,R=v.stepBackward(),$){if($.type.indexOf("tag-name")!==-1)x===$.value&&(R.value==="<"?k++:R.value===""){for(var _=0,O=R;O;){if(O.type.indexOf("tag-name")!==-1&&O.value===x){k--;break}else if(O.value==="<")break;O=v.stepBackward(),_++}for(var I=0;I<_;I++)v.stepForward()}}while(R&&k<=0);v.stepForward()}if(!$){f.removeMarker(f.$tagHighlight),f.$tagHighlight=null;return}var D=v.getCurrentTokenRow(),T=v.getCurrentTokenColumn(),P=new o(D,T,D,T+$.value.length),M=f.$backMarkers[f.$tagHighlight];f.$tagHighlight&&M!=null&&P.compareRange(M.range)!==0&&(f.removeMarker(f.$tagHighlight),f.$tagHighlight=null),f.$tagHighlight||(f.$tagHighlight=f.addMarker(P,"ace_bracket","text"))}}},50)}},this.focus=function(){var a=this;setTimeout(function(){a.isFocused()||a.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(a){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",a))},this.onBlur=function(a){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",a))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(a){var f=this.session.$useWrapMode,s=a.start.row==a.end.row?a.end.row:1/0;this.renderer.updateLines(a.start.row,s,f),this._signal("change",a),this.$cursorChange()},this.onTokenizerUpdate=function(a){var f=a.data;this.renderer.updateLines(f.first,f.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var a=this.getSession(),f;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(f=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(f=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(f=!1)),a.$highlightLineMarker&&!f)a.removeMarker(a.$highlightLineMarker.id),a.$highlightLineMarker=null;else if(!a.$highlightLineMarker&&f){var s=new o(f.row,f.column,f.row,1/0);s.id=a.addMarker(s,"ace_active-line","screenLine"),a.$highlightLineMarker=s}else f&&(a.$highlightLineMarker.start.row=f.row,a.$highlightLineMarker.end.row=f.row,a.$highlightLineMarker.start.column=f.column,a._signal("changeBackMarker"))},this.onSelectionChange=function(a){var f=this.session;if(f.$selectionMarker&&f.removeMarker(f.$selectionMarker),f.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var s=this.selection.getRange(),v=this.getSelectionStyle();f.$selectionMarker=f.addMarker(s,"ace_selection",v)}var $=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight($),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var a=this.session,f=this.getSelectionRange();if(!(f.isEmpty()||f.isMultiLine())){var s=f.start.column,v=f.end.column,$=a.getLine(f.start.row),x=$.substring(s,v);if(!(x.length>5e3||!/[\w\d]/.test(x))){var C=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:x}),k=$.substring(s-1,v+1);if(C.test(k))return C}}},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(a){this.renderer.updateText(),this._emit("changeMode",a)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var a=this.getSelectedText(),f=this.session.doc.getNewLineCharacter(),s=!1;if(!a&&this.$copyWithEmptySelection){s=!0;for(var v=this.selection.getAllRanges(),$=0;$=$.lastRow||v.end.row<=$.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:break}s=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var x=this.selection.toJSON();this.curOp.selectionAfter=x,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(x),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(a){if(this.$mergeUndoDeltas){var f=this.prevOp,s=this.$mergeableCommands,v=f.command&&a.command.name==f.command.name;if(a.command.name=="insertstring"){var $=a.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),v=v&&this.mergeNextCommand&&(!/\s/.test($)||/\s/.test(f.args)),this.mergeNextCommand=!0}else v=v&&s.indexOf(a.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(v=!1),v?this.session.mergeUndoDeltas=!0:s.indexOf(a.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(a,f){if(a&&typeof a=="string"&&a!="ace"){this.$keybindingId=a;var s=this;y.loadModule(["keybinding",a],function(v){s.$keybindingId==a&&s.keyBinding.setKeyboardHandler(v&&v.handler),f&&f()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(a),f&&f()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(a){if(this.session!=a){this.curOp&&this.endOperation(),this.curOp={};var f=this.session;if(f){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var s=this.session.getSelection();s.off("changeCursor",this.$onCursorChange),s.off("changeSelection",this.$onSelectionChange)}this.session=a,a?(this.$onDocumentChange=this.onDocumentChange.bind(this),a.on("change",this.$onDocumentChange),this.renderer.setSession(a),this.$onChangeMode=this.onChangeMode.bind(this),a.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),a.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),a.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),a.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),a.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),a.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=a.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(a)),this._signal("changeSession",{session:a,oldSession:f}),this.curOp=null,f&&f._signal("changeEditor",{oldEditor:this}),a&&a._signal("changeEditor",{editor:this}),a&&a.bgTokenizer&&a.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(a,f){return this.session.doc.setValue(a),f?f==1?this.navigateFileEnd():f==-1&&this.navigateFileStart():this.selectAll(),a},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(a){this.renderer.onResize(a)},this.setTheme=function(a,f){this.renderer.setTheme(a,f)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(a){this.renderer.setStyle(a)},this.unsetStyle=function(a){this.renderer.unsetStyle(a)},this.getFontSize=function(){return this.getOption("fontSize")||A.computedStyle(this.container).fontSize},this.setFontSize=function(a){this.setOption("fontSize",a)},this.$highlightBrackets=function(){if(!this.$highlightPending){var a=this;this.$highlightPending=!0,setTimeout(function(){a.$highlightPending=!1;var f=a.session;if(!(!f||!f.bgTokenizer)){f.$bracketHighlight&&(f.$bracketHighlight.markerIds.forEach(function($){f.removeMarker($)}),f.$bracketHighlight=null);var s=f.getMatchingBracketRanges(a.getCursorPosition());if(!s&&f.$mode.getMatching&&(s=f.$mode.getMatching(a.session)),!!s){var v="ace_bracket";Array.isArray(s)?s.length==1&&(v="ace_error_bracket"):s=[s],s.length==2&&(o.comparePoints(s[0].end,s[1].start)==0?s=[o.fromPoints(s[0].start,s[1].end)]:o.comparePoints(s[0].start,s[1].end)==0&&(s=[o.fromPoints(s[1].start,s[0].end)])),f.$bracketHighlight={ranges:s,markerIds:s.map(function($){return f.addMarker($,v,"text")})}}}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var a=this;this.$highlightTagPending=!0,setTimeout(function(){a.$highlightTagPending=!1;var f=a.session;if(!(!f||!f.bgTokenizer)){var s=a.getCursorPosition(),v=new c(a.session,s.row,s.column),$=v.getCurrentToken();if(!$||!/\b(?:tag-open|tag-name)/.test($.type)){f.removeMarker(f.$tagHighlight),f.$tagHighlight=null;return}if(!($.type.indexOf("tag-open")!==-1&&($=v.stepForward(),!$))){var x=$.value,C=$.value,k=0,R=v.stepBackward();if(R.value==="<")do R=$,$=v.stepForward(),$&&($.type.indexOf("tag-name")!==-1?(C=$.value,x===C&&(R.value==="<"?k++:R.value===""&&k--);while($&&k>=0);else{do if($=R,R=v.stepBackward(),$){if($.type.indexOf("tag-name")!==-1)x===$.value&&(R.value==="<"?k++:R.value===""){for(var _=0,O=R;O;){if(O.type.indexOf("tag-name")!==-1&&O.value===x){k--;break}else if(O.value==="<")break;O=v.stepBackward(),_++}for(var I=0;I<_;I++)v.stepForward()}}while(R&&k<=0);v.stepForward()}if(!$){f.removeMarker(f.$tagHighlight),f.$tagHighlight=null;return}var D=v.getCurrentTokenRow(),T=v.getCurrentTokenColumn(),P=new o(D,T,D,T+$.value.length),M=f.$backMarkers[f.$tagHighlight];f.$tagHighlight&&M!=null&&P.compareRange(M.range)!==0&&(f.removeMarker(f.$tagHighlight),f.$tagHighlight=null),f.$tagHighlight||(f.$tagHighlight=f.addMarker(P,"ace_bracket","text"))}}},50)}},this.focus=function(){var a=this;setTimeout(function(){a.isFocused()||a.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(a){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",a))},this.onBlur=function(a){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",a))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(a){var f=this.session.$useWrapMode,s=a.start.row==a.end.row?a.end.row:1/0;this.renderer.updateLines(a.start.row,s,f),this._signal("change",a),this.$cursorChange()},this.onTokenizerUpdate=function(a){var f=a.data;this.renderer.updateLines(f.first,f.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var a=this.getSession(),f;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(f=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(f=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(f=!1)),a.$highlightLineMarker&&!f)a.removeMarker(a.$highlightLineMarker.id),a.$highlightLineMarker=null;else if(!a.$highlightLineMarker&&f){var s=new o(f.row,f.column,f.row,1/0);s.id=a.addMarker(s,"ace_active-line","screenLine"),a.$highlightLineMarker=s}else f&&(a.$highlightLineMarker.start.row=f.row,a.$highlightLineMarker.end.row=f.row,a.$highlightLineMarker.start.column=f.column,a._signal("changeBackMarker"))},this.onSelectionChange=function(a){var f=this.session;if(f.$selectionMarker&&f.removeMarker(f.$selectionMarker),f.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var s=this.selection.getRange(),v=this.getSelectionStyle();f.$selectionMarker=f.addMarker(s,"ace_selection",v)}var $=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight($),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var a=this.session,f=this.getSelectionRange();if(!(f.isEmpty()||f.isMultiLine())){var s=f.start.column,v=f.end.column,$=a.getLine(f.start.row),x=$.substring(s,v);if(!(x.length>5e3||!/[\w\d]/.test(x))){var C=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:x}),k=$.substring(s-1,v+1);if(C.test(k))return C}}},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(a){this.renderer.updateText(),this._emit("changeMode",a)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var a=this.getSelectedText(),f=this.session.doc.getNewLineCharacter(),s=!1;if(!a&&this.$copyWithEmptySelection){s=!0;for(var v=this.selection.getAllRanges(),$=0;$O.search(/\S|$/)){var k=O.substr($.column).search(/\S|$/);s.doc.removeInLine($.row,$.column,$.column+k)}}this.clearSelection();var R=$.column,_=s.getState($.row),O=s.getLine($.row),I=v.checkOutdent(_,O,a);if(s.insert($,a),x&&x.selection&&(x.selection.length==2?this.selection.setSelectionRange(new o($.row,R+x.selection[0],$.row,R+x.selection[1])):this.selection.setSelectionRange(new o($.row+x.selection[0],x.selection[1],$.row+x.selection[2],x.selection[3]))),this.$enableAutoIndent){if(s.getDocument().isNewLine(a)){var D=v.getNextLineIndent(_,O.slice(0,$.column),s.getTabString());s.insert({row:$.row+1,column:0},D)}I&&v.autoOutdent(_,s,$.row)}},this.autoIndent=function(){var a=this.session,f=a.getMode(),s,v;if(this.selection.isEmpty())s=0,v=a.doc.getLength()-1;else{var $=this.getSelectionRange();s=$.start.row,v=$.end.row}for(var x="",C="",k="",R,_,O,I=a.getTabString(),D=s;D<=v;D++)D>0&&(x=a.getState(D-1),C=a.getLine(D-1),k=f.getNextLineIndent(x,C,I)),R=a.getLine(D),_=f.$getIndent(R),k!==_&&(_.length>0&&(O=new o(D,0,D,_.length),a.remove(O)),k.length>0&&a.insert({row:D,column:0},k)),f.autoOutdent(x,a,D)},this.onTextInput=function(a,f){if(!f)return this.keyBinding.onTextInput(a);this.startOperation({command:{name:"insertstring"}});var s=this.applyComposition.bind(this,a,f);this.selection.rangeCount?this.forEachSelection(s):s(),this.endOperation()},this.applyComposition=function(a,f){if(f.extendLeft||f.extendRight){var s=this.selection.getRange();s.start.column-=f.extendLeft,s.end.column+=f.extendRight,s.start.column<0&&(s.start.row--,s.start.column+=this.session.getLine(s.start.row).length+1),this.selection.setRange(s),!a&&!s.isEmpty()&&this.remove()}if((a||!this.selection.isEmpty())&&this.insert(a,!0),f.restoreStart||f.restoreEnd){var s=this.selection.getRange();s.start.column-=f.restoreStart,s.end.column-=f.restoreEnd,this.selection.setRange(s)}},this.onCommandKey=function(a,f,s){return this.keyBinding.onCommandKey(a,f,s)},this.setOverwrite=function(a){this.session.setOverwrite(a)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(a){this.setOption("scrollSpeed",a)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(a){this.setOption("dragDelay",a)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(a){this.setOption("selectionStyle",a)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(a){this.setOption("highlightActiveLine",a)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(a){this.setOption("highlightGutterLine",a)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(a){this.setOption("highlightSelectedWord",a)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(a){this.renderer.setAnimatedScroll(a)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(a){this.renderer.setShowInvisibles(a)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(a){this.renderer.setDisplayIndentGuides(a)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(a){this.renderer.setShowPrintMargin(a)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(a){this.renderer.setPrintMarginColumn(a)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(a){this.setOption("readOnly",a)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(a){this.setOption("behavioursEnabled",a)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(a){this.setOption("wrapBehavioursEnabled",a)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(a){this.setOption("showFoldWidgets",a)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(a){this.setOption("fadeFoldWidgets",a)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(a){this.selection.isEmpty()&&(a=="left"?this.selection.selectLeft():this.selection.selectRight());var f=this.getSelectionRange();if(this.getBehavioursEnabled()){var s=this.session,v=s.getState(f.start.row),$=s.getMode().transformAction(v,"deletion",this,s,f);if(f.end.column===0){var x=s.getTextRange(f);if(x[x.length-1]==` `){var C=s.getLine(f.end.row);/^\s+$/.test(C)&&(f.end.column=C.length)}}$&&(f=$)}this.session.remove(f),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var a=this.getSelectionRange();a.start.column==a.end.column&&a.start.row==a.end.row&&(a.end.column=0,a.end.row++),this.session.remove(a),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var a=this.getCursorPosition();this.insert(` -`),this.moveCursorToPosition(a)},this.transposeLetters=function(){if(this.selection.isEmpty()){var a=this.getCursorPosition(),f=a.column;if(f!==0){var s=this.session.getLine(a.row),v,$;fk.toLowerCase()?1:0});for(var $=new o(0,0,0,0),v=a.first;v<=a.last;v++){var x=f.getLine(v);$.start.row=v,$.end.row=v,$.end.column=x.length,f.replace($,s[v-a.first])}},this.toggleCommentLines=function(){var a=this.session.getState(this.getCursorPosition().row),f=this.$getSelectedRows();this.session.getMode().toggleCommentLines(a,this.session,f.first,f.last)},this.toggleBlockComment=function(){var a=this.getCursorPosition(),f=this.session.getState(a.row),s=this.getSelectionRange();this.session.getMode().toggleBlockComment(f,this.session,s,a)},this.getNumberAt=function(a,f){var s=/[\-]?[0-9]+(?:\.[0-9]+)?/g;s.lastIndex=0;for(var v=this.session.getLine(a);s.lastIndex=f){var x={value:$[0],start:$.index,end:$.index+$[0].length};return x}}return null},this.modifyNumber=function(a){var f=this.selection.getCursor().row,s=this.selection.getCursor().column,v=new o(f,s-1,f,s),$=this.session.getTextRange(v);if(!isNaN(parseFloat($))&&isFinite($)){var x=this.getNumberAt(f,s);if(x){var C=x.value.indexOf(".")>=0?x.start+x.value.indexOf(".")+1:x.end,k=x.start+x.value.length-C,R=parseFloat(x.value);R*=Math.pow(10,k),C!==x.end&&s=C&&x<=k&&(s=N,R.selection.clearSelection(),R.moveCursorTo(a,C+v),R.selection.selectTo(a,k+v)),C=k});for(var _=this.$toggleWordPairs,O,I=0;I<_.length;I++)for(var D=_[I],T=0;T<=1;T++){var P=+!T,M=s.match(new RegExp("^\\s?_?("+p.escapeRegExp(D[T])+")\\s?$","i"));if(M){var W=s.match(new RegExp("([_]|^|\\s)("+p.escapeRegExp(M[1])+")($|\\s)","g"));W&&(O=s.replace(new RegExp(p.escapeRegExp(D[T]),"i"),function(N){var G=D[P];return N.toUpperCase()==N?G=G.toUpperCase():N.charAt(0).toUpperCase()==N.charAt(0)&&(G=G.substr(0,0)+D[P].charAt(0).toUpperCase()+G.substr(1)),G}),this.insert(O),O="")}}},this.removeLines=function(){var a=this.$getSelectedRows();this.session.removeFullLines(a.first,a.last),this.clearSelection()},this.duplicateSelection=function(){var a=this.selection,f=this.session,s=a.getRange(),v=a.isBackwards();if(s.isEmpty()){var $=s.start.row;f.duplicateLines($,$)}else{var x=v?s.start:s.end,C=f.insert(x,f.getTextRange(s),!1);s.start=x,s.end=C,a.setSelectionRange(s,v)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(a,f,s){return this.session.moveText(a,f,s)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(a,f){var s,v,$=this.selection;if(!$.inMultiSelectMode||this.inVirtualSelectionMode){var x=$.toOrientedRange();s=this.$getSelectedRows(x),v=this.session.$moveLines(s.first,s.last,f?0:a),f&&a==-1&&(v=0),x.moveBy(v,0),$.fromOrientedRange(x)}else{var C=$.rangeList.ranges;$.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var k=0,R=0,_=C.length,O=0;O<_;O++){var I=O;C[O].moveBy(k,0),s=this.$getSelectedRows(C[O]);for(var D=s.first,T=s.last;++O<_;){R&&C[O].moveBy(R,0);var P=this.$getSelectedRows(C[O]);if(f&&P.first!=T)break;if(!f&&P.first>T+1)break;T=P.last}for(O--,k=this.session.$moveLines(D,T,f?0:a),f&&a==-1&&(I=O+1);I<=O;)C[I].moveBy(k,0),I++;f||(k=0),R+=k}$.fromOrientedRange($.ranges[0]),$.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(a){return a=(a||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(a.start.row),last:this.session.getRowFoldEnd(a.end.row)}},this.onCompositionStart=function(a){this.renderer.showComposition(a)},this.onCompositionUpdate=function(a){this.renderer.setCompositionText(a)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(a){return a>=this.getFirstVisibleRow()&&a<=this.getLastVisibleRow()},this.isRowFullyVisible=function(a){return a>=this.renderer.getFirstFullyVisibleRow()&&a<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(a,f){var s=this.renderer,v=this.renderer.layerConfig,$=a*Math.floor(v.height/v.lineHeight);f===!0?this.selection.$moveSelection(function(){this.moveCursorBy($,0)}):f===!1&&(this.selection.moveCursorBy($,0),this.selection.clearSelection());var x=s.scrollTop;s.scrollBy(0,$*v.lineHeight),f!=null&&s.scrollCursorIntoView(null,.5),s.animateScrolling(x)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(a){this.renderer.scrollToRow(a)},this.scrollToLine=function(a,f,s,v){this.renderer.scrollToLine(a,f,s,v)},this.centerSelection=function(){var a=this.getSelectionRange(),f={row:Math.floor(a.start.row+(a.end.row-a.start.row)/2),column:Math.floor(a.start.column+(a.end.column-a.start.column)/2)};this.renderer.alignCursor(f,.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.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(a,f){this.selection.moveCursorTo(a,f)},this.moveCursorToPosition=function(a){this.selection.moveCursorToPosition(a)},this.jumpToMatching=function(a,f){var s=this.getCursorPosition(),v=new c(this.session,s.row,s.column),$=v.getCurrentToken(),x=$||v.stepForward();if(x){var C,k=!1,R={},_=s.column-x.start,O,I={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(x.value.match(/[{}()\[\]]/g)){for(;_=0;--x)this.$tryReplace(s[x],a)&&v++;return this.selection.setSelectionRange($),v},this.$tryReplace=function(a,f){var s=this.session.getTextRange(a);return f=this.$search.replace(s,f),f!==null?(a.end=this.session.replace(a,f),a):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(a,f,s){f||(f={}),typeof a=="string"||a instanceof RegExp?f.needle=a:typeof a=="object"&&E.mixin(f,a);var v=this.selection.getRange();f.needle==null&&(a=this.session.getTextRange(v)||this.$search.$options.needle,a||(v=this.session.getWordRange(v.start.row,v.start.column),a=this.session.getTextRange(v)),this.$search.set({needle:a})),this.$search.set(f),f.start||this.$search.set({start:v});var $=this.$search.find(this.session);if(f.preventScroll)return $;if($)return this.revealRange($,s),$;f.backwards?v.start=v.end:v.end=v.start,this.selection.setRange(v)},this.findNext=function(a,f){this.find({skipCurrent:!0,backwards:!1},a,f)},this.findPrevious=function(a,f){this.find(a,{skipCurrent:!0,backwards:!0},f)},this.revealRange=function(a,f){this.session.unfold(a),this.selection.setSelectionRange(a);var s=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(a.start,a.end,.5),f!==!1&&this.renderer.animateScrolling(s)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(a){a.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(a){if(a){var f,s=this,v=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var $=this.$scrollAnchor;$.style.cssText="position:absolute",this.container.insertBefore($,this.container.firstChild);var x=this.on("changeSelection",function(){v=!0}),C=this.renderer.on("beforeRender",function(){v&&(f=s.renderer.container.getBoundingClientRect())}),k=this.renderer.on("afterRender",function(){if(v&&f&&(s.isFocused()||s.searchBox&&s.searchBox.isFocused())){var R=s.renderer,_=R.$cursorLayer.$pixelPos,O=R.layerConfig,I=_.top-O.offset;_.top>=0&&I+f.top<0?v=!0:_.topwindow.innerHeight?v=!1:v=null,v!=null&&($.style.top=I+"px",$.style.left=_.left+"px",$.style.height=O.lineHeight+"px",$.scrollIntoView(v)),v=f=null}});this.setAutoScrollEditorIntoView=function(R){R||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",x),this.renderer.off("afterRender",k),this.renderer.off("beforeRender",C))}}},this.$resetCursorStyle=function(){var a=this.$cursorStyle||"ace",f=this.renderer.$cursorLayer;f&&(f.setSmoothBlinking(/smooth/.test(a)),f.isBlinking=!this.$readOnly&&a!="wide",A.setCssClass(f.element,"ace_slim-cursors",/slim/.test(a)))},this.prompt=function(a,f,s){var v=this;y.loadModule("./ext/prompt",function($){$.prompt(v,a,f,s)})}}.call(g.prototype),y.defineOptions(g.prototype,"editor",{selectionStyle:{set:function(a){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:a})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(a){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(a){this.textInput.setReadOnly(a),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(a){this.textInput.setCopyWithEmptySelection(a)},initialValue:!1},cursorStyle:{set:function(a){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(a){this.setAutoScrollEditorIntoView(a)}},keyboardHandler:{set:function(a){this.setKeyboardHandler(a)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(a){this.session.setValue(a)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(a){this.setSession(a)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(a){this.renderer.$gutterLayer.setShowLineNumbers(a),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),a&&this.$relativeLineNumbers?d.attach(this):d.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(a){this.$showLineNumbers&&a?d.attach(this):d.detach(this)}},placeholder:{set:function(a){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var f=this.session&&(this.renderer.$composition||this.getValue());if(f&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),A.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!f&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),A.addCssClass(this.container,"ace_hasPlaceholder");var s=A.createElement("div");s.className="ace_placeholder",s.textContent=this.$placeholder||"",this.renderer.placeholderNode=s,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!f&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var d={getText:function(a,f){return(Math.abs(a.selection.lead.row-f)||f+1+(f<9?"\xB7":""))+""},getWidth:function(a,f,s){return Math.max(f.toString().length,(s.lastRow+1).toString().length,2)*s.characterWidth},update:function(a,f){f.renderer.$loop.schedule(f.renderer.CHANGE_GUTTER)},attach:function(a){a.renderer.$gutterLayer.$renderer=this,a.on("changeSelection",this.update),this.update(null,a)},detach:function(a){a.renderer.$gutterLayer.$renderer==this&&(a.renderer.$gutterLayer.$renderer=null),a.off("changeSelection",this.update),this.update(null,a)}};b.Editor=g}),define("ace/undomanager",["require","exports","module","ace/range"],function(L,b,B){"use strict";var E=function(){this.$maxRev=0,this.$fromUndo=!1,this.reset()};(function(){this.addSession=function(d){this.$session=d},this.add=function(d,a,f){this.$fromUndo||d!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),(a===!1||!this.lastDeltas)&&(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),d.id=this.$rev=++this.$maxRev),(d.action=="remove"||d.action=="insert")&&(this.$lastDelta=d),this.lastDeltas.push(d))},this.addSelection=function(d,a){this.selections.push({value:d,rev:a||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(d,a){a==null&&(a=this.$rev+1);for(var f=this.$undoStack,s=f.length;s--;){var v=f[s][0];if(v.id<=d)break;v.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(d){d==null&&(d=this.$rev),this.mark=d},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(d){return d?r(d):r(this.$undoStack)+` +`),this.moveCursorToPosition(a)},this.transposeLetters=function(){if(this.selection.isEmpty()){var a=this.getCursorPosition(),f=a.column;if(f!==0){var s=this.session.getLine(a.row),v,$;fk.toLowerCase()?1:0});for(var $=new o(0,0,0,0),v=a.first;v<=a.last;v++){var x=f.getLine(v);$.start.row=v,$.end.row=v,$.end.column=x.length,f.replace($,s[v-a.first])}},this.toggleCommentLines=function(){var a=this.session.getState(this.getCursorPosition().row),f=this.$getSelectedRows();this.session.getMode().toggleCommentLines(a,this.session,f.first,f.last)},this.toggleBlockComment=function(){var a=this.getCursorPosition(),f=this.session.getState(a.row),s=this.getSelectionRange();this.session.getMode().toggleBlockComment(f,this.session,s,a)},this.getNumberAt=function(a,f){var s=/[\-]?[0-9]+(?:\.[0-9]+)?/g;s.lastIndex=0;for(var v=this.session.getLine(a);s.lastIndex=f){var x={value:$[0],start:$.index,end:$.index+$[0].length};return x}}return null},this.modifyNumber=function(a){var f=this.selection.getCursor().row,s=this.selection.getCursor().column,v=new o(f,s-1,f,s),$=this.session.getTextRange(v);if(!isNaN(parseFloat($))&&isFinite($)){var x=this.getNumberAt(f,s);if(x){var C=x.value.indexOf(".")>=0?x.start+x.value.indexOf(".")+1:x.end,k=x.start+x.value.length-C,R=parseFloat(x.value);R*=Math.pow(10,k),C!==x.end&&s=C&&x<=k&&(s=N,R.selection.clearSelection(),R.moveCursorTo(a,C+v),R.selection.selectTo(a,k+v)),C=k});for(var _=this.$toggleWordPairs,O,I=0;I<_.length;I++)for(var D=_[I],T=0;T<=1;T++){var P=+!T,M=s.match(new RegExp("^\\s?_?("+p.escapeRegExp(D[T])+")\\s?$","i"));if(M){var W=s.match(new RegExp("([_]|^|\\s)("+p.escapeRegExp(M[1])+")($|\\s)","g"));W&&(O=s.replace(new RegExp(p.escapeRegExp(D[T]),"i"),function(N){var G=D[P];return N.toUpperCase()==N?G=G.toUpperCase():N.charAt(0).toUpperCase()==N.charAt(0)&&(G=G.substr(0,0)+D[P].charAt(0).toUpperCase()+G.substr(1)),G}),this.insert(O),O="")}}},this.removeLines=function(){var a=this.$getSelectedRows();this.session.removeFullLines(a.first,a.last),this.clearSelection()},this.duplicateSelection=function(){var a=this.selection,f=this.session,s=a.getRange(),v=a.isBackwards();if(s.isEmpty()){var $=s.start.row;f.duplicateLines($,$)}else{var x=v?s.start:s.end,C=f.insert(x,f.getTextRange(s),!1);s.start=x,s.end=C,a.setSelectionRange(s,v)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(a,f,s){return this.session.moveText(a,f,s)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(a,f){var s,v,$=this.selection;if(!$.inMultiSelectMode||this.inVirtualSelectionMode){var x=$.toOrientedRange();s=this.$getSelectedRows(x),v=this.session.$moveLines(s.first,s.last,f?0:a),f&&a==-1&&(v=0),x.moveBy(v,0),$.fromOrientedRange(x)}else{var C=$.rangeList.ranges;$.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var k=0,R=0,_=C.length,O=0;O<_;O++){var I=O;C[O].moveBy(k,0),s=this.$getSelectedRows(C[O]);for(var D=s.first,T=s.last;++O<_;){R&&C[O].moveBy(R,0);var P=this.$getSelectedRows(C[O]);if(f&&P.first!=T)break;if(!f&&P.first>T+1)break;T=P.last}for(O--,k=this.session.$moveLines(D,T,f?0:a),f&&a==-1&&(I=O+1);I<=O;)C[I].moveBy(k,0),I++;f||(k=0),R+=k}$.fromOrientedRange($.ranges[0]),$.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(a){return a=(a||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(a.start.row),last:this.session.getRowFoldEnd(a.end.row)}},this.onCompositionStart=function(a){this.renderer.showComposition(a)},this.onCompositionUpdate=function(a){this.renderer.setCompositionText(a)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(a){return a>=this.getFirstVisibleRow()&&a<=this.getLastVisibleRow()},this.isRowFullyVisible=function(a){return a>=this.renderer.getFirstFullyVisibleRow()&&a<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(a,f){var s=this.renderer,v=this.renderer.layerConfig,$=a*Math.floor(v.height/v.lineHeight);f===!0?this.selection.$moveSelection(function(){this.moveCursorBy($,0)}):f===!1&&(this.selection.moveCursorBy($,0),this.selection.clearSelection());var x=s.scrollTop;s.scrollBy(0,$*v.lineHeight),f!=null&&s.scrollCursorIntoView(null,.5),s.animateScrolling(x)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(a){this.renderer.scrollToRow(a)},this.scrollToLine=function(a,f,s,v){this.renderer.scrollToLine(a,f,s,v)},this.centerSelection=function(){var a=this.getSelectionRange(),f={row:Math.floor(a.start.row+(a.end.row-a.start.row)/2),column:Math.floor(a.start.column+(a.end.column-a.start.column)/2)};this.renderer.alignCursor(f,.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.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(a,f){this.selection.moveCursorTo(a,f)},this.moveCursorToPosition=function(a){this.selection.moveCursorToPosition(a)},this.jumpToMatching=function(a,f){var s=this.getCursorPosition(),v=new c(this.session,s.row,s.column),$=v.getCurrentToken(),x=$||v.stepForward();if(x){var C,k=!1,R={},_=s.column-x.start,O,I={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(x.value.match(/[{}()\[\]]/g)){for(;_=0;--x)this.$tryReplace(s[x],a)&&v++;return this.selection.setSelectionRange($),v},this.$tryReplace=function(a,f){var s=this.session.getTextRange(a);return f=this.$search.replace(s,f),f!==null?(a.end=this.session.replace(a,f),a):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(a,f,s){f||(f={}),typeof a=="string"||a instanceof RegExp?f.needle=a:typeof a=="object"&&E.mixin(f,a);var v=this.selection.getRange();f.needle==null&&(a=this.session.getTextRange(v)||this.$search.$options.needle,a||(v=this.session.getWordRange(v.start.row,v.start.column),a=this.session.getTextRange(v)),this.$search.set({needle:a})),this.$search.set(f),f.start||this.$search.set({start:v});var $=this.$search.find(this.session);if(f.preventScroll)return $;if($)return this.revealRange($,s),$;f.backwards?v.start=v.end:v.end=v.start,this.selection.setRange(v)},this.findNext=function(a,f){this.find({skipCurrent:!0,backwards:!1},a,f)},this.findPrevious=function(a,f){this.find(a,{skipCurrent:!0,backwards:!0},f)},this.revealRange=function(a,f){this.session.unfold(a),this.selection.setSelectionRange(a);var s=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(a.start,a.end,.5),f!==!1&&this.renderer.animateScrolling(s)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(a){a.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(a){if(a){var f,s=this,v=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var $=this.$scrollAnchor;$.style.cssText="position:absolute",this.container.insertBefore($,this.container.firstChild);var x=this.on("changeSelection",function(){v=!0}),C=this.renderer.on("beforeRender",function(){v&&(f=s.renderer.container.getBoundingClientRect())}),k=this.renderer.on("afterRender",function(){if(v&&f&&(s.isFocused()||s.searchBox&&s.searchBox.isFocused())){var R=s.renderer,_=R.$cursorLayer.$pixelPos,O=R.layerConfig,I=_.top-O.offset;_.top>=0&&I+f.top<0?v=!0:_.topwindow.innerHeight?v=!1:v=null,v!=null&&($.style.top=I+"px",$.style.left=_.left+"px",$.style.height=O.lineHeight+"px",$.scrollIntoView(v)),v=f=null}});this.setAutoScrollEditorIntoView=function(R){R||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",x),this.renderer.off("afterRender",k),this.renderer.off("beforeRender",C))}}},this.$resetCursorStyle=function(){var a=this.$cursorStyle||"ace",f=this.renderer.$cursorLayer;f&&(f.setSmoothBlinking(/smooth/.test(a)),f.isBlinking=!this.$readOnly&&a!="wide",A.setCssClass(f.element,"ace_slim-cursors",/slim/.test(a)))},this.prompt=function(a,f,s){var v=this;y.loadModule("./ext/prompt",function($){$.prompt(v,a,f,s)})}}).call(g.prototype),y.defineOptions(g.prototype,"editor",{selectionStyle:{set:function(a){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:a})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(a){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(a){this.textInput.setReadOnly(a),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(a){this.textInput.setCopyWithEmptySelection(a)},initialValue:!1},cursorStyle:{set:function(a){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(a){this.setAutoScrollEditorIntoView(a)}},keyboardHandler:{set:function(a){this.setKeyboardHandler(a)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(a){this.session.setValue(a)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(a){this.setSession(a)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(a){this.renderer.$gutterLayer.setShowLineNumbers(a),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),a&&this.$relativeLineNumbers?d.attach(this):d.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(a){this.$showLineNumbers&&a?d.attach(this):d.detach(this)}},placeholder:{set:function(a){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var f=this.session&&(this.renderer.$composition||this.getValue());if(f&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),A.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!f&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),A.addCssClass(this.container,"ace_hasPlaceholder");var s=A.createElement("div");s.className="ace_placeholder",s.textContent=this.$placeholder||"",this.renderer.placeholderNode=s,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!f&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var d={getText:function(a,f){return(Math.abs(a.selection.lead.row-f)||f+1+(f<9?"\xB7":""))+""},getWidth:function(a,f,s){return Math.max(f.toString().length,(s.lastRow+1).toString().length,2)*s.characterWidth},update:function(a,f){f.renderer.$loop.schedule(f.renderer.CHANGE_GUTTER)},attach:function(a){a.renderer.$gutterLayer.$renderer=this,a.on("changeSelection",this.update),this.update(null,a)},detach:function(a){a.renderer.$gutterLayer.$renderer==this&&(a.renderer.$gutterLayer.$renderer=null),a.off("changeSelection",this.update),this.update(null,a)}};b.Editor=g}),define("ace/undomanager",["require","exports","module","ace/range"],function(L,b,B){"use strict";var E=function(){this.$maxRev=0,this.$fromUndo=!1,this.reset()};(function(){this.addSession=function(d){this.$session=d},this.add=function(d,a,f){this.$fromUndo||d!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),(a===!1||!this.lastDeltas)&&(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),d.id=this.$rev=++this.$maxRev),(d.action=="remove"||d.action=="insert")&&(this.$lastDelta=d),this.lastDeltas.push(d))},this.addSelection=function(d,a){this.selections.push({value:d,rev:a||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(d,a){a==null&&(a=this.$rev+1);for(var f=this.$undoStack,s=f.length;s--;){var v=f[s][0];if(v.id<=d)break;v.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(d){d==null&&(d=this.$rev),this.mark=d},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(d){return d?r(d):r(this.$undoStack)+` --- `+r(this.$redoStack)}}).call(E.prototype);function A(d,a){for(var f=a;f--;){var s=d[f];if(s&&!s[0].ignore){for(;f0){C.row+=v,C.column+=C.row==s.row?$:0;continue}!a&&R<=0&&(C.row=f.row,C.column=f.column,R===0&&(C.bias=1))}}}function e(d){return{row:d.row,column:d.column}}function i(d){return{start:e(d.start),end:e(d.end),action:d.action,lines:d.lines.slice()}}function r(d){if(d=d||this,Array.isArray(d))return d.map(r).join(` `);var a="";return d.action?(a=d.action=="insert"?"+":"-",a+="["+d.lines+"]"):d.value&&(Array.isArray(d.value)?a=d.value.map(n).join(` `):a=n(d.value)),d.start&&(a+=n(d)),(d.id||d.rev)&&(a+=" ("+(d.id||d.rev)+")"),a}function n(d){return d.start.row+":"+d.start.column+"=>"+d.end.row+":"+d.end.column}function o(d,a){var f=d.action=="insert",s=a.action=="insert";if(f&&s)if(h(a.start,d.end)>=0)S(a,d,-1);else if(h(a.start,d.start)<=0)S(d,a,1);else return null;else if(f&&!s)if(h(a.start,d.end)>=0)S(a,d,-1);else if(h(a.end,d.start)<=0)S(d,a,-1);else return null;else if(!f&&s)if(h(a.start,d.start)>=0)S(a,d,1);else if(h(a.start,d.start)<=0)S(d,a,1);else return null;else if(!f&&!s)if(h(a.start,d.start)>=0)S(a,d,1);else if(h(a.end,d.start)<=0)S(d,a,-1);else return null;return[a,d]}function m(d,a){for(var f=d.length;f--;)for(var s=0;s=0?S(d,a,-1):(h(d.start,a.start)<=0||S(d,p.fromPoints(a.start,d.start),-1),S(a,d,1));else if(!f&&s)h(a.start,d.end)>=0?S(a,d,-1):(h(a.start,d.start)<=0||S(a,p.fromPoints(d.start,a.start),-1),S(d,a,1));else if(!f&&!s)if(h(a.start,d.end)>=0)S(a,d,-1);else if(h(a.end,d.start)<=0)S(d,a,-1);else{var v,$;return h(d.start,a.start)<0&&(v=d,d=c(d,a.start)),h(d.end,a.end)>0&&($=c(d,a.end)),y(a.end,d.start,d.end,-1),$&&!v&&(d.lines=$.lines,d.start=$.start,d.end=$.end,$=d),[a,v,$].filter(Boolean)}return[a,d]}function S(d,a,f){y(d.start,a.start,a.end,f),y(d.end,a.start,a.end,f)}function y(d,a,f,s){d.row==(s==1?a:f).row&&(d.column+=s*(f.column-a.column)),d.row+=s*(f.row-a.row)}function c(d,a){var f=d.lines,s=d.end;d.end=e(a);var v=d.end.row-d.start.row,$=f.splice(v,f.length),x=v?a.column:a.column-d.start.column;f.push($[0].substring(0,x)),$[0]=$[0].substr(x);var C={start:e(a),end:s,lines:$,action:d.action};return C}function l(d,a){a=i(a);for(var f=d.length;f--;){for(var s=d[f],v=0;vw&&(c=m.end.row+1,m=r.getNextFoldLine(c,m),w=m?m.start.row:1/0),c>o){for(;this.$lines.getLength()>y+1;)this.$lines.pop();break}S=this.$lines.get(++y),S?S.row=c:(S=this.$lines.createCell(c,i,this.session,e),this.$lines.push(S)),this.$renderCell(S,i,m,c),c++}this._signal("afterRender"),this.$updateGutterWidth(i)},this.$updateGutterWidth=function(i){var r=this.session,n=r.gutterRenderer||this.$renderer,o=r.$firstLineNumber,m=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||r.$useWrapMode)&&(m=r.getLength()+o-1);var w=n?n.getWidth(r,m,i):m.toString().length*i.characterWidth,S=this.$padding||this.$computePadding();w+=S.left+S.right,w!==this.gutterWidth&&!isNaN(w)&&(this.gutterWidth=w,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",w))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var i=this.session.selection.getCursor();this.$cursorRow!==i.row&&(this.$cursorRow=i.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var i=this.session.selection.cursor.row;if(this.$cursorRow=i,!(this.$cursorCell&&this.$cursorCell.row==i)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var r=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(o.row>this.$cursorRow){var m=this.session.getFoldLine(this.$cursorRow);if(n>0&&m&&m.start.row==r[n-1].row)o=r[n-1];else break}o.element.className="ace_gutter-active-line "+o.element.className,this.$cursorCell=o;break}}}}},this.scrollLines=function(i){var r=this.config;if(this.config=i,this.$updateCursorRow(),this.$lines.pageChanged(r,i))return this.update(i);this.$lines.moveContainer(i);var n=Math.min(i.lastRow+i.gutterOffset,this.session.getLength()-1),o=this.oldLastRow;if(this.oldLastRow=n,!r||o0;m--)this.$lines.shift();if(o>n)for(var m=this.session.getFoldedRowCount(n+1,o);m>0;m--)this.$lines.pop();i.firstRowo&&this.$lines.push(this.$renderLines(i,o+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(i)},this.$renderLines=function(i,r,n){for(var o=[],m=r,w=this.session.getNextFoldLine(m),S=w?w.start.row:1/0;m>S&&(m=w.end.row+1,w=this.session.getNextFoldLine(m,w),S=w?w.start.row:1/0),!(m>n);){var y=this.$lines.createCell(m,i,this.session,e);this.$renderCell(y,i,w,m),o.push(y),m++}return o},this.$renderCell=function(i,r,n,o){var m=i.element,w=this.session,S=m.childNodes[0],y=m.childNodes[1],c=w.$firstLineNumber,l=w.$breakpoints,g=w.$decorations,d=w.gutterRenderer||this.$renderer,a=this.$showFoldWidgets&&w.foldWidgets,f=n?n.start.row:Number.MAX_VALUE,s="ace_gutter-cell ";if(this.$highlightGutterLine&&(o==this.$cursorRow||n&&o=f&&this.$cursorRow<=n.end.row)&&(s+="ace_gutter-active-line ",this.$cursorCell!=i&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=i)),l[o]&&(s+=l[o]),g[o]&&(s+=g[o]),this.$annotations[o]&&(s+=this.$annotations[o].className),m.className!=s&&(m.className=s),a){var v=a[o];v==null&&(v=a[o]=w.getFoldWidget(o))}if(v){var s="ace_fold-widget ace_"+v;v=="start"&&o==f&&on.right-r.right)return"foldWidgets"}}).call(t.prototype);function e(i){var r=document.createTextNode("");i.appendChild(r);var n=E.createElement("span");return i.appendChild(n),i}b.Gutter=t}),define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(L,b,B){"use strict";var E=L("../range").Range,A=L("../lib/dom"),p=function(h){this.element=A.createElement("div"),this.element.className="ace_layer ace_marker-layer",h.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(u){this.$padding=u},this.setSession=function(u){this.session=u},this.setMarkers=function(u){this.markers=u},this.elt=function(u,t){var e=this.i!=-1&&this.element.childNodes[this.i];e?this.i++:(e=document.createElement("div"),this.element.appendChild(e),this.i=-1),e.style.cssText=t,e.className=u},this.update=function(u){if(u){this.config=u,this.i=0;var t;for(var e in this.markers){var i=this.markers[e];if(!i.range){i.update(t,this,this.session,u);continue}var r=i.range.clipRows(u.firstRow,u.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var n=this.$getTop(r.start.row,u),o=this.$padding+r.start.column*u.characterWidth;i.renderer(t,r,o,n,u)}else i.type=="fullLine"?this.drawFullLineMarker(t,r,i.clazz,u):i.type=="screenLine"?this.drawScreenLineMarker(t,r,i.clazz,u):r.isMultiLine()?i.type=="text"?this.drawTextMarker(t,r,i.clazz,u):this.drawMultiLineMarker(t,r,i.clazz,u):this.drawSingleLineMarker(t,r,i.clazz+" ace_start ace_br15",u)}if(this.i!=-1)for(;this.ic,w==m),i,w==m?0:1,r)},this.drawMultiLineMarker=function(u,t,e,i,r){var n=this.$padding,o=i.lineHeight,m=this.$getTop(t.start.row,i),w=n+t.start.column*i.characterWidth;if(r=r||"",this.session.$bidiHandler.isBidiRow(t.start.row)){var S=t.clone();S.end.row=S.start.row,S.end.column=this.session.getLine(S.start.row).length,this.drawBidiSingleLineMarker(u,S,e+" ace_br1 ace_start",i,null,r)}else this.elt(e+" ace_br1 ace_start","height:"+o+"px;right:0;top:"+m+"px;left:"+w+"px;"+(r||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var S=t.clone();S.start.row=S.end.row,S.start.column=0,this.drawBidiSingleLineMarker(u,S,e+" ace_br12",i,null,r)}else{m=this.$getTop(t.end.row,i);var y=t.end.column*i.characterWidth;this.elt(e+" ace_br12","height:"+o+"px;width:"+y+"px;top:"+m+"px;left:"+n+"px;"+(r||""))}if(o=(t.end.row-t.start.row-1)*i.lineHeight,!(o<=0)){m=this.$getTop(t.start.row+1,i);var c=(t.start.column?1:0)|(t.end.column?0:8);this.elt(e+(c?" ace_br"+c:""),"height:"+o+"px;right:0;top:"+m+"px;left:"+n+"px;"+(r||""))}},this.drawSingleLineMarker=function(u,t,e,i,r,n){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(u,t,e,i,r,n);var o=i.lineHeight,m=(t.end.column+(r||0)-t.start.column)*i.characterWidth,w=this.$getTop(t.start.row,i),S=this.$padding+t.start.column*i.characterWidth;this.elt(e,"height:"+o+"px;width:"+m+"px;top:"+w+"px;left:"+S+"px;"+(n||""))},this.drawBidiSingleLineMarker=function(u,t,e,i,r,n){var o=i.lineHeight,m=this.$getTop(t.start.row,i),w=this.$padding,S=this.session.$bidiHandler.getSelections(t.start.column,t.end.column);S.forEach(function(y){this.elt(e,"height:"+o+"px;width:"+y.width+(r||0)+"px;top:"+m+"px;left:"+(w+y.left)+"px;"+(n||""))},this)},this.drawFullLineMarker=function(u,t,e,i,r){var n=this.$getTop(t.start.row,i),o=i.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,i)-n),this.elt(e,"height:"+o+"px;top:"+n+"px;left:0;right:0;"+(r||""))},this.drawScreenLineMarker=function(u,t,e,i,r){var n=this.$getTop(t.start.row,i),o=i.lineHeight;this.elt(e,"height:"+o+"px;top:"+n+"px;left:0;right:0;"+(r||""))}}).call(p.prototype),b.Marker=p}),define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],function(L,b,B){"use strict";var E=L("../lib/oop"),A=L("../lib/dom"),p=L("../lib/lang"),h=L("./lines").Lines,u=L("../lib/event_emitter").EventEmitter,t=function(e){this.dom=A,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new h(this.element)};(function(){E.implement(this,u),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",this.SPACE_CHAR="\xB7",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,i=e.getNewLineCharacter()==` -`&&e.getNewLineMode()!="windows",r=i?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=r)return this.EOL_CHAR=r,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(i){this._signal("changeCharacterSize",i)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var i=this.$tabStrings=[0],r=1;rl&&(y=c.end.row+1,c=this.session.getNextFoldLine(y,c),l=c?c.start.row:1/0),!(y>o);){var g=m[w++];if(g){this.dom.removeChildren(g),this.$renderLine(g,y,y==l?c:!1),S&&(g.style.top=this.$lines.computeLineTop(y,e,this.session)+"px");var d=e.lineHeight*this.session.getRowLength(y)+"px";g.style.height!=d&&(S=!0,g.style.height=d)}y++}if(S)for(;w0;o--)this.$lines.shift();if(i.lastRow>e.lastRow)for(var o=this.session.getFoldedRowCount(e.lastRow+1,i.lastRow);o>0;o--)this.$lines.pop();e.firstRowi.lastRow&&this.$lines.push(this.$renderLinesFragment(e,i.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,i,r){for(var n=[],o=i,m=this.session.getNextFoldLine(o),w=m?m.start.row:1/0;o>w&&(o=m.end.row+1,m=this.session.getNextFoldLine(o,m),w=m?m.start.row:1/0),!(o>r);){var S=this.$lines.createCell(o,e,this.session),y=S.element;this.dom.removeChildren(y),A.setStyle(y.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),A.setStyle(y.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(y,o,o==w?m:!1),this.$useLineGroups()?y.className="ace_line_group":y.className="ace_line",n.push(S),o++}return n},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var i=e.firstRow,r=e.lastRow,n=this.$lines;n.getLength();)n.pop();n.push(this.$renderLinesFragment(e,i,r))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,i,r,n){for(var o=this,m=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\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]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,w=this.dom.createFragment(this.element),S,y=0;S=m.exec(n);){var c=S[1],l=S[2],g=S[3],d=S[4],a=S[5];if(!(!o.showSpaces&&l)){var f=y!=S.index?n.slice(y,S.index):"";if(y=S.index+S[0].length,f&&w.appendChild(this.dom.createTextNode(f,this.element)),c){var s=o.session.getScreenTabSize(i+S.index);w.appendChild(o.$tabStrings[s].cloneNode(!0)),i+=s-1}else if(l)if(o.showSpaces){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_space",v.textContent=p.stringRepeat(o.SPACE_CHAR,l.length),w.appendChild(v)}else w.appendChild(this.com.createTextNode(l,this.element));else if(g){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_space ace_invalid",v.textContent=p.stringRepeat(o.SPACE_CHAR,g.length),w.appendChild(v)}else if(d){i+=1;var v=this.dom.createElement("span");v.style.width=o.config.characterWidth*2+"px",v.className=o.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",v.textContent=o.showSpaces?o.SPACE_CHAR:d,w.appendChild(v)}else if(a){i+=1;var v=this.dom.createElement("span");v.style.width=o.config.characterWidth*2+"px",v.className="ace_cjk",v.textContent=a,w.appendChild(v)}}}if(w.appendChild(this.dom.createTextNode(y?n.slice(y):n,this.element)),this.$textToken[r.type])e.appendChild(w);else{var $="ace_"+r.type.replace(/\./g," ace_"),v=this.dom.createElement("span");r.type=="fold"&&(v.style.width=r.value.length*this.config.characterWidth+"px"),v.className=$,v.appendChild(w),e.appendChild(v)}return i+n.length},this.renderIndentGuide=function(e,i,r){var n=i.search(this.$indentGuideRe);if(n<=0||n>=r)return i;if(i[0]==" "){n-=n%this.tabSize;for(var o=n/this.tabSize,m=0;m=m;)w=this.$renderToken(S,w,c,l.substring(0,m-n)),l=l.substring(m-n),n=m,S=this.$createLineElement(),e.appendChild(S),S.appendChild(this.dom.createTextNode(p.stringRepeat("\xA0",r.indent),this.element)),o++,w=0,m=r[o]||Number.MAX_VALUE;l.length!=0&&(n+=l.length,w=this.$renderToken(S,w,c,l))}}r[r.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(S,w,null,"",!0)},this.$renderSimpleLine=function(e,i){var r=0,n=i[0],o=n.value;this.displayIndentGuides&&(o=this.renderIndentGuide(e,o)),o&&(r=this.$renderToken(e,r,n,o));for(var m=1;mthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,r,n,o);r=this.$renderToken(e,r,n,o)}},this.$renderOverflowMessage=function(e,i,r,n,o){r&&this.$renderToken(e,i,r,n.slice(0,this.MAX_LINE_LENGTH-i));var m=this.dom.createElement("span");m.className="ace_inline_button ace_keyword ace_toggle_wrap",m.textContent=o?"":"",e.appendChild(m)},this.$renderLine=function(e,i,r){if(!r&&r!=!1&&(r=this.session.getFoldLine(i)),r)var n=this.$getFoldLineTokens(i,r);else var n=this.session.getTokens(i);var o=e;if(n.length){var m=this.session.getRowSplitData(i);if(m&&m.length){this.$renderWrappedLine(e,n,m);var o=e.lastChild}else{var o=e;this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.$renderSimpleLine(o,n)}}else this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o));if(this.showEOL&&o){r&&(i=r.end.row);var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_eol",w.textContent=i==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(w)}},this.$getFoldLineTokens=function(e,i){var r=this.session,n=[];function o(w,S,y){for(var c=0,l=0;l+w[c].value.lengthy-S&&(g=g.substring(0,y-S)),n.push({type:w[c].type,value:g}),l=S+g.length,c+=1}for(;ly?n.push({type:w[c].type,value:g.substring(0,y-l)}):n.push(w[c]),l+=g.length,c+=1}}var m=r.getTokens(e);return i.walk(function(w,S,y,c,l){w!=null?n.push({type:"fold",value:w}):(l&&(m=r.getTokens(S)),m.length&&o(m,c,y))},i.end.row,this.session.getLine(i.end.row).length),n},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(t.prototype),b.Text=t}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(L,b,B){"use strict";var E=L("../lib/dom"),A=function(p){this.element=E.createElement("div"),this.element.className="ace_layer ace_cursor-layer",p.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),E.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(p){for(var h=this.cursors,u=h.length;u--;)E.setStyle(h[u].style,"opacity",p?"":"0")},this.$startCssAnimation=function(){for(var p=this.cursors,h=p.length;h--;)p[h].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){E.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){E.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(p){this.$padding=p},this.setSession=function(p){this.session=p},this.setBlinking=function(p){p!=this.isBlinking&&(this.isBlinking=p,this.restartTimer())},this.setBlinkInterval=function(p){p!=this.blinkInterval&&(this.blinkInterval=p,this.restartTimer())},this.setSmoothBlinking=function(p){p!=this.smoothBlinking&&(this.smoothBlinking=p,E.setCssClass(this.element,"ace_smooth-blinking",p),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var p=E.createElement("div");return p.className="ace_cursor",this.element.appendChild(p),this.cursors.push(p),p},this.removeCursor=function(){if(this.cursors.length>1){var p=this.cursors.pop();return p.parentNode.removeChild(p),p}},this.hideCursor=function(){this.isVisible=!1,E.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,E.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var p=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&E.removeCssClass(this.element,"ace_smooth-blinking"),p(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&setTimeout(function(){E.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)),E.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var h=function(){this.timeoutId=setTimeout(function(){p(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){p(!0),h()},this.blinkInterval),h()}},this.getPixelPosition=function(p,h){if(!this.config||!this.session)return{left:0,top:0};p||(p=this.session.selection.getCursor());var u=this.session.documentToScreenPosition(p),t=this.$padding+(this.session.$bidiHandler.isBidiRow(u.row,p.row)?this.session.$bidiHandler.getPosLeft(u.column):u.column*this.config.characterWidth),e=(u.row-(h?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:t,top:e}},this.isCursorInView=function(p,h){return p.top>=0&&p.topp.height+p.offset||i.top<0)&&u>1)){var r=this.cursors[t++]||this.addCursor(),n=r.style;this.drawCursor?this.drawCursor(r,i,p,h[u],this.session):this.isCursorInView(i,p)?(E.setStyle(n,"display","block"),E.translate(r,i.left,i.top),E.setStyle(n,"width",Math.round(p.characterWidth)+"px"),E.setStyle(n,"height",p.lineHeight+"px")):E.setStyle(n,"display","none")}}for(;this.cursors.length>t;)this.removeCursor();var o=this.session.getOverwrite();this.$setOverwrite(o),this.$pixelPos=i,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(p){p!=this.overwrite&&(this.overwrite=p,p?E.addCssClass(this.element,"ace_overwrite-cursors"):E.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(A.prototype),b.Cursor=A}),define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(L,b,B){"use strict";var E=L("./lib/oop"),A=L("./lib/dom"),p=L("./lib/event"),h=L("./lib/event_emitter").EventEmitter,u=32768,t=function(r){this.element=A.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=A.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),r.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,p.addListener(this.element,"scroll",this.onScroll.bind(this)),p.addListener(this.element,"mousedown",p.preventDefault)};(function(){E.implement(this,h),this.setVisible=function(r){this.element.style.display=r?"":"none",this.isVisible=r,this.coeff=1}}).call(t.prototype);var e=function(r,n){t.call(this,r),this.scrollTop=0,this.scrollHeight=0,n.$scrollbarWidth=this.width=A.scrollbarWidth(r.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};E.inherits(e,t),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var r=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-r)/(this.coeff-r)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(r){this.element.style.height=r+"px"},this.setInnerHeight=this.setScrollHeight=function(r){this.scrollHeight=r,r>u?(this.coeff=u/r,r=u):this.coeff!=1&&(this.coeff=1),this.inner.style.height=r+"px"},this.setScrollTop=function(r){this.scrollTop!=r&&(this.skipEvent=!0,this.scrollTop=r,this.element.scrollTop=r*this.coeff)}}.call(e.prototype);var i=function(r,n){t.call(this,r),this.scrollLeft=0,this.height=n.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};E.inherits(i,t),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(r){this.element.style.width=r+"px"},this.setInnerWidth=function(r){this.inner.style.width=r+"px"},this.setScrollWidth=function(r){this.inner.style.width=r+"px"},this.setScrollLeft=function(r){this.scrollLeft!=r&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=r)}}.call(i.prototype),b.ScrollBar=e,b.ScrollBarV=e,b.ScrollBarH=i,b.VScrollBar=e,b.HScrollBar=i}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(L,b,B){"use strict";var E=L("./lib/event"),A=function(p,h){this.onRender=p,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=h||window;var u=this;this._flush=function(t){u.pending=!1;var e=u.changes;if(e&&(E.blockIdle(100),u.changes=0,u.onRender(e)),u.changes){if(u.$recursionLimit--<0)return;u.schedule()}else u.$recursionLimit=2}};(function(){this.schedule=function(p){this.changes=this.changes|p,this.changes&&!this.pending&&(E.nextFrame(this._flush),this.pending=!0)},this.clear=function(p){var h=this.changes;return this.changes=0,h}}).call(A.prototype),b.RenderLoop=A}),define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(L,b,B){var E=L("../lib/oop"),A=L("../lib/dom"),p=L("../lib/lang"),h=L("../lib/event"),u=L("../lib/useragent"),t=L("../lib/event_emitter").EventEmitter,e=256,i=typeof ResizeObserver=="function",r=200,n=b.FontMetrics=function(o){this.el=A.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=A.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=A.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),o.appendChild(this.el),this.$measureNode.textContent=p.stringRepeat("X",e),this.$characterSize={width:0,height:0},i?this.$addObserver():this.checkForSizeChanges()};(function(){E.implement(this,t),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(o,m){o.width=o.height="auto",o.left=o.top="0px",o.visibility="hidden",o.position="absolute",o.whiteSpace="pre",u.isIE<8?o["font-family"]="inherit":o.font="inherit",o.overflow=m?"hidden":"visible"},this.checkForSizeChanges=function(o){if(o===void 0&&(o=this.$measureSizes()),o&&(this.$characterSize.width!==o.width||this.$characterSize.height!==o.height)){this.$measureNode.style.fontWeight="bold";var m=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=o,this.charSizes=Object.create(null),this.allowBoldFonts=m&&m.width===o.width&&m.height===o.height,this._emit("changeCharacterSize",{data:o})}},this.$addObserver=function(){var o=this;this.$observer=new window.ResizeObserver(function(m){o.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var o=this;return this.$pollSizeChangesTimer=h.onIdle(function m(){o.checkForSizeChanges(),h.onIdle(m,500)},500)},this.setPolling=function(o){o?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(o){var m={height:(o||this.$measureNode).clientHeight,width:(o||this.$measureNode).clientWidth/e};return m.width===0||m.height===0?null:m},this.$measureCharWidth=function(o){this.$main.textContent=p.stringRepeat(o,e);var m=this.$main.getBoundingClientRect();return m.width/e},this.getCharacterWidth=function(o){var m=this.charSizes[o];return m===void 0&&(m=this.charSizes[o]=this.$measureCharWidth(o)/this.$characterSize.width),m},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function o(m){return!m||!m.parentElement?1:(window.getComputedStyle(m).zoom||1)*o(m.parentElement)},this.$initTransformMeasureNodes=function(){var o=function(m,w){return["div",{style:"position: absolute;top:"+m+"px;left:"+w+"px;"}]};this.els=A.buildDom([o(0,0),o(r,0),o(0,r),o(r,r)],this.el)},this.transformCoordinates=function(o,m){if(o){var w=this.$getZoom(this.el);o=l(1/w,o)}function S(I,D,T){var P=I[1]*D[0]-I[0]*D[1];return[(-D[1]*T[0]+D[0]*T[1])/P,(+I[1]*T[0]-I[0]*T[1])/P]}function y(I,D){return[I[0]-D[0],I[1]-D[1]]}function c(I,D){return[I[0]+D[0],I[1]+D[1]]}function l(I,D){return[I*D[0],I*D[1]]}this.els||this.$initTransformMeasureNodes();function g(I){var D=I.getBoundingClientRect();return[D.left,D.top]}var d=g(this.els[0]),a=g(this.els[1]),f=g(this.els[2]),s=g(this.els[3]),v=S(y(s,a),y(s,f),y(c(a,f),c(s,d))),$=l(1+v[0],y(a,d)),x=l(1+v[1],y(f,d));if(m){var C=m,k=v[0]*C[0]/r+v[1]*C[1]/r+1,R=c(l(C[0],$),l(C[1],x));return c(l(1/k/r,R),d)}var _=y(o,d),O=S(y($,l(v[0],_)),y(x,l(v[1],_)),_);return l(r,O)}}).call(n.prototype)}),define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","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","ace/lib/useragent"],function(L,b,B){"use strict";var E=L("./lib/oop"),A=L("./lib/dom"),p=L("./config"),h=L("./layer/gutter").Gutter,u=L("./layer/marker").Marker,t=L("./layer/text").Text,e=L("./layer/cursor").Cursor,i=L("./scrollbar").HScrollBar,r=L("./scrollbar").VScrollBar,n=L("./renderloop").RenderLoop,o=L("./layer/font_metrics").FontMetrics,m=L("./lib/event_emitter").EventEmitter,w=`.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;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.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;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.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;contain: style size layout;}.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 {position: absolute;top: 0;left: 0;right: 0;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 {contain: strict;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;contain: strict;-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: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.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_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.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_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {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: 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;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 {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_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {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_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}`,S=L("./lib/useragent"),y=S.isIE;A.importCssString(w,"ace_editor.css");var c=function(l,g){var d=this;this.container=l||A.createElement("div"),A.addCssClass(this.container,"ace_editor"),A.HI_DPI&&A.addCssClass(this.container,"ace_hidpi"),this.setTheme(g),this.$gutter=A.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=A.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=A.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new u(this.content);var a=this.$textLayer=new t(this.content);this.canvas=a.element,this.$markerFront=new u(this.content),this.$cursorLayer=new e(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new r(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.on("scroll",function(f){d.$scrollAnimation||d.session.setScrollTop(f.data-d.scrollMargin.top)}),this.scrollBarH.on("scroll",function(f){d.$scrollAnimation||d.session.setScrollLeft(f.data-d.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new o(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(f){d.updateCharacterSize(),d.onResize(!0,d.gutterWidth,d.$size.width,d.$size.height),d._signal("changeCharacterSize",f)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},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.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!S.isIOS,this.$loop=new n(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),p.resetOptions(this),p._signal("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,E.implement(this,m),this.updateCharacterSize=function(){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(),A.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(l){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=l,l&&this.scrollMargin.top&&l.getScrollTop()<=0&&l.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(l),this.$markerBack.setSession(l),this.$markerFront.setSession(l),this.$gutterLayer.setSession(l),this.$textLayer.setSession(l),l&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(l,g,d){if(g===void 0&&(g=1/0),this.$changedLines?(this.$changedLines.firstRow>l&&(this.$changedLines.firstRow=l),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},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(l){l?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(l,g,d,a){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=l?1:0;var f=this.container;a||(a=f.clientHeight||f.scrollHeight),d||(d=f.clientWidth||f.scrollWidth);var s=this.$updateCachedSize(l,g,d,a);if(!this.$size.scrollerHeight||!d&&!a)return this.resizing=0;l&&(this.$gutterLayer.$padding=null),l?this.$renderChanges(s|this.$changes,!0):this.$loop.schedule(s|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(l,g,d,a){a-=this.$extraHeight||0;var f=0,s=this.$size,v={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(a&&(l||s.height!=a)&&(s.height=a,f|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",f=f|this.CHANGE_SCROLL),d&&(l||s.width!=d)){f|=this.CHANGE_SIZE,s.width=d,g==null&&(g=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=g,A.setStyle(this.scrollBarH.element.style,"left",g+"px"),A.setStyle(this.scroller.style,"left",g+this.margin.left+"px"),s.scrollerWidth=Math.max(0,d-g-this.scrollBarV.getWidth()-this.margin.h),A.setStyle(this.$gutter.style,"left",this.margin.left+"px");var $=this.scrollBarV.getWidth()+"px";A.setStyle(this.scrollBarH.element.style,"right",$),A.setStyle(this.scroller.style,"right",$),A.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||l)&&(f|=this.CHANGE_FULL)}return s.$dirty=!d||!a,f&&this._signal("resize",v),f},this.onGutterResize=function(l){var g=this.$showGutter?l:0;g!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,g,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var l=this.$size.scrollerWidth-this.$padding*2,g=Math.floor(l/this.characterWidth);return this.session.adjustWrapLimit(g,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(l){this.setOption("animatedScroll",l)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(l){this.setOption("showInvisibles",l),this.session.$bidiHandler.setShowInvisibles(l)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(l){this.setOption("displayIndentGuides",l)},this.setShowPrintMargin=function(l){this.setOption("showPrintMargin",l)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(l){this.setOption("printMarginColumn",l)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(l){return this.setOption("showGutter",l)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(l){this.setOption("fadeFoldWidgets",l)},this.setHighlightGutterLine=function(l){this.setOption("highlightGutterLine",l)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var l=A.createElement("div");l.className="ace_layer ace_print-margin-layer",this.$printMarginEl=A.createElement("div"),this.$printMarginEl.className="ace_print-margin",l.appendChild(this.$printMarginEl),this.content.insertBefore(l,this.content.firstChild)}var g=this.$printMarginEl.style;g.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",g.visibility=this.$showPrintMargin?"visible":"hidden",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.$isMousePressed){var l=this.textarea.style,g=this.$composition;if(!this.$keepTextAreaAtCursor&&!g){A.translate(this.textarea,-100,0);return}var d=this.$cursorLayer.$pixelPos;if(d){g&&g.markerRange&&(d=this.$cursorLayer.getPixelPosition(g.markerRange.start,!0));var a=this.layerConfig,f=d.top,s=d.left;f-=a.offset;var v=g&&g.useTextareaForIME?this.lineHeight:y?0:1;if(f<0||f>a.height-v){A.translate(this.textarea,0,0);return}var $=1,x=this.$size.height-v;if(!g)f+=this.lineHeight;else if(g.useTextareaForIME){var C=this.textarea.value;$=this.characterWidth*this.session.$getStringScreenWidth(C)[0]}else f+=this.lineHeight+2;s-=this.scrollLeft,s>this.$size.scrollerWidth-$&&(s=this.$size.scrollerWidth-$),s+=this.gutterWidth+this.margin.left,A.setStyle(l,"height",v+"px"),A.setStyle(l,"width",$+"px"),A.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-$),Math.min(f,x))}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},this.getLastFullyVisibleRow=function(){var l=this.layerConfig,g=l.lastRow,d=this.session.documentToScreenRow(g,0)*l.lineHeight;return d-this.session.getScrollTop()>l.height-l.lineHeight?g-1:g},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(l){this.$padding=l,this.$textLayer.setPadding(l),this.$cursorLayer.setPadding(l),this.$markerFront.setPadding(l),this.$markerBack.setPadding(l),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(l,g,d,a){var f=this.scrollMargin;f.top=l|0,f.bottom=g|0,f.right=a|0,f.left=d|0,f.v=f.top+f.bottom,f.h=f.left+f.right,f.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-f.top),this.updateFull()},this.setMargin=function(l,g,d,a){var f=this.margin;f.top=l|0,f.bottom=g|0,f.right=a|0,f.left=d|0,f.v=f.top+f.bottom,f.h=f.left+f.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(l){this.setOption("hScrollBarAlwaysVisible",l)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(l){this.setOption("vScrollBarAlwaysVisible",l)},this.$updateScrollBarV=function(){var l=this.layerConfig.maxHeight,g=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(l-=(g-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>l-g&&(l=this.scrollTop+g,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(l+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=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(l,g){if(this.$changes&&(l|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!l&&!g){this.$changes|=l;return}if(this.$size.$dirty)return this.$changes|=l,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",l),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var d=this.layerConfig;if(l&this.CHANGE_FULL||l&this.CHANGE_SIZE||l&this.CHANGE_TEXT||l&this.CHANGE_LINES||l&this.CHANGE_SCROLL||l&this.CHANGE_H_SCROLL){if(l|=this.$computeLayerConfig()|this.$loop.clear(),d.firstRow!=this.layerConfig.firstRow&&d.firstRowScreen==this.layerConfig.firstRowScreen){var a=this.scrollTop+(d.firstRow-this.layerConfig.firstRow)*this.lineHeight;a>0&&(this.scrollTop=a,l=l|this.CHANGE_SCROLL,l|=this.$computeLayerConfig()|this.$loop.clear())}d=this.layerConfig,this.$updateScrollBarV(),l&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),A.translate(this.content,-this.scrollLeft,-d.offset);var f=d.width+2*this.$padding+"px",s=d.minHeight+"px";A.setStyle(this.content.style,"width",f),A.setStyle(this.content.style,"height",s)}if(l&this.CHANGE_H_SCROLL&&(A.translate(this.content,-this.scrollLeft,-d.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),l&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(d),this.$showGutter&&this.$gutterLayer.update(d),this.$markerBack.update(d),this.$markerFront.update(d),this.$cursorLayer.update(d),this.$moveTextAreaToCursor(),this._signal("afterRender",l);return}if(l&this.CHANGE_SCROLL){this.$changedLines=null,l&this.CHANGE_TEXT||l&this.CHANGE_LINES?this.$textLayer.update(d):this.$textLayer.scrollLines(d),this.$showGutter&&(l&this.CHANGE_GUTTER||l&this.CHANGE_LINES?this.$gutterLayer.update(d):this.$gutterLayer.scrollLines(d)),this.$markerBack.update(d),this.$markerFront.update(d),this.$cursorLayer.update(d),this.$moveTextAreaToCursor(),this._signal("afterRender",l);return}l&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(d),this.$showGutter&&this.$gutterLayer.update(d)):l&this.CHANGE_LINES?(this.$updateLines()||l&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(d):l&this.CHANGE_TEXT||l&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(d):l&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(d),l&this.CHANGE_CURSOR&&(this.$cursorLayer.update(d),this.$moveTextAreaToCursor()),l&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(d),l&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(d),this._signal("afterRender",l)},this.$autosize=function(){var l=this.session.getScreenLength()*this.lineHeight,g=this.$maxLines*this.lineHeight,d=Math.min(g,Math.max((this.$minLines||1)*this.lineHeight,l))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(d+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&d>this.$maxPixelHeight&&(d=this.$maxPixelHeight);var a=d<=2*this.lineHeight,f=!a&&l>g;if(d!=this.desiredHeight||this.$size.height!=this.desiredHeight||f!=this.$vScroll){f!=this.$vScroll&&(this.$vScroll=f,this.scrollBarV.setVisible(f));var s=this.container.clientWidth;this.container.style.height=d+"px",this.$updateCachedSize(!0,this.$gutterWidth,s,d),this.desiredHeight=d,this._signal("autosize")}},this.$computeLayerConfig=function(){var l=this.session,g=this.$size,d=g.height<=2*this.lineHeight,a=this.session.getScreenLength(),f=a*this.lineHeight,s=this.$getLongestLine(),v=!d&&(this.$hScrollBarAlwaysVisible||g.scrollerWidth-s-2*this.$padding<0),$=this.$horizScroll!==v;$&&(this.$horizScroll=v,this.scrollBarH.setVisible(v));var x=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var C=g.scrollerHeight+this.lineHeight,k=!this.$maxLines&&this.$scrollPastEnd?(g.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;f+=k;var R=this.scrollMargin;this.session.setScrollTop(Math.max(-R.top,Math.min(this.scrollTop,f-g.scrollerHeight+R.bottom))),this.session.setScrollLeft(Math.max(-R.left,Math.min(this.scrollLeft,s+2*this.$padding-g.scrollerWidth+R.right)));var _=!d&&(this.$vScrollBarAlwaysVisible||g.scrollerHeight-f+k<0||this.scrollTop>R.top),O=x!==_;O&&(this.$vScroll=_,this.scrollBarV.setVisible(_));var I=this.scrollTop%this.lineHeight,D=Math.ceil(C/this.lineHeight)-1,T=Math.max(0,Math.round((this.scrollTop-I)/this.lineHeight)),P=T+D,M,W,N=this.lineHeight;T=l.screenToDocumentRow(T,0);var G=l.getFoldLine(T);G&&(T=G.start.row),M=l.documentToScreenRow(T,0),W=l.getRowLength(T)*N,P=Math.min(l.screenToDocumentRow(P,0),l.getLength()-1),C=g.scrollerHeight+l.getRowLength(P)*N+W,I=this.scrollTop-M*N;var z=0;return(this.layerConfig.width!=s||$)&&(z=this.CHANGE_H_SCROLL),($||O)&&(z|=this.$updateCachedSize(!0,this.gutterWidth,g.width,g.height),this._signal("scrollbarVisibilityChanged"),O&&(s=this.$getLongestLine())),this.layerConfig={width:s,padding:this.$padding,firstRow:T,firstRowScreen:M,lastRow:P,lineHeight:N,characterWidth:this.characterWidth,minHeight:C,maxHeight:f,offset:I,gutterOffset:N?Math.max(0,Math.ceil((I+g.height-g.scrollerHeight)/N)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(s-this.$padding),z},this.$updateLines=function(){if(this.$changedLines){var l=this.$changedLines.firstRow,g=this.$changedLines.lastRow;this.$changedLines=null;var d=this.layerConfig;if(!(l>d.lastRow+1)&&!(gthis.$textLayer.MAX_LINE_LENGTH&&(l=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(l*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),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(l,g){this.$gutterLayer.addGutterDecoration(l,g)},this.removeGutterDecoration=function(l,g){this.$gutterLayer.removeGutterDecoration(l,g)},this.updateBreakpoints=function(l){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(l){this.$gutterLayer.setAnnotations(l),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(l,g,d){this.scrollCursorIntoView(l,d),this.scrollCursorIntoView(g,d)},this.scrollCursorIntoView=function(l,g,d){if(this.$size.scrollerHeight!==0){var a=this.$cursorLayer.getPixelPosition(l),f=a.left,s=a.top,v=d&&d.top||0,$=d&&d.bottom||0,x=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;x+v>s?(g&&x+v>s+this.lineHeight&&(s-=g*this.$size.scrollerHeight),s===0&&(s=-this.scrollMargin.top),this.session.setScrollTop(s)):x+this.$size.scrollerHeight-$f?(f=1-this.scrollMargin.top||g>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||l<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||l>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},this.pixelToScreenCoordinates=function(l,g){var d;if(this.$hasCssTransforms){d={top:0,left:0};var a=this.$fontMetrics.transformCoordinates([l,g]);l=a[1]-this.gutterWidth-this.margin.left,g=a[0]}else d=this.scroller.getBoundingClientRect();var f=l+this.scrollLeft-d.left-this.$padding,s=f/this.characterWidth,v=Math.floor((g+this.scrollTop-d.top)/this.lineHeight),$=this.$blockCursor?Math.floor(s):Math.round(s);return{row:v,column:$,side:s-$>0?1:-1,offsetX:f}},this.screenToTextCoordinates=function(l,g){var d;if(this.$hasCssTransforms){d={top:0,left:0};var a=this.$fontMetrics.transformCoordinates([l,g]);l=a[1]-this.gutterWidth-this.margin.left,g=a[0]}else d=this.scroller.getBoundingClientRect();var f=l+this.scrollLeft-d.left-this.$padding,s=f/this.characterWidth,v=this.$blockCursor?Math.floor(s):Math.round(s),$=Math.floor((g+this.scrollTop-d.top)/this.lineHeight);return this.session.screenToDocumentPosition($,Math.max(v,0),f)},this.textToScreenCoordinates=function(l,g){var d=this.scroller.getBoundingClientRect(),a=this.session.documentToScreenPosition(l,g),f=this.$padding+(this.session.$bidiHandler.isBidiRow(a.row,l)?this.session.$bidiHandler.getPosLeft(a.column):Math.round(a.column*this.characterWidth)),s=a.row*this.lineHeight;return{pageX:d.left+f-this.scrollLeft,pageY:d.top+s-this.scrollTop}},this.visualizeFocus=function(){A.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){A.removeCssClass(this.container,"ace_focus")},this.showComposition=function(l){this.$composition=l,l.cssText||(l.cssText=this.textarea.style.cssText),l.useTextareaForIME==null&&(l.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(A.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):l.markerId=this.session.addMarker(l.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(l){var g=this.session.selection.cursor;this.addToken(l,"composition_placeholder",g.row,g.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),A.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var l=this.session.selection.cursor;this.removeExtraToken(l.row,l.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(l,g,d,a){var f=this.session;f.bgTokenizer.lines[d]=null;var s={type:g,value:l},v=f.getTokens(d);if(a==null)v.push(s);else for(var $=0,x=0;x"u")return{postMessage:function(){},terminate:function(){}};if(h.get("loadWorkerFromBlob")){var n=u(r),o=window.URL||window.webkitURL,m=o.createObjectURL(n);return new Worker(m)}return new Worker(r)}var e=function(r){r.postMessage||(r=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=r,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){E.implement(this,p),this.$createWorkerFromOldConfig=function(r,n,o,m,w){if(L.nameToUrl&&!L.toUrl&&(L.toUrl=L.nameToUrl),h.get("packaged")||!L.toUrl)m=m||h.moduleUrl(n,"worker");else{var S=this.$normalizePath;m=m||S(L.toUrl("ace/worker/worker.js",null,"_"));var y={};r.forEach(function(c){y[c]=S(L.toUrl(c,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=t(m),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:y,module:n,classname:o}),this.$worker},this.onMessage=function(r){var n=r.data;switch(n.type){case"event":this._signal(n.name,{data:n.data});break;case"call":var o=this.callbacks[n.id];o&&(o(n.data),delete this.callbacks[n.id]);break;case"error":this.reportError(n.data);break;case"log":window.console&&console.log&&console.log.apply(console,n.data);break}},this.reportError=function(r){window.console&&console.error&&console.error(r)},this.$normalizePath=function(r){return A.qualifyURL(r)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(r,n){this.$worker.postMessage({command:r,args:n})},this.call=function(r,n,o){if(o){var m=this.callbackId++;this.callbacks[m]=o,n.push(m)}this.send(r,n)},this.emit=function(r,n){try{n.data&&n.data.err&&(n.data.err={message:n.data.err.message,stack:n.data.err.stack,code:n.data.err.code}),this.$worker.postMessage({event:r,data:{data:n.data}})}catch(o){console.error(o.stack)}},this.attachToDocument=function(r){this.$doc&&this.terminate(),this.$doc=r,this.call("setValue",[r.getValue()]),r.on("change",this.changeListener)},this.changeListener=function(r){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),r.action=="insert"?this.deltaQueue.push(r.start,r.lines):this.deltaQueue.push(r.start,r.end)},this.$sendDeltaQueue=function(){var r=this.deltaQueue;r&&(this.deltaQueue=null,r.length>50&&r.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:r}))}}).call(e.prototype);var i=function(r,n,o){var m=null,w=!1,S=Object.create(p),y=[],c=new e({messageBuffer:y,terminate:function(){},postMessage:function(g){y.push(g),m&&(w?setTimeout(l):l())}});c.setEmitSync=function(g){w=g};var l=function(){var g=y.shift();g.command?m[g.command].apply(m,g.args):g.event&&S._signal(g.event,g.data)};return S.postMessage=function(g){c.onMessage({data:g})},S.callback=function(g,d){this.postMessage({type:"call",id:d,data:g})},S.emit=function(g,d){this.postMessage({type:"event",name:g,data:d})},h.loadModule(["worker",n],function(g){for(m=new g[o](S);y.length;)l()}),c};b.UIWorkerClient=i,b.WorkerClient=e,b.createWorker=t}),define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(L,b,B){"use strict";var E=L("./range").Range,A=L("./lib/event_emitter").EventEmitter,p=L("./lib/oop"),h=function(u,t,e,i,r,n){var o=this;this.length=t,this.session=u,this.doc=u.getDocument(),this.mainClass=r,this.othersClass=n,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=e;var m=u.getUndoManager().$undoStack||u.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=m.length,this.setup(),u.selection.on("changeCursor",this.$onCursorChange)};(function(){p.implement(this,A),this.setup=function(){var u=this,t=this.doc,e=this.session;this.selectionBefore=e.selection.toJSON(),e.selection.inMultiSelectMode&&e.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=e.addMarker(new E(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(r){var n=t.createAnchor(r.row,r.column);n.$insertRight=!0,n.detach(),u.others.push(n)}),e.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var u=this.session,t=this;this.othersActive=!0,this.others.forEach(function(e){e.markerId=u.addMarker(new E(e.row,e.column,e.row,e.column+t.length),t.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var u=0;u=this.pos.column&&t.start.column<=this.pos.column+this.length+1,r=t.start.column-this.pos.column;if(this.updateAnchors(u),i&&(this.length+=e),i&&!this.session.$fromUndo){if(u.action==="insert")for(var n=this.others.length-1;n>=0;n--){var o=this.others[n],m={row:o.row,column:o.column+r};this.doc.insertMergedLines(m,u.lines)}else if(u.action==="remove")for(var n=this.others.length-1;n>=0;n--){var o=this.others[n],m={row:o.row,column:o.column+r};this.doc.remove(new E(m.row,m.column,m.row,m.column-e))}}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(u){this.pos.onChange(u);for(var t=this.others.length;t--;)this.others[t].onChange(u);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var u=this,t=this.session,e=function(r,n){t.removeMarker(r.markerId),r.markerId=t.addMarker(new E(r.row,r.column,r.row,r.column+u.length),n,null,!1)};e(this.pos,this.mainClass);for(var i=this.others.length;i--;)e(this.others[i],this.othersClass)}},this.onCursorChange=function(u){if(!(this.$updating||!this.session)){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",u)):(this.hideOtherMarkers(),this._emit("cursorLeave",u))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(this.$undoStackDepth!==-1){for(var u=this.session.getUndoManager(),t=(u.$undoStack||u.$undostack).length-this.$undoStackDepth,e=0;e1?A.multiSelect.joinSelections():A.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(A){A.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(A){A.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(A){A.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],b.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(A){A.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(A){return A&&A.inMultiSelectMode}}];var E=L("../keyboard/hash_handler").HashHandler;b.keyboardHandler=new E(b.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(L,b,B){var E=L("./range_list").RangeList,A=L("./range").Range,p=L("./selection").Selection,h=L("./mouse/multi_select_handler").onMouseDown,u=L("./lib/event"),t=L("./lib/lang"),e=L("./commands/multi_select_commands");b.commands=e.defaultCommands.concat(e.multiSelectCommands);var i=L("./search").Search,r=new i;function n(c,l,g){return r.$options.wrap=!0,r.$options.needle=l,r.$options.backwards=g==-1,r.find(c)}var o=L("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(o.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(c,l){if(c){if(!this.inMultiSelectMode&&this.rangeCount===0){var g=this.toOrientedRange();if(this.rangeList.add(g),this.rangeList.add(c),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),l||this.fromOrientedRange(c);this.rangeList.removeAll(),this.rangeList.add(g),this.$onAddRange(g)}c.cursor||(c.cursor=c.end);var d=this.rangeList.add(c);return this.$onAddRange(c),d.length&&this.$onRemoveRange(d),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),l||this.fromOrientedRange(c)}},this.toSingleRange=function(c){c=c||this.ranges[0];var l=this.rangeList.removeAll();l.length&&this.$onRemoveRange(l),c&&this.fromOrientedRange(c)},this.substractPoint=function(c){var l=this.rangeList.substractPoint(c);if(l)return this.$onRemoveRange(l),l[0]},this.mergeOverlappingRanges=function(){var c=this.rangeList.merge();c.length&&this.$onRemoveRange(c)},this.$onAddRange=function(c){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(c),this._signal("addRange",{range:c})},this.$onRemoveRange=function(c){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var l=this.rangeList.ranges.pop();c.push(l),this.rangeCount=0}for(var g=c.length;g--;){var d=this.ranges.indexOf(c[g]);this.ranges.splice(d,1)}this._signal("removeRange",{ranges:c}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),l=l||this.ranges[0],l&&!l.isEqual(this.getRange())&&this.fromOrientedRange(l)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new E,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var c=this.ranges.length?this.ranges:[this.getRange()],l=[],g=0;g1){var c=this.rangeList.ranges,l=c[c.length-1],g=A.fromPoints(c[0].start,l.end);this.toSingleRange(),this.setSelectionRange(g,l.cursor==l.start)}else{var d=this.session.documentToScreenPosition(this.cursor),a=this.session.documentToScreenPosition(this.anchor),f=this.rectangularRangeBlock(d,a);f.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(c,l,g){var d=[],a=c.column0;)I--;if(I>0)for(var D=0;d[D].isEmpty();)D++;for(var T=I;T>=D;T--)d[T].isEmpty()&&d.splice(T,1)}return d}}.call(p.prototype);var m=L("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(c){c.cursor||(c.cursor=c.end);var l=this.getSelectionStyle();return c.marker=this.session.addMarker(c,"ace_selection",l),this.session.$selectionMarkers.push(c),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,c},this.removeSelectionMarker=function(c){if(c.marker){this.session.removeMarker(c.marker);var l=this.session.$selectionMarkers.indexOf(c);l!=-1&&this.session.$selectionMarkers.splice(l,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(c){for(var l=this.session.$selectionMarkers,g=c.length;g--;){var d=c[g];if(d.marker){this.session.removeMarker(d.marker);var a=l.indexOf(d);a!=-1&&l.splice(a,1)}}this.session.selectionMarkerCount=l.length},this.$onAddRange=function(c){this.addSelectionMarker(c.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(c){this.removeSelectionMarkers(c.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(c){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(e.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(c){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(e.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(c){var l=c.command,g=c.editor;if(g.multiSelect){if(l.multiSelectAction)l.multiSelectAction=="forEach"?d=g.forEachSelection(l,c.args):l.multiSelectAction=="forEachLine"?d=g.forEachSelection(l,c.args,!0):l.multiSelectAction=="single"?(g.exitMultiSelectMode(),d=l.exec(g,c.args||{})):d=l.multiSelectAction(g,c.args||{});else{var d=l.exec(g,c.args||{});g.multiSelect.addRange(g.multiSelect.toOrientedRange()),g.multiSelect.mergeOverlappingRanges()}return d}},this.forEachSelection=function(c,l,g){if(!this.inVirtualSelectionMode){var d=g&&g.keepOrder,a=g==!0||g&&g.$byLines,f=this.session,s=this.selection,v=s.rangeList,$=(d?s:v).ranges,x;if(!$.length)return c.exec?c.exec(this,l||{}):c(this,l||{});var C=s._eventRegistry;s._eventRegistry={};var k=new p(f);this.inVirtualSelectionMode=!0;for(var R=$.length;R--;){if(a)for(;R>0&&$[R].start.row==$[R-1].end.row;)R--;k.fromOrientedRange($[R]),k.index=R,this.selection=f.selection=k;var _=c.exec?c.exec(this,l||{}):c(this,l||{});!x&&_!==void 0&&(x=_),k.toOrientedRange($[R])}k.detach(),this.selection=f.selection=s,this.inVirtualSelectionMode=!1,s._eventRegistry=C,s.mergeOverlappingRanges(),s.ranges[0]&&s.fromOrientedRange(s.ranges[0]);var O=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),O&&O.from==O.to&&this.renderer.animateScrolling(O.from),x}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var c="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var l=this.multiSelect.rangeList.ranges,g=[],d=0;d0);s<0&&(s=0),v>=x&&(v=x-1)}var k=this.session.removeFullLines(s,v);k=this.$reAlignText(k,$),this.session.insert({row:s,column:0},k.join(` +`&&e.getNewLineMode()!="windows",r=i?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=r)return this.EOL_CHAR=r,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(i){this._signal("changeCharacterSize",i)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var i=this.$tabStrings=[0],r=1;rl&&(y=c.end.row+1,c=this.session.getNextFoldLine(y,c),l=c?c.start.row:1/0),!(y>o);){var g=m[w++];if(g){this.dom.removeChildren(g),this.$renderLine(g,y,y==l?c:!1),S&&(g.style.top=this.$lines.computeLineTop(y,e,this.session)+"px");var d=e.lineHeight*this.session.getRowLength(y)+"px";g.style.height!=d&&(S=!0,g.style.height=d)}y++}if(S)for(;w0;o--)this.$lines.shift();if(i.lastRow>e.lastRow)for(var o=this.session.getFoldedRowCount(e.lastRow+1,i.lastRow);o>0;o--)this.$lines.pop();e.firstRowi.lastRow&&this.$lines.push(this.$renderLinesFragment(e,i.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,i,r){for(var n=[],o=i,m=this.session.getNextFoldLine(o),w=m?m.start.row:1/0;o>w&&(o=m.end.row+1,m=this.session.getNextFoldLine(o,m),w=m?m.start.row:1/0),!(o>r);){var S=this.$lines.createCell(o,e,this.session),y=S.element;this.dom.removeChildren(y),A.setStyle(y.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),A.setStyle(y.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(y,o,o==w?m:!1),this.$useLineGroups()?y.className="ace_line_group":y.className="ace_line",n.push(S),o++}return n},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var i=e.firstRow,r=e.lastRow,n=this.$lines;n.getLength();)n.pop();n.push(this.$renderLinesFragment(e,i,r))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,i,r,n){for(var o=this,m=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\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]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,w=this.dom.createFragment(this.element),S,y=0;S=m.exec(n);){var c=S[1],l=S[2],g=S[3],d=S[4],a=S[5];if(!(!o.showSpaces&&l)){var f=y!=S.index?n.slice(y,S.index):"";if(y=S.index+S[0].length,f&&w.appendChild(this.dom.createTextNode(f,this.element)),c){var s=o.session.getScreenTabSize(i+S.index);w.appendChild(o.$tabStrings[s].cloneNode(!0)),i+=s-1}else if(l)if(o.showSpaces){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_space",v.textContent=p.stringRepeat(o.SPACE_CHAR,l.length),w.appendChild(v)}else w.appendChild(this.com.createTextNode(l,this.element));else if(g){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_space ace_invalid",v.textContent=p.stringRepeat(o.SPACE_CHAR,g.length),w.appendChild(v)}else if(d){i+=1;var v=this.dom.createElement("span");v.style.width=o.config.characterWidth*2+"px",v.className=o.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",v.textContent=o.showSpaces?o.SPACE_CHAR:d,w.appendChild(v)}else if(a){i+=1;var v=this.dom.createElement("span");v.style.width=o.config.characterWidth*2+"px",v.className="ace_cjk",v.textContent=a,w.appendChild(v)}}}if(w.appendChild(this.dom.createTextNode(y?n.slice(y):n,this.element)),this.$textToken[r.type])e.appendChild(w);else{var $="ace_"+r.type.replace(/\./g," ace_"),v=this.dom.createElement("span");r.type=="fold"&&(v.style.width=r.value.length*this.config.characterWidth+"px"),v.className=$,v.appendChild(w),e.appendChild(v)}return i+n.length},this.renderIndentGuide=function(e,i,r){var n=i.search(this.$indentGuideRe);if(n<=0||n>=r)return i;if(i[0]==" "){n-=n%this.tabSize;for(var o=n/this.tabSize,m=0;m=m;)w=this.$renderToken(S,w,c,l.substring(0,m-n)),l=l.substring(m-n),n=m,S=this.$createLineElement(),e.appendChild(S),S.appendChild(this.dom.createTextNode(p.stringRepeat("\xA0",r.indent),this.element)),o++,w=0,m=r[o]||Number.MAX_VALUE;l.length!=0&&(n+=l.length,w=this.$renderToken(S,w,c,l))}}r[r.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(S,w,null,"",!0)},this.$renderSimpleLine=function(e,i){var r=0,n=i[0],o=n.value;this.displayIndentGuides&&(o=this.renderIndentGuide(e,o)),o&&(r=this.$renderToken(e,r,n,o));for(var m=1;mthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,r,n,o);r=this.$renderToken(e,r,n,o)}},this.$renderOverflowMessage=function(e,i,r,n,o){r&&this.$renderToken(e,i,r,n.slice(0,this.MAX_LINE_LENGTH-i));var m=this.dom.createElement("span");m.className="ace_inline_button ace_keyword ace_toggle_wrap",m.textContent=o?"":"",e.appendChild(m)},this.$renderLine=function(e,i,r){if(!r&&r!=!1&&(r=this.session.getFoldLine(i)),r)var n=this.$getFoldLineTokens(i,r);else var n=this.session.getTokens(i);var o=e;if(n.length){var m=this.session.getRowSplitData(i);if(m&&m.length){this.$renderWrappedLine(e,n,m);var o=e.lastChild}else{var o=e;this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.$renderSimpleLine(o,n)}}else this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o));if(this.showEOL&&o){r&&(i=r.end.row);var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_eol",w.textContent=i==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(w)}},this.$getFoldLineTokens=function(e,i){var r=this.session,n=[];function o(w,S,y){for(var c=0,l=0;l+w[c].value.lengthy-S&&(g=g.substring(0,y-S)),n.push({type:w[c].type,value:g}),l=S+g.length,c+=1}for(;ly?n.push({type:w[c].type,value:g.substring(0,y-l)}):n.push(w[c]),l+=g.length,c+=1}}var m=r.getTokens(e);return i.walk(function(w,S,y,c,l){w!=null?n.push({type:"fold",value:w}):(l&&(m=r.getTokens(S)),m.length&&o(m,c,y))},i.end.row,this.session.getLine(i.end.row).length),n},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(t.prototype),b.Text=t}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(L,b,B){"use strict";var E=L("../lib/dom"),A=function(p){this.element=E.createElement("div"),this.element.className="ace_layer ace_cursor-layer",p.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),E.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(p){for(var h=this.cursors,u=h.length;u--;)E.setStyle(h[u].style,"opacity",p?"":"0")},this.$startCssAnimation=function(){for(var p=this.cursors,h=p.length;h--;)p[h].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){E.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){E.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(p){this.$padding=p},this.setSession=function(p){this.session=p},this.setBlinking=function(p){p!=this.isBlinking&&(this.isBlinking=p,this.restartTimer())},this.setBlinkInterval=function(p){p!=this.blinkInterval&&(this.blinkInterval=p,this.restartTimer())},this.setSmoothBlinking=function(p){p!=this.smoothBlinking&&(this.smoothBlinking=p,E.setCssClass(this.element,"ace_smooth-blinking",p),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var p=E.createElement("div");return p.className="ace_cursor",this.element.appendChild(p),this.cursors.push(p),p},this.removeCursor=function(){if(this.cursors.length>1){var p=this.cursors.pop();return p.parentNode.removeChild(p),p}},this.hideCursor=function(){this.isVisible=!1,E.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,E.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var p=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&E.removeCssClass(this.element,"ace_smooth-blinking"),p(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&setTimeout(function(){E.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)),E.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var h=function(){this.timeoutId=setTimeout(function(){p(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){p(!0),h()},this.blinkInterval),h()}},this.getPixelPosition=function(p,h){if(!this.config||!this.session)return{left:0,top:0};p||(p=this.session.selection.getCursor());var u=this.session.documentToScreenPosition(p),t=this.$padding+(this.session.$bidiHandler.isBidiRow(u.row,p.row)?this.session.$bidiHandler.getPosLeft(u.column):u.column*this.config.characterWidth),e=(u.row-(h?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:t,top:e}},this.isCursorInView=function(p,h){return p.top>=0&&p.topp.height+p.offset||i.top<0)&&u>1)){var r=this.cursors[t++]||this.addCursor(),n=r.style;this.drawCursor?this.drawCursor(r,i,p,h[u],this.session):this.isCursorInView(i,p)?(E.setStyle(n,"display","block"),E.translate(r,i.left,i.top),E.setStyle(n,"width",Math.round(p.characterWidth)+"px"),E.setStyle(n,"height",p.lineHeight+"px")):E.setStyle(n,"display","none")}}for(;this.cursors.length>t;)this.removeCursor();var o=this.session.getOverwrite();this.$setOverwrite(o),this.$pixelPos=i,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(p){p!=this.overwrite&&(this.overwrite=p,p?E.addCssClass(this.element,"ace_overwrite-cursors"):E.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(A.prototype),b.Cursor=A}),define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(L,b,B){"use strict";var E=L("./lib/oop"),A=L("./lib/dom"),p=L("./lib/event"),h=L("./lib/event_emitter").EventEmitter,u=32768,t=function(r){this.element=A.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=A.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),r.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,p.addListener(this.element,"scroll",this.onScroll.bind(this)),p.addListener(this.element,"mousedown",p.preventDefault)};(function(){E.implement(this,h),this.setVisible=function(r){this.element.style.display=r?"":"none",this.isVisible=r,this.coeff=1}}).call(t.prototype);var e=function(r,n){t.call(this,r),this.scrollTop=0,this.scrollHeight=0,n.$scrollbarWidth=this.width=A.scrollbarWidth(r.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};E.inherits(e,t),(function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var r=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-r)/(this.coeff-r)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(r){this.element.style.height=r+"px"},this.setInnerHeight=this.setScrollHeight=function(r){this.scrollHeight=r,r>u?(this.coeff=u/r,r=u):this.coeff!=1&&(this.coeff=1),this.inner.style.height=r+"px"},this.setScrollTop=function(r){this.scrollTop!=r&&(this.skipEvent=!0,this.scrollTop=r,this.element.scrollTop=r*this.coeff)}}).call(e.prototype);var i=function(r,n){t.call(this,r),this.scrollLeft=0,this.height=n.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};E.inherits(i,t),(function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(r){this.element.style.width=r+"px"},this.setInnerWidth=function(r){this.inner.style.width=r+"px"},this.setScrollWidth=function(r){this.inner.style.width=r+"px"},this.setScrollLeft=function(r){this.scrollLeft!=r&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=r)}}).call(i.prototype),b.ScrollBar=e,b.ScrollBarV=e,b.ScrollBarH=i,b.VScrollBar=e,b.HScrollBar=i}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(L,b,B){"use strict";var E=L("./lib/event"),A=function(p,h){this.onRender=p,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=h||window;var u=this;this._flush=function(t){u.pending=!1;var e=u.changes;if(e&&(E.blockIdle(100),u.changes=0,u.onRender(e)),u.changes){if(u.$recursionLimit--<0)return;u.schedule()}else u.$recursionLimit=2}};(function(){this.schedule=function(p){this.changes=this.changes|p,this.changes&&!this.pending&&(E.nextFrame(this._flush),this.pending=!0)},this.clear=function(p){var h=this.changes;return this.changes=0,h}}).call(A.prototype),b.RenderLoop=A}),define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(L,b,B){var E=L("../lib/oop"),A=L("../lib/dom"),p=L("../lib/lang"),h=L("../lib/event"),u=L("../lib/useragent"),t=L("../lib/event_emitter").EventEmitter,e=256,i=typeof ResizeObserver=="function",r=200,n=b.FontMetrics=function(o){this.el=A.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=A.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=A.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),o.appendChild(this.el),this.$measureNode.textContent=p.stringRepeat("X",e),this.$characterSize={width:0,height:0},i?this.$addObserver():this.checkForSizeChanges()};(function(){E.implement(this,t),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(o,m){o.width=o.height="auto",o.left=o.top="0px",o.visibility="hidden",o.position="absolute",o.whiteSpace="pre",u.isIE<8?o["font-family"]="inherit":o.font="inherit",o.overflow=m?"hidden":"visible"},this.checkForSizeChanges=function(o){if(o===void 0&&(o=this.$measureSizes()),o&&(this.$characterSize.width!==o.width||this.$characterSize.height!==o.height)){this.$measureNode.style.fontWeight="bold";var m=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=o,this.charSizes=Object.create(null),this.allowBoldFonts=m&&m.width===o.width&&m.height===o.height,this._emit("changeCharacterSize",{data:o})}},this.$addObserver=function(){var o=this;this.$observer=new window.ResizeObserver(function(m){o.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var o=this;return this.$pollSizeChangesTimer=h.onIdle(function m(){o.checkForSizeChanges(),h.onIdle(m,500)},500)},this.setPolling=function(o){o?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(o){var m={height:(o||this.$measureNode).clientHeight,width:(o||this.$measureNode).clientWidth/e};return m.width===0||m.height===0?null:m},this.$measureCharWidth=function(o){this.$main.textContent=p.stringRepeat(o,e);var m=this.$main.getBoundingClientRect();return m.width/e},this.getCharacterWidth=function(o){var m=this.charSizes[o];return m===void 0&&(m=this.charSizes[o]=this.$measureCharWidth(o)/this.$characterSize.width),m},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function o(m){return!m||!m.parentElement?1:(window.getComputedStyle(m).zoom||1)*o(m.parentElement)},this.$initTransformMeasureNodes=function(){var o=function(m,w){return["div",{style:"position: absolute;top:"+m+"px;left:"+w+"px;"}]};this.els=A.buildDom([o(0,0),o(r,0),o(0,r),o(r,r)],this.el)},this.transformCoordinates=function(o,m){if(o){var w=this.$getZoom(this.el);o=l(1/w,o)}function S(I,D,T){var P=I[1]*D[0]-I[0]*D[1];return[(-D[1]*T[0]+D[0]*T[1])/P,(+I[1]*T[0]-I[0]*T[1])/P]}function y(I,D){return[I[0]-D[0],I[1]-D[1]]}function c(I,D){return[I[0]+D[0],I[1]+D[1]]}function l(I,D){return[I*D[0],I*D[1]]}this.els||this.$initTransformMeasureNodes();function g(I){var D=I.getBoundingClientRect();return[D.left,D.top]}var d=g(this.els[0]),a=g(this.els[1]),f=g(this.els[2]),s=g(this.els[3]),v=S(y(s,a),y(s,f),y(c(a,f),c(s,d))),$=l(1+v[0],y(a,d)),x=l(1+v[1],y(f,d));if(m){var C=m,k=v[0]*C[0]/r+v[1]*C[1]/r+1,R=c(l(C[0],$),l(C[1],x));return c(l(1/k/r,R),d)}var _=y(o,d),O=S(y($,l(v[0],_)),y(x,l(v[1],_)),_);return l(r,O)}}).call(n.prototype)}),define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","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","ace/lib/useragent"],function(L,b,B){"use strict";var E=L("./lib/oop"),A=L("./lib/dom"),p=L("./config"),h=L("./layer/gutter").Gutter,u=L("./layer/marker").Marker,t=L("./layer/text").Text,e=L("./layer/cursor").Cursor,i=L("./scrollbar").HScrollBar,r=L("./scrollbar").VScrollBar,n=L("./renderloop").RenderLoop,o=L("./layer/font_metrics").FontMetrics,m=L("./lib/event_emitter").EventEmitter,w=`.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;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.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;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.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;contain: style size layout;}.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 {position: absolute;top: 0;left: 0;right: 0;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 {contain: strict;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;contain: strict;-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: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.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_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.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_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {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: 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;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 {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_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {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_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}`,S=L("./lib/useragent"),y=S.isIE;A.importCssString(w,"ace_editor.css");var c=function(l,g){var d=this;this.container=l||A.createElement("div"),A.addCssClass(this.container,"ace_editor"),A.HI_DPI&&A.addCssClass(this.container,"ace_hidpi"),this.setTheme(g),this.$gutter=A.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=A.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=A.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new u(this.content);var a=this.$textLayer=new t(this.content);this.canvas=a.element,this.$markerFront=new u(this.content),this.$cursorLayer=new e(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new r(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.on("scroll",function(f){d.$scrollAnimation||d.session.setScrollTop(f.data-d.scrollMargin.top)}),this.scrollBarH.on("scroll",function(f){d.$scrollAnimation||d.session.setScrollLeft(f.data-d.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new o(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(f){d.updateCharacterSize(),d.onResize(!0,d.gutterWidth,d.$size.width,d.$size.height),d._signal("changeCharacterSize",f)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},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.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!S.isIOS,this.$loop=new n(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),p.resetOptions(this),p._signal("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,E.implement(this,m),this.updateCharacterSize=function(){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(),A.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(l){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=l,l&&this.scrollMargin.top&&l.getScrollTop()<=0&&l.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(l),this.$markerBack.setSession(l),this.$markerFront.setSession(l),this.$gutterLayer.setSession(l),this.$textLayer.setSession(l),l&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(l,g,d){if(g===void 0&&(g=1/0),this.$changedLines?(this.$changedLines.firstRow>l&&(this.$changedLines.firstRow=l),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},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(l){l?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(l,g,d,a){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=l?1:0;var f=this.container;a||(a=f.clientHeight||f.scrollHeight),d||(d=f.clientWidth||f.scrollWidth);var s=this.$updateCachedSize(l,g,d,a);if(!this.$size.scrollerHeight||!d&&!a)return this.resizing=0;l&&(this.$gutterLayer.$padding=null),l?this.$renderChanges(s|this.$changes,!0):this.$loop.schedule(s|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(l,g,d,a){a-=this.$extraHeight||0;var f=0,s=this.$size,v={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(a&&(l||s.height!=a)&&(s.height=a,f|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",f=f|this.CHANGE_SCROLL),d&&(l||s.width!=d)){f|=this.CHANGE_SIZE,s.width=d,g==null&&(g=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=g,A.setStyle(this.scrollBarH.element.style,"left",g+"px"),A.setStyle(this.scroller.style,"left",g+this.margin.left+"px"),s.scrollerWidth=Math.max(0,d-g-this.scrollBarV.getWidth()-this.margin.h),A.setStyle(this.$gutter.style,"left",this.margin.left+"px");var $=this.scrollBarV.getWidth()+"px";A.setStyle(this.scrollBarH.element.style,"right",$),A.setStyle(this.scroller.style,"right",$),A.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||l)&&(f|=this.CHANGE_FULL)}return s.$dirty=!d||!a,f&&this._signal("resize",v),f},this.onGutterResize=function(l){var g=this.$showGutter?l:0;g!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,g,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var l=this.$size.scrollerWidth-this.$padding*2,g=Math.floor(l/this.characterWidth);return this.session.adjustWrapLimit(g,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(l){this.setOption("animatedScroll",l)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(l){this.setOption("showInvisibles",l),this.session.$bidiHandler.setShowInvisibles(l)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(l){this.setOption("displayIndentGuides",l)},this.setShowPrintMargin=function(l){this.setOption("showPrintMargin",l)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(l){this.setOption("printMarginColumn",l)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(l){return this.setOption("showGutter",l)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(l){this.setOption("fadeFoldWidgets",l)},this.setHighlightGutterLine=function(l){this.setOption("highlightGutterLine",l)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var l=A.createElement("div");l.className="ace_layer ace_print-margin-layer",this.$printMarginEl=A.createElement("div"),this.$printMarginEl.className="ace_print-margin",l.appendChild(this.$printMarginEl),this.content.insertBefore(l,this.content.firstChild)}var g=this.$printMarginEl.style;g.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",g.visibility=this.$showPrintMargin?"visible":"hidden",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.$isMousePressed){var l=this.textarea.style,g=this.$composition;if(!this.$keepTextAreaAtCursor&&!g){A.translate(this.textarea,-100,0);return}var d=this.$cursorLayer.$pixelPos;if(d){g&&g.markerRange&&(d=this.$cursorLayer.getPixelPosition(g.markerRange.start,!0));var a=this.layerConfig,f=d.top,s=d.left;f-=a.offset;var v=g&&g.useTextareaForIME?this.lineHeight:y?0:1;if(f<0||f>a.height-v){A.translate(this.textarea,0,0);return}var $=1,x=this.$size.height-v;if(!g)f+=this.lineHeight;else if(g.useTextareaForIME){var C=this.textarea.value;$=this.characterWidth*this.session.$getStringScreenWidth(C)[0]}else f+=this.lineHeight+2;s-=this.scrollLeft,s>this.$size.scrollerWidth-$&&(s=this.$size.scrollerWidth-$),s+=this.gutterWidth+this.margin.left,A.setStyle(l,"height",v+"px"),A.setStyle(l,"width",$+"px"),A.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-$),Math.min(f,x))}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},this.getLastFullyVisibleRow=function(){var l=this.layerConfig,g=l.lastRow,d=this.session.documentToScreenRow(g,0)*l.lineHeight;return d-this.session.getScrollTop()>l.height-l.lineHeight?g-1:g},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(l){this.$padding=l,this.$textLayer.setPadding(l),this.$cursorLayer.setPadding(l),this.$markerFront.setPadding(l),this.$markerBack.setPadding(l),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(l,g,d,a){var f=this.scrollMargin;f.top=l|0,f.bottom=g|0,f.right=a|0,f.left=d|0,f.v=f.top+f.bottom,f.h=f.left+f.right,f.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-f.top),this.updateFull()},this.setMargin=function(l,g,d,a){var f=this.margin;f.top=l|0,f.bottom=g|0,f.right=a|0,f.left=d|0,f.v=f.top+f.bottom,f.h=f.left+f.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(l){this.setOption("hScrollBarAlwaysVisible",l)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(l){this.setOption("vScrollBarAlwaysVisible",l)},this.$updateScrollBarV=function(){var l=this.layerConfig.maxHeight,g=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(l-=(g-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>l-g&&(l=this.scrollTop+g,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(l+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=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(l,g){if(this.$changes&&(l|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!l&&!g){this.$changes|=l;return}if(this.$size.$dirty)return this.$changes|=l,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",l),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var d=this.layerConfig;if(l&this.CHANGE_FULL||l&this.CHANGE_SIZE||l&this.CHANGE_TEXT||l&this.CHANGE_LINES||l&this.CHANGE_SCROLL||l&this.CHANGE_H_SCROLL){if(l|=this.$computeLayerConfig()|this.$loop.clear(),d.firstRow!=this.layerConfig.firstRow&&d.firstRowScreen==this.layerConfig.firstRowScreen){var a=this.scrollTop+(d.firstRow-this.layerConfig.firstRow)*this.lineHeight;a>0&&(this.scrollTop=a,l=l|this.CHANGE_SCROLL,l|=this.$computeLayerConfig()|this.$loop.clear())}d=this.layerConfig,this.$updateScrollBarV(),l&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),A.translate(this.content,-this.scrollLeft,-d.offset);var f=d.width+2*this.$padding+"px",s=d.minHeight+"px";A.setStyle(this.content.style,"width",f),A.setStyle(this.content.style,"height",s)}if(l&this.CHANGE_H_SCROLL&&(A.translate(this.content,-this.scrollLeft,-d.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),l&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(d),this.$showGutter&&this.$gutterLayer.update(d),this.$markerBack.update(d),this.$markerFront.update(d),this.$cursorLayer.update(d),this.$moveTextAreaToCursor(),this._signal("afterRender",l);return}if(l&this.CHANGE_SCROLL){this.$changedLines=null,l&this.CHANGE_TEXT||l&this.CHANGE_LINES?this.$textLayer.update(d):this.$textLayer.scrollLines(d),this.$showGutter&&(l&this.CHANGE_GUTTER||l&this.CHANGE_LINES?this.$gutterLayer.update(d):this.$gutterLayer.scrollLines(d)),this.$markerBack.update(d),this.$markerFront.update(d),this.$cursorLayer.update(d),this.$moveTextAreaToCursor(),this._signal("afterRender",l);return}l&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(d),this.$showGutter&&this.$gutterLayer.update(d)):l&this.CHANGE_LINES?(this.$updateLines()||l&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(d):l&this.CHANGE_TEXT||l&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(d):l&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(d),l&this.CHANGE_CURSOR&&(this.$cursorLayer.update(d),this.$moveTextAreaToCursor()),l&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(d),l&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(d),this._signal("afterRender",l)},this.$autosize=function(){var l=this.session.getScreenLength()*this.lineHeight,g=this.$maxLines*this.lineHeight,d=Math.min(g,Math.max((this.$minLines||1)*this.lineHeight,l))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(d+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&d>this.$maxPixelHeight&&(d=this.$maxPixelHeight);var a=d<=2*this.lineHeight,f=!a&&l>g;if(d!=this.desiredHeight||this.$size.height!=this.desiredHeight||f!=this.$vScroll){f!=this.$vScroll&&(this.$vScroll=f,this.scrollBarV.setVisible(f));var s=this.container.clientWidth;this.container.style.height=d+"px",this.$updateCachedSize(!0,this.$gutterWidth,s,d),this.desiredHeight=d,this._signal("autosize")}},this.$computeLayerConfig=function(){var l=this.session,g=this.$size,d=g.height<=2*this.lineHeight,a=this.session.getScreenLength(),f=a*this.lineHeight,s=this.$getLongestLine(),v=!d&&(this.$hScrollBarAlwaysVisible||g.scrollerWidth-s-2*this.$padding<0),$=this.$horizScroll!==v;$&&(this.$horizScroll=v,this.scrollBarH.setVisible(v));var x=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var C=g.scrollerHeight+this.lineHeight,k=!this.$maxLines&&this.$scrollPastEnd?(g.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;f+=k;var R=this.scrollMargin;this.session.setScrollTop(Math.max(-R.top,Math.min(this.scrollTop,f-g.scrollerHeight+R.bottom))),this.session.setScrollLeft(Math.max(-R.left,Math.min(this.scrollLeft,s+2*this.$padding-g.scrollerWidth+R.right)));var _=!d&&(this.$vScrollBarAlwaysVisible||g.scrollerHeight-f+k<0||this.scrollTop>R.top),O=x!==_;O&&(this.$vScroll=_,this.scrollBarV.setVisible(_));var I=this.scrollTop%this.lineHeight,D=Math.ceil(C/this.lineHeight)-1,T=Math.max(0,Math.round((this.scrollTop-I)/this.lineHeight)),P=T+D,M,W,N=this.lineHeight;T=l.screenToDocumentRow(T,0);var G=l.getFoldLine(T);G&&(T=G.start.row),M=l.documentToScreenRow(T,0),W=l.getRowLength(T)*N,P=Math.min(l.screenToDocumentRow(P,0),l.getLength()-1),C=g.scrollerHeight+l.getRowLength(P)*N+W,I=this.scrollTop-M*N;var z=0;return(this.layerConfig.width!=s||$)&&(z=this.CHANGE_H_SCROLL),($||O)&&(z|=this.$updateCachedSize(!0,this.gutterWidth,g.width,g.height),this._signal("scrollbarVisibilityChanged"),O&&(s=this.$getLongestLine())),this.layerConfig={width:s,padding:this.$padding,firstRow:T,firstRowScreen:M,lastRow:P,lineHeight:N,characterWidth:this.characterWidth,minHeight:C,maxHeight:f,offset:I,gutterOffset:N?Math.max(0,Math.ceil((I+g.height-g.scrollerHeight)/N)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(s-this.$padding),z},this.$updateLines=function(){if(this.$changedLines){var l=this.$changedLines.firstRow,g=this.$changedLines.lastRow;this.$changedLines=null;var d=this.layerConfig;if(!(l>d.lastRow+1)&&!(gthis.$textLayer.MAX_LINE_LENGTH&&(l=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(l*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),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(l,g){this.$gutterLayer.addGutterDecoration(l,g)},this.removeGutterDecoration=function(l,g){this.$gutterLayer.removeGutterDecoration(l,g)},this.updateBreakpoints=function(l){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(l){this.$gutterLayer.setAnnotations(l),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(l,g,d){this.scrollCursorIntoView(l,d),this.scrollCursorIntoView(g,d)},this.scrollCursorIntoView=function(l,g,d){if(this.$size.scrollerHeight!==0){var a=this.$cursorLayer.getPixelPosition(l),f=a.left,s=a.top,v=d&&d.top||0,$=d&&d.bottom||0,x=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;x+v>s?(g&&x+v>s+this.lineHeight&&(s-=g*this.$size.scrollerHeight),s===0&&(s=-this.scrollMargin.top),this.session.setScrollTop(s)):x+this.$size.scrollerHeight-$f?(f=1-this.scrollMargin.top||g>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||l<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||l>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},this.pixelToScreenCoordinates=function(l,g){var d;if(this.$hasCssTransforms){d={top:0,left:0};var a=this.$fontMetrics.transformCoordinates([l,g]);l=a[1]-this.gutterWidth-this.margin.left,g=a[0]}else d=this.scroller.getBoundingClientRect();var f=l+this.scrollLeft-d.left-this.$padding,s=f/this.characterWidth,v=Math.floor((g+this.scrollTop-d.top)/this.lineHeight),$=this.$blockCursor?Math.floor(s):Math.round(s);return{row:v,column:$,side:s-$>0?1:-1,offsetX:f}},this.screenToTextCoordinates=function(l,g){var d;if(this.$hasCssTransforms){d={top:0,left:0};var a=this.$fontMetrics.transformCoordinates([l,g]);l=a[1]-this.gutterWidth-this.margin.left,g=a[0]}else d=this.scroller.getBoundingClientRect();var f=l+this.scrollLeft-d.left-this.$padding,s=f/this.characterWidth,v=this.$blockCursor?Math.floor(s):Math.round(s),$=Math.floor((g+this.scrollTop-d.top)/this.lineHeight);return this.session.screenToDocumentPosition($,Math.max(v,0),f)},this.textToScreenCoordinates=function(l,g){var d=this.scroller.getBoundingClientRect(),a=this.session.documentToScreenPosition(l,g),f=this.$padding+(this.session.$bidiHandler.isBidiRow(a.row,l)?this.session.$bidiHandler.getPosLeft(a.column):Math.round(a.column*this.characterWidth)),s=a.row*this.lineHeight;return{pageX:d.left+f-this.scrollLeft,pageY:d.top+s-this.scrollTop}},this.visualizeFocus=function(){A.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){A.removeCssClass(this.container,"ace_focus")},this.showComposition=function(l){this.$composition=l,l.cssText||(l.cssText=this.textarea.style.cssText),l.useTextareaForIME==null&&(l.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(A.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):l.markerId=this.session.addMarker(l.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(l){var g=this.session.selection.cursor;this.addToken(l,"composition_placeholder",g.row,g.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),A.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var l=this.session.selection.cursor;this.removeExtraToken(l.row,l.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(l,g,d,a){var f=this.session;f.bgTokenizer.lines[d]=null;var s={type:g,value:l},v=f.getTokens(d);if(a==null)v.push(s);else for(var $=0,x=0;x"u")return{postMessage:function(){},terminate:function(){}};if(h.get("loadWorkerFromBlob")){var n=u(r),o=window.URL||window.webkitURL,m=o.createObjectURL(n);return new Worker(m)}return new Worker(r)}var e=function(r){r.postMessage||(r=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=r,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){E.implement(this,p),this.$createWorkerFromOldConfig=function(r,n,o,m,w){if(L.nameToUrl&&!L.toUrl&&(L.toUrl=L.nameToUrl),h.get("packaged")||!L.toUrl)m=m||h.moduleUrl(n,"worker");else{var S=this.$normalizePath;m=m||S(L.toUrl("ace/worker/worker.js",null,"_"));var y={};r.forEach(function(c){y[c]=S(L.toUrl(c,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=t(m),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:y,module:n,classname:o}),this.$worker},this.onMessage=function(r){var n=r.data;switch(n.type){case"event":this._signal(n.name,{data:n.data});break;case"call":var o=this.callbacks[n.id];o&&(o(n.data),delete this.callbacks[n.id]);break;case"error":this.reportError(n.data);break;case"log":window.console&&console.log&&console.log.apply(console,n.data);break}},this.reportError=function(r){window.console&&console.error&&console.error(r)},this.$normalizePath=function(r){return A.qualifyURL(r)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(r,n){this.$worker.postMessage({command:r,args:n})},this.call=function(r,n,o){if(o){var m=this.callbackId++;this.callbacks[m]=o,n.push(m)}this.send(r,n)},this.emit=function(r,n){try{n.data&&n.data.err&&(n.data.err={message:n.data.err.message,stack:n.data.err.stack,code:n.data.err.code}),this.$worker.postMessage({event:r,data:{data:n.data}})}catch(o){console.error(o.stack)}},this.attachToDocument=function(r){this.$doc&&this.terminate(),this.$doc=r,this.call("setValue",[r.getValue()]),r.on("change",this.changeListener)},this.changeListener=function(r){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),r.action=="insert"?this.deltaQueue.push(r.start,r.lines):this.deltaQueue.push(r.start,r.end)},this.$sendDeltaQueue=function(){var r=this.deltaQueue;r&&(this.deltaQueue=null,r.length>50&&r.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:r}))}}).call(e.prototype);var i=function(r,n,o){var m=null,w=!1,S=Object.create(p),y=[],c=new e({messageBuffer:y,terminate:function(){},postMessage:function(g){y.push(g),m&&(w?setTimeout(l):l())}});c.setEmitSync=function(g){w=g};var l=function(){var g=y.shift();g.command?m[g.command].apply(m,g.args):g.event&&S._signal(g.event,g.data)};return S.postMessage=function(g){c.onMessage({data:g})},S.callback=function(g,d){this.postMessage({type:"call",id:d,data:g})},S.emit=function(g,d){this.postMessage({type:"event",name:g,data:d})},h.loadModule(["worker",n],function(g){for(m=new g[o](S);y.length;)l()}),c};b.UIWorkerClient=i,b.WorkerClient=e,b.createWorker=t}),define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(L,b,B){"use strict";var E=L("./range").Range,A=L("./lib/event_emitter").EventEmitter,p=L("./lib/oop"),h=function(u,t,e,i,r,n){var o=this;this.length=t,this.session=u,this.doc=u.getDocument(),this.mainClass=r,this.othersClass=n,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=e;var m=u.getUndoManager().$undoStack||u.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=m.length,this.setup(),u.selection.on("changeCursor",this.$onCursorChange)};(function(){p.implement(this,A),this.setup=function(){var u=this,t=this.doc,e=this.session;this.selectionBefore=e.selection.toJSON(),e.selection.inMultiSelectMode&&e.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=e.addMarker(new E(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(r){var n=t.createAnchor(r.row,r.column);n.$insertRight=!0,n.detach(),u.others.push(n)}),e.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var u=this.session,t=this;this.othersActive=!0,this.others.forEach(function(e){e.markerId=u.addMarker(new E(e.row,e.column,e.row,e.column+t.length),t.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var u=0;u=this.pos.column&&t.start.column<=this.pos.column+this.length+1,r=t.start.column-this.pos.column;if(this.updateAnchors(u),i&&(this.length+=e),i&&!this.session.$fromUndo){if(u.action==="insert")for(var n=this.others.length-1;n>=0;n--){var o=this.others[n],m={row:o.row,column:o.column+r};this.doc.insertMergedLines(m,u.lines)}else if(u.action==="remove")for(var n=this.others.length-1;n>=0;n--){var o=this.others[n],m={row:o.row,column:o.column+r};this.doc.remove(new E(m.row,m.column,m.row,m.column-e))}}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(u){this.pos.onChange(u);for(var t=this.others.length;t--;)this.others[t].onChange(u);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var u=this,t=this.session,e=function(r,n){t.removeMarker(r.markerId),r.markerId=t.addMarker(new E(r.row,r.column,r.row,r.column+u.length),n,null,!1)};e(this.pos,this.mainClass);for(var i=this.others.length;i--;)e(this.others[i],this.othersClass)}},this.onCursorChange=function(u){if(!(this.$updating||!this.session)){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",u)):(this.hideOtherMarkers(),this._emit("cursorLeave",u))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(this.$undoStackDepth!==-1){for(var u=this.session.getUndoManager(),t=(u.$undoStack||u.$undostack).length-this.$undoStackDepth,e=0;e1?A.multiSelect.joinSelections():A.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(A){A.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(A){A.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(A){A.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],b.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(A){A.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(A){return A&&A.inMultiSelectMode}}];var E=L("../keyboard/hash_handler").HashHandler;b.keyboardHandler=new E(b.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(L,b,B){var E=L("./range_list").RangeList,A=L("./range").Range,p=L("./selection").Selection,h=L("./mouse/multi_select_handler").onMouseDown,u=L("./lib/event"),t=L("./lib/lang"),e=L("./commands/multi_select_commands");b.commands=e.defaultCommands.concat(e.multiSelectCommands);var i=L("./search").Search,r=new i;function n(c,l,g){return r.$options.wrap=!0,r.$options.needle=l,r.$options.backwards=g==-1,r.find(c)}var o=L("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(o.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(c,l){if(c){if(!this.inMultiSelectMode&&this.rangeCount===0){var g=this.toOrientedRange();if(this.rangeList.add(g),this.rangeList.add(c),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),l||this.fromOrientedRange(c);this.rangeList.removeAll(),this.rangeList.add(g),this.$onAddRange(g)}c.cursor||(c.cursor=c.end);var d=this.rangeList.add(c);return this.$onAddRange(c),d.length&&this.$onRemoveRange(d),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),l||this.fromOrientedRange(c)}},this.toSingleRange=function(c){c=c||this.ranges[0];var l=this.rangeList.removeAll();l.length&&this.$onRemoveRange(l),c&&this.fromOrientedRange(c)},this.substractPoint=function(c){var l=this.rangeList.substractPoint(c);if(l)return this.$onRemoveRange(l),l[0]},this.mergeOverlappingRanges=function(){var c=this.rangeList.merge();c.length&&this.$onRemoveRange(c)},this.$onAddRange=function(c){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(c),this._signal("addRange",{range:c})},this.$onRemoveRange=function(c){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var l=this.rangeList.ranges.pop();c.push(l),this.rangeCount=0}for(var g=c.length;g--;){var d=this.ranges.indexOf(c[g]);this.ranges.splice(d,1)}this._signal("removeRange",{ranges:c}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),l=l||this.ranges[0],l&&!l.isEqual(this.getRange())&&this.fromOrientedRange(l)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new E,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var c=this.ranges.length?this.ranges:[this.getRange()],l=[],g=0;g1){var c=this.rangeList.ranges,l=c[c.length-1],g=A.fromPoints(c[0].start,l.end);this.toSingleRange(),this.setSelectionRange(g,l.cursor==l.start)}else{var d=this.session.documentToScreenPosition(this.cursor),a=this.session.documentToScreenPosition(this.anchor),f=this.rectangularRangeBlock(d,a);f.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(c,l,g){var d=[],a=c.column0;)I--;if(I>0)for(var D=0;d[D].isEmpty();)D++;for(var T=I;T>=D;T--)d[T].isEmpty()&&d.splice(T,1)}return d}}).call(p.prototype);var m=L("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(c){c.cursor||(c.cursor=c.end);var l=this.getSelectionStyle();return c.marker=this.session.addMarker(c,"ace_selection",l),this.session.$selectionMarkers.push(c),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,c},this.removeSelectionMarker=function(c){if(c.marker){this.session.removeMarker(c.marker);var l=this.session.$selectionMarkers.indexOf(c);l!=-1&&this.session.$selectionMarkers.splice(l,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(c){for(var l=this.session.$selectionMarkers,g=c.length;g--;){var d=c[g];if(d.marker){this.session.removeMarker(d.marker);var a=l.indexOf(d);a!=-1&&l.splice(a,1)}}this.session.selectionMarkerCount=l.length},this.$onAddRange=function(c){this.addSelectionMarker(c.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(c){this.removeSelectionMarkers(c.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(c){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(e.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(c){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(e.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(c){var l=c.command,g=c.editor;if(g.multiSelect){if(l.multiSelectAction)l.multiSelectAction=="forEach"?d=g.forEachSelection(l,c.args):l.multiSelectAction=="forEachLine"?d=g.forEachSelection(l,c.args,!0):l.multiSelectAction=="single"?(g.exitMultiSelectMode(),d=l.exec(g,c.args||{})):d=l.multiSelectAction(g,c.args||{});else{var d=l.exec(g,c.args||{});g.multiSelect.addRange(g.multiSelect.toOrientedRange()),g.multiSelect.mergeOverlappingRanges()}return d}},this.forEachSelection=function(c,l,g){if(!this.inVirtualSelectionMode){var d=g&&g.keepOrder,a=g==!0||g&&g.$byLines,f=this.session,s=this.selection,v=s.rangeList,$=(d?s:v).ranges,x;if(!$.length)return c.exec?c.exec(this,l||{}):c(this,l||{});var C=s._eventRegistry;s._eventRegistry={};var k=new p(f);this.inVirtualSelectionMode=!0;for(var R=$.length;R--;){if(a)for(;R>0&&$[R].start.row==$[R-1].end.row;)R--;k.fromOrientedRange($[R]),k.index=R,this.selection=f.selection=k;var _=c.exec?c.exec(this,l||{}):c(this,l||{});!x&&_!==void 0&&(x=_),k.toOrientedRange($[R])}k.detach(),this.selection=f.selection=s,this.inVirtualSelectionMode=!1,s._eventRegistry=C,s.mergeOverlappingRanges(),s.ranges[0]&&s.fromOrientedRange(s.ranges[0]);var O=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),O&&O.from==O.to&&this.renderer.animateScrolling(O.from),x}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var c="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var l=this.multiSelect.rangeList.ranges,g=[],d=0;d0);s<0&&(s=0),v>=x&&(v=x-1)}var k=this.session.removeFullLines(s,v);k=this.$reAlignText(k,$),this.session.insert({row:s,column:0},k.join(` `)+` -`),$||(f.start.column=0,f.end.column=k[k.length-1].length),this.selection.setRange(f)}else{a.forEach(function(I){l.substractPoint(I.cursor)});var R=0,_=1/0,O=g.map(function(I){var D=I.cursor,T=c.getLine(D.row),P=T.substr(D.column).search(/\S/g);return P==-1&&(P=0),D.column>R&&(R=D.column),P<_&&(_=P),P});g.forEach(function(I,D){var T=I.cursor,P=R-T.column,M=O[D]-_;P>M?c.insert(T,t.stringRepeat(" ",P-M)):c.remove(new A(T.row,T.column,T.row,T.column-P+M)),I.start.column=I.end.column=R,I.start.row=I.end.row=T.row,I.cursor=I.end}),l.fromOrientedRange(g[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(c,l){var g=!0,d=!0,a,f,s;return c.map(function(k){var R=k.match(/(\s*)(.*?)(\s*)([=:].*)/);return R?a==null?(a=R[1].length,f=R[2].length,s=R[3].length,R):(a+f+s!=R[1].length+R[2].length+R[3].length&&(d=!1),a!=R[1].length&&(g=!1),a>R[1].length&&(a=R[1].length),fR[3].length&&(s=R[3].length),R):[k]}).map(l?$:g?d?x:$:C);function v(k){return t.stringRepeat(" ",k)}function $(k){return k[2]?v(a)+k[2]+v(f-k[2].length+s)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}function x(k){return k[2]?v(a+f-k[2].length)+k[2]+v(s)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}function C(k){return k[2]?v(a)+k[2]+v(s)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}}}).call(m.prototype);function w(c,l){return c.row==l.row&&c.column==l.column}b.onSessionChange=function(c){var l=c.session;l&&!l.multiSelect&&(l.$selectionMarkers=[],l.selection.$initRangeList(),l.multiSelect=l.selection),this.multiSelect=l&&l.multiSelect;var g=c.oldSession;g&&(g.multiSelect.off("addRange",this.$onAddRange),g.multiSelect.off("removeRange",this.$onRemoveRange),g.multiSelect.off("multiSelect",this.$onMultiSelect),g.multiSelect.off("singleSelect",this.$onSingleSelect),g.multiSelect.lead.off("change",this.$checkMultiselectChange),g.multiSelect.anchor.off("change",this.$checkMultiselectChange)),l&&(l.multiSelect.on("addRange",this.$onAddRange),l.multiSelect.on("removeRange",this.$onRemoveRange),l.multiSelect.on("multiSelect",this.$onMultiSelect),l.multiSelect.on("singleSelect",this.$onSingleSelect),l.multiSelect.lead.on("change",this.$checkMultiselectChange),l.multiSelect.anchor.on("change",this.$checkMultiselectChange)),l&&this.inMultiSelectMode!=l.selection.inMultiSelectMode&&(l.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function S(c){c.$multiselectOnSessionChange||(c.$onAddRange=c.$onAddRange.bind(c),c.$onRemoveRange=c.$onRemoveRange.bind(c),c.$onMultiSelect=c.$onMultiSelect.bind(c),c.$onSingleSelect=c.$onSingleSelect.bind(c),c.$multiselectOnSessionChange=b.onSessionChange.bind(c),c.$checkMultiselectChange=c.$checkMultiselectChange.bind(c),c.$multiselectOnSessionChange(c),c.on("changeSession",c.$multiselectOnSessionChange),c.on("mousedown",h),c.commands.addCommands(e.defaultCommands),y(c))}function y(c){if(!c.textInput)return;var l=c.textInput.getElement(),g=!1;u.addListener(l,"keydown",function(a){var f=a.keyCode==18&&!(a.ctrlKey||a.shiftKey||a.metaKey);c.$blockSelectEnabled&&f?g||(c.renderer.setMouseCursor("crosshair"),g=!0):g&&d()},c),u.addListener(l,"keyup",d,c),u.addListener(l,"blur",d,c);function d(a){g&&(c.renderer.setMouseCursor(""),g=!1)}}b.MultiSelect=S,L("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(c){S(this),c?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",h)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",h))},value:!0},enableBlockSelect:{set:function(c){this.$blockSelectEnabled=c},value:!0}})}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(L,b,B){"use strict";var E=L("../../range").Range,A=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(p,h,u){var t=p.getLine(u);return this.foldingStartMarker.test(t)?"start":h=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(t)?"end":""},this.getFoldWidgetRange=function(p,h,u){return null},this.indentationBlock=function(p,h,u){var t=/\S/,e=p.getLine(h),i=e.search(t);if(i!=-1){for(var r=u||e.length,n=p.getLength(),o=h,m=h;++ho){var y=p.getLine(m).length;return new E(o,r,m,y)}}},this.openingBracketBlock=function(p,h,u,t,e){var i={row:u,column:t+1},r=p.$findClosingBracket(h,i,e);if(r){var n=p.foldWidgets[r.row];return n==null&&(n=p.getFoldWidget(r.row)),n=="start"&&r.row>i.row&&(r.row--,r.column=p.getLine(r.row).length),E.fromPoints(i,r)}},this.closingBracketBlock=function(p,h,u,t,e){var i={row:u,column:t},r=p.$findOpeningBracket(h,i);if(r)return r.column++,i.column--,E.fromPoints(r,i)}}).call(A.prototype)}),define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(L,b,B){"use strict";b.isDark=!1,b.cssClass="ace-tm",b.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;}',b.$id="ace/theme/textmate";var E=L("../lib/dom");E.importCssString(b.cssText,b.cssClass)}),define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(L,b,B){"use strict";var E=L("./lib/dom");function A(p){this.session=p,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(p){var h;return this.lineWidgets?h=this.lineWidgets[p]&&this.lineWidgets[p].rowCount||0:h=0,!this.$useWrapMode||!this.$wrapData[p]?1+h:this.$wrapData[p].length+1+h},this.$getWidgetScreenLength=function(){var p=0;return this.lineWidgets.forEach(function(h){h&&h.rowCount&&!h.hidden&&(p+=h.rowCount)}),p},this.$onChangeEditor=function(p){this.attach(p.editor)},this.attach=function(p){p&&p.widgetManager&&p.widgetManager!=this&&p.widgetManager.detach(),this.editor!=p&&(this.detach(),this.editor=p,p&&(p.widgetManager=this,p.renderer.on("beforeRender",this.measureWidgets),p.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(p){var h=this.editor;if(h){this.editor=null,h.widgetManager=null,h.renderer.off("beforeRender",this.measureWidgets),h.renderer.off("afterRender",this.renderWidgets);var u=this.session.lineWidgets;u&&u.forEach(function(t){t&&t.el&&t.el.parentNode&&(t._inDocument=!1,t.el.parentNode.removeChild(t.el))})}},this.updateOnFold=function(p,h){var u=h.lineWidgets;if(!(!u||!p.action)){for(var t=p.data,e=t.start.row,i=t.end.row,r=p.action=="add",n=e+1;nh[u].column&&u++,i.unshift(u,0),h.splice.apply(h,i),this.$updateRows()}}},this.$updateRows=function(){var p=this.session.lineWidgets;if(p){var h=!0;p.forEach(function(u,t){if(u)for(h=!1,u.row=t;u.$oldWidget;)u.$oldWidget.row=t,u=u.$oldWidget}),h&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(p){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var h=this.session.lineWidgets[p.row];return h&&(p.$oldWidget=h,h.el&&h.el.parentNode&&(h.el.parentNode.removeChild(h.el),h._inDocument=!1)),this.session.lineWidgets[p.row]=p,p},this.addLineWidget=function(p){if(this.$registerLineWidget(p),p.session=this.session,!this.editor)return p;var h=this.editor.renderer;p.html&&!p.el&&(p.el=E.createElement("div"),p.el.innerHTML=p.html),p.el&&(E.addCssClass(p.el,"ace_lineWidgetContainer"),p.el.style.position="absolute",p.el.style.zIndex=5,h.container.appendChild(p.el),p._inDocument=!0,p.coverGutter||(p.el.style.zIndex=3),p.pixelHeight==null&&(p.pixelHeight=p.el.offsetHeight)),p.rowCount==null&&(p.rowCount=p.pixelHeight/h.layerConfig.lineHeight);var u=this.session.getFoldAt(p.row,0);if(p.$fold=u,u){var t=this.session.lineWidgets;p.row==u.end.row&&!t[u.start.row]?t[u.start.row]=p:p.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:p.row}}}),this.$updateRows(),this.renderWidgets(null,h),this.onWidgetChanged(p),p},this.removeLineWidget=function(p){if(p._inDocument=!1,p.session=null,p.el&&p.el.parentNode&&p.el.parentNode.removeChild(p.el),p.editor&&p.editor.destroy)try{p.editor.destroy()}catch{}if(this.session.lineWidgets){var h=this.session.lineWidgets[p.row];if(h==p)this.session.lineWidgets[p.row]=p.$oldWidget,p.$oldWidget&&this.onWidgetChanged(p.$oldWidget);else for(;h;){if(h.$oldWidget==p){h.$oldWidget=p.$oldWidget;break}h=h.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:p.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(p){for(var h=this.session.lineWidgets,u=h&&h[p],t=[];u;)t.push(u),u=u.$oldWidget;return t},this.onWidgetChanged=function(p){this.session._changedWidgets.push(p),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(p,h){var u=this.session._changedWidgets,t=h.layerConfig;if(!(!u||!u.length)){for(var e=1/0,i=0;i0&&!t[e];)e--;this.firstRow=u.firstRow,this.lastRow=u.lastRow,h.$cursorLayer.config=u;for(var r=e;r<=i;r++){var n=t[r];if(!(!n||!n.el)){if(n.hidden){n.el.style.top=-100-(n.pixelHeight||0)+"px";continue}n._inDocument||(n._inDocument=!0,h.container.appendChild(n.el));var o=h.$cursorLayer.getPixelPosition({row:r,column:0},!0).top;n.coverLine||(o+=u.lineHeight*this.session.getRowLineCount(n.row)),n.el.style.top=o-u.offset+"px";var m=n.coverGutter?0:h.gutterWidth;n.fixedWidth||(m-=h.scrollLeft),n.el.style.left=m+"px",n.fullWidth&&n.screenWidth&&(n.el.style.minWidth=u.width+2*u.padding+"px"),n.fixedWidth?n.el.style.right=h.scrollBar.getWidth()+"px":n.el.style.right=""}}}}}).call(A.prototype),b.LineWidgets=A}),define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(L,b,B){"use strict";var E=L("../line_widgets").LineWidgets,A=L("../lib/dom"),p=L("../range").Range;function h(t,e,i){for(var r=0,n=t.length-1;r<=n;){var o=r+n>>1,m=i(e,t[o]);if(m>0)r=o+1;else if(m<0)n=o-1;else return o}return-(r+1)}function u(t,e,i){var r=t.getAnnotations().sort(p.comparePoints);if(r.length){var n=h(r,{row:e,column:-1},p.comparePoints);n<0&&(n=-n-1),n>=r.length?n=i>0?0:r.length-1:n===0&&i<0&&(n=r.length-1);var o=r[n];if(!(!o||!i)){if(o.row===e){do o=r[n+=i];while(o&&o.row===e);if(!o)return r.slice()}var m=[];e=o.row;do m[i<0?"unshift":"push"](o),o=r[n+=i];while(o&&o.row==e);return m.length&&m}}}b.showErrorMarker=function(t,e){var i=t.session;i.widgetManager||(i.widgetManager=new E(i),i.widgetManager.attach(t));var r=t.getCursorPosition(),n=r.row,o=i.widgetManager.getWidgetsAtRow(n).filter(function(a){return a.type=="errorMarker"})[0];o?o.destroy():n-=e;var m=u(i,n,e),w;if(m){var S=m[0];r.column=(S.pos&&typeof S.column!="number"?S.pos.sc:S.column)||0,r.row=S.row,w=t.renderer.$gutterLayer.$annotations[r.row]}else{if(o)return;w={text:["Looks good!"],className:"ace_ok"}}t.session.unfold(r.row),t.selection.moveToPosition(r);var y={row:r.row,fixedWidth:!0,coverGutter:!0,el:A.createElement("div"),type:"errorMarker"},c=y.el.appendChild(A.createElement("div")),l=y.el.appendChild(A.createElement("div"));l.className="error_widget_arrow "+w.className;var g=t.renderer.$cursorLayer.getPixelPosition(r).left;l.style.left=g+t.renderer.gutterWidth-5+"px",y.el.className="error_widget_wrapper",c.className="error_widget "+w.className,c.innerHTML=w.text.join("
"),c.appendChild(A.createElement("div"));var d=function(a,f,s){if(f===0&&(s==="esc"||s==="return"))return y.destroy(),{command:"null"}};y.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(d),i.widgetManager.removeLineWidget(y),t.off("changeSelection",y.destroy),t.off("changeSession",y.destroy),t.off("mouseup",y.destroy),t.off("change",y.destroy))},t.keyBinding.addKeyboardHandler(d),t.on("changeSelection",y.destroy),t.on("changeSession",y.destroy),t.on("mouseup",y.destroy),t.on("change",y.destroy),t.session.widgetManager.addLineWidget(y),y.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:y.el.offsetHeight})},A.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/range","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(L,b,B){"use strict";L("./lib/fixoldbrowsers");var E=L("./lib/dom"),A=L("./lib/event"),p=L("./range").Range,h=L("./editor").Editor,u=L("./edit_session").EditSession,t=L("./undomanager").UndoManager,e=L("./virtual_renderer").VirtualRenderer;L("./worker/worker_client"),L("./keyboard/hash_handler"),L("./placeholder"),L("./multi_select"),L("./mode/folding/fold_mode"),L("./theme/textmate"),L("./ext/error_marker"),b.config=L("./config"),b.require=L,typeof define=="function"&&(b.define=define),b.edit=function(i,r){if(typeof i=="string"){var n=i;if(i=document.getElementById(n),!i)throw new Error("ace.edit can't find div #"+n)}if(i&&i.env&&i.env.editor instanceof h)return i.env.editor;var o="";if(i&&/input|textarea/i.test(i.tagName)){var m=i;o=m.value,i=E.createElement("pre"),m.parentNode.replaceChild(i,m)}else i&&(o=i.textContent,i.innerHTML="");var w=b.createEditSession(o),S=new h(new e(i),w,r),y={document:w,editor:S,onResize:S.resize.bind(S,null)};return m&&(y.textarea=m),A.addListener(window,"resize",y.onResize),S.on("destroy",function(){A.removeListener(window,"resize",y.onResize),y.editor.container.env=null}),S.container.env=S.env=y,S},b.createEditSession=function(i,r){var n=new u(i,r);return n.setUndoManager(new t),n},b.Range=p,b.Editor=h,b.EditSession=u,b.UndoManager=t,b.VirtualRenderer=e,b.version=b.config.version}),function(){window.require(["ace/ace"],function(L){L&&(L.config.init(!0),L.define=window.define),window.ace||(window.ace=L);for(var b in L)L.hasOwnProperty(b)&&(window.ace[b]=L[b]);window.ace.default=window.ace,typeof module=="object"&&typeof exports=="object"&&module&&(module.exports=window.ace)})}(),define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/lib/dom","ace/editor"],function(L,b,B){"use strict";var E=L("./lib/oop"),A=L("./lib/event_emitter").EventEmitter,p=L("./lib/lang"),h=L("./range").Range,u=L("./range_list").RangeList,t=L("./keyboard/hash_handler").HashHandler,e=L("./tokenizer").Tokenizer,i=L("./clipboard"),r={CURRENT_WORD:function(c){return c.session.getTextRange(c.session.getWordRange())},SELECTION:function(c,l,g){var d=c.session.getTextRange();return g?d.replace(/\n\r?([ \t]*\S)/g,` +`),$||(f.start.column=0,f.end.column=k[k.length-1].length),this.selection.setRange(f)}else{a.forEach(function(I){l.substractPoint(I.cursor)});var R=0,_=1/0,O=g.map(function(I){var D=I.cursor,T=c.getLine(D.row),P=T.substr(D.column).search(/\S/g);return P==-1&&(P=0),D.column>R&&(R=D.column),P<_&&(_=P),P});g.forEach(function(I,D){var T=I.cursor,P=R-T.column,M=O[D]-_;P>M?c.insert(T,t.stringRepeat(" ",P-M)):c.remove(new A(T.row,T.column,T.row,T.column-P+M)),I.start.column=I.end.column=R,I.start.row=I.end.row=T.row,I.cursor=I.end}),l.fromOrientedRange(g[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(c,l){var g=!0,d=!0,a,f,s;return c.map(function(k){var R=k.match(/(\s*)(.*?)(\s*)([=:].*)/);return R?a==null?(a=R[1].length,f=R[2].length,s=R[3].length,R):(a+f+s!=R[1].length+R[2].length+R[3].length&&(d=!1),a!=R[1].length&&(g=!1),a>R[1].length&&(a=R[1].length),fR[3].length&&(s=R[3].length),R):[k]}).map(l?$:g?d?x:$:C);function v(k){return t.stringRepeat(" ",k)}function $(k){return k[2]?v(a)+k[2]+v(f-k[2].length+s)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}function x(k){return k[2]?v(a+f-k[2].length)+k[2]+v(s)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}function C(k){return k[2]?v(a)+k[2]+v(s)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}}}).call(m.prototype);function w(c,l){return c.row==l.row&&c.column==l.column}b.onSessionChange=function(c){var l=c.session;l&&!l.multiSelect&&(l.$selectionMarkers=[],l.selection.$initRangeList(),l.multiSelect=l.selection),this.multiSelect=l&&l.multiSelect;var g=c.oldSession;g&&(g.multiSelect.off("addRange",this.$onAddRange),g.multiSelect.off("removeRange",this.$onRemoveRange),g.multiSelect.off("multiSelect",this.$onMultiSelect),g.multiSelect.off("singleSelect",this.$onSingleSelect),g.multiSelect.lead.off("change",this.$checkMultiselectChange),g.multiSelect.anchor.off("change",this.$checkMultiselectChange)),l&&(l.multiSelect.on("addRange",this.$onAddRange),l.multiSelect.on("removeRange",this.$onRemoveRange),l.multiSelect.on("multiSelect",this.$onMultiSelect),l.multiSelect.on("singleSelect",this.$onSingleSelect),l.multiSelect.lead.on("change",this.$checkMultiselectChange),l.multiSelect.anchor.on("change",this.$checkMultiselectChange)),l&&this.inMultiSelectMode!=l.selection.inMultiSelectMode&&(l.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function S(c){c.$multiselectOnSessionChange||(c.$onAddRange=c.$onAddRange.bind(c),c.$onRemoveRange=c.$onRemoveRange.bind(c),c.$onMultiSelect=c.$onMultiSelect.bind(c),c.$onSingleSelect=c.$onSingleSelect.bind(c),c.$multiselectOnSessionChange=b.onSessionChange.bind(c),c.$checkMultiselectChange=c.$checkMultiselectChange.bind(c),c.$multiselectOnSessionChange(c),c.on("changeSession",c.$multiselectOnSessionChange),c.on("mousedown",h),c.commands.addCommands(e.defaultCommands),y(c))}function y(c){if(!c.textInput)return;var l=c.textInput.getElement(),g=!1;u.addListener(l,"keydown",function(a){var f=a.keyCode==18&&!(a.ctrlKey||a.shiftKey||a.metaKey);c.$blockSelectEnabled&&f?g||(c.renderer.setMouseCursor("crosshair"),g=!0):g&&d()},c),u.addListener(l,"keyup",d,c),u.addListener(l,"blur",d,c);function d(a){g&&(c.renderer.setMouseCursor(""),g=!1)}}b.MultiSelect=S,L("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(c){S(this),c?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",h)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",h))},value:!0},enableBlockSelect:{set:function(c){this.$blockSelectEnabled=c},value:!0}})}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(L,b,B){"use strict";var E=L("../../range").Range,A=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(p,h,u){var t=p.getLine(u);return this.foldingStartMarker.test(t)?"start":h=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(t)?"end":""},this.getFoldWidgetRange=function(p,h,u){return null},this.indentationBlock=function(p,h,u){var t=/\S/,e=p.getLine(h),i=e.search(t);if(i!=-1){for(var r=u||e.length,n=p.getLength(),o=h,m=h;++ho){var y=p.getLine(m).length;return new E(o,r,m,y)}}},this.openingBracketBlock=function(p,h,u,t,e){var i={row:u,column:t+1},r=p.$findClosingBracket(h,i,e);if(r){var n=p.foldWidgets[r.row];return n==null&&(n=p.getFoldWidget(r.row)),n=="start"&&r.row>i.row&&(r.row--,r.column=p.getLine(r.row).length),E.fromPoints(i,r)}},this.closingBracketBlock=function(p,h,u,t,e){var i={row:u,column:t},r=p.$findOpeningBracket(h,i);if(r)return r.column++,i.column--,E.fromPoints(r,i)}}).call(A.prototype)}),define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(L,b,B){"use strict";b.isDark=!1,b.cssClass="ace-tm",b.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;}',b.$id="ace/theme/textmate";var E=L("../lib/dom");E.importCssString(b.cssText,b.cssClass)}),define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(L,b,B){"use strict";var E=L("./lib/dom");function A(p){this.session=p,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(p){var h;return this.lineWidgets?h=this.lineWidgets[p]&&this.lineWidgets[p].rowCount||0:h=0,!this.$useWrapMode||!this.$wrapData[p]?1+h:this.$wrapData[p].length+1+h},this.$getWidgetScreenLength=function(){var p=0;return this.lineWidgets.forEach(function(h){h&&h.rowCount&&!h.hidden&&(p+=h.rowCount)}),p},this.$onChangeEditor=function(p){this.attach(p.editor)},this.attach=function(p){p&&p.widgetManager&&p.widgetManager!=this&&p.widgetManager.detach(),this.editor!=p&&(this.detach(),this.editor=p,p&&(p.widgetManager=this,p.renderer.on("beforeRender",this.measureWidgets),p.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(p){var h=this.editor;if(h){this.editor=null,h.widgetManager=null,h.renderer.off("beforeRender",this.measureWidgets),h.renderer.off("afterRender",this.renderWidgets);var u=this.session.lineWidgets;u&&u.forEach(function(t){t&&t.el&&t.el.parentNode&&(t._inDocument=!1,t.el.parentNode.removeChild(t.el))})}},this.updateOnFold=function(p,h){var u=h.lineWidgets;if(!(!u||!p.action)){for(var t=p.data,e=t.start.row,i=t.end.row,r=p.action=="add",n=e+1;nh[u].column&&u++,i.unshift(u,0),h.splice.apply(h,i),this.$updateRows()}}},this.$updateRows=function(){var p=this.session.lineWidgets;if(p){var h=!0;p.forEach(function(u,t){if(u)for(h=!1,u.row=t;u.$oldWidget;)u.$oldWidget.row=t,u=u.$oldWidget}),h&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(p){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var h=this.session.lineWidgets[p.row];return h&&(p.$oldWidget=h,h.el&&h.el.parentNode&&(h.el.parentNode.removeChild(h.el),h._inDocument=!1)),this.session.lineWidgets[p.row]=p,p},this.addLineWidget=function(p){if(this.$registerLineWidget(p),p.session=this.session,!this.editor)return p;var h=this.editor.renderer;p.html&&!p.el&&(p.el=E.createElement("div"),p.el.innerHTML=p.html),p.el&&(E.addCssClass(p.el,"ace_lineWidgetContainer"),p.el.style.position="absolute",p.el.style.zIndex=5,h.container.appendChild(p.el),p._inDocument=!0,p.coverGutter||(p.el.style.zIndex=3),p.pixelHeight==null&&(p.pixelHeight=p.el.offsetHeight)),p.rowCount==null&&(p.rowCount=p.pixelHeight/h.layerConfig.lineHeight);var u=this.session.getFoldAt(p.row,0);if(p.$fold=u,u){var t=this.session.lineWidgets;p.row==u.end.row&&!t[u.start.row]?t[u.start.row]=p:p.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:p.row}}}),this.$updateRows(),this.renderWidgets(null,h),this.onWidgetChanged(p),p},this.removeLineWidget=function(p){if(p._inDocument=!1,p.session=null,p.el&&p.el.parentNode&&p.el.parentNode.removeChild(p.el),p.editor&&p.editor.destroy)try{p.editor.destroy()}catch{}if(this.session.lineWidgets){var h=this.session.lineWidgets[p.row];if(h==p)this.session.lineWidgets[p.row]=p.$oldWidget,p.$oldWidget&&this.onWidgetChanged(p.$oldWidget);else for(;h;){if(h.$oldWidget==p){h.$oldWidget=p.$oldWidget;break}h=h.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:p.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(p){for(var h=this.session.lineWidgets,u=h&&h[p],t=[];u;)t.push(u),u=u.$oldWidget;return t},this.onWidgetChanged=function(p){this.session._changedWidgets.push(p),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(p,h){var u=this.session._changedWidgets,t=h.layerConfig;if(!(!u||!u.length)){for(var e=1/0,i=0;i0&&!t[e];)e--;this.firstRow=u.firstRow,this.lastRow=u.lastRow,h.$cursorLayer.config=u;for(var r=e;r<=i;r++){var n=t[r];if(!(!n||!n.el)){if(n.hidden){n.el.style.top=-100-(n.pixelHeight||0)+"px";continue}n._inDocument||(n._inDocument=!0,h.container.appendChild(n.el));var o=h.$cursorLayer.getPixelPosition({row:r,column:0},!0).top;n.coverLine||(o+=u.lineHeight*this.session.getRowLineCount(n.row)),n.el.style.top=o-u.offset+"px";var m=n.coverGutter?0:h.gutterWidth;n.fixedWidth||(m-=h.scrollLeft),n.el.style.left=m+"px",n.fullWidth&&n.screenWidth&&(n.el.style.minWidth=u.width+2*u.padding+"px"),n.fixedWidth?n.el.style.right=h.scrollBar.getWidth()+"px":n.el.style.right=""}}}}}).call(A.prototype),b.LineWidgets=A}),define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(L,b,B){"use strict";var E=L("../line_widgets").LineWidgets,A=L("../lib/dom"),p=L("../range").Range;function h(t,e,i){for(var r=0,n=t.length-1;r<=n;){var o=r+n>>1,m=i(e,t[o]);if(m>0)r=o+1;else if(m<0)n=o-1;else return o}return-(r+1)}function u(t,e,i){var r=t.getAnnotations().sort(p.comparePoints);if(r.length){var n=h(r,{row:e,column:-1},p.comparePoints);n<0&&(n=-n-1),n>=r.length?n=i>0?0:r.length-1:n===0&&i<0&&(n=r.length-1);var o=r[n];if(!(!o||!i)){if(o.row===e){do o=r[n+=i];while(o&&o.row===e);if(!o)return r.slice()}var m=[];e=o.row;do m[i<0?"unshift":"push"](o),o=r[n+=i];while(o&&o.row==e);return m.length&&m}}}b.showErrorMarker=function(t,e){var i=t.session;i.widgetManager||(i.widgetManager=new E(i),i.widgetManager.attach(t));var r=t.getCursorPosition(),n=r.row,o=i.widgetManager.getWidgetsAtRow(n).filter(function(a){return a.type=="errorMarker"})[0];o?o.destroy():n-=e;var m=u(i,n,e),w;if(m){var S=m[0];r.column=(S.pos&&typeof S.column!="number"?S.pos.sc:S.column)||0,r.row=S.row,w=t.renderer.$gutterLayer.$annotations[r.row]}else{if(o)return;w={text:["Looks good!"],className:"ace_ok"}}t.session.unfold(r.row),t.selection.moveToPosition(r);var y={row:r.row,fixedWidth:!0,coverGutter:!0,el:A.createElement("div"),type:"errorMarker"},c=y.el.appendChild(A.createElement("div")),l=y.el.appendChild(A.createElement("div"));l.className="error_widget_arrow "+w.className;var g=t.renderer.$cursorLayer.getPixelPosition(r).left;l.style.left=g+t.renderer.gutterWidth-5+"px",y.el.className="error_widget_wrapper",c.className="error_widget "+w.className,c.innerHTML=w.text.join("
"),c.appendChild(A.createElement("div"));var d=function(a,f,s){if(f===0&&(s==="esc"||s==="return"))return y.destroy(),{command:"null"}};y.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(d),i.widgetManager.removeLineWidget(y),t.off("changeSelection",y.destroy),t.off("changeSession",y.destroy),t.off("mouseup",y.destroy),t.off("change",y.destroy))},t.keyBinding.addKeyboardHandler(d),t.on("changeSelection",y.destroy),t.on("changeSession",y.destroy),t.on("mouseup",y.destroy),t.on("change",y.destroy),t.session.widgetManager.addLineWidget(y),y.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:y.el.offsetHeight})},A.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/range","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(L,b,B){"use strict";L("./lib/fixoldbrowsers");var E=L("./lib/dom"),A=L("./lib/event"),p=L("./range").Range,h=L("./editor").Editor,u=L("./edit_session").EditSession,t=L("./undomanager").UndoManager,e=L("./virtual_renderer").VirtualRenderer;L("./worker/worker_client"),L("./keyboard/hash_handler"),L("./placeholder"),L("./multi_select"),L("./mode/folding/fold_mode"),L("./theme/textmate"),L("./ext/error_marker"),b.config=L("./config"),b.require=L,typeof define=="function"&&(b.define=define),b.edit=function(i,r){if(typeof i=="string"){var n=i;if(i=document.getElementById(n),!i)throw new Error("ace.edit can't find div #"+n)}if(i&&i.env&&i.env.editor instanceof h)return i.env.editor;var o="";if(i&&/input|textarea/i.test(i.tagName)){var m=i;o=m.value,i=E.createElement("pre"),m.parentNode.replaceChild(i,m)}else i&&(o=i.textContent,i.innerHTML="");var w=b.createEditSession(o),S=new h(new e(i),w,r),y={document:w,editor:S,onResize:S.resize.bind(S,null)};return m&&(y.textarea=m),A.addListener(window,"resize",y.onResize),S.on("destroy",function(){A.removeListener(window,"resize",y.onResize),y.editor.container.env=null}),S.container.env=S.env=y,S},b.createEditSession=function(i,r){var n=new u(i,r);return n.setUndoManager(new t),n},b.Range=p,b.Editor=h,b.EditSession=u,b.UndoManager=t,b.VirtualRenderer=e,b.version=b.config.version}),(function(){window.require(["ace/ace"],function(L){L&&(L.config.init(!0),L.define=window.define),window.ace||(window.ace=L);for(var b in L)L.hasOwnProperty(b)&&(window.ace[b]=L[b]);window.ace.default=window.ace,typeof module=="object"&&typeof exports=="object"&&module&&(module.exports=window.ace)})})(),define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/lib/dom","ace/editor"],function(L,b,B){"use strict";var E=L("./lib/oop"),A=L("./lib/event_emitter").EventEmitter,p=L("./lib/lang"),h=L("./range").Range,u=L("./range_list").RangeList,t=L("./keyboard/hash_handler").HashHandler,e=L("./tokenizer").Tokenizer,i=L("./clipboard"),r={CURRENT_WORD:function(c){return c.session.getTextRange(c.session.getWordRange())},SELECTION:function(c,l,g){var d=c.session.getTextRange();return g?d.replace(/\n\r?([ \t]*\S)/g,` `+g+"$1"):d},CURRENT_LINE:function(c){return c.session.getLine(c.getCursorPosition().row)},PREV_LINE:function(c){return c.session.getLine(c.getCursorPosition().row-1)},LINE_INDEX:function(c){return c.getCursorPosition().row},LINE_NUMBER:function(c){return c.getCursorPosition().row+1},SOFT_TABS:function(c){return c.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(c){return c.session.getTabSize()},CLIPBOARD:function(c){return i.getText&&i.getText()},FILENAME:function(c){return/[^/\\]*$/.exec(this.FILEPATH(c))[0]},FILENAME_BASE:function(c){return/[^/\\]*$/.exec(this.FILEPATH(c))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(c){return this.FILEPATH(c).replace(/[^/\\]*$/,"")},FILEPATH:function(c){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(c){var l=c.session.$mode||{};return l.blockComment&&l.blockComment.start||""},BLOCK_COMMENT_END:function(c){var l=c.session.$mode||{};return l.blockComment&&l.blockComment.end||""},LINE_COMMENT:function(c){var l=c.session.$mode||{};return l.lineCommentStart||""},CURRENT_YEAR:n.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:n.bind(null,{year:"2-digit"}),CURRENT_MONTH:n.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:n.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:n.bind(null,{month:"short"}),CURRENT_DATE:n.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:n.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:n.bind(null,{weekday:"short"}),CURRENT_HOUR:n.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:n.bind(null,{minute:"2-digit"}),CURRENT_SECOND:n.bind(null,{second:"2-digit"})};r.SELECTED_TEXT=r.SELECTION;function n(c){var l=new Date().toLocaleString("en-us",c);return l.length==1?"0"+l:l}var o=function(){this.snippetMap={},this.snippetNameMap={}};(function(){E.implement(this,A),this.getTokenizer=function(){return o.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function c(d){return d=d.substr(1),/^\d+$/.test(d)?[{tabstopId:parseInt(d,10)}]:[{text:d}]}function l(d){return"(?:[^\\\\"+d+"]|\\\\.)"}var g={regex:"/("+l("/")+"+)/",onMatch:function(d,a,f){var s=f[0];return s.fmtString=!0,s.guard=d.slice(1,-1),s.flag="",""},next:"formatString"};return o.$tokenizer=new e({start:[{regex:/\\./,onMatch:function(d,a,f){var s=d[1];return(s=="}"&&f.length||"`$\\".indexOf(s)!=-1)&&(d=s),[d]}},{regex:/}/,onMatch:function(d,a,f){return[f.length?f.shift():d]}},{regex:/\$(?:\d+|\w+)/,onMatch:c},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(d,a,f){var s=c(d.substr(1));return f.unshift(s[0]),s},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+l("\\|")+"*\\|",onMatch:function(d,a,f){var s=d.slice(1,-1).replace(/\\[,|\\]|,/g,function(v){return v.length==2?v[1]:"\0"}).split("\0").map(function(v){return{value:v}});return f[0].choices=s,[s[0]]},next:"start"},g,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(d,a,f){return f.length&&f[0].expectElse?(f[0].expectElse=!1,f[0].ifEnd={elseEnd:f[0]},[f[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(d,a,f){var s=d[1];return s=="}"&&f.length||"`$\\".indexOf(s)!=-1?d=s:s=="n"?d=` `:s=="t"?d=" ":"ulULE".indexOf(s)!=-1&&(d={changeCase:s,local:s>"a"}),[d]}},{regex:"/\\w*}",onMatch:function(d,a,f){var s=f.shift();return s&&(s.flag=d.slice(1,-1)),this.next=s&&s.tabstopId?"start":"",[s||d]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(d,a,f){return[{text:d.slice(1)}]}},{regex:/\${\w+/,onMatch:function(d,a,f){var s={text:d.slice(2)};return f.unshift(s),[s]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(d,a,f){var s=f.shift();return this.next=s&&s.tabstopId?"start":"",[s||d]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(d,a,f){var s=f[0];return s.formatFunction=d.slice(2,-1),[f.shift()]},next:"formatString"},g,{regex:/:[\?\-+]?/,onMatch:function(d,a,f){d[1]=="+"&&(f[0].ifEnd=f[0]),d[1]=="?"&&(f[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),o.$tokenizer},this.tokenizeTmSnippet=function(c,l){return this.getTokenizer().getLineTokens(c,l).tokens.map(function(g){return g.value||g})},this.getVariableValue=function(c,l,g){if(/^\d+$/.test(l))return(this.variables.__||{})[l]||"";if(/^[A-Z]\d+$/.test(l))return(this.variables[l[0]+"__"]||{})[l.substr(1)]||"";if(l=l.replace(/^TM_/,""),!this.variables.hasOwnProperty(l))return"";var d=this.variables[l];return typeof d=="function"&&(d=this.variables[l](c,l,g)),d??""},this.variables=r,this.tmStrFormat=function(c,l,g){if(!l.fmt)return c;var d=l.flag||"",a=l.guard;a=new RegExp(a,d.replace(/[^gim]/g,""));var f=typeof l.fmt=="string"?this.tokenizeTmSnippet(l.fmt,"formatString"):l.fmt,s=this,v=c.replace(a,function(){var $=s.variables.__;s.variables.__=[].slice.call(arguments);for(var x=s.resolveVariables(f,g),C="E",k=0;k1?(T=J[J.length-1].length,D+=J.length-1):T+=z.length,P+=z}else z&&(z.start?z.end={row:D,column:T}:z.start={row:D,column:T})});var M=c.getSelectionRange(),W=c.session.replace(M,P),N=new m(c),G=c.inVirtualSelectionMode&&c.selection.index;N.addTabstops(v,M.start,W,G)},this.insertSnippet=function(c,l){var g=this;if(c.inVirtualSelectionMode)return g.insertSnippetForSelection(c,l);c.forEachSelection(function(){g.insertSnippetForSelection(c,l)},null,{keepOrder:!0}),c.tabstopManager&&c.tabstopManager.tabNext()},this.$getScope=function(c){var l=c.session.$mode.$id||"";if(l=l.split("/").pop(),l==="html"||l==="php"){l==="php"&&!c.session.$mode.inlinePhp&&(l="html");var g=c.getCursorPosition(),d=c.session.getState(g.row);typeof d=="object"&&(d=d[0]),d.substring&&(d.substring(0,3)=="js-"?l="javascript":d.substring(0,4)=="css-"?l="css":d.substring(0,4)=="php-"&&(l="php"))}return l},this.getActiveScopes=function(c){var l=this.$getScope(c),g=[l],d=this.snippetMap;return d[l]&&d[l].includeScopes&&g.push.apply(g,d[l].includeScopes),g.push("_"),g},this.expandWithTab=function(c,l){var g=this,d=c.forEachSelection(function(){return g.expandSnippetForSelection(c,l)},null,{keepOrder:!0});return d&&c.tabstopManager&&c.tabstopManager.tabNext(),d},this.expandSnippetForSelection=function(c,l){var g=c.getCursorPosition(),d=c.session.getLine(g.row),a=d.substring(0,g.column),f=d.substr(g.column),s=this.snippetMap,v;return this.getActiveScopes(c).some(function($){var x=s[$];return x&&(v=this.findMatchingSnippet(x,a,f)),!!v},this),v?(l&&l.dryRun||(c.session.doc.removeInLine(g.row,g.column-v.replaceBefore.length,g.column+v.replaceAfter.length),this.variables.M__=v.matchBefore,this.variables.T__=v.matchAfter,this.insertSnippetForSelection(c,v.content),this.variables.M__=this.variables.T__=null),!0):!1},this.findMatchingSnippet=function(c,l,g){for(var d=c.length;d--;){var a=c[d];if(!(a.startRe&&!a.startRe.test(l))&&!(a.endRe&&!a.endRe.test(g))&&!(!a.startRe&&!a.endRe))return a.matchBefore=a.startRe?a.startRe.exec(l):[""],a.matchAfter=a.endRe?a.endRe.exec(g):[""],a.replaceBefore=a.triggerRe?a.triggerRe.exec(l)[0]:"",a.replaceAfter=a.endTriggerRe?a.endTriggerRe.exec(g)[0]:"",a}},this.snippetMap={},this.snippetNameMap={},this.register=function(c,l){var g=this.snippetMap,d=this.snippetNameMap,a=this;c||(c=[]);function f($){return $&&!/^\^?\(.*\)\$?$|^\\b$/.test($)&&($="(?:"+$+")"),$||""}function s($,x,C){return $=f($),x=f(x),C?($=x+$,$&&$[$.length-1]!="$"&&($=$+"$")):($=$+x,$&&$[0]!="^"&&($="^"+$)),new RegExp($)}function v($){$.scope||($.scope=l||"_"),l=$.scope,g[l]||(g[l]=[],d[l]={});var x=d[l];if($.name){var C=x[$.name];C&&a.unregister(C),x[$.name]=$}g[l].push($),$.prefix&&($.tabTrigger=$.prefix),!$.content&&$.body&&($.content=Array.isArray($.body)?$.body.join(` `):$.body),$.tabTrigger&&!$.trigger&&(!$.guard&&/^\w/.test($.tabTrigger)&&($.guard="\\b"),$.trigger=p.escapeRegExp($.tabTrigger)),!(!$.trigger&&!$.guard&&!$.endTrigger&&!$.endGuard)&&($.startRe=s($.trigger,$.guard,!0),$.triggerRe=new RegExp($.trigger),$.endRe=s($.endTrigger,$.endGuard,!0),$.endTriggerRe=new RegExp($.endTrigger))}Array.isArray(c)?c.forEach(v):Object.keys(c).forEach(function($){v(c[$])}),this._signal("registerSnippets",{scope:l})},this.unregister=function(c,l){var g=this.snippetMap,d=this.snippetNameMap;function a(f){var s=d[f.scope||l];if(s&&s[f.name]){delete s[f.name];var v=g[f.scope||l],$=v&&v.indexOf(f);$>=0&&v.splice($,1)}}c.content?a(c):Array.isArray(c)&&c.forEach(a)},this.parseSnippetFile=function(c){c=c.replace(/\r/g,"");for(var l=[],g={},d=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,a;a=d.exec(c);){if(a[1])try{g=JSON.parse(a[1]),l.push(g)}catch{}if(a[4])g.content=a[4].replace(/^\t/gm,""),l.push(g),g={};else{var f=a[2],s=a[3];if(f=="regex"){var v=/\/((?:[^\/\\]|\\.)*)|$/g;g.guard=v.exec(s)[1],g.trigger=v.exec(s)[1],g.endTrigger=v.exec(s)[1],g.endGuard=v.exec(s)[1]}else f=="snippet"?(g.tabTrigger=s.match(/^\S*/)[0],g.name||(g.name=s)):f&&(g[f]=s)}}return l},this.getSnippetByName=function(c,l){var g=this.snippetNameMap,d;return this.getActiveScopes(l).some(function(a){var f=g[a];return f&&(d=f[c]),!!d},this),d}}).call(o.prototype);var m=function(c){if(c.tabstopManager)return c.tabstopManager;c.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=p.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(c)};(function(){this.attach=function(c){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=c,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(c){for(var l=c.action[0]=="r",g=this.selectedTabstop||{},d=g.parents||{},a=(this.tabstops||[]).slice(),f=0;f2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},this.addTabstopMarkers=function(c){var l=this.editor.session;c.forEach(function(g){g.markerId||(g.markerId=l.addMarker(g,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(c){var l=this.editor.session;c.forEach(function(g){l.removeMarker(g.markerId),g.markerId=null})},this.removeRange=function(c){var l=c.tabstop.indexOf(c);l!=-1&&c.tabstop.splice(l,1),l=this.ranges.indexOf(c),l!=-1&&this.ranges.splice(l,1),l=c.tabstop.rangeList.ranges.indexOf(c),l!=-1&&c.tabstop.splice(l,1),this.editor.session.removeMarker(c.markerId),c.tabstop.length||(l=this.tabstops.indexOf(c.tabstop),l!=-1&&this.tabstops.splice(l,1),this.tabstops.length||this.detach())},this.keyboardHandler=new t,this.keyboardHandler.bindKeys({Tab:function(c){b.snippetManager&&b.snippetManager.expandWithTab(c)||(c.tabstopManager.tabNext(1),c.renderer.scrollCursorIntoView())},"Shift-Tab":function(c){c.tabstopManager.tabNext(-1),c.renderer.scrollCursorIntoView()},Esc:function(c){c.tabstopManager.detach()}})}).call(m.prototype);var w=function(c,l){c.row==0&&(c.column+=l.column),c.row+=l.row},S=function(c,l){c.row==l.row&&(c.column-=l.column),c.row-=l.row};L("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),b.snippetManager=new o;var y=L("./editor").Editor;(function(){this.insertSnippet=function(c,l){return b.snippetManager.insertSnippet(this,c,l)},this.expandSnippet=function(c){return b.snippetManager.expandWithTab(this,c)}}).call(y.prototype)}),define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(L,b,B){"use strict";var E=L("../virtual_renderer").VirtualRenderer,A=L("../editor").Editor,p=L("../range").Range,h=L("../lib/event"),u=L("../lib/lang"),t=L("../lib/dom"),e=function(r){var n=new E(r);n.$maxLines=4;var o=new A(n);return o.setHighlightActiveLine(!1),o.setShowPrintMargin(!1),o.renderer.setShowGutter(!1),o.renderer.setHighlightGutterLine(!1),o.$mouseHandler.$focusTimeout=0,o.$highlightTagPending=!0,o},i=function(r){var n=t.createElement("div"),o=new e(n);r&&r.appendChild(n),n.style.display="none",o.renderer.content.style.cursor="default",o.renderer.setStyle("ace_autocomplete"),o.setOption("displayIndentGuides",!1),o.setOption("dragDelay",150);var m=function(){};o.focus=m,o.$isFocused=!0,o.renderer.$cursorLayer.restartTimer=m,o.renderer.$cursorLayer.element.style.opacity=0,o.renderer.$maxLines=8,o.renderer.$keepTextAreaAtCursor=!1,o.setHighlightActiveLine(!1),o.session.highlight(""),o.session.$searchHighlight.clazz="ace_highlight-marker",o.on("mousedown",function(d){var a=d.getDocumentPosition();o.selection.moveToPosition(a),y.start.row=y.end.row=a.row,d.stop()});var w,S=new p(-1,0,-1,1/0),y=new p(-1,0,-1,1/0);y.id=o.session.addMarker(y,"ace_active-line","fullLine"),o.setSelectOnHover=function(d){d?S.id&&(o.session.removeMarker(S.id),S.id=null):S.id=o.session.addMarker(S,"ace_line-hover","fullLine")},o.setSelectOnHover(!1),o.on("mousemove",function(d){if(!w){w=d;return}if(!(w.x==d.x&&w.y==d.y)){w=d,w.scrollTop=o.renderer.scrollTop;var a=w.getDocumentPosition().row;S.start.row!=a&&(S.id||o.setRow(a),l(a))}}),o.renderer.on("beforeRender",function(){if(w&&S.start.row!=-1){w.$pos=null;var d=w.getDocumentPosition().row;S.id||o.setRow(d),l(d,!0)}}),o.renderer.on("afterRender",function(){var d=o.getRow(),a=o.renderer.$textLayer,f=a.element.childNodes[d-a.config.firstRow];f!==a.selectedNode&&a.selectedNode&&t.removeCssClass(a.selectedNode,"ace_selected"),a.selectedNode=f,f&&t.addCssClass(f,"ace_selected")});var c=function(){l(-1)},l=function(d,a){d!==S.start.row&&(S.start.row=S.end.row=d,a||o.session._emit("changeBackMarker"),o._emit("changeHoverMarker"))};o.getHoveredRow=function(){return S.start.row},h.addListener(o.container,"mouseout",c),o.on("hide",c),o.on("changeSelection",c),o.session.doc.getLength=function(){return o.data.length},o.session.doc.getLine=function(d){var a=o.data[d];return typeof a=="string"?a:a&&a.value||""};var g=o.session.bgTokenizer;return g.$tokenizeRow=function(d){var a=o.data[d],f=[];if(!a)return f;typeof a=="string"&&(a={value:a});var s=a.caption||a.value||a.name;function v(I,D){I&&f.push({type:(a.className||"")+(D||""),value:I})}for(var $=s.toLowerCase(),x=(o.filterText||"").toLowerCase(),C=0,k=0,R=0;R<=x.length;R++)if(R!=k&&(a.matchMask&1<v/2&&!f;R&&k+a+C>v?(x.$maxPixelHeight=k-2*this.$borderSize,s.style.top="",s.style.bottom=v-k+"px",o.isTopdown=!1):(k+=a,x.$maxPixelHeight=v-k-.2*a,s.style.top=k+"px",s.style.bottom="",o.isTopdown=!0),s.style.display="";var _=d.left;_+s.offsetWidth>$&&(_=$-s.offsetWidth),s.style.left=_+"px",this._signal("show"),w=null,o.isOpen=!0},o.goTo=function(d){var a=this.getRow(),f=this.session.getLength()-1;switch(d){case"up":a=a<=0?f:a-1;break;case"down":a=a>=f?-1:a+1;break;case"start":a=0;break;case"end":a=f;break}this.setRow(a)},o.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},o.$imageSize=0,o.$borderSize=1,o};t.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1;}.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #3a674e;}.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4); position: absolute; z-index: 2;}.ace_dark.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid rgba(109, 150, 13, 0.8); background: rgba(58, 103, 78, 0.62);}.ace_completion-meta { opacity: 0.5; margin: 0.9em;}.ace_completion-message { color: blue;}.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #2d69c7;}.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #93ca12;}.ace_editor.ace_autocomplete { width: 300px; z-index: 200000; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4; background: #fefefe; color: #111;}.ace_dark.ace_editor.ace_autocomplete { border: 1px #484747 solid; box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51); line-height: 1.4; background: #25282c; color: #c1c1c1;}","autocompletion.css"),b.AcePopup=i,b.$singleLineEditor=e}),define("ace/autocomplete/util",["require","exports","module"],function(L,b,B){"use strict";b.parForEach=function(A,p,h){var u=0,t=A.length;t===0&&h();for(var e=0;e=0&&h.test(A[t]);t--)u.push(A[t]);return u.reverse().join("")},b.retrieveFollowingIdentifier=function(A,p,h){h=h||E;for(var u=[],t=p;tthis.filterText&&n.lastIndexOf(this.filterText,0)===0)var o=this.filtered;else var o=this.all;this.filterText=n,o=this.filterCompletions(o,this.filterText),o=o.sort(function(w,S){return S.exactMatch-w.exactMatch||S.$score-w.$score||(w.caption||w.value).localeCompare(S.caption||S.value)});var m=null;o=o.filter(function(w){var S=w.snippet||w.caption||w.value;return S===m?!1:(m=S,!0)}),this.filtered=o},this.filterCompletions=function(n,o){var m=[],w=o.toUpperCase(),S=o.toLowerCase();e:for(var y=0,c;c=n[y];y++){var l=c.caption||c.value||c.snippet;if(l){var g=-1,d=0,a=0,f,s;if(this.exactMatch){if(o!==l.substr(0,o.length))continue e}else{var v=l.toLowerCase().indexOf(S);if(v>-1)a=v;else for(var $=0;$=0&&(C<0||x0&&(g===-1&&(a+=10),a+=s,d=d|1<<$),g=f}}c.matchMask=d,c.exactMatch=a?0:1,c.$score=(c.score||0)-a,m.push(c)}}return m}}).call(r.prototype),b.Autocomplete=i,b.FilteredList=r}),define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(L,b,B){var E=L("../range").Range,A=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function p(u,t){var e=u.getTextRange(E.fromPoints({row:0,column:0},t));return e.split(A).length-1}function h(u,t){var e=p(u,t),i=u.getValue().split(A),r=Object.create(null),n=i[e];return i.forEach(function(o,m){if(!(!o||o===n)){var w=Math.abs(e-m),S=i.length-w;r[o]?r[o]=Math.max(S,r[o]):r[o]=S}}),r}b.getCompletions=function(u,t,e,i,r){var n=h(t,e),o=Object.keys(n);r(null,o.map(function(m){return{caption:m,value:m,score:n[m],meta:"local"}}))}}),define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(L,b,B){"use strict";var E=L("../snippets").snippetManager,A=L("../autocomplete").Autocomplete,p=L("../config"),h=L("../lib/lang"),u=L("../autocomplete/util"),t=L("../autocomplete/text_completer"),e={getCompletions:function(c,l,g,d,a){if(l.$mode.completer)return l.$mode.completer.getCompletions(c,l,g,d,a);var f=c.session.getState(g.row),s=l.$mode.getCompletions(f,l,g,d);a(null,s)}},i={getCompletions:function(c,l,g,d,a){var f=[],s=l.getTokenAt(g.row,g.column);s&&s.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?f.push("html-tag"):f=E.getActiveScopes(c);var v=E.snippetMap,$=[];f.forEach(function(x){for(var C=v[x]||[],k=C.length;k--;){var R=C[k],_=R.name||R.tabTrigger;_&&$.push({caption:_,snippet:R.content,meta:R.tabTrigger&&!R.name?R.tabTrigger+"\u21E5 ":"snippet",type:"snippet"})}},this),a(null,$)},getDocTooltip:function(c){c.type=="snippet"&&!c.docHTML&&(c.docHTML=["",h.escapeHTML(c.caption),"","
",h.escapeHTML(c.snippet)].join(""))}},r=[i,t,e];b.setCompleters=function(c){r.length=0,c&&r.push.apply(r,c)},b.addCompleter=function(c){r.push(c)},b.textCompleter=t,b.keyWordCompleter=e,b.snippetCompleter=i;var n={name:"expandSnippet",exec:function(c){return E.expandWithTab(c)},bindKey:"Tab"},o=function(c,l){m(l.session.$mode)},m=function(c){typeof c=="string"&&(c=p.$modes[c]),c&&(E.files||(E.files={}),w(c.$id,c.snippetFileId),c.modes&&c.modes.forEach(m))},w=function(c,l){!l||!c||E.files[c]||(E.files[c]={},p.loadModule(l,function(g){g&&(E.files[c]=g,!g.snippets&&g.snippetText&&(g.snippets=E.parseSnippetFile(g.snippetText)),E.register(g.snippets||[],g.scope),g.includeScopes&&(E.snippetMap[g.scope].includeScopes=g.includeScopes,g.includeScopes.forEach(function(d){m("ace/mode/"+d)})))}))},S=function(c){var l=c.editor,g=l.completer&&l.completer.activated;if(c.command.name==="backspace")g&&!u.getCompletionPrefix(l)&&l.completer.detach();else if(c.command.name==="insertstring"){var d=u.getCompletionPrefix(l);if(d&&!g){var a=A.for(l);a.autoInsert=!1,a.showPopup(l)}}},y=L("../editor").Editor;L("../config").defineOptions(y.prototype,"editor",{enableBasicAutocompletion:{set:function(c){c?(this.completers||(this.completers=Array.isArray(c)?c:r),this.commands.addCommand(A.startCommand)):this.commands.removeCommand(A.startCommand)},value:!1},enableLiveAutocompletion:{set:function(c){c?(this.completers||(this.completers=Array.isArray(c)?c:r),this.commands.on("afterExec",S)):this.commands.removeListener("afterExec",S)},value:!1},enableSnippets:{set:function(c){c?(this.commands.addCommand(n),this.on("changeMode",o),o(null,this)):(this.commands.removeCommand(n),this.off("changeMode",o))},value:!1}})}),function(){window.require(["ace/ext/language_tools"],function(L){typeof module=="object"&&typeof exports=="object"&&module&&(module.exports=L)})}(),define("ace/mode/mongo_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(L,b,B){"use strict";var E=L("../lib/oop"),A=L("./text_highlight_rules").TextHighlightRules,p=function(){var h=function(u){switch(u){case"ObjectId":case"ISODate":case"Timestamp":case"NumberInt":case"NumberLong":case"NumberDecimal":case"BinData":case"true":case"false":case"null":case"undefined":return"constant.language";case"db":case"find":case"aggregate":case"update":case"explain":return"storage.function";default:return"identifier"}};this.$rules={start:[{token:"comment",regex:"//.*"},{token:"key",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:h,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]}};E.inherits(p,A),b.MongoHighlightRules=p}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(L,b,B){"use strict";var E=L("../range").Range,A=function(){this.checkOutdent=function(p,h){return/^\s+$/.test(p)?/^\s*\}/.test(h):!1},this.autoOutdent=function(p,h){var u=p.getLine(h),t=u.match(/^(\s*\})/);if(!t)return 0;var e=t[1].length,i=p.findMatchingBracket({row:h,column:e});if(!i||i.row==h)return 0;var r=this.$getIndent(p.getLine(i.row));p.replace(new E(h,0,h,e-1),r)},this.$getIndent=function(p){return p.match(/^\s*/)[0]}};b.MatchingBraceOutdent=A}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(L,b,B){"use strict";var E=L("../../lib/oop"),A=L("./fold_mode").FoldMode,p=function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(h,u,t){return this._getFoldWidgetBase(h,u,t)},this.getFoldWidgetRange=function(h,u,t,e){var i=h.getLine(t),r=i.match(this.foldingStartMarker);if(r.length>=2)return this.openingBracketBlock(h,r[1],t,r.index);if(u!=="markbegin"&&(r=i.match(this.foldingStopMarker),r.length>=2))return this.closingBracketBlock(h,r[1],t,r.index+r[0].length)}};E.inherits(p,A),b.FoldMode=p}),define("ace/mode/mongo",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mongo_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(L,b,B){"use strict";var E=L("../lib/oop"),A=L("./text").Mode,p=L("./mongo_highlight_rules").MongoHighlightRules,h=L("./matching_brace_outdent").MatchingBraceOutdent,u=L("./behaviour/cstyle").CstyleBehaviour,t=L("./folding/cstyle").FoldMode,e=function(){this.HighlightRules=p,this.$outdent=new h,this.$behaviour=new u,this.foldingRules=new t,this.getNextLineIndent=function(i,r,n){var o=this.$getIndent(r);if(i=="start"){var m=r.match(/^.*[\{\(\[]\s*$/);m&&(o+=n)}return o},this.checkOutdent=function(i,r,n){return this.$outdent.checkOutdent(r,n)},this.autoOutdent=function(i,r,n){this.$outdent.autoOutdent(r,n)},this.$id="ace/mode/mongo"};E.inherits(e,A),b.Mode=e}),function(){window.require(["ace/mode/mongo"],function(L){typeof module=="object"&&typeof exports=="object"&&module&&(module.exports=L)})}();var Completer=function(L){const b=[{caption:"find()",value:"find()",meta:"method"},{caption:"aggregate()",value:"aggregate()",meta:"method"},{caption:"update()",value:"update()",meta:"method"},{caption:"explain()",value:"explain()",meta:"method"}],B=[{caption:"true",value:"true",meta:"bson keyword"},{caption:"false",value:"false",meta:"bson keyword"},{caption:"null",value:"null",meta:"bson keyword"},{caption:"$numberDecimal",value:"$numberDecimal: ",meta:"bson keyword"},{caption:"$numberDouble",value:"$numberDouble: ",meta:"bson keyword"},{caption:"$numberLong",value:"$numberLong: ",meta:"bson keyword"},{caption:"$numberInt",value:"$numberLong: ",meta:"bson keyword"},{caption:"$oid",value:"$oid: ",meta:"bson keyword"},{caption:"$regularExpression",value:`$regularExpression: { +`,d.length),-1),o.data=d||[],o.setRow(0)},o.getData=function(d){return o.data[d]},o.getRow=function(){return y.start.row},o.setRow=function(d){d=Math.max(this.autoSelect?0:-1,Math.min(this.data.length,d)),y.start.row!=d&&(o.selection.clearSelection(),y.start.row=y.end.row=d||0,o.session._emit("changeBackMarker"),o.moveCursorTo(d||0,0),o.isOpen&&o._signal("select"))},o.on("changeSelection",function(){o.isOpen&&o.setRow(o.selection.lead.row),o.renderer.scrollCursorIntoView()}),o.hide=function(){this.container.style.display="none",this._signal("hide"),o.isOpen=!1},o.show=function(d,a,f){var s=this.container,v=window.innerHeight,$=window.innerWidth,x=this.renderer,C=x.$maxLines*a*1.4,k=d.top+this.$borderSize,R=k>v/2&&!f;R&&k+a+C>v?(x.$maxPixelHeight=k-2*this.$borderSize,s.style.top="",s.style.bottom=v-k+"px",o.isTopdown=!1):(k+=a,x.$maxPixelHeight=v-k-.2*a,s.style.top=k+"px",s.style.bottom="",o.isTopdown=!0),s.style.display="";var _=d.left;_+s.offsetWidth>$&&(_=$-s.offsetWidth),s.style.left=_+"px",this._signal("show"),w=null,o.isOpen=!0},o.goTo=function(d){var a=this.getRow(),f=this.session.getLength()-1;switch(d){case"up":a=a<=0?f:a-1;break;case"down":a=a>=f?-1:a+1;break;case"start":a=0;break;case"end":a=f;break}this.setRow(a)},o.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},o.$imageSize=0,o.$borderSize=1,o};t.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1;}.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #3a674e;}.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4); position: absolute; z-index: 2;}.ace_dark.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid rgba(109, 150, 13, 0.8); background: rgba(58, 103, 78, 0.62);}.ace_completion-meta { opacity: 0.5; margin: 0.9em;}.ace_completion-message { color: blue;}.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #2d69c7;}.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #93ca12;}.ace_editor.ace_autocomplete { width: 300px; z-index: 200000; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4; background: #fefefe; color: #111;}.ace_dark.ace_editor.ace_autocomplete { border: 1px #484747 solid; box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51); line-height: 1.4; background: #25282c; color: #c1c1c1;}","autocompletion.css"),b.AcePopup=i,b.$singleLineEditor=e}),define("ace/autocomplete/util",["require","exports","module"],function(L,b,B){"use strict";b.parForEach=function(A,p,h){var u=0,t=A.length;t===0&&h();for(var e=0;e=0&&h.test(A[t]);t--)u.push(A[t]);return u.reverse().join("")},b.retrieveFollowingIdentifier=function(A,p,h){h=h||E;for(var u=[],t=p;tthis.filterText&&n.lastIndexOf(this.filterText,0)===0)var o=this.filtered;else var o=this.all;this.filterText=n,o=this.filterCompletions(o,this.filterText),o=o.sort(function(w,S){return S.exactMatch-w.exactMatch||S.$score-w.$score||(w.caption||w.value).localeCompare(S.caption||S.value)});var m=null;o=o.filter(function(w){var S=w.snippet||w.caption||w.value;return S===m?!1:(m=S,!0)}),this.filtered=o},this.filterCompletions=function(n,o){var m=[],w=o.toUpperCase(),S=o.toLowerCase();e:for(var y=0,c;c=n[y];y++){var l=c.caption||c.value||c.snippet;if(l){var g=-1,d=0,a=0,f,s;if(this.exactMatch){if(o!==l.substr(0,o.length))continue e}else{var v=l.toLowerCase().indexOf(S);if(v>-1)a=v;else for(var $=0;$=0&&(C<0||x0&&(g===-1&&(a+=10),a+=s,d=d|1<<$),g=f}}c.matchMask=d,c.exactMatch=a?0:1,c.$score=(c.score||0)-a,m.push(c)}}return m}}).call(r.prototype),b.Autocomplete=i,b.FilteredList=r}),define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(L,b,B){var E=L("../range").Range,A=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function p(u,t){var e=u.getTextRange(E.fromPoints({row:0,column:0},t));return e.split(A).length-1}function h(u,t){var e=p(u,t),i=u.getValue().split(A),r=Object.create(null),n=i[e];return i.forEach(function(o,m){if(!(!o||o===n)){var w=Math.abs(e-m),S=i.length-w;r[o]?r[o]=Math.max(S,r[o]):r[o]=S}}),r}b.getCompletions=function(u,t,e,i,r){var n=h(t,e),o=Object.keys(n);r(null,o.map(function(m){return{caption:m,value:m,score:n[m],meta:"local"}}))}}),define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(L,b,B){"use strict";var E=L("../snippets").snippetManager,A=L("../autocomplete").Autocomplete,p=L("../config"),h=L("../lib/lang"),u=L("../autocomplete/util"),t=L("../autocomplete/text_completer"),e={getCompletions:function(c,l,g,d,a){if(l.$mode.completer)return l.$mode.completer.getCompletions(c,l,g,d,a);var f=c.session.getState(g.row),s=l.$mode.getCompletions(f,l,g,d);a(null,s)}},i={getCompletions:function(c,l,g,d,a){var f=[],s=l.getTokenAt(g.row,g.column);s&&s.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?f.push("html-tag"):f=E.getActiveScopes(c);var v=E.snippetMap,$=[];f.forEach(function(x){for(var C=v[x]||[],k=C.length;k--;){var R=C[k],_=R.name||R.tabTrigger;_&&$.push({caption:_,snippet:R.content,meta:R.tabTrigger&&!R.name?R.tabTrigger+"\u21E5 ":"snippet",type:"snippet"})}},this),a(null,$)},getDocTooltip:function(c){c.type=="snippet"&&!c.docHTML&&(c.docHTML=["",h.escapeHTML(c.caption),"","
",h.escapeHTML(c.snippet)].join(""))}},r=[i,t,e];b.setCompleters=function(c){r.length=0,c&&r.push.apply(r,c)},b.addCompleter=function(c){r.push(c)},b.textCompleter=t,b.keyWordCompleter=e,b.snippetCompleter=i;var n={name:"expandSnippet",exec:function(c){return E.expandWithTab(c)},bindKey:"Tab"},o=function(c,l){m(l.session.$mode)},m=function(c){typeof c=="string"&&(c=p.$modes[c]),c&&(E.files||(E.files={}),w(c.$id,c.snippetFileId),c.modes&&c.modes.forEach(m))},w=function(c,l){!l||!c||E.files[c]||(E.files[c]={},p.loadModule(l,function(g){g&&(E.files[c]=g,!g.snippets&&g.snippetText&&(g.snippets=E.parseSnippetFile(g.snippetText)),E.register(g.snippets||[],g.scope),g.includeScopes&&(E.snippetMap[g.scope].includeScopes=g.includeScopes,g.includeScopes.forEach(function(d){m("ace/mode/"+d)})))}))},S=function(c){var l=c.editor,g=l.completer&&l.completer.activated;if(c.command.name==="backspace")g&&!u.getCompletionPrefix(l)&&l.completer.detach();else if(c.command.name==="insertstring"){var d=u.getCompletionPrefix(l);if(d&&!g){var a=A.for(l);a.autoInsert=!1,a.showPopup(l)}}},y=L("../editor").Editor;L("../config").defineOptions(y.prototype,"editor",{enableBasicAutocompletion:{set:function(c){c?(this.completers||(this.completers=Array.isArray(c)?c:r),this.commands.addCommand(A.startCommand)):this.commands.removeCommand(A.startCommand)},value:!1},enableLiveAutocompletion:{set:function(c){c?(this.completers||(this.completers=Array.isArray(c)?c:r),this.commands.on("afterExec",S)):this.commands.removeListener("afterExec",S)},value:!1},enableSnippets:{set:function(c){c?(this.commands.addCommand(n),this.on("changeMode",o),o(null,this)):(this.commands.removeCommand(n),this.off("changeMode",o))},value:!1}})}),(function(){window.require(["ace/ext/language_tools"],function(L){typeof module=="object"&&typeof exports=="object"&&module&&(module.exports=L)})})(),define("ace/mode/mongo_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(L,b,B){"use strict";var E=L("../lib/oop"),A=L("./text_highlight_rules").TextHighlightRules,p=function(){var h=function(u){switch(u){case"ObjectId":case"ISODate":case"Timestamp":case"NumberInt":case"NumberLong":case"NumberDecimal":case"BinData":case"true":case"false":case"null":case"undefined":return"constant.language";case"db":case"find":case"aggregate":case"update":case"explain":return"storage.function";default:return"identifier"}};this.$rules={start:[{token:"comment",regex:"//.*"},{token:"key",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:h,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]}};E.inherits(p,A),b.MongoHighlightRules=p}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(L,b,B){"use strict";var E=L("../range").Range,A=function(){this.checkOutdent=function(p,h){return/^\s+$/.test(p)?/^\s*\}/.test(h):!1},this.autoOutdent=function(p,h){var u=p.getLine(h),t=u.match(/^(\s*\})/);if(!t)return 0;var e=t[1].length,i=p.findMatchingBracket({row:h,column:e});if(!i||i.row==h)return 0;var r=this.$getIndent(p.getLine(i.row));p.replace(new E(h,0,h,e-1),r)},this.$getIndent=function(p){return p.match(/^\s*/)[0]}};b.MatchingBraceOutdent=A}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(L,b,B){"use strict";var E=L("../../lib/oop"),A=L("./fold_mode").FoldMode,p=function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(h,u,t){return this._getFoldWidgetBase(h,u,t)},this.getFoldWidgetRange=function(h,u,t,e){var i=h.getLine(t),r=i.match(this.foldingStartMarker);if(r.length>=2)return this.openingBracketBlock(h,r[1],t,r.index);if(u!=="markbegin"&&(r=i.match(this.foldingStopMarker),r.length>=2))return this.closingBracketBlock(h,r[1],t,r.index+r[0].length)}};E.inherits(p,A),b.FoldMode=p}),define("ace/mode/mongo",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mongo_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(L,b,B){"use strict";var E=L("../lib/oop"),A=L("./text").Mode,p=L("./mongo_highlight_rules").MongoHighlightRules,h=L("./matching_brace_outdent").MatchingBraceOutdent,u=L("./behaviour/cstyle").CstyleBehaviour,t=L("./folding/cstyle").FoldMode,e=function(){this.HighlightRules=p,this.$outdent=new h,this.$behaviour=new u,this.foldingRules=new t,this.getNextLineIndent=function(i,r,n){var o=this.$getIndent(r);if(i=="start"){var m=r.match(/^.*[\{\(\[]\s*$/);m&&(o+=n)}return o},this.checkOutdent=function(i,r,n){return this.$outdent.checkOutdent(r,n)},this.autoOutdent=function(i,r,n){this.$outdent.autoOutdent(r,n)},this.$id="ace/mode/mongo"};E.inherits(e,A),b.Mode=e}),(function(){window.require(["ace/mode/mongo"],function(L){typeof module=="object"&&typeof exports=="object"&&module&&(module.exports=L)})})();var Completer=function(L){const b=[{caption:"find()",value:"find()",meta:"method"},{caption:"aggregate()",value:"aggregate()",meta:"method"},{caption:"update()",value:"update()",meta:"method"},{caption:"explain()",value:"explain()",meta:"method"}],B=[{caption:"true",value:"true",meta:"bson keyword"},{caption:"false",value:"false",meta:"bson keyword"},{caption:"null",value:"null",meta:"bson keyword"},{caption:"$numberDecimal",value:"$numberDecimal: ",meta:"bson keyword"},{caption:"$numberDouble",value:"$numberDouble: ",meta:"bson keyword"},{caption:"$numberLong",value:"$numberLong: ",meta:"bson keyword"},{caption:"$numberInt",value:"$numberLong: ",meta:"bson keyword"},{caption:"$oid",value:"$oid: ",meta:"bson keyword"},{caption:"$regularExpression",value:`$regularExpression: { "pattern": "pattern", "options": "options" }`,meta:"bson keyword"},{caption:"$timestamp",value:'$timestamp: {"t": 0, "i": 1}',meta:"bson keyword"},{caption:"$date",value:"$date: ",meta:"bson keyword"}].map(h),E=[{caption:"$eq",value:'$eq: "value"',meta:"comparison operator"},{caption:"$gt",value:'$gt: "value"',meta:"comparison operator"},{caption:"$gte",value:'$gte: "value"',meta:"comparison operator"},{caption:"$in",value:'$in: ["value1", "value2"]',meta:"comparison operator"},{caption:"$let",value:`$let: { @@ -156,6 +156,8 @@ "from": "collection to join", "localField": "field from the input documents", "foreignField": "field from the documents of the from collection", + "let": {var1: "val1"}, + "pipeline": [], "as": "output array field" }`,meta:"aggregation stage"},{caption:"$lt",value:'$lt: [ "expression1", "expression2" ]',meta:"comparison operator"},{caption:"$lte",value:'$lte: [ "expression1", "expression2" ]',meta:"comparison operator"},{caption:"$ltrim",value:'$ltrim: { "input": "string", "chars": "string" }',meta:"string operator (v4.0+)"},{caption:"$map",value:'$map: { "input": "expression", "as": "string", "in": "expression" }',meta:"array operator"},{caption:"$match",value:"$match: { }",meta:"aggregation stage"},{caption:"$max",value:'$max: "expression"',meta:"accumulation operator"},{caption:"$merge",value:`$merge: { "into": "collection", @@ -251,7 +253,7 @@ "n": "expression", "sortBy": { "field": 1 }, "output": "expression" -}`,meta:"aggregation accumulator (v5.2+)"},{caption:"$linearFill",value:'$linearFill: "expression"',meta:"aggregation (v5.3+)"},{caption:"$locf",value:'$locf: "expression"',meta:"aggregation (v5.2+)"},{caption:"$tsIncrement",value:'$tsIncrement: "expression"',meta:"aggregation (v5.1+)"},{caption:"$tsSecond",value:'$tsSecond: "expression"',meta:"aggregation (v5.1+)"}].map(h).concat(B),p=[{caption:"$currentDate",value:'$currentDate: "expression"',meta:"update operator"},{caption:"$inc",value:'$inc: { "field": 1 }',meta:"update operator"},{caption:"$min",value:'$min: "expression"',meta:"update operator"},{caption:"$max",value:'$max: "expression"',meta:"update operator"},{caption:"$mul",value:'$mul: { "field": 2 }',meta:"update operator"},{caption:"$rename",value:'$rename: { "field": "newName" }',meta:"update operator"},{caption:"$set",value:'$set: { "field": "value" }',meta:"update operator"},{caption:"$setOnInsert",value:'$setOnInsert: { "field": "value" }',meta:"update operator"},{caption:"$unset",value:'$unset: { "field": "" }',meta:"update operator"},{caption:"$addToSet",value:'$addToSet: "expression"',meta:"update operator"},{caption:"$pop",value:'$pop: "expression"',meta:"update operator"},{caption:"$pull",value:'$pull: "expression"',meta:"update operator"},{caption:"$push",value:'$push: "expression"',meta:"update operator"},{caption:"$pullAll",value:'$pullAll: { "field": ["value1", "value2"] }',meta:"update operator"},{caption:"$each",value:'$each: ["value1", "value2"]',meta:"update operator"},{caption:"$position",value:"$position: 0",meta:"update operator"},{caption:"$slice",value:"$slice: 2",meta:"update operator"},{caption:"$sort",value:'$sort: "expression"',meta:"update operator"},{caption:"$bit",value:'$bit: { "field": { "and|or|xor": 4} }',meta:"update operator"}].map(h).concat(B);function h(r){return r.completer={insertMatch:u},r}function u(r,n){let o=r.getCursorPosition(),m=r.getSession().getTokenAt(o.row,o.column);r.removeWordLeft();let w="";!m.value.startsWith('"')&&!["true","false","null"].includes(n.value)&&(w='"'),m.value.endsWith('"')&&r.removeWordRight(),r.insert(w+n.value.replace(":",'":'))}function t(r){return{caption:r,value:r,meta:"collection name"}}return{configCompleter:{getCompletions:function(r,n,o,m,w){w(null,B)}},queryCompleter:{getCompletions:function(r,n,o,m,w){let S=n.getTokens(o.row);if(S.length===3&&S[0].value==="db"&&S[1].value==="."){w(null,L.parser.getCollections().map(t));return}let y=n.getTokenAt(o.row,o.column);if(S.length>3&&S[0].value==="db"&&S[y.index-1].value==="."){w(null,b);return}switch(L.parser.getQueryType()){case"find":w(null,E);break;case"aggregate":w(null,A);break;case"update":w(null,p);break;default:w(null,[])}}}}},CustomSelect=function(L){const b="is-selected",B="is-open",E=document.getElementById(L.selectId);let A=E.selectedIndex,p=[];for(var h=0;h{u.contains(l.target)||o()});function i(){t.textContent="";for(var l=0;l" ")switch(p&&b!=="]"&&b!=="}"&&(p=!1,A++,B&&(e+=d())),b){case"{":case"[":p=!0,e+=b;break;case",":e+=b,B&&(h?e+=" ":e+=d());break;case":":e+=b,B&&(e+=" ");break;case"}":case"]":p?p=!1:(A--,B&&(e+=d())),e+=b;break;default:e+=b}}function l(){b=t.charAt(L),L+=1}function g(){let F=e.length-2;for(;[" ",` +}`,meta:"aggregation accumulator (v5.2+)"},{caption:"$sortArray",value:'$sortArray: { input: "$arr", sortBy: { field: 1 } }',meta:"aggregation accumulator (v5.2+)"},{caption:"$linearFill",value:'$linearFill: "expression"',meta:"aggregation (v5.3+)"},{caption:"$locf",value:'$locf: "expression"',meta:"aggregation (v5.2+)"},{caption:"$tsIncrement",value:'$tsIncrement: "expression"',meta:"aggregation (v5.1+)"},{caption:"$tsSecond",value:'$tsSecond: "expression"',meta:"aggregation (v5.1+)"},{caption:"$toUUID",value:'$toUUID: "expression"',meta:"aggregation (v8.0+)"}].map(h).concat(B),p=[{caption:"$currentDate",value:'$currentDate: "expression"',meta:"update operator"},{caption:"$inc",value:'$inc: { "field": 1 }',meta:"update operator"},{caption:"$min",value:'$min: "expression"',meta:"update operator"},{caption:"$max",value:'$max: "expression"',meta:"update operator"},{caption:"$mul",value:'$mul: { "field": 2 }',meta:"update operator"},{caption:"$rename",value:'$rename: { "field": "newName" }',meta:"update operator"},{caption:"$set",value:'$set: { "field": "value" }',meta:"update operator"},{caption:"$setOnInsert",value:'$setOnInsert: { "field": "value" }',meta:"update operator"},{caption:"$unset",value:'$unset: { "field": "" }',meta:"update operator"},{caption:"$addToSet",value:'$addToSet: "expression"',meta:"update operator"},{caption:"$pop",value:'$pop: "expression"',meta:"update operator"},{caption:"$pull",value:'$pull: "expression"',meta:"update operator"},{caption:"$push",value:'$push: "expression"',meta:"update operator"},{caption:"$pullAll",value:'$pullAll: { "field": ["value1", "value2"] }',meta:"update operator"},{caption:"$each",value:'$each: ["value1", "value2"]',meta:"update operator"},{caption:"$position",value:"$position: 0",meta:"update operator"},{caption:"$slice",value:"$slice: 2",meta:"update operator"},{caption:"$sort",value:'$sort: "expression"',meta:"update operator"},{caption:"$bit",value:'$bit: { "field": { "and|or|xor": 4} }',meta:"update operator"}].map(h).concat(B);function h(r){return r.completer={insertMatch:u},r}function u(r,n){let o=r.getCursorPosition(),m=r.getSession().getTokenAt(o.row,o.column);r.removeWordLeft();let w="";!m.value.startsWith('"')&&!["true","false","null"].includes(n.value)&&(w='"'),m.value.endsWith('"')&&r.removeWordRight(),r.insert(w+n.value.replace(":",'":'))}function t(r){return{caption:r,value:r,meta:"collection name"}}return{configCompleter:{getCompletions:function(r,n,o,m,w){w(null,B)}},queryCompleter:{getCompletions:function(r,n,o,m,w){let S=n.getTokens(o.row);if(S.length===3&&S[0].value==="db"&&S[1].value==="."){w(null,L.parser.getCollections().map(t));return}let y=n.getTokenAt(o.row,o.column);if(S.length>3&&S[0].value==="db"&&S[y.index-1].value==="."){w(null,b);return}switch(L.parser.getQueryType()){case"find":w(null,E);break;case"aggregate":w(null,A);break;case"update":w(null,p);break;default:w(null,[])}}}}},CustomSelect=function(L){const b="is-selected",B="is-open",E=document.getElementById(L.selectId);let A=E.selectedIndex,p=[];for(var h=0;h{u.contains(l.target)||o()});function i(){t.textContent="";for(var l=0;l" ")switch(p&&b!=="]"&&b!=="}"&&(p=!1,A++,B&&(e+=d())),b){case"{":case"[":p=!0,e+=b;break;case",":e+=b,B&&(h?e+=" ":e+=d());break;case":":e+=b,B&&(e+=" ");break;case"}":case"]":p?p=!1:(A--,B&&(e+=d())),e+=b;break;default:e+=b}}function l(){b=t.charAt(L),L+=1}function g(){let F=e.length-2;for(;[" ",` `].includes(e.charAt(F));)F--;if(e.charAt(F)===","){const H=e.charAt(e.length-1);e=e.slice(0,-(e.length-F)),B&&(e+=d()),e+=H}}function d(){return A<0?` `:` `+" ".repeat(A)}function a(){for(;b&&b<=" ";)c();if(b==="/"){switch(c(),b!=="/"&&b!=="*"&&Y('Javascript regex are not supported. Use "$regex" instead'),b){case"/":f();break;case"*":s();break}a()}}function f(){e=e.slice(0,-2);let F=t.indexOf(` diff --git a/internal/web/tests/02-run.spec.ts b/internal/web/tests/02-run.spec.ts index e57b3a0..f4df1c2 100644 --- a/internal/web/tests/02-run.spec.ts +++ b/internal/web/tests/02-run.spec.ts @@ -1,11 +1,11 @@ import { expect } from '@playwright/test'; -import { test, get, set } from './playwright' +import { test, setEditorContent, expectEditorContent } from './playwright' test('run default page with button', async ({ page }) => { - expect(await get('result', true)).toBe('') + await expectEditorContent('result', '') await page.getByRole('button', { name: 'run' }).click() - expect(await get('result')).toBe(`[ + await expectEditorContent('result', `[ { "_id": ObjectId("5a934e000102030405000000"), "key": 1 @@ -18,10 +18,10 @@ test('run default page with button', async ({ page }) => { }) test('run default page with shortcut', async ({ page }) => { - expect(await get('result', true)).toBe('') + await expectEditorContent('result', '') await page.getByText('Template').press('Control+Enter') - expect(await get('result')).toBe(`[ + await expectEditorContent('result', `[ { "_id": ObjectId("5a934e000102030405000000"), "key": 1 @@ -35,7 +35,7 @@ test('run default page with shortcut', async ({ page }) => { test('run incorrect config', async ({ page }) => { - await set('config', `[ + await setEditorContent('config', `[ { a: invalid } @@ -47,29 +47,29 @@ test('run incorrect config', async ({ page }) => { await page.getByRole('button', { name: 'run' }).click() await expect(page.locator('#resultPanel')).toHaveClass('text_red') - expect(await get('result')).toBe(`Invalid configuration: + await expectEditorContent('result', `Invalid configuration: Line 3: Unknown type: 'invalid'`) }) test('run no result', async ({ page }) => { - await set('config', `[{k:1}]`) - await set('query', `db.collection.find({k:2})`) + await setEditorContent('config', `[{k:1}]`) + await setEditorContent('query', `db.collection.find({k:2})`) await page.getByRole('button', { name: 'run' }).click() await expect(page.locator('#resultPanel')).not.toHaveClass('text_red') - expect(await get('result')).toBe(`no document found`) + await expectEditorContent('result', 'no document found') }) test('aggregation query without stages', async ({ page }) => { - await set('query', `db.collection.aggregate([{}])`) + await setEditorContent('query', `db.collection.aggregate([{}])`) await expect(page.getByText('Stage:')).toBeHidden() await expect(page.locator('#custom-aggregation_stages')).toBeHidden() }) test('aggregation query with stages', async ({ page }) => { - await set('query', `db.collection.aggregate([ + await setEditorContent('query', `db.collection.aggregate([ { "$project": { "_id": 0 @@ -87,7 +87,7 @@ test('aggregation query with stages', async ({ page }) => { await expect(page.locator('#custom-aggregation_stages ul').getByText('$match')).toBeVisible() await page.getByRole('button', { name: 'run' }).click() - expect(await get('result')).toBe(`[ + await expectEditorContent('result', `[ { "key": 1 } @@ -97,7 +97,7 @@ test('aggregation query with stages', async ({ page }) => { await page.locator('#custom-aggregation_stages ul').getByText('$project').click() await page.getByRole('button', { name: 'run' }).click() - expect(await get('result')).toBe(`[ + await expectEditorContent('result', `[ { "key": 1 }, @@ -109,13 +109,13 @@ test('aggregation query with stages', async ({ page }) => { test('test single db template', async ({ page }) => { - await set('config', '') - await set('query', '') + await setEditorContent('config', '') + await setEditorContent('query', '') await page.getByRole('button', { name: 'single collection' }).click() await page.locator('#custom-template ul').getByText('single collection').click() await expect(page.locator('#custom-mode').getByRole('button', { name: 'bson' })).toBeVisible(); - expect(await get('config')).toBe(`[ + await expectEditorContent('config', `[ { "key": 1 }, @@ -124,12 +124,12 @@ test('test single db template', async ({ page }) => { } ]`) - expect(await get('query')).toBe(`db.collection.find()`) + await expectEditorContent('query', `db.collection.find()`) await expect(page.locator('#custom-aggregation_stage')).toBeHidden(); - expect(await get('result', true)).toBe('') + await expectEditorContent('result', '') await page.getByRole('button', { name: 'run' }).click() - expect(await get('result')).toBe(`[ + await expectEditorContent('result', `[ { "_id": ObjectId("5a934e000102030405000000"), "key": 1 @@ -147,7 +147,7 @@ test('test multiple db template', async ({ page }) => { await page.locator('#custom-template ul').getByText('multiple collection').click() await expect(page.locator('#custom-mode').getByRole('button', { name: 'bson' })).toBeVisible(); - expect(await get('config')).toBe(`db={ + await expectEditorContent('config', `db={ "orders": [ { "_id": 1, @@ -198,7 +198,7 @@ test('test multiple db template', async ({ page }) => { ] }`) - expect(await get('query')).toBe(`db.orders.aggregate([ + await expectEditorContent('query', `db.orders.aggregate([ { "$lookup": { "from": "inventory", @@ -210,9 +210,9 @@ test('test multiple db template', async ({ page }) => { ])`) await expect(page.getByRole('button', { name: '$lookup' })).toBeVisible(); - expect(await get('result', true)).toBe('') + await expectEditorContent('result', '') await page.getByRole('button', { name: 'run' }).click() - expect(await get('result')).toBe(`[ + await expectEditorContent('result', `[ { "_id": 1, "inventory_docs": [ @@ -260,7 +260,7 @@ test('test mgodatagen template', async ({ page }) => { await page.locator('#custom-template ul').getByText('mgodatagen').click() await expect(page.locator('#custom-mode').getByRole('button', { name: 'mgodatagen' })).toBeVisible(); - expect(await get('config')).toBe(`[ + await expectEditorContent('config', `[ { "collection": "collection", "count": 10, @@ -274,12 +274,12 @@ test('test mgodatagen template', async ({ page }) => { } ]`) - expect(await get('query')).toBe(`db.collection.find()`) + await expectEditorContent('query', `db.collection.find()`) await expect(page.locator('#custom-aggregation_stage')).toBeHidden(); - expect(await get('result', true)).toBe('') + await expectEditorContent('result', '') await page.getByRole('button', { name: 'run' }).click() - expect(await get('result')).toBe(`[ + await expectEditorContent('result', `[ { "_id": ObjectId("5a934e000102030405000000"), "key": 10 @@ -329,7 +329,7 @@ test('test update template', async ({ page }) => { await page.locator('#custom-template ul').getByText('update').click() await expect(page.locator('#custom-mode').getByRole('button', { name: 'bson' })).toBeVisible(); - expect(await get('config')).toBe(`[ + await expectEditorContent('config', `[ { "key": 1 }, @@ -338,7 +338,7 @@ test('test update template', async ({ page }) => { } ]`) - expect(await get('query')).toBe(`db.collection.update({ + await expectEditorContent('query', `db.collection.update({ "key": 2 }, { @@ -352,9 +352,9 @@ test('test update template', async ({ page }) => { })`) await expect(page.locator('#custom-aggregation_stage')).toBeHidden(); - expect(await get('result', true)).toBe('') + await expectEditorContent('result', '') await page.getByRole('button', { name: 'run' }).click() - expect(await get('result')).toBe(`[ + await expectEditorContent('result', `[ { "_id": ObjectId("5a934e000102030405000000"), "key": 1 @@ -373,7 +373,7 @@ test('test index template', async ({ page }) => { await page.locator('#custom-template ul').getByText('index').click() await expect(page.locator('#custom-mode').getByRole('button', { name: 'mgodatagen' })).toBeVisible(); - expect(await get('config')).toBe(`[ + await expectEditorContent('config', `[ { "collection": "collection", "count": 5, @@ -400,16 +400,16 @@ test('test index template', async ({ page }) => { } ]`) - expect(await get('query')).toBe(`db.collection.find({ + await expectEditorContent('query', `db.collection.find({ "$text": { "$search": "coffee" } })`) await expect(page.locator('#custom-aggregation_stage')).toBeHidden(); - expect(await get('result', true)).toBe('') + await expectEditorContent('result', '') await page.getByRole('button', { name: 'run' }).click() - expect(await get('result')).toBe(`[ + await expectEditorContent('result', `[ { "_id": ObjectId("5a934e000102030405000002"), "description": "Just coffee" @@ -427,7 +427,7 @@ test('test explain template', async ({ page }) => { await page.locator('#custom-template ul').getByText('explain').click() await expect(page.locator('#custom-mode').getByRole('button', { name: 'bson' })).toBeVisible(); - expect(await get('config')).toBe(`[ + await expectEditorContent('config', `[ { "_id": 1, "item": "ABC", @@ -463,7 +463,7 @@ test('test explain template', async ({ page }) => { } ]`) - expect(await get('query')).toBe(`db.collection.aggregate([ + await expectEditorContent('query', `db.collection.aggregate([ { "$unwind": { "path": "$sizes", @@ -484,9 +484,8 @@ test('test explain template', async ({ page }) => { } } ]).explain("executionStats")`) - await expect(page.getByRole('button', {name: "$sort"})).toBeVisible(); + await expect(page.getByRole('button', { name: "$sort" })).toBeVisible(); - expect(await get('result', true)).toBe('') + await expectEditorContent('result', '') await page.getByRole('button', { name: 'run' }).click() - expect(await (await get('result')).slice(0,1)).toBe('{') }) \ No newline at end of file diff --git a/internal/web/tests/03-format.spec.ts b/internal/web/tests/03-format.spec.ts index d9a8daa..b405638 100644 --- a/internal/web/tests/03-format.spec.ts +++ b/internal/web/tests/03-format.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { test, get, set } from './playwright' +import { test, setEditorContent, expectEditorContent } from './playwright' test('format default page', async ({ page }) => { @@ -13,30 +12,30 @@ test('format default page', async ({ page }) => { ]` const queryTxt = 'db.collection.find()' - expect(await get('config')).toBe(configTxt) - expect(await get('query')).toBe(queryTxt) + await expectEditorContent('config', configTxt) + await expectEditorContent('query', queryTxt) await page.getByRole('button', { name: 'format' }).click() - expect(await get('config')).toBe(configTxt) - expect(await get('query')).toBe(queryTxt) + await expectEditorContent('config', configTxt) + await expectEditorContent('query', queryTxt) }) test('format with button', async ({ page }) => { - await set('query', 'db.collection.find({key:1})') + await setEditorContent('query', 'db.collection.find({key:1})') await page.getByRole('button', { name: 'format' }).click() - expect(await get('query')).toBe(`db.collection.find({ + await expectEditorContent('query', `db.collection.find({ key: 1 })`) }) test('format with shortcut', async ({ page }) => { - await set('query', 'db.collection.find({key:1})') + await setEditorContent('query', 'db.collection.find({key:1})') await page.getByText('Template').press('Control+s') - expect(await get('query')).toBe(`db.collection.find({ + await expectEditorContent('query', `db.collection.find({ key: 1 })`) }) diff --git a/internal/web/tests/04-share.spec.ts b/internal/web/tests/04-share.spec.ts index 47c738f..d38a0d7 100644 --- a/internal/web/tests/04-share.spec.ts +++ b/internal/web/tests/04-share.spec.ts @@ -1,11 +1,11 @@ import { expect } from '@playwright/test'; -import { test, get, set } from './playwright' +import { test, setEditorContent, expectEditorContent } from './playwright' test('changing config enables share', async ({ page }) => { const shareButton = page.getByRole('button', { name: 'share' }) await expect(shareButton).toBeDisabled() - await set('config', '[]') + await setEditorContent('config', '[]') await shareButton.click() await expect(page).toHaveURL(/p\/4btTeezhQ_i/) await expect(shareButton).toBeDisabled() @@ -15,7 +15,7 @@ test('changing query enables share', async ({ page }) => { const shareButton = page.getByRole('button', { name: 'share' }) await expect(shareButton).toBeDisabled() - await set('query', 'db.c.find({v:"a"})') + await setEditorContent('query', 'db.c.find({v:"a"})') await shareButton.click() await expect(page).toHaveURL(/p\/IIAf09j3hnm/) await expect(shareButton).toBeDisabled() @@ -34,21 +34,21 @@ test('changing mode enables share', async ({ page }) => { test('sharing format the playground', async ({ page }) => { - await set('config', '[{}]') + await setEditorContent('config', '[{}]') await page.getByRole('button', { name: 'share' }).click() await expect(page).toHaveURL(/p\/4cOeA7NGLru/) - expect(await get('config')).toBe(`[ + await expectEditorContent('config', `[ {} ]`) }) test('run after share does not change URL', async ({ page }) => { - await set('config', 'db={"a":[{k:1}]}') - await set('query', 'db.a.find({},{_id:0})') + await setEditorContent('config', 'db={"a":[{k:1}]}') + await setEditorContent('query', 'db.a.find({},{_id:0})') await page.getByRole('button', { name: 'run' }).click() - expect(await get('result')).toBe(`[ + await expectEditorContent('result', `[ { "k": 1 } @@ -56,7 +56,7 @@ test('run after share does not change URL', async ({ page }) => { await page.getByRole('button', { name: 'share' }).click() await expect(page).toHaveURL(/p\/iKNbEa-etwo/) await page.getByRole('button', { name: 'run' }).click() - expect(await get('result')).toBe(`[ + await expectEditorContent('result', `[ { "k": 1 } @@ -67,7 +67,7 @@ test('run after share does not change URL', async ({ page }) => { test('sharing show copied tooltip', async ({ page }) => { await expect(page.getByText("Copied")).toBeHidden() - await set('config', '{') + await setEditorContent('config', '{') await page.getByRole('button', { name: 'share' }).click() await expect(page).toHaveURL(/p\/MMrQg5UYwYX/) @@ -77,12 +77,12 @@ test('sharing show copied tooltip', async ({ page }) => { test('saving the same playground twice returns the same URL', async ({ page }) => { await expect(page.getByText("Copied")).toBeHidden() - await set('config', '{"_id":1}') + await setEditorContent('config', '{"_id":1}') await page.getByRole('button', { name: 'share' }).click() await expect(page).toHaveURL(/p\/Cz5OkFt6TSH/) - await set('config', '') - await set('config', '{"_id":1}') + await setEditorContent('config', '') + await setEditorContent('config', '{"_id":1}') await page.getByRole('button', { name: 'share' }).click() await expect(page).toHaveURL(/p\/Cz5OkFt6TSH/) }) \ No newline at end of file diff --git a/internal/web/tests/playwright.ts b/internal/web/tests/playwright.ts index 9c7bd05..85f8846 100644 --- a/internal/web/tests/playwright.ts +++ b/internal/web/tests/playwright.ts @@ -1,4 +1,4 @@ -import { test as baseTest, Page } from "@playwright/test"; +import { test as baseTest, expect, Page } from "@playwright/test"; let currentPage: Page @@ -10,28 +10,27 @@ export const test = baseTest.extend({ }, }); -export async function get(name: string, allowEmpty = false): Promise { - await currentPage.waitForTimeout(5) - let content = await getEditorContent(name) - if (name === 'config' || name === 'query' || allowEmpty) { - return content - } - while (!content || content === "running query...") { - await currentPage.waitForTimeout(10) - content = await getEditorContent(name) - } - return content +type Editor = 'config' | 'query' | 'result' + +export async function expectEditorContent(name: Editor, expected: string) { + expect.poll(async () => { + try { + return await getEditorContent(name) + } catch (e: any) { + return '' + } + }).toBe(expected); } -export async function set(name: string, content: string) { +export async function setEditorContent(name: Editor, content: string) { const textarea = currentPage.locator(`#${name}`).getByRole('textbox') await textarea.click({ force: true }) await textarea.press('Control+a+Delete') await textarea.fill(content) } -async function getEditorContent(name: string) { - const textLayer = currentPage.locator(`#${name} > .ace_scroller > .ace_content > .ace_text-layer`) +async function getEditorContent(name: Editor) { + const textLayer = currentPage.locator(`#${name} .ace_text-layer`) // textLayer looks like: // //
[