Compare commits
No commits in common. "v0.0.3" and "main" have entirely different histories.
9
.github/pull_request_template.md
vendored
Normal file
9
.github/pull_request_template.md
vendored
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
Please answer the following questions and leave the below in as part of your PR.
|
||||||
|
|
||||||
|
- [ ] I have read the [developer documentation](https://github.com/babashka/scittle/blob/main/doc/dev.md).
|
||||||
|
|
||||||
|
- [ ] This PR corresponds to an [issue with a clear problem statement](https://github.com/babashka/scittle/blob/main/doc/dev.md#start-with-an-issue-before-writing-code).
|
||||||
|
|
||||||
|
<!-- - [ ] This PR contains a [test](https://github.com/babashka/scittle/blob/main/doc/dev.md#tests) to prevent against future regressions -->
|
||||||
|
|
||||||
|
- [ ] I have updated the [CHANGELOG.md](https://github.com/babashka/scittle/blob/main/CHANGELOG.md) file with a description of the addressed issue.
|
21
.gitignore
vendored
Normal file
21
.gitignore
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
.cpcache
|
||||||
|
.nrepl-port
|
||||||
|
target
|
||||||
|
repl
|
||||||
|
scratch.clj
|
||||||
|
.shadow-cljs
|
||||||
|
target
|
||||||
|
yarn.lock
|
||||||
|
node_modules/
|
||||||
|
.DS_Store
|
||||||
|
resources/public/js
|
||||||
|
.store
|
||||||
|
gh-pages/
|
||||||
|
gh-pages/
|
||||||
|
/.lsp
|
||||||
|
/dist
|
||||||
|
/.clj-kondo/.cache
|
||||||
|
/.clj-kondo/rewrite-clj
|
||||||
|
/plugins/demo/resources/public/js/
|
||||||
|
.portal
|
||||||
|
resources/public/test/scratch.html
|
110
CHANGELOG.md
Normal file
110
CHANGELOG.md
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
[Scittle](https://github.com/babashka/scittle): execute Clojure(Script) directly from browser script tags via SCI!
|
||||||
|
|
||||||
|
<!-- To create a new NPM release: -->
|
||||||
|
|
||||||
|
<!-- - Run `bb npm-publish`: this will compile, bump patch version, create tag and and push to npm and Github -->
|
||||||
|
<!-- - `bb replace-version 0.6.22 0.7.23` -->
|
||||||
|
<!-- - Create Github release with updated links from `doc/links.md` -->
|
||||||
|
<!-- - `bb gh-pages` -->
|
||||||
|
|
||||||
|
## v0.7.27 (2025-08-21)
|
||||||
|
|
||||||
|
- [#95](https://github.com/babashka/scittle/issues/121): support string requires
|
||||||
|
of `globalThis` js deps ([@chr15m](https://github.com/chr15m)). See
|
||||||
|
[docs](https://github.com/babashka/scittle/blob/main/doc/js-libraries.md).
|
||||||
|
- Potentially breaking: `(.-foo-bar {})` now behaves as `{}.foo_bar`, i.e. the property or method name is munged.
|
||||||
|
|
||||||
|
## v0.7.26 (2025-08-20)
|
||||||
|
|
||||||
|
- [#121](https://github.com/babashka/scittle/issues/121): add `cjohansen/dataspex` plugin ([@jeroenvandijk](https://github.com/jeroenvandijk))
|
||||||
|
- [#118](https://github.com/babashka/scittle/issues/118): add `goog.string/format` ([@jeroenvandijk](https://github.com/jeroenvandijk))
|
||||||
|
- Support alternative `(set! #js {} -a 1)` CLJS syntax (by bumping SCI)
|
||||||
|
- Add source maps to distribution
|
||||||
|
- Add dev versions of all modules in the `dev` folder of the distribution + a `dev/scitte.cljs-devtools.js` module
|
||||||
|
|
||||||
|
## v0.7.23 (2025-06-18)
|
||||||
|
|
||||||
|
- [#107](https://github.com/babashka/scittle/issues/107): add `replicant` plugin ([@jeroenvandijk](https://github.com/jeroenvandijk))
|
||||||
|
- [#102](https://github.com/babashka/scittle/issues/102): add `applied-science/js-interop` plugin ([@chr15m](https://github.com/chr15m))
|
||||||
|
- [#105](https://github.com/babashka/scittle/issues/105): add `goog.string/htmlEscape` ([@ikappaki](https://github.com/ikappaki) )
|
||||||
|
- [#113](https://github.com/babashka/scittle/issues/113): add `unchecked-set` and `unchecked-get`
|
||||||
|
|
||||||
|
## v0.6.22 (2024-12-19)
|
||||||
|
|
||||||
|
- [#99](https://github.com/babashka/scittle/issues/99): make `js/import` work
|
||||||
|
|
||||||
|
## v0.6.20 (2024-11-24)
|
||||||
|
|
||||||
|
- [#55](https://github.com/babashka/scittle/issues/55): create gh-pages dir before using.
|
||||||
|
- [#89](https://github.com/babashka/scittle/issues/89): allow `evaluate_script_tags` to specify individual scripts.
|
||||||
|
- [#87](https://github.com/babashka/scittle/issues/87): prod build on fresh checkout fails
|
||||||
|
|
||||||
|
## v0.6.19 (2024-10-08)
|
||||||
|
|
||||||
|
- Add `cljs.pprint/code-dispatch` and `cljs.pprint/with-pprint-dispatch`
|
||||||
|
|
||||||
|
## v0.6.18 (2024-04-30)
|
||||||
|
|
||||||
|
- [#77](https://github.com/babashka/scittle/issues/77): make dependency on browser (`js/document`) optional so scittle can run in webworkers, Node.js, etc.
|
||||||
|
|
||||||
|
## v0.6.17 (2024-04-22)
|
||||||
|
|
||||||
|
- [#69](https://github.com/babashka/scittle/issues/69): executing script tag with src + whitespace doesn't work
|
||||||
|
- [#72](https://github.com/babashka/scittle/issues/72): add clojure 1.11 functions like `update-vals`
|
||||||
|
- [#75](https://github.com/babashka/scittle/issues/75): Support reader conditionals in source code
|
||||||
|
|
||||||
|
## v0.6.16 (2023-05-04)
|
||||||
|
|
||||||
|
- [#58](https://github.com/babashka/scittle/issues/58): build system for creating scittle distribution with custom libraries. See [plugins/demo](plugins/demo).
|
||||||
|
- Use `window.location.hostname` for WebSocket connection instead of hardcoding `"localhost"` ([@pyrmont](https://github.com/pyrmont))
|
||||||
|
- Upgrade `sci.configs` to `"33bd51e53700b224b4cb5bda59eb21b62f962745"`
|
||||||
|
- Update nREPL implementation: implement `eldoc` (`info`, `lookup`) ([@benjamin-asdf](https://github.com/benjamin-asdf))
|
||||||
|
|
||||||
|
## v0.6.15 (2023-01-05)
|
||||||
|
|
||||||
|
- Fix destructuring in `defmethod` (by upgrading SCI)
|
||||||
|
|
||||||
|
## v0.5.13 (2022-12-23)
|
||||||
|
|
||||||
|
- Fix `cljs.pprint` plugin
|
||||||
|
|
||||||
|
## v0.5.12 (2022-12-23)
|
||||||
|
|
||||||
|
- Fix `reagent` `with-let` macro with advanced compiled builds
|
||||||
|
- Upgrade promesa and shadow-cljs
|
||||||
|
- Fix `#queue` literal
|
||||||
|
- SCI: performance improvements
|
||||||
|
|
||||||
|
## v0.4.11 (2022-11-23)
|
||||||
|
|
||||||
|
- Add `scittle.re-frame` plugin. This gives access to the
|
||||||
|
[re-frame](https://github.com/day8/re-frame) library.
|
||||||
|
- Fix for [44](https://github.com/babashka/scittle/issues/44): Honoring `SCITTLE_NREPL_WEBSOCKET_PORT` in `scittle.nrepl`
|
||||||
|
- Add all public vars of `cljs-ajax` `ajax.core`
|
||||||
|
- Upgrade several built-in libraries
|
||||||
|
|
||||||
|
## v0.3.10
|
||||||
|
|
||||||
|
- Add `scittle.promesa.js` plugin. This gives access to the [promesa](https://cljdoc.org/d/funcool/promesa/8.0.450/doc/user-guide) library.
|
||||||
|
- Add `scittle.pprint.js` plugin. This gives access to [cljs.pprint](https://cljs.github.io/api/cljs.pprint/).
|
||||||
|
- Improve error messages
|
||||||
|
|
||||||
|
## v0.2.8
|
||||||
|
|
||||||
|
- Upgrade to SCI 0.3.1
|
||||||
|
- Upgrade to Reagent 1.1.0
|
||||||
|
- Add support for Reagent's `create-class` and `with-let`
|
||||||
|
|
||||||
|
## v0.1.1
|
||||||
|
|
||||||
|
- Upgrade to SCI 0.3.0
|
||||||
|
|
||||||
|
## v0.1.0
|
||||||
|
|
||||||
|
- Fixes for `try/catch`
|
||||||
|
|
||||||
|
## v0.0.1
|
||||||
|
|
||||||
|
Initial release.
|
198
LICENSE
Normal file
198
LICENSE
Normal file
|
@ -0,0 +1,198 @@
|
||||||
|
Eclipse Public License - v 1.0
|
||||||
|
|
||||||
|
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||||
|
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
|
||||||
|
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||||
|
|
||||||
|
1. DEFINITIONS
|
||||||
|
|
||||||
|
"Contribution" means:
|
||||||
|
|
||||||
|
a) in the case of the initial Contributor, the initial code and documentation
|
||||||
|
distributed under this Agreement, and
|
||||||
|
b) in the case of each subsequent Contributor:
|
||||||
|
i) changes to the Program, and
|
||||||
|
ii) additions to the Program;
|
||||||
|
|
||||||
|
where such changes and/or additions to the Program originate from and are
|
||||||
|
distributed by that particular Contributor. A Contribution 'originates' from
|
||||||
|
a Contributor if it was added to the Program by such Contributor itself or
|
||||||
|
anyone acting on such Contributor's behalf. Contributions do not include
|
||||||
|
additions to the Program which: (i) are separate modules of software
|
||||||
|
distributed in conjunction with the Program under their own license
|
||||||
|
agreement, and (ii) are not derivative works of the Program.
|
||||||
|
|
||||||
|
"Contributor" means any person or entity that distributes the Program.
|
||||||
|
|
||||||
|
"Licensed Patents" mean patent claims licensable by a Contributor which are
|
||||||
|
necessarily infringed by the use or sale of its Contribution alone or when
|
||||||
|
combined with the Program.
|
||||||
|
|
||||||
|
"Program" means the Contributions distributed in accordance with this Agreement.
|
||||||
|
|
||||||
|
"Recipient" means anyone who receives the Program under this Agreement,
|
||||||
|
including all Contributors.
|
||||||
|
|
||||||
|
2. GRANT OF RIGHTS
|
||||||
|
a) Subject to the terms of this Agreement, each Contributor hereby grants
|
||||||
|
Recipient a non-exclusive, worldwide, royalty-free copyright license to
|
||||||
|
reproduce, prepare derivative works of, publicly display, publicly perform,
|
||||||
|
distribute and sublicense the Contribution of such Contributor, if any, and
|
||||||
|
such derivative works, in source code and object code form.
|
||||||
|
b) Subject to the terms of this Agreement, each Contributor hereby grants
|
||||||
|
Recipient a non-exclusive, worldwide, royalty-free patent license under
|
||||||
|
Licensed Patents to make, use, sell, offer to sell, import and otherwise
|
||||||
|
transfer the Contribution of such Contributor, if any, in source code and
|
||||||
|
object code form. This patent license shall apply to the combination of the
|
||||||
|
Contribution and the Program if, at the time the Contribution is added by
|
||||||
|
the Contributor, such addition of the Contribution causes such combination
|
||||||
|
to be covered by the Licensed Patents. The patent license shall not apply
|
||||||
|
to any other combinations which include the Contribution. No hardware per
|
||||||
|
se is licensed hereunder.
|
||||||
|
c) Recipient understands that although each Contributor grants the licenses to
|
||||||
|
its Contributions set forth herein, no assurances are provided by any
|
||||||
|
Contributor that the Program does not infringe the patent or other
|
||||||
|
intellectual property rights of any other entity. Each Contributor
|
||||||
|
disclaims any liability to Recipient for claims brought by any other entity
|
||||||
|
based on infringement of intellectual property rights or otherwise. As a
|
||||||
|
condition to exercising the rights and licenses granted hereunder, each
|
||||||
|
Recipient hereby assumes sole responsibility to secure any other
|
||||||
|
intellectual property rights needed, if any. For example, if a third party
|
||||||
|
patent license is required to allow Recipient to distribute the Program, it
|
||||||
|
is Recipient's responsibility to acquire that license before distributing
|
||||||
|
the Program.
|
||||||
|
d) Each Contributor represents that to its knowledge it has sufficient
|
||||||
|
copyright rights in its Contribution, if any, to grant the copyright
|
||||||
|
license set forth in this Agreement.
|
||||||
|
|
||||||
|
3. REQUIREMENTS
|
||||||
|
|
||||||
|
A Contributor may choose to distribute the Program in object code form under its
|
||||||
|
own license agreement, provided that:
|
||||||
|
|
||||||
|
a) it complies with the terms and conditions of this Agreement; and
|
||||||
|
b) its license agreement:
|
||||||
|
i) effectively disclaims on behalf of all Contributors all warranties and
|
||||||
|
conditions, express and implied, including warranties or conditions of
|
||||||
|
title and non-infringement, and implied warranties or conditions of
|
||||||
|
merchantability and fitness for a particular purpose;
|
||||||
|
ii) effectively excludes on behalf of all Contributors all liability for
|
||||||
|
damages, including direct, indirect, special, incidental and
|
||||||
|
consequential damages, such as lost profits;
|
||||||
|
iii) states that any provisions which differ from this Agreement are offered
|
||||||
|
by that Contributor alone and not by any other party; and
|
||||||
|
iv) states that source code for the Program is available from such
|
||||||
|
Contributor, and informs licensees how to obtain it in a reasonable
|
||||||
|
manner on or through a medium customarily used for software exchange.
|
||||||
|
|
||||||
|
When the Program is made available in source code form:
|
||||||
|
|
||||||
|
a) it must be made available under this Agreement; and
|
||||||
|
b) a copy of this Agreement must be included with each copy of the Program.
|
||||||
|
Contributors may not remove or alter any copyright notices contained within
|
||||||
|
the Program.
|
||||||
|
|
||||||
|
Each Contributor must identify itself as the originator of its Contribution, if
|
||||||
|
any, in a manner that reasonably allows subsequent Recipients to identify the
|
||||||
|
originator of the Contribution.
|
||||||
|
|
||||||
|
4. COMMERCIAL DISTRIBUTION
|
||||||
|
|
||||||
|
Commercial distributors of software may accept certain responsibilities with
|
||||||
|
respect to end users, business partners and the like. While this license is
|
||||||
|
intended to facilitate the commercial use of the Program, the Contributor who
|
||||||
|
includes the Program in a commercial product offering should do so in a manner
|
||||||
|
which does not create potential liability for other Contributors. Therefore, if
|
||||||
|
a Contributor includes the Program in a commercial product offering, such
|
||||||
|
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
|
||||||
|
every other Contributor ("Indemnified Contributor") against any losses, damages
|
||||||
|
and costs (collectively "Losses") arising from claims, lawsuits and other legal
|
||||||
|
actions brought by a third party against the Indemnified Contributor to the
|
||||||
|
extent caused by the acts or omissions of such Commercial Contributor in
|
||||||
|
connection with its distribution of the Program in a commercial product
|
||||||
|
offering. The obligations in this section do not apply to any claims or Losses
|
||||||
|
relating to any actual or alleged intellectual property infringement. In order
|
||||||
|
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
|
||||||
|
Contributor in writing of such claim, and b) allow the Commercial Contributor to
|
||||||
|
control, and cooperate with the Commercial Contributor in, the defense and any
|
||||||
|
related settlement negotiations. The Indemnified Contributor may participate in
|
||||||
|
any such claim at its own expense.
|
||||||
|
|
||||||
|
For example, a Contributor might include the Program in a commercial product
|
||||||
|
offering, Product X. That Contributor is then a Commercial Contributor. If that
|
||||||
|
Commercial Contributor then makes performance claims, or offers warranties
|
||||||
|
related to Product X, those performance claims and warranties are such
|
||||||
|
Commercial Contributor's responsibility alone. Under this section, the
|
||||||
|
Commercial Contributor would have to defend claims against the other
|
||||||
|
Contributors related to those performance claims and warranties, and if a court
|
||||||
|
requires any other Contributor to pay any damages as a result, the Commercial
|
||||||
|
Contributor must pay those damages.
|
||||||
|
|
||||||
|
5. NO WARRANTY
|
||||||
|
|
||||||
|
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
|
||||||
|
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
|
||||||
|
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
|
||||||
|
Recipient is solely responsible for determining the appropriateness of using and
|
||||||
|
distributing the Program and assumes all risks associated with its exercise of
|
||||||
|
rights under this Agreement , including but not limited to the risks and costs
|
||||||
|
of program errors, compliance with applicable laws, damage to or loss of data,
|
||||||
|
programs or equipment, and unavailability or interruption of operations.
|
||||||
|
|
||||||
|
6. DISCLAIMER OF LIABILITY
|
||||||
|
|
||||||
|
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
|
||||||
|
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
|
||||||
|
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
|
||||||
|
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
7. GENERAL
|
||||||
|
|
||||||
|
If any provision of this Agreement is invalid or unenforceable under applicable
|
||||||
|
law, it shall not affect the validity or enforceability of the remainder of the
|
||||||
|
terms of this Agreement, and without further action by the parties hereto, such
|
||||||
|
provision shall be reformed to the minimum extent necessary to make such
|
||||||
|
provision valid and enforceable.
|
||||||
|
|
||||||
|
If Recipient institutes patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Program itself
|
||||||
|
(excluding combinations of the Program with other software or hardware)
|
||||||
|
infringes such Recipient's patent(s), then such Recipient's rights granted under
|
||||||
|
Section 2(b) shall terminate as of the date such litigation is filed.
|
||||||
|
|
||||||
|
All Recipient's rights under this Agreement shall terminate if it fails to
|
||||||
|
comply with any of the material terms or conditions of this Agreement and does
|
||||||
|
not cure such failure in a reasonable period of time after becoming aware of
|
||||||
|
such noncompliance. If all Recipient's rights under this Agreement terminate,
|
||||||
|
Recipient agrees to cease use and distribution of the Program as soon as
|
||||||
|
reasonably practicable. However, Recipient's obligations under this Agreement
|
||||||
|
and any licenses granted by Recipient relating to the Program shall continue and
|
||||||
|
survive.
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute copies of this Agreement, but in
|
||||||
|
order to avoid inconsistency the Agreement is copyrighted and may only be
|
||||||
|
modified in the following manner. The Agreement Steward reserves the right to
|
||||||
|
publish new versions (including revisions) of this Agreement from time to time.
|
||||||
|
No one other than the Agreement Steward has the right to modify this Agreement.
|
||||||
|
The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation
|
||||||
|
may assign the responsibility to serve as the Agreement Steward to a suitable
|
||||||
|
separate entity. Each new version of the Agreement will be given a
|
||||||
|
distinguishing version number. The Program (including Contributions) may always
|
||||||
|
be distributed subject to the version of the Agreement under which it was
|
||||||
|
received. In addition, after a new version of the Agreement is published,
|
||||||
|
Contributor may elect to distribute the Program (including its Contributions)
|
||||||
|
under the new version. Except as expressly stated in Sections 2(a) and 2(b)
|
||||||
|
above, Recipient receives no rights or licenses to the intellectual property of
|
||||||
|
any Contributor under this Agreement, whether expressly, by implication,
|
||||||
|
estoppel or otherwise. All rights in the Program not expressly granted under
|
||||||
|
this Agreement are reserved.
|
||||||
|
|
||||||
|
This Agreement is governed by the laws of the State of New York and the
|
||||||
|
intellectual property laws of the United States of America. No party to this
|
||||||
|
Agreement will bring a legal action under this Agreement more than one year
|
||||||
|
after the cause of action arose. Each party waives its rights to a jury trial in
|
||||||
|
any resulting litigation.
|
58
README.md
Normal file
58
README.md
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
# Scittle
|
||||||
|
|
||||||
|
The [Small Clojure Interpreter](https://github.com/babashka/sci) exposed for usage in script tags.
|
||||||
|
|
||||||
|
Try it out on [CodePen](https://codepen.io/Prestance/pen/PoOdZQw)!
|
||||||
|
|
||||||
|
See [Github pages](https://babashka.org/scittle/) for usage.
|
||||||
|
|
||||||
|
See
|
||||||
|
[babashka-scittle-guestbook](https://github.com/kloimhardt/babashka-scittle-guestbook)
|
||||||
|
for a minimal full stack web application.
|
||||||
|
|
||||||
|
See [releases](https://github.com/babashka/scittle/releases) for links to
|
||||||
|
[JSDelivr](https://www.jsdelivr.com) to get versioned artifacts.
|
||||||
|
|
||||||
|
## Serving assets
|
||||||
|
|
||||||
|
To serve assets you can use the
|
||||||
|
[babashka.http-server](https://github.com/babashka/http-server) dependency (with
|
||||||
|
babashka or Clojure JVM):
|
||||||
|
|
||||||
|
``` clojure
|
||||||
|
(require '[babashka.http-server :as http])
|
||||||
|
(http/serve {:port 1341 :dir "resources/public"})
|
||||||
|
@(promise) ;; wait until process is killed
|
||||||
|
```
|
||||||
|
|
||||||
|
### nREPL
|
||||||
|
|
||||||
|
See [doc/nrepl](doc/nrepl).
|
||||||
|
|
||||||
|
### Service worker
|
||||||
|
|
||||||
|
See [doc/serviceworker.md](doc/serviceworker.md).
|
||||||
|
|
||||||
|
## Tasks
|
||||||
|
|
||||||
|
Run `bb tasks` to see all available tasks:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ bb tasks
|
||||||
|
The following tasks are available:
|
||||||
|
|
||||||
|
clean Start from clean slate.
|
||||||
|
dev Development build. Starts webserver and watches for changes.
|
||||||
|
prod Builds production artifacts.
|
||||||
|
release Updates Github pages with new release build.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Credits
|
||||||
|
|
||||||
|
Idea by Arne Brasseur a.k.a [plexus](https://github.com/plexus).
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Copyright © 2021 - 2022 Michiel Borkent
|
||||||
|
|
||||||
|
Distributed under the EPL License. See LICENSE.
|
76
bb.edn
Normal file
76
bb.edn
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
{:deps {io.github.babashka/sci.nrepl
|
||||||
|
#_{:local/root "../sci.nrepl"}
|
||||||
|
{:git/sha "2f8a9ed2d39a1b09d2b4d34d95494b56468f4a23"}
|
||||||
|
io.github.babashka/http-server
|
||||||
|
{:git/sha "b38c1f16ad2c618adae2c3b102a5520c261a7dd3"}
|
||||||
|
io.github.scittle/build
|
||||||
|
{:local/root "build"}}
|
||||||
|
|
||||||
|
:tasks
|
||||||
|
{:requires ([scittle.build :as build]
|
||||||
|
[babashka.fs :as fs]
|
||||||
|
[cheshire.core :as json]
|
||||||
|
[babashka.process :as p :refer [process]])
|
||||||
|
|
||||||
|
clean {:doc "Start from clean slate."
|
||||||
|
:task (do (fs/delete-tree (fs/file "resources" "public" "js"))
|
||||||
|
(fs/delete-tree ".cpcache")
|
||||||
|
(fs/delete-tree ".shadow-cljs"))}
|
||||||
|
|
||||||
|
shadow:watch {:doc "Development build. Starts webserver and watches for changes."
|
||||||
|
:task (build/build {:action "watch"
|
||||||
|
:args *command-line-args*})}
|
||||||
|
|
||||||
|
http-server {:doc "Starts http server for serving static files"
|
||||||
|
:requires ([babashka.http-server :as http])
|
||||||
|
:task (do (http/serve {:port 1341 :dir "resources/public"})
|
||||||
|
(println "Serving static assets at http://localhost:1341"))}
|
||||||
|
|
||||||
|
browser-nrepl {:doc "Start browser nREPL"
|
||||||
|
:requires ([sci.nrepl.browser-server :as bp])
|
||||||
|
:task (bp/start! {})}
|
||||||
|
|
||||||
|
-dev {:depends [shadow:watch browser-nrepl http-server]}
|
||||||
|
|
||||||
|
dev {:doc "Development build. Starts webserver and watches for changes."
|
||||||
|
:task (do (run '-dev {:parallel true})
|
||||||
|
(deref (promise)))}
|
||||||
|
|
||||||
|
prod {:doc "Builds production artifacts."
|
||||||
|
:task (build/build {})
|
||||||
|
:depends [clean]}
|
||||||
|
|
||||||
|
dist {:doc "Prepare dist folder for npm package"
|
||||||
|
:depends [prod]
|
||||||
|
:task (do
|
||||||
|
(fs/delete-tree "dist")
|
||||||
|
(fs/create-dirs "dist/dev")
|
||||||
|
(run! (fn [f] (fs/copy f "dist" {:replace-existing true}))
|
||||||
|
(fs/glob "resources/public/js" "*.{js,js.map}"))
|
||||||
|
(run! (fn [f] (fs/copy f "dist/dev" {:replace-existing true}))
|
||||||
|
(fs/glob "resources/public/js/dev" "*.{js,js.map}")))}
|
||||||
|
|
||||||
|
bump-version {:doc "Bumps package.json and pushes new git tag"
|
||||||
|
:task (do (shell "npm version patch")
|
||||||
|
(shell "git push --atomic origin main"
|
||||||
|
(str "v" (:version (json/parse-string (slurp "package.json") true)))))}
|
||||||
|
|
||||||
|
npm-publish {:doc "Updates NPM ibrary"
|
||||||
|
:task (do (run 'dist)
|
||||||
|
(run 'bump-version)
|
||||||
|
(shell "npm publish"))}
|
||||||
|
|
||||||
|
replace-version {:doc "Ported from bash one-liners. Expects two versions.
|
||||||
|
TODO: port to Clojure.
|
||||||
|
TODO: skip changelog.md
|
||||||
|
"
|
||||||
|
:task
|
||||||
|
(let [[prev next] *command-line-args*]
|
||||||
|
(-> (process ["bash" "-c"
|
||||||
|
(format "rg %s --files-with-matches -g '!/CHANGELOG.md' | xargs sed -i '' 's/%s/%s/g'"
|
||||||
|
prev prev next)]
|
||||||
|
{:inherit true})
|
||||||
|
p/check))}
|
||||||
|
|
||||||
|
gh-pages {:doc "Updates Github pages with new release build."
|
||||||
|
:task (shell "script/release.clj")}}}
|
1
build/deps.edn
Normal file
1
build/deps.edn
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{}
|
83
build/src/scittle/build.clj
Normal file
83
build/src/scittle/build.clj
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
(ns scittle.build
|
||||||
|
"Provides bb tasks for building and releasing scittle"
|
||||||
|
(:require
|
||||||
|
[babashka.classpath :as classpath]
|
||||||
|
[babashka.fs :as fs]
|
||||||
|
[babashka.tasks :refer [clojure]]
|
||||||
|
[clojure.edn :as edn]
|
||||||
|
[clojure.string :as str]))
|
||||||
|
|
||||||
|
(defn- feature-files
|
||||||
|
[]
|
||||||
|
(filter fs/exists?
|
||||||
|
(map (fn [d]
|
||||||
|
(fs/file d "scittle_plugin.edn"))
|
||||||
|
(classpath/split-classpath (classpath/get-classpath)))))
|
||||||
|
|
||||||
|
(defn- read-configs
|
||||||
|
[files]
|
||||||
|
(->> files
|
||||||
|
(mapcat (comp edn/read-string slurp str))))
|
||||||
|
|
||||||
|
(defn- build-cmd [cmd scittle-dir]
|
||||||
|
(let [files (feature-files)
|
||||||
|
feature-configs (read-configs files)
|
||||||
|
;; Each ./src/scittle_plugin.edn has a ./deps.edn
|
||||||
|
feature-dirs (map (comp fs/parent fs/parent) files)
|
||||||
|
cmd' (if (seq files)
|
||||||
|
(format "-Sdeps '%s' %s"
|
||||||
|
{:deps
|
||||||
|
(merge (into {}
|
||||||
|
(map (fn [dir]
|
||||||
|
[(symbol (str (fs/file-name dir) "/deps"))
|
||||||
|
{:local/root (str dir)}])
|
||||||
|
feature-dirs))
|
||||||
|
{'scittle/deps {:local/root scittle-dir}})}
|
||||||
|
cmd)
|
||||||
|
cmd)]
|
||||||
|
(when (seq feature-configs)
|
||||||
|
(println "Building features:" (str/join ", " (map :name feature-configs)) "..."))
|
||||||
|
(if (seq feature-configs)
|
||||||
|
(apply str cmd'
|
||||||
|
(map (fn [m] (format " --config-merge '%s'" (pr-str (:shadow-config m))))
|
||||||
|
feature-configs))
|
||||||
|
cmd')))
|
||||||
|
|
||||||
|
(defn- build*
|
||||||
|
[cmd]
|
||||||
|
(let [building-outside-scittle? (not (fs/exists? "shadow-cljs.edn"))
|
||||||
|
scittle-dir (when building-outside-scittle?
|
||||||
|
(->> (classpath/get-classpath)
|
||||||
|
classpath/split-classpath
|
||||||
|
;; Pull out scittle from local/root or git/url
|
||||||
|
(some #(when (re-find #"(scittle/[0-9a-f]+|scittle)/src" %) %))
|
||||||
|
fs/parent))]
|
||||||
|
(when building-outside-scittle?
|
||||||
|
(fs/copy (fs/file scittle-dir "shadow-cljs.edn") "shadow-cljs.edn"))
|
||||||
|
(let [cmd (build-cmd cmd (str scittle-dir))]
|
||||||
|
(println "> clojure" cmd)
|
||||||
|
(clojure {:extra-env {"SCI_ELIDE_VARS" "true"}} cmd))
|
||||||
|
(when building-outside-scittle?
|
||||||
|
(fs/delete "shadow-cljs.edn"))))
|
||||||
|
|
||||||
|
(defn build
|
||||||
|
"Build scittle shadow builds using clojure cmd and commandline args. Features on
|
||||||
|
classpath are automatically added.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
|
||||||
|
* :action - compile action, defaults to release, but may also be compile or watch"
|
||||||
|
[{:keys [action
|
||||||
|
args] :or {action "release"}}]
|
||||||
|
(build* (format "-M -m shadow.cljs.devtools.cli --force-spawn %s main %s" action (str/join " " args)))
|
||||||
|
(when (= "release" action)
|
||||||
|
(println "Also building dev release build")
|
||||||
|
(build* (format "-M -m shadow.cljs.devtools.cli --force-spawn %s main %s %s"
|
||||||
|
action
|
||||||
|
"--config-merge '{:compiler-options {:optimizations :simple
|
||||||
|
:pretty-print true
|
||||||
|
:pseudo-names true}
|
||||||
|
:output-dir \"resources/public/js/dev\"
|
||||||
|
:modules {:scittle.cljs-devtools {:entries [scittle.cljs-devtools]
|
||||||
|
:depends-on #{:scittle}}}}'"
|
||||||
|
(str/join " " args)))))
|
30
deps.edn
Normal file
30
deps.edn
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{:paths ["src" "resources"]
|
||||||
|
:deps
|
||||||
|
{org.clojure/clojure {:mvn/version "1.11.1"}
|
||||||
|
thheller/shadow-cljs {:mvn/version "3.1.8"}
|
||||||
|
org.babashka/sci {:git/url "https://github.com/babashka/sci"
|
||||||
|
:git/sha "756376056b32198d96dd5b272cee8fc483db60df"}
|
||||||
|
#_{:local/root "../babashka/sci"}
|
||||||
|
reagent/reagent {:mvn/version "1.1.1"}
|
||||||
|
no.cjohansen/replicant {:mvn/version "2025.03.27"}
|
||||||
|
re-frame/re-frame {:mvn/version "1.3.0"}
|
||||||
|
cljsjs/react {:mvn/version "18.2.0-1"}
|
||||||
|
cljsjs/react-dom {:mvn/version "18.2.0-1"}
|
||||||
|
cljsjs/react-dom-server {:mvn/version "18.2.0-1"}
|
||||||
|
cljs-ajax/cljs-ajax {:mvn/version "0.8.4"}
|
||||||
|
applied-science/js-interop {:mvn/version "0.4.2"}
|
||||||
|
funcool/promesa {:mvn/version "11.0.678"}
|
||||||
|
io.github.babashka/sci.nrepl
|
||||||
|
#_{:local/root "../sci.nrepl"}
|
||||||
|
{:git/url "https://github.com/babashka/sci.nrepl"
|
||||||
|
:git/sha "75f379c685bbd58c3e23f531339eb144e104937d"}
|
||||||
|
io.github.babashka/sci.configs
|
||||||
|
#_{:local/root "/Users/borkdude/dev/sci.configs"}
|
||||||
|
{:git/url "https://github.com/babashka/sci.configs"
|
||||||
|
:git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
|
||||||
|
:exclusions [org.babashka/sci]}
|
||||||
|
binaryage/devtools {:mvn/version "1.0.7"}}
|
||||||
|
:aliases
|
||||||
|
{:dev
|
||||||
|
{:extra-paths ["dev"]
|
||||||
|
:extra-deps {}}}}
|
109
doc/dev.md
Normal file
109
doc/dev.md
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
# Dev
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
|
### Start with an issue before writing code
|
||||||
|
|
||||||
|
Before writing any code, please create an issue first that describes the problem
|
||||||
|
you are trying to solve with alternatives that you have considered. A little bit
|
||||||
|
of prior communication can save a lot of time on coding. Keep the problem as
|
||||||
|
small as possible. If there are two problems, make two issues. We discuss the
|
||||||
|
issue and if we reach an agreement on the approach, it's time to move on to a
|
||||||
|
PR.
|
||||||
|
|
||||||
|
### Follow up with a pull request
|
||||||
|
|
||||||
|
Post a corresponding PR with the smallest change possible to address the
|
||||||
|
issue. Then we discuss the PR, make changes as needed and if we reach an
|
||||||
|
agreement, the PR will be merged.
|
||||||
|
|
||||||
|
<!-- ### Tests -->
|
||||||
|
|
||||||
|
<!-- Each bug fix, change or new feature should be tested well to prevent future -->
|
||||||
|
<!-- regressions. -->
|
||||||
|
|
||||||
|
### Force-push
|
||||||
|
|
||||||
|
Please do not use `git push --force` on your PR branch for the following
|
||||||
|
reasons:
|
||||||
|
|
||||||
|
- It makes it more difficult for others to contribute to your branch if needed.
|
||||||
|
- It makes it harder to review incremental commits.
|
||||||
|
- Links (in e.g. e-mails and notifications) go stale and you're confronted with:
|
||||||
|
this code isn't here anymore, when clicking on them.
|
||||||
|
- CircleCI doesn't play well with it: it might try to fetch a commit which
|
||||||
|
doesn't exist anymore.
|
||||||
|
- Your PR will be squashed anyway.
|
||||||
|
|
||||||
|
## Developing
|
||||||
|
|
||||||
|
Run `bb dev` to start shadow-cljs compilation in watch mode.
|
||||||
|
|
||||||
|
<!-- ## Testing -->
|
||||||
|
|
||||||
|
<!-- You can run tests using `bb run-tests` and `bb run-integration-tests`. -->
|
||||||
|
|
||||||
|
## Release
|
||||||
|
|
||||||
|
Static files including compiled JS are hosted on Github. This is set up like
|
||||||
|
described
|
||||||
|
[here](https://medium.com/linagora-engineering/deploying-your-js-app-to-github-pages-the-easy-way-or-not-1ef8c48424b7):
|
||||||
|
|
||||||
|
All the commands below assume that you already have a git project initialized and that you are in its root folder.
|
||||||
|
|
||||||
|
```
|
||||||
|
# Create an orphan branch named gh-pages
|
||||||
|
git checkout --orphan gh-pages
|
||||||
|
# Remove all files from staging
|
||||||
|
git rm -rf .
|
||||||
|
# Create an empty commit so that you will be able to push on the branch next
|
||||||
|
git commit --allow-empty -m "Init empty branch"
|
||||||
|
# Push the branch
|
||||||
|
git push origin gh-pages
|
||||||
|
```
|
||||||
|
|
||||||
|
Now that the branch is created and pushed to origin, let’s configure the worktree correctly:
|
||||||
|
|
||||||
|
```
|
||||||
|
# Come back to master
|
||||||
|
git checkout main
|
||||||
|
# Add gh-pages to .gitignore
|
||||||
|
echo "gh-pages/" >> .gitignore
|
||||||
|
git worktree add gh-pages gh-pages
|
||||||
|
```
|
||||||
|
|
||||||
|
After cloning this repo to a new dir:
|
||||||
|
|
||||||
|
```
|
||||||
|
git fetch origin gh-pages
|
||||||
|
git worktree prune
|
||||||
|
git worktree add gh-pages gh-pages
|
||||||
|
```
|
||||||
|
|
||||||
|
To deploy to Github Pages:
|
||||||
|
|
||||||
|
```
|
||||||
|
script/release.clj
|
||||||
|
```
|
||||||
|
|
||||||
|
To create a new NPM release:
|
||||||
|
|
||||||
|
- Prepare version `package.json`, except patch (if anything should change here)
|
||||||
|
- Run `bb npm-publish`: this will compile, bump patch version, create tag and and push to npm and Github
|
||||||
|
- `bb replace-version 0.6.16 0.7.27`
|
||||||
|
- Create Github release with updated links from `doc/links.md`
|
||||||
|
- `bb gh-pages`
|
||||||
|
|
||||||
|
<!-- To upgrade examples: -->
|
||||||
|
|
||||||
|
<!-- ``` -->
|
||||||
|
<!-- rg '0.0.1' --files-with-matches | xargs sed -i '' 's/0.0.7.27.1.0/g' -->
|
||||||
|
<!-- bb release -->
|
||||||
|
<!-- cd gh-pages -->
|
||||||
|
<!-- git checkout -b v0.7.27 -->
|
||||||
|
<!-- git push --set-upstream origin v0.7.27 -->
|
||||||
|
<!-- git checkout gh-pages -->
|
||||||
|
<!-- cd .. -->
|
||||||
|
<!-- ``` -->
|
||||||
|
|
||||||
|
<!-- Then make a new release on Github with the `v0.7.27` tag. -->
|
49
doc/js-libraries.md
Normal file
49
doc/js-libraries.md
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
# Loading JS libraries
|
||||||
|
|
||||||
|
Since `v0.7.27` scittle allows to load libraries from the global enviroment.
|
||||||
|
This means you can load a library in a `<script>` tag and use it via `:require` in scittle.
|
||||||
|
|
||||||
|
An example:
|
||||||
|
|
||||||
|
``` html
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js" type="application/javascript"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/js-confetti@latest/dist/js-confetti.browser.js"></script>
|
||||||
|
<script type="application/x-scittle">
|
||||||
|
(require '["JSConfetti" :as confetti])
|
||||||
|
(.addConfetti (confetti.))
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
```
|
||||||
|
|
||||||
|
## ES modules
|
||||||
|
|
||||||
|
The async nature of ES modules makes them a litte bit more difficult to work
|
||||||
|
with in scittle. You need to disable automatic evaluation of script tags first
|
||||||
|
using `scittle.core.disable_auto_eval()`. In a `module` type `<script>` tag you
|
||||||
|
can then load ES modules, attach them to the global object and manually invoke
|
||||||
|
`scittle.core.eval_script_tags();` when setup is completed.
|
||||||
|
|
||||||
|
``` html
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js" type="application/javascript"></script>
|
||||||
|
<script>scittle.core.disable_auto_eval()</script>
|
||||||
|
<script type="module">
|
||||||
|
import confetti from "https://esm.sh/canvas-confetti@1.6.0"
|
||||||
|
globalThis.JSConfetti = confetti;
|
||||||
|
scittle.core.eval_script_tags();
|
||||||
|
</script>
|
||||||
|
<script type="application/x-scittle">
|
||||||
|
(require '["JSConfetti" :as confetti])
|
||||||
|
(confetti)
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
```
|
20
doc/links.md
Normal file
20
doc/links.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js-interop.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.cljs-ajax.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.reagent.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.re-frame.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.replicant.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.promesa.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.pprint.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.nrepl.js
|
||||||
|
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.js-interop.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.cljs-ajax.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.reagent.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.re-frame.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.replicant.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.promesa.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.pprint.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.nrepl.js
|
||||||
|
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.cljs-devtools.js
|
49
doc/nrepl/README.md
Normal file
49
doc/nrepl/README.md
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
# nREPL
|
||||||
|
|
||||||
|
To connect to a Scittle nREPL server from your editor, follow these steps. The
|
||||||
|
setup described here, can be found in this directory.
|
||||||
|
|
||||||
|
In babashka or Clojure JVM, use the
|
||||||
|
[sci.nrepl](https://github.com/babashka/sci.nrepl) dependency and run:
|
||||||
|
|
||||||
|
``` clojure
|
||||||
|
(require '[sci.nrepl.browser-server :as nrepl])
|
||||||
|
(nrepl/start! {:nrepl-port 1339 :websocket-port 1340})
|
||||||
|
```
|
||||||
|
|
||||||
|
This will run an nREPL server on port 1339 and a websocket server on port 1340.
|
||||||
|
Your editor's nREPL client will connect to port 1339 and your browser, running
|
||||||
|
scittle, will connect to port 1340. The nREPL server forwards messages to the
|
||||||
|
browser via the websocket connection.
|
||||||
|
|
||||||
|
In your scittle website, you will need to include the following, in addition to
|
||||||
|
the normal routine:
|
||||||
|
|
||||||
|
``` html
|
||||||
|
<script>var SCITTLE_NREPL_WEBSOCKET_PORT = 1340;</script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.nrepl.js" type="application/javascript"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Also include the CLJS file that you want to evaluate with nREPL:
|
||||||
|
|
||||||
|
``` html
|
||||||
|
<script src="playground.cljs" type="application/x-scittle"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Then visit `playground.cljs` in your editor and connect to the nREPL server,
|
||||||
|
and start evaluating!
|
||||||
|
|
||||||
|
See the `index.html` file for an example.
|
||||||
|
|
||||||
|
When you run `bb dev` in this directory, and then open `http://localhost:1341`
|
||||||
|
you should be able evaluate expressions in `playground.cljs`. See a demo
|
||||||
|
[here](https://twitter.com/borkdude/status/1526285565343281159).
|
||||||
|
|
||||||
|
Note that the nREPL server connection stays alive even after the browser window
|
||||||
|
refreshes.
|
||||||
|
|
||||||
|
### CIDER
|
||||||
|
|
||||||
|
Choose `cider-connect-cljs`, select port `1339`, followed by the `nbb` REPL
|
||||||
|
type. If you use multiple REPLs in your project, choose
|
||||||
|
`sesman-link-with-buffer` to choose the right REPL for the right buffer.
|
18
doc/nrepl/bb.edn
Normal file
18
doc/nrepl/bb.edn
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{:deps {io.github.babashka/sci.nrepl
|
||||||
|
#_{:local/root "/Users/borkdude/dev/sci.nrepl"}
|
||||||
|
{:git/sha "4f7f6d652a71b5bdc0c110313a4908d956e7a97d"}
|
||||||
|
io.github.babashka/http-server
|
||||||
|
{:git/sha "b38c1f16ad2c618adae2c3b102a5520c261a7dd3"}}
|
||||||
|
:tasks {http-server {:doc "Starts http server for serving static files"
|
||||||
|
:requires ([babashka.http-server :as http])
|
||||||
|
:task (do (http/serve {:port 1341 :dir "."})
|
||||||
|
(println "Serving static assets at http://localhost:1341"))}
|
||||||
|
|
||||||
|
browser-nrepl {:doc "Start browser nREPL"
|
||||||
|
:requires ([sci.nrepl.browser-server :as bp])
|
||||||
|
:task (bp/start! {})}
|
||||||
|
|
||||||
|
-dev {:depends [http-server browser-nrepl]}
|
||||||
|
|
||||||
|
dev {:task (do (run '-dev {:parallel true})
|
||||||
|
(deref (promise)))}}}
|
13
doc/nrepl/index.html
Normal file
13
doc/nrepl/index.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js" type="application/javascript"></script>
|
||||||
|
<script>var SCITTLE_NREPL_WEBSOCKET_PORT = 1340;</script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.nrepl.js" type="application/javascript"></script>
|
||||||
|
<script type="application/x-scittle" src="playground.cljs"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Scittle</h1>
|
||||||
|
<h2>What is this?</h2>
|
||||||
|
</body>
|
||||||
|
</html>
|
15
doc/nrepl/playground.cljs
Normal file
15
doc/nrepl/playground.cljs
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
(ns playground)
|
||||||
|
|
||||||
|
(+ 1 2 3)
|
||||||
|
|
||||||
|
(->
|
||||||
|
(js/document.getElementsByTagName "body")
|
||||||
|
first
|
||||||
|
(.append
|
||||||
|
(doto (js/document.createElement "p")
|
||||||
|
(.append
|
||||||
|
(js/document.createTextNode "there")))))
|
||||||
|
|
||||||
|
(defn foo [])
|
||||||
|
|
||||||
|
(js/alert "Isn't this cool? :)")
|
26
doc/serviceworker.md
Normal file
26
doc/serviceworker.md
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# Scittle in a service worker
|
||||||
|
|
||||||
|
You can use Scittle to bootstrap a ClojureScript based service worker.
|
||||||
|
|
||||||
|
Put the following code into e.g. `scittle-sw.js` to create a JavaScript based service worker, load Scittle, then fetch your script and eval it.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
importScripts("scittle.min.js");
|
||||||
|
|
||||||
|
const request = await fetch("sw.cljs");
|
||||||
|
const text = await request.text();
|
||||||
|
const result = scittle.core.eval_string(text);
|
||||||
|
```
|
||||||
|
|
||||||
|
Then load `scittle-sw.js` in your HTML:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<script>
|
||||||
|
if('serviceWorker' in navigator)
|
||||||
|
navigator.serviceWorker.register('scittle-sw.js');
|
||||||
|
</script>
|
||||||
|
```
|
||||||
|
|
||||||
|
This will load `sw.cljs` and eval it in the context of the service worker.
|
||||||
|
|
||||||
|
A ready-made example can be found at [chr15m/scittle-template-serviceworker](https://github.com/chr15m/scittle-template-serviceworker).
|
139
index.html
139
index.html
|
@ -1,139 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="css/style.css">
|
|
||||||
<script src="js/scittle.js" type="application/javascript"></script>
|
|
||||||
<script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script>
|
|
||||||
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>
|
|
||||||
<script src="js/scittle.reagent.js" type="application/javascript"></script>
|
|
||||||
<script src="js/scittle.cljs-ajax.js" type="application/javascript"></script>
|
|
||||||
<script type="application/x-scittle">
|
|
||||||
(defn my-alert []
|
|
||||||
(js/alert "You clicked!"))
|
|
||||||
|
|
||||||
(set! (.-my_alert js/window) my-alert)
|
|
||||||
|
|
||||||
(require '[reagent.core :as r]
|
|
||||||
'[reagent.dom :as rdom])
|
|
||||||
|
|
||||||
(def state (r/atom {:clicks 0}))
|
|
||||||
|
|
||||||
(defn my-component []
|
|
||||||
[:div
|
|
||||||
[:p "Clicks: " (:clicks @state)]
|
|
||||||
[:p [:button {:on-click #(swap! state update :clicks inc)}
|
|
||||||
"Click me!"]]])
|
|
||||||
|
|
||||||
(rdom/render [my-component] (.getElementById js/document "app"))
|
|
||||||
|
|
||||||
(require '[ajax.core :refer [GET]])
|
|
||||||
|
|
||||||
(defn handler [response]
|
|
||||||
(js/alert (str response)))
|
|
||||||
|
|
||||||
(defn make-request []
|
|
||||||
(GET "html/cljs-ajax.html" {:handler handler}))
|
|
||||||
|
|
||||||
;; export function to use from JavaScript:
|
|
||||||
(set! (.-make_request js/window) make-request)
|
|
||||||
|
|
||||||
(def code-tags (.querySelectorAll js/document "code[data-type='scittle']"))
|
|
||||||
|
|
||||||
(require '[goog.object :as gobject])
|
|
||||||
(doseq [code code-tags]
|
|
||||||
(let [src (.getAttribute code "data-src")
|
|
||||||
req (js/XMLHttpRequest.)]
|
|
||||||
(.open req "GET" src true)
|
|
||||||
(set! (.-onload req)
|
|
||||||
(fn []
|
|
||||||
(let [response (gobject/get req "response")]
|
|
||||||
(set! (.-innerText code) response)
|
|
||||||
(.highlightElement js/hljs code))))
|
|
||||||
(.send req)))
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script src="cljs/script.cljs" type="application/x-scittle"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js" type="text/javascript"></script>
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/zenburn.min.css" integrity="sha512-JPxjD2t82edI35nXydY/erE9jVPpqxEJ++6nYEoZEpX2TRsmp2FpZuQqZa+wBCen5U16QZOkMadGXHCfp+tUdg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div style="float: right;">
|
|
||||||
<a href="https://GitHub.com/borkdude/scittle"><img src="https://img.shields.io/github/stars/borkdude/scittle.svg?style=social&label=Star"></a></div>
|
|
||||||
|
|
||||||
<h1>Scittle</h1>
|
|
||||||
<h2>What is this?</h2>
|
|
||||||
<p>This project exposes the <a href="https://github.com/borkdude/sci">Small Clojure Interpreter</a> in the
|
|
||||||
browser in such a way that you can use it with the <tt>script</tt> tag.</p>
|
|
||||||
<h2>Project status</h2>
|
|
||||||
<p>
|
|
||||||
This project is still experimental and breaking changes may
|
|
||||||
happen. Feedback is welcome
|
|
||||||
on <a href="https://github.com/borkdude/scittle">Github</a>.</p>
|
|
||||||
<p>
|
|
||||||
To use scittle on your own site, it is recommended to use the links
|
|
||||||
published to
|
|
||||||
the <a href="https://github.com/borkdude/scittle/releases/tag/v0.0.2">releases
|
|
||||||
page</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<a name="usage"></a>
|
|
||||||
<h2><a href="#usage">Usage</a></h2>
|
|
||||||
|
|
||||||
Include <tt>scittle.js</tt> and write a <tt>script</tt> tag
|
|
||||||
where <tt>type</tt> is set
|
|
||||||
to <tt>application/x-scittle</tt>.
|
|
||||||
|
|
||||||
<pre><code data-type="scittle" data-src="html/export.html" class="html"></code></pre>
|
|
||||||
<button onclick="my_alert()">
|
|
||||||
Click me!
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<a name="src"></a>
|
|
||||||
<h2><a href="#src">Source from file</a></h2>
|
|
||||||
|
|
||||||
When you have a file on your server, say <tt>cljs/script.cljs</tt>, you can load it using the <tt>src</tt> attribute:
|
|
||||||
|
|
||||||
<pre><code id="scittle-tag-example" class="html">
|
|
||||||
<script src="cljs/script.cljs" type="application/x-scittle"></script>
|
|
||||||
</code></pre>
|
|
||||||
|
|
||||||
<script type="text/javascript">hljs.highlightElement(document.getElementById("scittle-tag-example"));</script>
|
|
||||||
|
|
||||||
<a name="reagent"></a>
|
|
||||||
<h2><a href="#reagent">Reagent plugin</a></h2>
|
|
||||||
|
|
||||||
To enable <a href="https://github.com/reagent-project/reagent">reagent</a>,
|
|
||||||
in addition to <tt>scittle.js</tt>, you need to include React
|
|
||||||
and <tt>scittle.reagent.js</tt>:
|
|
||||||
|
|
||||||
<pre><code data-type="scittle" data-src="html/reagent.html" class="html"></code></pre>
|
|
||||||
|
|
||||||
<div id="app"></div>
|
|
||||||
|
|
||||||
<a name="cljs-ajax"></a>
|
|
||||||
<h2><a href="#cljs-ajax">Cljs-ajax plugin</a></h2>
|
|
||||||
|
|
||||||
To enable <a href="https://github.com/JulianBirch/cljs-ajax">cljs-ajax</a>,
|
|
||||||
in addition to <tt>scittle.js</tt>, you need to include <tt>scittle.cljs-ajax.js</tt>:
|
|
||||||
|
|
||||||
<pre><code data-type="scittle" data-src="html/cljs-ajax.html" class="html"></code></pre>
|
|
||||||
|
|
||||||
<button onclick="make_request()">
|
|
||||||
Click me!
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<a name="examples"></a>
|
|
||||||
<h2><a href="#examples">Examples</a></h2>
|
|
||||||
<ul>
|
|
||||||
<li><a href="tictactoe.html">Tic-tac-toe</a></li>
|
|
||||||
<li><a href="bookmarklet.html">Bookmarklet</a></li>
|
|
||||||
<li>
|
|
||||||
<a href="https://github.com/kloimhardt/babashka-scittle-guestbook">
|
|
||||||
Babashka + scittle implementation of the Luminus guestbook.
|
|
||||||
</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,63 +0,0 @@
|
||||||
(function(){
|
|
||||||
shadow$provide[0]=function(b,c,a,d){a.exports=React};
|
|
||||||
shadow$provide[1]=function(b,c,a,d){a.exports=ReactDOM};
|
|
||||||
'use strict';var v8=function(a,b){let c,d;for(let e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(let f=0;f<u8.length;f++)c=u8[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}},z8=function(a,b){var c=w8[a];if(void 0!==c)return c;try{x8.push(a);var d=y8[a],e=shadow$provide[a];if(void 0===d){if(void 0===e)throw"Module not provided: "+a;d={exports:{}};y8[a]=d}if(e){delete shadow$provide[a];try{e.call(d,$APP.kX,z8,d,d.exports)}catch(l){throw console.warn("shadow-cljs - failed to load",
|
|
||||||
a),l;}if(b){var f=b.globals;if(f)for(a=0;a<f.length;a++)window[f[a]]=d.exports}}}finally{x8.pop()}return d.exports},A8=function(a){return 2>$APP.Je(a)?$APP.fT(a):[$APP.fT($APP.Ch.i(a,0,1)),$APP.Ch.h(a,1)].join("")},C8=function(a){if("string"===typeof a)return a;a=$APP.Wh(a);var b=$APP.jT.h(a,/-/),c=$APP.z(b);b=$APP.r(c);c=$APP.t(c);return $APP.n(B8.g?B8.g(b):B8.call(null,b))?a:$APP.Yb.i($APP.q,b,$APP.Yi.h(A8,c))},D8=function(a){var b=function(){var c=function(){var d=$APP.jf(a);if(d){d=a.displayName;
|
|
||||||
if($APP.n(d))return d;d=a.name;return"string"===typeof d&&$APP.z(d)?d:null}return d}();if($APP.n(c))return c;c=function(){var d=null!=a?a.J&4096||$APP.Ua===a.Nd?!0:!1:!1;return d?$APP.Wh(a):d}();if($APP.n(c))return c;c=$APP.F(a);return $APP.vf(c)?$APP.T.g(c):null}();return $APP.n(b)?$APP.cT($APP.q.g(b),"$","."):null},E8=function(a){return a instanceof $APP.ee||a instanceof $APP.x},G8=function(a){if($APP.vf(a))try{var b=$APP.ce.h(a,F8)}catch(c){b=null}else b=null;return b},H8=function(a){var b=F8.g($APP.F(a));
|
|
||||||
if($APP.n(b))return b;b=G8($APP.B.i(a,1,null));if($APP.n(b))return b;b=$APP.B.i(a,0,null);switch(b instanceof $APP.ee?b.fb:null){case "\x3e":case "f\x3e":return G8($APP.B.i(a,2,null));case "r\x3e":return a=$APP.B.i(a,2,null),null==a?null:a.key;default:return null}},I8=function(a){return setTimeout(a,16)},J8=function(a,b){return a.pf-b.pf},K8=function(){return null},L8=function(a){for(var b=a.length,c=0;;)if(c<b){var d=a[c];d.s?d.s():d.call(null);c+=1}else return null},M8=function(a,b,c){b.push(c);
|
|
||||||
return a.schedule()},N8=function(){this.jf=!1},P8=function(a){if($APP.n(a.cljsIsDirty))return null;a.cljsIsDirty=!0;return O8.queue_render(a)},Q8=function(a){if(null!=a&&null!=a.If)a=a.id;else{var b=Q8[$APP.pa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):b.call(null,a);else if(b=Q8._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Rb("Compiler.get-id",a);}return a},R8=function(a,b){if(null!=a&&null!=a.xf)a=a.xf(a,b);else{var c=R8[$APP.pa(null==a?null:a)];if(null!=c)a=c.h?c.h(a,b):c.call(null,a,b);
|
|
||||||
else if(c=R8._,null!=c)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.Rb("Compiler.as-element",a);}return a},S8=function(a,b,c,d,e){if(null!=a&&null!=a.yf)a=a.yf(a,b,c,d,e);else{var f=S8[$APP.pa(null==a?null:a)];if(null!=f)a=f.I?f.I(a,b,c,d,e):f.call(null,a,b,c,d,e);else if(f=S8._,null!=f)a=f.I?f.I(a,b,c,d,e):f.call(null,a,b,c,d,e);else throw $APP.Rb("Compiler.make-element",a);}return a},U8=function(a,b){b.kf=null;a:{var c=T8;T8=b;try{var d=a.s?a.s():a.call(null);break a}finally{T8=c}d=void 0}a=
|
|
||||||
b.kf;b.bf=!1;a:{c=b.df;var e=null==a?0:a.length,f=e===(null==c?0:c.length);if(f)for(f=0;;){var l=f===e;if(l){c=l;break a}if(a[f]===c[f])f+=1;else{c=!1;break a}}else c=f}c||b._update_watching(a);return d},V8=function(a){var b=T8;if(null!=b){var c=b.kf;null==c?b.kf=[a]:c.push(a)}},W8=function(a,b,c){a.Bc=$APP.E.i(a.Bc,b,c);return a.sf=null},X8=function(a,b){a.Bc=$APP.hf.h(a.Bc,b);return a.sf=null},Y8=function(a,b,c){var d=a.sf;d=null==d?a.sf=$APP.fg(function(p,w,A){p.push(w);p.push(A);return p},[],
|
|
||||||
a.Bc):d;for(var e=d.length,f=0;;)if(f<e){var l=d[f],g=d[f+1];g.B?g.B(l,a,b,c):g.call(null,l,a,b,c);f=2+f}else break},Z8=function(a,b,c,d){$APP.od(a,["#object[reagent.ratom.",$APP.q.g(c)," "].join(""));a:{c=T8;T8=null;try{var e=d;break a}finally{T8=c}e=void 0}$APP.gn(e,a,b);return $APP.od(a,"]")},$8=function(a,b,c,d){this.state=a;this.D=b;this.Fe=c;this.Bc=d;this.C=2154201088;this.J=114690},a9=function(a){if(null!=a&&null!=a.rf)a=a.rf(a);else{var b=a9[$APP.pa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):
|
|
||||||
b.call(null,a);else if(b=a9._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Rb("IDisposable.dispose!",a);}return a},b9=function(a,b,c,d){return a._handle_change(b,c,d)},c9=function(a){this.f=a;this.state=null;this.bf=!0;this.vf=!1;this.lf=this.af=this.Bc=this.df=null;this.C=2153807872;this.J=114690},e9=function(){for(;;){var a=d9;if(null==a)return null;d9=null;for(var b=a.length,c=0;;)if(c<b)a[c]._queued_run(),c+=1;else break}},i9=function(a){for(var b=[],c=arguments.length,d=0;;)if(d<c)b.push(arguments[d]),
|
|
||||||
d+=1;else break;c=arguments[0];var e=$APP.Ai(1<b.length?new $APP.Xb(b.slice(1),0,null):null);b=$APP.ce.h(e,f9);d=$APP.ce.h(e,g9);e=$APP.ce.h(e,h9);c=new c9(c);c._set_opts(new $APP.m(null,3,[f9,b,g9,d,h9,e],null));return c},l9=function(a,b){var c=j9,d=k9,e=U8(a,d);null!=d.df&&(k9=i9(null),d._set_opts(c),d.f=a,d.af=function(){return P8.g?P8.g(b):P8.call(null,b)},b.cljsRatom=d);return e},m9=function(a,b){var c=b.argv;if(null==c){c=$APP.P;a=a.constructor;a:for(var d=$APP.xa(b),e=d.length,f=$APP.Hi,l=
|
|
||||||
0;;)if(l<e){var g=d[l];f=$APP.E.i(f,$APP.Vh.g(g),$APP.Aa(b,g));l+=1}else break a;b=new $APP.O(null,2,5,c,[a,f],null)}else b=c;return b},n9=function(a){var b;if(b=$APP.jf(a))a=null==a?null:a.prototype,b=null!=(null==a?null:a.cf);return b},o9=function(a,b){for(;;){var c=a.cf,d=!0===a.Af?c.call(a,a):function(){var e=m9(a,a.props);switch($APP.Je(e)){case 1:return c.call(a);case 2:return c.call(a,$APP.B.h(e,1));case 3:return c.call(a,$APP.B.h(e,1),$APP.B.h(e,2));case 4:return c.call(a,$APP.B.h(e,1),$APP.B.h(e,
|
|
||||||
2),$APP.B.h(e,3));case 5:return c.call(a,$APP.B.h(e,1),$APP.B.h(e,2),$APP.B.h(e,3),$APP.B.h(e,4));default:return c.apply(a,$APP.cc.g(e).slice(1))}}();if($APP.xf(d))return R8(b,d);if($APP.If(d))a.cf=n9(d)?function(e,f,l,g,p){return function(){function w(D){var G=null;if(0<arguments.length){G=0;for(var J=Array(arguments.length-0);G<J.length;)J[G]=arguments[G+0],++G;G=new $APP.Xb(J,0,null)}return A.call(this,G)}function A(D){return R8(f,$APP.Yb.i($APP.Ck,p,D))}w.o=0;w.u=function(D){D=$APP.z(D);return A(D)};
|
|
||||||
w.j=A;return w}()}(a,b,c,null,d):d;else return d}},r9=function(a,b){switch(a instanceof $APP.ee?a.fb:null){case "getDefaultProps":throw Error("getDefaultProps not supported");case "getDerivedStateFromProps":return function(c,d){var e=b.call,f=c.argv;null!=f&&(c=$APP.B.i(f,1,null),c=$APP.vf(c)?c:null);return e.call(b,null,c,d)};case "getInitialState":return function(c){var d=c.Cf;d=null!=d?d:c.Cf=p9.g(null);return $APP.pj(d,b.call(c,c))};case "getSnapshotBeforeUpdate":return function(c,d){return b.call(this,
|
|
||||||
this,m9(this,c),d)};case "componentWillReceiveProps":return function(c){return b.call(this,this,m9(this,c))};case "UNSAFE_componentWillReceiveProps":return function(c){return b.call(this,this,m9(this,c))};case "shouldComponentUpdate":return function(c){var d=q9;if($APP.n(d))return d;d=this.props.argv;var e=c.argv,f=null==d||null==e;if(null==b){if(f)return f;try{return $APP.Di.h(d,e)}catch(l){return!1}}else return f?b.call(this,this,m9(this,this.props),m9(this,c)):b.call(this,this,d,e)};case "componentWillUpdate":return function(c,
|
|
||||||
d){return b.call(this,this,m9(this,c),d)};case "UNSAFE_componentWillUpdate":return function(c,d){return b.call(this,this,m9(this,c),d)};case "componentDidUpdate":return function(c,d,e){return b.call(this,this,m9(this,c),d,e)};case "componentWillMount":return function(){return b.call(this,this)};case "UNSAFE_componentWillMount":return function(){return b.call(this,this)};case "componentDidMount":return function(){return b.call(this,this)};case "componentWillUnmount":return function(){var c=$APP.Aa(this,
|
|
||||||
"cljsRatom");null!=c&&a9(c);this.cljsIsDirty=!1;return null==b?null:b.call(this,this)};case "componentDidCatch":return function(c,d){return b.call(this,this,c,d)};default:return null}},t9=function(a){return $APP.fg(function(b,c,d){return $APP.E.i(b,$APP.Vh.g(s9(c)),d)},$APP.Hi,a)},z9=function(a,b){var c=function(){var l=u9.g(a);return $APP.n(l)?l:v9.g(a)}(),d=null==u9.g(a),e=function(){var l=w9.g(a);if($APP.n(l))return l;l=D8(c);return $APP.n(l)?l:$APP.q.g($APP.Cn.g("reagent"))}(),f=$APP.fg(function(l,
|
|
||||||
g,p){var w=$APP.E.i,A=r9(g,p);return w.call($APP.E,l,g,$APP.n(A)?A:p)},$APP.Hi,a);return $APP.E.j(f,w9,e,$APP.Pe([x9,d,u9,c,v9,function(){var l=this,g=$APP.Aa(l,"cljsRatom");l.cljsIsDirty=!1;return null==g?l9(function(){a:{var p=y9;y9=l;try{var w=o9(l,b);break a}finally{y9=p}w=void 0}return w},l):g._run(!1)}]))},A9=function(a){return $APP.fg(function(b,c,d){c=$APP.Wh(c);b[c]=d;return b},{},a)},C9=function(a,b){return z9($APP.em.j($APP.Pe([B9,t9(a)])),b)},H9=function(a,b){function c(g,p,w){e8.Component.call(this,
|
|
||||||
g,p,w);$APP.n(l)&&(l.h?l.h(this,g):l.call(null,this,g));$APP.n(f)&&(this.state=f.g?f.g(this):f.call(null,this));this.pf=E9+=1;return this}a=C9(a,b);b=A9($APP.Yb.j($APP.hf,a,w9,F9,$APP.sA,$APP.Pe([v9,u9,G9])));var d=A9($APP.im(a,G9)),e=w9.g(a),f=F9.g(a),l=$APP.sA.g(a);v8(c.prototype,e8.Component.prototype,b);$APP.n(v9.g(a))&&(c.prototype.render=v9.g(a));$APP.n(u9.g(a))&&(c.prototype.cf=u9.g(a));$APP.n(x9.g(a))&&(c.prototype.Af=x9.g(a));v8(c,e8.Component,d);$APP.n(e)&&(c.displayName=e,c.$c=e,c.ue=function(g){return $APP.od(g,
|
|
||||||
e)});c.Td=!0;return c.prototype.constructor=c},I9=function(a,b,c){a=Q8(a);return b[a]=c},J9=function(a,b){for(;;){var c=b.cf,d=b.argv,e=$APP.Yb.h(c,d);if($APP.xf(e))return R8(a,e);if($APP.If(e))b.cf=n9(e)?function(f,l,g,p,w,A){return function(){function D(J){var R=null;if(0<arguments.length){R=0;for(var W=Array(arguments.length-0);R<W.length;)W[R]=arguments[R+0],++R;R=new $APP.Xb(W,0,null)}return G.call(this,R)}function G(J){return R8(f,$APP.Yb.i($APP.Ck,A,J))}D.o=0;D.u=function(J){J=$APP.z(J);return G(J)};
|
|
||||||
D.j=G;return D}()}(a,b,c,null,d,e):e;else return e}},K9=function(a,b){var c=b.argv,d=b.cf;b=e8.useState(0);$APP.B.i(b,0,null);var e=$APP.B.i(b,1,null),f=e8.useRef();$APP.n(f.current)||function(){var g={forceUpdate:function(){return e.g?e.g($APP.te):e.call(null,$APP.te)}};g.pf=E9+=1;g.constructor=d;g.cf=d;return f.current=g}();var l=f.current;b=$APP.Aa(l,"cljsRatom");e8.useEffect(function(){return function(){var g=$APP.Aa(l,"cljsRatom");return null==g?null:a9(g)}},[]);l.argv=c;l.cljsIsDirty=!1;return null==
|
|
||||||
b?l9(function(){a:{var g=y9;y9=l;try{var p=J9(a,l);break a}finally{y9=g}p=void 0}return p},l):b._run(!1)},L9=function(a,b){a=a.argv;b=b.argv;var c=!1===q9;if(c)try{return $APP.fe.h(a,b)}catch(d){return!1}else return c},M9=function(a,b){function c(e){return K9(a,e)}var d=$APP.Aa(b,Q8(a));if($APP.n(d))return d;c.displayName=D8(b);d=e8.memo(c,L9);I9(a,b,d);return d},Q9=function(a,b,c,d){var e=$APP.Ai($APP.Hi);e=$APP.ce.h(e,N9);if(a===document.activeElement&&$APP.H(O9,a.type)&&"string"===typeof b&&"string"===
|
|
||||||
typeof c){var f=a.value;if($APP.Di.h(f,c))return O8.add_after_render(function(){return P9.g?P9.g(d):P9.call(null,d)});c=$APP.Je(f)-a.selectionStart;c=$APP.Je(b)-c;d.gf=b;a.value=b;$APP.jf(e)&&(e.g?e.g(b):e.call(null,b));a.selectionStart=c;return a.selectionEnd=c}d.gf=b;a.value=b;return $APP.jf(e)?e.g?e.g(b):e.call(null,b):null},P9=function(a){if($APP.n(a.nf)){a.tf=!1;var b=a.Bf,c=a.gf,d=a.qf;return $APP.Di.h(b,c)?Q9(d,b,c,a):null}return null},R9=function(a,b,c){a.gf=c.target.value;$APP.n(a.tf)||(a.tf=
|
|
||||||
!0,O8.add_after_render(function(){return P9(a)}));return b.g?b.g(c):b.call(null,c)},S9=function(a){var b=y9;if($APP.n(function(){var f=null!=a;return f?(f=a.hasOwnProperty("onChange"),$APP.n(f)?a.hasOwnProperty("value"):f):f}())){var c=a.value;c=null==c?"":c;var d=a.onChange,e=a.ref;$APP.n(b.nf)||(b.nf=!0,b.gf=c);$APP.n(b.zf)||(b.zf=$APP.jf(e)?function(f){b.qf=f;return e.g?e.g(f):e.call(null,f)}:$APP.n($APP.n(e)?e.hasOwnProperty("current"):e)?function(f){b.qf=f;return e.current=f}:function(f){return b.qf=
|
|
||||||
f});b.Bf=c;delete a.value;a.defaultValue=c;a.onChange=function(f){return R9(b,d,f)};a.ref=b.zf}},T9=function(a,b){return a.hasOwnProperty(b)?$APP.Aa(a,b):null},W9=function(a,b,c){if(E8(b)){var d=T9(U9,$APP.Wh(b));null==d?(d=C8(b),b=$APP.Wh(b),b=U9[b]=d):b=d}c=V9.g?V9.g(c):V9.call(null,c);a[b]=c;return a},V9=function(a){return"object"!==$APP.pa(a)?a:E8(a)?$APP.Wh(a):$APP.vf(a)?$APP.fg(W9,{},a):$APP.qf(a)?$APP.Un(a):$APP.If(a)?function(){function b(d){var e=null;if(0<arguments.length){e=0;for(var f=
|
|
||||||
Array(arguments.length-0);e<f.length;)f[e]=arguments[e+0],++e;e=new $APP.Xb(f,0,null)}return c.call(this,e)}function c(d){return $APP.Yb.h(a,d)}b.o=0;b.u=function(d){d=$APP.z(d);return c(d)};b.j=c;return b}():$APP.Un(a)},Y9=function(a,b,c){if(E8(b)){var d=T9(X9,$APP.Wh(b));null==d?(d=C8(b),b=$APP.Wh(b),b=X9[b]=d):b=d}c=V9(c);a[b]=c;return a},Z9=function(a){return"object"!==$APP.pa(a)?a:E8(a)?$APP.Wh(a):$APP.vf(a)?$APP.fg(Y9,{},a):$APP.qf(a)?$APP.Un(a):$APP.If(a)?function(){function b(d){var e=null;
|
|
||||||
if(0<arguments.length){e=0;for(var f=Array(arguments.length-0);e<f.length;)f[e]=arguments[e+0],++e;e=new $APP.Xb(f,0,null)}return c.call(this,e)}function c(d){return $APP.Yb.h(a,d)}b.o=0;b.u=function(d){d=$APP.z(d);return c(d)};b.j=c;return b}():$APP.Un(a)},$9=function(a,b,c,d,e){switch($APP.Je(b)-e){case 0:return e8.createElement(c,d);case 1:return e8.createElement(c,d,R8(a,$APP.B.i(b,e,null)));default:return e8.createElement.apply(null,$APP.fg(function(f,l,g){l>=e&&f.push(R8(a,g));return f},[c,
|
|
||||||
d],b))}},a$=function(a,b,c,d){this.tag=a;this.id=b;this.className=c;this.Df=d},c$=function(a,b,c){var d=$APP.Aa(a,Q8(c));null==d?n9(a)?a=I9(c,a,a):(d=$APP.F(a),d=$APP.E.i(d,b$,a),d=H9(d,c),a=I9(c,a,d)):a=d;c={};c.argv=b;b=H8(b);null!=b&&(c.key=b);return e8.createElement(a,c)},d$=function(a,b,c,d){var e={};e.cf=a;e.argv=$APP.Hk.h(b,c);b=H8(b);null!=b&&(e.key=b);return e8.createElement(M9(d,a),e)},e$=function(a,b,c){var d;if(d=$APP.jf(a))d=null==a?null:a.prototype,d=null!=(null==d?null:d.render);return d?
|
|
||||||
c$(a,b,c):d$(a,b,1,c)},i$=function(a,b,c,d){var e=a.tag,f=$APP.B.i(b,c,null),l=null==f||$APP.vf(f),g=function(){var w=l?f:null;var A=$APP.NQ.g(w);A=$APP.n(A)?$APP.E.i(w,$APP.NQ,f$.g(A)):w;var D=a.id;w=a.className;D=null!=D&&null==$APP.BS.g(A)?$APP.E.i(A,$APP.BS,D):A;if($APP.n(w)){var G=$APP.E.i,J=f$.h,R=$APP.NQ.g(A);A=$APP.n(R)?R:g$.g(A);w=G.call($APP.E,D,$APP.NQ,J.call(f$,w,A))}else w=D;w=$APP.n(a.Df)?Z9(w):V9(w);return $APP.n(w)?w:{}}();c+=l?1:0;a:switch(e){case "input":case "textarea":var p=!0;
|
|
||||||
break a;default:p=!1}if(p)return p=function(){var w=d.Jf;if($APP.n(w))return w;w=H9(h$,d);return d.Jf=w}(),R8(d,$APP.lf(new $APP.O(null,6,5,$APP.P,[p,b,e,g,c,d],null),$APP.F(b)));p=G8($APP.F(b));null!=p&&(g.key=p);return S8(d,b,e,g,c)},j$=function(a,b){return $APP.cc.g($APP.Yi.h(function(c){return R8(b,c)},a))},m$=function(a,b,c){null==b&&console.error("vec-to-elem",$APP.on.j($APP.Pe([a])));var d=$APP.B.i(a,0,null);switch(d instanceof $APP.ee?d.fb:null){case "\x3e":return c=$APP.B.i(a,1,null),c=new a$(c,
|
|
||||||
null,null,null),i$(c,a,2,b);case "r\x3e":c=$APP.B.i(a,1,null);d=$APP.B.i(a,2,null);d=$APP.n(d)?d:{};var e=G8($APP.F(a));null!=e&&(d.key=e);return S8(b,a,c,d,3);case "f\x3e":return d$($APP.B.i(a,1,null),a,2,b);case "\x3c\x3e":return d=$APP.B.i(a,1,null),c=null==d||$APP.vf(d),d=V9(c?d:null),d=$APP.n(d)?d:{},c=1+(c?1:0),e=H8(a),null!=e&&(d.key=e),S8(b,a,e8.Fragment,d,c);default:if(E8(d)||"string"===typeof d)a:for(;;)switch(c=$APP.B.i(a,0,null),c=$APP.Wh(c),d=c.indexOf("\x3e"),d){case -1:d=T9(k$,c);if(null==
|
|
||||||
d){var f=$APP.t($APP.Um(l$,$APP.Wh(c)));d=$APP.B.i(f,0,null);e=$APP.B.i(f,1,null);f=$APP.B.i(f,2,null);f=null==f?null:$APP.cT(f,/\./," ");var l=$APP.Di.h(-1,d.indexOf("-"));d=new a$(d,e,f,l);c=k$[c]=d}else c=d;b=i$(c,a,1,b);break a;case 0:b=null;break a;default:a=$APP.lf(new $APP.O(null,2,5,$APP.P,[$APP.Ch.i(c,0,d),$APP.E.i($APP.lf(a,null),0,$APP.Ch.h(c,d+1))],null),$APP.F(a))}else b=c.i?c.i(d,a,b):c.call(null,d,a,b);return b}},p$=function(a,b,c){var d=q9;q9=!0;try{return f8.render(a.s?a.s():a.call(null),
|
|
||||||
b,function(){var e=q9;q9=!1;try{return $APP.qj.B(o$,$APP.E,b,a),O8.flush_after_render(),null!=c?c.s?c.s():c.call(null):null}finally{q9=e}})}finally{q9=d}},u8="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),F9=new $APP.ee(null,"getInitialState","getInitialState",1541760916),q$=new $APP.ee(null,"component-will-unmount","component-will-unmount",-2058314698),u9=new $APP.ee(null,"reagentRender","reagentRender",-358306383),r$=new $APP.x(null,"container",
|
|
||||||
"container",-96406180,null),s$=new $APP.ee(null,"contextType","contextType",1033066077),t$=new $APP.ee(null,"getDerivedStateFromProps","getDerivedStateFromProps",-991834739),u$=new $APP.ee(null,"display-name","display-name",694513143),g$=new $APP.ee(null,"className","className",-1983287057),v$=new $APP.x("reagent.dom","render","reagent.dom/render",-1216356973,null),w$=new $APP.x(null,"callback-or-compiler","callback-or-compiler",90200066,null),x$=new $APP.x(null,"reagent.core","reagent.core",1841519592,
|
|
||||||
null),h9=new $APP.ee(null,"on-dispose","on-dispose",2105306360),y$=new $APP.ee(null,"no-cache","no-cache",1588056370),z$=new $APP.ee(null,"function-components","function-components",1492814963),A$=new $APP.x(null,"reagent.dom","reagent.dom",-2138920962,null),B$=new $APP.ee(null,"callback","callback",-705136228),x9=new $APP.ee(null,"cljsLegacyRender","cljsLegacyRender",-1527295613),N9=new $APP.ee(null,"on-write","on-write",31519475),C$=new $APP.ee(null,"contextTypes","contextTypes",-2023853910),D$=
|
|
||||||
new $APP.x(null,"render","render",232498073,null),v9=new $APP.ee(null,"render","render",-1408033454),f9=new $APP.ee(null,"auto-run","auto-run",1958400437),E$=new $APP.ee(null,"childContextTypes","childContextTypes",578717991),b$=new $APP.ee(null,"reagent-render","reagent-render",-985383853),F$=new $APP.x("reagent.core","atom","reagent.core/atom",1748890217,null),G$=new $APP.ee(null,"componentWillUnmount","componentWillUnmount",1573788814),w9=new $APP.ee(null,"displayName","displayName",-809144601),
|
|
||||||
H$=new $APP.ee(null,"getDerivedStateFromError","getDerivedStateFromError",166658477),g9=new $APP.ee(null,"on-set","on-set",-140953470),I$=new $APP.ee(null,"component-did-update","component-did-update",-1468549173),F8=new $APP.ee(null,"key","key",-1516042587),J$=new $APP.ee(null,"shouldComponentUpdate","shouldComponentUpdate",1795750960);var y8={},w8={},x8=[];z8.cache={};z8.resolve=function(a){return a};var e8=z8(0,{});var K$={};$APP.nj.g(null);var L$={},M$="undefined"!==typeof window&&null!=window.document,B8=new $APP.lm(null,new $APP.m(null,2,["aria",null,"data",null],null),null),f$=function f$(a){switch(arguments.length){case 0:return f$.s();case 1:return f$.g(arguments[0]);case 2:return f$.h(arguments[0],arguments[1]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return f$.j(arguments[0],arguments[1],new $APP.Xb(c.slice(2),0,null))}};f$.s=function(){return null};
|
|
||||||
f$.g=function(a){return $APP.qf(a)?(a=$APP.lj.h(function(b){return $APP.n(b)?E8(b)?$APP.Wh(b):b:null},a),$APP.z(a)?$APP.eT.h(" ",a):null):E8(a)?$APP.Wh(a):a};f$.h=function(a,b){return $APP.n(a)?$APP.n(b)?[$APP.q.g(f$.g(a))," ",$APP.q.g(f$.g(b))].join(""):f$.g(a):f$.g(b)};f$.j=function(a,b,c){return $APP.dc.i(f$,f$.h(a,b),c)};f$.u=function(a){var b=$APP.r(a),c=$APP.t(a);a=$APP.r(c);c=$APP.t(c);return this.j(b,a,c)};f$.o=2;var q9=!1;var E9=0,N$=M$?function(){var a=window;return function(){var b=a.requestAnimationFrame;if($APP.n(b))return b;b=a.webkitRequestAnimationFrame;if($APP.n(b))return b;b=a.mozRequestAnimationFrame;if($APP.n(b))return b;b=a.msRequestAnimationFrame;return $APP.n(b)?b:I8}().bind(a)}():I8;$APP.k=N8.prototype;$APP.k.flush_after_render=function(){var a=this.ef;if(null==a)return null;this.ef=null;return L8(a)};$APP.k.queue_render=function(a){null==this.hf&&(this.hf=[]);return M8(this,this.hf,a)};
|
|
||||||
$APP.k.schedule=function(){function a(){return b.run_queues()}var b=this;if(this.jf)return null;this.jf=!0;return N$.g?N$.g(a):N$.call(null,a)};$APP.k.flush_before_flush=function(){var a=this.ff;if(null==a)return null;this.ff=null;return L8(a)};$APP.k.flush_queues=function(){this.flush_before_flush();K8();this.flush_render();return this.flush_after_render()};$APP.k.run_queues=function(){this.jf=!1;return this.flush_queues()};
|
|
||||||
$APP.k.add_before_flush=function(a){null==this.ff&&(this.ff=[]);return M8(this,this.ff,a)};$APP.k.add_after_render=function(a){null==this.ef&&(this.ef=[]);return M8(this,this.ef,a)};$APP.k.flush_render=function(){var a=this.hf;if(null==a)return null;this.hf=null;a:{a.sort(J8);for(var b=a.length,c=0;;)if(c<b){var d=a[c];!0===d.cljsIsDirty&&d.forceUpdate();c+=1}else break a}return null};var O8=new N8;var T8;$APP.nj.g(0);var d9=null;$APP.k=$8.prototype;$APP.k.O=function(a,b,c){return Z8(b,c,"RAtom",new $APP.m(null,1,[$APP.wn,this.jb(null)],null))};$APP.k.T=function(){return this.D};$APP.k.X=function(){return $APP.qa(this)};$APP.k.W=function(a,b){return this===b};$APP.k.ne=function(a,b){a=this.state;this.state=b;null!=this.Bc&&Y8(this,a,b);return b};$APP.k.oe=function(a,b){return this.ne(null,b.g?b.g(this.state):b.call(null,this.state))};
|
|
||||||
$APP.k.pe=function(a,b,c){return this.ne(null,b.h?b.h(this.state,c):b.call(null,this.state,c))};$APP.k.qe=function(a,b,c,d){return this.ne(null,b.i?b.i(this.state,c,d):b.call(null,this.state,c,d))};$APP.k.re=function(a,b,c,d,e){return this.ne(null,$APP.Yb.I(b,this.state,c,d,e))};$APP.k.mf=function(a,b){Y8(this,a,b)};$APP.k.Qd=function(a,b,c){return W8(this,b,c)};$APP.k.Rd=function(a,b){return X8(this,b)};$APP.k.Z=function(a,b){return new $8(this.state,b,this.Fe,this.Bc)};
|
|
||||||
$APP.k.jb=function(){V8(this);return this.state};var p9=function p9(a){switch(arguments.length){case 1:return p9.g(arguments[0]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return p9.j(arguments[0],new $APP.Xb(c.slice(1),0,null))}};p9.g=function(a){return new $8(a,null,null,null)};p9.j=function(a,b){var c=$APP.Ai(b);b=$APP.ce.h(c,$APP.ub);c=$APP.ce.h(c,$APP.oj);return new $8(a,b,c,null)};p9.u=function(a){var b=$APP.r(a);a=$APP.t(a);return this.j(b,a)};
|
|
||||||
p9.o=1;$APP.k=c9.prototype;$APP.k._peek_at=function(){var a=T8;T8=null;try{return this.jb(null)}finally{T8=a}};$APP.k._handle_change=function(a,b,c){return b===c||this.bf?null:null==this.af?(this.bf=!0,null==d9&&(d9=[],!1===O8.jf&&O8.schedule()),d9.push(this)):!0===this.af?this._run(!1):this.af.g?this.af.g(this):this.af.call(null,this)};
|
|
||||||
$APP.k._update_watching=function(a){var b=$APP.qm(a),c=$APP.qm(this.df);this.df=a;a=$APP.z($APP.yY.h(b,c));for(var d=null,e=0,f=0;;)if(f<e){var l=d.S(null,f);$APP.td(l,this,b9);f+=1}else if(a=$APP.z(a))d=a,$APP.yf(d)?(a=$APP.Dd(d),f=$APP.Ed(d),d=a,e=$APP.Je(a),a=f):(a=$APP.r(d),$APP.td(a,this,b9),a=$APP.t(d),d=null,e=0),f=0;else break;b=$APP.z($APP.yY.h(c,b));c=null;for(e=d=0;;)if(e<d)a=c.S(null,e),$APP.ud(a,this),e+=1;else if(b=$APP.z(b))c=b,$APP.yf(c)?(b=$APP.Dd(c),d=$APP.Ed(c),c=b,a=$APP.Je(b),
|
|
||||||
b=d,d=a):(a=$APP.r(c),$APP.ud(a,this),b=$APP.t(c),c=null,d=0),e=0;else return null};$APP.k._queued_run=function(){return this.bf&&null!=this.df?this._run(!0):null};$APP.k._try_capture=function(a){try{return this.lf=null,U8(a,this)}catch(b){return this.lf=this.state=a=b,this.bf=!1}};$APP.k._run=function(a){var b=this.state;a=$APP.n(a)?this._try_capture(this.f):U8(this.f,this);this.vf||(this.state=a,null==this.Bc||$APP.fe.h(b,a)||Y8(this,b,a));return a};
|
|
||||||
$APP.k._set_opts=function(a){var b=$APP.Ai(a);a=$APP.ce.h(b,f9);var c=$APP.ce.h(b,g9),d=$APP.ce.h(b,h9);b=$APP.ce.h(b,y$);null!=a&&(this.af=a);null!=c&&(this.Gf=c);null!=d&&(this.wf=d);return null!=b?this.vf=b:null};$APP.k.O=function(a,b,c){return Z8(b,c,"Reaction",new $APP.m(null,1,[$APP.wn,this.jb(null)],null))};$APP.k.X=function(){return $APP.qa(this)};$APP.k.W=function(a,b){return this===b};
|
|
||||||
$APP.k.rf=function(){var a=this.state,b=this.df;this.af=this.state=this.df=null;this.bf=!0;b=$APP.z($APP.qm(b));for(var c=null,d=0,e=0;;)if(e<d){var f=c.S(null,e);$APP.ud(f,this);e+=1}else if(b=$APP.z(b))c=b,$APP.yf(c)?(b=$APP.Dd(c),e=$APP.Ed(c),c=b,d=$APP.Je(b),b=e):(b=$APP.r(c),$APP.ud(b,this),b=$APP.t(c),c=null,d=0),e=0;else break;null!=this.wf&&this.wf(a);a=this.Kf;if(null==a)return null;b=a.length;for(c=0;;)if(c<b)d=a[c],d.g?d.g(this):d.call(null,this),c+=1;else return null};
|
|
||||||
$APP.k.ne=function(a,b){a=this.state;this.state=b;this.Gf(a,b);Y8(this,a,b);return b};$APP.k.oe=function(a,b){a=this.ne;var c=this._peek_at();b=b.g?b.g(c):b.call(null,c);return a.call(this,null,b)};$APP.k.pe=function(a,b,c){a=this.ne;var d=this._peek_at();b=b.h?b.h(d,c):b.call(null,d,c);return a.call(this,null,b)};$APP.k.qe=function(a,b,c,d){a=this.ne;var e=this._peek_at();b=b.i?b.i(e,c,d):b.call(null,e,c,d);return a.call(this,null,b)};
|
|
||||||
$APP.k.re=function(a,b,c,d,e){return this.ne(null,$APP.Yb.I(b,this._peek_at(),c,d,e))};$APP.k.mf=function(a,b){Y8(this,a,b)};$APP.k.Qd=function(a,b,c){return W8(this,b,c)};$APP.k.Rd=function(a,b){a=$APP.pf(this.Bc);X8(this,b);return!a&&$APP.pf(this.Bc)&&null==this.af?this.rf(null):null};
|
|
||||||
$APP.k.jb=function(){var a=this.lf;if(null!=a)throw a;(a=null==T8)&&(e9.s?e9.s():e9.call(null));a&&null==this.af?this.bf&&(a=this.state,this.state=this.f.s?this.f.s():this.f.call(null),null==this.Bc||$APP.fe.h(a,this.state)||Y8(this,a,this.state)):(V8(this),this.bf&&this._run(!1));return this.state};K8=e9;var k9=i9(null);var y9,j9=new $APP.m(null,1,[y$,!0],null),B9=new $APP.m(null,2,[J$,null,G$,null],null),s9=function(a){var b=$APP.nj.g($APP.Hi);return function(c){var d=$APP.ce.h($APP.Oc(b),c);if(null!=d)return d;d=a.g?a.g(c):a.call(null,c);$APP.qj.B(b,$APP.E,c,d);return d}}(function(a){if("string"===typeof a)return a;a=$APP.Wh(a);a=$APP.cT(a,/(unsafe|UNSAFE)[-_]/,"UNSAFE_");a=$APP.jT.h(a,/-/);var b=$APP.z(a);a=$APP.r(b);b=$APP.t(b);return $APP.Yb.i($APP.q,a,$APP.Yi.h(A8,b))}),G9=new $APP.O(null,5,5,$APP.P,[E$,C$,
|
|
||||||
s$,t$,H$],null);var O9=new $APP.lm(null,new $APP.m(null,6,["url",null,"tel",null,"text",null,"textarea",null,"password",null,"search",null],null),null),h$=new $APP.m(null,4,[u$,"ReagentInput",I$,P9,q$,function(a){return a.nf=null},b$,function(a,b,c,d,e){S9(c);return S8(e,a,b,c,d)}],null);var O$={},g8,l$=/([^\s\.#]+)(?:#([^\s\.#]+))?(?:\.([^\s#]+))?/,U9={"class":"className","for":"htmlFor",charset:"charSet"},X9={},k$={},R$=function(a){var b=$APP.Cn.s(),c=$APP.n(z$.g(a))?e$:c$;if("undefined"===typeof K$||"undefined"===typeof L$||"undefined"===typeof O$||"undefined"===typeof g8)g8=function(d,e,f,l){this.Hf=d;this.id=e;this.uf=f;this.Ff=l;this.C=393216;this.J=0},g8.prototype.Z=function(d,e){return new g8(this.Hf,this.id,this.uf,e)},g8.prototype.T=function(){return this.Ff},g8.prototype.If=
|
|
||||||
function(){return this.id},g8.prototype.xf=function(d,e){return"object"!==$APP.pa(e)?e:$APP.xf(e)?m$(e,this,this.uf):$APP.Ff(e)?j$(e,this):E8(e)?$APP.Wh(e):(null!=e?e.C&2147483648||$APP.Ua===e.ba||(e.C?0:$APP.Pb($APP.qd,e)):$APP.Pb($APP.qd,e))?$APP.on.j($APP.Pe([e])):e},g8.prototype.yf=function(d,e,f,l,g){return $9(this,e,f,l,g)},g8.Td=!0,g8.$c="reagent.impl.template/t_reagent$impl$template35072",g8.ue=function(d){return $APP.od(d,"reagent.impl.template/t_reagent$impl$template35072")};return new g8(a,
|
|
||||||
b,c,$APP.Hi)}($APP.Hi);var S$=function S$(a){switch(arguments.length){case 1:return S$.g(arguments[0]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return S$.j(arguments[0],new $APP.Xb(c.slice(1),0,null))}};S$.g=function(a){return p9.g(a)};S$.j=function(a,b){return $APP.Yb.i(p9,a,b)};S$.u=function(a){var b=$APP.r(a);a=$APP.t(a);return this.j(b,a)};S$.o=1;var f8=z8(1,{});var o$=$APP.nj.g($APP.Hi),T$=function T$(a){switch(arguments.length){case 2:return T$.h(arguments[0],arguments[1]);case 3:return T$.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.q.g(arguments.length)].join(""));}};T$.h=function(a,b){return T$.i(a,b,R$)};
|
|
||||||
T$.i=function(a,b,c){e9();c=$APP.jf(c)?new $APP.O(null,2,5,$APP.P,[R$,c],null):new $APP.O(null,2,5,$APP.P,[c,B$.g(c)],null);var d=$APP.B.i(c,0,null);c=$APP.B.i(c,1,null);return p$(function(){return R8(d,$APP.jf(a)?a.s?a.s():a.call(null):a)},b,c)};T$.o=3;var U$=$APP.gU(x$,null),V$=new $APP.m(null,1,[$APP.YI,function(){var a=new $APP.de(function(){return S$},F$,$APP.Hl([$APP.U,$APP.T,$APP.xM,$APP.Tq,$APP.By,$APP.oF,$APP.Xp,$APP.dH,$APP.V,$APP.S,$APP.WN],[x$,$APP.YI,"reagent/core.cljs",11,new $APP.m(null,6,[$APP.aO,!0,$APP.Cs,1,$APP.Mt,1,$APP.hu,new $APP.O(null,1,5,$APP.P,[new $APP.O(null,1,5,$APP.P,[$APP.ct],null)],null),$APP.V,$APP.I(new $APP.O(null,1,5,$APP.P,[$APP.ct],null),new $APP.O(null,3,5,$APP.P,[$APP.ct,$APP.Wo,$APP.xL],null)),$APP.tC,$APP.I(null,
|
|
||||||
null)],null),1,211,211,$APP.I(new $APP.O(null,1,5,$APP.P,[$APP.ct],null),new $APP.O(null,3,5,$APP.P,[$APP.ct,$APP.Wo,$APP.xL],null)),"Like clojure.core/atom, except that it keeps track of derefs.\n Reagent components that derefs one of these are automatically\n re-rendered.",$APP.n(S$)?S$.m:null])),b=$APP.Oc(a);a=$APP.F(a);var c=U$.l(null),d=$APP.T.g(a);$APP.y.h($APP.q.g(c),$APP.q.g(d));c=new $APP.m(null,4,[$APP.U,U$,$APP.T,d,$APP.V,$APP.V.g(a),$APP.S,$APP.S.g(a)],null);return $APP.n($APP.yQ.g(a))?
|
|
||||||
$APP.nX(d,b,c):$APP.n($APP.hq.g(a))?$APP.k8(d,b,c):new $APP.BU(b,d,c)}()],null),W$=$APP.gU(A$,null),X$=new $APP.m(null,1,[D$,function(){var a=new $APP.de(function(){return T$},v$,$APP.Hl([$APP.U,$APP.T,$APP.xM,$APP.Tq,$APP.By,$APP.oF,$APP.Xp,$APP.dH,$APP.V,$APP.S,$APP.WN],[A$,D$,"reagent/dom.cljs",13,new $APP.m(null,6,[$APP.aO,!1,$APP.Cs,3,$APP.Mt,3,$APP.hu,new $APP.O(null,2,5,$APP.P,[new $APP.O(null,2,5,$APP.P,[$APP.wQ,r$],null),new $APP.O(null,3,5,$APP.P,[$APP.wQ,r$,w$],null)],null),$APP.V,$APP.I(new $APP.O(null,
|
|
||||||
2,5,$APP.P,[$APP.wQ,r$],null),new $APP.O(null,3,5,$APP.P,[$APP.wQ,r$,w$],null)),$APP.tC,$APP.I(null,null)],null),1,29,29,$APP.I(new $APP.O(null,2,5,$APP.P,[$APP.wQ,r$],null),new $APP.O(null,3,5,$APP.P,[$APP.wQ,r$,w$],null)),"Render a Reagent component into the DOM. The first argument may be\n either a vector (using Reagent's Hiccup syntax), or a React element.\n The second argument should be a DOM node.\n\n Optionally takes a callback that is called when the component is in place.\n\n Returns the mounted component instance.",
|
|
||||||
$APP.n(T$)?T$.m:null])),b=$APP.Oc(a);a=$APP.F(a);var c=W$.l(null),d=$APP.T.g(a);$APP.y.h($APP.q.g(c),$APP.q.g(d));c=new $APP.m(null,4,[$APP.U,W$,$APP.T,d,$APP.V,$APP.V.g(a),$APP.S,$APP.S.g(a)],null);return $APP.n($APP.yQ.g(a))?$APP.nX(d,b,c):$APP.n($APP.hq.g(a))?$APP.k8(d,b,c):new $APP.BU(b,d,c)}()],null);
|
|
||||||
$APP.qj.i($APP.H7,function(a,b){var c=$APP.Ai(b);b=$APP.ce.h(c,$APP.MA);var d=$APP.ce.h(c,$APP.Cr),e=$APP.ce.h(c,$APP.lH),f=$APP.ce.h(c,$APP.GG),l=$APP.ce.h(c,$APP.LJ),g=$APP.ce.h(c,$APP.PJ),p=$APP.ce.h(c,$APP.GE),w=$APP.ce.h(c,$APP.iH),A=$APP.ce.h(c,$APP.jC),D=$APP.ce.h(c,$APP.ls),G=$APP.ce.h(c,$APP.Iu),J=$APP.ce.h(c,$APP.Lt),R=$APP.ce.h(c,$APP.AP);c=$APP.WC.g(a);$APP.AQ(c,e,G,d,p,A);d=$APP.em.j($APP.Pe([$APP.CK.g(a),R]));e=$APP.jX(d);p=$APP.E.j;A=$APP.RP.g(a);return p.call($APP.E,new $APP.m(null,
|
|
||||||
5,[$APP.lH,$APP.Hi,$APP.WC,c,$APP.MA,b,$APP.GG,f,$APP.RP,$APP.n(A)?A:$APP.n(w)?w:J],null),$APP.iH,$APP.n(w)?$APP.A7($APP.iH.g(a),$APP.Pe([w])):null,$APP.Pe([$APP.Lt,$APP.n(J)?$APP.A7($APP.Lt.g(a),$APP.Pe([J])):null,$APP.ls,D,$APP.LJ,l,$APP.PJ,g,$APP.zA,$APP.zA.g(e),$APP.CK,d,$APP.QO,$APP.QO.g(e)]))},new $APP.m(null,1,[$APP.Cr,new $APP.m(null,2,[x$,V$,A$,X$],null)],null));
|
|
||||||
}).call(this);
|
|
2170
js/sci-script-tag.js
2170
js/sci-script-tag.js
File diff suppressed because it is too large
Load diff
1847
js/sci_script_tag.js
1847
js/sci_script_tag.js
File diff suppressed because it is too large
Load diff
|
@ -1,183 +0,0 @@
|
||||||
(function(){
|
|
||||||
'use strict';var vZ=function(a,b){return $APP.aa[a]=b},wZ=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},xZ=function(a,b){b&=63;if(0==b)return a;var c=a.ia;return 32>b?$APP.Pa(a.Sa>>>b|c<<32-b,c>>>b):32==b?$APP.Pa(c,0):$APP.Pa(c>>>b-32,0)},yZ=function(a,b,c){return a.call.apply(a.bind,arguments)},zZ=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,
|
|
||||||
d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}},AZ=function(a,b,c){AZ=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?yZ:zZ;return AZ.apply(null,arguments)},BZ=function(a,b){function c(){}c.prototype=b.prototype;a.ie=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.oe=function(d,e,f){for(var g=Array(arguments.length-2),l=2;l<arguments.length;l++)g[l-2]=arguments[l];return b.prototype[e].apply(d,g)}},CZ=function(a,b,c){return Object.prototype.hasOwnProperty.call(a,
|
|
||||||
b)?a[b]:a[b]=c(b)},EZ=function(a){a:{var b=DZ;for(var c=a.length,d="string"===typeof a?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:"string"===typeof a?a.charAt(b):a[b]},FZ=function(a,b){const c={};for(const d in a)c[d]=b.call(void 0,a[d],d,a);return c},GZ=function(a,b){return a<b?-1:a>b?1:0},HZ=function(a){return-1!=$APP.zA.indexOf(a)},IZ=function(a,b,c){a=a.split(b);for(var d=[];0<c&&a.length;)d.push(a.shift()),c--;a.length&&d.push(a.join(b));return d},
|
|
||||||
JZ=function(a){if(a.Ud&&"function"==typeof a.Ud)return a.Ud();if("string"===typeof a)return a.split("");if($APP.qa(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}b=[];c=0;for(d in a)b[c++]=a[d];return b},KZ=function(a,b){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,void 0);else if($APP.qa(a)||"string"===typeof a)$APP.xA(a,b,void 0);else{if(a.Rb&&"function"==typeof a.Rb)var c=a.Rb();else if(a.Ud&&"function"==typeof a.Ud)c=void 0;else if($APP.qa(a)||"string"===typeof a){c=[];
|
|
||||||
for(var d=a.length,e=0;e<d;e++)c.push(e)}else c=$APP.kb(a);d=JZ(a);e=d.length;for(var f=0;f<e;f++)b.call(void 0,d[f],c&&c[f],a)}},LZ=function(){},MZ=function(a){if(a instanceof LZ)return a;if("function"==typeof a.Me)return a.Me(!1);if($APP.qa(a)){var b=0,c=new LZ;c.next=function(){for(;;){if(b>=a.length)throw $APP.CA;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},NZ=function(a,b,c){if($APP.qa(a))try{$APP.xA(a,b,c)}catch(d){if(d!==$APP.CA)throw d;}else{a=MZ(a);try{for(;;)b.call(c,
|
|
||||||
a.next(),void 0,a)}catch(d){if(d!==$APP.CA)throw d;}}},OZ=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},PZ=function(a,b){this.fc={};this.sb=[];this.me=this.vc=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)},QZ=function(a){if(a.vc!=a.sb.length){for(var b=0,c=0;b<a.sb.length;){var d=a.sb[b];OZ(a.fc,d)&&(a.sb[c++]=d);b++}a.sb.length=c}if(a.vc!=a.sb.length){var e={};for(c=
|
|
||||||
b=0;b<a.sb.length;)d=a.sb[b],OZ(e,d)||(a.sb[c++]=d,e[d]=1),b++;a.sb.length=c}},RZ=function(a){if(null!=a&&null!=a.aa)a=a.aa(a);else{var b=RZ[$APP.na(null==a?null:a)];if(null!=b)a=b.h?b.h(a):b.call(null,a);else if(b=RZ._,null!=b)a=b.h?b.h(a):b.call(null,a);else throw $APP.Nb("ICloneable.-clone",a);}return a},SZ=function(a,b){if("-"==a.charAt(0))return $APP.Ua(SZ(a.substring(1),b));var c=parseInt(a,b||10);if(9007199254740991>=c)return new $APP.Oa(c%4294967296|0,c/4294967296|0);if(0==a.length)throw Error("number format error: empty string");
|
|
||||||
if(0<=a.indexOf("-"))throw Error('number format error: interior "-" character: '+a);b=b||10;if(2>b||36<b)throw Error("radix out of range: "+b);c=$APP.Ya(Math.pow(b,8));for(var d=$APP.Wa,e=0;e<a.length;e+=8){var f=Math.min(8,a.length-e),g=parseInt(a.substring(e,e+f),b);8>f?(f=$APP.Ya(Math.pow(b,f)),d=d.multiply(f).add($APP.Ya(g))):(d=d.multiply(c),d=d.add($APP.Ya(g)))}return d},TZ=function(a,b,c){if(null!=a&&null!=a.Oe)a=a.Oe(a,b,c);else{var d=TZ[$APP.na(null==a?null:a)];if(null!=d)a=d.j?d.j(a,b,c):
|
|
||||||
d.call(null,a,b,c);else if(d=TZ._,null!=d)a=d.j?d.j(a,b,c):d.call(null,a,b,c);else throw $APP.Nb("AjaxImpl.-js-ajax-request",a);}return a},UZ=function(a){if(null!=a&&null!=a.Se)a=a.Se(a);else{var b=UZ[$APP.na(null==a?null:a)];if(null!=b)a=b.h?b.h(a):b.call(null,a);else if(b=UZ._,null!=b)a=b.h?b.h(a):b.call(null,a);else throw $APP.Nb("AjaxResponse.-status",a);}return a},VZ=function(a){if(null!=a&&null!=a.Te)a=a.Te(a);else{var b=VZ[$APP.na(null==a?null:a)];if(null!=b)a=b.h?b.h(a):b.call(null,a);else if(b=
|
|
||||||
VZ._,null!=b)a=b.h?b.h(a):b.call(null,a);else throw $APP.Nb("AjaxResponse.-status-text",a);}return a},WZ=function(a){if(null!=a&&null!=a.Qe)a=a.Qe(a);else{var b=WZ[$APP.na(null==a?null:a)];if(null!=b)a=b.h?b.h(a):b.call(null,a);else if(b=WZ._,null!=b)a=b.h?b.h(a):b.call(null,a);else throw $APP.Nb("AjaxResponse.-get-all-headers",a);}return a},XZ=function(a){if(null!=a&&null!=a.Pe)a=a.Pe(a);else{var b=XZ[$APP.na(null==a?null:a)];if(null!=b)a=b.h?b.h(a):b.call(null,a);else if(b=XZ._,null!=b)a=b.h?b.h(a):
|
|
||||||
b.call(null,a);else throw $APP.Nb("AjaxResponse.-body",a);}return a},YZ=function(a){if(null!=a&&null!=a.Re)a=a.Re(a,"Content-Type");else{var b=YZ[$APP.na(null==a?null:a)];if(null!=b)a=b.g?b.g(a,"Content-Type"):b.call(null,a,"Content-Type");else if(b=YZ._,null!=b)a=b.g?b.g(a,"Content-Type"):b.call(null,a,"Content-Type");else throw $APP.Nb("AjaxResponse.-get-response-header",a);}return a},ZZ=function(a){if(null!=a&&null!=a.Ue)a=a.Ue(a);else{var b=ZZ[$APP.na(null==a?null:a)];if(null!=b)a=b.h?b.h(a):
|
|
||||||
b.call(null,a);else if(b=ZZ._,null!=b)a=b.h?b.h(a):b.call(null,a);else throw $APP.Nb("AjaxResponse.-was-aborted",a);}return a},$Z=function(a,b){if(null!=a&&null!=a.Cd)a=a.Cd(a,b);else{var c=$Z[$APP.na(null==a?null:a)];if(null!=c)a=c.g?c.g(a,b):c.call(null,a,b);else if(c=$Z._,null!=c)a=c.g?c.g(a,b):c.call(null,a,b);else throw $APP.Nb("Interceptor.-process-request",a);}return a},a_=function(a,b){if(null!=a&&null!=a.Dd)a=a.Dd(a,b);else{var c=a_[$APP.na(null==a?null:a)];if(null!=c)a=c.g?c.g(a,b):c.call(null,
|
|
||||||
a,b);else if(c=a_._,null!=c)a=c.g?c.g(a,b):c.call(null,a,b);else throw $APP.Nb("Interceptor.-process-response",a);}return a},b_=function(a){throw Error($APP.q.h(a));},c_=function(a){a=YZ(a);return $APP.p(a)?a:""},d_=function(a){return a instanceof $APP.S?$APP.Xi(a):a},f_=function(a){var b=$APP.M.j(a,0,null);a=$APP.M.j(a,1,null);return[$APP.q.h(d_(b)),"\x3d",$APP.q.h(e_.h?e_.h(a):e_.call(null,a))].join("")},g_=function(a,b,c){return new $APP.T(null,2,5,$APP.V,[a.h?a.h(b):a.call(null,b),c],null)},i_=
|
|
||||||
function(a){var b=function(){var c=$APP.p(a)?a:h_;c=c instanceof $APP.S?c.na:null;switch(c){case "java":return function(){return null};case "rails":return function(){return""};case "indexed":return $APP.kf;default:throw Error(["No matching clause: ",$APP.q.h(c)].join(""));}}();return $APP.Hq.g(g_,b)},k_=function(a,b){return $APP.Sp.g("\x26",$APP.vj.g(f_,j_(i_(a),null,new $APP.T(null,2,5,$APP.V,[null,b],null))))},o_=function(a){a=$APP.dg(a);a=$APP.Q.g(a,l_);return new $APP.vb(null,2,[m_,$APP.Hq.g(k_,
|
|
||||||
a),n_,"application/x-www-form-urlencoded; charset\x3dutf-8"],null)},p_=function(){return Math.round(15*Math.random()).toString(16)},q_=function(a,b){if(3<a.length){if(b)return!0;b=a.charAt(1);return"~"===a.charAt(0)?":"===b||"$"===b||"#"===b:!1}return!1},r_=function(a){var b=Math.floor(a/44);a=String.fromCharCode(a%44+48);return 0===b?"^"+a:"^"+String.fromCharCode(b+48)+a},s_=function(){this.Zg=this.Td=this.bb=0;this.cache={}},t_=function(){this.bb=0;this.cache=[]},v_=function(a,b){if(null==a)return null==
|
|
||||||
b;if(a===b)return!0;if("object"===typeof a){if(u_(a)){if(u_(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!v_(a[c],b[c]))return!1;return!0}return!1}if(a.Qb)return a.Qb(b);if(null!=b&&"object"===typeof b){if(b.Qb)return b.Qb(a);c=0;var d=w_(b).length,e;for(e in a)if(a.hasOwnProperty(e)&&(c++,!b.hasOwnProperty(e)||!v_(a[e],b[e])))return!1;return c===d}}return!1},x_=function(a,b){return a^b+2654435769+(a<<6)+(a>>2)},z_=function(a){var b=0;if(null!=a.forEach)a.forEach(function(g,l){b=(b+(y_(l)^
|
|
||||||
y_(g)))%4503599627370496});else for(var c=w_(a),d=0;d<c.length;d++){var e=c[d],f=a[e];b=(b+(y_(e)^y_(f)))%4503599627370496}return b},A_=function(a){var b=0;if(u_(a))for(var c=0;c<a.length;c++)b=x_(b,y_(a[c]));else a.forEach&&a.forEach(function(d){b=x_(b,y_(d))});return b},y_=function(a){if(null==a)return 0;switch(typeof a){case "number":return a;case "boolean":return!0===a?1:0;case "string":var b=B_[a];if(null!=b)a=b;else{for(var c=b=0;c<a.length;++c)b=31*b+a.charCodeAt(c),b%=4294967296;C_++;256<=
|
|
||||||
C_&&(B_={},C_=1);a=B_[a]=b}return a;case "function":return b=a.transit$hashCode$,b||(b=D_,"undefined"!=typeof Object.defineProperty?Object.defineProperty(a,"transit$hashCode$",{value:b,enumerable:!1}):a.transit$hashCode$=b,D_++),b;default:return a instanceof Date?a.valueOf():u_(a)?A_(a):a.$b?a.$b():z_(a)}},E_=function(a,b){this.tag=a;this.rep=b;this.Ia=-1},F_=function(a,b){return new E_(a,b)},G_=function(a){this.kb=a;this.Ia=-1},H_=function(a){this.kb=a;this.Ia=-1},I_=function(a,b,c){var d="";c=c||
|
|
||||||
b+1;for(var e=8*(7-b),f=(new $APP.Oa(255,0)).shiftLeft(e);b<c;b++,e-=8,f=xZ(f,8)){var g=xZ(a.and(f),e).toString(16);1==g.length&&(g="0"+g);d+=g}return d},J_=function(a,b){this.high=a;this.low=b;this.Ia=-1},K_=function(a,b){this.entries=a;this.type=b||0;this.bb=0},L_=function(a,b){this.map=a;this.type=b||0;this.keys=this.map.Rb();this.bb=0;this.Vc=null;this.Lc=0},O_=function(a,b){if(a instanceof M_&&(b instanceof N_||b instanceof M_)){if(a.size!==b.size)return!1;for(var c in a.map)for(var d=a.map[c],
|
|
||||||
e=0;e<d.length;e+=2)if(!v_(d[e+1],b.get(d[e])))return!1;return!0}if(a instanceof N_&&(b instanceof N_||b instanceof M_)){if(a.size!==b.size)return!1;a=a.Fa;for(e=0;e<a.length;e+=2)if(!v_(a[e+1],b.get(a[e])))return!1;return!0}if(null!=b&&"object"===typeof b&&(e=w_(b),c=e.length,a.size===c)){for(d=0;d<c;d++){var f=e[d];if(!a.has(f)||!v_(b[f],a.get(f)))return!1}return!0}return!1},P_=function(a){return null==a?"null":"array"===$APP.na(a)?"["+a.toString()+"]":"string"===$APP.na(a)?'"'+a+'"':a.toString()},
|
|
||||||
Q_=function(a){var b=0,c="TransitMap {";a.forEach(function(d,e){c+=P_(e)+" \x3d\x3e "+P_(d);b<a.size-1&&(c+=", ");b++});return c+"}"},R_=function(a){var b=0,c="TransitSet {";a.forEach(function(d){c+=P_(d);b<a.size-1&&(c+=", ");b++});return c+"}"},N_=function(a){this.Fa=a;this.Da=null;this.Ia=-1;this.size=a.length/2;this.Wf=0},T_=function(a){if(a.Da)throw Error("Invalid operation, already converted");if(8>a.size)return!1;a.Wf++;return 32<a.Wf?(a.Da=S_(a.Fa,!1,!0),a.Fa=[],!0):!1},M_=function(a,b,c){this.map=
|
|
||||||
b||{};this.jd=a||[];this.size=c||0;this.Ia=-1},S_=function(a,b,c){a=a||[];b=!1===b?b:!0;if((!0!==c||!c)&&64>=a.length){if(b){var d=a;a=[];for(b=0;b<d.length;b+=2){var e=!1;for(c=0;c<a.length;c+=2)if(v_(a[c],d[b])){a[c+1]=d[b+1];e=!0;break}e||(a.push(d[b]),a.push(d[b+1]))}}return new N_(a)}d={};e=[];var f=0;for(b=0;b<a.length;b+=2){c=y_(a[b]);var g=d[c];if(null==g)e.push(c),d[c]=[a[b],a[b+1]],f++;else{var l=!0;for(c=0;c<g.length;c+=2)if(v_(g[c],a[b])){g[c+1]=a[b+1];l=!1;break}l&&(g.push(a[b]),g.push(a[b+
|
|
||||||
1]),f++)}}return new M_(e,d,f)},U_=function(a){this.map=a;this.size=a.size},V_=function(a){a=a||[];for(var b={},c=[],d=0,e=0;e<a.length;e++){var f=y_(a[e]),g=b[f];if(null==g)c.push(f),b[f]=[a[e],a[e]],d++;else{f=!0;for(var l=0;l<g.length;l+=2)if(v_(g[l],a[e])){f=!1;break}f&&(g.push(a[e]),g.push(a[e]),d++)}}return new U_(new M_(c,b,d))},W_=function(a){this.Bb=a},X_=function(a){this.options=a||{};this.pb={};for(var b in this.Md.pb)this.pb[b]=this.Md.pb[b];for(b in this.options.handlers){a:{switch(b){case "_":case "s":case "?":case "i":case "d":case "b":case "'":case "array":case "map":a=
|
|
||||||
!0;break a}a=!1}if(a)throw Error('Cannot override handler for ground type "'+b+'"');this.pb[b]=this.options.handlers[b]}this.Ce=null!=this.options.preferStrings?this.options.preferStrings:this.Md.Ce;this.Kf=null!=this.options.preferBuffers?this.options.preferBuffers:this.Md.Kf;this.zf=this.options.defaultHandler||this.Md.zf;this.Sb=this.options.mapBuilder;this.kd=this.options.arrayBuilder},Y_=function(a,b,c,d,e){if(e){var f=[];for(e=0;e<b.length;e++)f.push(a.decode(b[e],c,d,!1));return f}f=c&&c.bb;
|
|
||||||
if(2===b.length&&"string"===typeof b[0]&&(e=a.decode(b[0],c,!1,!1))&&e instanceof W_)return b=b[1],f=a.pb[e.Bb],null!=f?f=f(a.decode(b,c,d,!0),a):F_(e.Bb,a.decode(b,c,d,!1));c&&f!=c.bb&&(c.bb=f);if(a.kd){if(32>=b.length&&a.kd.fromArray){f=[];for(e=0;e<b.length;e++)f.push(a.decode(b[e],c,d,!1));return a.kd.fromArray(f,b)}f=a.kd.init(b);for(e=0;e<b.length;e++)f=a.kd.add(f,a.decode(b[e],c,d,!1),b);return a.kd.finalize(f,b)}f=[];for(e=0;e<b.length;e++)f.push(a.decode(b[e],c,d,!1));return f},Z_=function(a,
|
|
||||||
b){if("~"===b.charAt(0)){var c=b.charAt(1);if("~"===c||"^"===c||"`"===c)return b.substring(1);if("#"===c)return new W_(b.substring(2));var d=a.pb[c];return null==d?a.zf(c,b.substring(2)):d(b.substring(2),a)}return b},$_=function(a){this.qh=new X_(a)},a0=function(a,b){this.Lh=a;this.options=b||{};this.cache=this.options.cache?this.options.cache:new t_},d0=function(a){if(null==a)return"null";if(a===String)return"string";if(a===Boolean)return"boolean";if(a===Number)return"number";if(a===Array)return"array";
|
|
||||||
if(a===Object)return"map";var b=a[b0];null==b&&("undefined"!=typeof Object.defineProperty?(b=++c0,Object.defineProperty(a,b0,{value:b,enumerable:!1})):a[b0]=b=++c0);return b},e0=function(a,b){a=a.toString();for(var c=a.length;c<b;c++)a="0"+a;return a},f0=function(){},g0=function(){},h0=function(){},i0=function(){},j0=function(){},k0=function(){},l0=function(){},m0=function(){},n0=function(){},o0=function(){},p0=function(){},q0=function(){},r0=function(){},s0=function(){},t0=function(){},u0=function(){},
|
|
||||||
v0=function(){},w0=function(){},x0=function(){this.pb={};this.set(null,new f0);this.set(String,new g0);this.set(Number,new h0);this.set($APP.Oa,new i0);this.set(Boolean,new j0);this.set(Array,new k0);this.set(Object,new l0);this.set(Date,new n0);this.set(J_,new o0);this.set(G_,new p0);this.set(H_,new q0);this.set(E_,new r0);this.set(U_,new s0);this.set(N_,new t0);this.set(M_,new u0);"undefined"!=typeof $APP.ca.Le&&this.set($APP.ca.Le,new v0);"undefined"!=typeof Uint8Array&&this.set(Uint8Array,new w0)},
|
|
||||||
y0=function(a){this.kc=a||{};this.Ce=null!=this.kc.preferStrings?this.kc.preferStrings:!0;this.Bg=this.kc.objectBuilder||null;this.transform=this.kc.transform||null;this.pb=new x0;if(a=this.kc.handlers){if(u_(a)||!a.forEach)throw Error('transit writer "handlers" option must be a map');var b=this;a.forEach(function(c,d){if(void 0!==d)b.pb.set(d,c);else throw Error("Cannot create handler for JavaScript undefined");})}this.Vd=this.kc.handlerForForeign;this.Ge=this.kc.unpack||function(c){return c instanceof
|
|
||||||
N_&&null===c.Da?c.Fa:!1};this.le=this.kc&&this.kc.verbose||!1},z0=function(a,b,c,d,e){a=a+b+c;return e?e.write(a,d):a},B0=function(a,b,c){var d=[];if(u_(b))for(var e=0;e<b.length;e++)d.push(A0(a,b[e],!1,c));else b.forEach(function(f){d.push(A0(a,f,!1,c))});return d},C0=function(a,b){return"string"!==typeof b?(a=a.Rc(b))&&1===a.tag(b).length:!0},D0=function(a,b){var c=a.Ge(b),d=!0;if(c){for(b=0;b<c.length&&(d=C0(a,c[b]),d);b+=2);return d}if(b.keys){c=b.keys();var e=null;if(c.next){for(e=c.next();!e.done;){d=
|
|
||||||
C0(a,e.value);if(!d)break;e=c.next()}return d}}if(b.forEach)return b.forEach(function(f,g){d=d&&C0(a,g)}),d;throw Error("Cannot walk keys of object type "+(null==b?null:b.constructor).name);},E0=function(a){if(a.constructor.transit$isObject)return!0;var b=a.constructor.toString();b=b.substr(9);b=b.substr(0,b.indexOf("("));b="Object"==b;"undefined"!=typeof Object.defineProperty?Object.defineProperty(a.constructor,"transit$isObject",{value:b,enumerable:!1}):a.constructor.transit$isObject=b;return b},
|
|
||||||
F0=function(a,b,c){var d=null,e=null,f=null;d=null;var g=0;if(b.constructor===Object||null!=b.forEach||a.Vd&&E0(b)){if(a.le){if(null!=b.forEach)if(D0(a,b)){var l={};b.forEach(function(n,k){l[A0(a,k,!0,!1)]=A0(a,n,!1,c)})}else{d=a.Ge(b);e=[];f=z0("~#","cmap","",!0,c);if(d)for(;g<d.length;g+=2)e.push(A0(a,d[g],!1,!1)),e.push(A0(a,d[g+1],!1,c));else b.forEach(function(n,k){e.push(A0(a,k,!1,!1));e.push(A0(a,n,!1,c))});l={};l[f]=e}else for(d=w_(b),l={};g<d.length;g++)l[A0(a,d[g],!0,!1)]=A0(a,b[d[g]],!1,
|
|
||||||
c);return l}if(null!=b.forEach){if(D0(a,b)){d=a.Ge(b);l=["^ "];if(d)for(;g<d.length;g+=2)l.push(A0(a,d[g],!0,c)),l.push(A0(a,d[g+1],!1,c));else b.forEach(function(n,k){l.push(A0(a,k,!0,c));l.push(A0(a,n,!1,c))});return l}d=a.Ge(b);e=[];f=z0("~#","cmap","",!0,c);if(d)for(;g<d.length;g+=2)e.push(A0(a,d[g],!1,c)),e.push(A0(a,d[g+1],!1,c));else b.forEach(function(n,k){e.push(A0(a,k,!1,c));e.push(A0(a,n,!1,c))});return[f,e]}l=["^ "];for(d=w_(b);g<d.length;g++)l.push(A0(a,d[g],!0,c)),l.push(A0(a,b[d[g]],
|
|
||||||
!1,c));return l}if(null!=a.Bg)return a.Bg(b,function(n){return A0(a,n,!0,c)},function(n){return A0(a,n,!1,c)});g=(null==b?null:b.constructor).name;d=Error("Cannot write "+g);d.data={If:b,type:g};throw d;},A0=function(a,b,c,d){null!==a.transform&&(b=a.transform(b));var e=a.Rc(b)||(a.Vd?a.Vd(b,a.pb):null),f=e?e.tag(b):null,g=e?e.rep(b):null;if(null!=e&&null!=f)switch(f){case "_":return c?z0("~","_","",c,d):null;case "s":return 0<g.length?(a=g.charAt(0),a="~"===a||"^"===a||"`"===a?"~"+g:g):a=g,z0("",
|
|
||||||
"",a,c,d);case "?":return c?z0("~","?",g.toString()[0],c,d):g;case "i":return Infinity===g?z0("~","z","INF",c,d):-Infinity===g?z0("~","z","-INF",c,d):isNaN(g)?z0("~","z","NaN",c,d):c||"string"===typeof g||g instanceof $APP.Oa?z0("~","i",g.toString(),c,d):g;case "d":return c?z0(g.Nh,"d",g,c,d):g;case "b":return z0("~","b",g,c,d);case "'":return a.le?(c={},b=z0("~#","'","",!0,d),c[b]=A0(a,g,!1,d),d=c):d=[z0("~#","'","",!0,d),A0(a,g,!1,d)],d;case "array":return B0(a,g,d);case "map":return F0(a,g,d);
|
|
||||||
default:a:{if(1===f.length){if("string"===typeof g){d=z0("~",f,g,c,d);break a}if(c||a.Ce){(a=a.le&&e.getVerboseHandler())?(f=a.tag(b),g=a.stringRep(b,a)):g=e.stringRep(b,e);if(null!==g){d=z0("~",f,g,c,d);break a}d=Error('Tag "'+f+'" cannot be encoded as string');d.data={tag:f,rep:g,If:b};throw d;}}c=f;b=g;a.le?(e={},e[z0("~#",c,"",!0,d)]=A0(a,b,!1,d),d=e):d=[z0("~#",c,"",!0,d),A0(a,b,!1,d)]}return d}else throw d=(null==b?null:b.constructor).name,a=Error("Cannot write "+d),a.data={If:b,type:d},a;},
|
|
||||||
G0=function(a,b){this.Ad=a;this.options=b||{};this.cache=!1===this.options.cache?null:this.options.cache?this.options.cache:new s_},H0=function(a,b){if("json"===a||"json-verbose"===a||null==a)return a=new $_(b),new a0(a,b);throw Error("Cannot create reader of type "+a);},I0=function(a,b){if("json"===a||"json-verbose"===a||null==a)return"json-verbose"===a&&(null==b&&(b={}),b.verbose=!0),a=new y0(b),new G0(a,b);b=Error('Type must be "json"');b.data={type:a};throw b;},J0=function(a,b){for(var c=$APP.z($APP.kb(b)),
|
|
||||||
d=null,e=0,f=0;;)if(f<e){var g=d.U(null,f);a[g]=b[g];f+=1}else if(c=$APP.z(c))d=c,$APP.Ke(d)?(c=$APP.jd(d),f=$APP.kd(d),d=c,e=$APP.he(c),c=f):(c=$APP.A(d),a[c]=b[c],c=$APP.G(d),d=null,e=0),f=0;else break;return a},K0=function(){},L0=function(){},O0=function(a){return H0($APP.Xi(M0),J0({handlers:$APP.ho($APP.Zl.l($APP.N([new $APP.vb(null,6,["$",function(b){return $APP.Gj.h(b)},":",function(b){return $APP.wj.h(b)},"set",function(b){return $APP.$o.g($APP.Ri,b)},"list",function(b){return $APP.$o.g($APP.Nd,
|
|
||||||
b.reverse())},"cmap",function(b){for(var c=0,d=$APP.bd($APP.ig);;)if(c<b.length){var e=c+2;d=$APP.Oh.j(d,b[c],b[c+1]);c=e}else return $APP.dd(d)},"with-meta",function(b){return $APP.xe(b[0],b[1])}],null),$APP.$l.g(N0.h(a),$APP.Fo)]))),defaultHandler:$APP.Fo.h(N0.h(a)),mapBuilder:new K0,arrayBuilder:new L0,prefersStrings:!1},$APP.ho($APP.$l.g(a,N0))))},P0=function(){},Q0=function(){},R0=function(){},S0=function(){},T0=function(){},U0=function(){},V0=function(){},W0=function(a,b){this.value=a;this.F=
|
|
||||||
b},X0=function(){},Y0=function(a,b){var c=new R0,d=new S0,e=new T0,f=new U0,g=$APP.Zl.l($APP.N([$APP.ri([$APP.qi,$APP.yf,$APP.vb,$APP.hi,$APP.Ah,$APP.Kd,$APP.S,$APP.uf,$APP.Hf,$APP.rh,$APP.zh,$APP.li,$APP.Hi,W0,$APP.Ih,$APP.T,$APP.R,$APP.oe,$APP.Qi,$APP.Di,$APP.Fi,$APP.nh,$APP.Ui,$APP.Qf,$APP.y,$APP.Bk,$APP.dj,$APP.vi],[d,c,d,c,c,c,new P0,c,c,f,c,c,c,new X0,c,f,c,c,e,d,c,c,e,c,new Q0,new V0,c,c]),"undefined"!==typeof $APP.fg&&"undefined"!==typeof $APP.gg&&"undefined"!==typeof $APP.Pj?$APP.Lh([$APP.Pj,
|
|
||||||
c]):null,"undefined"!==typeof $APP.fg&&"undefined"!==typeof $APP.gg&&"undefined"!==typeof $APP.Mg?$APP.Lh([$APP.Mg,c]):null,"undefined"!==typeof $APP.fg&&"undefined"!==typeof $APP.gg&&"undefined"!==typeof $APP.Ye?$APP.Lh([$APP.Ye,f]):null,N0.h(b)]));return I0($APP.Xi(a),J0({objectBuilder:function(l,n,k){return $APP.jf(function(r,v,w){r.push(n.h?n.h(v):n.call(null,v),k.h?k.h(w):k.call(null,w));return r},["^ "],l)},handlers:function(){var l=RZ(g);l.forEach=function(n){for(var k=$APP.z(this),r=null,
|
|
||||||
v=0,w=0;;)if(w<v){var B=r.U(null,w),H=$APP.M.j(B,0,null);B=$APP.M.j(B,1,null);$APP.K.g($APP.Fo,H)?n.g?n.g(B,"default"):n.call(null,B,"default"):n.g?n.g(B,H):n.call(null,B,H);w+=1}else if(k=$APP.z(k))$APP.Ke(k)?(r=$APP.jd(k),k=$APP.kd(k),H=r,v=$APP.he(r),r=H):(r=$APP.A(k),H=$APP.M.j(r,0,null),B=$APP.M.j(r,1,null),$APP.K.g($APP.Fo,H)?n.g?n.g(B,"default"):n.call(null,B,"default"):n.g?n.g(B,H):n.call(null,B,H),k=$APP.G(k),r=null,v=0),w=0;else return null};return l}(),unpack:function(l){return l instanceof
|
|
||||||
$APP.vb?l.A:!1}},$APP.ho($APP.$l.g(b,N0))))},Z0=function(a){return $APP.Sp.g(", ","string"===typeof a?new $APP.T(null,1,5,$APP.V,[a],null):a)},$0=function(a,b,c,d,e,f){this.read=a;this.description=b;this.ac=c;this.O=d;this.G=e;this.H=f;this.D=2230716170;this.M=139264},c1=function(a){var b=$APP.$l.l(a,a1,$APP.N([b1,n_]));b=$APP.Ie(a)?$APP.$o.g($APP.ig,b):b;return new $0(a1.h(a),b1.h(a),n_.h(a),null,$APP.eg(b),null)},d1=function(a,b,c){this.O=a;this.G=b;this.H=c;this.D=2230716170;this.M=139264},g1=
|
|
||||||
function(a,b){var c=$APP.dg(a);a=$APP.Q.g(c,l_);var d=$APP.Q.g(c,$APP.In),e=$APP.Q.g(c,e1);c=$APP.Q.g(c,f1);d=$APP.K.g(e,"GET")&&null==c?d:c;return $APP.p(d)?[$APP.q.h(b),$APP.p($APP.jj(/\?/,b))?"\x26":"?",k_(a,d)].join(""):b},h1=function(a,b,c){this.O=a;this.G=b;this.H=c;this.D=2230716170;this.M=139264},i1=function(a,b,c){this.O=a;this.G=b;this.H=c;this.D=2230716170;this.M=139264},l1=function(a){var b=j1;a=$APP.dg(a);var c=$APP.Q.g(a,k1);return c instanceof $0?c:$APP.Je(c)?b.h?b.h(a):b.call(null,
|
|
||||||
a):$APP.He(c)?c1(c):c instanceof $APP.S?b_(new $APP.T(null,2,5,$APP.V,["keywords are not allowed as response formats in ajax calls: ",c],null)):$APP.Re(c)?c1(new $APP.vb(null,3,[a1,c,b1,"custom",n_,"*/*"],null)):b_(new $APP.T(null,2,5,$APP.V,["unrecognized response format: ",c],null))},m1=function(a){a=$APP.dg(a);a=$APP.Q.g(a,$APP.en);return $APP.p(a)?a:M0},o1=function(a,b){var c=function(){var d=n1.h(b);return $APP.p(d)?d:Y0(a,b)}();return function(d){return c.write(d)}},q1=function(a){var b=m1(a),
|
|
||||||
c=$APP.K.g(b,M0)||$APP.K.g(b,p1)?"json":"msgpack";return new $APP.vb(null,2,[m_,o1(b,a),n_,["application/transit+",c].join("")],null)},s1=function(a){var b=function(){var c=r1.h(a);return $APP.p(c)?c:O0(a)}();return function(c){c=XZ(c);return b.read(c)}},u1=function(a,b){a=$APP.Je(b)?$APP.A(b):n_.h(t1(a,b));return null==a?new $APP.T(null,1,5,$APP.V,["*/*"],null):"string"===typeof a?new $APP.T(null,1,5,$APP.V,[a],null):a},v1=function(a,b,c){b=u1(b,c);return $APP.yg(function(d){return $APP.K.g(d,"*/*")||
|
|
||||||
0<=a.indexOf(d)},b)},w1=function(a,b){var c=$APP.dg(b);b=$APP.Q.g(c,k1);var d=c_(a);return t1(c,$APP.A($APP.Rg.g(function(e){return v1(d,c,e)},b)))},x1=function(a){return function(b){var c=w1(b,a);c=a1.h(c);return c.h?c.h(b):c.call(null,b)}},y1=function(a){var b=$APP.dg(a);a=$APP.Q.g(b,k1);return $APP.Pg.l(function(c){return u1(b,c)},$APP.N([$APP.Je(a)?a:new $APP.T(null,1,5,$APP.V,[a],null)]))},j1=function(a){var b=y1(a);return c1(new $APP.vb(null,3,[a1,x1(a),z1,["(from ",$APP.q.h(b),")"].join(""),
|
|
||||||
n_,b],null))},B1=function(a){return function(b){return new $APP.vb(null,3,[$APP.gC,UZ(b),A1,WZ(b),$APP.Jn,a.h?a.h(b):a.call(null,b)],null)}},C1=function(){return HZ("iPhone")&&!HZ("iPod")&&!HZ("iPad")},D1=function(){var a=$APP.ca.document;return a?a.documentMode:void 0},G1=function(a){return CZ(E1,a,function(){let b=0;const c=(0,$APP.yA)(String(F1)).split("."),d=(0,$APP.yA)(String(a)).split("."),e=Math.max(c.length,d.length);for(let l=0;0==b&&l<e;l++){var f=c[l]||"",g=d[l]||"";do{f=/(\d*)(\D*)(.*)/.exec(f)||
|
|
||||||
["","","",""];g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];if(0==f[0].length&&0==g[0].length)break;b=GZ(0==f[1].length?0:parseInt(f[1],10),0==g[1].length?0:parseInt(g[1],10))||GZ(0==f[2].length,0==g[2].length)||GZ(f[2],g[2]);f=f[3];g=g[3]}while(0==b)}return 0<=b})},J1=function(){0!=H1&&(I1[$APP.Ha(this)]=this);this.Nd=this.Nd;this.xd=this.xd},K1=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.ed=!1},L1=function(a,b){K1.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=
|
|
||||||
this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.pointerId=0;this.pointerType="";this.Od=null;a&&this.init(a,b)},N1=function(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.Rc=e;this.key=++M1;this.yd=this.re=!1},O1=function(a){a.yd=!0;a.listener=null;a.proxy=null;a.src=null;a.Rc=null},
|
|
||||||
P1=function(a){this.src=a;this.Db={};this.ke=0},Q1=function(a,b){var c=b.type;if(c in a.Db){var d=a.Db[c],e=(0,$APP.wA)(d,b),f;(f=0<=e)&&Array.prototype.splice.call(d,e,1);f&&(O1(b),0==a.Db[c].length&&(delete a.Db[c],a.ke--))}},R1=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.yd&&f.listener==b&&f.capture==!!c&&f.Rc==d)return e}return-1},S1=function(a,b){J1.call(this);this.sg=this.yf=null;this.yg=b;this.Sd=[];if(a>this.yg)throw Error("[goog.structs.SimplePool] Initial cannot be greater than max");
|
|
||||||
for(b=0;b<a;b++)this.Sd.push(this.xf())},T1=function(a,b){a.yf=b},V1=function(a,b){a.Sd.length<a.yg?a.Sd.push(b):U1(a,b)},U1=function(a,b){if(a.sg)a.sg(b);else if(wZ(b))if("function"===typeof b.rg)b.rg();else for(var c in b)delete b[c]},Y1=function(){this.Pd=[];this.ae=new PZ;this.Vg=this.Wg=this.Xg=this.Qg=0;this.he=new PZ;this.qg=this.Ug=0;this.xh=1;this.Bf=new S1(0,4E3);this.Bf.xf=function(){return new W1};this.Rg=new S1(0,50);this.Rg.xf=function(){return new X1};var a=this;this.wg=new S1(0,2E3);
|
|
||||||
T1(this.wg,function(){return a.xh++});this.Qf={}},X1=function(){this.Tf=this.time=this.count=0},W1=function(){},a2=function(a,b,c,d){var e=[];-1==c?e.push(" "):e.push(Z1(a.tg-c));e.push(" ",$1(a.tg-b));0==a.Cf?e.push(" Start "):1==a.Cf?(e.push(" Done "),e.push(Z1(a.fi-a.startTime)," ms ")):e.push(" Comment ");e.push(d,a);0<a.Kh&&e.push("[VarAlloc ",a.Kh,"] ");return e.join("")},c2=function(a){a.Qf.stop&&NZ(a.ae,function(b){this.Qf.stop(b.id,b2)},a);a.ae.clear()},Z1=function(a){a=Math.round(a);
|
|
||||||
var b="";1E3>a&&(b=" ");100>a&&(b=" ");10>a&&(b=" ");return b+a},$1=function(a){a=Math.round(a);return String(100+a/1E3%60).substring(1,3)+"."+String(1E3+a%1E3).substring(1,4)},e2=function(a,b,c,d,e){if(d&&d.once)d2(a,b,c,d,e);else if(Array.isArray(b))for(var f=0;f<b.length;f++)e2(a,b[f],c,d,e);else c=f2(c),a&&a[g2]?a.Hc.add(String(b),c,!1,wZ(d)?!!d.capture:!!d,e):h2(a,b,c,!1,d,e)},h2=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=wZ(e)?!!e.capture:!!e,l=i2(a);l||(a[j2]=l=
|
|
||||||
new P1(a));c=l.add(b,c,d,g,f);if(!c.proxy){d=k2();c.proxy=d;d.src=a;d.listener=c;if(a.addEventListener)l2||(e=g),void 0===e&&(e=!1),a.addEventListener(b.toString(),d,e);else if(a.attachEvent)a.attachEvent(m2(b.toString()),d);else if(a.addListener&&a.removeListener)a.addListener(d);else throw Error("addEventListener and attachEvent are unavailable.");n2++}},k2=function(){var a=o2,b=p2?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b},
|
|
||||||
d2=function(a,b,c,d,e){if(Array.isArray(b))for(var f=0;f<b.length;f++)d2(a,b[f],c,d,e);else c=f2(c),a&&a[g2]?a.Hc.add(String(b),c,!0,wZ(d)?!!d.capture:!!d,e):h2(a,b,c,!0,d,e)},q2=function(a,b,c,d,e){if(Array.isArray(b))for(var f=0;f<b.length;f++)q2(a,b[f],c,d,e);else d=wZ(d)?!!d.capture:!!d,c=f2(c),a&&a[g2]?a.Hc.remove(String(b),c,d,e):a&&(a=i2(a))&&(b=a.Df(b,c,d,e))&&r2(b)},r2=function(a){if("number"!==typeof a&&a&&!a.yd){var b=a.src;if(b&&b[g2])Q1(b.Hc,a);else{var c=a.type,d=a.proxy;b.removeEventListener?
|
|
||||||
b.removeEventListener(c,d,a.capture):b.detachEvent?b.detachEvent(m2(c),d):b.addListener&&b.removeListener&&b.removeListener(d);n2--;(c=i2(b))?(Q1(c,a),0==c.ke&&(c.src=null,b[j2]=null)):O1(a)}}},m2=function(a){return a in s2?s2[a]:s2[a]="on"+a},u2=function(a,b,c,d){var e=!0;if(a=i2(a))if(b=a.Db[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.capture==c&&!f.yd&&(f=t2(f,d),e=e&&!1!==f)}return e},t2=function(a,b){var c=a.listener,d=a.Rc||a.src;a.re&&r2(a);return c.call(d,b)},o2=function(a,
|
|
||||||
b){if(a.yd)return!0;if(!p2){if(!b)a:{b=["window","event"];for(var c=$APP.ca,d=0;d<b.length;d++)if(c=c[b[d]],null==c){b=null;break a}b=c}d=b;b=new L1(d,this);c=!0;if(!(0>d.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(g){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.currentTarget;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;!b.ed&&0<=e;e--){b.currentTarget=d[e];var f=u2(d[e],a,!0,b);c=c&&f}for(e=0;!b.ed&&e<d.length;e++)b.currentTarget=
|
|
||||||
d[e],f=u2(d[e],a,!1,b),c=c&&f}return c}return t2(a,new L1(b,this))},i2=function(a){a=a[j2];return a instanceof P1?a:null},f2=function(a){if("function"===typeof a)return a;a[v2]||(a[v2]=function(b){return a.handleEvent(b)});return a[v2]},w2=function(){J1.call(this);this.Hc=new P1(this);this.Yg=this;this.Jf=null},x2=function(a,b,c,d){b=a.Hc.Db[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var g=b[f];if(g&&!g.yd&&g.capture==c){var l=g.listener,n=g.Rc||g.src;g.re&&Q1(a.Hc,g);
|
|
||||||
e=!1!==l.call(n,d)&&e}}return e&&!d.defaultPrevented},y2=function(a,b,c){if("function"===typeof a)c&&(a=AZ(a,c));else if(a&&"function"==typeof a.handleEvent)a=AZ(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:$APP.ca.setTimeout(a,b||0)},z2=function(){},B2=function(a){var b;(b=a.bg)||(b={},A2(a)&&(b[0]=!0,b[1]=!0),b=a.bg=b);return b},C2=function(){},D2=function(a){return(a=A2(a))?new ActiveXObject(a):new XMLHttpRequest},A2=function(a){if(!a.xg&&"undefined"==
|
|
||||||
typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){const b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];for(let c=0;c<b.length;c++){const d=b[c];try{return new ActiveXObject(d),a.xg=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.xg},F2=function(a){w2.call(this);this.headers=new PZ;this.Ke=a||null;this.Kc=!1;this.Je=this.da=null;this.Hf="";this.wd=0;this.Be="";this.$c=this.Ef=
|
|
||||||
this.Ae=this.Af=!1;this.je=0;this.Fe=null;this.De=E2;this.Rf=this.Fg=this.Vf=!1},H2=function(a){return G2&&G1(9)&&"number"===typeof a.timeout&&void 0!==a.ontimeout},DZ=function(a){return"content-type"==a.toLowerCase()},K2=function(a,b){a.Kc=!1;a.da&&(a.$c=!0,a.da.abort(),a.$c=!1);a.Be=b;a.wd=5;I2(a);J2(a)},I2=function(a){a.Af||(a.Af=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))},O2=function(a){if(a.Kc&&"undefined"!=typeof $APP.vA)if(a.Je[1]&&4==L2(a)&&2==a.getStatus())a.getStatus();else if(a.Ae&&
|
|
||||||
4==L2(a))y2(a.Dg,0,a);else if(a.dispatchEvent("readystatechange"),4==L2(a)){a.getStatus();a.Kc=!1;try{const g=a.getStatus();a:switch(g){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var b=!0;break a;default:b=!1}var c;if(!(c=b)){var d;if(d=0===g){var e=String(a.Hf).match(M2)[1]||null;if(!e&&$APP.ca.self&&$APP.ca.self.location){var f=$APP.ca.self.location.protocol;e=f.substr(0,f.length-1)}d=!N2.test(e?e.toLowerCase():"")}c=d}c?(a.dispatchEvent("complete"),a.dispatchEvent("success")):
|
|
||||||
(a.wd=6,a.Be=a.getStatusText()+" ["+a.getStatus()+"]",I2(a))}finally{J2(a)}}},P2=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},J2=function(a,b){if(a.da){Q2(a);const c=a.da,d=a.Je[0]?$APP.ia:null;a.da=null;a.Je=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){}}},Q2=function(a){a.da&&a.Rf&&(a.da.ontimeout=null);a.Fe&&($APP.ca.clearTimeout(a.Fe),a.Fe=null)},L2=function(a){return a.da?a.da.readyState:0},R2=function(a){return a instanceof
|
|
||||||
$APP.S?$APP.ol($APP.Xi(a)):a},S2=function(a,b){return a_(b,a)},T2=function(a,b){return function(c){c=$APP.ff.j(S2,c,b);return a.h?a.h(c):a.call(null,c)}},X2=function(a){var b=l1(a);return $APP.Jp.j($APP.Jp.j(a,e1,R2),U2,function(c){return $APP.Y.l(new $APP.T(null,1,5,$APP.V,[b],null),$APP.p(c)?c:$APP.u(V2),$APP.N([W2]))})},Y2=function(a,b){return $Z(b,a)},$2=function(a,b){if($APP.He(a))return a;if($APP.ve(a))return new $APP.vb(null,1,[m_,a],null);if(null==a)return q1(b);switch(a instanceof $APP.S?
|
|
||||||
a.na:null){case "transit":return q1(b);case "json":return Z2();case "text":return new $APP.vb(null,2,[m_,$APP.kf,n_,"text/plain; charset\x3dutf-8"],null);case "raw":return o_(b);case "url":return o_(b);default:return null}},b3=function(a,b){return $APP.Je(a)?$APP.bg.g($APP.Oq,$APP.vj.g(function(c){return a3(c,b)},a)):a3(a,b)},h3=function(a){a=$APP.dg(a);var b=$APP.Q.g(a,c3),c=$APP.Q.g(a,d3),d=$APP.Q.g(a,e3),e=$APP.p(b)?b:$APP.u(f3),f=$APP.p(c)?c:$APP.u(g3);return function(g){var l=$APP.M.j(g,0,null);
|
|
||||||
g=$APP.M.j(g,1,null);l=$APP.p(l)?e:f;l.h?l.h(g):l.call(null,g);return $APP.ve(d)?d.s?d.s():d.call(null):null}},k3=function(a,b,c){a=$APP.Ni.l(c,i3,a,$APP.N([e1,b]));a=$APP.dg(a);var d=$APP.Q.g(a,e1);c=$APP.Q.g(a,z1);b=$APP.Q.g(a,k1);$APP.Q.g(a,$APP.In);d=null==$APP.Q.g(a,$APP.Jn)&&$APP.Mi.g(d,"GET");c=$APP.p($APP.p(c)?c:d)?$2(c,a):null;a=$APP.Ni.l(a,c3,h3(a),$APP.N([z1,c,k1,b3(b,a)]));a=X2(a);a=$APP.dg(a);b=$APP.Q.g(a,U2);a=$APP.ff.j(Y2,a,b);b=$APP.xf(b);c=$APP.dg(a);c=$APP.Q.g(c,c3);b=$APP.p(c)?
|
|
||||||
T2(c,b):b_("No ajax handler provided.");c=j3.h(a);c=$APP.p(c)?c:new F2;return TZ(c,a,b)},l3=function(a,b){return $APP.p(a)?[$APP.q.h(a),", ",$APP.q.h(b)].join(""):b},m3=function(a){return $APP.p(a)?$APP.ff.j(function(b,c){if($APP.p($APP.sb(c)))return b;c=IZ(c,": ",2);return $APP.Jp.C(b,c[0],l3,c[1])},$APP.ig,a.split("\r\n")):$APP.ig};$APP.Kd.prototype.aa=vZ(18,function(){return new $APP.Kd(this.A,this.K,this.F)});$APP.oe.prototype.aa=vZ(17,function(){return new $APP.oe(this.Ed,this.K,this.F)});
|
|
||||||
$APP.R.prototype.aa=vZ(16,function(){return new $APP.R(this.F,this.first,this.lc,this.count,this.H)});$APP.uf.prototype.aa=vZ(15,function(){return new $APP.uf(this.F)});$APP.yf.prototype.aa=vZ(14,function(){return new $APP.yf(this.F,this.first,this.lc,this.H)});$APP.T.prototype.aa=vZ(13,function(){return new $APP.T(this.F,this.I,this.shift,this.root,this.tb,this.H)});$APP.rh.prototype.aa=vZ(12,function(){return new $APP.rh(this.F,this.cb,this.start,this.end,this.H)});
|
|
||||||
$APP.Ah.prototype.aa=vZ(11,function(){return new $APP.Ah(this.F,this.count,this.zb,this.Eb,this.H)});$APP.vb.prototype.aa=vZ(10,function(){return new $APP.vb(this.F,this.I,this.A,this.H)});$APP.qi.prototype.aa=vZ(9,function(){return new $APP.qi(this.F,this.I,this.root,this.mb,this.qb,this.H)});$APP.Di.prototype.aa=vZ(8,function(){return new $APP.Di(this.yb,this.Ub,this.I,this.F,this.H)});$APP.Qi.prototype.aa=vZ(7,function(){return new $APP.Qi(this.F,this.xc,this.H)});
|
|
||||||
$APP.Ui.prototype.aa=vZ(6,function(){return new $APP.Ui(this.F,this.Hb,this.H)});$APP.cj.prototype.aa=vZ(5,function(){return new $APP.cj(this.F,this.start,this.end,this.step,this.hb,this.Wb,this.H)});$APP.dj.prototype.aa=vZ(4,function(){return new $APP.dj(this.F,this.start,this.end,this.step,this.hb,this.Wb,this.H)});$APP.wl.prototype.aa=vZ(3,function(){return new $APP.wl(this.nc,this.form,this.O,this.G,this.H)});
|
|
||||||
$APP.Rq.prototype.aa=vZ(2,function(){return new $APP.Rq(this.Lb,this.body,this.Gb,this.Ib,this.Kb,this.O,this.G,this.H)});$APP.Sx.prototype.aa=vZ(1,function(){return new $APP.Sx(this.mc,this.Zb,this.O,this.G,this.H)});$APP.bz.prototype.aa=vZ(0,function(){return new $APP.bz(this.Na,this.deref,this.Za,this.$a,this.ab,this.quote,this.ka,this.fb,this.Ua,this.Va,this.Wa,this.Ma,this.Qa,this.Oa,this.source,this.Ya,this.Ta,this.Ra,this.Pa,this.Xa,this.O,this.G,this.H)});
|
|
||||||
LZ.prototype.next=function(){throw $APP.CA;};LZ.prototype.Me=function(){return this};$APP.h=PZ.prototype;$APP.h.Ud=function(){QZ(this);for(var a=[],b=0;b<this.sb.length;b++)a.push(this.fc[this.sb[b]]);return a};$APP.h.Rb=function(){QZ(this);return this.sb.concat()};$APP.h.wc=function(a){if(this===a)return!0;if(this.vc!=a.vc)return!1;QZ(this);for(var b,c=0;b=this.sb[c];c++){var d=this.get(b);b=a.get(b);if(d!==b)return!1}return!0};$APP.h.ad=function(){return 0==this.vc};
|
|
||||||
$APP.h.clear=function(){this.fc={};this.me=this.vc=this.sb.length=0};$APP.h.remove=function(a){return OZ(this.fc,a)?(delete this.fc[a],this.vc--,this.me++,this.sb.length>2*this.vc&&QZ(this),!0):!1};$APP.h.get=function(a,b){return OZ(this.fc,a)?this.fc[a]:b};$APP.h.set=function(a,b){OZ(this.fc,a)||(this.vc++,this.sb.push(a),this.me++);this.fc[a]=b};$APP.h.addAll=function(a){if(a instanceof PZ)for(var b=a.Rb(),c=0;c<b.length;c++)this.set(b[c],a.get(b[c]));else for(b in a)this.set(b,a[b])};
|
|
||||||
$APP.h.forEach=function(a,b){for(var c=this.Rb(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};$APP.h.clone=function(){return new PZ(this)};$APP.h.Me=function(a){QZ(this);var b=0,c=this.me,d=this,e=new LZ;e.next=function(){if(c!=d.me)throw Error("The map has changed since the iterator was created");if(b>=d.sb.length)throw $APP.CA;var f=d.sb[b++];return a?f:d.fc[f]};return e};
|
|
||||||
var M2=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/,n3=new $APP.y(null,"ajax.core","ajax.core",-1363316958,null),n_=new $APP.S(null,"content-type","content-type",-508222634),o3=new $APP.y(null,"uri","uri",865819680,null),A1=new $APP.S(null,"headers","headers",-835030129),N0=new $APP.S(null,"handlers","handlers",79528781),b1=new $APP.S(null,"description","description",-1428560544),p3=new $APP.y(null,"POST","POST",1750988384,
|
|
||||||
null),q3=new $APP.S(null,"parse-error","parse-error",255902478),r3=new $APP.S(null,"exception","exception",-335277064),s3=new $APP.S(null,"prefix","prefix",-265908465),f1=new $APP.S(null,"url-params","url-params",-697567619),t3=new $APP.S(null,"keywords?","keywords?",764949733),z1=new $APP.S(null,"format","format",-1306924766),l_=new $APP.S(null,"vec-strategy","vec-strategy",1843221372),u3=new $APP.y(null,"GET","GET",-917844743,null),c3=new $APP.S(null,"handler","handler",-195596612),v3=new $APP.S(null,
|
|
||||||
"failure","failure",720415879),w3=new $APP.S(null,"with-credentials","with-credentials",-1163127235),x3=new $APP.S(null,"request-received","request-received",2110590540),j3=new $APP.S(null,"api","api",-899839580),M0=new $APP.S(null,"json","json",1279968570),y3=new $APP.S(null,"response","response",-1068424192),d3=new $APP.S(null,"error-handler","error-handler",-484945776),p1=new $APP.S(null,"json-verbose","json-verbose",-542533531),n1=new $APP.S(null,"writer","writer",-277568236),k1=new $APP.S(null,
|
|
||||||
"response-format","response-format",1664465322),z3=new $APP.S(null,"timeout","timeout",-318625318),A3=new $APP.S(null,"original-text","original-text",744448452),e1=new $APP.S(null,"method","method",55703592),m_=new $APP.S(null,"write","write",-1857649168),B3=new $APP.S(null,"status-text","status-text",-1834235478),e3=new $APP.S(null,"finally","finally",1589088705),C3=new $APP.y("ajax.core","GET","ajax.core/GET",-580027892,null),D3=new $APP.S(null,"raw","raw",1604651272),U2=new $APP.S(null,"interceptors",
|
|
||||||
"interceptors",-1546782951),r1=new $APP.S(null,"reader","reader",169660853),E3=new $APP.S(null,"failed","failed",-1397425762),F3=new $APP.y("ajax.core","POST","ajax.core/POST",1572763855,null),G3=new $APP.S(null,"not-initialized","not-initialized",-1937378906),a1=new $APP.S(null,"read","read",1140058661),i3=new $APP.S(null,"uri","uri",-774711847),h_=new $APP.S(null,"java","java",1958249105),H3=new $APP.S(null,"processing-request","processing-request",-264947221),I3=new $APP.S(null,"aborted","aborted",
|
|
||||||
1775972619),J3=new $APP.S(null,"connection-established","connection-established",-1403749733),K3=new $APP.S(null,"progress-handler","progress-handler",333585589),L3=new $APP.S(null,"response-ready","response-ready",245208276);var M3=new $APP.Qi(null,new $APP.vb(null,7,[206,null,204,null,304,null,1223,null,201,null,202,null,200,null],null),null);var e_=encodeURIComponent,j_=function j_(a,b,c){var e=$APP.M.j(c,0,null);c=$APP.M.j(c,1,null);var f=d_(e);b=$APP.p(b)?$APP.p(e)?[$APP.q.h(b),"[",$APP.q.h(f),"]"].join(""):b:f;e=$APP.Hq.j(j_,a,b);return"string"===typeof c?new $APP.T(null,1,5,$APP.V,[new $APP.T(null,2,5,$APP.V,[b,c],null)],null):c instanceof $APP.S?new $APP.T(null,1,5,$APP.V,[new $APP.T(null,2,5,$APP.V,[b,$APP.Xi(c)],null)],null):$APP.He(c)?$APP.Pg.l(e,$APP.N([$APP.z(c)])):$APP.Ge(c)||$APP.Ee(c)?$APP.Pg.l(e,$APP.N([$APP.kA.g(a,$APP.z(c))])):
|
|
||||||
new $APP.T(null,1,5,$APP.V,[new $APP.T(null,2,5,$APP.V,[b,c],null)],null)};var w_="undefined"!=typeof Object.keys?function(a){return Object.keys(a)}:function(a){return $APP.kb(a)},u_="undefined"!=typeof Array.isArray?function(a){return Array.isArray(a)}:function(a){return"array"===$APP.na(a)};s_.prototype.write=function(a,b){return q_(a,b)?(4096===this.Zg?(this.clear(),this.Td=0,this.cache={}):1936===this.bb&&this.clear(),b=this.cache[a],null==b?(this.cache[a]=[r_(this.bb),this.Td],this.bb++,a):b[1]!=this.Td?(b[1]=this.Td,b[0]=r_(this.bb),this.bb++,a):b[0]):a};s_.prototype.clear=function(){this.bb=0;this.Td++};t_.prototype.write=function(a){1936==this.bb&&(this.bb=0);this.cache[this.bb]=a;this.bb++;return a};
|
|
||||||
t_.prototype.read=function(a){return this.cache[2===a.length?a.charCodeAt(1)-48:44*(a.charCodeAt(1)-48)+(a.charCodeAt(2)-48)]};t_.prototype.clear=function(){this.bb=0};var D_=1,B_={},C_=0;var N3="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";E_.prototype.toString=function(){return"[TaggedValue: "+this.tag+", "+this.rep+"]"};E_.prototype.equiv=function(a){return v_(this,a)};E_.prototype.equiv=E_.prototype.equiv;E_.prototype.Qb=function(a){return a instanceof E_?this.tag===a.tag&&v_(this.rep,a.rep):!1};E_.prototype.$b=function(){-1===this.Ia&&(this.Ia=x_(y_(this.tag),y_(this.rep)));return this.Ia};var O3=SZ("9007199254740991"),P3=SZ("-9007199254740991");
|
|
||||||
$APP.Oa.prototype.equiv=function(a){return v_(this,a)};$APP.Oa.prototype.equiv=$APP.Oa.prototype.equiv;$APP.Oa.prototype.Qb=function(a){return a instanceof $APP.Oa&&this.wc(a)};$APP.Oa.prototype.$b=function(){return this.Sa};G_.prototype.toString=function(){return":"+this.kb};G_.prototype.namespace=function(){var a=this.kb.indexOf("/");return-1!=a?this.kb.substring(0,a):null};G_.prototype.name=function(){var a=this.kb.indexOf("/");return-1!=a?this.kb.substring(a+1,this.kb.length):this.kb};
|
|
||||||
G_.prototype.equiv=function(a){return v_(this,a)};G_.prototype.equiv=G_.prototype.equiv;G_.prototype.Qb=function(a){return a instanceof G_&&this.kb==a.kb};G_.prototype.$b=function(){-1===this.Ia&&(this.Ia=y_(this.kb));return this.Ia};H_.prototype.namespace=function(){var a=this.kb.indexOf("/");return-1!=a?this.kb.substring(0,a):null};H_.prototype.name=function(){var a=this.kb.indexOf("/");return-1!=a?this.kb.substring(a+1,this.kb.length):this.kb};H_.prototype.toString=function(){return this.kb};
|
|
||||||
H_.prototype.equiv=function(a){return v_(this,a)};H_.prototype.equiv=H_.prototype.equiv;H_.prototype.Qb=function(a){return a instanceof H_&&this.kb==a.kb};H_.prototype.$b=function(){-1===this.Ia&&(this.Ia=y_(this.kb));return this.Ia};J_.prototype.toString=function(){var a=this.high,b=this.low;var c=I_(a,0,4)+"-";c+=I_(a,4,6)+"-";c+=I_(a,6,8)+"-";c+=I_(b,0,2)+"-";return c+=I_(b,2,8)};J_.prototype.equiv=function(a){return v_(this,a)};J_.prototype.equiv=J_.prototype.equiv;
|
|
||||||
J_.prototype.Qb=function(a){return a instanceof J_&&this.high.wc(a.high)&&this.low.wc(a.low)};J_.prototype.$b=function(){-1===this.Ia&&(this.Ia=y_(this.toString()));return this.Ia};Date.prototype.Qb=function(a){return a instanceof Date?this.valueOf()===a.valueOf():!1};Date.prototype.$b=function(){return this.valueOf()};
|
|
||||||
K_.prototype.next=function(){if(this.bb<this.entries.length){var a={value:0===this.type?this.entries[this.bb]:1===this.type?this.entries[this.bb+1]:[this.entries[this.bb],this.entries[this.bb+1]],done:!1};this.bb+=2;return a}return{value:null,done:!0}};K_.prototype.next=K_.prototype.next;K_.prototype[N3]=function(){return this};
|
|
||||||
L_.prototype.next=function(){if(this.bb<this.map.size){null!=this.Vc&&this.Lc<this.Vc.length||(this.Vc=this.map.map[this.keys[this.bb]],this.Lc=0);var a={value:0===this.type?this.Vc[this.Lc]:1===this.type?this.Vc[this.Lc+1]:[this.Vc[this.Lc],this.Vc[this.Lc+1]],done:!1};this.bb++;this.Lc+=2;return a}return{value:null,done:!0}};L_.prototype.next=L_.prototype.next;L_.prototype[N3]=function(){return this};N_.prototype.toString=function(){return Q_(this)};N_.prototype.inspect=function(){return this.toString()};
|
|
||||||
N_.prototype.clear=function(){this.Ia=-1;this.Da?this.Da.clear():this.Fa=[];this.size=0};N_.prototype.clear=N_.prototype.clear;N_.prototype.keys=function(){return this.Da?this.Da.keys():new K_(this.Fa,0)};N_.prototype.keys=N_.prototype.keys;N_.prototype.bd=function(){if(this.Da)return this.Da.bd();for(var a=[],b=0,c=0;c<this.Fa.length;b++,c+=2)a[b]=this.Fa[c];return a};N_.prototype.keySet=N_.prototype.bd;N_.prototype.entries=function(){return this.Da?this.Da.entries():new K_(this.Fa,2)};
|
|
||||||
N_.prototype.entries=N_.prototype.entries;N_.prototype.values=function(){return this.Da?this.Da.values():new K_(this.Fa,1)};N_.prototype.values=N_.prototype.values;N_.prototype.forEach=function(a){if(this.Da)this.Da.forEach(a);else for(var b=0;b<this.Fa.length;b+=2)a(this.Fa[b+1],this.Fa[b])};N_.prototype.forEach=N_.prototype.forEach;
|
|
||||||
N_.prototype.get=function(a,b){if(this.Da)return this.Da.get(a);if(T_(this))return this.get(a);for(var c=0;c<this.Fa.length;c+=2)if(v_(this.Fa[c],a))return this.Fa[c+1];return b};N_.prototype.get=N_.prototype.get;N_.prototype.has=function(a){if(this.Da)return this.Da.has(a);if(T_(this))return this.has(a);for(var b=0;b<this.Fa.length;b+=2)if(v_(this.Fa[b],a))return!0;return!1};N_.prototype.has=N_.prototype.has;
|
|
||||||
N_.prototype.set=function(a,b){this.Ia=-1;if(this.Da)this.Da.set(a,b),this.size=this.Da.size;else{for(var c=0;c<this.Fa.length;c+=2)if(v_(this.Fa[c],a)){this.Fa[c+1]=b;return}this.Fa.push(a);this.Fa.push(b);this.size++;32<this.size&&(this.Da=S_(this.Fa,!1,!0),this.Fa=null)}};N_.prototype.set=N_.prototype.set;
|
|
||||||
N_.prototype["delete"]=function(a){this.Ia=-1;if(this.Da)return a=this.Da.delete(a),this.size=this.Da.size,a;for(var b=0;b<this.Fa.length;b+=2)if(v_(this.Fa[b],a))return a=this.Fa[b+1],this.Fa.splice(b,2),this.size--,a};N_.prototype.clone=function(){var a=S_();this.forEach(function(b,c){a.set(c,b)});return a};N_.prototype.clone=N_.prototype.clone;N_.prototype[N3]=function(){return this.entries()};N_.prototype.$b=function(){if(this.Da)return this.Da.$b();-1===this.Ia&&(this.Ia=z_(this));return this.Ia};
|
|
||||||
N_.prototype.Qb=function(a){return this.Da?O_(this.Da,a):O_(this,a)};M_.prototype.toString=function(){return Q_(this)};M_.prototype.inspect=function(){return this.toString()};M_.prototype.clear=function(){this.Ia=-1;this.map={};this.jd=[];this.size=0};M_.prototype.clear=M_.prototype.clear;M_.prototype.Rb=function(){return null!=this.jd?this.jd:w_(this.map)};
|
|
||||||
M_.prototype["delete"]=function(a){this.Ia=-1;this.jd=null;for(var b=y_(a),c=this.map[b],d=0;d<c.length;d+=2)if(v_(a,c[d]))return a=c[d+1],c.splice(d,2),0===c.length&&delete this.map[b],this.size--,a};M_.prototype.entries=function(){return new L_(this,2)};M_.prototype.entries=M_.prototype.entries;M_.prototype.forEach=function(a){for(var b=this.Rb(),c=0;c<b.length;c++)for(var d=this.map[b[c]],e=0;e<d.length;e+=2)a(d[e+1],d[e],this)};M_.prototype.forEach=M_.prototype.forEach;
|
|
||||||
M_.prototype.get=function(a,b){var c=y_(a);c=this.map[c];if(null!=c)for(b=0;b<c.length;b+=2){if(v_(a,c[b]))return c[b+1]}else return b};M_.prototype.get=M_.prototype.get;M_.prototype.has=function(a){var b=y_(a);b=this.map[b];if(null!=b)for(var c=0;c<b.length;c+=2)if(v_(a,b[c]))return!0;return!1};M_.prototype.has=M_.prototype.has;M_.prototype.keys=function(){return new L_(this,0)};M_.prototype.keys=M_.prototype.keys;
|
|
||||||
M_.prototype.bd=function(){for(var a=this.Rb(),b=[],c=0;c<a.length;c++)for(var d=this.map[a[c]],e=0;e<d.length;e+=2)b.push(d[e]);return b};M_.prototype.keySet=M_.prototype.bd;M_.prototype.set=function(a,b){this.Ia=-1;var c=y_(a),d=this.map[c];if(null==d)this.jd&&this.jd.push(c),this.map[c]=[a,b],this.size++;else{c=!0;for(var e=0;e<d.length;e+=2)if(v_(b,d[e])){c=!1;d[e]=b;break}c&&(d.push(a),d.push(b),this.size++)}};M_.prototype.set=M_.prototype.set;
|
|
||||||
M_.prototype.values=function(){return new L_(this,1)};M_.prototype.values=M_.prototype.values;M_.prototype.clone=function(){var a=S_();this.forEach(function(b,c){a.set(c,b)});return a};M_.prototype.clone=M_.prototype.clone;M_.prototype[N3]=function(){return this.entries()};M_.prototype.$b=function(){-1===this.Ia&&(this.Ia=z_(this));return this.Ia};M_.prototype.Qb=function(a){return O_(this,a)};U_.prototype.toString=function(){return R_(this)};U_.prototype.inspect=function(){return this.toString()};
|
|
||||||
U_.prototype.add=function(a){this.map.set(a,a);this.size=this.map.size};U_.prototype.add=U_.prototype.add;U_.prototype.clear=function(){this.map=new M_;this.size=0};U_.prototype.clear=U_.prototype.clear;U_.prototype["delete"]=function(a){a=this.map.delete(a);this.size=this.map.size;return a};U_.prototype.entries=function(){return this.map.entries()};U_.prototype.entries=U_.prototype.entries;U_.prototype.forEach=function(a){var b=this;this.map.forEach(function(c,d){a(d,b)})};U_.prototype.forEach=U_.prototype.forEach;
|
|
||||||
U_.prototype.has=function(a){return this.map.has(a)};U_.prototype.has=U_.prototype.has;U_.prototype.keys=function(){return this.map.keys()};U_.prototype.keys=U_.prototype.keys;U_.prototype.bd=function(){return this.map.bd()};U_.prototype.keySet=U_.prototype.bd;U_.prototype.values=function(){return this.map.values()};U_.prototype.values=U_.prototype.values;U_.prototype.clone=function(){var a=V_();this.forEach(function(b){a.add(b)});return a};U_.prototype.clone=U_.prototype.clone;U_.prototype[N3]=function(){return this.values()};
|
|
||||||
U_.prototype.Qb=function(a){if(a instanceof U_){if(this.size===a.size)return v_(this.map,a.map)}else return!1};U_.prototype.$b=function(){return y_(this.map)};X_.prototype.Md={pb:{_:function(){return null},"?":function(a){return"t"===a},b:function(a,b){if(b&&!1===b.Kf||"undefined"==typeof $APP.ca.Le)if("undefined"!=typeof Uint8Array){if("undefined"!=typeof atob)var c=atob(a);else{a=String(a).replace(/=+$/,"");if(1==a.length%4)throw Error("'atob' failed: The string to be decoded is not correctly encoded.");b=0;for(var d,e=0,f="";d=a.charAt(e++);~d&&(c=b%4?64*c+d:d,b++%4)?f+=String.fromCharCode(255&c>>(-2*b&6)):0)d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".indexOf(d);
|
|
||||||
c=f}a=c.length;b=new Uint8Array(a);for(d=0;d<a;d++)b[d]=c.charCodeAt(d);c=b}else c=F_("b",a);else c=new $APP.ca.Le(a,"base64");return c},i:function(a){"number"===typeof a||a instanceof $APP.Oa||(a=SZ(a,10),a=0<a.compare(O3)||0>a.compare(P3)?a:$APP.Za(a));return a},n:function(a){return F_("n",a)},d:function(a){return parseFloat(a)},f:function(a){return F_("f",a)},c:function(a){return a},":":function(a){return new G_(a)},$:function(a){return new H_(a)},r:function(a){return F_("r",a)},z:function(a){a:switch(a){case "-INF":a=
|
|
||||||
-Infinity;break a;case "INF":a=Infinity;break a;case "NaN":a=NaN;break a;default:throw Error("Invalid special double value "+a);}return a},"'":function(a){return a},m:function(a){a="number"===typeof a?a:parseInt(a,10);return new Date(a)},t:function(a){return new Date(a)},u:function(a){a=a.replace(/-/g,"");var b,c;var d=b=0;for(c=24;8>d;d+=2,c-=8)b|=parseInt(a.substring(d,d+2),16)<<c;var e=0;d=8;for(c=24;16>d;d+=2,c-=8)e|=parseInt(a.substring(d,d+2),16)<<c;var f=$APP.Pa(e,b);b=0;d=16;for(c=24;24>d;d+=
|
|
||||||
2,c-=8)b|=parseInt(a.substring(d,d+2),16)<<c;e=0;for(c=d=24;32>d;d+=2,c-=8)e|=parseInt(a.substring(d,d+2),16)<<c;return new J_(f,$APP.Pa(e,b))},set:function(a){return V_(a)},list:function(a){return F_("list",a)},link:function(a){return F_("link",a)},cmap:function(a){return S_(a,!1)}},zf:function(a,b){return F_(a,b)},Ce:!0,Kf:!0};
|
|
||||||
X_.prototype.decode=function(a,b,c,d){if(null==a)return null;switch(typeof a){case "string":return q_(a,c)?(a=Z_(this,a),b&&b.write(a,c),b=a):b="^"===a.charAt(0)&&" "!==a.charAt(1)?b.read(a,c):Z_(this,a),b;case "object":if(u_(a))if("^ "===a[0])if(this.Sb)if(17>a.length&&this.Sb.fromArray){d=[];for(c=1;c<a.length;c+=2)d.push(this.decode(a[c],b,!0,!1)),d.push(this.decode(a[c+1],b,!1,!1));b=this.Sb.fromArray(d,a)}else{d=this.Sb.init(a);for(c=1;c<a.length;c+=2)d=this.Sb.add(d,this.decode(a[c],b,!0,!1),
|
|
||||||
this.decode(a[c+1],b,!1,!1),a);b=this.Sb.finalize(d,a)}else{d=[];for(c=1;c<a.length;c+=2)d.push(this.decode(a[c],b,!0,!1)),d.push(this.decode(a[c+1],b,!1,!1));b=S_(d,!1)}else b=Y_(this,a,b,c,d);else{c=w_(a);var e=c[0];if((d=1==c.length?this.decode(e,b,!1,!1):null)&&d instanceof W_)a=a[e],c=this.pb[d.Bb],b=null!=c?c(this.decode(a,b,!1,!0),this):F_(d.Bb,this.decode(a,b,!1,!1));else if(this.Sb)if(16>c.length&&this.Sb.fromArray){var f=[];for(d=0;d<c.length;d++)e=c[d],f.push(this.decode(e,b,!0,!1)),f.push(this.decode(a[e],
|
|
||||||
b,!1,!1));b=this.Sb.fromArray(f,a)}else{f=this.Sb.init(a);for(d=0;d<c.length;d++)e=c[d],f=this.Sb.add(f,this.decode(e,b,!0,!1),this.decode(a[e],b,!1,!1),a);b=this.Sb.finalize(f,a)}else{f=[];for(d=0;d<c.length;d++)e=c[d],f.push(this.decode(e,b,!0,!1)),f.push(this.decode(a[e],b,!1,!1));b=S_(f,!1)}}return b}return a};X_.prototype.decode=X_.prototype.decode;a0.prototype.read=function(a){var b=this.cache;a=this.Lh.qh.decode(JSON.parse(a),b);this.cache.clear();return a};a0.prototype.read=a0.prototype.read;var c0=0,T4=(8|3&Math.round(14*Math.random())).toString(16),b0="transit$guid$"+(p_()+p_()+p_()+p_()+p_()+p_()+p_()+p_()+"-"+p_()+p_()+p_()+p_()+"-4"+p_()+p_()+p_()+"-"+T4+p_()+p_()+p_()+"-"+p_()+p_()+p_()+p_()+p_()+p_()+p_()+p_()+p_()+p_()+p_()+p_());f0.prototype.tag=function(){return"_"};f0.prototype.rep=function(){return null};f0.prototype.stringRep=function(){return"null"};g0.prototype.tag=function(){return"s"};g0.prototype.rep=function(a){return a};g0.prototype.stringRep=function(a){return a};
|
|
||||||
h0.prototype.tag=function(){return"i"};h0.prototype.rep=function(a){return a};h0.prototype.stringRep=function(a){return a.toString()};i0.prototype.tag=function(){return"i"};i0.prototype.rep=function(a){return a.toString()};i0.prototype.stringRep=function(a){return a.toString()};j0.prototype.tag=function(){return"?"};j0.prototype.rep=function(a){return a};j0.prototype.stringRep=function(a){return a.toString()};k0.prototype.tag=function(){return"array"};k0.prototype.rep=function(a){return a};
|
|
||||||
k0.prototype.stringRep=function(){return null};l0.prototype.tag=function(){return"map"};l0.prototype.rep=function(a){return a};l0.prototype.stringRep=function(){return null};m0.prototype.tag=function(){return"t"};m0.prototype.rep=function(a){return a.getUTCFullYear()+"-"+e0(a.getUTCMonth()+1,2)+"-"+e0(a.getUTCDate(),2)+"T"+e0(a.getUTCHours(),2)+":"+e0(a.getUTCMinutes(),2)+":"+e0(a.getUTCSeconds(),2)+"."+e0(a.getUTCMilliseconds(),3)+"Z"};m0.prototype.stringRep=function(a,b){return b.rep(a)};
|
|
||||||
n0.prototype.tag=function(){return"m"};n0.prototype.rep=function(a){return a.valueOf()};n0.prototype.stringRep=function(a){return a.valueOf().toString()};n0.prototype.getVerboseHandler=function(){return new m0};o0.prototype.tag=function(){return"u"};o0.prototype.rep=function(a){return a.toString()};o0.prototype.stringRep=function(a){return a.toString()};p0.prototype.tag=function(){return":"};p0.prototype.rep=function(a){return a.kb};p0.prototype.stringRep=function(a,b){return b.rep(a)};
|
|
||||||
q0.prototype.tag=function(){return"$"};q0.prototype.rep=function(a){return a.kb};q0.prototype.stringRep=function(a,b){return b.rep(a)};r0.prototype.tag=function(a){return a.tag};r0.prototype.rep=function(a){return a.rep};r0.prototype.stringRep=function(){return null};s0.prototype.tag=function(){return"set"};s0.prototype.rep=function(a){var b=[];a.forEach(function(c){b.push(c)});return F_("array",b)};s0.prototype.stringRep=function(){return null};t0.prototype.tag=function(){return"map"};
|
|
||||||
t0.prototype.rep=function(a){return a};t0.prototype.stringRep=function(){return null};u0.prototype.tag=function(){return"map"};u0.prototype.rep=function(a){return a};u0.prototype.stringRep=function(){return null};v0.prototype.tag=function(){return"b"};v0.prototype.rep=function(a){return a.toString("base64")};v0.prototype.stringRep=function(){return null};w0.prototype.tag=function(){return"b"};
|
|
||||||
w0.prototype.rep=function(a){for(var b,c=0,d=a.length,e="",f;c<d;)f=a.subarray(c,Math.min(c+32768,d)),e+=String.fromCharCode.apply(null,f),c+=32768;if("undefined"!=typeof btoa)b=btoa(e);else{a=String(e);d=0;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d";for(f="";a.charAt(d|0)||(e="\x3d",d%1);f+=e.charAt(63&b>>8-d%1*8)){c=a.charCodeAt(d+=.75);if(255<c)throw Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");b=b<<8|c}b=f}return b};
|
|
||||||
w0.prototype.stringRep=function(){return null};x0.prototype.get=function(a){a="string"===typeof a?this.pb[a]:this.pb[d0(a)];return null!=a?a:this.pb["default"]};x0.prototype.get=x0.prototype.get;x0.prototype.set=function(a,b){var c;if(c="string"===typeof a)a:{switch(a){case "null":case "string":case "boolean":case "number":case "array":case "map":c=!1;break a}c=!0}c?this.pb[a]=b:this.pb[d0(a)]=b};y0.prototype.Rc=function(a){var b=this.pb.get(null==a?null:a.constructor);return null!=b?b:(a=a&&a.transitTag)?this.pb.get(a):null};G0.prototype.th=function(){return this.Ad};G0.prototype.marshaller=G0.prototype.th;
|
|
||||||
G0.prototype.write=function(a,b){var c=b||{};b=c.asMapKey||!1;var d=this.Ad.le?!1:this.cache;if(!1===c.marshalTop)a=A0(this.Ad,a,b,d);else{c=this.Ad;var e=JSON,f=e.stringify,g=A0;var l=c.Rc(a)||(c.Vd?c.Vd(a,c.pb):null);if(null!=l)a=1===l.tag(a).length?F_("'",a):a;else throw b=(null==a?null:a.constructor).name,d=Error("Cannot write "+b),d.data={If:a,type:b},d;a=f.call(e,g(c,a,b,d))}null!=this.cache&&this.cache.clear();return a};G0.prototype.write=G0.prototype.write;
|
|
||||||
G0.prototype.register=function(a,b){this.Ad.pb.set(a,b)};G0.prototype.register=G0.prototype.register;$APP.Bk.prototype.N=function(a,b){return b instanceof $APP.Bk?this.pc===b.pc:b instanceof J_?this.pc===b.toString():!1};$APP.Bk.prototype.sc=$APP.Cd;$APP.Bk.prototype.Ob=function(a,b){if(b instanceof $APP.Bk||b instanceof J_)return $APP.$e(this.toString(),b.toString());throw Error(["Cannot compare ",$APP.q.h(this)," to ",$APP.q.h(b)].join(""));};J_.prototype.sc=$APP.Cd;
|
|
||||||
J_.prototype.Ob=function(a,b){if(b instanceof $APP.Bk||b instanceof J_)return $APP.$e(this.toString(),b.toString());throw Error(["Cannot compare ",$APP.q.h(this)," to ",$APP.q.h(b)].join(""));};$APP.Oa.prototype.N=function(a,b){return this.equiv(b)};J_.prototype.N=function(a,b){return b instanceof $APP.Bk?b.N(null,this):this.equiv(b)};E_.prototype.N=function(a,b){return this.equiv(b)};$APP.Oa.prototype.af=$APP.Cd;$APP.Oa.prototype.V=function(){return y_(this)};J_.prototype.af=$APP.Cd;
|
|
||||||
J_.prototype.V=function(){return $APP.Ed(this.toString())};E_.prototype.af=$APP.Cd;E_.prototype.V=function(){return y_(this)};J_.prototype.ga=$APP.Cd;J_.prototype.S=function(a,b){return $APP.Vc(b,['#uuid "',$APP.q.h(this.toString()),'"'].join(""))};K0.prototype.init=function(){return $APP.bd($APP.ig)};K0.prototype.add=function(a,b,c){return $APP.Oh.j(a,b,c)};K0.prototype.finalize=function(a){return $APP.dd(a)};
|
|
||||||
K0.prototype.fromArray=function(a){return $APP.Kh.j?$APP.Kh.j(a,!0,!0):$APP.Kh.call(null,a,!0,!0)};L0.prototype.init=function(){return $APP.bd($APP.lh)};L0.prototype.add=function(a,b){return $APP.gh.g(a,b)};L0.prototype.finalize=function(a){return $APP.dd(a)};L0.prototype.fromArray=function(a){return $APP.hh.g?$APP.hh.g(a,!0):$APP.hh.call(null,a,!0)};P0.prototype.tag=function(){return":"};P0.prototype.rep=function(a){return a.na};P0.prototype.stringRep=function(a){return a.na};Q0.prototype.tag=function(){return"$"};
|
|
||||||
Q0.prototype.rep=function(a){return a.Bb};Q0.prototype.stringRep=function(a){return a.Bb};R0.prototype.tag=function(){return"list"};R0.prototype.rep=function(a){var b=[];a=$APP.z(a);for(var c=null,d=0,e=0;;)if(e<d){var f=c.U(null,e);b.push(f);e+=1}else if(a=$APP.z(a))c=a,$APP.Ke(c)?(a=$APP.jd(c),e=$APP.kd(c),c=a,d=$APP.he(a),a=e):(a=$APP.A(c),b.push(a),a=$APP.G(c),c=null,d=0),e=0;else break;return F_("array",b)};R0.prototype.stringRep=function(){return null};S0.prototype.tag=function(){return"map"};
|
|
||||||
S0.prototype.rep=function(a){return a};S0.prototype.stringRep=function(){return null};T0.prototype.tag=function(){return"set"};T0.prototype.rep=function(a){var b=[];a=$APP.z(a);for(var c=null,d=0,e=0;;)if(e<d){var f=c.U(null,e);b.push(f);e+=1}else if(a=$APP.z(a))c=a,$APP.Ke(c)?(a=$APP.jd(c),e=$APP.kd(c),c=a,d=$APP.he(a),a=e):(a=$APP.A(c),b.push(a),a=$APP.G(c),c=null,d=0),e=0;else break;return F_("array",b)};T0.prototype.stringRep=function(){return null};U0.prototype.tag=function(){return"array"};
|
|
||||||
U0.prototype.rep=function(a){var b=[];a=$APP.z(a);for(var c=null,d=0,e=0;;)if(e<d){var f=c.U(null,e);b.push(f);e+=1}else if(a=$APP.z(a))c=a,$APP.Ke(c)?(a=$APP.jd(c),e=$APP.kd(c),c=a,d=$APP.he(a),a=e):(a=$APP.A(c),b.push(a),a=$APP.G(c),c=null,d=0),e=0;else break;return b};U0.prototype.stringRep=function(){return null};V0.prototype.tag=function(){return"u"};V0.prototype.rep=function(a){return a.pc};V0.prototype.stringRep=function(a){return this.rep(a)};X0.prototype.tag=function(){return"with-meta"};
|
|
||||||
X0.prototype.rep=function(a){return F_("array",[a.value,a.F])};X0.prototype.stringRep=function(){return null};var R3=function R3(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return R3.l(arguments[0],arguments[1],arguments[2],3<c.length?new $APP.Kd(c.slice(3),0,null):null)};R3.l=function(a,b,c,d){return new $APP.T(null,2,5,$APP.V,[!1,$APP.ff.j($APP.wf,new $APP.vb(null,3,[$APP.gC,a,B3,b,v3,c],null),$APP.vj.g($APP.mh,$APP.bm.g(2,d)))],null)};R3.o=3;R3.v=function(a){var b=$APP.A(a),c=$APP.G(a);a=$APP.A(c);var d=$APP.G(c);c=$APP.A(d);d=$APP.G(d);return this.l(b,a,c,d)};
|
|
||||||
$APP.h=$0.prototype;$APP.h.pa=function(a,b){return this.T(null,b,null)};$APP.h.T=function(a,b,c){switch(b instanceof $APP.S?b.na:null){case "read":return this.read;case "description":return this.description;case "content-type":return this.ac;default:return $APP.Q.j(this.G,b,c)}};$APP.h.Fb=function(a,b,c){return $APP.ff.j(function(d,e){var f=$APP.M.j(e,0,null);e=$APP.M.j(e,1,null);return b.j?b.j(d,f,e):b.call(null,d,f,e)},c,this)};
|
|
||||||
$APP.h.Cd=function(a,b){a=$APP.dg(a);$APP.Q.g(a,n_);a=$APP.dg(this);var c=$APP.Q.g(a,n_);return $APP.Jp.j(b,A1,function(d){return $APP.Zl.l($APP.N([new $APP.vb(null,1,["Accept",Z0(c)],null),$APP.p(d)?d:$APP.ig]))})};
|
|
||||||
$APP.h.Dd=function(a,b){a=$APP.dg(a);$APP.Q.g(a,a1);a=$APP.dg(this);var c=$APP.Q.g(a,a1);try{var d=UZ(b),e=$APP.Hq.g(R3,d);switch(d){case 0:return e("Request failed.",E3);case -1:return $APP.p(ZZ(b))?e("Request aborted by client.",I3):e("Request timed out.",z3);case 204:return new $APP.T(null,2,5,$APP.V,[!0,null],null);case 205:return new $APP.T(null,2,5,$APP.V,[!0,null],null);default:try{var f=c.h?c.h(b):c.call(null,b);return $APP.Xe(M3,d)?new $APP.T(null,2,5,$APP.V,[!0,f],null):e(VZ(b),$APP.jF,
|
|
||||||
y3,f)}catch(w){if(w instanceof Object){f=w;e=$APP.V;var g=$APP.dg(a),l=$APP.Q.g(g,b1),n=new $APP.vb(null,3,[$APP.gC,d,v3,$APP.jF,y3,null],null),k=[$APP.q.h(f.message)," Format should have been ",$APP.q.h(l)].join(""),r=$APP.Ni.l(n,B3,k,$APP.N([v3,$APP.oE,A3,XZ(b)]));var v=$APP.Xe(M3,d)?r:$APP.Ni.l(n,B3,VZ(b),$APP.N([q3,r]));return new $APP.T(null,2,5,e,[!1,v],null)}throw w;}}}catch(w){if(w instanceof Object)return f=w,R3.l(0,f.message,r3,$APP.N([r3,f]));throw w;}};
|
|
||||||
$APP.h.S=function(a,b,c){return $APP.oj(b,function(d){return $APP.oj(b,$APP.uj,""," ","",c,d)},"#ajax.interceptors.ResponseFormat{",", ","}",c,$APP.Y.g(new $APP.T(null,3,5,$APP.V,[new $APP.T(null,2,5,$APP.V,[a1,this.read],null),new $APP.T(null,2,5,$APP.V,[b1,this.description],null),new $APP.T(null,2,5,$APP.V,[n_,this.ac],null)],null),this.G))};$APP.h.ib=function(){return new $APP.Eh(this,3,new $APP.T(null,3,5,$APP.V,[a1,b1,n_],null),$APP.p(this.G)?$APP.sd(this.G):$APP.jg())};$APP.h.W=function(){return this.O};
|
|
||||||
$APP.h.aa=function(){return new $0(this.read,this.description,this.ac,this.O,this.G,this.H)};$APP.h.ba=function(){return 3+$APP.he(this.G)};$APP.h.V=function(){var a=this.H;return null!=a?a:this.H=a=-2103965186^$APP.Sd(this)};$APP.h.N=function(a,b){return null!=b&&this.constructor===b.constructor&&$APP.K.g(this.read,b.read)&&$APP.K.g(this.description,b.description)&&$APP.K.g(this.ac,b.ac)&&$APP.K.g(this.G,b.G)};
|
|
||||||
$APP.h.Pb=function(a,b){return $APP.Xe(new $APP.Qi(null,new $APP.vb(null,3,[b1,null,a1,null,n_,null],null),null),b)?$APP.$l.g($APP.Bc($APP.$o.g($APP.ig,this),this.O),b):new $0(this.read,this.description,this.ac,this.O,$APP.eg($APP.$l.g(this.G,b)),null)};$APP.h.wb=function(a,b){switch(b instanceof $APP.S?b.na:null){case "read":case "description":case "content-type":return!0;default:return $APP.Xe(this.G,b)}};
|
|
||||||
$APP.h.Ga=function(a,b,c){return $APP.p($APP.Cf.g?$APP.Cf.g(a1,b):$APP.Cf.call(null,a1,b))?new $0(c,this.description,this.ac,this.O,this.G,null):$APP.p($APP.Cf.g?$APP.Cf.g(b1,b):$APP.Cf.call(null,b1,b))?new $0(this.read,c,this.ac,this.O,this.G,null):$APP.p($APP.Cf.g?$APP.Cf.g(n_,b):$APP.Cf.call(null,n_,b))?new $0(this.read,this.description,c,this.O,this.G,null):new $0(this.read,this.description,this.ac,this.O,$APP.Ni.j(this.G,b,c),null)};
|
|
||||||
$APP.h.X=function(){return $APP.z($APP.Y.g(new $APP.T(null,3,5,$APP.V,[new $APP.Ye(a1,this.read,null),new $APP.Ye(b1,this.description,null),new $APP.Ye(n_,this.ac,null)],null),this.G))};$APP.h.Y=function(a,b){return new $0(this.read,this.description,this.ac,b,this.G,this.H)};$APP.h.ea=function(a,b){return $APP.Je(b)?this.Ga(null,$APP.P(b,0),$APP.P(b,1)):$APP.ff.j($APP.Zb,this,b)};$APP.h=d1.prototype;$APP.h.pa=function(a,b){return this.T(null,b,null)};
|
|
||||||
$APP.h.T=function(a,b,c){return $APP.Q.j(this.G,b,c)};$APP.h.Fb=function(a,b,c){return $APP.ff.j(function(d,e){var f=$APP.M.j(e,0,null);e=$APP.M.j(e,1,null);return b.j?b.j(d,f,e):b.call(null,d,f,e)},c,this)};
|
|
||||||
$APP.h.Cd=function(a,b){a=$APP.dg(b);$APP.Q.g(a,i3);$APP.Q.g(a,e1);var c=$APP.Q.g(a,z1),d=$APP.Q.g(a,$APP.In);b=$APP.Q.g(a,A1);var e=$APP.He(c)?c:c instanceof $APP.S?b_(new $APP.T(null,2,5,$APP.V,["keywords are not allowed as request formats in ajax calls: ",c],null)):$APP.Re(c)?new $APP.vb(null,2,[m_,c,n_,"text/plain"],null):$APP.ig;e=$APP.dg(e);var f=$APP.Q.g(e,m_);e=$APP.Q.g(e,n_);c=null!=f?f.h?f.h(d):f.call(null,d):b_(new $APP.T(null,2,5,$APP.V,["unrecognized request format: ",c],null));b=$APP.p(b)?
|
|
||||||
b:$APP.ig;return $APP.Ni.l(a,$APP.Jn,c,$APP.N([A1,$APP.p(e)?$APP.Ni.j(b,"Content-Type",Z0(e)):b]))};$APP.h.Dd=function(a,b){return b};$APP.h.S=function(a,b,c){return $APP.oj(b,function(d){return $APP.oj(b,$APP.uj,""," ","",c,d)},"#ajax.interceptors.ApplyRequestFormat{",", ","}",c,$APP.Y.g($APP.lh,this.G))};$APP.h.ib=function(){return new $APP.Eh(this,0,$APP.lh,$APP.p(this.G)?$APP.sd(this.G):$APP.jg())};$APP.h.W=function(){return this.O};$APP.h.aa=function(){return new d1(this.O,this.G,this.H)};
|
|
||||||
$APP.h.ba=function(){return 0+$APP.he(this.G)};$APP.h.V=function(){var a=this.H;return null!=a?a:this.H=a=1698259290^$APP.Sd(this)};$APP.h.N=function(a,b){return null!=b&&this.constructor===b.constructor&&$APP.K.g(this.G,b.G)};$APP.h.Pb=function(a,b){return $APP.Xe($APP.Ri,b)?$APP.$l.g($APP.Bc($APP.$o.g($APP.ig,this),this.O),b):new d1(this.O,$APP.eg($APP.$l.g(this.G,b)),null)};$APP.h.wb=function(a,b){return $APP.Xe(this.G,b)};$APP.h.Ga=function(a,b,c){return new d1(this.O,$APP.Ni.j(this.G,b,c),null)};
|
|
||||||
$APP.h.X=function(){return $APP.z($APP.Y.g($APP.lh,this.G))};$APP.h.Y=function(a,b){return new d1(b,this.G,this.H)};$APP.h.ea=function(a,b){return $APP.Je(b)?this.Ga(null,$APP.P(b,0),$APP.P(b,1)):$APP.ff.j($APP.Zb,this,b)};$APP.h=h1.prototype;$APP.h.pa=function(a,b){return this.T(null,b,null)};$APP.h.T=function(a,b,c){return $APP.Q.j(this.G,b,c)};$APP.h.Fb=function(a,b,c){return $APP.ff.j(function(d,e){var f=$APP.M.j(e,0,null);e=$APP.M.j(e,1,null);return b.j?b.j(d,f,e):b.call(null,d,f,e)},c,this)};
|
|
||||||
$APP.h.Cd=function(a,b){b=$APP.dg(b);a=$APP.Q.g(b,e1);b=$APP.Jp.j(b,i3,$APP.Hq.g(g1,b));return $APP.K.g(a,"GET")?$APP.Wd(b):b};$APP.h.Dd=function(a,b){return b};$APP.h.S=function(a,b,c){return $APP.oj(b,function(d){return $APP.oj(b,$APP.uj,""," ","",c,d)},"#ajax.interceptors.ProcessUrlParameters{",", ","}",c,$APP.Y.g($APP.lh,this.G))};$APP.h.ib=function(){return new $APP.Eh(this,0,$APP.lh,$APP.p(this.G)?$APP.sd(this.G):$APP.jg())};$APP.h.W=function(){return this.O};
|
|
||||||
$APP.h.aa=function(){return new h1(this.O,this.G,this.H)};$APP.h.ba=function(){return 0+$APP.he(this.G)};$APP.h.V=function(){var a=this.H;return null!=a?a:this.H=a=-516728758^$APP.Sd(this)};$APP.h.N=function(a,b){return null!=b&&this.constructor===b.constructor&&$APP.K.g(this.G,b.G)};$APP.h.Pb=function(a,b){return $APP.Xe($APP.Ri,b)?$APP.$l.g($APP.Bc($APP.$o.g($APP.ig,this),this.O),b):new h1(this.O,$APP.eg($APP.$l.g(this.G,b)),null)};$APP.h.wb=function(a,b){return $APP.Xe(this.G,b)};
|
|
||||||
$APP.h.Ga=function(a,b,c){return new h1(this.O,$APP.Ni.j(this.G,b,c),null)};$APP.h.X=function(){return $APP.z($APP.Y.g($APP.lh,this.G))};$APP.h.Y=function(a,b){return new h1(b,this.G,this.H)};$APP.h.ea=function(a,b){return $APP.Je(b)?this.Ga(null,$APP.P(b,0),$APP.P(b,1)):$APP.ff.j($APP.Zb,this,b)};$APP.h=i1.prototype;$APP.h.pa=function(a,b){return this.T(null,b,null)};$APP.h.T=function(a,b,c){return $APP.Q.j(this.G,b,c)};
|
|
||||||
$APP.h.Fb=function(a,b,c){return $APP.ff.j(function(d,e){var f=$APP.M.j(e,0,null);e=$APP.M.j(e,1,null);return b.j?b.j(d,f,e):b.call(null,d,f,e)},c,this)};$APP.h.Cd=function(a,b){a=$APP.dg(b);return null==$APP.Q.g(a,$APP.Jn)?a:$APP.Wd(a)};$APP.h.Dd=function(a,b){return b};$APP.h.S=function(a,b,c){return $APP.oj(b,function(d){return $APP.oj(b,$APP.uj,""," ","",c,d)},"#ajax.interceptors.DirectSubmission{",", ","}",c,$APP.Y.g($APP.lh,this.G))};
|
|
||||||
$APP.h.ib=function(){return new $APP.Eh(this,0,$APP.lh,$APP.p(this.G)?$APP.sd(this.G):$APP.jg())};$APP.h.W=function(){return this.O};$APP.h.aa=function(){return new i1(this.O,this.G,this.H)};$APP.h.ba=function(){return 0+$APP.he(this.G)};$APP.h.V=function(){var a=this.H;return null!=a?a:this.H=a=-1077152635^$APP.Sd(this)};$APP.h.N=function(a,b){return null!=b&&this.constructor===b.constructor&&$APP.K.g(this.G,b.G)};
|
|
||||||
$APP.h.Pb=function(a,b){return $APP.Xe($APP.Ri,b)?$APP.$l.g($APP.Bc($APP.$o.g($APP.ig,this),this.O),b):new i1(this.O,$APP.eg($APP.$l.g(this.G,b)),null)};$APP.h.wb=function(a,b){return $APP.Xe(this.G,b)};$APP.h.Ga=function(a,b,c){return new i1(this.O,$APP.Ni.j(this.G,b,c),null)};$APP.h.X=function(){return $APP.z($APP.Y.g($APP.lh,this.G))};$APP.h.Y=function(a,b){return new i1(b,this.G,this.H)};$APP.h.ea=function(a,b){return $APP.Je(b)?this.Ga(null,$APP.P(b,0),$APP.P(b,1)):$APP.ff.j($APP.Zb,this,b)};
|
|
||||||
var W2=new $APP.T(null,3,5,$APP.V,[new h1(null,null,null),new i1(null,null,null),new d1(null,null,null)],null);var S3=function(a){return function(){function b(e){e=$APP.dg(e);var f=$APP.Q.g(e,s3),g=$APP.Q.g(e,t3),l=$APP.Q.g(e,D3);return c1(new $APP.vb(null,3,[a1,function(n){n=XZ(n);n=$APP.p($APP.p(f)?$APP.K.g(0,n.indexOf(f)):f)?n.substring(f.length):n;return a.j?a.j(l,g,n):a.call(null,l,g,n)},b1,["JSON",$APP.p(f)?[" prefix '",$APP.q.h(f),"'"].join(""):null,$APP.p(g)?" keywordize":null].join(""),n_,new $APP.T(null,1,5,$APP.V,["application/json"],null)],null))}function c(){return d.h($APP.ig)}var d=null;d=function(e){switch(arguments.length){case 0:return c.call(this);
|
|
||||||
case 1:return b.call(this,e)}throw Error("Invalid arity: "+arguments.length);};d.s=c;d.h=b;return d}()}(function(a,b,c){c=JSON.parse(c);return $APP.p(a)?c:$APP.Zo.l(c,$APP.N([$APP.nC,b]))}),Z2=function(a){return function(){return new $APP.vb(null,2,[m_,a,n_,"application/json"],null)}}(function(a){return JSON.stringify($APP.ho(a))});var T3=function T3(a){switch(arguments.length){case 0:return T3.s();case 1:return T3.h(arguments[0]);case 2:return T3.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.q.h(arguments.length)].join(""));}};T3.s=function(){return T3.h($APP.ig)};T3.h=function(a){return T3.g(m1(a),a)};T3.g=function(a,b){return c1(new $APP.vb(null,3,[a1,s1(b),b1,"Transit",n_,new $APP.T(null,1,5,$APP.V,["application/transit+json"],null)],null))};T3.o=2;var U3=function U3(a){switch(arguments.length){case 0:return U3.s();case 1:return U3.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.q.h(arguments.length)].join(""));}};U3.s=function(){return c1(new $APP.vb(null,3,[a1,XZ,b1,"raw text",n_,new $APP.T(null,1,5,$APP.V,["*/*"],null)],null))};U3.h=function(){return U3.s()};U3.o=1;var t1=function t1(a,b){return null==b||$APP.He(b)?b:$APP.Je(b)?(b=$APP.pe(b),t1.g?t1.g(a,b):t1.call(null,a,b)):b.h?b.h(a):b.call(null,a)};/*
|
|
||||||
|
|
||||||
Copyright The Closure Library Authors.
|
|
||||||
SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
var V3=HZ("Opera"),G2=HZ("Trident")||HZ("MSIE"),W3=HZ("Edge"),X3=HZ("Gecko")&&!(-1!=$APP.zA.toLowerCase().indexOf("webkit")&&!HZ("Edge"))&&!(HZ("Trident")||HZ("MSIE"))&&!HZ("Edge"),Y3=-1!=$APP.zA.toLowerCase().indexOf("webkit")&&!HZ("Edge");Y3&&HZ("Mobile");HZ("Macintosh");HZ("Windows");HZ("Linux")||HZ("CrOS");var U4=$APP.ca.navigator||null;U4&&(U4.appVersion||"").indexOf("X11");HZ("Android");C1();HZ("iPad");HZ("iPod");C1()||HZ("iPad")||HZ("iPod");$APP.zA.toLowerCase().indexOf("kaios");var F1;
|
|
||||||
a:{var V4="",W4=function(){var a=$APP.zA;if(X3)return/rv:([^\);]+)(\)|;)/.exec(a);if(W3)return/Edge\/([\d\.]+)/.exec(a);if(G2)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Y3)return/WebKit\/(\S+)/.exec(a);if(V3)return/(?:Version)[ \/]?(\S+)/.exec(a)}();W4&&(V4=W4?W4[1]:"");if(G2){var X4=D1();if(null!=X4&&X4>parseFloat(V4)){F1=String(X4);break a}}F1=V4}var E1={},Y4;if($APP.ca.document&&G2){var Z4=D1();Y4=Z4?Z4:parseInt(F1,10)||void 0}else Y4=void 0;var e4=Y4;var H1=0,I1={};J1.prototype.Nd=!1;J1.prototype.rg=function(){if(!this.Nd&&(this.Nd=!0,this.Yc(),0!=H1)){var a=$APP.Ha(this);if(0!=H1&&this.xd&&0<this.xd.length)throw Error(this+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete I1[a]}};J1.prototype.Yc=function(){if(this.xd)for(;this.xd.length;)this.xd.shift()()};var $4;($4=!G2)||($4=9<=Number(e4));var p2=$4,g4=G2&&!G1("9"),l2=function(){if(!$APP.ca.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});try{$APP.ca.addEventListener("test",$APP.ia,b),$APP.ca.removeEventListener("test",$APP.ia,b)}catch(c){}return a}();K1.prototype.stopPropagation=function(){this.ed=!0};K1.prototype.preventDefault=function(){this.defaultPrevented=!0};BZ(L1,K1);var h4={2:"touch",3:"pen",4:"mouse"};
|
|
||||||
L1.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;if(b=a.relatedTarget){if(X3){a:{try{$APP.Ja(b.nodeName);var e=!0;break a}catch(f){}e=!1}e||(b=null)}}else"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;d?(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=
|
|
||||||
d.screenY||0):(this.offsetX=Y3||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=Y3||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.key=a.key||"";this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.pointerId=
|
|
||||||
a.pointerId||0;this.pointerType="string"===typeof a.pointerType?a.pointerType:h4[a.pointerType]||"";this.state=a.state;this.Od=a;a.defaultPrevented&&this.preventDefault()};L1.prototype.stopPropagation=function(){L1.ie.stopPropagation.call(this);this.Od.stopPropagation?this.Od.stopPropagation():this.Od.cancelBubble=!0};
|
|
||||||
L1.prototype.preventDefault=function(){L1.ie.preventDefault.call(this);var a=this.Od;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,g4)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var g2="closure_listenable_"+(1E6*Math.random()|0),M1=0;P1.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.Db[f];a||(a=this.Db[f]=[],this.ke++);var g=R1(a,b,d,e);-1<g?(b=a[g],c||(b.re=!1)):(b=new N1(b,this.src,f,!!d,e),b.re=c,a.push(b));return b};P1.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.Db))return!1;var e=this.Db[a];b=R1(e,b,c,d);return-1<b?(O1(e[b]),Array.prototype.splice.call(e,b,1),0==e.length&&(delete this.Db[a],this.ke--),!0):!1};
|
|
||||||
P1.prototype.Df=function(a,b,c,d){a=this.Db[a.toString()];var e=-1;a&&(e=R1(a,b,c,d));return-1<e?a[e]:null};BZ(S1,J1);S1.prototype.xf=function(){return this.yf?this.yf():{}};S1.prototype.Yc=function(){S1.ie.Yc.call(this);for(var a=this.Sd;a.length;)U1(this,a.pop());delete this.Sd};X1.prototype.toString=function(){var a=[];a.push(this.type," ",this.count," (",Math.round(10*this.time)/10," ms)");this.Tf&&a.push(" [VarAlloc \x3d ",this.Tf,"]");return a.join("")};W1.prototype.toString=function(){return null==this.type?this.oh:"["+this.type+"] "+this.oh};var b2={hi:!0};Y1.prototype.Jg=function(){this.Qf={}};
|
|
||||||
Y1.prototype.reset=function(){c2(this);for(var a=0;a<this.Pd.length;a++){var b=this.Pd[a];b.id?OZ(this.ae.fc,b.id)||(V1(this.wg,b.id),V1(this.Bf,b)):V1(this.Bf,b)}this.Pd.length=0;this.Qg=Date.now();this.qg=this.Ug=this.Vg=this.Wg=this.Xg=0;a=this.he.Rb();for(b=0;b<a.length;b++){var c=this.he.get(a[b]);c.count=0;c.time=0;c.Tf=0;V1(this.Rg,c)}this.he.clear()};
|
|
||||||
Y1.prototype.toString=function(){for(var a=[],b=-1,c=[],d=0;d<this.Pd.length;d++){var e=this.Pd[d];1==e.Cf&&c.pop();a.push(" ",a2(e,this.Qg,b,c.join("")));b=e.tg;a.push("\n");0==e.Cf&&c.push("| ")}if(0!=this.ae.vc){var f=Date.now();a.push(" Unstopped timers:\n");NZ(this.ae,function(g){a.push(" ",g," (",f-g.startTime," ms, started at ",$1(g.startTime),")\n")})}b=this.he.Rb();for(d=0;d<b.length;d++)c=this.he.get(b[d]),1<c.count&&a.push(" TOTAL ",c,"\n");a.push("Total tracers created ",this.Ug,"\n",
|
|
||||||
"Total comments created ",this.qg,"\n","Overhead start: ",this.Xg," ms\n","Overhead end: ",this.Wg," ms\n","Overhead comment: ",this.Vg," ms\n");return a.join("")};new Y1;var j2="closure_lm_"+(1E6*Math.random()|0),s2={},n2=0,v2="__closure_events_fn_"+(1E9*Math.random()>>>0);BZ(w2,J1);w2.prototype[g2]=!0;$APP.h=w2.prototype;$APP.h.addEventListener=function(a,b,c,d){e2(this,a,b,c,d)};$APP.h.removeEventListener=function(a,b,c,d){q2(this,a,b,c,d)};
|
|
||||||
$APP.h.dispatchEvent=function(a){var b,c=this.Jf;if(c)for(b=[];c;c=c.Jf)b.push(c);c=this.Yg;var d=a.type||a;if("string"===typeof a)a=new K1(a,c);else if(a instanceof K1)a.target=a.target||c;else{var e=a;a=new K1(d,c);$APP.pb(a,e)}e=!0;if(b)for(var f=b.length-1;!a.ed&&0<=f;f--){var g=a.currentTarget=b[f];e=x2(g,d,!0,a)&&e}a.ed||(g=a.currentTarget=c,e=x2(g,d,!0,a)&&e,a.ed||(e=x2(g,d,!1,a)&&e));if(b)for(f=0;!a.ed&&f<b.length;f++)g=a.currentTarget=b[f],e=x2(g,d,!1,a)&&e;return e};
|
|
||||||
$APP.h.Yc=function(){w2.ie.Yc.call(this);this.Jg();this.Jf=null};$APP.h.Jg=function(){if(this.Hc){var a=this.Hc,b=0,c;for(c in a.Db){for(var d=a.Db[c],e=0;e<d.length;e++)++b,O1(d[e]);delete a.Db[c];a.ke--}}};$APP.h.Df=function(a,b,c,d){return this.Hc.Df(String(a),b,c,d)};z2.prototype.bg=null;var i4;BZ(C2,z2);i4=new C2;BZ(F2,w2);var E2="",N2=/^https?$/i,j4=["POST","PUT"];$APP.h=F2.prototype;$APP.h.setTimeoutInterval=function(a){this.je=Math.max(0,a)};$APP.h.setResponseType=function(a){this.De=a};$APP.h.setWithCredentials=function(a){this.Vf=a};$APP.h.setProgressEventsEnabled=function(a){this.Fg=a};
|
|
||||||
$APP.h.send=function(a,b,c,d){if(this.da)throw Error("[goog.net.XhrIo] Object is active with another request\x3d"+this.Hf+"; newUri\x3d"+a);b=b?b.toUpperCase():"GET";this.Hf=a;this.Be="";this.wd=0;this.Af=!1;this.Kc=!0;this.da=this.Ke?D2(this.Ke):D2(i4);this.Je=this.Ke?B2(this.Ke):B2(i4);this.da.onreadystatechange=AZ(this.Dg,this);this.Fg&&"onprogress"in this.da&&(this.da.onprogress=AZ(function(f){this.Cg(f,!0)},this),this.da.upload&&(this.da.upload.onprogress=AZ(this.Cg,this)));try{this.getStatus(),
|
|
||||||
this.Ef=!0,this.da.open(b,String(a),!0),this.Ef=!1}catch(f){this.getStatus();K2(this,f);return}a=c||"";const e=this.headers.clone();d&&KZ(d,function(f,g){e.set(g,f)});d=EZ(e.Rb());c=$APP.ca.FormData&&a instanceof $APP.ca.FormData;!(0<=(0,$APP.wA)(j4,b))||d||c||e.set("Content-Type","application/x-www-form-urlencoded;charset\x3dutf-8");e.forEach(function(f,g){this.da.setRequestHeader(g,f)},this);this.De&&(this.da.responseType=this.De);"withCredentials"in this.da&&this.da.withCredentials!==this.Vf&&
|
|
||||||
(this.da.withCredentials=this.Vf);try{Q2(this),0<this.je&&(this.Rf=H2(this.da),this.getStatus(),this.Rf?(this.da.timeout=this.je,this.da.ontimeout=AZ(this.Tg,this)):this.Fe=y2(this.Tg,this.je,this)),this.getStatus(),this.Ae=!0,this.da.send(a),this.Ae=!1}catch(f){this.getStatus(),K2(this,f)}};$APP.h.Tg=function(){"undefined"!=typeof $APP.vA&&this.da&&(this.Be="Timed out after "+this.je+"ms, aborting",this.wd=8,this.getStatus(),this.dispatchEvent("timeout"),this.abort(8))};
|
|
||||||
$APP.h.abort=function(a){this.da&&this.Kc&&(this.getStatus(),this.Kc=!1,this.$c=!0,this.da.abort(),this.$c=!1,this.wd=a||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),J2(this))};$APP.h.Yc=function(){this.da&&(this.Kc&&(this.Kc=!1,this.$c=!0,this.da.abort(),this.$c=!1),J2(this,!0));F2.ie.Yc.call(this)};$APP.h.Dg=function(){this.Nd||(this.Ef||this.Ae||this.$c?O2(this):this.yh())};$APP.h.yh=function(){O2(this)};
|
|
||||||
$APP.h.Cg=function(a,b){this.dispatchEvent(P2(a,"progress"));this.dispatchEvent(P2(a,b?"downloadprogress":"uploadprogress"))};$APP.h.getStatus=function(){try{return 2<L2(this)?this.da.status:-1}catch(a){return-1}};$APP.h.getStatusText=function(){try{return 2<L2(this)?this.da.statusText:""}catch(a){return""}};
|
|
||||||
$APP.h.getResponse=function(){try{if(!this.da)return null;if("response"in this.da)return this.da.response;switch(this.De){case E2:case "text":return this.da.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in this.da)return this.da.mozResponseArrayBuffer}return null}catch(a){return null}};$APP.h.getResponseHeader=function(a){if(this.da&&4==L2(this))return a=this.da.getResponseHeader(a),null===a?void 0:a};
|
|
||||||
$APP.h.getAllResponseHeaders=function(){return this.da&&4==L2(this)?this.da.getAllResponseHeaders()||"":""};$APP.h.getResponseHeaders=function(){const a={},b=this.getAllResponseHeaders().split("\r\n");for(let d=0;d<b.length;d++){if($APP.sb(b[d]))continue;var c=IZ(b[d],":",1);const e=c[0];c=c[1];if("string"!==typeof c)continue;c=c.trim();const f=a[e]||[];a[e]=f;f.push(c)}return FZ(a,function(d){return d.join(", ")})};$APP.h.getLastErrorCode=function(){return this.wd};var V2=$APP.ek.h($APP.lh);var k4=$APP.ek.h(new $APP.T(null,6,5,$APP.V,[new $APP.T(null,2,5,$APP.V,["application/transit+json",T3],null),new $APP.T(null,2,5,$APP.V,["application/transit+transit",T3],null),new $APP.T(null,2,5,$APP.V,["application/json",S3],null),new $APP.T(null,2,5,$APP.V,["text/plain",U3],null),new $APP.T(null,2,5,$APP.V,["text/html",U3],null),new $APP.T(null,2,5,$APP.V,["*/*",U3],null)],null)),a3=function a3(a,b){if($APP.Je(a)){var d=$APP.V,e=$APP.A(a);a=$APP.pe(a);b=a3.g?a3.g(a,b):a3.call(null,a,b);return new $APP.T(null,
|
|
||||||
2,5,d,[e,b],null)}if($APP.He(a))return a;if($APP.ve(a))return new $APP.vb(null,2,[a1,a,b1,"custom"],null);if(null==a)return j1(new $APP.vb(null,1,[k1,$APP.u(k4)],null));switch(a instanceof $APP.S?a.na:null){case "transit":return T3.h(b);case "json":return S3(b);case "text":return U3.s?U3.s():U3.call(null);case "ring":return d=new $APP.vb(null,1,[z1,U3.s()],null),d=$APP.dg(d),d=$APP.Q.g(d,z1),b=$APP.dg(d),d=$APP.Q.g(b,a1),e=$APP.Q.g(b,b1),b=$APP.Q.g(b,n_),c1(new $APP.vb(null,3,[a1,B1(d),b1,["ring/",
|
|
||||||
$APP.q.h(e)].join(""),n_,b],null));case "raw":return U3.s();case "detect":return j1(new $APP.vb(null,1,[k1,$APP.u(k4)],null));default:return null}},f3=$APP.ek.h(function(a){return $APP.cC.l($APP.N(["CLJS-AJAX response:",a]))}),g3=$APP.ek.h(function(a){return"undefined"!==typeof console?console.error(a):"undefined"!==typeof window?window.alert($APP.q.h(a)):$APP.cC.l($APP.N(["CLJS-AJAX ERROR:",a]))});$APP.h=F2.prototype;
|
|
||||||
$APP.h.Oe=function(a,b,c){var d=$APP.dg(b);a=$APP.Q.g(d,i3);b=$APP.Q.g(d,e1);var e=$APP.Q.g(d,$APP.Jn),f=$APP.Q.g(d,A1),g=$APP.Q.j(d,z3,0),l=$APP.Q.j(d,w3,!1),n=$APP.Q.g(d,k1);d=$APP.Q.g(d,K3);n=$APP.en.h(n);$APP.p(n)&&this.setResponseType($APP.Xi(n));$APP.ve(d)&&(this.setProgressEventsEnabled(!0),e2(this,"uploadprogress",d));e2(this,"complete",function(k){k=k.target;return c.h?c.h(k):c.call(null,k)});this.setTimeoutInterval(g);this.setWithCredentials(l);this.send(a,b,e,$APP.ho(f));return this};
|
|
||||||
$APP.h.Pe=function(){return this.getResponse()};$APP.h.Se=function(){return this.getStatus()};$APP.h.Te=function(){return this.getStatusText()};$APP.h.Qe=function(){return $APP.Zo.h(this.getResponseHeaders())};$APP.h.Re=function(a,b){return this.getResponseHeader(b)};$APP.h.Ue=function(){return $APP.K.g(this.getLastErrorCode(),7)};var a5;if("undefined"!==typeof $APP.vA&&"undefined"!==typeof $APP.ca&&"undefined"!==typeof $APP.ca.XMLHttpRequest)a5=$APP.ca.XMLHttpRequest;else{var b5;if("undefined"!==typeof require){var c5=require;b5=(c5.h?c5.h("xmlhttprequest"):c5.call(null,"xmlhttprequest")).XMLHttpRequest}else b5=null;a5=b5}var o4=a5;$APP.h=o4.prototype;
|
|
||||||
$APP.h.Oe=function(a,b,c){var d=$APP.dg(b),e=$APP.Q.g(d,i3),f=$APP.Q.g(d,e1);a=$APP.Q.g(d,$APP.Jn);b=$APP.Q.g(d,A1);var g=$APP.Q.j(d,z3,0),l=$APP.Q.j(d,w3,!1);d=$APP.Q.g(d,k1);var n=this;n.withCredentials=l;n.onreadystatechange=function(k){var r=$APP.K,v=r.g;k=k.target.readyState;var w=new $APP.vb(null,5,[0,G3,1,J3,2,x3,3,H3,4,L3],null);k=w.h?w.h(k):w.call(null,k);return v.call(r,L3,k)?c.h?c.h(n):c.call(null,n):null};n.open(f,e,!0);n.timeout=g;e=$APP.en.h(d);$APP.p(e)&&(n.responseType=$APP.Xi(e));
|
|
||||||
b=$APP.z(b);e=null;for(g=f=0;;)if(g<f)d=e.U(null,g),l=$APP.M.j(d,0,null),d=$APP.M.j(d,1,null),n.setRequestHeader(l,d),g+=1;else if(b=$APP.z(b))$APP.Ke(b)?(f=$APP.jd(b),b=$APP.kd(b),e=f,f=$APP.he(f)):(f=$APP.A(b),e=$APP.M.j(f,0,null),f=$APP.M.j(f,1,null),n.setRequestHeader(e,f),b=$APP.G(b),e=null,f=0),g=0;else break;n.send($APP.p(a)?a:"");return n};$APP.h.Pe=function(){return this.response};$APP.h.Se=function(){return this.status};$APP.h.Te=function(){return this.statusText};$APP.h.Qe=function(){return m3(this.getAllResponseHeaders())};
|
|
||||||
$APP.h.Re=function(a,b){return this.getResponseHeader(b)};$APP.h.Ue=function(){return $APP.K.g(0,this.readyState)};var p4=function p4(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return p4.l(arguments[0],1<c.length?new $APP.Kd(c.slice(1),0,null):null)};p4.l=function(a,b){var c=$APP.A(b);return k3(a,"GET",c instanceof $APP.S?$APP.bg.g($APP.cg,b):c)};p4.o=1;p4.v=function(a){var b=$APP.A(a);a=$APP.G(a);return this.l(b,a)};
|
|
||||||
var q4=function q4(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return q4.l(arguments[0],1<c.length?new $APP.Kd(c.slice(1),0,null):null)};q4.l=function(a,b){var c=$APP.A(b);return k3(a,"POST",c instanceof $APP.S?$APP.bg.g($APP.cg,b):c)};q4.o=1;q4.v=function(a){var b=$APP.A(a);a=$APP.G(a);return this.l(b,a)};var r4=$APP.tm(n3,null),s4=new $APP.vb(null,2,[u3,function(){var a=new $APP.Id(function(){return p4},C3,$APP.ri([$APP.tn,$APP.sn,$APP.bn,$APP.ir,$APP.XH,$APP.an,$APP.$m,$APP.hr,$APP.fr,$APP.vr,$APP.UJ],[n3,u3,"ajax/core.cljc",16,new $APP.vb(null,6,[$APP.aK,!0,$APP.Xo,1,$APP.hG,1,$APP.yG,new $APP.T(null,1,5,$APP.V,[$APP.Sl(o3,$APP.YR)],null),$APP.fr,$APP.Sl(new $APP.T(null,3,5,$APP.V,[o3,$APP.Gk,$APP.YR],null)),$APP.qP,$APP.Sl(null)],null),1,74,74,$APP.Sl(new $APP.T(null,3,5,$APP.V,[o3,$APP.Gk,$APP.YR],
|
|
||||||
null)),"accepts the URI and an optional map of options, options include:\n :handler - the handler function for successful operation\n should accept a single parameter which is the\n deserialized response\n :progress-handler - the handler function for progress events.\n this handler is only available when using the goog.net.XhrIo API\n :error-handler - the handler function for errors, should accept a\n map with keys :status and :status-text\n :format - the format for the request\n :response-format - the format for the response\n :params - a map of parameters that will be sent with the request",
|
|
||||||
$APP.p(p4)?p4.uc:null])),b=$APP.u(a);a=$APP.ye(a);var c=r4.Mb(null),d=$APP.sn.h(a);$APP.Gj.g($APP.q.h(c),$APP.q.h(d));c=new $APP.vb(null,4,[$APP.tn,r4,$APP.sn,d,$APP.fr,$APP.fr.h(a),$APP.vr,$APP.vr.h(a)],null);return $APP.p($APP.Hm.h(a))?$APP.Rz(d,b,c):$APP.p($APP.gn.h(a))?$APP.Sz(d,b,c):$APP.KA(d,b,c)}(),p3,function(){var a=new $APP.Id(function(){return q4},F3,$APP.ri([$APP.tn,$APP.sn,$APP.bn,$APP.ir,$APP.XH,$APP.an,$APP.$m,$APP.hr,$APP.fr,$APP.vr,$APP.UJ],[n3,p3,"ajax/core.cljc",17,new $APP.vb(null,
|
|
||||||
6,[$APP.aK,!0,$APP.Xo,1,$APP.hG,1,$APP.yG,new $APP.T(null,1,5,$APP.V,[$APP.Sl(o3,$APP.YR)],null),$APP.fr,$APP.Sl(new $APP.T(null,3,5,$APP.V,[o3,$APP.Gk,$APP.YR],null)),$APP.qP,$APP.Sl(null)],null),1,76,76,$APP.Sl(new $APP.T(null,3,5,$APP.V,[o3,$APP.Gk,$APP.YR],null)),"accepts the URI and an optional map of options, options include:\n :handler - the handler function for successful operation\n should accept a single parameter which is the\n deserialized response\n :progress-handler - the handler function for progress events.\n this handler is only available when using the goog.net.XhrIo API\n :error-handler - the handler function for errors, should accept a\n map with keys :status and :status-text\n :format - the format for the request\n :response-format - the format for the response\n :params - a map of parameters that will be sent with the request",
|
|
||||||
$APP.p(q4)?q4.uc:null])),b=$APP.u(a);a=$APP.ye(a);var c=r4.Mb(null),d=$APP.sn.h(a);$APP.Gj.g($APP.q.h(c),$APP.q.h(d));c=new $APP.vb(null,4,[$APP.tn,r4,$APP.sn,d,$APP.fr,$APP.fr.h(a),$APP.vr,$APP.vr.h(a)],null);return $APP.p($APP.Hm.h(a))?$APP.Rz(d,b,c):$APP.p($APP.gn.h(a))?$APP.Sz(d,b,c):$APP.KA(d,b,c)}()],null);$APP.nk.j($APP.qA,$APP.Wz,new $APP.vb(null,1,[$APP.An,new $APP.vb(null,1,[n3,s4],null)],null));
|
|
||||||
}).call(this);
|
|
1648
js/scittle.js
1648
js/scittle.js
File diff suppressed because it is too large
Load diff
|
@ -1,64 +0,0 @@
|
||||||
(function(){
|
|
||||||
shadow$provide[0]=function(b,c,a,d){a.exports=React};
|
|
||||||
shadow$provide[1]=function(b,c,a,d){a.exports=ReactDOM};
|
|
||||||
'use strict';var TW=function(a,b){var c=QW[a];if(void 0!==c)return c;try{RW.push(a);var d=SW[a],e=shadow$provide[a];if(void 0===d){if(void 0===e)throw"Module not provided: "+a;d={exports:{}};SW[a]=d}if(e){delete shadow$provide[a];try{e.call(d,$APP.ca,TW,d,d.exports)}catch(g){throw console.warn("shadow-cljs - failed to load",a),g;}if(b){var f=b.globals;if(f)for(a=0;a<f.length;a++)window[f[a]]=d.exports}}}finally{RW.pop()}return d.exports},UW=function(a){return 2>$APP.he(a)?$APP.ol(a):[$APP.ol($APP.kj.j(a,
|
|
||||||
0,1)),$APP.kj.g(a,1)].join("")},WW=function(a){if("string"===typeof a)return a;a=$APP.Xi(a);var b=$APP.sl.g(a,/-/),c=$APP.z(b);b=$APP.A(c);c=$APP.G(c);return $APP.p(VW.h?VW.h(b):VW.call(null,b))?a:$APP.bg.j($APP.q,b,$APP.vj.g(UW,c))},XW=function(a){var b=function(){var c=function(){var d=$APP.ve(a);if(d){d=a.displayName;if($APP.p(d))return d;d=a.name;return"string"===typeof d&&$APP.z(d)?d:null}return d}();if($APP.p(c))return c;c=function(){var d=null!=a?a.M&4096||$APP.Cd===a.ef?!0:!1:!1;return d?
|
|
||||||
$APP.Xi(a):d}();if($APP.p(c))return c;c=$APP.ye(a);return $APP.He(c)?$APP.sn.h(c):null}();return $APP.p(b)?$APP.nl($APP.q.h(b),"$","."):null},YW=function(a){return a instanceof $APP.S||a instanceof $APP.y},$W=function(a){if($APP.He(a))try{var b=$APP.Q.g(a,ZW)}catch(c){b=null}else b=null;return b},aX=function(a){var b=ZW.h($APP.ye(a));if($APP.p(b))return b;b=$W($APP.M.j(a,1,null));if($APP.p(b))return b;b=$APP.M.j(a,0,null);switch(b instanceof $APP.S?b.na:null){case "\x3e":case "f\x3e":return $W($APP.M.j(a,
|
|
||||||
2,null));case "r\x3e":return a=$APP.M.j(a,2,null),null==a?null:a.key;default:return null}},bX=function(a){return setTimeout(a,16)},cX=function(a,b){return a.vf-b.vf},dX=function(){return null},eX=function(a){for(var b=a.length,c=0;;)if(c<b){var d=a[c];d.s?d.s():d.call(null);c+=1}else return null},fX=function(a,b,c){b.push(c);return a.schedule()},gX=function(){this.Ee=!1},iX=function(a){if($APP.p(a.cljsIsDirty))return null;a.cljsIsDirty=!0;return hX.queue_render(a)},jX=function(a){if(null!=a&&null!=
|
|
||||||
a.Bh)a=a.id;else{var b=jX[$APP.na(null==a?null:a)];if(null!=b)a=b.h?b.h(a):b.call(null,a);else if(b=jX._,null!=b)a=b.h?b.h(a):b.call(null,a);else throw $APP.Nb("Compiler.get-id",a);}return a},kX=function(a,b){if(null!=a&&null!=a.Gg)a=a.Gg(a,b);else{var c=kX[$APP.na(null==a?null:a)];if(null!=c)a=c.g?c.g(a,b):c.call(null,a,b);else if(c=kX._,null!=c)a=c.g?c.g(a,b):c.call(null,a,b);else throw $APP.Nb("Compiler.as-element",a);}return a},lX=function(a,b,c,d,e){if(null!=a&&null!=a.Hg)a=a.Hg(a,b,c,d,e);else{var f=
|
|
||||||
lX[$APP.na(null==a?null:a)];if(null!=f)a=f.J?f.J(a,b,c,d,e):f.call(null,a,b,c,d,e);else if(f=lX._,null!=f)a=f.J?f.J(a,b,c,d,e):f.call(null,a,b,c,d,e);else throw $APP.Nb("Compiler.make-element",a);}return a},nX=function(a,b){b.We=null;a:{var c=mX;mX=b;try{var d=a.s?a.s():a.call(null);break a}finally{mX=c}d=void 0}a=b.We;b.Qc=!1;a:{c=b.gd;var e=null==a?0:a.length,f=e===(null==c?0:c.length);if(f)for(f=0;;){var g=f===e;if(g){c=g;break a}if(a[f]===c[f])f+=1;else{c=!1;break a}}else c=f}c||b._update_watching(a);
|
|
||||||
return d},oX=function(a){var b=mX;if(null!=b){var c=b.We;null==c?b.We=[a]:c.push(a)}},pX=function(a,b,c){a.ub=$APP.Ni.j(a.ub,b,c);return a.Uf=null},qX=function(a,b){a.ub=$APP.$l.g(a.ub,b);return a.Uf=null},rX=function(a,b,c){var d=a.Uf;d=null==d?a.Uf=$APP.jf(function(n,k,r){n.push(k);n.push(r);return n},[],a.ub):d;for(var e=d.length,f=0;;)if(f<e){var g=d[f],l=d[f+1];l.C?l.C(g,a,b,c):l.call(null,g,a,b,c);f=2+f}else break},sX=function(a,b,c,d){$APP.Vc(a,["#object[reagent.ratom.",$APP.q.h(c)," "].join(""));
|
|
||||||
a:{c=mX;mX=null;try{var e=d;break a}finally{mX=c}e=void 0}$APP.uj(e,a,b);return $APP.Vc(a,"]")},tX=function(a,b,c,d){this.state=a;this.F=b;this.Sf=c;this.ub=d;this.D=2154201088;this.M=114690},uX=function(a){if(null!=a&&null!=a.Mf)a=a.Mf(a);else{var b=uX[$APP.na(null==a?null:a)];if(null!=b)a=b.h?b.h(a):b.call(null,a);else if(b=uX._,null!=b)a=b.h?b.h(a):b.call(null,a);else throw $APP.Nb("IDisposable.dispose!",a);}return a},vX=function(a,b,c,d){return a._handle_change(b,c,d)},wX=function(a){this.f=a;
|
|
||||||
this.state=null;this.Qc=!0;this.Ag=!1;this.Xe=this.rc=this.ub=this.gd=null;this.D=2153807872;this.M=114690},yX=function(){for(;;){var a=xX;if(null==a)return null;xX=null;for(var b=a.length,c=0;;)if(c<b)a[c]._queued_run(),c+=1;else break}},CX=function(a){for(var b=[],c=arguments.length,d=0;;)if(d<c)b.push(arguments[d]),d+=1;else break;c=arguments[0];var e=$APP.dg(1<b.length?new $APP.Kd(b.slice(1),0,null):null);b=$APP.Q.g(e,zX);d=$APP.Q.g(e,AX);e=$APP.Q.g(e,BX);c=new wX(c);c._set_opts(new $APP.vb(null,
|
|
||||||
3,[zX,b,AX,d,BX,e],null));return c},FX=function(a,b){var c=DX,d=EX,e=nX(a,d);null!=d.gd&&(EX=CX(null),d._set_opts(c),d.f=a,d.rc=function(){return iX.h?iX.h(b):iX.call(null,b)},b.cljsRatom=d);return e},GX=function(a,b){var c=b.argv;if(null==c){c=$APP.V;a=a.constructor;a:for(var d=$APP.kb(b),e=d.length,f=$APP.ig,g=0;;)if(g<e){var l=d[g];f=$APP.Ni.j(f,$APP.wj.h(l),$APP.mb(b,l));g+=1}else break a;b=new $APP.T(null,2,5,c,[a,f],null)}else b=c;return b},HX=function(a){var b;if(b=$APP.ve(a))a=null==a?null:
|
|
||||||
a.prototype,b=null!=(null==a?null:a.Tc);return b},IX=function(a,b){for(;;){var c=a.Tc,d=!0===a.lh?c.call(a,a):function(){var e=GX(a,a.props);switch($APP.he(e)){case 1:return c.call(a);case 2:return c.call(a,$APP.M.g(e,1));case 3:return c.call(a,$APP.M.g(e,1),$APP.M.g(e,2));case 4:return c.call(a,$APP.M.g(e,1),$APP.M.g(e,2),$APP.M.g(e,3));case 5:return c.call(a,$APP.M.g(e,1),$APP.M.g(e,2),$APP.M.g(e,3),$APP.M.g(e,4));default:return c.apply(a,$APP.HA.h(e).slice(1))}}();if($APP.Je(d))return kX(b,d);
|
|
||||||
if($APP.Re(d))a.Tc=HX(d)?function(e,f,g,l,n){return function(){function k(v){var w=null;if(0<arguments.length){w=0;for(var B=Array(arguments.length-0);w<B.length;)B[w]=arguments[w+0],++w;w=new $APP.Kd(B,0,null)}return r.call(this,w)}function r(v){return kX(f,$APP.bg.j($APP.Oq,n,v))}k.o=0;k.v=function(v){v=$APP.z(v);return r(v)};k.l=r;return k}()}(a,b,c,null,d):d;else return d}},LX=function(a,b){switch(a instanceof $APP.S?a.na:null){case "getDefaultProps":throw Error("getDefaultProps not supported");
|
|
||||||
case "getDerivedStateFromProps":return function(c,d){var e=b.call,f=c.argv;null!=f&&(c=$APP.M.j(f,1,null),c=$APP.He(c)?c:null);return e.call(b,null,c,d)};case "getInitialState":return function(c){var d=c.nh;d=null!=d?d:c.nh=JX.h(null);return $APP.Dg(d,b.call(c,c))};case "getSnapshotBeforeUpdate":return function(c,d){return b.call(this,this,GX(this,c),d)};case "componentWillReceiveProps":return function(c){return b.call(this,this,GX(this,c))};case "UNSAFE_componentWillReceiveProps":return function(c){return b.call(this,
|
|
||||||
this,GX(this,c))};case "shouldComponentUpdate":return function(c){var d=KX;if($APP.p(d))return d;d=this.props.argv;var e=c.argv,f=null==d||null==e;if(null==b){if(f)return f;try{return $APP.Mi.g(d,e)}catch(g){return!1}}else return f?b.call(this,this,GX(this,this.props),GX(this,c)):b.call(this,this,d,e)};case "componentWillUpdate":return function(c,d){return b.call(this,this,GX(this,c),d)};case "UNSAFE_componentWillUpdate":return function(c,d){return b.call(this,this,GX(this,c),d)};case "componentDidUpdate":return function(c,
|
|
||||||
d,e){return b.call(this,this,GX(this,c),d,e)};case "componentWillMount":return function(){return b.call(this,this)};case "UNSAFE_componentWillMount":return function(){return b.call(this,this)};case "componentDidMount":return function(){return b.call(this,this)};case "componentWillUnmount":return function(){var c=$APP.mb(this,"cljsRatom");null!=c&&uX(c);this.cljsIsDirty=!1;return null==b?null:b.call(this,this)};case "componentDidCatch":return function(c,d){return b.call(this,this,c,d)};default:return null}},
|
|
||||||
NX=function(a){return $APP.jf(function(b,c,d){return $APP.Ni.j(b,$APP.wj.h(MX(c)),d)},$APP.ig,a)},TX=function(a,b){var c=function(){var g=OX.h(a);return $APP.p(g)?g:PX.h(a)}(),d=null==OX.h(a),e=function(){var g=QX.h(a);if($APP.p(g))return g;g=XW(c);return $APP.p(g)?g:$APP.q.h($APP.cm.h("reagent"))}(),f=$APP.jf(function(g,l,n){var k=$APP.Ni.j,r=LX(l,n);return k.call($APP.Ni,g,l,$APP.p(r)?r:n)},$APP.ig,a);return $APP.Ni.l(f,QX,e,$APP.N([RX,d,OX,c,PX,function(){var g=this,l=$APP.mb(g,"cljsRatom");g.cljsIsDirty=
|
|
||||||
!1;return null==l?FX(function(){a:{var n=SX;SX=g;try{var k=IX(g,b);break a}finally{SX=n}k=void 0}return k},g):l._run(!1)}]))},UX=function(a){return $APP.jf(function(b,c,d){c=$APP.Xi(c);b[c]=d;return b},{},a)},WX=function(a,b){return TX($APP.Zl.l($APP.N([VX,NX(a)])),b)},aY=function(a,b){function c(l,n,k){XX.Component.call(this,l,n,k);$APP.p(g)&&(g.g?g.g(this,l):g.call(null,this,l));$APP.p(f)&&(this.state=f.h?f.h(this):f.call(null,this));this.vf=YX+=1;return this}a=WX(a,b);b=UX($APP.bg.l($APP.$l,a,
|
|
||||||
QX,ZX,$APP.lo,$APP.N([PX,OX,$X])));var d=UX($APP.Oi(a,$X)),e=QX.h(a),f=ZX.h(a),g=$APP.lo.h(a);$APP.pb(c.prototype,XX.Component.prototype,b);$APP.p(PX.h(a))&&(c.prototype.render=PX.h(a));$APP.p(OX.h(a))&&(c.prototype.Tc=OX.h(a));$APP.p(RX.h(a))&&(c.prototype.lh=RX.h(a));$APP.pb(c,XX.Component,d);$APP.p(e)&&(c.displayName=e,c.qd=e,c.tf=function(l){return $APP.Vc(l,e)});c.ve=!0;return c.prototype.constructor=c},bY=function(a,b,c){a=jX(a);return b[a]=c},cY=function(a,b){for(;;){var c=b.Tc,d=b.argv,e=
|
|
||||||
$APP.bg.g(c,d);if($APP.Je(e))return kX(a,e);if($APP.Re(e))b.Tc=HX(e)?function(f,g,l,n,k,r){return function(){function v(B){var H=null;if(0<arguments.length){H=0;for(var J=Array(arguments.length-0);H<J.length;)J[H]=arguments[H+0],++H;H=new $APP.Kd(J,0,null)}return w.call(this,H)}function w(B){return kX(f,$APP.bg.j($APP.Oq,r,B))}v.o=0;v.v=function(B){B=$APP.z(B);return w(B)};v.l=w;return v}()}(a,b,c,null,d,e):e;else return e}},dY=function(a,b){var c=b.argv,d=b.Tc;b=XX.useState(0);$APP.M.j(b,0,null);
|
|
||||||
var e=$APP.M.j(b,1,null),f=XX.useRef();$APP.p(f.current)||function(){var l={forceUpdate:function(){return e.h?e.h($APP.Ud):e.call(null,$APP.Ud)}};l.vf=YX+=1;l.constructor=d;l.Tc=d;return f.current=l}();var g=f.current;b=$APP.mb(g,"cljsRatom");XX.useEffect(function(){return function(){var l=$APP.mb(g,"cljsRatom");return null==l?null:uX(l)}},[]);g.argv=c;g.cljsIsDirty=!1;return null==b?FX(function(){a:{var l=SX;SX=g;try{var n=cY(a,g);break a}finally{SX=l}n=void 0}return n},g):b._run(!1)},eY=function(a,
|
|
||||||
b){a=a.argv;b=b.argv;var c=!1===KX;if(c)try{return $APP.K.g(a,b)}catch(d){return!1}else return c},fY=function(a,b){function c(e){return dY(a,e)}var d=$APP.mb(b,jX(a));if($APP.p(d))return d;c.displayName=XW(b);d=XX.memo(c,eY);bY(a,b,d);return d},jY=function(a,b,c,d){var e=$APP.dg($APP.ig);e=$APP.Q.g(e,gY);if(a===document.activeElement&&$APP.Xe(hY,a.type)&&"string"===typeof b&&"string"===typeof c){var f=a.value;if($APP.Mi.g(f,c))return hX.add_after_render(function(){return iY.h?iY.h(d):iY.call(null,
|
|
||||||
d)});c=$APP.he(f)-a.selectionStart;c=$APP.he(b)-c;d.we=b;a.value=b;$APP.ve(e)&&(e.h?e.h(b):e.call(null,b));a.selectionStart=c;return a.selectionEnd=c}d.we=b;a.value=b;return $APP.ve(e)?e.h?e.h(b):e.call(null,b):null},iY=function(a){if($APP.p(a.uf)){a.pg=!1;var b=a.mh,c=a.we,d=a.Ff;return $APP.Mi.g(b,c)?jY(d,b,c,a):null}return null},kY=function(a,b,c){a.we=c.target.value;$APP.p(a.pg)||(a.pg=!0,hX.add_after_render(function(){return iY(a)}));return b.h?b.h(c):b.call(null,c)},lY=function(a){var b=SX;
|
|
||||||
if($APP.p(function(){var f=null!=a;return f?(f=a.hasOwnProperty("onChange"),$APP.p(f)?a.hasOwnProperty("value"):f):f}())){var c=a.value;c=null==c?"":c;var d=a.onChange,e=a.ref;$APP.p(b.uf)||(b.uf=!0,b.we=c);$APP.p(b.Ig)||(b.Ig=$APP.ve(e)?function(f){b.Ff=f;return e.h?e.h(f):e.call(null,f)}:$APP.p($APP.p(e)?e.hasOwnProperty("current"):e)?function(f){b.Ff=f;return e.current=f}:function(f){return b.Ff=f});b.mh=c;delete a.value;a.defaultValue=c;a.onChange=function(f){return kY(b,d,f)};a.ref=b.Ig}},mY=
|
|
||||||
function(a,b){return a.hasOwnProperty(b)?$APP.mb(a,b):null},pY=function(a,b,c){if(YW(b)){var d=mY(nY,$APP.Xi(b));null==d?(d=WW(b),b=$APP.Xi(b),b=nY[b]=d):b=d}c=oY.h?oY.h(c):oY.call(null,c);a[b]=c;return a},oY=function(a){return"object"!==$APP.na(a)?a:YW(a)?$APP.Xi(a):$APP.He(a)?$APP.jf(pY,{},a):$APP.De(a)?$APP.ho(a):$APP.Re(a)?function(){function b(d){var e=null;if(0<arguments.length){e=0;for(var f=Array(arguments.length-0);e<f.length;)f[e]=arguments[e+0],++e;e=new $APP.Kd(f,0,null)}return c.call(this,
|
|
||||||
e)}function c(d){return $APP.bg.g(a,d)}b.o=0;b.v=function(d){d=$APP.z(d);return c(d)};b.l=c;return b}():$APP.ho(a)},rY=function(a,b,c){if(YW(b)){var d=mY(qY,$APP.Xi(b));null==d?(d=WW(b),b=$APP.Xi(b),b=qY[b]=d):b=d}c=oY(c);a[b]=c;return a},sY=function(a){return"object"!==$APP.na(a)?a:YW(a)?$APP.Xi(a):$APP.He(a)?$APP.jf(rY,{},a):$APP.De(a)?$APP.ho(a):$APP.Re(a)?function(){function b(d){var e=null;if(0<arguments.length){e=0;for(var f=Array(arguments.length-0);e<f.length;)f[e]=arguments[e+0],++e;e=new $APP.Kd(f,
|
|
||||||
0,null)}return c.call(this,e)}function c(d){return $APP.bg.g(a,d)}b.o=0;b.v=function(d){d=$APP.z(d);return c(d)};b.l=c;return b}():$APP.ho(a)},tY=function(a,b,c,d,e){switch($APP.he(b)-e){case 0:return XX.createElement(c,d);case 1:return XX.createElement(c,d,kX(a,$APP.M.j(b,e,null)));default:return XX.createElement.apply(null,$APP.jf(function(f,g,l){g>=e&&f.push(kX(a,l));return f},[c,d],b))}},uY=function(a,b,c,d){this.tag=a;this.id=b;this.className=c;this.ph=d},wY=function(a,b,c){var d=$APP.mb(a,jX(c));
|
|
||||||
null==d?HX(a)?a=bY(c,a,a):(d=$APP.ye(a),d=$APP.Ni.j(d,vY,a),d=aY(d,c),a=bY(c,a,d)):a=d;c={};c.argv=b;b=aX(b);null!=b&&(c.key=b);return XX.createElement(a,c)},xY=function(a,b,c,d){var e={};e.Tc=a;e.argv=$APP.ql.g(b,c);b=aX(b);null!=b&&(e.key=b);return XX.createElement(fY(d,a),e)},yY=function(a,b,c){var d;if(d=$APP.ve(a))d=null==a?null:a.prototype,d=null!=(null==d?null:d.render);return d?wY(a,b,c):xY(a,b,1,c)},CY=function(a,b,c,d){var e=a.tag,f=$APP.M.j(b,c,null),g=null==f||$APP.He(f),l=function(){var k=
|
|
||||||
g?f:null;var r=$APP.Eo.h(k);r=$APP.p(r)?$APP.Ni.j(k,$APP.Eo,zY.h(r)):k;var v=a.id;k=a.className;v=null!=v&&null==$APP.pn.h(r)?$APP.Ni.j(r,$APP.pn,v):r;if($APP.p(k)){var w=$APP.Ni.j,B=zY.g,H=$APP.Eo.h(r);r=$APP.p(H)?H:AY.h(r);k=w.call($APP.Ni,v,$APP.Eo,B.call(zY,k,r))}else k=v;k=$APP.p(a.ph)?sY(k):oY(k);return $APP.p(k)?k:{}}();c+=g?1:0;a:switch(e){case "input":case "textarea":var n=!0;break a;default:n=!1}if(n)return n=function(){var k=d.Ch;if($APP.p(k))return k;k=aY(BY,d);return d.Ch=k}(),kX(d,$APP.xe(new $APP.T(null,
|
|
||||||
6,5,$APP.V,[n,b,e,l,c,d],null),$APP.ye(b)));n=$W($APP.ye(b));null!=n&&(l.key=n);return lX(d,b,e,l,c)},DY=function(a,b){return $APP.HA.h($APP.vj.g(function(c){return kX(b,c)},a))},GY=function(a,b,c){null==b&&console.error("vec-to-elem",$APP.Tj.l($APP.N([a])));var d=$APP.M.j(a,0,null);switch(d instanceof $APP.S?d.na:null){case "\x3e":return c=$APP.M.j(a,1,null),CY(new uY(c,null,null,null),a,2,b);case "r\x3e":c=$APP.M.j(a,1,null);d=$APP.M.j(a,2,null);d=$APP.p(d)?d:{};var e=$W($APP.ye(a));null!=e&&(d.key=
|
|
||||||
e);return lX(b,a,c,d,3);case "f\x3e":return xY($APP.M.j(a,1,null),a,2,b);case "\x3c\x3e":return d=$APP.M.j(a,1,null),c=null==d||$APP.He(d),d=oY(c?d:null),d=$APP.p(d)?d:{},c=1+(c?1:0),e=aX(a),null!=e&&(d.key=e),lX(b,a,XX.Fragment,d,c);default:if(YW(d)||"string"===typeof d)a:for(;;)switch(c=$APP.M.j(a,0,null),c=$APP.Xi(c),d=c.indexOf("\x3e"),d){case -1:d=mY(EY,c);if(null==d){var f=$APP.G($APP.ij(FY,$APP.Xi(c)));d=$APP.M.j(f,0,null);e=$APP.M.j(f,1,null);f=$APP.M.j(f,2,null);f=null==f?null:$APP.nl(f,
|
|
||||||
/\./," ");var g=$APP.Mi.g(-1,d.indexOf("-"));d=new uY(d,e,f,g);c=EY[c]=d}else c=d;a=CY(c,a,1,b);break a;case 0:a=null;break a;default:a=$APP.xe(new $APP.T(null,2,5,$APP.V,[$APP.kj.j(c,0,d),$APP.Ni.j($APP.xe(a,null),0,$APP.kj.g(c,d+1))],null),$APP.ye(a))}else a=c.j?c.j(d,a,b):c.call(null,d,a,b);return a}},JY=function(a,b,c){var d=KX;KX=!0;try{return HY.render(a.s?a.s():a.call(null),b,function(){var e=KX;KX=!1;try{return $APP.nk.C(IY,$APP.Ni,b,a),hX.flush_after_render(),null!=c?c.s?c.s():c.call(null):
|
|
||||||
null}finally{KX=e}})}finally{KX=d}},KY=new $APP.y(null,"reagent.core","reagent.core",1841519592,null),LY=new $APP.y(null,"compiler","compiler",1372604796,null),BX=new $APP.S(null,"on-dispose","on-dispose",2105306360),ZX=new $APP.S(null,"getInitialState","getInitialState",1541760916),MY=new $APP.S(null,"no-cache","no-cache",1588056370),NY=new $APP.S(null,"function-components","function-components",1492814963),OY=new $APP.y(null,"reagent.dom","reagent.dom",-2138920962,null),PY=new $APP.S(null,"component-will-unmount",
|
|
||||||
"component-will-unmount",-2058314698),QY=new $APP.S(null,"callback","callback",-705136228),RY=new $APP.y(null,"x","x",-555367584,null),RX=new $APP.S(null,"cljsLegacyRender","cljsLegacyRender",-1527295613),OX=new $APP.S(null,"reagentRender","reagentRender",-358306383),SY=new $APP.y(null,"container","container",-96406180,null),gY=new $APP.S(null,"on-write","on-write",31519475),TY=new $APP.S(null,"contextTypes","contextTypes",-2023853910),UY=new $APP.y(null,"render","render",232498073,null),PX=new $APP.S(null,
|
|
||||||
"render","render",-1408033454),zX=new $APP.S(null,"auto-run","auto-run",1958400437),VY=new $APP.S(null,"childContextTypes","childContextTypes",578717991),vY=new $APP.S(null,"reagent-render","reagent-render",-985383853),WY=new $APP.y("reagent.core","atom","reagent.core/atom",1748890217,null),XY=new $APP.y("reagent.core","as-element","reagent.core/as-element",-1369748434,null),YY=new $APP.S(null,"componentWillUnmount","componentWillUnmount",1573788814),ZY=new $APP.S(null,"contextType","contextType",
|
|
||||||
1033066077),$Y=new $APP.y(null,"as-element","as-element",-2139409597,null),aZ=new $APP.S(null,"getDerivedStateFromProps","getDerivedStateFromProps",-991834739),bZ=new $APP.S(null,"display-name","display-name",694513143),AY=new $APP.S(null,"className","className",-1983287057),QX=new $APP.S(null,"displayName","displayName",-809144601),cZ=new $APP.S(null,"getDerivedStateFromError","getDerivedStateFromError",166658477),dZ=new $APP.y("reagent.dom","render","reagent.dom/render",-1216356973,null),AX=new $APP.S(null,
|
|
||||||
"on-set","on-set",-140953470),eZ=new $APP.S(null,"component-did-update","component-did-update",-1468549173),ZW=new $APP.S(null,"key","key",-1516042587),fZ=new $APP.S(null,"shouldComponentUpdate","shouldComponentUpdate",1795750960),gZ=new $APP.y(null,"callback-or-compiler","callback-or-compiler",90200066,null);var SW={},QW={},RW=[];TW.cache={};TW.resolve=function(a){return a};var XX=TW(0,{});var hZ={};$APP.ek.h(null);var iZ={},jZ="undefined"!==typeof window&&null!=window.document,VW=new $APP.Qi(null,new $APP.vb(null,2,["aria",null,"data",null],null),null),zY=function zY(a){switch(arguments.length){case 0:return zY.s();case 1:return zY.h(arguments[0]);case 2:return zY.g(arguments[0],arguments[1]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return zY.l(arguments[0],arguments[1],new $APP.Kd(c.slice(2),0,null))}};zY.s=function(){return null};
|
|
||||||
zY.h=function(a){return $APP.De(a)?(a=$APP.xz.g(function(b){return $APP.p(b)?YW(b)?$APP.Xi(b):b:null},a),$APP.z(a)?$APP.Sp.g(" ",a):null):YW(a)?$APP.Xi(a):a};zY.g=function(a,b){return $APP.p(a)?$APP.p(b)?[$APP.q.h(zY.h(a))," ",$APP.q.h(zY.h(b))].join(""):zY.h(a):zY.h(b)};zY.l=function(a,b,c){return $APP.ff.j(zY,zY.g(a,b),c)};zY.v=function(a){var b=$APP.A(a),c=$APP.G(a);a=$APP.A(c);c=$APP.G(c);return this.l(b,a,c)};zY.o=2;var KX=!1;var YX=0,kZ=jZ?function(){var a=window;return function(){var b=a.requestAnimationFrame;if($APP.p(b))return b;b=a.webkitRequestAnimationFrame;if($APP.p(b))return b;b=a.mozRequestAnimationFrame;if($APP.p(b))return b;b=a.msRequestAnimationFrame;return $APP.p(b)?b:bX}().bind(a)}():bX;$APP.h=gX.prototype;$APP.h.flush_after_render=function(){var a=this.ne;if(null==a)return null;this.ne=null;return eX(a)};$APP.h.queue_render=function(a){null==this.ye&&(this.ye=[]);return fX(this,this.ye,a)};
|
|
||||||
$APP.h.schedule=function(){function a(){return b.run_queues()}var b=this;if(this.Ee)return null;this.Ee=!0;return kZ.h?kZ.h(a):kZ.call(null,a)};$APP.h.flush_before_flush=function(){var a=this.pe;if(null==a)return null;this.pe=null;return eX(a)};$APP.h.flush_queues=function(){this.flush_before_flush();dX();this.flush_render();return this.flush_after_render()};$APP.h.run_queues=function(){this.Ee=!1;return this.flush_queues()};
|
|
||||||
$APP.h.add_before_flush=function(a){null==this.pe&&(this.pe=[]);return fX(this,this.pe,a)};$APP.h.add_after_render=function(a){null==this.ne&&(this.ne=[]);return fX(this,this.ne,a)};$APP.h.flush_render=function(){var a=this.ye;if(null==a)return null;this.ye=null;a:{a.sort(cX);for(var b=a.length,c=0;;)if(c<b){var d=a[c];!0===d.cljsIsDirty&&d.forceUpdate();c+=1}else break a}return null};var hX=new gX;var mX;$APP.ek.h(0);var xX=null;$APP.h=tX.prototype;$APP.h.S=function(a,b,c){return sX(b,c,"RAtom",new $APP.vb(null,1,[$APP.eC,this.nb(null)],null))};$APP.h.W=function(){return this.F};$APP.h.V=function(){return $APP.Ha(this)};$APP.h.N=function(a,b){return this===b};$APP.h.Xb=function(a,b){a=this.state;this.state=b;null!=this.ub&&rX(this,a,b);return b};$APP.h.lf=function(a,b){return this.Xb(null,b.h?b.h(this.state):b.call(null,this.state))};
|
|
||||||
$APP.h.mf=function(a,b,c){return this.Xb(null,b.g?b.g(this.state,c):b.call(null,this.state,c))};$APP.h.nf=function(a,b,c,d){return this.Xb(null,b.j?b.j(this.state,c,d):b.call(null,this.state,c,d))};$APP.h.pf=function(a,b,c,d,e){return this.Xb(null,$APP.bg.J(b,this.state,c,d,e))};$APP.h.rf=function(a,b){rX(this,a,b)};$APP.h.te=function(a,b,c){return pX(this,b,c)};$APP.h.ue=function(a,b){return qX(this,b)};$APP.h.Y=function(a,b){return new tX(this.state,b,this.Sf,this.ub)};
|
|
||||||
$APP.h.nb=function(){oX(this);return this.state};var JX=function JX(a){switch(arguments.length){case 1:return JX.h(arguments[0]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return JX.l(arguments[0],new $APP.Kd(c.slice(1),0,null))}};JX.h=function(a){return new tX(a,null,null,null)};JX.l=function(a,b){var c=$APP.dg(b);b=$APP.Q.g(c,$APP.zb);c=$APP.Q.g(c,$APP.wB);return new tX(a,b,c,null)};JX.v=function(a){var b=$APP.A(a);a=$APP.G(a);return this.l(b,a)};
|
|
||||||
JX.o=1;$APP.h=wX.prototype;$APP.h._peek_at=function(){var a=mX;mX=null;try{return this.nb(null)}finally{mX=a}};$APP.h._handle_change=function(a,b,c){return b===c||this.Qc?null:null==this.rc?(this.Qc=!0,null==xX&&(xX=[],!1===hX.Ee&&hX.schedule()),xX.push(this)):!0===this.rc?this._run(!1):this.rc.h?this.rc.h(this):this.rc.call(null,this)};
|
|
||||||
$APP.h._update_watching=function(a){var b=$APP.Vi(a),c=$APP.Vi(this.gd);this.gd=a;a=$APP.z($APP.FT.g(b,c));for(var d=null,e=0,f=0;;)if(f<e){var g=d.U(null,f);$APP.Zc(g,this,vX);f+=1}else if(a=$APP.z(a))d=a,$APP.Ke(d)?(a=$APP.jd(d),f=$APP.kd(d),d=a,e=$APP.he(a),a=f):(a=$APP.A(d),$APP.Zc(a,this,vX),a=$APP.G(d),d=null,e=0),f=0;else break;b=$APP.z($APP.FT.g(c,b));c=null;for(e=d=0;;)if(e<d)a=c.U(null,e),$APP.ad(a,this),e+=1;else if(b=$APP.z(b))c=b,$APP.Ke(c)?(b=$APP.jd(c),d=$APP.kd(c),c=b,a=$APP.he(b),
|
|
||||||
b=d,d=a):(a=$APP.A(c),$APP.ad(a,this),b=$APP.G(c),c=null,d=0),e=0;else return null};$APP.h._queued_run=function(){return this.Qc&&null!=this.gd?this._run(!0):null};$APP.h._try_capture=function(a){try{return this.Xe=null,nX(a,this)}catch(b){return this.Xe=this.state=a=b,this.Qc=!1}};$APP.h._run=function(a){var b=this.state;a=$APP.p(a)?this._try_capture(this.f):nX(this.f,this);this.Ag||(this.state=a,null==this.ub||$APP.K.g(b,a)||rX(this,b,a));return a};
|
|
||||||
$APP.h._set_opts=function(a){var b=$APP.dg(a);a=$APP.Q.g(b,zX);var c=$APP.Q.g(b,AX),d=$APP.Q.g(b,BX);b=$APP.Q.g(b,MY);null!=a&&(this.rc=a);null!=c&&(this.zh=c);null!=d&&(this.Eg=d);return null!=b?this.Ag=b:null};$APP.h.S=function(a,b,c){return sX(b,c,"Reaction",new $APP.vb(null,1,[$APP.eC,this.nb(null)],null))};$APP.h.V=function(){return $APP.Ha(this)};$APP.h.N=function(a,b){return this===b};
|
|
||||||
$APP.h.Mf=function(){var a=this.state,b=this.gd;this.rc=this.state=this.gd=null;this.Qc=!0;b=$APP.z($APP.Vi(b));for(var c=null,d=0,e=0;;)if(e<d){var f=c.U(null,e);$APP.ad(f,this);e+=1}else if(b=$APP.z(b))c=b,$APP.Ke(c)?(b=$APP.jd(c),e=$APP.kd(c),c=b,d=$APP.he(b),b=e):(b=$APP.A(c),$APP.ad(b,this),b=$APP.G(c),c=null,d=0),e=0;else break;null!=this.Eg&&this.Eg(a);a=this.ei;if(null==a)return null;b=a.length;for(c=0;;)if(c<b)d=a[c],d.h?d.h(this):d.call(null,this),c+=1;else return null};
|
|
||||||
$APP.h.Xb=function(a,b){a=this.state;this.state=b;this.zh(a,b);rX(this,a,b);return b};$APP.h.lf=function(a,b){a=this.Xb;var c=this._peek_at();b=b.h?b.h(c):b.call(null,c);return a.call(this,null,b)};$APP.h.mf=function(a,b,c){a=this.Xb;var d=this._peek_at();b=b.g?b.g(d,c):b.call(null,d,c);return a.call(this,null,b)};$APP.h.nf=function(a,b,c,d){a=this.Xb;var e=this._peek_at();b=b.j?b.j(e,c,d):b.call(null,e,c,d);return a.call(this,null,b)};
|
|
||||||
$APP.h.pf=function(a,b,c,d,e){return this.Xb(null,$APP.bg.J(b,this._peek_at(),c,d,e))};$APP.h.rf=function(a,b){rX(this,a,b)};$APP.h.te=function(a,b,c){return pX(this,b,c)};$APP.h.ue=function(a,b){a=$APP.Be(this.ub);qX(this,b);return!a&&$APP.Be(this.ub)&&null==this.rc?this.Mf(null):null};
|
|
||||||
$APP.h.nb=function(){var a=this.Xe;if(null!=a)throw a;(a=null==mX)&&(yX.s?yX.s():yX.call(null));a&&null==this.rc?this.Qc&&(a=this.state,this.state=this.f.s?this.f.s():this.f.call(null),null==this.ub||$APP.K.g(a,this.state)||rX(this,a,this.state)):(oX(this),this.Qc&&this._run(!1));return this.state};dX=yX;var EX=CX(null);var SX,DX=new $APP.vb(null,1,[MY,!0],null),VX=new $APP.vb(null,2,[fZ,null,YY,null],null),MX=function(a){var b=$APP.ek.h($APP.ig);return function(c){var d=$APP.Q.g($APP.u(b),c);if(null!=d)return d;d=a.h?a.h(c):a.call(null,c);$APP.nk.C(b,$APP.Ni,c,d);return d}}(function(a){if("string"===typeof a)return a;a=$APP.Xi(a);a=$APP.nl(a,/(unsafe|UNSAFE)[-_]/,"UNSAFE_");a=$APP.sl.g(a,/-/);var b=$APP.z(a);a=$APP.A(b);b=$APP.G(b);return $APP.bg.j($APP.q,a,$APP.vj.g(UW,b))}),$X=new $APP.T(null,5,5,$APP.V,[VY,TY,
|
|
||||||
ZY,aZ,cZ],null);var hY=new $APP.Qi(null,new $APP.vb(null,6,["url",null,"tel",null,"text",null,"textarea",null,"password",null,"search",null],null),null),BY=new $APP.vb(null,4,[bZ,"ReagentInput",eZ,iY,PY,function(a){return a.uf=null},vY,function(a,b,c,d,e){lY(c);return lX(e,a,b,c,d)}],null);var lZ={},P4,FY=/([^\s\.#]+)(?:#([^\s\.#]+))?(?:\.([^\s#]+))?/,nY={"class":"className","for":"htmlFor",charset:"charSet"},qY={},EY={},nZ=function(a){var b=$APP.cm.s(),c=$APP.p(NY.h(a))?yY:wY;if("undefined"===typeof hZ||"undefined"===typeof iZ||"undefined"===typeof lZ||"undefined"===typeof P4)P4=function(d,e,f,g){this.kc=d;this.id=e;this.vg=f;this.vh=g;this.D=393216;this.M=0},P4.prototype.Y=function(d,e){return new P4(this.kc,this.id,this.vg,e)},P4.prototype.W=function(){return this.vh},P4.prototype.Bh=
|
|
||||||
function(){return this.id},P4.prototype.Gg=function(d,e){return"object"!==$APP.na(e)?e:$APP.Je(e)?GY(e,this,this.vg):$APP.Oe(e)?DY(e,this):YW(e)?$APP.Xi(e):(null!=e?e.D&2147483648||$APP.Cd===e.ga||(e.D?0:$APP.Lb($APP.Wc,e)):$APP.Lb($APP.Wc,e))?$APP.Tj.l($APP.N([e])):e},P4.prototype.Hg=function(d,e,f,g,l){return tY(this,e,f,g,l)},P4.ve=!0,P4.qd="reagent.impl.template/t_reagent$impl$template31470",P4.tf=function(d){return $APP.Vc(d,"reagent.impl.template/t_reagent$impl$template31470")};return new P4(a,
|
|
||||||
b,c,$APP.ig)}($APP.ig);var oZ=function oZ(a){switch(arguments.length){case 1:return oZ.h(arguments[0]);case 2:return oZ.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.q.h(arguments.length)].join(""));}};oZ.h=function(a){return kX(nZ,a)};oZ.g=function(a,b){return kX(b,a)};oZ.o=2;
|
|
||||||
var pZ=function pZ(a){switch(arguments.length){case 1:return pZ.h(arguments[0]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return pZ.l(arguments[0],new $APP.Kd(c.slice(1),0,null))}};pZ.h=function(a){return JX.h(a)};pZ.l=function(a,b){return $APP.bg.j(JX,a,b)};pZ.v=function(a){var b=$APP.A(a);a=$APP.G(a);return this.l(b,a)};pZ.o=1;var HY=TW(1,{});var IY=$APP.ek.h($APP.ig),qZ=function qZ(a){switch(arguments.length){case 2:return qZ.g(arguments[0],arguments[1]);case 3:return qZ.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.q.h(arguments.length)].join(""));}};qZ.g=function(a,b){return qZ.j(a,b,nZ)};
|
|
||||||
qZ.j=function(a,b,c){yX();c=$APP.ve(c)?new $APP.T(null,2,5,$APP.V,[nZ,c],null):new $APP.T(null,2,5,$APP.V,[c,QY.h(c)],null);var d=$APP.M.j(c,0,null);c=$APP.M.j(c,1,null);return JY(function(){return kX(d,$APP.ve(a)?a.s?a.s():a.call(null):a)},b,c)};qZ.o=3;var rZ=$APP.tm(KY,null),sZ=new $APP.vb(null,2,[$APP.nF,function(){var a=new $APP.Id(function(){return pZ},WY,$APP.ri([$APP.tn,$APP.sn,$APP.bn,$APP.ir,$APP.XH,$APP.an,$APP.$m,$APP.hr,$APP.fr,$APP.vr,$APP.UJ],[KY,$APP.nF,"reagent/core.cljs",11,new $APP.vb(null,6,[$APP.aK,!0,$APP.Xo,1,$APP.hG,1,$APP.yG,new $APP.T(null,1,5,$APP.V,[new $APP.T(null,1,5,$APP.V,[RY],null)],null),$APP.fr,$APP.Sl(new $APP.T(null,1,5,$APP.V,[RY],null),new $APP.T(null,3,5,$APP.V,[RY,$APP.Gk,$APP.qH],null)),$APP.qP,$APP.Sl(null,
|
|
||||||
null)],null),1,211,211,$APP.Sl(new $APP.T(null,1,5,$APP.V,[RY],null),new $APP.T(null,3,5,$APP.V,[RY,$APP.Gk,$APP.qH],null)),"Like clojure.core/atom, except that it keeps track of derefs.\n Reagent components that derefs one of these are automatically\n re-rendered.",$APP.p(pZ)?pZ.uc:null])),b=$APP.u(a);a=$APP.ye(a);var c=rZ.Mb(null),d=$APP.sn.h(a);$APP.Gj.g($APP.q.h(c),$APP.q.h(d));c=new $APP.vb(null,4,[$APP.tn,rZ,$APP.sn,d,$APP.fr,$APP.fr.h(a),$APP.vr,$APP.vr.h(a)],null);return $APP.p($APP.Hm.h(a))?
|
|
||||||
$APP.Rz(d,b,c):$APP.p($APP.gn.h(a))?$APP.Sz(d,b,c):$APP.KA(d,b,c)}(),$Y,function(){var a=new $APP.Id(function(){return oZ},XY,$APP.ri([$APP.tn,$APP.sn,$APP.bn,$APP.ir,$APP.XH,$APP.an,$APP.$m,$APP.hr,$APP.fr,$APP.vr,$APP.UJ],[KY,$Y,"reagent/core.cljs",17,new $APP.vb(null,6,[$APP.aK,!1,$APP.Xo,2,$APP.hG,2,$APP.yG,new $APP.T(null,2,5,$APP.V,[new $APP.T(null,1,5,$APP.V,[$APP.xO],null),new $APP.T(null,2,5,$APP.V,[$APP.xO,LY],null)],null),$APP.fr,$APP.Sl(new $APP.T(null,1,5,$APP.V,[$APP.xO],null),new $APP.T(null,
|
|
||||||
2,5,$APP.V,[$APP.xO,LY],null)),$APP.qP,$APP.Sl(null,null)],null),1,46,46,$APP.Sl(new $APP.T(null,1,5,$APP.V,[$APP.xO],null),new $APP.T(null,2,5,$APP.V,[$APP.xO,LY],null)),"Turns a vector of Hiccup syntax into a React element. Returns form\n unchanged if it is not a vector.",$APP.p(oZ)?oZ.uc:null])),b=$APP.u(a);a=$APP.ye(a);var c=rZ.Mb(null),d=$APP.sn.h(a);$APP.Gj.g($APP.q.h(c),$APP.q.h(d));c=new $APP.vb(null,4,[$APP.tn,rZ,$APP.sn,d,$APP.fr,$APP.fr.h(a),$APP.vr,$APP.vr.h(a)],null);return $APP.p($APP.Hm.h(a))?
|
|
||||||
$APP.Rz(d,b,c):$APP.p($APP.gn.h(a))?$APP.Sz(d,b,c):$APP.KA(d,b,c)}()],null),tZ=$APP.tm(OY,null),uZ=new $APP.vb(null,1,[UY,function(){var a=new $APP.Id(function(){return qZ},dZ,$APP.ri([$APP.tn,$APP.sn,$APP.bn,$APP.ir,$APP.XH,$APP.an,$APP.$m,$APP.hr,$APP.fr,$APP.vr,$APP.UJ],[OY,UY,"reagent/dom.cljs",13,new $APP.vb(null,6,[$APP.aK,!1,$APP.Xo,3,$APP.hG,3,$APP.yG,new $APP.T(null,2,5,$APP.V,[new $APP.T(null,2,5,$APP.V,[$APP.EQ,SY],null),new $APP.T(null,3,5,$APP.V,[$APP.EQ,SY,gZ],null)],null),$APP.fr,$APP.Sl(new $APP.T(null,
|
|
||||||
2,5,$APP.V,[$APP.EQ,SY],null),new $APP.T(null,3,5,$APP.V,[$APP.EQ,SY,gZ],null)),$APP.qP,$APP.Sl(null,null)],null),1,29,29,$APP.Sl(new $APP.T(null,2,5,$APP.V,[$APP.EQ,SY],null),new $APP.T(null,3,5,$APP.V,[$APP.EQ,SY,gZ],null)),"Render a Reagent component into the DOM. The first argument may be\n either a vector (using Reagent's Hiccup syntax), or a React element.\n The second argument should be a DOM node.\n\n Optionally takes a callback that is called when the component is in place.\n\n Returns the mounted component instance.",
|
|
||||||
$APP.p(qZ)?qZ.uc:null])),b=$APP.u(a);a=$APP.ye(a);var c=tZ.Mb(null),d=$APP.sn.h(a);$APP.Gj.g($APP.q.h(c),$APP.q.h(d));c=new $APP.vb(null,4,[$APP.tn,tZ,$APP.sn,d,$APP.fr,$APP.fr.h(a),$APP.vr,$APP.vr.h(a)],null);return $APP.p($APP.Hm.h(a))?$APP.Rz(d,b,c):$APP.p($APP.gn.h(a))?$APP.Sz(d,b,c):$APP.KA(d,b,c)}()],null);$APP.nk.j($APP.qA,$APP.Wz,new $APP.vb(null,1,[$APP.An,new $APP.vb(null,2,[KY,sZ,OY,uZ],null)],null));
|
|
||||||
}).call(this);
|
|
133
package-lock.json
generated
Normal file
133
package-lock.json
generated
Normal file
|
@ -0,0 +1,133 @@
|
||||||
|
{
|
||||||
|
"name": "scittle",
|
||||||
|
"lockfileVersion": 2,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"devDependencies": {
|
||||||
|
"react": "17.0.1",
|
||||||
|
"react-dom": "17.0.1"
|
||||||
|
},
|
||||||
|
"version": "0.7.27"
|
||||||
|
},
|
||||||
|
"node_modules/js-tokens": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/loose-envify": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"loose-envify": "cli.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/object-assign": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||||
|
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/react": {
|
||||||
|
"version": "17.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/react/-/react-17.0.1.tgz",
|
||||||
|
"integrity": "sha512-lG9c9UuMHdcAexXtigOZLX8exLWkW0Ku29qPRU8uhF2R9BN96dLCt0psvzPLlHc5OWkgymP3qwTRgbnw5BKx3w==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"loose-envify": "^1.1.0",
|
||||||
|
"object-assign": "^4.1.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/react-dom": {
|
||||||
|
"version": "17.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.1.tgz",
|
||||||
|
"integrity": "sha512-6eV150oJZ9U2t9svnsspTMrWNyHc6chX0KzDeAOXftRa8bNeOKTTfCJ7KorIwenkHd2xqVTBTCZd79yk/lx/Ug==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"loose-envify": "^1.1.0",
|
||||||
|
"object-assign": "^4.1.1",
|
||||||
|
"scheduler": "^0.20.1"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "17.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/scheduler": {
|
||||||
|
"version": "0.20.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
|
||||||
|
"integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"loose-envify": "^1.1.0",
|
||||||
|
"object-assign": "^4.1.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"js-tokens": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"loose-envify": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"object-assign": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||||
|
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"react": {
|
||||||
|
"version": "17.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/react/-/react-17.0.1.tgz",
|
||||||
|
"integrity": "sha512-lG9c9UuMHdcAexXtigOZLX8exLWkW0Ku29qPRU8uhF2R9BN96dLCt0psvzPLlHc5OWkgymP3qwTRgbnw5BKx3w==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"loose-envify": "^1.1.0",
|
||||||
|
"object-assign": "^4.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"react-dom": {
|
||||||
|
"version": "17.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.1.tgz",
|
||||||
|
"integrity": "sha512-6eV150oJZ9U2t9svnsspTMrWNyHc6chX0KzDeAOXftRa8bNeOKTTfCJ7KorIwenkHd2xqVTBTCZd79yk/lx/Ug==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"loose-envify": "^1.1.0",
|
||||||
|
"object-assign": "^4.1.1",
|
||||||
|
"scheduler": "^0.20.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scheduler": {
|
||||||
|
"version": "0.20.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
|
||||||
|
"integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"loose-envify": "^1.1.0",
|
||||||
|
"object-assign": "^4.1.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "0.7.27"
|
||||||
|
}
|
11
package.json
Normal file
11
package.json
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"name": "scittle",
|
||||||
|
"version": "0.7.27",
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"devDependencies": {
|
||||||
|
"react": "17.0.1",
|
||||||
|
"react-dom": "17.0.1"
|
||||||
|
}
|
||||||
|
}
|
4
plugins/datascript/deps.edn
Normal file
4
plugins/datascript/deps.edn
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{:deps
|
||||||
|
{datascript/datascript {:mvn/version "1.3.12"}
|
||||||
|
io.github.babashka/sci.configs {:git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
|
||||||
|
:exclusions [org.babashka/sci]}}}
|
9
plugins/datascript/src/scittle/datascript.cljs
Normal file
9
plugins/datascript/src/scittle/datascript.cljs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
(ns scittle.datascript
|
||||||
|
{:no-doc true}
|
||||||
|
(:require [sci.configs.tonsky.datascript :refer [config]]
|
||||||
|
[scittle.core :as scittle]))
|
||||||
|
|
||||||
|
(defn init []
|
||||||
|
(scittle/register-plugin!
|
||||||
|
::datascript
|
||||||
|
config))
|
12
plugins/datascript/src/scittle_plugin.edn
Normal file
12
plugins/datascript/src/scittle_plugin.edn
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
[{:name scittle/datascript
|
||||||
|
:namespaces [datascript.core datascript.db]
|
||||||
|
:js "./scittle.datascript.js"
|
||||||
|
:shadow-config
|
||||||
|
{:compiler-options {:externs ["datascript/externs.js"]}
|
||||||
|
:modules
|
||||||
|
{:scittle.datascript
|
||||||
|
{:init-fn scittle.datascript/init
|
||||||
|
;; From https://github.com/tonsky/datascript/issues/298#issuecomment-813790783
|
||||||
|
:prepend "globalThis.datascript = {};"
|
||||||
|
:depends-on #{:scittle}
|
||||||
|
:entries [datascript.core]}}}}]
|
8
plugins/dataspex/deps.edn
Normal file
8
plugins/dataspex/deps.edn
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{:deps
|
||||||
|
{no.cjohansen/dataspex {:git/url "https://github.com/cjohansen/dataspex"
|
||||||
|
:git/sha "02112200651c2bd932907bb69fba1ff50b881741"
|
||||||
|
:exclusions [ring/ring-core
|
||||||
|
ring/ring-jetty-adapter
|
||||||
|
com.cognitect/transit-clj]}
|
||||||
|
io.github.babashka/sci.configs {:git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
|
||||||
|
:exclusions [org.babashka/sci]}}}
|
9
plugins/dataspex/src/scittle/dataspex.cljs
Normal file
9
plugins/dataspex/src/scittle/dataspex.cljs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
(ns scittle.dataspex
|
||||||
|
{:no-doc true}
|
||||||
|
(:require [sci.configs.cjohansen.dataspex :refer [config]]
|
||||||
|
[scittle.core :as scittle]))
|
||||||
|
|
||||||
|
(defn init []
|
||||||
|
(scittle/register-plugin!
|
||||||
|
::dataspex
|
||||||
|
config))
|
8
plugins/dataspex/src/scittle_plugin.edn
Normal file
8
plugins/dataspex/src/scittle_plugin.edn
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
[{:name scittle/dataspex
|
||||||
|
:namespaces [dataspex.core]
|
||||||
|
:js "./scittle.dataspex.js"
|
||||||
|
:shadow-config
|
||||||
|
{:modules
|
||||||
|
{:scittle.dataspex {:init-fn scittle.dataspex/init
|
||||||
|
:depends-on #{:scittle :scittle.datascript}
|
||||||
|
:entries [dataspex.core]}}}}]
|
29
plugins/demo/README.md
Normal file
29
plugins/demo/README.md
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# Demo
|
||||||
|
|
||||||
|
A demo project of a custom scittle build.
|
||||||
|
|
||||||
|
This demo project uses the `scittle.javelin` and `scittle.hoplon` plugins which aren't part of the normal scittle distribution.
|
||||||
|
|
||||||
|
To produce release `.js` files, run: `bb release`.
|
||||||
|
|
||||||
|
See:
|
||||||
|
|
||||||
|
- `bb.edn` with
|
||||||
|
- `:deps` which includes:
|
||||||
|
- a dependency on the `scittle.build` project to build scittle + custom features
|
||||||
|
- zero or more plugin dependencies
|
||||||
|
- helpers like static file server
|
||||||
|
- development `:tasks`. Run `bb dev` for development and `bb release` to produce release artifacts.
|
||||||
|
- `deps.edn`: this only contains a dependency on scittle itself
|
||||||
|
|
||||||
|
Available plugins are in the `plugins` directory inside the top level directory of this repo.
|
||||||
|
|
||||||
|
Writing a plugin involves writing
|
||||||
|
|
||||||
|
- SCI configuration (this can be shared via the [sci.configs](https://github.com/babashka/sci.configs) project too)
|
||||||
|
- Adding a `scittle_plugin.edn` file on the plugin's classpath (e.g. in the `src` directory). This EDN file contains:
|
||||||
|
- `:name`, name of the plugin
|
||||||
|
- `:namespaces`: the namespaces exposed to SCI
|
||||||
|
- `:js`: the name of the produced `.js` module file
|
||||||
|
- `:shadow-config`: the shadow-cljs configuration specific to this plugin
|
||||||
|
- A `.cljs` file with an `init` function which calls `scittle/register-plugin!`.
|
22
plugins/demo/bb.edn
Normal file
22
plugins/demo/bb.edn
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{:deps {io.github.babashka/scittle.build {:local/root "../../build"}
|
||||||
|
;; datascript plugin
|
||||||
|
; io.github.babashka/scittle.datascript {:local/root "../../plugins/datascript"}
|
||||||
|
io.github.babashka/scittle.dataspex {:local/root "../../plugins/dataspex"}
|
||||||
|
io.github.babashka/scittle.javelin {:local/root "../../plugins/javelin"}
|
||||||
|
io.github.babashka/scittle.hoplon {:local/root "../../plugins/hoplon"}
|
||||||
|
io.github.babashka/http-server
|
||||||
|
{:git/sha "b38c1f16ad2c618adae2c3b102a5520c261a7dd3"}}
|
||||||
|
:tasks
|
||||||
|
{:requires ([scittle.build :as build])
|
||||||
|
watch {:doc "Watch build"
|
||||||
|
:task (build/build {:action "watch"})}
|
||||||
|
serve {:doc "Starts http server for serving static files"
|
||||||
|
:requires ([babashka.http-server :as http])
|
||||||
|
:task (do (http/serve {:port 1341 :dir "resources/public"})
|
||||||
|
(println "Serving static assets at http://localhost:1341"))}
|
||||||
|
-dev {:depends [watch serve]}
|
||||||
|
dev {:doc "Run compilation in watch mode and start http server"
|
||||||
|
:task (do (run '-dev {:parallel true})
|
||||||
|
(deref (promise)))}
|
||||||
|
release {:doc "Release build (advanced compiled JS)"
|
||||||
|
:task (build/build {})}}}
|
1
plugins/demo/deps.edn
Normal file
1
plugins/demo/deps.edn
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{:deps {io.github.babashka/scittle {:local/root "../.."}}}
|
21
plugins/demo/resources/public/index.html
Normal file
21
plugins/demo/resources/public/index.html
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<!-- <link rel="stylesheet" href="/css/style.css"> -->
|
||||||
|
<script src="/js/scittle.js" type="application/javascript"></script>
|
||||||
|
<script src="/js/scittle.javelin.js" type="application/javascript"></script>
|
||||||
|
<script src="/js/scittle.hoplon.js" type="application/javascript"></script>
|
||||||
|
<script type="application/x-scittle">
|
||||||
|
(require '[hoplon.core :as h])
|
||||||
|
(require '[javelin.core :as j])
|
||||||
|
|
||||||
|
(j/defc title "From Hoplon")
|
||||||
|
(h/body
|
||||||
|
(h/h1 (h/text "~{title}")))
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Hello Hoplon!</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
32
plugins/demo/shadow-cljs.edn
Normal file
32
plugins/demo/shadow-cljs.edn
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{:deps
|
||||||
|
{:aliases [:dev]}
|
||||||
|
|
||||||
|
:dev-http
|
||||||
|
{8000 "classpath:public"}
|
||||||
|
|
||||||
|
:builds
|
||||||
|
{:main
|
||||||
|
{:target :browser
|
||||||
|
:js-options
|
||||||
|
{:resolve {"react" {:target :global
|
||||||
|
:global "React"}
|
||||||
|
"react-dom" {:target :global
|
||||||
|
:global "ReactDOM"}}}
|
||||||
|
:modules
|
||||||
|
{:scittle {:entries [scittle.core]}
|
||||||
|
:scittle.nrepl {:entries [scittle.nrepl]
|
||||||
|
:depends-on #{:scittle}}
|
||||||
|
:scittle.promesa {:entries [scittle.promesa]
|
||||||
|
:depends-on #{:scittle}}
|
||||||
|
:scittle.pprint {:entries [scittle.pprint]
|
||||||
|
:depends-on #{:scittle}}
|
||||||
|
:scittle.reagent {:entries [scittle.reagent]
|
||||||
|
:depends-on #{:scittle}}
|
||||||
|
:scittle.re-frame {:entries [scittle.re-frame]
|
||||||
|
:depends-on #{:scittle.reagent
|
||||||
|
:scittle}}
|
||||||
|
:scittle.cljs-ajax {:entries [scittle.cljs-ajax]
|
||||||
|
:depends-on #{:scittle}}}
|
||||||
|
:build-hooks [(shadow.cljs.build-report/hook)]
|
||||||
|
:output-dir "resources/public/js"
|
||||||
|
:devtools {:repl-pprint true}}}}
|
4
plugins/hoplon/deps.edn
Normal file
4
plugins/hoplon/deps.edn
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{:deps
|
||||||
|
{hoplon/hoplon {:mvn/version "7.5.0"}
|
||||||
|
io.github.babashka/sci.configs {:git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
|
||||||
|
:exclusions [org.babashka/sci]}}}
|
9
plugins/hoplon/src/scittle/hoplon.cljs
Normal file
9
plugins/hoplon/src/scittle/hoplon.cljs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
(ns scittle.hoplon
|
||||||
|
{:no-doc true}
|
||||||
|
(:require [sci.configs.hoplon.hoplon :refer [config]]
|
||||||
|
[scittle.core :as scittle]))
|
||||||
|
|
||||||
|
(defn init []
|
||||||
|
(scittle/register-plugin!
|
||||||
|
::hoplon
|
||||||
|
config))
|
9
plugins/hoplon/src/scittle/javelin.cljs
Normal file
9
plugins/hoplon/src/scittle/javelin.cljs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
(ns scittle.javelin
|
||||||
|
{:no-doc true}
|
||||||
|
(:require [sci.configs.hoplon.javelin :refer [config]]
|
||||||
|
[scittle.core :as scittle]))
|
||||||
|
|
||||||
|
(defn init []
|
||||||
|
(scittle/register-plugin!
|
||||||
|
::javelin
|
||||||
|
config))
|
13
plugins/hoplon/src/scittle_plugin.edn
Normal file
13
plugins/hoplon/src/scittle_plugin.edn
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[{:name scittle/hoplon
|
||||||
|
:namespaces [javelin.core
|
||||||
|
hoplon.core
|
||||||
|
hoplon.dom]
|
||||||
|
:js "./scittle.hoplon.js"
|
||||||
|
:shadow-config
|
||||||
|
{:modules
|
||||||
|
{:scittle.hoplon {:init-fn scittle.hoplon/init
|
||||||
|
:depends-on #{:scittle :scittle.javelin}
|
||||||
|
:entries [hoplon.core hoplon.dom]}
|
||||||
|
:scittle.javelin {:init-fn scittle.javelin/init
|
||||||
|
:depends-on #{:scittle}
|
||||||
|
:entries [javelin.core]}}}}]
|
4
plugins/javelin/deps.edn
Normal file
4
plugins/javelin/deps.edn
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{:deps
|
||||||
|
{hoplon/javelin {:mvn/version "3.9.3"}
|
||||||
|
io.github.babashka/sci.configs {:git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
|
||||||
|
:exclusions [org.babashka/sci]}}}
|
9
plugins/javelin/src/scittle/javelin.cljs
Normal file
9
plugins/javelin/src/scittle/javelin.cljs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
(ns scittle.javelin
|
||||||
|
{:no-doc true}
|
||||||
|
(:require [sci.configs.hoplon.javelin :refer [config]]
|
||||||
|
[scittle.core :as scittle]))
|
||||||
|
|
||||||
|
(defn init []
|
||||||
|
(scittle/register-plugin!
|
||||||
|
::javelin
|
||||||
|
config))
|
8
plugins/javelin/src/scittle_plugin.edn
Normal file
8
plugins/javelin/src/scittle_plugin.edn
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
[{:name scittle/javelin
|
||||||
|
:namespaces [javelin.core]
|
||||||
|
:js "./scittle.javelin.js"
|
||||||
|
:shadow-config
|
||||||
|
{:modules
|
||||||
|
{:scittle.javelin {:init-fn scittle.javelin/init
|
||||||
|
:depends-on #{:scittle}
|
||||||
|
:entries [javelin.core]}}}}]
|
743
report.html
743
report.html
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,7 @@
|
||||||
<pre>
|
<pre>
|
||||||
<code class="html">
|
<code class="html">
|
||||||
<head>
|
<head>
|
||||||
<script src="https://borkdude.github.io/scittle/js/scittle.js" type="application/javascript"></script>
|
<script src="https://babashka.github.io/scittle/js/scittle.js" type="application/javascript"></script>
|
||||||
|
|
||||||
<script type="application/x-scittle">
|
<script type="application/x-scittle">
|
||||||
(defn my-alert []
|
(defn my-alert []
|
|
@ -3,11 +3,10 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<link rel="stylesheet" href="css/style.css">
|
<link rel="stylesheet" href="css/style.css">
|
||||||
<script src="https://borkdude.github.io/scittle/js/scittle.js" type="application/javascript"></script>
|
<script src="https://babashka.github.io/scittle/js/scittle.js" type="application/javascript"></script>
|
||||||
|
<script crossorigin src="https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js"></script>
|
||||||
<script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script>
|
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js"></script>
|
||||||
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>
|
<script src="https://babashka.github.io/scittle/js/scittle.reagent.js" type="application/javascript"></script>
|
||||||
<script src="https://borkdude.github.io/scittle/js/scittle.reagent.js" type="application/javascript"></script>
|
|
||||||
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js" type="text/javascript"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js" type="text/javascript"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/languages/clojure.min.js" type="text/javascript"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/languages/clojure.min.js" type="text/javascript"></script>
|
|
@ -41,7 +41,7 @@
|
||||||
}
|
}
|
||||||
};"
|
};"
|
||||||
"if(typeof scittle === 'undefined'){"
|
"if(typeof scittle === 'undefined'){"
|
||||||
(append-tag :script {:src "https://borkdude.github.io/scittle/js/scittle.js"
|
(append-tag :script {:src "https://babashka.github.io/scittle/js/scittle.js"
|
||||||
:onerror "function(){alert('Error loading ' + this.src)}"
|
:onerror "function(){alert('Error loading ' + this.src)}"
|
||||||
:onload "runCode"})
|
:onload "runCode"})
|
||||||
"} else {
|
"} else {
|
||||||
|
@ -134,6 +134,7 @@
|
||||||
[:br]
|
[:br]
|
||||||
[(fn []
|
[(fn []
|
||||||
[:a {:href (str "?name=" (js/encodeURIComponent @*bookmark-name)
|
[:a {:href (str "?name=" (js/encodeURIComponent @*bookmark-name)
|
||||||
"&code=" (js/encodeURIComponent @*code))} "Copy this link to share ⤴️"])]]))
|
"&code=" (js/encodeURIComponent @*code)
|
||||||
|
"%20")} "Copy this link to share ⤴️"])]]))
|
||||||
|
|
||||||
(rdom/render [workspace] (.getElementById js/document "app"))
|
(rdom/render [workspace] (.getElementById js/document "app"))
|
56
resources/public/cljs/codemirror.cljs
Normal file
56
resources/public/cljs/codemirror.cljs
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
(require '[clojure.string :as str])
|
||||||
|
(declare cm)
|
||||||
|
|
||||||
|
(defn eval-me []
|
||||||
|
(js/scittle.core.eval_string (-> cm .-state .-doc .toString)))
|
||||||
|
|
||||||
|
(def extension
|
||||||
|
(.of js/cv.keymap
|
||||||
|
(clj->js [{:key "Mod-Enter"
|
||||||
|
:run (fn []
|
||||||
|
(eval-me))}
|
||||||
|
#_{:key (str modifier "-Enter")
|
||||||
|
:shift (partial eval-top-level on-result)
|
||||||
|
:run (partial eval-at-cursor on-result)}])))
|
||||||
|
(def cm
|
||||||
|
(let [doc (str/trim "
|
||||||
|
(require '[reagent.core :as r]
|
||||||
|
'[reagent.dom :as rdom]
|
||||||
|
'[re-frame.core :as rf])
|
||||||
|
|
||||||
|
(rf/reg-event-fx ::click (fn [{:keys [db]} _] {:db (update db :clicks (fnil inc 0))}))
|
||||||
|
(rf/reg-sub ::clicks (fn [db] (:clicks db)))
|
||||||
|
|
||||||
|
(defn my-component []
|
||||||
|
(let [clicks (rf/subscribe [::clicks])]
|
||||||
|
[:div
|
||||||
|
[:p \"Clicks: \" @clicks]
|
||||||
|
[:p [:button {:on-click #(rf/dispatch [::click])}
|
||||||
|
\"Click me!\"]]]))
|
||||||
|
|
||||||
|
(rdom/render [my-component] (.getElementById js/document \"reagent\"))
|
||||||
|
")]
|
||||||
|
(js/cm.EditorView. #js {:doc doc
|
||||||
|
:extensions #js [js/cm.basicSetup, (js/lc.clojure), (.highest js/cs.Prec extension)]
|
||||||
|
:parent (js/document.querySelector "#app")
|
||||||
|
#_#_:dispatch (fn [tr] (-> cm (.update #js [tr])) (eval-me))
|
||||||
|
})))
|
||||||
|
(set! (.-eval_me js/globalThis) eval-me)
|
||||||
|
(set! (.-cm_instance js/globalThis) cm)
|
||||||
|
|
||||||
|
(defn linux? []
|
||||||
|
(some? (re-find #"(Linux)|(X11)" js/navigator.userAgent)))
|
||||||
|
|
||||||
|
(defn mac? []
|
||||||
|
(and (not (linux?))
|
||||||
|
(some? (re-find #"(Mac)|(iPhone)|(iPad)|(iPod)" js/navigator.platform))))
|
||||||
|
|
||||||
|
(let [elt (js/document.getElementById "evalMe")
|
||||||
|
txt (.-innerText elt)
|
||||||
|
mod-symbol (if (mac?)
|
||||||
|
"⌘"
|
||||||
|
"⌃")
|
||||||
|
txt (str txt " " mod-symbol"-⏎")]
|
||||||
|
(set! (.-innerHTML elt) txt))
|
||||||
|
|
||||||
|
(eval-me)
|
15
resources/public/cljs/nrepl_playground.cljs
Normal file
15
resources/public/cljs/nrepl_playground.cljs
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
(ns nrepl-playground)
|
||||||
|
|
||||||
|
(+ 1 2 3)
|
||||||
|
|
||||||
|
(->
|
||||||
|
(js/document.getElementsByTagName "body")
|
||||||
|
first
|
||||||
|
(.append
|
||||||
|
(doto (js/document.createElement "p")
|
||||||
|
(.append
|
||||||
|
(js/document.createTextNode "there")))))
|
||||||
|
|
||||||
|
(defn foo [])
|
||||||
|
|
||||||
|
(js/alert "Isn't this cool? :)")
|
33
resources/public/cljs/replicant_tictactoe/core.cljs
Normal file
33
resources/public/cljs/replicant_tictactoe/core.cljs
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
;; COPIED FROM https://github.com/cjohansen/replicant-tic-tac-toe/blob/7a33fb12f0cd6658b2f555ff673dee031d4aa921/src/tic_tac_toe/core.cljs
|
||||||
|
|
||||||
|
(ns replicant-tictactoe.core
|
||||||
|
(:require [replicant.dom :as r]
|
||||||
|
[replicant-tictactoe.game :as game]
|
||||||
|
[replicant-tictactoe.ui :as ui]))
|
||||||
|
|
||||||
|
(defn start-new-game [store]
|
||||||
|
(reset! store (game/create-game {:size 3})))
|
||||||
|
|
||||||
|
(defn main []
|
||||||
|
;; Set up the atom
|
||||||
|
(let [store (atom nil)
|
||||||
|
el (js/document.getElementById "app")]
|
||||||
|
|
||||||
|
;; Globally handle DOM events
|
||||||
|
(r/set-dispatch!
|
||||||
|
(fn [_ [action & args]]
|
||||||
|
(case action
|
||||||
|
:tic (apply swap! store game/tic args)
|
||||||
|
:reset (start-new-game store))))
|
||||||
|
|
||||||
|
;; Render on every change
|
||||||
|
(add-watch store ::render
|
||||||
|
(fn [_ _ _ game]
|
||||||
|
(->> (ui/game->ui-data game)
|
||||||
|
ui/render-game
|
||||||
|
(r/render el))))
|
||||||
|
|
||||||
|
;; Trigger the first render by initializing the game.
|
||||||
|
(start-new-game store)))
|
||||||
|
|
||||||
|
(main)
|
41
resources/public/cljs/replicant_tictactoe/game.cljs
Normal file
41
resources/public/cljs/replicant_tictactoe/game.cljs
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
;; COPIED FROM https://github.com/cjohansen/replicant-tic-tac-toe/blob/7a33fb12f0cd6658b2f555ff673dee031d4aa921/src/tic_tac_toe/game.cljs
|
||||||
|
|
||||||
|
(ns replicant-tictactoe.game)
|
||||||
|
|
||||||
|
(defn create-game [{:keys [size]}]
|
||||||
|
{:next-player :x
|
||||||
|
:size size})
|
||||||
|
|
||||||
|
(def next-player {:x :o, :o :x})
|
||||||
|
|
||||||
|
(defn winner? [tics path]
|
||||||
|
(when (= 1 (count (set (map tics path))))
|
||||||
|
path))
|
||||||
|
|
||||||
|
(defn get-winning-path [{:keys [size tics]} y x]
|
||||||
|
(or (winner? tics (mapv #(vector y %) (range 0 size)))
|
||||||
|
(winner? tics (mapv #(vector % x) (range 0 size)))
|
||||||
|
(when (= y x)
|
||||||
|
(winner? tics (mapv #(vector % %) (range 0 size))))))
|
||||||
|
|
||||||
|
(defn maybe-conclude [game y x]
|
||||||
|
(if-let [path (get-winning-path game y x)]
|
||||||
|
(-> (dissoc game :next-player)
|
||||||
|
(assoc :over? true
|
||||||
|
:victory {:player (get-in game [:tics [y x]])
|
||||||
|
:path path}))
|
||||||
|
(let [tie? (= (count (:tics game)) (* (:size game) (:size game)))]
|
||||||
|
(cond-> game
|
||||||
|
tie? (dissoc :next-player)
|
||||||
|
tie? (assoc :over? true)))))
|
||||||
|
|
||||||
|
(defn tic [game y x]
|
||||||
|
(let [player (:next-player game)]
|
||||||
|
(if (or (get-in game [:tics [y x]])
|
||||||
|
(<= (:size game) x)
|
||||||
|
(<= (:size game) y))
|
||||||
|
game
|
||||||
|
(-> game
|
||||||
|
(assoc-in [:tics [y x]] player)
|
||||||
|
(assoc :next-player (next-player player))
|
||||||
|
(maybe-conclude y x)))))
|
50
resources/public/cljs/replicant_tictactoe/style.css
Normal file
50
resources/public/cljs/replicant_tictactoe/style.css
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
/* COPIED from https://github.com/cjohansen/replicant-tic-tac-toe/blob/7a33fb12f0cd6658b2f555ff673dee031d4aa921/resources/public/styles.css */
|
||||||
|
.cell {
|
||||||
|
aspect-ratio: 1 / 1;
|
||||||
|
background: rgba(255, 255, 255, 0.8);
|
||||||
|
border-radius: 6%;
|
||||||
|
border: none;
|
||||||
|
display: block;
|
||||||
|
flex: 1 1 0%;
|
||||||
|
outline: none;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-content {
|
||||||
|
opacity: 1;
|
||||||
|
transition: opacity 0.25s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.transparent {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-dim {
|
||||||
|
background: rgba(249, 249, 240, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-highlight {
|
||||||
|
background: #fcfcf3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clickable {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.board {
|
||||||
|
--gap: 0.75rem;
|
||||||
|
background: #833ab4;
|
||||||
|
background: linear-gradient(90deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--gap);
|
||||||
|
padding: var(--gap);
|
||||||
|
max-width: 80vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: var(--gap);
|
||||||
|
}
|
75
resources/public/cljs/replicant_tictactoe/ui.cljs
Normal file
75
resources/public/cljs/replicant_tictactoe/ui.cljs
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
;; COPIED FROM https://github.com/cjohansen/replicant-tic-tac-toe/blob/7a33fb12f0cd6658b2f555ff673dee031d4aa921/src/tic_tac_toe/ui.cljs
|
||||||
|
|
||||||
|
(ns replicant-tictactoe.ui)
|
||||||
|
|
||||||
|
(def mark-x
|
||||||
|
[:svg {:xmlns "http://www.w3.org/2000/svg"
|
||||||
|
:viewBox "0 -10 108 100"}
|
||||||
|
[:path
|
||||||
|
{:fill "currentColor"
|
||||||
|
:d "m1.753 69.19.36-1.08q.35-1.09 1.92-2.97 1.58-1.87 3.85-3.84 2.29-1.97 4.6-3.54 2.31-1.57 4.93-3.24 2.62-1.66 4.65-2.9 2.04-1.23 3.91-2.27 1.87-1.05 3.98-2.31 2.11-1.27 4.12-2.5 2.01-1.24 4.33-2.51l4.6-2.52q2.27-1.25 4.84-2.86 2.56-1.62 5.03-3.09 2.47-1.47 4.5-2.88 2.03-1.4 3.82-2.82t3.81-3.47q2.01-2.06 3.7-3.51 1.69-1.46 3.47-3.03 1.77-1.57 4.01-3.69 2.24-2.11 4.13-3.7 1.89-1.58 3.93-2.97 2.04-1.39 4.05-2.49 2.01-1.11 5.26-2.54 3.24-1.44 4.48-1.46 1.24-.01 2.42.37 1.18.37 2.18 1.11 1 .74 1.71 1.75.71 1.02 1.06 2.21.34 1.19.3 2.43-.05 1.24-.5 2.39-.44 1.16-1.23 2.12-.79.95-1.84 1.61-1.05.65-2.26.94-1.21.28-2.44.16-1.23-.11-2.37-.62-1.13-.5-2.04-1.34-.91-.84-1.51-1.93-.6-1.08-.81-2.3-.22-1.22-.04-2.45.18-1.23.75-2.33.56-1.1 1.45-1.97.89-.86 2.01-1.4 1.11-.54 2.35-.69 1.23-.15 2.44.1t2.29.87q1.07.63 1.88 1.56.82.93 1.29 2.08.48 1.14.56 2.38.09 1.24-.23 2.44-.31 1.19-.99 2.23-.68 1.04-1.66 1.8-.98.76-2.15 1.18l-1.16.41-2.28 1.17q-2.28 1.18-4.38 2.7-2.1 1.51-4.2 3.44-2.1 1.92-4.18 3.7-2.08 1.77-3.9 3.44-1.81 1.68-3.41 3.13-1.6 1.46-3.38 3.09-1.79 1.62-3.44 2.97-1.66 1.34-3.53 2.4-1.88 1.06-4.17 2.65-2.3 1.6-4.79 2.74-2.48 1.14-4.98 2.71-2.5 1.57-4.51 2.47-2.01.9-3.99 1.87-1.98.97-3.88 2.02-1.91 1.05-4.38 2.34-2.46 1.28-4.94 2.53-2.47 1.25-4.48 2.38-2 1.12-3.96 2.14-1.95 1.01-3.83 1.99-1.89.98-4.37 2.05-2.48 1.06-2.96 2.01-.48.96-.78 1.49-.3.53-.71.97-.41.44-.92.77-.51.34-1.09.54-.57.2-1.17.25-.6.06-1.2-.03t-1.16-.32q-.56-.23-1.05-.59-.49-.35-.89-.82-.39-.46-.65-1.01-.27-.54-.4-1.14-.13-.59-.12-1.19.02-.6.18-1.19l.16-.59Z"}]
|
||||||
|
[:path
|
||||||
|
{:fill "currentColor"
|
||||||
|
:d "m28.099 4.991 2.69 1.97q2.69 1.96 4.5 3.22 1.8 1.28 4.54 3.46 2.74 2.18 4.57 3.89t3.38 3.72q1.54 2.02 2.88 4.3 1.34 2.28 2.83 4.46 1.48 2.18 2.63 4.14 1.15 1.96 2.74 4.07 1.59 2.1 3.59 4.19 1.99 2.08 4.23 4.48 2.24 2.4 3.7 4.04 1.47 1.64 2.91 3.23 1.44 1.59 3.08 3.58 1.64 1.99 3.51 4.08 1.87 2.09 3.55 3.77 1.69 1.68 4.1 3.51 2.42 1.83 3.9 2.58 1.48.74 2.14 1.34.66.6 1.15 1.33.5.74.8 1.57.31.84.4 1.72.1.88-.02 1.76-.12.88-.44 1.71-.33.82-.84 1.55-.51.72-1.19 1.3-.67.58-1.46.98-.79.41-1.65.61-.87.2-1.76.19-.88-.01-1.74-.24-.86-.22-1.64-.64-.78-.42-2.27-2.72-1.48-2.3-1.52-3.49-.03-1.19.31-2.33.35-1.14 1.04-2.11.69-.97 1.66-1.67.96-.7 2.1-1.05 1.14-.35 2.33-.32 1.19.02 2.31.43t2.05 1.15q.93.75 1.58 1.75.64 1 .93 2.15.29 1.16.2 2.35-.09 1.18-.56 2.28-.47 1.1-1.26 1.99-.79.88-1.83 1.47t-2.2.82q-1.17.23-2.35.07-1.19-.16-2.25-.68-1.07-.53-1.92-1.37-.84-.84-1.37-1.9-.54-1.07-.7-2.25-.17-1.18.06-2.35.22-1.17.8-2.21.58-1.04 1.47-1.84.88-.79 1.98-1.27 1.09-.47 2.28-.57 1.18-.1 2.34.18 1.16.29 2.16.93 1.01.63 1.76 1.56.74.93-.33-.26-1.07-1.18-.41-.58.66.59 1.15 1.33.5.74.8 1.57.31.83.4 1.72.1.88-.02 1.76-.12.88-.44 1.7-.33.83-.84 1.55-.51.73-1.19 1.31-.67.58-1.46.98-.79.41-1.65.61-.87.2-1.75.19-.89-.01-1.75-.24-.86-.22-1.64-.64-.78-.42-2.73-1.57-1.95-1.14-4.26-2.95-2.31-1.8-3.87-3.43-1.57-1.62-3.17-3.29-1.6-1.66-3.55-4.05-1.95-2.39-3.33-4.15-1.39-1.76-2.77-3.4-1.38-1.64-3.07-3.56-1.7-1.91-3.91-4.13-2.2-2.22-3.74-4.1-1.54-1.88-2.79-3.75-1.24-1.87-2.4-4.33t-2.39-4.46q-1.23-2.01-2.4-4.59-1.17-2.59-2.53-5.01-1.36-2.43-3.35-4.44-1.99-2.02-4.52-4.27-2.54-2.25-5.33-4.04-2.81-1.79-3.28-2.21-.47-.41-.83-.92-.35-.51-.58-1.1-.22-.58-.3-1.2-.08-.62-.01-1.23.08-.62.29-1.21.22-.58.58-1.1.35-.51.81-.93.47-.42 1.02-.71t1.16-.45q.61-.15 1.23-.15t1.22.14q.61.15 1.17.44l.55.28Z"}]])
|
||||||
|
|
||||||
|
(def mark-o
|
||||||
|
[:svg {:xmlns "http://www.w3.org/2000/svg"
|
||||||
|
:viewBox "0 0 114 114"}
|
||||||
|
[:path
|
||||||
|
{:fill "none"
|
||||||
|
:stroke "currentColor"
|
||||||
|
:stroke-linecap "round"
|
||||||
|
:stroke-width "6"
|
||||||
|
:d "M74.616 8.935c7.73 2.38 15.96 9.34 21.58 16.04 5.63 6.69 10.57 15.46 12.18 24.11 1.6 8.65.74 19.67-2.53 27.77-3.27 8.11-10.12 15.37-17.09 20.88-6.98 5.51-16.07 10.81-24.76 12.17-8.7 1.35-19.32-.76-27.42-4.06-8.1-3.29-15.73-8.93-21.21-15.73-5.48-6.81-10.32-16.5-11.67-25.09-1.35-8.6.19-18.39 3.57-26.51 3.38-8.11 9.99-16.6 16.71-22.19 6.72-5.59 13.95-10.52 23.63-11.36 9.68-.84 28.04 4.34 34.45 6.32 6.42 1.97 4.37 4.6 4.04 5.55m-48.33-9.69c7.65-3.32 19.78-3.63 28.63-2.01 8.86 1.63 17.85 5.89 24.49 11.76 6.64 5.87 12.7 15.08 15.37 23.48 2.67 8.41 2.5 18.4.65 26.95-1.85 8.54-5.98 17.59-11.77 24.34-5.78 6.74-14.56 13.05-22.93 16.11-8.37 3.06-18.75 4.19-27.29 2.25-8.54-1.93-17.37-7.89-23.96-13.87-6.59-5.97-12.89-13.58-15.57-21.96-2.69-8.39-2.31-19.94-.56-28.34 1.75-8.4 5.21-15.74 11.06-22.09 5.85-6.35 19.92-13.32 24.04-16.01 4.12-2.7.37-1.1.67-.16"}]])
|
||||||
|
|
||||||
|
(defn render-cell [{:keys [content on-click dim? highlight? clickable?]}]
|
||||||
|
[:button.cell
|
||||||
|
{:on {:click on-click}
|
||||||
|
:class (cond-> []
|
||||||
|
dim? (conj "cell-dim")
|
||||||
|
highlight? (conj "cell-highlight")
|
||||||
|
clickable? (conj "clickable"))}
|
||||||
|
(when content
|
||||||
|
[:div.cell-content
|
||||||
|
{:replicant/mounting {:class "transparent"}
|
||||||
|
:replicant/unmounting {:class "transparent"}}
|
||||||
|
content])])
|
||||||
|
|
||||||
|
(defn render-board [{:keys [rows]}]
|
||||||
|
[:div.board
|
||||||
|
(for [row rows]
|
||||||
|
[:div.row
|
||||||
|
(for [cell row]
|
||||||
|
(render-cell cell))])])
|
||||||
|
|
||||||
|
(defn render-game [{:keys [board button]}]
|
||||||
|
[:div
|
||||||
|
(render-board board)
|
||||||
|
(when button
|
||||||
|
[:button {:on {:click (:on-click button)}
|
||||||
|
:style {:margin-top 20
|
||||||
|
:font-size 20}}
|
||||||
|
(:text button)])])
|
||||||
|
|
||||||
|
(def player->mark
|
||||||
|
{:x mark-x
|
||||||
|
:o mark-o})
|
||||||
|
|
||||||
|
(defn game->ui-data [{:keys [size tics victory over?]}]
|
||||||
|
(let [highlight? (set (:path victory))]
|
||||||
|
{:button (when over?
|
||||||
|
{:text "Start over"
|
||||||
|
:on-click [:reset]})
|
||||||
|
:board
|
||||||
|
{:rows
|
||||||
|
(for [y (range size)]
|
||||||
|
(for [x (range size)]
|
||||||
|
(if-let [player (get tics [y x])]
|
||||||
|
(let [victorious? (highlight? [y x])]
|
||||||
|
(cond-> {:content (player->mark player)}
|
||||||
|
victorious? (assoc :highlight? true)
|
||||||
|
(and over? (not victorious?)) (assoc :dim? true)))
|
||||||
|
(if over?
|
||||||
|
{:dim? true}
|
||||||
|
{:clickable? true
|
||||||
|
:on-click [:tic y x]}))))}}))
|
57
resources/public/codemirror.html
Normal file
57
resources/public/codemirror.html
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script async src="https://ga.jspm.io/npm:es-module-shims@1.6.1/dist/es-module-shims.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js"></script>
|
||||||
|
<script>scittle.core.disable_auto_eval();</script>
|
||||||
|
<script crossorigin src="https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js"></script>
|
||||||
|
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.reagent.js"> </script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.re-frame.js"> </script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.promesa.js"> </script>
|
||||||
|
|
||||||
|
<script type="importmap">
|
||||||
|
{
|
||||||
|
"imports": {
|
||||||
|
"codemirror": "https://cdn.jsdelivr.net/npm/codemirror/dist/index.js",
|
||||||
|
"@codemirror/commands": "https://cdn.jsdelivr.net/npm/@codemirror/commands/dist/index.js",
|
||||||
|
"@codemirror/search": "https://cdn.jsdelivr.net/npm/@codemirror/search/dist/index.js",
|
||||||
|
"@codemirror/autocomplete": "https://cdn.jsdelivr.net/npm/@codemirror/autocomplete/dist/index.js",
|
||||||
|
"@codemirror/lint": "https://cdn.jsdelivr.net/npm/@codemirror/lint/dist/index.js",
|
||||||
|
"crelt": "https://cdn.jsdelivr.net/npm/crelt/index.es.js",
|
||||||
|
"@nextjournal/lang-clojure": "https://cdn.jsdelivr.net/npm/@nextjournal/lang-clojure/dist/index.js",
|
||||||
|
"@nextjournal/lezer-clojure": "https://cdn.jsdelivr.net/npm/@nextjournal/lezer-clojure/dist/index.es.js",
|
||||||
|
"@lezer/highlight": "https://cdn.jsdelivr.net/npm/@lezer/highlight/dist/index.js",
|
||||||
|
"@lezer/lr": "https://cdn.jsdelivr.net/npm/@lezer/lr/dist/index.js",
|
||||||
|
"@lezer/common": "https://cdn.jsdelivr.net/npm/@lezer/common/dist/index.js",
|
||||||
|
"@codemirror/language": "https://cdn.jsdelivr.net/npm/@codemirror/language/dist/index.js",
|
||||||
|
"@marijn/find-cluster-break": "https://cdn.jsdelivr.net/npm/@marijn/find-cluster-break",
|
||||||
|
"@codemirror/state": "https://cdn.jsdelivr.net/npm/@codemirror/state/dist/index.js",
|
||||||
|
"@codemirror/view": "https://cdn.jsdelivr.net/npm/@codemirror/view/dist/index.js",
|
||||||
|
"style-mod": "https://cdn.jsdelivr.net/npm/style-mod/src/style-mod.js",
|
||||||
|
"w3c-keyname": "https://cdn.jsdelivr.net/npm/w3c-keyname/index.es.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<script type="module" type="application/javascript">
|
||||||
|
import * as cm from 'codemirror';
|
||||||
|
import * as lc from '@nextjournal/lang-clojure'
|
||||||
|
import * as cv from '@codemirror/view';
|
||||||
|
import * as cs from '@codemirror/state';
|
||||||
|
globalThis.cm = cm;
|
||||||
|
globalThis.lc = lc;
|
||||||
|
globalThis.cv = cv;
|
||||||
|
globalThis.cs = cs;
|
||||||
|
scittle.core.eval_script_tags();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="application/x-scittle" src="cljs/codemirror.cljs"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Using <a href="https://www.npmjs.com/package/@nextjournal/lang-clojure">@nextjournal/lang-clojure</a> directly from npm in HTML!</h1>
|
||||||
|
<div id="app">
|
||||||
|
</div>
|
||||||
|
<div id="reagent">
|
||||||
|
</div>
|
||||||
|
<button id="evalMe" onClick="eval_me()">Eval</button>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,7 +1,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script src="https://cdn.jsdelivr.net/gh/borkdude/scittle@0.0.2/js/scittle.js" type="application/javascript"></script>
|
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js" type="application/javascript"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/gh/borkdude/scittle@0.0.2/js/scittle.cljs-ajax.js" type="application/javascript"></script>
|
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.cljs-ajax.js" type="application/javascript"></script>
|
||||||
<script type="application/x-scittle">
|
<script type="application/x-scittle">
|
||||||
(require '[ajax.core :refer [GET]])
|
(require '[ajax.core :refer [GET]])
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script src="https://cdn.jsdelivr.net/gh/borkdude/scittle@0.0.2/js/scittle.js" type="application/javascript"></script>
|
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js" type="application/javascript"></script>
|
||||||
<script type="application/x-scittle">
|
<script type="application/x-scittle">
|
||||||
(defn my-alert []
|
(defn my-alert []
|
||||||
(js/alert "You clicked!"))
|
(js/alert "You clicked!"))
|
15
resources/public/html/local.html
Normal file
15
resources/public/html/local.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script src="../js/scittle.js" type="application/javascript"></script>
|
||||||
|
<script crossorigin src="https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js"></script>
|
||||||
|
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js"></script>
|
||||||
|
<script src="../js/scittle.reagent.js" type="application/javascript"></script>
|
||||||
|
<script type="application/x-scittle">
|
||||||
|
(defn f [x]
|
||||||
|
(inc n))
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,9 +1,9 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script src="https://cdn.jsdelivr.net/gh/borkdude/scittle@0.0.2/js/scittle.js" type="application/javascript"></script>
|
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js" type="application/javascript"></script>
|
||||||
<script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script>
|
<script crossorigin src="https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js"></script>
|
||||||
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>
|
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/gh/borkdude/scittle@0.0.2/js/scittle.reagent.js" type="application/javascript"></script>
|
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.reagent.js" type="application/javascript"></script>
|
||||||
<script type="application/x-scittle">
|
<script type="application/x-scittle">
|
||||||
(require '[reagent.core :as r]
|
(require '[reagent.core :as r]
|
||||||
'[reagent.dom :as rdom])
|
'[reagent.dom :as rdom])
|
191
resources/public/index.html
Normal file
191
resources/public/index.html
Normal file
|
@ -0,0 +1,191 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="css/style.css">
|
||||||
|
<script src="js/scittle.js" type="application/javascript"></script>
|
||||||
|
<script crossorigin src="https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js"></script>
|
||||||
|
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js"></script>
|
||||||
|
<script src="js/scittle.reagent.js" type="application/javascript"></script>
|
||||||
|
<!-- <script src="js/scittle.re-frame.js" type="application/javascript"></script> -->
|
||||||
|
<script src="js/scittle.cljs-ajax.js" type="application/javascript"></script>
|
||||||
|
<script src="js/scittle.pprint.js" type="application/javascript"></script>
|
||||||
|
|
||||||
|
<script type="application/x-scittle">
|
||||||
|
(defn my-alert []
|
||||||
|
(js/alert "You clicked!"))
|
||||||
|
|
||||||
|
(set! (.-my_alert js/window) my-alert)
|
||||||
|
|
||||||
|
(require '[reagent.core :as r]
|
||||||
|
'[reagent.dom :as rdom])
|
||||||
|
|
||||||
|
(def state (r/atom {:clicks 0}))
|
||||||
|
|
||||||
|
#_(require '[re-frame.core :as rf]
|
||||||
|
'[reagent.dom :as rdom])
|
||||||
|
#_(rf/reg-event-fx ::click (fn [{:keys [db]} [_]] {:db (update db :clicks (fnil inc 0))}))
|
||||||
|
#_(rf/reg-sub ::clicks (fn [db _] (:clicks db)))
|
||||||
|
|
||||||
|
(defn my-component []
|
||||||
|
[:div
|
||||||
|
[:p "Clicks: " (:clicks @state)]
|
||||||
|
[:p [:button {:on-click #(do (swap! state update :clicks inc)
|
||||||
|
#_(rf/dispatch [::click]))}
|
||||||
|
"Click me!"]]])
|
||||||
|
|
||||||
|
#_(defn re-frame-component []
|
||||||
|
(let [clicks (rf/subscribe [::clicks])]
|
||||||
|
[:div "Clicks:" @clicks]))
|
||||||
|
|
||||||
|
(rdom/render [my-component] (.getElementById js/document "app"))
|
||||||
|
|
||||||
|
#_(rdom/render [re-frame-component] (.getElementById js/document "re-frame"))
|
||||||
|
|
||||||
|
(require '[ajax.core :refer [GET]])
|
||||||
|
|
||||||
|
(defn handler [response]
|
||||||
|
(js/alert (str response)))
|
||||||
|
|
||||||
|
(defn make-request []
|
||||||
|
(GET "html/cljs-ajax.html" {:handler handler}))
|
||||||
|
|
||||||
|
;; export function to use from JavaScript:
|
||||||
|
(set! (.-make_request js/window) make-request)
|
||||||
|
|
||||||
|
(def code-tags (.querySelectorAll js/document "code[data-type='scittle']"))
|
||||||
|
|
||||||
|
(require '[goog.object :as gobject])
|
||||||
|
(doseq [code code-tags]
|
||||||
|
(let [src (.getAttribute code "data-src")
|
||||||
|
req (js/XMLHttpRequest.)]
|
||||||
|
(.open req "GET" src true)
|
||||||
|
(set! (.-onload req)
|
||||||
|
(fn []
|
||||||
|
(let [response (gobject/get req "response")]
|
||||||
|
(set! (.-innerText code) response)
|
||||||
|
(.highlightElement js/hljs code))))
|
||||||
|
(.send req)))
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="cljs/script.cljs" type="application/x-scittle"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js" type="text/javascript"></script>
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/zenburn.min.css" integrity="sha512-JPxjD2t82edI35nXydY/erE9jVPpqxEJ++6nYEoZEpX2TRsmp2FpZuQqZa+wBCen5U16QZOkMadGXHCfp+tUdg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div style="float: right;">
|
||||||
|
<a href="https://gitHub.com/babashka/scittle"><img src="https://img.shields.io/github/stars/babashka/scittle.svg?style=social&label=Star"></a></div>
|
||||||
|
|
||||||
|
<h1>Scittle</h1>
|
||||||
|
<h2>What is this?</h2>
|
||||||
|
<p>This project exposes the <a href="https://github.com/babashka/sci">Small Clojure Interpreter</a> in the
|
||||||
|
browser in such a way that you can use it with the <tt>script</tt> tag.</p>
|
||||||
|
|
||||||
|
<a name="usage"></a>
|
||||||
|
<h2><a href="#usage">Usage</a></h2>
|
||||||
|
|
||||||
|
To embed scittle in your website, it is recommended to use the links
|
||||||
|
published to
|
||||||
|
the <a href="https://github.com/babashka/scittle/releases/tag/v0.7.27">releases
|
||||||
|
page</a>.
|
||||||
|
|
||||||
|
Include <tt>scittle.js</tt> and write a <tt>script</tt> tag
|
||||||
|
where <tt>type</tt> is set
|
||||||
|
to <tt>application/x-scittle</tt>.
|
||||||
|
|
||||||
|
<pre><code data-type="scittle" data-src="html/export.html" class="html"></code></pre>
|
||||||
|
<button onclick="my_alert()">
|
||||||
|
Click me!
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<a name="src"></a>
|
||||||
|
<h2><a href="#src">Source from file</a></h2>
|
||||||
|
|
||||||
|
When you have a file on your server, say <tt>cljs/script.cljs</tt>, you can load it using the <tt>src</tt> attribute:
|
||||||
|
|
||||||
|
<pre><code id="scittle-tag-example" class="html">
|
||||||
|
<script src="cljs/script.cljs" type="application/x-scittle"></script>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<script type="text/javascript">hljs.highlightElement(document.getElementById("scittle-tag-example"));</script>
|
||||||
|
|
||||||
|
<a name="reagent"></a>
|
||||||
|
<h2><a href="#reagent">Reagent plugin</a></h2>
|
||||||
|
|
||||||
|
To enable <a href="https://github.com/reagent-project/reagent">reagent</a>,
|
||||||
|
in addition to <tt>scittle.js</tt>, you need to include React
|
||||||
|
and <tt>scittle.reagent.js</tt>:
|
||||||
|
|
||||||
|
<pre><code data-type="scittle" data-src="html/reagent.html" class="html"></code></pre>
|
||||||
|
|
||||||
|
<div id="app"></div>
|
||||||
|
|
||||||
|
|
||||||
|
<a name="re-frame"></a>
|
||||||
|
<h2><a href="#re-frame">Re-frame plugin</a></h2>
|
||||||
|
|
||||||
|
To enable <a href="https://github.com/day8/re-frame">re-frame</a>,
|
||||||
|
in addition to the files needed for reagent, you need to include <tt>scittle.re-frame.js</tt>.
|
||||||
|
Also see the <a href="codemirror.html">codemirror</a> playground.
|
||||||
|
|
||||||
|
<a name="cljs-ajax"></a>
|
||||||
|
<h2><a href="#cljs-ajax">Cljs-ajax plugin</a></h2>
|
||||||
|
|
||||||
|
To enable <a href="https://github.com/JulianBirch/cljs-ajax">cljs-ajax</a>,
|
||||||
|
in addition to <tt>scittle.js</tt>, you need to include <tt>scittle.cljs-ajax.js</tt>:
|
||||||
|
|
||||||
|
<pre><code data-type="scittle" data-src="html/cljs-ajax.html" class="html"></code></pre>
|
||||||
|
|
||||||
|
<button onclick="make_request()">
|
||||||
|
Click me!
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<a name="pprint"></a>
|
||||||
|
<h2><a href="#pprint">cljs.pprint plugin</a></h2> To
|
||||||
|
enable <a href="https://cljs.github.io/api/cljs.pprint/">cljs.pprint</a>, in
|
||||||
|
addition to <tt>scittle.js</tt>, you need to
|
||||||
|
include <tt>scittle.pprint.js</tt>.
|
||||||
|
|
||||||
|
<a name="reader-conditional"></a>
|
||||||
|
<h2><a href="#reader-conditional">Target :scittle in cljc</a></h2>
|
||||||
|
You can target scittle in .cljc files (use a script tag to include the cljc file) with the <code>:scittle</code> reader conditional like this:<br>
|
||||||
|
|
||||||
|
<pre><code class="clojure">
|
||||||
|
#?(:scittle
|
||||||
|
(js/console.log "In scittle")
|
||||||
|
:org.babashka/nbb
|
||||||
|
(js/console.log "In nbb")
|
||||||
|
:cljs
|
||||||
|
(js/console.log "In cljs"))
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<a name="JS libraries"></a>
|
||||||
|
<h2><a href="#js-libraries">JS libraries</a></h2>
|
||||||
|
|
||||||
|
To use JavaScript libraries with Scittle,
|
||||||
|
see <a href="https://github.com/babashka/scittle/blob/main/doc/js-libraries.md">README.md</a>
|
||||||
|
|
||||||
|
<a name="repl"></a>
|
||||||
|
<h2><a href="#nrepl">REPL</a></h2>
|
||||||
|
|
||||||
|
To connect to a REPL with Scittle,
|
||||||
|
see <a href="https://github.com/babashka/scittle/blob/main/README.md#repl">README.md</a>
|
||||||
|
|
||||||
|
<a name="examples"></a>
|
||||||
|
<h2><a href="#examples">Examples</a></h2>
|
||||||
|
<ul>
|
||||||
|
<li>Scittle on <a href="https://codepen.io/Prestance/pen/PoOdZQw">CodePen</a></li>
|
||||||
|
<li><a href="tictactoe.html">Tic-tac-toe</a></li>
|
||||||
|
<li><a href="bookmarklet.html">Bookmarklet</a></li>
|
||||||
|
<li><a href="wordle.html">Wordle</a></li>
|
||||||
|
<li>
|
||||||
|
<a href="https://github.com/kloimhardt/babashka-scittle-guestbook">
|
||||||
|
Babashka + scittle implementation of the Luminus guestbook.
|
||||||
|
</a></li>
|
||||||
|
<li><a href="codemirror.html">Codemirror</a></li>
|
||||||
|
<li><a href="replicant_tictactoe.html">Tic-tac-toe with Replicant</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
13
resources/public/index_text.html
Normal file
13
resources/public/index_text.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script src="js/scittle.js" type="application/javascript"></script>
|
||||||
|
<script src="js/scittle.cljs-devtools.js" type="application/javascript"></script>
|
||||||
|
<script type="application/x-scittle">
|
||||||
|
(js/console.log {:a 1})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
</html>
|
14
resources/public/nrepl.html
Normal file
14
resources/public/nrepl.html
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="css/style.css">
|
||||||
|
<script src="js/scittle.js" type="application/javascript"></script>
|
||||||
|
<script>var SCITTLE_NREPL_WEBSOCKET_PORT = 1340;</script>
|
||||||
|
<script src="js/scittle.nrepl.js" type="application/javascript"></script>
|
||||||
|
<script type="application/x-scittle" src="cljs/nrepl_playground.cljs"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Scittle</h1>
|
||||||
|
<h2>What is this?</h2>
|
||||||
|
</body>
|
||||||
|
</html>
|
46
resources/public/replicant_tictactoe.html
Normal file
46
resources/public/replicant_tictactoe.html
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="css/style.css">
|
||||||
|
<script src="js/scittle.js" type="application/javascript"></script>
|
||||||
|
<script src="js/scittle.replicant.js" type="application/javascript"></script>
|
||||||
|
|
||||||
|
<script type="application/x-scittle" src="cljs/replicant_tictactoe/ui.cljs"></script>
|
||||||
|
<script type="application/x-scittle" src="cljs/replicant_tictactoe/game.cljs"></script>
|
||||||
|
<script type="application/x-scittle" src="cljs/replicant_tictactoe/core.cljs"></script>
|
||||||
|
<link rel="stylesheet" href="cljs/replicant-tictactoe/style.css">
|
||||||
|
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js" type="text/javascript"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/languages/clojure.min.js" type="text/javascript"></script>
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/zenburn.min.css" integrity="sha512-JPxjD2t82edI35nXydY/erE9jVPpqxEJ++6nYEoZEpX2TRsmp2FpZuQqZa+wBCen5U16QZOkMadGXHCfp+tUdg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Scittle tic-tac-toe built with Replicant</h1>
|
||||||
|
<h2>What is Scittle?</h2>
|
||||||
|
<p>Read <a href="index.html">the main page</a> for more details.</p>
|
||||||
|
<h2>The game</h2>
|
||||||
|
<div id="app"></div>
|
||||||
|
<p>The following source was loaded and interpreted
|
||||||
|
from <a href="cljs/replicant_tictactoe/core.cljs"><tt>cljs/replicant_tictactoe/core.cljs</tt></a> using the
|
||||||
|
script tag:
|
||||||
|
<pre><code class="html">
|
||||||
|
<script type="application/x-scittle" src="cljs/replicant_tictactoe/ui.cljs"></script>
|
||||||
|
<script type="application/x-scittle" src="cljs/replicant_tictactoe/game.cljs"></script>
|
||||||
|
<script type="application/x-scittle" src="cljs/replicant_tictactoe/core.cljs"></script>
|
||||||
|
|
||||||
|
</code></pre>
|
||||||
|
</p>
|
||||||
|
<pre><code class="language-clojure" id="cljs"></code></pre>
|
||||||
|
<script type="application/x-scittle">
|
||||||
|
(defn set-text [progress-event]
|
||||||
|
(let [elt (.getElementById js/document "cljs")]
|
||||||
|
(set! (.-innerHTML elt) (.. progress-event -srcElement -responseText))
|
||||||
|
(.highlightAll js/hljs)))
|
||||||
|
(def oreq (js/XMLHttpRequest.))
|
||||||
|
(.addEventListener oreq "load" set-text)
|
||||||
|
(.open oreq "GET" "cljs/replicant_tictactoe/core.cljs")
|
||||||
|
(.send oreq)
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
56
resources/public/test/codemirror.html
Normal file
56
resources/public/test/codemirror.html
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<!-- This HTML file is for local debugging -->
|
||||||
|
<script async src="https://ga.jspm.io/npm:es-module-shims@1.6.1/dist/es-module-shims.js"></script>
|
||||||
|
<script src="/js/scittle.js"></script>
|
||||||
|
<script>scittle.core.disable_auto_eval();</script>
|
||||||
|
<script crossorigin src="https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js"></script>
|
||||||
|
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js"></script>
|
||||||
|
<script src="/js/scittle.reagent.js"> </script>
|
||||||
|
<script src="/js/scittle.re-frame.js"> </script>
|
||||||
|
<script src="/js/scittle.pprint.js"> </script>
|
||||||
|
<script type="importmap">
|
||||||
|
{
|
||||||
|
"imports": {
|
||||||
|
"codemirror": "https://cdn.jsdelivr.net/npm/codemirror/dist/index.js",
|
||||||
|
"@codemirror/commands": "https://cdn.jsdelivr.net/npm/@codemirror/commands/dist/index.js",
|
||||||
|
"@codemirror/search": "https://cdn.jsdelivr.net/npm/@codemirror/search/dist/index.js",
|
||||||
|
"@codemirror/autocomplete": "https://cdn.jsdelivr.net/npm/@codemirror/autocomplete/dist/index.js",
|
||||||
|
"@codemirror/lint": "https://cdn.jsdelivr.net/npm/@codemirror/lint/dist/index.js",
|
||||||
|
"crelt": "https://cdn.jsdelivr.net/npm/crelt/index.es.js",
|
||||||
|
"@nextjournal/lang-clojure": "https://cdn.jsdelivr.net/npm/@nextjournal/lang-clojure/dist/index.js",
|
||||||
|
"@nextjournal/lezer-clojure": "https://cdn.jsdelivr.net/npm/@nextjournal/lezer-clojure/dist/index.es.js",
|
||||||
|
"@lezer/highlight": "https://cdn.jsdelivr.net/npm/@lezer/highlight/dist/index.js",
|
||||||
|
"@lezer/lr": "https://cdn.jsdelivr.net/npm/@lezer/lr/dist/index.js",
|
||||||
|
"@lezer/common": "https://cdn.jsdelivr.net/npm/@lezer/common/dist/index.js",
|
||||||
|
"@codemirror/language": "https://cdn.jsdelivr.net/npm/@codemirror/language/dist/index.js",
|
||||||
|
"@codemirror/state": "https://cdn.jsdelivr.net/npm/@codemirror/state/dist/index.js",
|
||||||
|
"@codemirror/view": "https://cdn.jsdelivr.net/npm/@codemirror/view/dist/index.js",
|
||||||
|
"style-mod": "https://cdn.jsdelivr.net/npm/style-mod/src/style-mod.js",
|
||||||
|
"w3c-keyname": "https://cdn.jsdelivr.net/npm/w3c-keyname/index.es.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<script type="module" type="application/javascript">
|
||||||
|
import * as cm from 'codemirror';
|
||||||
|
import * as lc from '@nextjournal/lang-clojure'
|
||||||
|
import * as cv from '@codemirror/view';
|
||||||
|
import * as cs from '@codemirror/state';
|
||||||
|
globalThis.cm = cm;
|
||||||
|
globalThis.lc = lc;
|
||||||
|
globalThis.cv = cv;
|
||||||
|
globalThis.cs = cs;
|
||||||
|
scittle.core.eval_script_tags();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="application/x-scittle" src="/cljs/codemirror.cljs"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Using <a href="https://www.npmjs.com/package/@nextjournal/lang-clojure">@nextjournal/lang-clojure</a> directly from npm in HTML!</h1>
|
||||||
|
<div id="app">
|
||||||
|
</div>
|
||||||
|
<div id="reagent">
|
||||||
|
</div>
|
||||||
|
<button id="evalMe" onClick="eval_me()">Eval</button>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -3,9 +3,8 @@
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="css/style.css">
|
<link rel="stylesheet" href="css/style.css">
|
||||||
<script src="js/scittle.js" type="application/javascript"></script>
|
<script src="js/scittle.js" type="application/javascript"></script>
|
||||||
|
<script crossorigin src="https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js"></script>
|
||||||
<script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script>
|
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js"></script>
|
||||||
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>
|
|
||||||
<script src="js/scittle.reagent.js" type="application/javascript"></script>
|
<script src="js/scittle.reagent.js" type="application/javascript"></script>
|
||||||
|
|
||||||
<script type="application/x-scittle" src="cljs/tictactoe.cljs"></script>
|
<script type="application/x-scittle" src="cljs/tictactoe.cljs"></script>
|
39
resources/public/wordle.html
Normal file
39
resources/public/wordle.html
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Wordle!</title>
|
||||||
|
<meta content="width=device-width, initial-scale=1" name="viewport">
|
||||||
|
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
|
||||||
|
<meta content="utf-8" http-equiv="encoding">
|
||||||
|
<script src="js/scittle.js" type="application/javascript"></script>
|
||||||
|
<script type="application/x-scittle" src="https://raw.githubusercontent.com/oxalorg/wordle-clojurescript/main/src/wordle/core2.cljs"></script>
|
||||||
|
<style type="text/css">
|
||||||
|
#app {
|
||||||
|
background-color: #121212;
|
||||||
|
}
|
||||||
|
#app .board {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(5, 60px);
|
||||||
|
}
|
||||||
|
#app .cell {
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
margin: 10px;
|
||||||
|
border: 2px solid gray;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p class="board">Wordle by <a href="https://github.com/oxalorg/wordle-clojurescript">@oxalorg</a>.
|
||||||
|
Play the game by typing letters and then hit return. The source code is loaded from <a href="https://raw.githubusercontent.com/oxalorg/wordle-clojurescript/main/src/wordle/core2.cljs">here</a>.
|
||||||
|
</p>
|
||||||
|
<div id="app"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
17
script/changelog.clj
Executable file
17
script/changelog.clj
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env bb
|
||||||
|
|
||||||
|
(ns changelog
|
||||||
|
(:require [clojure.string :as str]))
|
||||||
|
|
||||||
|
(let [changelog (slurp "CHANGELOG.md")
|
||||||
|
replaced (str/replace changelog
|
||||||
|
#" #(\d+)"
|
||||||
|
(fn [[_ issue after]]
|
||||||
|
(format " [#%s](https://github.com/babashka/scittle/issues/%s)%s"
|
||||||
|
issue issue (str after))))
|
||||||
|
replaced (str/replace replaced
|
||||||
|
#"@([a-zA-Z0-9-_]+)([, \.)])"
|
||||||
|
(fn [[_ name after]]
|
||||||
|
(format "[@%s](https://github.com/%s)%s"
|
||||||
|
name name after)))]
|
||||||
|
(spit "CHANGELOG.md" replaced))
|
83
script/release.clj
Executable file
83
script/release.clj
Executable file
|
@ -0,0 +1,83 @@
|
||||||
|
#!/usr/bin/env bb
|
||||||
|
|
||||||
|
(require '[babashka.fs :as fs]
|
||||||
|
'[babashka.tasks :refer [shell]])
|
||||||
|
|
||||||
|
(fs/create-dirs "gh-pages")
|
||||||
|
|
||||||
|
(fs/copy "resources/public/index.html" "gh-pages"
|
||||||
|
{:replace-existing true})
|
||||||
|
|
||||||
|
(fs/copy "resources/public/base.html" "gh-pages"
|
||||||
|
{:replace-existing true})
|
||||||
|
|
||||||
|
(fs/copy "resources/public/tictactoe.html" "gh-pages"
|
||||||
|
{:replace-existing true})
|
||||||
|
|
||||||
|
(fs/copy "resources/public/bookmarklet.html" "gh-pages"
|
||||||
|
{:replace-existing true})
|
||||||
|
|
||||||
|
(fs/copy "resources/public/wordle.html" "gh-pages"
|
||||||
|
{:replace-existing true})
|
||||||
|
|
||||||
|
(fs/copy "resources/public/disable_auto_eval.html" "gh-pages"
|
||||||
|
{:replace-existing true})
|
||||||
|
|
||||||
|
(fs/copy "resources/public/codemirror.html" "gh-pages"
|
||||||
|
{:replace-existing true})
|
||||||
|
|
||||||
|
(fs/copy "resources/public/replicant_tictactoe.html" "gh-pages"
|
||||||
|
{:replace-existing true})
|
||||||
|
|
||||||
|
(def html-source-dir (fs/file "resources" "public" "html"))
|
||||||
|
(def html-target-dir (fs/file "gh-pages" "html"))
|
||||||
|
(fs/create-dirs html-target-dir)
|
||||||
|
(doseq [html ["export.html" "reagent.html" "cljs-ajax.html"]]
|
||||||
|
(fs/copy (fs/file html-source-dir html) html-target-dir
|
||||||
|
{:replace-existing true}))
|
||||||
|
|
||||||
|
(def style-source-dir (fs/file "resources" "public" "css"))
|
||||||
|
(def style-target-dir (fs/file "gh-pages" "css"))
|
||||||
|
(fs/create-dirs style-target-dir)
|
||||||
|
(fs/copy "resources/public/css/style.css" style-target-dir
|
||||||
|
{:replace-existing true})
|
||||||
|
|
||||||
|
(def js-source-dir (fs/file "resources" "public" "js"))
|
||||||
|
(def js-target-dir (fs/file "gh-pages" "js"))
|
||||||
|
(fs/create-dirs js-target-dir)
|
||||||
|
|
||||||
|
(println "Compiling CLJS")
|
||||||
|
(shell "bb prod")
|
||||||
|
|
||||||
|
(fs/copy "resources/public/js/report.html" "gh-pages"
|
||||||
|
{:replace-existing true})
|
||||||
|
|
||||||
|
(def index-file (fs/file "gh-pages" "index.html"))
|
||||||
|
|
||||||
|
(def cljs-source-dir (fs/file "resources" "public" "cljs"))
|
||||||
|
(def cljs-target-dir (fs/file "gh-pages" "cljs"))
|
||||||
|
(fs/create-dirs cljs-target-dir)
|
||||||
|
|
||||||
|
(run! (fn [f]
|
||||||
|
(println "Copying" (str f))
|
||||||
|
(fs/copy f
|
||||||
|
cljs-target-dir
|
||||||
|
{:replace-existing true}))
|
||||||
|
(fs/glob cljs-source-dir "*.cljs"))
|
||||||
|
|
||||||
|
(println "Copying dir resources/public/cljs/replicant_tictactoe")
|
||||||
|
(fs/copy-tree (fs/file cljs-source-dir "replicant_tictactoe") (fs/file cljs-target-dir "replicant_tictactoe") {:replace-existing true})
|
||||||
|
|
||||||
|
(run! (fn [f]
|
||||||
|
(println "Copying" (str f))
|
||||||
|
(fs/copy f
|
||||||
|
js-target-dir
|
||||||
|
{:replace-existing true}))
|
||||||
|
(fs/glob js-source-dir "scittle*.js"))
|
||||||
|
|
||||||
|
(def with-gh-pages (partial shell {:dir "gh-pages"}))
|
||||||
|
(with-gh-pages "git add .")
|
||||||
|
(with-gh-pages "git commit -m 'update build'")
|
||||||
|
(with-gh-pages "git push origin gh-pages")
|
||||||
|
|
||||||
|
nil
|
15
script/release.old
Normal file
15
script/release.old
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
clojure -M:dev -m shadow.cljs.devtools.cli release main
|
||||||
|
cp resources/public/index.html gh-pages
|
||||||
|
sed -i 's/main.js/sci_script_tag.js/' gh-pages/index.html
|
||||||
|
|
||||||
|
mkdir -p gh-pages/js
|
||||||
|
cp resources/public/js/main.js gh-pages/js/sci_script_tag.js
|
||||||
|
|
||||||
|
cd gh-pages
|
||||||
|
git add .
|
||||||
|
git commit -m "update build"
|
||||||
|
git push origin gh-pages
|
40
shadow-cljs.edn
Normal file
40
shadow-cljs.edn
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{:deps
|
||||||
|
{:aliases [:dev]}
|
||||||
|
|
||||||
|
:dev-http
|
||||||
|
{8000 "classpath:public"}
|
||||||
|
|
||||||
|
:builds
|
||||||
|
{:main
|
||||||
|
{;; for dev build
|
||||||
|
#_#_:compiler-options {:optimizations :simple
|
||||||
|
:pretty-print true
|
||||||
|
:pseudo-names true}
|
||||||
|
:target :browser
|
||||||
|
:js-options
|
||||||
|
{:resolve {"react" {:target :global
|
||||||
|
:global "React"}
|
||||||
|
"react-dom" {:target :global
|
||||||
|
:global "ReactDOM"}}}
|
||||||
|
:modules
|
||||||
|
{:scittle {:entries [scittle.core]}
|
||||||
|
:scittle.nrepl {:entries [scittle.nrepl]
|
||||||
|
:depends-on #{:scittle}}
|
||||||
|
:scittle.promesa {:entries [scittle.promesa]
|
||||||
|
:depends-on #{:scittle}}
|
||||||
|
:scittle.js-interop {:entries [scittle.js-interop]
|
||||||
|
:depends-on #{:scittle}}
|
||||||
|
:scittle.pprint {:entries [scittle.pprint]
|
||||||
|
:depends-on #{:scittle}}
|
||||||
|
:scittle.reagent {:entries [scittle.reagent]
|
||||||
|
:depends-on #{:scittle}}
|
||||||
|
:scittle.replicant {:entries [scittle.replicant]
|
||||||
|
:depends-on #{:scittle}}
|
||||||
|
:scittle.re-frame {:entries [scittle.re-frame]
|
||||||
|
:depends-on #{:scittle.reagent
|
||||||
|
:scittle}}
|
||||||
|
:scittle.cljs-ajax {:entries [scittle.cljs-ajax]
|
||||||
|
:depends-on #{:scittle}}}
|
||||||
|
:build-hooks [(shadow.cljs.build-report/hook)]
|
||||||
|
:output-dir "resources/public/js" ;; + "/dev" for dev build
|
||||||
|
:devtools {:repl-pprint true}}}}
|
13
src/scittle/cljs_ajax.cljs
Normal file
13
src/scittle/cljs_ajax.cljs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
(ns scittle.cljs-ajax
|
||||||
|
(:require [ajax.core]
|
||||||
|
[sci.core :as sci]
|
||||||
|
[scittle.core :as scittle]))
|
||||||
|
|
||||||
|
(def ans (sci/create-ns 'ajax.core nil))
|
||||||
|
|
||||||
|
(def ajax-namespace
|
||||||
|
(sci/copy-ns ajax.core ans))
|
||||||
|
|
||||||
|
(scittle/register-plugin!
|
||||||
|
::ajax
|
||||||
|
{:namespaces {'ajax.core ajax-namespace}})
|
6
src/scittle/cljs_devtools.cljs
Normal file
6
src/scittle/cljs_devtools.cljs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
(ns scittle.cljs-devtools
|
||||||
|
(:require [devtools.core :as devtools]))
|
||||||
|
|
||||||
|
(devtools/set-pref! :disable-advanced-mode-check true)
|
||||||
|
|
||||||
|
(devtools/install!)
|
143
src/scittle/core.cljs
Normal file
143
src/scittle/core.cljs
Normal file
|
@ -0,0 +1,143 @@
|
||||||
|
(ns scittle.core
|
||||||
|
(:refer-clojure :exclude [time])
|
||||||
|
(:require [cljs.reader :refer [read-string]]
|
||||||
|
[goog.object :as gobject]
|
||||||
|
[goog.string :as gstring]
|
||||||
|
[goog.string.format]
|
||||||
|
[sci.core :as sci]
|
||||||
|
[sci.ctx-store :as store]
|
||||||
|
[sci.impl.unrestrict]
|
||||||
|
[scittle.impl.common :refer [cljns]]
|
||||||
|
[scittle.impl.error :as error]
|
||||||
|
[clojure.string :as str]))
|
||||||
|
|
||||||
|
(set! sci.impl.unrestrict/*unrestricted* true)
|
||||||
|
|
||||||
|
;; make document conditional
|
||||||
|
(def ^js doc js/globalThis.document)
|
||||||
|
|
||||||
|
(clojure.core/defmacro time
|
||||||
|
"Evaluates expr and prints the time it took. Returns the value of expr."
|
||||||
|
[expr]
|
||||||
|
`(let [start# (cljs.core/system-time)
|
||||||
|
ret# ~expr]
|
||||||
|
(prn (cljs.core/str "Elapsed time: "
|
||||||
|
(.toFixed (- (system-time) start#) 6)
|
||||||
|
" msecs"))
|
||||||
|
ret#))
|
||||||
|
|
||||||
|
(def stns (sci/create-ns 'sci.script-tag nil))
|
||||||
|
(def rns (sci/create-ns 'cljs.reader nil))
|
||||||
|
|
||||||
|
(def namespaces
|
||||||
|
{'clojure.core
|
||||||
|
{'time (sci/copy-var time cljns)
|
||||||
|
'system-time (sci/copy-var system-time cljns)
|
||||||
|
'random-uuid (sci/copy-var random-uuid cljns)
|
||||||
|
'read-string (sci/copy-var read-string cljns)
|
||||||
|
'update-keys (sci/copy-var update-keys cljns)
|
||||||
|
'update-vals (sci/copy-var update-vals cljns)
|
||||||
|
'parse-boolean (sci/copy-var parse-boolean cljns)
|
||||||
|
'parse-double (sci/copy-var parse-double cljns)
|
||||||
|
'parse-long (sci/copy-var parse-long cljns)
|
||||||
|
'parse-uuid (sci/copy-var parse-uuid cljns)
|
||||||
|
'NaN? (sci/copy-var NaN? cljns)
|
||||||
|
'infinite? (sci/copy-var infinite? cljns)
|
||||||
|
'iteration (sci/copy-var iteration cljns)
|
||||||
|
'abs (sci/copy-var abs cljns)}
|
||||||
|
'goog.object {'set gobject/set
|
||||||
|
'get gobject/get}
|
||||||
|
'goog.string {'format gstring/format
|
||||||
|
'htmlEscape gstring/htmlEscape}
|
||||||
|
'goog.string.format {} ;; For cljs compatibility
|
||||||
|
'sci.core {'stacktrace sci/stacktrace
|
||||||
|
'format-stacktrace sci/format-stacktrace}})
|
||||||
|
|
||||||
|
(defn load-fn [{:keys [ctx] :as opts}]
|
||||||
|
(when-let [lib (and (string? (:namespace opts))
|
||||||
|
(gobject/get js/globalThis (:namespace opts)))]
|
||||||
|
(sci/add-js-lib! ctx (:namespace opts) lib)))
|
||||||
|
|
||||||
|
(store/reset-ctx!
|
||||||
|
(sci/init {:namespaces namespaces
|
||||||
|
:classes {'js js/globalThis
|
||||||
|
:allow :all
|
||||||
|
'Math js/Math}
|
||||||
|
:ns-aliases {'clojure.pprint 'cljs.pprint}
|
||||||
|
:features #{:scittle :cljs}
|
||||||
|
:load-fn load-fn}))
|
||||||
|
|
||||||
|
(unchecked-set js/globalThis "import" (js/eval "(x) => import(x)"))
|
||||||
|
|
||||||
|
(def !last-ns (volatile! @sci/ns))
|
||||||
|
|
||||||
|
(defn- -eval-string [s]
|
||||||
|
(sci/binding [sci/ns @!last-ns]
|
||||||
|
(let [rdr (sci/reader s)]
|
||||||
|
(loop [res nil]
|
||||||
|
(let [form (sci/parse-next (store/get-ctx) rdr)]
|
||||||
|
(if (= :sci.core/eof form)
|
||||||
|
(do
|
||||||
|
(vreset! !last-ns @sci/ns)
|
||||||
|
res)
|
||||||
|
(recur (sci/eval-form (store/get-ctx) form))))))))
|
||||||
|
|
||||||
|
(defn ^:export eval-string [s]
|
||||||
|
(try (-eval-string s)
|
||||||
|
(catch :default e
|
||||||
|
(error/error-handler e (:src (store/get-ctx)))
|
||||||
|
(throw e))))
|
||||||
|
|
||||||
|
(defn register-plugin! [_plug-in-name sci-opts]
|
||||||
|
(store/swap-ctx! sci/merge-opts sci-opts))
|
||||||
|
|
||||||
|
(defn- eval-script-tags* [script-tags]
|
||||||
|
(when-let [tag (first script-tags)]
|
||||||
|
(if-let [src (.getAttribute tag "src")]
|
||||||
|
(let [req (js/XMLHttpRequest.)
|
||||||
|
_ (.open req "GET" src true)
|
||||||
|
_ (gobject/set req "onload"
|
||||||
|
(fn [] (this-as this
|
||||||
|
(let [response (gobject/get this "response")]
|
||||||
|
(gobject/set tag "scittle_id" src)
|
||||||
|
;; save source for error messages
|
||||||
|
(store/swap-ctx! assoc-in [:src src] response)
|
||||||
|
(sci/binding [sci/file src]
|
||||||
|
(eval-string response)))
|
||||||
|
(eval-script-tags* (rest script-tags)))))]
|
||||||
|
(.send req))
|
||||||
|
(if-let [text (not-empty (str/trim (gobject/get tag "textContent")))]
|
||||||
|
(let [scittle-id (str (gensym "scittle-tag-"))]
|
||||||
|
(gobject/set tag "scittle_id" scittle-id)
|
||||||
|
(store/swap-ctx! assoc-in [:src scittle-id] text)
|
||||||
|
(sci/binding [sci/file scittle-id]
|
||||||
|
(eval-string text))
|
||||||
|
(eval-script-tags* (rest script-tags)))
|
||||||
|
(eval-script-tags* (rest script-tags))))))
|
||||||
|
|
||||||
|
(defn ^:export eval-script-tags [& [script-tags]]
|
||||||
|
(let [script-tags (or script-tags
|
||||||
|
(.querySelectorAll
|
||||||
|
doc "script[type='application/x-scittle']"))
|
||||||
|
script-tags (if (or (coll? script-tags)
|
||||||
|
(aget script-tags "length"))
|
||||||
|
script-tags
|
||||||
|
[script-tags])]
|
||||||
|
(eval-script-tags* script-tags)))
|
||||||
|
|
||||||
|
(def auto-load-disabled? (volatile! false))
|
||||||
|
|
||||||
|
(defn ^:export disable-auto-eval
|
||||||
|
"By default, scittle evaluates script nodes on the DOMContentLoaded
|
||||||
|
event using the eval-script-tags function. This function disables
|
||||||
|
that behavior."
|
||||||
|
[]
|
||||||
|
(vreset! auto-load-disabled? true))
|
||||||
|
|
||||||
|
(when doc
|
||||||
|
(.addEventListener doc
|
||||||
|
"DOMContentLoaded"
|
||||||
|
(fn [] (when-not @auto-load-disabled? (eval-script-tags))), false))
|
||||||
|
|
||||||
|
(enable-console-print!)
|
||||||
|
(sci/alter-var-root sci/print-fn (constantly *print-fn*))
|
4
src/scittle/impl/common.cljs
Normal file
4
src/scittle/impl/common.cljs
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
(ns scittle.impl.common
|
||||||
|
(:require [sci.core :as sci]))
|
||||||
|
|
||||||
|
(def cljns (sci/create-ns 'clojure.core nil))
|
92
src/scittle/impl/error.cljs
Normal file
92
src/scittle/impl/error.cljs
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
(ns scittle.impl.error
|
||||||
|
(:refer-clojure :exclude [println])
|
||||||
|
(:require [clojure.string :as str]
|
||||||
|
[sci.core :as sci]))
|
||||||
|
|
||||||
|
(defn println [& strs]
|
||||||
|
(.error js/console (str/join " " strs)))
|
||||||
|
|
||||||
|
(defn ruler [title]
|
||||||
|
(println (apply str "----- " title " " (repeat (- 50 7 (count title)) \-))))
|
||||||
|
|
||||||
|
(defn split-stacktrace [stacktrace verbose?]
|
||||||
|
(if verbose? [stacktrace]
|
||||||
|
(let [stack-count (count stacktrace)]
|
||||||
|
(if (<= stack-count 10)
|
||||||
|
[stacktrace]
|
||||||
|
[(take 5 stacktrace)
|
||||||
|
(drop (- stack-count 5) stacktrace)]))))
|
||||||
|
|
||||||
|
(defn print-stacktrace
|
||||||
|
[stacktrace {:keys [:verbose?]}]
|
||||||
|
(let [stacktrace (sci/format-stacktrace stacktrace)
|
||||||
|
segments (split-stacktrace stacktrace verbose?)
|
||||||
|
[fst snd] segments]
|
||||||
|
(run! #(print % "\n") fst)
|
||||||
|
(when snd
|
||||||
|
(print "...\n")
|
||||||
|
(run! #(print % "\n") snd))))
|
||||||
|
|
||||||
|
(defn error-context [ex src-map]
|
||||||
|
(let [{:keys [:file :line :column]} (ex-data ex)]
|
||||||
|
(when (and file line)
|
||||||
|
(when-let [content (get src-map file)]
|
||||||
|
(let [matching-line (dec line)
|
||||||
|
start-line (max (- matching-line 4) 0)
|
||||||
|
end-line (+ matching-line 6)
|
||||||
|
[before after] (->>
|
||||||
|
(str/split-lines content)
|
||||||
|
(map-indexed list)
|
||||||
|
(drop start-line)
|
||||||
|
(take (- end-line start-line))
|
||||||
|
(split-at (inc (- matching-line start-line))))
|
||||||
|
snippet-lines (concat before
|
||||||
|
[[nil (str (str/join "" (repeat (dec column) " "))
|
||||||
|
(str "^--- " (ex-message ex)))]]
|
||||||
|
after)
|
||||||
|
indices (map first snippet-lines)
|
||||||
|
max-size (reduce max 0 (map (comp count str) indices))
|
||||||
|
snippet-lines (map (fn [[idx line]]
|
||||||
|
(if idx
|
||||||
|
(let [line-number (inc idx)]
|
||||||
|
(str (.padStart (str line-number) max-size "0") " " line))
|
||||||
|
(str (str/join (repeat (+ 2 max-size) " ")) line)))
|
||||||
|
snippet-lines)]
|
||||||
|
(str "\n" (str/join "\n" snippet-lines)))))))
|
||||||
|
|
||||||
|
(defn right-pad [s n]
|
||||||
|
(let [n (- n (count s))]
|
||||||
|
(str s (str/join (repeat n " ")))))
|
||||||
|
|
||||||
|
(defn error-handler [e src-map]
|
||||||
|
(let [d (ex-data e)
|
||||||
|
sci-error? (isa? (:type d) :sci/error)
|
||||||
|
stacktrace (sci/stacktrace e)]
|
||||||
|
(ruler "Scittle error")
|
||||||
|
(when-let [name (.-name e)]
|
||||||
|
(when-not (= "Error" name)
|
||||||
|
(println "Type: " name)))
|
||||||
|
(when-let [m (.-message e)]
|
||||||
|
(println (str "Message: " m)))
|
||||||
|
(when-let [d (ex-data (ex-cause e) #_(.getCause e))]
|
||||||
|
(println (str "Data: ")
|
||||||
|
(pr-str d)))
|
||||||
|
(let [{:keys [:file :line :column]} d]
|
||||||
|
(when line
|
||||||
|
(println (str "Location: "
|
||||||
|
(when file (str file ":"))
|
||||||
|
line ":" column""))))
|
||||||
|
(when-let [phase (:phase d)]
|
||||||
|
(println "Phase: " phase))
|
||||||
|
(when-let [ec (when sci-error?
|
||||||
|
(error-context e src-map))]
|
||||||
|
(ruler "Context")
|
||||||
|
(println ec))
|
||||||
|
(when sci-error?
|
||||||
|
(when-let
|
||||||
|
[st (let [st (with-out-str
|
||||||
|
(when stacktrace
|
||||||
|
(print-stacktrace stacktrace src-map)))]
|
||||||
|
(when-not (str/blank? st) st))]
|
||||||
|
(ruler "Stack trace")
|
||||||
|
(println st)))))
|
8
src/scittle/js_interop.cljs
Normal file
8
src/scittle/js_interop.cljs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
(ns scittle.js-interop
|
||||||
|
(:require
|
||||||
|
[sci.configs.applied-science.js-interop :as j]
|
||||||
|
[scittle.core :as scittle]))
|
||||||
|
|
||||||
|
(scittle/register-plugin!
|
||||||
|
::js-interop
|
||||||
|
j/config)
|
19
src/scittle/nrepl.cljs
Normal file
19
src/scittle/nrepl.cljs
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
(ns scittle.nrepl
|
||||||
|
(:require
|
||||||
|
[clojure.edn :as edn]
|
||||||
|
[sci.nrepl.server :as nrepl-server]))
|
||||||
|
|
||||||
|
(defn ws-url [host port path]
|
||||||
|
(str "ws://" host ":" port "/" path))
|
||||||
|
|
||||||
|
(when-let [ws-port (.-SCITTLE_NREPL_WEBSOCKET_PORT js/window)]
|
||||||
|
(set! (.-ws_nrepl js/window)
|
||||||
|
(new js/WebSocket (ws-url (.-hostname (.-location js/window)) ws-port "_nrepl"))))
|
||||||
|
|
||||||
|
(when-let [ws (nrepl-server/nrepl-websocket)]
|
||||||
|
(set! (.-onmessage ws)
|
||||||
|
(fn [event]
|
||||||
|
(nrepl-server/handle-nrepl-message (edn/read-string (.-data event)))))
|
||||||
|
(set! (.-onerror ws)
|
||||||
|
(fn [event]
|
||||||
|
(js/console.log event))))
|
8
src/scittle/pprint.cljs
Normal file
8
src/scittle/pprint.cljs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
(ns scittle.pprint
|
||||||
|
(:require
|
||||||
|
[sci.configs.cljs.pprint :refer [config]]
|
||||||
|
[scittle.core :as scittle]))
|
||||||
|
|
||||||
|
(scittle/register-plugin!
|
||||||
|
::pprint
|
||||||
|
config)
|
8
src/scittle/promesa.cljs
Normal file
8
src/scittle/promesa.cljs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
(ns scittle.promesa
|
||||||
|
(:require
|
||||||
|
[sci.configs.funcool.promesa :as p]
|
||||||
|
[scittle.core :as scittle]))
|
||||||
|
|
||||||
|
(scittle/register-plugin!
|
||||||
|
::promesa
|
||||||
|
p/config)
|
8
src/scittle/re_frame.cljs
Normal file
8
src/scittle/re_frame.cljs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
(ns scittle.re-frame
|
||||||
|
(:require
|
||||||
|
[sci.configs.re-frame.re-frame :as rf]
|
||||||
|
[scittle.core :as scittle]))
|
||||||
|
|
||||||
|
(scittle/register-plugin!
|
||||||
|
::re-frame
|
||||||
|
rf/config)
|
19
src/scittle/reagent.cljs
Normal file
19
src/scittle/reagent.cljs
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
(ns scittle.reagent
|
||||||
|
(:require
|
||||||
|
[reagent.dom :as rdom]
|
||||||
|
[sci.configs.reagent.reagent :refer [reagent-debug-namespace
|
||||||
|
reagent-namespace reagent-ratom-namespace]]
|
||||||
|
[sci.core :as sci]
|
||||||
|
[scittle.core :as scittle]))
|
||||||
|
|
||||||
|
(def rdns (sci/create-ns 'reagent.dom nil))
|
||||||
|
|
||||||
|
(def reagent-dom-namespace
|
||||||
|
{'render (sci/copy-var rdom/render rdns)})
|
||||||
|
|
||||||
|
(scittle/register-plugin!
|
||||||
|
::reagent
|
||||||
|
{:namespaces {'reagent.core reagent-namespace
|
||||||
|
'reagent.dom reagent-dom-namespace
|
||||||
|
'reagent.ratom reagent-ratom-namespace
|
||||||
|
'reagent.debug reagent-debug-namespace}})
|
8
src/scittle/replicant.cljs
Normal file
8
src/scittle/replicant.cljs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
(ns scittle.replicant
|
||||||
|
(:require
|
||||||
|
[sci.configs.cjohansen.replicant :refer [config]]
|
||||||
|
[scittle.core :as scittle]))
|
||||||
|
|
||||||
|
(scittle/register-plugin!
|
||||||
|
::replicant
|
||||||
|
config)
|
Loading…
Reference in a new issue