From 0f91166811fba3b72f5d191bb449390ba867e984 Mon Sep 17 00:00:00 2001 From: Jan Andrle Date: Fri, 22 Nov 2024 11:00:15 +0100 Subject: [PATCH] :zap: Docs --- .github/workflows/static.yml | 17 +- .gitignore | 1 + bs/docs.js | 6 +- {docs_src => docs}/components/code.html.js | 0 docs/{ => components}/code.js.js | 0 {docs_src => docs}/components/example.html.js | 0 .../customElement/customElementWithDDE.js | 0 .../components/examples/customElement/dde.js | 0 .../examples/customElement/intro.js | 0 .../examples/customElement/native-basic.js | 0 .../customElement/observedAttributes.js | 0 .../examples/customElement/shadowRoot.js | 0 .../examples/customElement/simulateSlots.js | 0 .../examples/elements/dekaAppend.js | 0 .../examples/elements/dekaAssign.js | 0 .../examples/elements/dekaBasicComponent.js | 0 .../examples/elements/dekaCreateElement.js | 0 .../components/examples/elements/dekaElNS.js | 0 .../components/examples/elements/intro.js | 0 .../examples/elements/nativeAppend.js | 0 .../examples/elements/nativeCreateElement.js | 0 .../components/examples/events/abortSignal.js | 0 .../components/examples/events/compare.js | 0 .../examples/events/compareDispatch.js | 0 .../components/examples/events/intro.js | 0 .../components/examples/events/live-cycle.js | 0 .../examples/events/templateWithListeners.js | 0 .../components/examples/introducing/3ps.js | 0 .../examples/introducing/helloWorld.js | 0 .../examples/scopes/class-component.js | 0 .../components/examples/scopes/cleaning.js | 0 .../components/examples/scopes/declarative.js | 0 .../examples/scopes/good-practise.js | 0 .../components/examples/scopes/imperative.js | 0 .../components/examples/scopes/intro.js | 0 .../examples/scopes/scopes-and-hosts.js | 0 .../examples/signals/actions-demo.js | 0 .../examples/signals/actions-todos.js | 0 .../examples/signals/computations-abort.js | 0 .../components/examples/signals/dom-attrs.js | 0 .../components/examples/signals/dom-el.js | 0 .../components/examples/signals/intro.js | 0 .../components/examples/signals/signals.js | 0 .../components/mnemonic/customElement-init.js | 0 .../components/mnemonic/elements-init.js | 0 .../components/mnemonic/events-init.js | 0 .../components/mnemonic/scopes-init.js | 0 .../components/mnemonic/signals-init.js | 0 .../components/mnemonicUl.html.js | 0 .../components/pageUtils.html.js | 0 docs/flems.html | 1081 - docs/flems_soubory/commandline.html | 15 - .../commandline_data/cleanslate.css | 449 - .../commandline_data/commandline.css | 299 - .../commandline_data/commandline_frame.js | 14035 ------------- docs/flems_soubory/page-script.js | 16971 ---------------- docs/global.css | 171 - {docs_src => docs}/global.css.js | 0 docs/index.html | 22 - {docs_src => docs}/index.html.js | 0 {docs_src => docs}/jsconfig.json | 0 {docs_src => docs}/layout/head.html.js | 0 {docs_src => docs}/layout/simplePage.html.js | 0 docs/p02-elements.html | 147 - {docs_src => docs}/p02-elements.html.js | 0 docs/p03-events.html | 94 - {docs_src => docs}/p03-events.html.js | 0 docs/p04-observables.html | 150 - docs/p04-signals.html | 150 - {docs_src => docs}/p04-signals.html.js | 0 docs/p05-scopes.html | 183 - {docs_src => docs}/p05-scopes.html.js | 0 docs/p06-customElement.html | 242 - {docs_src => docs}/p06-customElement.html.js | 0 {docs_src => docs}/ssr.js | 4 +- {docs_src => docs}/types.d.ts | 0 {docs_src => docs}/utils/index.js | 0 docs_src/components/code.js.js | 12 - 78 files changed, 17 insertions(+), 34032 deletions(-) rename {docs_src => docs}/components/code.html.js (100%) rename docs/{ => components}/code.js.js (100%) rename {docs_src => docs}/components/example.html.js (100%) rename {docs_src => docs}/components/examples/customElement/customElementWithDDE.js (100%) rename {docs_src => docs}/components/examples/customElement/dde.js (100%) rename {docs_src => docs}/components/examples/customElement/intro.js (100%) rename {docs_src => docs}/components/examples/customElement/native-basic.js (100%) rename {docs_src => docs}/components/examples/customElement/observedAttributes.js (100%) rename {docs_src => docs}/components/examples/customElement/shadowRoot.js (100%) rename {docs_src => docs}/components/examples/customElement/simulateSlots.js (100%) rename {docs_src => docs}/components/examples/elements/dekaAppend.js (100%) rename {docs_src => docs}/components/examples/elements/dekaAssign.js (100%) rename {docs_src => docs}/components/examples/elements/dekaBasicComponent.js (100%) rename {docs_src => docs}/components/examples/elements/dekaCreateElement.js (100%) rename {docs_src => docs}/components/examples/elements/dekaElNS.js (100%) rename {docs_src => docs}/components/examples/elements/intro.js (100%) rename {docs_src => docs}/components/examples/elements/nativeAppend.js (100%) rename {docs_src => docs}/components/examples/elements/nativeCreateElement.js (100%) rename {docs_src => docs}/components/examples/events/abortSignal.js (100%) rename {docs_src => docs}/components/examples/events/compare.js (100%) rename {docs_src => docs}/components/examples/events/compareDispatch.js (100%) rename {docs_src => docs}/components/examples/events/intro.js (100%) rename {docs_src => docs}/components/examples/events/live-cycle.js (100%) rename {docs_src => docs}/components/examples/events/templateWithListeners.js (100%) rename {docs_src => docs}/components/examples/introducing/3ps.js (100%) rename {docs_src => docs}/components/examples/introducing/helloWorld.js (100%) rename {docs_src => docs}/components/examples/scopes/class-component.js (100%) rename {docs_src => docs}/components/examples/scopes/cleaning.js (100%) rename {docs_src => docs}/components/examples/scopes/declarative.js (100%) rename {docs_src => docs}/components/examples/scopes/good-practise.js (100%) rename {docs_src => docs}/components/examples/scopes/imperative.js (100%) rename {docs_src => docs}/components/examples/scopes/intro.js (100%) rename {docs_src => docs}/components/examples/scopes/scopes-and-hosts.js (100%) rename {docs_src => docs}/components/examples/signals/actions-demo.js (100%) rename {docs_src => docs}/components/examples/signals/actions-todos.js (100%) rename {docs_src => docs}/components/examples/signals/computations-abort.js (100%) rename {docs_src => docs}/components/examples/signals/dom-attrs.js (100%) rename {docs_src => docs}/components/examples/signals/dom-el.js (100%) rename {docs_src => docs}/components/examples/signals/intro.js (100%) rename {docs_src => docs}/components/examples/signals/signals.js (100%) rename {docs_src => docs}/components/mnemonic/customElement-init.js (100%) rename {docs_src => docs}/components/mnemonic/elements-init.js (100%) rename {docs_src => docs}/components/mnemonic/events-init.js (100%) rename {docs_src => docs}/components/mnemonic/scopes-init.js (100%) rename {docs_src => docs}/components/mnemonic/signals-init.js (100%) rename {docs_src => docs}/components/mnemonicUl.html.js (100%) rename {docs_src => docs}/components/pageUtils.html.js (100%) delete mode 100644 docs/flems.html delete mode 100644 docs/flems_soubory/commandline.html delete mode 100644 docs/flems_soubory/commandline_data/cleanslate.css delete mode 100644 docs/flems_soubory/commandline_data/commandline.css delete mode 100644 docs/flems_soubory/commandline_data/commandline_frame.js delete mode 100644 docs/flems_soubory/page-script.js delete mode 100644 docs/global.css rename {docs_src => docs}/global.css.js (100%) delete mode 100644 docs/index.html rename {docs_src => docs}/index.html.js (100%) rename {docs_src => docs}/jsconfig.json (100%) rename {docs_src => docs}/layout/head.html.js (100%) rename {docs_src => docs}/layout/simplePage.html.js (100%) delete mode 100644 docs/p02-elements.html rename {docs_src => docs}/p02-elements.html.js (100%) delete mode 100644 docs/p03-events.html rename {docs_src => docs}/p03-events.html.js (100%) delete mode 100644 docs/p04-observables.html delete mode 100644 docs/p04-signals.html rename {docs_src => docs}/p04-signals.html.js (100%) delete mode 100644 docs/p05-scopes.html rename {docs_src => docs}/p05-scopes.html.js (100%) delete mode 100644 docs/p06-customElement.html rename {docs_src => docs}/p06-customElement.html.js (100%) rename {docs_src => docs}/ssr.js (97%) rename {docs_src => docs}/types.d.ts (100%) rename {docs_src => docs}/utils/index.js (100%) delete mode 100644 docs_src/components/code.js.js diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 77d7e80..07eb222 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,5 +1,5 @@ # Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages +name: Deploy Docs on: # Runs on pushes targeting the default branch @@ -30,14 +30,19 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + with: + node-version: 20.16 + - run: npm ci + - run: bs/docs.js - name: Setup Pages - uses: actions/configure-pages@v5 + uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5 - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3 with: # Upload entire repository - path: './docs' + path: './dist/docs' - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4 diff --git a/.gitignore b/.gitignore index b53da94..8fa8188 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +dist/docs/ # Logs logs *.log diff --git a/bs/docs.js b/bs/docs.js index ea67131..ab9a700 100755 --- a/bs/docs.js +++ b/bs/docs.js @@ -2,13 +2,13 @@ /* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */ echo("Building static documentation files…"); echo("Preparing…"); -import { path_target, pages as pages_registered, styles, dispatchEvent, t } from "../docs_src/ssr.js"; +import { path_target, pages as pages_registered, styles, dispatchEvent, t } from "../docs/ssr.js"; import { createHTMl } from "./docs/jsdom.js"; import { register } from "../jsdom.js"; const pkg= s.cat("package.json").xargs(JSON.parse); echo("Collecting list of pages…"); -const pages= s.ls($.xdg.main`../docs_src/*.html.js`).map(addPage); +const pages= s.ls($.xdg.main`../docs/*.html.js`).map(addPage); for(const { id, info } of pages){ echo(`Generating ${id}.html…`); const serverDOM= createHTMl(""); @@ -16,7 +16,7 @@ for(const { id, info } of pages){ "HTMLScriptElement" ); const { el }= await register(serverDOM.dom); - const { page }= await import(`../docs_src/${id}.html.js`); + const { page }= await import(`../docs/${id}.html.js`); serverDOM.document.body.append( el(page, { pkg, info }), ); diff --git a/docs_src/components/code.html.js b/docs/components/code.html.js similarity index 100% rename from docs_src/components/code.html.js rename to docs/components/code.html.js diff --git a/docs/code.js.js b/docs/components/code.js.js similarity index 100% rename from docs/code.js.js rename to docs/components/code.js.js diff --git a/docs_src/components/example.html.js b/docs/components/example.html.js similarity index 100% rename from docs_src/components/example.html.js rename to docs/components/example.html.js diff --git a/docs_src/components/examples/customElement/customElementWithDDE.js b/docs/components/examples/customElement/customElementWithDDE.js similarity index 100% rename from docs_src/components/examples/customElement/customElementWithDDE.js rename to docs/components/examples/customElement/customElementWithDDE.js diff --git a/docs_src/components/examples/customElement/dde.js b/docs/components/examples/customElement/dde.js similarity index 100% rename from docs_src/components/examples/customElement/dde.js rename to docs/components/examples/customElement/dde.js diff --git a/docs_src/components/examples/customElement/intro.js b/docs/components/examples/customElement/intro.js similarity index 100% rename from docs_src/components/examples/customElement/intro.js rename to docs/components/examples/customElement/intro.js diff --git a/docs_src/components/examples/customElement/native-basic.js b/docs/components/examples/customElement/native-basic.js similarity index 100% rename from docs_src/components/examples/customElement/native-basic.js rename to docs/components/examples/customElement/native-basic.js diff --git a/docs_src/components/examples/customElement/observedAttributes.js b/docs/components/examples/customElement/observedAttributes.js similarity index 100% rename from docs_src/components/examples/customElement/observedAttributes.js rename to docs/components/examples/customElement/observedAttributes.js diff --git a/docs_src/components/examples/customElement/shadowRoot.js b/docs/components/examples/customElement/shadowRoot.js similarity index 100% rename from docs_src/components/examples/customElement/shadowRoot.js rename to docs/components/examples/customElement/shadowRoot.js diff --git a/docs_src/components/examples/customElement/simulateSlots.js b/docs/components/examples/customElement/simulateSlots.js similarity index 100% rename from docs_src/components/examples/customElement/simulateSlots.js rename to docs/components/examples/customElement/simulateSlots.js diff --git a/docs_src/components/examples/elements/dekaAppend.js b/docs/components/examples/elements/dekaAppend.js similarity index 100% rename from docs_src/components/examples/elements/dekaAppend.js rename to docs/components/examples/elements/dekaAppend.js diff --git a/docs_src/components/examples/elements/dekaAssign.js b/docs/components/examples/elements/dekaAssign.js similarity index 100% rename from docs_src/components/examples/elements/dekaAssign.js rename to docs/components/examples/elements/dekaAssign.js diff --git a/docs_src/components/examples/elements/dekaBasicComponent.js b/docs/components/examples/elements/dekaBasicComponent.js similarity index 100% rename from docs_src/components/examples/elements/dekaBasicComponent.js rename to docs/components/examples/elements/dekaBasicComponent.js diff --git a/docs_src/components/examples/elements/dekaCreateElement.js b/docs/components/examples/elements/dekaCreateElement.js similarity index 100% rename from docs_src/components/examples/elements/dekaCreateElement.js rename to docs/components/examples/elements/dekaCreateElement.js diff --git a/docs_src/components/examples/elements/dekaElNS.js b/docs/components/examples/elements/dekaElNS.js similarity index 100% rename from docs_src/components/examples/elements/dekaElNS.js rename to docs/components/examples/elements/dekaElNS.js diff --git a/docs_src/components/examples/elements/intro.js b/docs/components/examples/elements/intro.js similarity index 100% rename from docs_src/components/examples/elements/intro.js rename to docs/components/examples/elements/intro.js diff --git a/docs_src/components/examples/elements/nativeAppend.js b/docs/components/examples/elements/nativeAppend.js similarity index 100% rename from docs_src/components/examples/elements/nativeAppend.js rename to docs/components/examples/elements/nativeAppend.js diff --git a/docs_src/components/examples/elements/nativeCreateElement.js b/docs/components/examples/elements/nativeCreateElement.js similarity index 100% rename from docs_src/components/examples/elements/nativeCreateElement.js rename to docs/components/examples/elements/nativeCreateElement.js diff --git a/docs_src/components/examples/events/abortSignal.js b/docs/components/examples/events/abortSignal.js similarity index 100% rename from docs_src/components/examples/events/abortSignal.js rename to docs/components/examples/events/abortSignal.js diff --git a/docs_src/components/examples/events/compare.js b/docs/components/examples/events/compare.js similarity index 100% rename from docs_src/components/examples/events/compare.js rename to docs/components/examples/events/compare.js diff --git a/docs_src/components/examples/events/compareDispatch.js b/docs/components/examples/events/compareDispatch.js similarity index 100% rename from docs_src/components/examples/events/compareDispatch.js rename to docs/components/examples/events/compareDispatch.js diff --git a/docs_src/components/examples/events/intro.js b/docs/components/examples/events/intro.js similarity index 100% rename from docs_src/components/examples/events/intro.js rename to docs/components/examples/events/intro.js diff --git a/docs_src/components/examples/events/live-cycle.js b/docs/components/examples/events/live-cycle.js similarity index 100% rename from docs_src/components/examples/events/live-cycle.js rename to docs/components/examples/events/live-cycle.js diff --git a/docs_src/components/examples/events/templateWithListeners.js b/docs/components/examples/events/templateWithListeners.js similarity index 100% rename from docs_src/components/examples/events/templateWithListeners.js rename to docs/components/examples/events/templateWithListeners.js diff --git a/docs_src/components/examples/introducing/3ps.js b/docs/components/examples/introducing/3ps.js similarity index 100% rename from docs_src/components/examples/introducing/3ps.js rename to docs/components/examples/introducing/3ps.js diff --git a/docs_src/components/examples/introducing/helloWorld.js b/docs/components/examples/introducing/helloWorld.js similarity index 100% rename from docs_src/components/examples/introducing/helloWorld.js rename to docs/components/examples/introducing/helloWorld.js diff --git a/docs_src/components/examples/scopes/class-component.js b/docs/components/examples/scopes/class-component.js similarity index 100% rename from docs_src/components/examples/scopes/class-component.js rename to docs/components/examples/scopes/class-component.js diff --git a/docs_src/components/examples/scopes/cleaning.js b/docs/components/examples/scopes/cleaning.js similarity index 100% rename from docs_src/components/examples/scopes/cleaning.js rename to docs/components/examples/scopes/cleaning.js diff --git a/docs_src/components/examples/scopes/declarative.js b/docs/components/examples/scopes/declarative.js similarity index 100% rename from docs_src/components/examples/scopes/declarative.js rename to docs/components/examples/scopes/declarative.js diff --git a/docs_src/components/examples/scopes/good-practise.js b/docs/components/examples/scopes/good-practise.js similarity index 100% rename from docs_src/components/examples/scopes/good-practise.js rename to docs/components/examples/scopes/good-practise.js diff --git a/docs_src/components/examples/scopes/imperative.js b/docs/components/examples/scopes/imperative.js similarity index 100% rename from docs_src/components/examples/scopes/imperative.js rename to docs/components/examples/scopes/imperative.js diff --git a/docs_src/components/examples/scopes/intro.js b/docs/components/examples/scopes/intro.js similarity index 100% rename from docs_src/components/examples/scopes/intro.js rename to docs/components/examples/scopes/intro.js diff --git a/docs_src/components/examples/scopes/scopes-and-hosts.js b/docs/components/examples/scopes/scopes-and-hosts.js similarity index 100% rename from docs_src/components/examples/scopes/scopes-and-hosts.js rename to docs/components/examples/scopes/scopes-and-hosts.js diff --git a/docs_src/components/examples/signals/actions-demo.js b/docs/components/examples/signals/actions-demo.js similarity index 100% rename from docs_src/components/examples/signals/actions-demo.js rename to docs/components/examples/signals/actions-demo.js diff --git a/docs_src/components/examples/signals/actions-todos.js b/docs/components/examples/signals/actions-todos.js similarity index 100% rename from docs_src/components/examples/signals/actions-todos.js rename to docs/components/examples/signals/actions-todos.js diff --git a/docs_src/components/examples/signals/computations-abort.js b/docs/components/examples/signals/computations-abort.js similarity index 100% rename from docs_src/components/examples/signals/computations-abort.js rename to docs/components/examples/signals/computations-abort.js diff --git a/docs_src/components/examples/signals/dom-attrs.js b/docs/components/examples/signals/dom-attrs.js similarity index 100% rename from docs_src/components/examples/signals/dom-attrs.js rename to docs/components/examples/signals/dom-attrs.js diff --git a/docs_src/components/examples/signals/dom-el.js b/docs/components/examples/signals/dom-el.js similarity index 100% rename from docs_src/components/examples/signals/dom-el.js rename to docs/components/examples/signals/dom-el.js diff --git a/docs_src/components/examples/signals/intro.js b/docs/components/examples/signals/intro.js similarity index 100% rename from docs_src/components/examples/signals/intro.js rename to docs/components/examples/signals/intro.js diff --git a/docs_src/components/examples/signals/signals.js b/docs/components/examples/signals/signals.js similarity index 100% rename from docs_src/components/examples/signals/signals.js rename to docs/components/examples/signals/signals.js diff --git a/docs_src/components/mnemonic/customElement-init.js b/docs/components/mnemonic/customElement-init.js similarity index 100% rename from docs_src/components/mnemonic/customElement-init.js rename to docs/components/mnemonic/customElement-init.js diff --git a/docs_src/components/mnemonic/elements-init.js b/docs/components/mnemonic/elements-init.js similarity index 100% rename from docs_src/components/mnemonic/elements-init.js rename to docs/components/mnemonic/elements-init.js diff --git a/docs_src/components/mnemonic/events-init.js b/docs/components/mnemonic/events-init.js similarity index 100% rename from docs_src/components/mnemonic/events-init.js rename to docs/components/mnemonic/events-init.js diff --git a/docs_src/components/mnemonic/scopes-init.js b/docs/components/mnemonic/scopes-init.js similarity index 100% rename from docs_src/components/mnemonic/scopes-init.js rename to docs/components/mnemonic/scopes-init.js diff --git a/docs_src/components/mnemonic/signals-init.js b/docs/components/mnemonic/signals-init.js similarity index 100% rename from docs_src/components/mnemonic/signals-init.js rename to docs/components/mnemonic/signals-init.js diff --git a/docs_src/components/mnemonicUl.html.js b/docs/components/mnemonicUl.html.js similarity index 100% rename from docs_src/components/mnemonicUl.html.js rename to docs/components/mnemonicUl.html.js diff --git a/docs_src/components/pageUtils.html.js b/docs/components/pageUtils.html.js similarity index 100% rename from docs_src/components/pageUtils.html.js rename to docs/components/pageUtils.html.js diff --git a/docs/flems.html b/docs/flems.html deleted file mode 100644 index 5711ac8..0000000 --- a/docs/flems.html +++ /dev/null @@ -1,1081 +0,0 @@ - -/* - - - - -")):D.match("DOCTYPE",!0,!0)?(D.eatWhile(/[\w\._\-]/),te(N(1))):null:D.eat("?")?(D.eatWhile(/[\w\._\-]/),z.tokenize=W("meta","?>"),"meta"):(A=D.eat("/")?"closeTag":"openTag",z.tokenize=R,"tag - bracket");if(ue=="&"){var de;return -D.eat("#")?D.eat("x")?de=D.eatWhile(/[a-fA-F\d]/)&&D.eat(";"):de=D.eatWhile(/[\d]/)&&D.eat(";"):de=D.eatWhile(/[\w\.\-:]/)&&D.eat(";"),de?"atom":"error"}else - return D.eatWhile(/[^&<]/),null}_.isInText=!0;function -R(D,z){var -te=D.next();if(te==">"||te=="/"&&D.eat(">"))return -z.tokenize=_,A=te==">"?"endTag":"selfcloseTag","tag -bracket";if(te=="=")return -A="equals",null;if(te=="<"){z.tokenize=_,z.state=w,z.tagName=z.tagStart=null;var - ue=z.tokenize(D,z);return ue?ue+" tag error":"tag error"}else -return/[\'\"]/.test(te)?(z.tokenize=I(te),z.stringStartCol=D.column(),z.tokenize(D,z)):(D.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function - I(D){var -z=function(te,ue){for(;!te.eol();)if(te.next()==D){ue.tokenize=R;break}return"string"};return - z.isInAttribute=!0,z}function W(D,z){return -function(te,ue){for(;!te.eol();){if(te.match(z)){ue.tokenize=_;break}te.next()}return - D}}function N(D){return function(z,te){for(var -ue;(ue=z.next())!=null;){if(ue=="<")return -te.tokenize=N(D+1),te.tokenize(z,te);if(ue==">")if(D==1){te.tokenize=_;break}else - return te.tokenize=N(D-1),te.tokenize(z,te)}return"meta"}}function -T(D,z,te){this.prev=D.context,this.tagName=z||"",this.indent=D.indented,this.startOfLine=te,(g.doNotIndent.hasOwnProperty(z)||D.context&&D.context.noIndent)&&(this.noIndent=!0)}function - E(D){D.context&&(D.context=D.context.prev)}function -c(D,z){for(var -te;;){if(!D.context||(te=D.context.tagName,!g.contextGrabbers.hasOwnProperty(te)||!g.contextGrabbers[te].hasOwnProperty(z)))return;E(D)}}function - w(D,z,te){return -D=="openTag"?(te.tagStart=z.column(),k):D=="closeTag"?O:w}function -k(D,z,te){return -D=="word"?(te.tagName=z.current(),m="tag",B):g.allowMissingTagName&&D=="endTag"?(m="tag - bracket",B(D,z,te)):(m="error",k)}function O(D,z,te){if(D=="word"){var -ue=z.current();return -te.context&&te.context.tagName!=ue&&g.implicitlyClosed.hasOwnProperty(te.context.tagName)&&E(te),te.context&&te.context.tagName==ue||g.matchClosing===!1?(m="tag",L):(m="tag - error",j)}else return -g.allowMissingTagName&&D=="endTag"?(m="tag -bracket",L(D,z,te)):(m="error",j)}function L(D,z,te){return -D!="endTag"?(m="error",L):(E(te),w)}function j(D,z,te){return -m="error",L(D,z,te)}function B(D,z,te){if(D=="word")return -m="attribute",U;if(D=="endTag"||D=="selfcloseTag"){var -ue=te.tagName,de=te.tagStart;return -te.tagName=te.tagStart=null,D=="selfcloseTag"||g.autoSelfClosers.hasOwnProperty(ue)?c(te,ue):(c(te,ue),te.context=new - T(te,ue,de==te.indented)),w}return m="error",B}function -U(D,z,te){return -D=="equals"?Q:(g.allowMissing||(m="error"),B(D,z,te))}function -Q(D,z,te){return -D=="string"?X:D=="word"&&g.allowUnquoted?(m="string",B):(m="error",B(D,z,te))}function - X(D,z,te){return -D=="string"?X:B(D,z,te)}return{startState:function(D){var -z={tokenize:_,state:w,indented:D||0,tagName:null,tagStart:null,context:null};return - -D!=null&&(z.baseIndent=D),z},token:function(D,z){if(!z.tagName&&D.sol()&&(z.indented=D.indentation()),D.eatSpace())return - null;A=null;var -te=z.tokenize(D,z);return(te||A)&&te!="comment"&&(m=null,z.state=z.state(A||te,D,z),m&&(te=m=="error"?te+" - error":m)),te},indent:function(D,z,te){var -ue=D.context;if(D.tokenize.isInAttribute)return -D.tagStart==D.indented?D.stringStartCol+1:D.indented+b;if(ue&&ue.noIndent)return - l.Pass;if(D.tokenize!=R&&D.tokenize!=_)return -te?te.match(/^(\s*)/)[0].length:0;if(D.tagName)return -g.multilineTagIndentPastTag!==!1?D.tagStart+D.tagName.length+2:D.tagStart+b*(g.multilineTagIndentFactor||1);if(g.alignCDATA&&/$/,blockCommentStart:"",configuration:g.htmlMode?"html":"xml",helperType:g.htmlMode?"html":"xml",skipAttribute:function(D){D.state==Q&&(D.state=B)},xmlCurrentTag:function(D){return - -D.tagName?{name:D.tagName,close:D.type=="closeTag"}:null},xmlCurrentContext:function(D){for(var - z=[],te=D.context;te;te=te.prev)z.push(te.tagName);return -z.reverse()}}}),l.defineMIME("text/xml","xml"),l.defineMIME("application/xml","xml"),l.mimeModes.hasOwnProperty("text/html")||l.defineMIME("text/html",{name:"xml",htmlMode:!0})})})(),function(o,a){(function(l){l(ct.exports,Fc.exports,Ic.exports,Rc.exports)})(function(l){var - -u={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function - h(A,m,_){var R=A.current(),I=R.search(m);return -I>-1?A.backUp(R.length-I):R.match(/<\/?$/)&&(A.backUp(R.length),A.match(m,!1)||A.match(R)),_}var - p={};function S(A){var m=p[A];return m||(p[A]=new -RegExp("\\s+"+A+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function -b(A,m){var _=A.match(S(m));return -_?/^\s*(.*?)\s*$/.exec(_[2])[1]:""}function g(A,m){return new -RegExp((m?"^":"")+"","i")}function x(A,m){for(var _ in A)for(var -R=m[_]||(m[_]=[]),I=A[_],W=I.length-1;W>=0;W--)R.unshift(I[W])}function - y(A,m){for(var _=0;_=0;N--)R.script.unshift(["type",W[N].matches,W[N].mode]);function - T(E,c){var -w=_.token(E,c.htmlState),k=/\btag\b/.test(w),O;if(k&&!/[<>\s\/]/.test(E.current())&&(O=c.htmlState.tagName&&c.htmlState.tagName.toLowerCase())&&R.hasOwnProperty(O))c.inTag=O+" - ";else if(c.inTag&&k&&/>$/.test(E.current())){var -L=/^([\S]+) (.*)/.exec(c.inTag);c.inTag=null;var -j=E.current()==">"&&y(R[L[1]],L[2]),B=l.getMode(A,j),U=g(L[1],!0),Q=g(L[1],!1);c.token=function(X,D){return - -X.match(U,!1)?(D.token=T,D.localState=D.localMode=null,null):h(X,Q,D.localMode.token(X,D.localState))},c.localMode=B,c.localState=l.startState(B,_.indent(c.htmlState,"",""))}else - c.inTag&&(c.inTag+=E.current(),E.eol()&&(c.inTag+=" -"));return w}return{startState:function(){var -E=l.startState(_);return{token:T,inTag:null,localMode:null,localState:null,htmlState:E}},copyState:function(E){var - c;return -E.localState&&(c=l.copyState(E.localMode,E.localState)),{token:E.token,inTag:E.inTag,localMode:E.localMode,localState:c,htmlState:l.copyState(_,E.htmlState)}},token:function(E,c){return - -c.token(E,c)},indent:function(E,c,w){return!E.localMode||/^\s*<\//.test(c)?_.indent(E.htmlState,c,w):E.localMode.indent?E.localMode.indent(E.localState,c,w):l.Pass},innerMode:function(E){return{state:E.localState||E.htmlState,mode:E.localMode||_}}}},"xml","javascript","css"),l.defineMIME("text/html","htmlmixed")})}();var - -Fa={exports:{}};(function(o,a){(function(l){l(ct.exports)})(function(l){var - u=l.Pos;function h(T){var E=T.flags;return -E!=null?E:(T.ignoreCase?"i":"")+(T.global?"g":"")+(T.multiline?"m":"")}function - p(T,E){for(var c=h(T),w=c,k=0;kL);j++){var - B=T.getLine(O++);w=w==null?B:w+` -`+B}k=k*2,E.lastIndex=c.ch;var U=E.exec(w);if(U){var -Q=w.slice(0,U.index).split(` -`),X=U[0].split(` -`),D=c.line+Q.length-1,z=Q[Q.length-1].length;return{from:u(D,z),to:u(D+X.length-1,X.length==1?z+X[0].length:X[X.length-1].length),match:U}}}}function - x(T,E,c){for(var w,k=0;k<=T.length;){E.lastIndex=k;var -O=E.exec(T);if(!O)break;var -L=O.index+O[0].length;if(L>T.length-c)break;(!w||L>w.index+w[0].length)&&(w=O),k=O.index+1}return - w}function y(T,E,c){E=p(E,"g");for(var -w=c.line,k=c.ch,O=T.firstLine();w>=O;w--,k=-1){var -L=T.getLine(w),j=x(L,E,k<0?0:L.length-k);if(j)return{from:u(w,j.index),to:u(w,j.index+j[0].length),match:j}}}function - A(T,E,c){if(!S(E))return y(T,E,c);E=p(E,"gm");for(var -w,k=1,O=T.getLine(c.line).length-c.ch,L=c.line,j=T.firstLine();L>=j;){for(var - B=0;B=j;B++){var U=T.getLine(L--);w=w==null?U:U+` -`+w}k*=2;var Q=x(w,E,O);if(Q){var X=w.slice(0,Q.index).split(` -`),D=Q[0].split(` -`),z=L+X.length,te=X[X.length-1].length;return{from:u(z,te),to:u(z+D.length-1,D.length==1?te+D[0].length:D[D.length-1].length),match:Q}}}}var - m,_;String.prototype.normalize?(m=function(T){return -T.normalize("NFD").toLowerCase()},_=function(T){return -T.normalize("NFD")}):(m=function(T){return -T.toLowerCase()},_=function(T){return T});function -R(T,E,c,w){if(T.length==E.length)return c;for(var -k=0,O=c+Math.max(0,T.length-E.length);;){if(k==O)return k;var -L=k+O>>1,j=w(T.slice(0,L)).length;if(j==c)return -L;j>c?O=L:k=L+1}}function I(T,E,c,w){if(!E.length)return null;var -k=w?m:_,O=k(E).split(/\r|\n\r?/);e:for(var -L=c.line,j=c.ch,B=T.lastLine()+1-O.length;L<=B;L++,j=0){var -U=T.getLine(L).slice(j),Q=k(U);if(O.length==1){var -X=Q.indexOf(O[0]);if(X==-1)continue e;var -c=R(U,Q,X,k)+j;return{from:u(L,R(U,Q,X,k)+j),to:u(L,R(U,Q,X+O[0].length,k)+j)}}else{var - D=Q.length-O[0].length;if(Q.slice(D)!=O[0])continue e;for(var z=1;z=B;L--,j=-1){var - U=T.getLine(L);j>-1&&(U=U.slice(0,j));var -Q=k(U);if(O.length==1){var X=Q.lastIndexOf(O[0]);if(X==-1)continue -e;return{from:u(L,R(U,Q,X,k)),to:u(L,R(U,Q,X+O[0].length,k))}}else{var -D=O[O.length-1];if(Q.slice(0,D.length)!=D)continue e;for(var -z=1,c=L-O.length+1;z0);)c.push({anchor:w.from(),head:w.to()});c.length&&this.setSelections(c,0)})})})();var - -Bc={exports:{}};(function(o,a){(function(l){l(ct.exports)})(function(l){var - u=/MSIE -\d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),h=l.Pos,p={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function - S(m){return m&&m.bracketRegex||/[(){}[\]]/}function -b(m,_,R){var -I=m.getLineHandle(_.line),W=_.ch-1,N=R&&R.afterCursor;N==null&&(N=/(^| - )cm-fat-cursor($| )/.test(m.getWrapperElement().className));var -T=S(R),E=!N&&W>=0&&T.test(I.text.charAt(W))&&p[I.text.charAt(W)]||T.test(I.text.charAt(W+1))&&p[I.text.charAt(++W)];if(!E)return - null;var -c=E.charAt(1)==">"?1:-1;if(R&&R.strict&&c>0!=(W==_.ch))return - null;var -w=m.getTokenTypeAt(h(_.line,W+1)),k=g(m,h(_.line,W+(c>0?1:0)),c,w,R);return - -k==null?null:{from:h(_.line,W),to:k&&k.pos,match:k&&k.ch==E.charAt(0),forward:c>0}}function - g(m,_,R,I,W){for(var -N=W&&W.maxScanLineLength||1e4,T=W&&W.maxScanLines||1e3,E=[],c=S(W),w=R>0?Math.min(_.line+T,m.lastLine()+1):Math.max(m.firstLine()-1,_.line-T),k=_.line;k!=w;k+=R){var - O=m.getLine(k);if(!!O){var -L=R>0?0:O.length-1,j=R>0?O.length:-1;if(!(O.length>N))for(k==_.line&&(L=_.ch-(R<0?1:0));L!=j;L+=R){var - B=O.charAt(L);if(c.test(B)&&(I===void -0||(m.getTokenTypeAt(h(k,L+1))||"")==(I||""))){var -U=p[B];if(U&&U.charAt(1)==">"==R>0)E.push(B);else -if(E.length)E.pop();else return{pos:h(k,L),ch:B}}}}}return -k-R==(R>0?m.lastLine():m.firstLine())?!1:null}function -x(m,_,R){for(var -I=m.state.matchBrackets.maxHighlightLineLength||1e3,W=R&&R.highlightNonMatching,N=[],T=m.listSelections(),E=0;E0&&w.ch>=O.length)return - c.clipPos(h(w.line+1,0));for(var -L="start",j,B=w.ch,U=B,Q=k<0?0:O.length,X=0;U!=Q;U+=k,X++){var -D=O.charAt(k<0?U-1:U),z=D!="_"&&l.isWordChar(D)?"w":"o";if(z=="w"&&D.toUpperCase()==D&&(z="W"),L=="start")z!="o"?(L="in",j=z):B=U+k;else - -if(L=="in"&&j!=z){if(j=="w"&&z=="W"&&k<0&&U--,j=="W"&&z=="w"&&k>0)if(U==B+1){j="w";continue}else - U--;break}}return h(w.line,U)}function -S(c,w){c.extendSelectionsBy(function(k){return -c.display.shift||c.doc.extend||k.empty()?p(c.doc,k.head,w):w<0?k.from():k.to()})}u.goSubwordLeft=function(c){S(c,-1)},u.goSubwordRight=function(c){S(c,1)},u.scrollLineUp=function(c){var - w=c.getScrollInfo();if(!c.somethingSelected()){var -k=c.lineAtHeight(w.top+w.clientHeight,"local");c.getCursor().line>=k&&c.execCommand("goLineUp")}c.scrollTo(null,w.top-c.defaultTextHeight())},u.scrollLineDown=function(c){var - w=c.getScrollInfo();if(!c.somethingSelected()){var -k=c.lineAtHeight(w.top,"local")+1;c.getCursor().line<=k&&c.execCommand("goLineDown")}c.scrollTo(null,w.top+c.defaultTextHeight())},u.splitSelectionByLine=function(c){for(var - w=c.listSelections(),k=[],O=0;OL.line&&B==j.line&&j.ch==0||k.push({anchor:B==L.line?L:h(B,0),head:B==j.line?j:h(B)});c.setSelections(k,0)},u.singleSelectionTop=function(c){var - -w=c.listSelections()[0];c.setSelection(w.anchor,w.head,{scroll:!1})},u.selectLine=function(c){for(var - w=c.listSelections(),k=[],O=0;OO?k.push(U,Q):k.length&&(k[k.length-1]=Q),O=Q}c.operation(function(){for(var X=0;Xc.lastLine()?c.replaceRange(` -`+te,h(c.lastLine()),null,"+swapLine"):c.replaceRange(te+` -`,h(z,0),null,"+swapLine")}c.setSelections(L),c.scrollIntoView()})},u.swapLineDown=function(c){if(c.isReadOnly())return - l.Pass;for(var -w=c.listSelections(),k=[],O=c.lastLine()+1,L=w.length-1;L>=0;L--){var - -j=w[L],B=j.to().line+1,U=j.from().line;j.to().ch==0&&!j.empty()&&B--,B=0;Q-=2){var - -X=k[Q],D=k[Q+1],z=c.getLine(X);X==c.lastLine()?c.replaceRange("",h(X-1),h(X),"+swapLine"):c.replaceRange("",h(X,0),h(X+1,0),"+swapLine"),c.replaceRange(z+` -`,h(D,0),null,"+swapLine")}c.scrollIntoView()})},u.toggleCommentIndented=function(c){c.toggleComment({indent:!0})},u.joinLines=function(c){for(var - w=c.listSelections(),k=[],O=0;O=0;j--){var - B=k[O[j]];if(!(U&&l.cmpPos(B.head,U)>0)){var -Q=g(c,B.head);U=Q.from,c.replaceRange(w(Q.word),Q.from,Q.to)}}})}u.smartBackspace=function(c){if(c.somethingSelected())return - l.Pass;c.operation(function(){for(var -w=c.listSelections(),k=c.getOption("indentUnit"),O=w.length-1;O>=0;O--){var - -L=w[O].head,j=c.getRange({line:L.line,ch:0},L),B=l.countColumn(j,null,c.getOption("tabSize")),U=c.findPosH(L,-1,"char",!1);if(j&&!/\S/.test(j)&&B%k==0){var - Q=new -h(L.line,l.findColumn(j,B-k,k));Q.ch!=L.ch&&(U=Q)}c.replaceRange("",U,L,"+delete")}})},u.delLineRight=function(c){c.operation(function(){for(var - -w=c.listSelections(),k=w.length-1;k>=0;k--)c.replaceRange("",w[k].anchor,h(w[k].to().line),"+delete");c.scrollIntoView()})},u.upcaseAtCursor=function(c){I(c,function(w){return - -w.toUpperCase()})},u.downcaseAtCursor=function(c){I(c,function(w){return - -w.toLowerCase()})},u.setSublimeMark=function(c){c.state.sublimeMark&&c.state.sublimeMark.clear(),c.state.sublimeMark=c.setBookmark(c.getCursor())},u.selectToSublimeMark=function(c){var - -w=c.state.sublimeMark&&c.state.sublimeMark.find();w&&c.setSelection(c.getCursor(),w)},u.deleteToSublimeMark=function(c){var - w=c.state.sublimeMark&&c.state.sublimeMark.find();if(w){var -k=c.getCursor(),O=w;if(l.cmpPos(k,O)>0){var -L=O;O=k,k=L}c.state.sublimeKilled=c.getRange(k,O),c.replaceRange("",k,O)}},u.swapWithSublimeMark=function(c){var - -w=c.state.sublimeMark&&c.state.sublimeMark.find();w&&(c.state.sublimeMark.clear(),c.state.sublimeMark=c.setBookmark(c.getCursor()),c.setCursor(w))},u.sublimeYank=function(c){c.state.sublimeKilled!=null&&c.replaceSelection(c.state.sublimeKilled,null,"paste")},u.showInCenter=function(c){var - -w=c.cursorCoords(null,"local");c.scrollTo(null,(w.top+w.bottom)/2-c.getScrollInfo().clientHeight/2)};function - W(c){var -w=c.getCursor("from"),k=c.getCursor("to");if(l.cmpPos(w,k)==0){var -O=g(c,w);if(!O.word)return;w=O.from,k=O.to}return{from:w,to:k,query:c.getRange(w,k),word:O}}function - N(c,w){var k=W(c);if(!!k){var -O=k.query,L=c.getSearchCursor(O,w?k.to:k.from);(w?L.findNext():L.findPrevious())?c.setSelection(L.from(),L.to()):(L=c.getSearchCursor(O,w?h(c.firstLine(),0):c.clipPos(h(c.lastLine()))),(w?L.findNext():L.findPrevious())?c.setSelection(L.from(),L.to()):k.word&&c.setSelection(k.from,k.to))}}u.findUnder=function(c){N(c,!0)},u.findUnderPrevious=function(c){N(c,!1)},u.findAllUnder=function(c){var - w=W(c);if(!!w){for(var -k=c.getSearchCursor(w.query),O=[],L=-1;k.findNext();)O.push({anchor:k.from(),head:k.to()}),k.from().line<=w.from.line&&k.from().ch<=w.from.ch&&L++;c.setSelections(O,L)}};var - -T=l.keyMap;T.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K - Cmd-D":"skipAndSelectNextOccurrence","Cmd-K -Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K -Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K -Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K -Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K -Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K -Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K -Cmd-0":"unfoldAll","Cmd-K -Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},l.normalizeKeyMap(T.macSublime),T.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K - Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K -Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K -Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K -Ctrl-A":"selectToSublimeMark","Ctrl-K -Ctrl-W":"deleteToSublimeMark","Ctrl-K -Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K -Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K -Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K -Ctrl-0":"unfoldAll","Ctrl-K -Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},l.normalizeKeyMap(T.pcSublime);var - -E=T.default==T.macDefault;T.sublime=E?T.macSublime:T.pcSublime})}(),function(o,a){(function(l){l(ct.exports)})(function(l){var - u={},h=/[^\s\u00a0]/,p=l.Pos,S=l.cmpPos;function b(y){var -A=y.search(h);return -A==-1?0:A}l.commands.toggleComment=function(y){y.toggleComment()},l.defineExtension("toggleComment",function(y){y||(y=u);for(var - -A=this,m=1/0,_=this.listSelections(),R=null,I=_.length-1;I>=0;I--){var - -W=_[I].from(),N=_[I].to();W.line>=m||(N.line>=m&&(N=p(m,0)),m=W.line,R==null?A.uncomment(W,N,y)?R="un":(A.lineComment(W,N,y),R="line"):R=="un"?A.uncomment(W,N,y):A.lineComment(W,N,y))}});function - -g(y,A,m){return/\bstring\b/.test(y.getTokenTypeAt(p(A.line,0)))&&!/^[\'\"\`]/.test(m)}function - x(y,A){var m=y.getMode();return -m.useInnerComments===!1||!m.innerMode?m:y.getModeAt(A)}l.defineExtension("lineComment",function(y,A,m){m||(m=u);var - _=this,R=x(_,y),I=_.getLine(y.line);if(!(I==null||g(_,y,I))){var -W=m.lineComment||R.lineComment;if(!W){(m.blockCommentStart||R.blockCommentStart)&&(m.fullLines=!0,_.blockComment(y,A,m));return}var - -N=Math.min(A.ch!=0||A.line==y.line?A.line+1:A.line,_.lastLine()+1),T=m.padding==null?" - -":m.padding,E=m.commentBlankLines||y.line==A.line;_.operation(function(){if(m.indent){for(var - c=null,w=y.line;wO.length)&&(c=O)}for(var w=y.line;wN||_.operation(function(){if(m.fullLines!=!1){var - -E=h.test(_.getLine(N));_.replaceRange(T+W,p(N)),_.replaceRange(I+T,p(y.line,0));var - c=m.blockCommentLead||R.blockCommentLead;if(c!=null)for(var -w=y.line+1;w<=N;++w)(w!=N||E)&&_.replaceRange(c+T,p(w,0))}else{var - -k=S(_.getCursor("to"),A)==0,O=!_.somethingSelected();_.replaceRange(W,A),k&&_.setSelection(O?A:_.getCursor("from"),A),_.replaceRange(I,y)}})}}),l.defineExtension("uncomment",function(y,A,m){m||(m=u);var - -_=this,R=x(_,y),I=Math.min(A.ch!=0||A.line==y.line?A.line:A.line-1,_.lastLine()),W=Math.min(y.line,I),N=m.lineComment||R.lineComment,T=[],E=m.padding==null?" - ":m.padding,c;e:{if(!N)break e;for(var w=W;w<=I;++w){var -k=_.getLine(w),O=k.indexOf(N);if(O>-1&&!/comment/.test(_.getTokenTypeAt(p(w,O+1)))&&(O=-1),O==-1&&h.test(k)||O>-1&&h.test(k.slice(0,O)))break - e;T.push(k)}if(_.operation(function(){for(var V=W;V<=I;++V){var -pe=T[V-W],Ne=pe.indexOf(N),Ke=Ne+N.length;Ne<0||(pe.slice(Ke,Ke+E.length)==E&&(Ke+=E.length),c=!0,_.replaceRange("",p(V,Ne),p(V,Ke)))}}),c)return!0}var - -L=m.blockCommentStart||R.blockCommentStart,j=m.blockCommentEnd||R.blockCommentEnd;if(!L||!j)return!1;var - -B=m.blockCommentLead||R.blockCommentLead,U=_.getLine(W),Q=U.indexOf(L);if(Q==-1)return!1;var - -X=I==W?U:_.getLine(I),D=X.indexOf(j,I==W?Q+L.length:0),z=p(W,Q+1),te=p(I,D+1);if(D==-1||!/comment/.test(_.getTokenTypeAt(z))||!/comment/.test(_.getTokenTypeAt(te))||_.getRange(z,te,` -`).indexOf(j)>-1)return!1;var - -ue=U.lastIndexOf(L,y.ch),de=ue==-1?-1:U.slice(0,y.ch).indexOf(j,ue+L.length);if(ue!=-1&&de!=-1&&de+j.length!=y.ch)return!1;de=X.indexOf(j,A.ch);var - Me=X.slice(A.ch).lastIndexOf(L,de-A.ch);return -ue=de==-1||Me==-1?-1:A.ch+Me,de!=-1&&ue!=-1&&ue!=A.ch?!1:(_.operation(function(){_.replaceRange("",p(I,D-(E&&X.slice(D-E.length,D)==E?E.length:0)),p(I,D+j.length));var - -V=Q+L.length;if(E&&U.slice(V,V+E.length)==E&&(V+=E.length),_.replaceRange("",p(W,Q),p(W,V)),B)for(var - pe=W+1;pe<=I;++pe){var -Ne=_.getLine(pe),Ke=Ne.indexOf(B);if(!(Ke==-1||h.test(Ne.slice(0,Ke)))){var - -je=Ke+B.length;E&&Ne.slice(je,je+E.length)==E&&(je+=E.length),_.replaceRange("",p(pe,Ke),p(pe,je))}}}),!0)})})}(),function(o,a){(function(l){l(ct.exports)})(function(l){var - -u={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},h=l.Pos;l.defineOption("autoCloseBrackets",!1,function(N,T,E){E&&E!=l.Init&&(N.removeKeyMap(S),N.state.closeBrackets=null),T&&(b(p(T,"pairs")),N.state.closeBrackets=T,N.addKeyMap(S))});function - p(N,T){return T=="pairs"&&typeof N=="string"?N:typeof -N=="object"&&N[T]!=null?N[T]:u[T]}var -S={Backspace:y,Enter:A};function b(N){for(var T=0;T=0;w--){var - -O=c[w].head;N.replaceRange("",h(O.line,O.ch-1),h(O.line,O.ch+1),"+delete")}}function - A(N){var -T=x(N),E=T&&p(T,"explode");if(!E||N.getOption("disableInput"))return - l.Pass;for(var c=N.listSelections(),w=0;w0?{line:O.head.line,ch:O.head.ch+T}:{line:O.head.line-1};E.push({anchor:L,head:L})}N.setSelections(E,w)}function - _(N){var T=l.cmpPos(N.anchor,N.head)>0;return{anchor:new -h(N.anchor.line,N.anchor.ch+(T?-1:1)),head:new -h(N.head.line,N.head.ch+(T?1:-1))}}function R(N,T){var -E=x(N);if(!E||N.getOption("disableInput"))return l.Pass;var -c=p(E,"pairs"),w=c.indexOf(T);if(w==-1)return l.Pass;for(var -k=p(E,"closeBefore"),O=p(E,"triples"),L=c.charAt(w+1)==T,j=N.listSelections(),B=w%2==0,U,Q=0;Q=0&&N.getRange(D,h(D.line,D.ch+3))==T+T+T?z="skipThree":z="skip";else - -if(L&&D.ch>1&&O.indexOf(T)>=0&&N.getRange(h(D.line,D.ch-2),D)==T+T){if(D.ch>2&&/\bstring/.test(N.getTokenTypeAt(h(D.line,D.ch-2))))return - l.Pass;z="addFour"}else if(L){var ue=D.ch==0?" -":N.getRange(h(D.line,D.ch-1),D);if(!l.isWordChar(te)&&ue!=T&&!l.isWordChar(ue))z="both";else - return l.Pass}else -if(B&&(te.length===0||/\s/.test(te)||k.indexOf(te)>-1))z="both";else - return l.Pass;if(!U)U=z;else if(U!=z)return l.Pass}var -de=w%2?c.charAt(w-1):T,Me=w%2?T:c.charAt(w+1);N.operation(function(){if(U=="skip")m(N,1);else - if(U=="skipThree")m(N,3);else if(U=="surround"){for(var -V=N.getSelections(),pe=0;pe=T.max))return - T.ch=0,T.text=T.cm.getLine(++T.line),!0}function -A(T){if(!(T.line<=T.min))return -T.text=T.cm.getLine(--T.line),T.ch=T.text.length,!0}function -m(T){for(;;){var -E=T.text.indexOf(">",T.ch);if(E==-1){if(y(T))continue;return}if(!x(T,E+1)){T.ch=E+1;continue}var - -c=T.text.lastIndexOf("/",E),w=c>-1&&!/\S/.test(T.text.slice(c+1,E));return - T.ch=E+1,w?"selfClose":"regular"}}function _(T){for(;;){var -E=T.ch?T.text.lastIndexOf("<",T.ch-1):-1;if(E==-1){if(A(T))continue;return}if(!x(T,E+1)){T.ch=E;continue}b.lastIndex=E,T.ch=E;var - c=b.exec(T.text);if(c&&c.index==E)return c}}function -R(T){for(;;){b.lastIndex=T.ch;var -E=b.exec(T.text);if(!E){if(y(T))continue;return}if(!x(T,E.index+1)){T.ch=E.index+1;continue}return - T.ch=E.index+E[0].length,E}}function I(T){for(;;){var -E=T.ch?T.text.lastIndexOf(">",T.ch-1):-1;if(E==-1){if(A(T))continue;return}if(!x(T,E+1)){T.ch=E;continue}var - -c=T.text.lastIndexOf("/",E),w=c>-1&&!/\S/.test(T.text.slice(c+1,E));return - T.ch=E+1,w?"selfClose":"regular"}}function W(T,E){for(var c=[];;){var -w=R(T),k,O=T.line,L=T.ch-(w?w[0].length:0);if(!w||!(k=m(T)))return;if(k!="selfClose")if(w[1]){for(var - -j=c.length-1;j>=0;--j)if(c[j]==w[2]){c.length=j;break}if(j<0&&(!E||E==w[2]))return{tag:w[2],from:u(O,L),to:u(T.line,T.ch)}}else - c.push(w[2])}}function N(T,E){for(var c=[];;){var -w=I(T);if(!w)return;if(w=="selfClose"){_(T);continue}var -k=T.line,O=T.ch,L=_(T);if(!L)return;if(L[1])c.push(L[2]);else{for(var -j=c.length-1;j>=0;--j)if(c[j]==L[2]){c.length=j;break}if(j<0&&(!E||E==L[2]))return{tag:L[2],from:u(T.line,T.ch),to:u(k,O)}}}}l.registerHelper("fold","xml",function(T,E){for(var - c=new g(T,E.line,0);;){var w=R(c);if(!w||c.line!=E.line)return;var -k=m(c);if(!k)return;if(!w[1]&&k!="selfClose"){var -O=u(c.line,c.ch),L=W(c,w[2]);return -L&&h(L.from,O)>0?{from:O,to:L.from}:null}}}),l.findMatchingTag=function(T,E,c){var - w=new -g(T,E.line,E.ch,c);if(!(w.text.indexOf(">")==-1&&w.text.indexOf("<")==-1)){var - -k=m(w),O=k&&u(w.line,w.ch),L=k&&_(w);if(!(!k||!L||h(w,E)>0)){var - j={from:u(w.line,w.ch),to:O,tag:L[2]};return -k=="selfClose"?{open:j,close:null,at:"open"}:L[1]?{open:N(w,L[2]),close:j,at:"close"}:(w=new - -g(T,O.line,O.ch,c),{open:j,close:W(w,L[2]),at:"open"})}}},l.findEnclosingTag=function(T,E,c,w){for(var - k=new g(T,E.line,E.ch,c);;){var O=N(k,w);if(!O)break;var L=new -g(T,E.line,E.ch,c),j=W(L,O.tag);if(j)return{open:O,close:j}}},l.scanForClosingTag=function(T,E,c,w){var - k=new g(T,E.line,E.ch,w?{from:0,to:w}:null);return -W(k,c)}})})(),function(o,a){(function(l){l(ct.exports,Hc.exports)})(function(l){l.defineOption("autoCloseTags",!1,function(y,A,m){if(m!=l.Init&&m&&y.removeKeyMap("autoCloseTags"),!!A){var - _={name:"autoCloseTags"};(typeof -A!="object"||A.whenClosing!==!1)&&(_["'/'"]=function(R){return -b(R)}),(typeof -A!="object"||A.whenOpening!==!1)&&(_["'>'"]=function(R){return - p(R)}),y.addKeyMap(_)}});var -u=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],h=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function - p(y){if(y.getOption("disableInput"))return l.Pass;for(var -A=y.listSelections(),m=[],_=y.getOption("autoCloseTags"),R=0;RI.ch&&(c=c.slice(0,c.length-W.end+I.ch));var - -L=c.toLowerCase();if(!c||W.type=="string"&&(W.end!=I.ch||!/[\"\']/.test(W.string.charAt(W.string.length-1))||W.string.length==1)||W.type=="tag"&&E.close||W.string.indexOf("/")==I.ch-W.start-1||k&&g(k,L)>-1||x(y,N.mode.xmlCurrentContext&&N.mode.xmlCurrentContext(T)||[],c,I,!0))return - l.Pass;var j=typeof -_=="object"&&_.emptyTags;if(j&&g(j,c)>-1){m[R]={text:"/>",newPos:l.Pos(I.line,I.ch+2)};continue}var - B=O&&g(O,L)>-1;m[R]={indent:B,text:">"+(B?` - -`:"")+"",newPos:B?l.Pos(I.line+1,0):l.Pos(I.line,I.ch+1)}}for(var - U=typeof -_=="object"&&_.dontIndentOnAutoClose,R=A.length-1;R>=0;R--){var - Q=m[R];y.replaceRange(Q.text,A[R].head,A[R].anchor,"+insert");var -X=y.listSelections().slice(0);X[R]={head:Q.newPos,anchor:Q.newPos},y.setSelections(X),!U&&Q.indent&&(y.indentLine(Q.newPos.line,null,!0),y.indentLine(Q.newPos.line+1,null,!0))}}function - S(y,A){for(var m=y.listSelections(),_=[],R=A?"/":""&&(k+=">"),_[N]=k}if(y.replaceSelections(_),m=y.listSelections(),!W)for(var N=0;N=0&&A[T]==m;T--)++N;_=W.to;for(var T=1;TL.cursorCoords(Me,"window").top&&((D=V).style.opacity=.4)}))};g(L,T(L),X,z,function(te,ue){var - -de=l.keyName(te),Me=L.getOption("extraKeys"),V=Me&&Me[de]||l.keyMap[L.getOption("keyMap")][de];V=="findNext"||V=="findPrev"||V=="findPersistentNext"||V=="findPersistentPrev"?(l.e_stop(te),_(L,p(L),ue),L.execCommand(V)):(V=="find"||V=="findPersistent")&&(l.e_stop(te),z(ue,te))}),U&&X&&(_(L,Q,X),I(L,j))}else - x(L,T(L),"Search -for:",X,function(te){te&&!Q.query&&L.operation(function(){_(L,Q,te),Q.posFrom=Q.posTo=L.getCursor(),I(L,j)})})}function - I(L,j,B){L.operation(function(){var -U=p(L),Q=b(L,U.query,j?U.posFrom:U.posTo);!Q.find(j)&&(Q=b(L,U.query,j?l.Pos(L.lastLine()):l.Pos(L.firstLine(),0)),!Q.find(j))||(L.setSelection(Q.from(),Q.to()),L.scrollIntoView({from:Q.from(),to:Q.to()},20),U.posFrom=Q.from(),U.posTo=Q.to(),B&&B(Q.from(),Q.to()))})}function - W(L){L.operation(function(){var -j=p(L);j.lastQuery=j.query,!!j.query&&(j.query=j.queryText=null,L.removeOverlay(j.overlay),j.annotate&&(j.annotate.clear(),j.annotate=null))})}function - N(L,j){var -B=L?document.createElement(L):document.createDocumentFragment();for(var U - in j)B[U]=j[U];for(var Q=2;Qb.firstLine();)g=l.Pos(g.line-1,0),R=_(!1);if(!(!R||R.cleared||y==="unfold")){var - -I=h(b,x,R);l.on(I,"mousedown",function(N){W.clear(),l.e_preventDefault(N)});var - -W=b.markText(R.from,R.to,{replacedWith:I,clearOnEnter:S(b,x,"clearOnEnter"),__isFold:!0});W.on("clear",function(N,T){l.signal(b,"unfold",b,N,T)}),l.signal(b,"fold",b,R.from,R.to)}}function - h(b,g,x){var y=S(b,g,"widget");if(typeof -y=="function"&&(y=y(x.from,x.to)),typeof y=="string"){var -A=document.createTextNode(y);y=document.createElement("span"),y.appendChild(A),y.className="CodeMirror-foldmarker"}else - y&&(y=y.cloneNode(!0));return -y}l.newFoldFunction=function(b,g){return -function(x,y){u(x,y,{rangeFinder:b,widget:g})}},l.defineExtension("foldCode",function(b,g,x){u(this,b,g,x)}),l.defineExtension("isFolded",function(b){for(var - g=this.findMarksAt(b),x=0;x=c){if(O&&B&&O.test(B.className))return;j=b(T.indicatorOpen)}}!j&&!B||I.setGutterMarker(L,T.gutter,j)})}function - x(I){return new RegExp("(^|\\s)"+I+"(?:$|\\s)\\s*")}function y(I){var -W=I.getViewport(),N=I.state.foldGutter;!N||(I.operation(function(){g(I,W.from,W.to)}),N.from=W.from,N.to=W.to)}function - A(I,W,N){var T=I.state.foldGutter;if(!!T){var -E=T.options;if(N==E.gutter){var -c=S(I,W);c?c.clear():I.foldCode(u(W,0),E)}}}function m(I){var -W=I.state.foldGutter;if(!!W){var -N=W.options;W.from=W.to=0,clearTimeout(W.changeUpdate),W.changeUpdate=setTimeout(function(){y(I)},N.foldOnChangeTimeSpan||600)}}function - _(I){var W=I.state.foldGutter;if(!!W){var -N=W.options;clearTimeout(W.changeUpdate),W.changeUpdate=setTimeout(function(){var - -T=I.getViewport();W.from==W.to||T.from-W.to>20||W.from-T.to>20?y(I):I.operation(function(){T.fromW.to&&(g(I,W.to,T.to),W.to=T.to)})},N.updateViewportTimeSpan||400)}}function - R(I,W){var N=I.state.foldGutter;if(!!N){var -T=W.line;T>=N.from&&Tx))_=x,A="{",m="}";else - if(y!=null)_=y,A="[",m="]";else return;var -R=1,I=u.lastLine(),W,N;e:for(var T=p;T<=I;++T)for(var -E=u.getLine(T),c=T==p?_:0;;){var -w=E.indexOf(A,c),k=E.indexOf(m,c);if(w<0&&(w=E.length),k<0&&(k=E.length),c=Math.min(w,k),c==E.length)break;if(u.getTokenTypeAt(l.Pos(T,c+1))==b){if(c==w)++R;else - if(!--R){W=T,N=c;break -e}}++c}if(!(W==null||p==W))return{from:l.Pos(p,_),to:l.Pos(W,N)}}),l.registerHelper("fold","import",function(u,h){function - p(A){if(Au.lastLine())return null;var -m=u.getTokenAt(l.Pos(A,1));if(/\S/.test(m.string)||(m=u.getTokenAt(l.Pos(A,m.end+1))),m.type!="keyword"||m.string!="import")return - null;for(var _=A,R=Math.min(u.lastLine(),A+10);_<=R;++_){var -I=u.getLine(_),W=I.indexOf(";");if(W!=-1)return{startCh:m.end,end:l.Pos(_,W)}}}var - -S=h.line,b=p(S),g;if(!b||p(S-1)||(g=p(S-2))&&g.end.line==S-1)return - null;for(var x=b.end;;){var -y=p(x.line+1);if(y==null)break;x=y.end}return{from:u.clipPos(l.Pos(S,b.startCh+1)),to:x}}),l.registerHelper("fold","include",function(u,h){function - p(y){if(yu.lastLine())return null;var -A=u.getTokenAt(l.Pos(y,1));if(/\S/.test(A.string)||(A=u.getTokenAt(l.Pos(y,A.end+1))),A.type=="meta"&&A.string.slice(0,8)=="#include")return - A.start+8}var S=h.line,b=p(S);if(b==null||p(S-1)!=null)return -null;for(var g=S;;){var -x=p(g+1);if(x==null)break;++g}return{from:l.Pos(S,b+1),to:u.clipPos(l.Pos(g))}})})}(),function(o,a){(function(l){l(ct.exports)})(function(l){l.registerGlobalHelper("fold","comment",function(u){return - u.blockCommentStart&&u.blockCommentEnd},function(u,h){var -p=u.getModeAt(h),S=p.blockCommentStart,b=p.blockCommentEnd;if(!S||!b)return;for(var - g=h.line,x=u.getLine(g),y,A=h.ch,m=0;;){var -_=A<=0?-1:x.lastIndexOf(S,A-1);if(_==-1){if(m==1)return;m=1,A=x.length;continue}if(m==1&&_Le("div"+le.position("absolute").w("100%").top(o.toolbar()).left(0).bottom(0).right(0).overflow("hidden").$after(le.content("").position("absolute").top("-7vh").width("100%").height("100vh").zIndex(3).opacity(.1).pointerEvents("none").backgroundImage("url(data:image/svg+xml;base64,"+Gc+")").backgroundSize("120% - auto").backgroundRepeat("no-repeat").backgroundPosition("center -center")).$nest(".CodeMirror",le.fontFamily("Source Code Pro, -monospace").lineHeight("22px").cursor("text").w("100%").h("100%").fontSize(14)).$nest(".cm-s-material.CodeMirror, - .cm-s-material -div.CodeMirror-gutters",le.backgroundColor(o.state.color)).$nest(".CodeMirror-activeline",le.background("rgba(255,255,255,0.07)")),{oncreate:({dom:l})=>{const - -u=/[{([]$/,h=/[^{}[\]()]/g,p=dn(l,{theme:o.state.theme||"material",readOnly:!o.state.editable,autoCloseBrackets:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0,lineNumbers:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],tabSize:2,viewportMargin:o.state.autoHeight?1/0:10,keyMap:"sublime",extraKeys:{"Alt-F":"findPersistent","Shift-Tab":"indentLess","Cmd-L":!1,"Cmd-M":!1,"Ctrl-L":!1,Enter:b=>{const - -g=b.getCursor(),x=b.getRange({line:g.line,ch:0},g).trim(),y=u.test(x),A=!y&&u.test(x.replace(h,"")),m=jn("=>",x),_=jn(",",x);b.setOption("smartIndent",A&&!_),b.execCommand("newlineAndIndent"),b.setOption("smartIndent",!0),(m||y)&&b.execCommand("insertSoftTab")},Tab:b=>{b.somethingSelected()?b.indentSelection("add"):b.execCommand("insertSoftTab")},Backspace:b=>{const - -g=b.getCursor(),x=b.getRange({line:g.line,ch:0},g);x.length%2==0&&jn(" - -",x)&&dn.commands.delCharBefore(b),dn.commands.delCharBefore(b)}}});p.on("gutterClick",qc),p.on("scrollCursorIntoView",(b,g)=>{g.codemirrorIgnore=!0});const - -S=p.getDoc();o.refreshCm.map(()=>p.refresh()),o.focus.map(({line:b=0,column:g=0,scrollTo:x=!1}={})=>{p.setCursor(b-1,g-1),p.focus(),x&&requestAnimationFrame(()=>p.scrollIntoView({line:b,ch:g},100))}),o.selected.map(b=>{if(!b)return;const - -g=b.patched||b.content||"",x=pn[Ri(b.name)]||pn[b.type]||"javascript",y=o.state.editable&&b.editable!==!1;p.setOption("lineWrapping",x.lineWrapping||!1),p.setOption("readOnly",!y),b.doc||(b.doc=dn.Doc(g,x),b.doc.ignoreCursor=!0,b.doc.on("change",(_,R)=>{R.origin!=="setValue"&&(b.doc.ignoreCursor=!0,Promise.resolve().then(()=>b.doc.ignoreCursor=!1),a.fileChange(b,b.doc.getValue(),Ba(b.doc.listSelections())))}),b.doc.on("cursorActivity",(_,R)=>{b.doc.ignoreCursor||a.fileSelectionChange(b,Ba(b.doc.listSelections()))})),b.doc.ignoreCursor=!0,Promise.resolve().then(()=>b.doc.ignoreCursor=!1),g!==b.doc.getValue()&&b.doc.setValue(g);const - -A=p.getDoc()!==S||o.state.autoFocus;p.getDoc()!==b.doc&&p.swapDoc(b.doc);const - -m=Xc(b.selections);m&&m.length&&(b.doc.setSelections(m),requestAnimationFrame(()=>{p.scrollIntoView(m[0].head,500)})),A&&p.focus(),!o.cmHeight&&o.state.autoHeight&&requestAnimationFrame(()=>o.cmHeight=l.querySelector(".CodeMirror-sizer").offsetHeight*(o.vertical()?2:1)+o.toolbar()*(o.vertical()?4:3))})}});function - qc(o,a,l,u){if(l==="CodeMirror-foldgutter")return;const -h=o.listSelections(),p=u.ctrlKey||u.metaKey?h:[],S=u.shiftKey&&h.length?h[0].anchor.line:a;let - b=u.shiftKey&&h.length&&S>a?a:a+1;y();const -g=function(A){const -m=o.lineAtHeight(A.clientY,"client");m!==b&&(b=m,y())},x=A=>{window.removeEventListener("mouseup",x),window.removeEventListener("mousemove",g)};window.addEventListener("mousemove",g),window.addEventListener("mouseup",x);function - -y(){o.setSelections(p.concat([{anchor:dn.Pos(S,b>S?0:null),head:dn.Pos(b,0)}]),p.length,{origin:"*mouse"})}}function - Xc(o=""){return -o.split(",").map(a=>(a=a.split("-").map(l=>(l=l.split(":"),{line:parseInt(l[0])||0,ch:parseInt(l[1])||0})),{anchor:a[0],head:a[1]||a[0]}))}function - Ba(o){return -o.map(a=>a.anchor.line+":"+a.anchor.ch+(a.head&&(a.anchor.line!==a.head.line||a.anchor.ch!==a.head.ch)?"-"+a.head.line+":"+a.head.ch:"")).join(",")}var - -qn=(o,a)=>Le("i"+le.w(o.size||18).h(o.size||18).display("flex").jc("center").ai("center").$nest("svg",le.w("100%").h("100%")),o,Le.trust(a)),Ha='',Yc=(o,a)=>Le("nav.toolbar"+le.position("relative").f("left").display("flex").c("gray").w("100%").minHeight(o.toolbar()).background("rgb(246,246,246)").fontSize(14).zi(20).boxShadow("0 - 1px 1px -rgba(0,0,0,0.35)").$after(le.content("").w(2).h("100%").position("absolute").right(-2).bc("inherit")),Le(".tabs"+le.display("flex").overflowX("auto").overflowY("hidden").flexGrow(1),o.state.fileTabs&&$c(o,a),o.state.linkTabs&&Qc(o,a)));function - Qc(o,a){return -o.state.links.map(l=>Wa(Le("div"+le.display("flex"),Le("a"+le.c("inherit"),{href:l.url,target:"_blank",onclick:u=>l.content&&u.preventDefault()},l.name),l.patches&&Le("span"+le.$animate("0.3s",{from:le.maxWidth(0).o(0),to:le.maxWidth(120).o(1)}).fontStyle("italic").ml(2).mt(2).fs(12),{onbeforeremove:({dom:u})=>(u.style.animation=le.$animate("0.3s",{from:le.maxWidth(120).o(1),to:le.maxWidth(0).o(0)}).style.animation,new - -Promise(h=>setTimeout(h,300)))},"(modified)"),l.editable===!1&&qn({size:16,class:le.ml(6).class},Ha)),()=>l.content&&a.select(l),l===o.selected(),o))}function - $c(o,a){return -o.state.files.map(l=>Wa(Le("div"+le.display("flex"),l.name,l.editable===!1&&qn({size:16,class:le.ml(6).class},Ha)),()=>a.select(l),l===o.selected(),o))}function - Wa(o,a,l,u){return -Le(".tab"+le.display("flex").ai("center").transition("background .3s, -color -.3s").minWidth(40).maxWidth(200).cursor("pointer").flexShrink(2).$hover(le.flexShrink(0).background("#ddd").c("#333")),{style:l?le.background(u.state.color).zi(1).c("white").flexShrink(0).style:{},onclick:a},Le("span"+le.flexGrow(1).overflow("hidden").ta("center").whiteSpace("nowrap").p("0 - 12px"),o))}var -Ua=(o,a)=>Le("div"+le.position("absolute").w("100%").h("100%").zi(50).t(0).cursor("pointer").background("rgb(255,255,255)").transition("opacity - 0.5s").$animate("0.5s",{from:le.o(0),to:le.o(1)}).boxShadow("0 0 10px -rgba(0,0,0,.35)").display("flex").jc("center").ai("center"),{onbeforeremove:l=>(l.dom.style.opacity=0,new - -Promise(u=>setTimeout(u,500))),onclick:a},qn({class:le.h(28).w(28).class},o)),Zc='',Jc=(o,a)=>Le(".handle"+le.position("absolute").zi(40),{style:o.vertical()?le.height(6).bottom(0).left(0).cursor("row-resize").w("100%").style:le.top(0).width("6px").right(0).cursor("col-resize").h("100%").style,onmousedown:l=>{a.startDragging(!0),window.addEventListener("mouseup",function - -u(h){l.pageX===h.pageX&&l.pageY===h.pageY&&a.setMiddle(0),window.removeEventListener("mousemove",a.changeMiddle,!1),window.removeEventListener("mouseup",u,!1),a.stopDragging(!1),Le.redraw()},!1),window.addEventListener("mousemove",a.changeMiddle,!1)}}),Vc=(o,a)=>[(o.vertical()&&o.editor?o.editor.offsetHeight<=o.toolbar():o.state.middle<3)&&Ua(Zc,a.resetSize),o.state.toolbar&&Yc(o,a),jc(o,a),o.state.resizeable&&Jc(o,a)];const - -Ka=(o,a)=>Le("iframe"+le.flexGrow(1).userSelect("none").minHeight(50).width("100%").h(0),{name:o.id,title:"Runtime - -iframe",style:le.pointerEvents(o.dragging&&"none").style,sandbox:"allow-modals - allow-forms allow-same-origin allow-scripts -allow-popups",allow:"geolocation; microphone; camera; midi; -encrypted-media",allowfullscreen:!0,frameborder:"0",oncreate:l=>a.initIframe(l.dom)}),eh=(o,a)=>Le(".iframeScroller"+le.overflowScrolling("touch").flexGrow(1).overflowY("scroll").display("flex").fd("column").w("100%"),Ka(o,a));var - -th=(o,a)=>o.iOS?eh(o,a):Ka(o,a),rh=(o,a)=>Le(".size"+le.position("absolute").fontFamily("Source - Code Pro, monospace").zi(1).fontSize(14).top(o.toolbar()+8).p("4px -8px").right(8).background("white").o(.65).transition("opacity -0.3s").$animate(".3s",{from:le.o(0),to:le.o(1)}).boxShadow("0 0 3px -rgba(0, 0, 0, .35)"),{onbeforeremove:nh},o.iframe.clientWidth," x -",o.iframe.clientHeight);function nh(o){return o.dom.style.opacity=0,new - Promise(a=>setTimeout(a,300))}var ih='';function - Ga(o,a){return -o.querySelector(a)||(o.parentElement?Ga(o.parentElement,a):null)}const -ja=o=>{const -l=(Ga(o,".flems")||document.body).parentElement.getBoundingClientRect(),u=o.parentElement.getBoundingClientRect();return{top:u.top-l.top,bottom:u.bottom-l.bottom,right:u.right-l.right,width:u.width}},oh=({dom:o})=>{ja(o).top<40?(o.style.bottom=0,o.style.borderBottom="5px - solid white"):(o.style.top=0,o.style.borderTop="5px solid -white")},lh=({dom:o})=>{const -a=ja(o),l=Math.min(-o.clientWidth/2+o.parentElement.clientWidth/2,-o.clientWidth+a.width+(-a.right-4));o.style.left=l+"px",a.top<40?(o.style.transformOrigin=Math.abs(l)+a.width/2+"px - -0px",o.style.bottom="-26px"):(o.style.transformOrigin=Math.abs(l)+a.width/2+"px - -26px",o.style.top="-26px")},ah=({dom:o})=>{o.parentElement.classList.add(le.$nest(":hover - .tooltip",le.o(1).transform("scale(1)")).class),lh({dom:o})};var -sh=({zIndex:o=11,title:a=""})=>Le(".tooltip"+le.position("absolute").o(0).c("gray").zi(o).transform("scale(0)").w("auto").h(26).fontSize(12).br(2).p("5px - 8px").bc("white").bs("0 2px 8px rgba(0,0,0,0.35)").transition("opacity -0.3s, transform -0.3s").pointerEvents("none").textTransform("uppercase").textAlign("right").whiteSpace("nowrap"),{key:"tooltip",oncreate:ah},a,Le(".tooltip_triangle"+le.pointerEvents("none").o(0).zi(o+1).transform("scale(0)").position("absolute").transformOrigin("bottom - center").transition("opacity 0.3s, transform 0.3s").l("calc(50% - -5px)").w(0).h(0).borderLeft("5px solid transparent").borderRight("5px -solid -transparent").textAlign("right"),{oncreate:oh})),Fi=(o,a={})=>Le(".icon"+le.position("relative").cursor("pointer").borderRadius(3).$hover(le.background("#ddd").color("gray")),{style:a.attention?le.$animate("1s - linear -infinite",{"0%":le.transform("scale(1)").o(1),"50%":le.transform("scale(1.2)").o(.5),"100%":le.transform("scale(1)").o(1)}).style:{}},qn({key:"icon_"+o,style:le.o(a.disabled&&.65).style,onclick:a.onclick,size:26,class:le.p(5).position("relative").class+" - -"+(a.iconClass?a.iconClass.class:"")},o),Le.fragment({key:"badge"},Boolean(a.badge)&&Le(".badge"+le.position("absolute").background("red").borderRadius(7).pointerEvents("none").p("0 - -3px").minWidth(14).h(14).top(0).right(0).c("white").fontStyle("normal").fontSize(10).textAlign("center"),a.badge)),sh({title:a.title})),uh='',qa='',fh='',ch='',hh='',dh=(o,a)=>Le(".toolbar"+le.w("100%").h(o.toolbar()).p(4,6).position("relative").flexShrink(0).justifyContent("flex-end").alignItems("center").display("flex").c("gray").zi(20).background("rgb(246,246,246)").boxShadow("0 - 1px 1px -rgba(0,0,0,0.35)"),Fi(o.state.autoReload?hh:ch,{title:(o.state.autoReload?"Disable":"Enable")+" - auto -reload",onclick:a.toggleAutoReload}),o.state.reloadButton&&Fi(o.loading?qa:fh,{onclick:l=>a.refresh({force:!0}),attention:o.hasChanges,title:"Refresh"}),o.state.shareButton&&Le("a"+le.color("inherit"),{href:"https://flems.io",target:"_blank",oncreate:a.setShareUrl},Fi(uh,{title:"Open - / share on -flems.io"}))),ph=o=>Le(".loading"+le.position("absolute").background("white").pointerEvents("none").top(o.toolbar()+1).left(0).bottom(0).right(0).display("flex").jc("center").ai("center").transition("opacity - -0.3s"),{style:le.o(o.loading?1:0).style},Le("div"+le.w(120).h(120).borderRadius(30).bc("gray").o(.25).$animate("2s - linear -infinite",{from:le.transform("rotate(0deg)"),to:le.transform("rotate(360deg)")}))),gh=(o,a)=>[o.state.toolbar&&dh(o,a),th(o,a),o.state.middle>97&&Ua(ih,a.resetSize),ph(o),o.resizing&&o.state.middle<=98&&rh(o)],vh=(o,a)=>Le(".input"+le.display("flex").p(2,0).flexShrink(0).w("100%").ff("Source - Code Pro, -monospace"),{onbeforeremove:Ra(300)},Le("label"+le.display("flex").ai("center").m("0 - 6px 0 -10px").flexShrink(0).c("blue"),{for:"input"},">"),Le("textarea#input"+le.p(0).flexGrow(1).fs(12).lineHeight(o.console.lineHeight).bc("transparent").resize("none").outline("none").maxHeight(o.console.lineHeight*5).border("none"),{resize:!1,style:le.minHeight(o.console.inputHeight()).maxHeight(o.console.inputHeight()).style,oninput:a.onConsoleInput,onkeydown:a.onConsoleKeyDown},o.console.input)),mh='',yh=(o,a)=>Le(".console"+le.bs("0 - 0 8px -rgba(0,0,0,.2)").position("relative").maxHeight(34).zi(30).display("flex").transition("max-height - -0.3s").fd("column").background("rgb(246,246,246)"),{oncreate:({dom:l})=>o.console.dom=l,style:le.maxHeight(o.state.console===!0&&"50%").style},Le("div"+le.display("flex").jc("space-between").c("#777").flexShrink(0),{onclick:a.toggleConsole},Le("div"+le.display("flex").fs(12).tt("uppercase").p("8px - -10px"),Le("span"+le.mr(4),"Console"),Xa("#d82c2c",a.clearErrors,o.console.errors()),Xa("gray",a.clearLogs,o.console.infos())),Le("div"+le.display("flex").p(2,6),Fi(mh,{iconClass:le.transition("transform - -0.3s").transform(o.state.console===!0&&"rotate(180deg)"),title:o.state.console===!0?"Hide - console":"Show -console"}))),o.state.console===!0&&Le(".scroll"+le.overflow("auto"),{onscroll:l=>{if(l.redraw=!1,o.ignoreScroll){o.ignoreScroll=!1;return}o.console.manualScroll=l.target.scrollTop!==l.target.scrollHeight-l.target.offsetHeight},onbeforeremove:Ra(300),oncreate:({dom:l})=>{l.scrollTop=l.scrollHeight-l.clientHeight},onupdate:({state:l,dom:u})=>{o.console.manualScroll||(o.ignoreScroll=!0,u.scrollTop=u.scrollHeight-u.clientHeight)}},o.console.output.slice(-200).map(l=>Le(".logLine"+le.display("flex").ff("Source - Code Pro, -monospace").alignItems("center").p(2,10).minHeight(22).fs(12).borderBottom("1px - solid -#eee").c("#555").whiteSpace("pre-wrap").alignItems("center"),{key:l.number,onclick:()=>l.expand=!l.expand,title:l.date},[Le("div"+le.flexGrow(1).$nest(">span",le.mr(10)),l.content.length>1&&l.content[0].indexOf("%c")>-1&&Le("span",l.content[0].split("%c").filter(u=>u).map((u,h)=>Le("span"+le(l.content[h+1]||""),u))),l.content.slice(l.content.length>1&&l.content[0].indexOf("%c")>-1?l.content[0].match(/%c/g).length+1:0).map((u,h)=>Le("span",u))),l.stack&&Le(".stack"+le.ta("right").flexShrink(0).overflow("hidden"),l.stack.slice(0,!l.expand&&l.type!=="error"?1:void - 0).map(u=>Le("div",(u.function||"")+" at -",Le("a"+(u.file?le.textDecoration("underline").cursor("pointer"):""),{onclick:h=>{h.stopPropagation(),u.select&&a.select(u.select),o.focus({line:u.line,column:u.column,scrollTo:!0})}},(u.file||0)+":"+(u.line||0)+":"+(u.column||0)))))]))),o.state.console===!0&&vh(o,a));function - Xa(o,a,l){return -Le("span"+le.bc(o).position("relative").m(0,4).p(0,10).ta("center").c("white").display("flex").ai("center").br(50).o(.2).transition("opacity - -0.5s"),{style:le.o(l>0&&1).style},l,l>0&&qn({size:14,onclick:u=>{u.stopPropagation(),a(u)},class:le.p(3).ml(4).mr(-8).br(20).cursor("pointer").transition("opacity - -0.3s").$hover(le.transform("scale").bc("rgba(255,255,255,0.25)")).class},qa))}var - bh=(o,a)=>Le(".flems"+le.fontFamily('-apple-system, -BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, -"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI -Symbol"').overflow("hidden").position("relative").display("flex").fd("column").boxSizing("border-box").lh(18).fs(16).$nest({"input, - textarea":le.fontFamily("inherit").m(0).p(0),"*, *:before, -*:after":le.boxSizing("inherit").fw("normal"),svg:le.fill("currentColor").va("middle"),"svg:not(:root)":le.overflow("hidden"),"a, - a:link, -a:visited":le.c("inherit").td("none").border("none")}),{style:le.h(o.state.autoHeight?o.cmHeight:"100%").userSelect(o.dragging&&"none").style},Le("main"+le.flexGrow(1).display("flex").flexDirection(o.vertical()&&"column").position(o.vertical()&&"relative"),{style:le.ai(!o.vertical()&&"stretch").style},Le(".editor"+le.position("relative").minWidth(50).minHeight(o.toolbar()).zIndex(30).flexGrow(1),{style:le.position(o.vertical()&&"absolute").width(o.vertical()&&"100%").height(o.vertical()&&o.state.middle+"%").maxWidth(!o.vertical()&&o.state.middle+"%").style},Vc(o,a)),Le(".runtime"+le.position("relative").minWidth(50).minHeight(o.toolbar()).b(0).r(0).display("flex").fd("column").flexGrow(1),{style:le.position(o.vertical()&&"absolute").width(o.vertical()&&"100%").height(o.vertical()&&100-o.state.middle+"%").maxHeight(o.vertical()&&"calc(100% - - -"+o.toolbar()+"px").maxWidth(!o.vertical()&&100-o.state.middle+"%").style},gh(o,a))),o.state.console&&yh(o,a)),Ya={exports:{}};(function(o){var - a=function(){var -l=String.fromCharCode,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",p={};function - S(g,x){if(!p[g]){p[g]={};for(var y=0;y>>8,y[A*2+1]=_%256}return - y},decompressFromUint8Array:function(g){if(g==null)return -b.decompress(g);for(var x=new Array(g.length/2),y=0,A=x.length;y>1}else{for(m=1,A=0;A>1}T--,T==0&&(T=Math.pow(2,c),c++),delete R[N]}else for(m=_[N],A=0;A>1;T--,T==0&&(T=Math.pow(2,c),c++),_[W]=E++,N=String(I)}if(N!==""){if(Object.prototype.hasOwnProperty.call(R,N)){if(N.charCodeAt(0)<256){for(A=0;A>1}else{for(m=1,A=0;A>1}T--,T==0&&(T=Math.pow(2,c),c++),delete R[N]}else for(m=_[N],A=0;A>1;T--,T==0&&(T=Math.pow(2,c),c++)}for(m=2,A=0;A>1;for(;;)if(k=k<<1,O==x-1){w.push(y(k));break}else - O++;return w.join("")},decompress:function(g){return -g==null?"":g==""?null:b._decompress(g.length,32768,function(x){return -g.charCodeAt(x)})},_decompress:function(g,x,y){var -A=[],m=4,_=4,R=3,I="",W=[],N,T,E,c,w,k,O,L={val:y(0),position:x,index:1};for(N=0;N<3;N+=1)A[N]=N;for(E=0,w=Math.pow(2,2),k=1;k!=w;)c=L.val&L.position,L.position>>=1,L.position==0&&(L.position=x,L.val=y(L.index++)),E|=(c>0?1:0)*k,k<<=1;switch(E){case - -0:for(E=0,w=Math.pow(2,8),k=1;k!=w;)c=L.val&L.position,L.position>>=1,L.position==0&&(L.position=x,L.val=y(L.index++)),E|=(c>0?1:0)*k,k<<=1;O=l(E);break;case - -1:for(E=0,w=Math.pow(2,16),k=1;k!=w;)c=L.val&L.position,L.position>>=1,L.position==0&&(L.position=x,L.val=y(L.index++)),E|=(c>0?1:0)*k,k<<=1;O=l(E);break;case - -2:return""}for(A[3]=O,T=O,W.push(O);;){if(L.index>g)return"";for(E=0,w=Math.pow(2,R),k=1;k!=w;)c=L.val&L.position,L.position>>=1,L.position==0&&(L.position=x,L.val=y(L.index++)),E|=(c>0?1:0)*k,k<<=1;switch(O=E){case - -0:for(E=0,w=Math.pow(2,8),k=1;k!=w;)c=L.val&L.position,L.position>>=1,L.position==0&&(L.position=x,L.val=y(L.index++)),E|=(c>0?1:0)*k,k<<=1;A[_++]=l(E),O=_-1,m--;break;case - -1:for(E=0,w=Math.pow(2,16),k=1;k!=w;)c=L.val&L.position,L.position>>=1,L.position==0&&(L.position=x,L.val=y(L.index++)),E|=(c>0?1:0)*k,k<<=1;A[_++]=l(E),O=_-1,m--;break;case - 2:return -W.join("")}if(m==0&&(m=Math.pow(2,R),R++),A[O])I=A[O];else -if(O===_)I=T+T.charAt(0);else return -null;W.push(I),A[_++]=T+I.charAt(0),m--,T=I,m==0&&(m=Math.pow(2,R),R++)}}};return - b}();o!=null&&(o.exports=a)})(Ya);var wh=Ya.exports;const -gr=Dc(o=>new Promise((a,l)=>{const -u=document.createElement("script");u.async=!1,u.charset="utf-8",u.src=o,document.body.appendChild(u),u.onload=a,u.onerror=h=>l("Could - not load compiler from -"+o)})),Qa={styl:o=>gr("https://static.flems.io/compilers/stylus.min.js").then(()=>({code:window.stylus.render(o.content)})),scss:o=>gr("https://static.flems.io/compilers/sass.sync.js").then(()=>new - -Promise((a,l)=>window.Sass.compile(o.content,u=>{u.message?l(u.message):a({code:u.text})}))),sass:o=>gr("https://static.flems.io/compilers/sass.sync.js").then(()=>new - -Promise((a,l)=>window.Sass.compile(o.content,{indentedSyntax:!0},u=>{u.message?l(u.message):a({code:u.text})}))),less:o=>gr("https://static.flems.io/compilers/less.min.js").then(()=>window.less.render(o.content).then(a=>({code:a.css}))),ts:o=>gr("https://static.flems.io/compilers/typescriptServices.js").then(()=>{const - -a=window.ts.transpileModule(o.content,{fileName:o.name,compilerOptions:{module:"ESNext",sourceMap:!0,jsx:"react"}});return{code:a.outputText.substring(0,a.outputText.lastIndexOf(` -`)),map:a.sourceMapText}}),babel:o=>gr("https://static.flems.io/compilers/babel.min.js").then(()=>window.Babel.transform(o.content,{presets:[["es2015",{modules:!1}],"stage-2","react"],sourceMaps:!0,sourceType:"unambiguous",sourceFileName:o.name})),ls:o=>gr("https://static.flems.io/compilers/livescript-min.js").then(()=>{window.livescript||(window.livescript=window.require("livescript"));const - -a=window.livescript.compile(o.content,{map:"linked",filename:o.name});return{code:a.code,map:a.map.toString()}}),coffee:o=>Promise.all([gr("https://static.flems.io/compilers/babel.min.js"),gr("https://static.flems.io/compilers/coffeescript.js")]).then(()=>{const - -a=window.CoffeeScript.compile(o.content,{sourceMap:!0,filename:o.name});return - -window.Babel.transform(a.js,{presets:[["es2015",{modules:!1}],"stage-2","react"],sourceMaps:!0,inputSourceMap:JSON.parse(a.v3SourceMap),sourceFileName:o.name})}),sibilant:o=>gr("https://static.flems.io/compilers/sibilant.js").then(()=>({code:window.sibilant.sibilize(o.content)}))},qo={html:"document",js:"script",mjs:"script",ts:"script",ls:"script",coffee:"script",sibilant:"script",css:"style",styl:"style",less:"style",scss:"style",sass:"style"},Bi=()=>({middle:50,selected:".js",color:"rgb(38,50,56)",theme:"material",layout:"auto",resizeable:!0,editable:!0,toolbar:!0,fileTabs:!0,linkTabs:!0,shareButton:!0,reloadButton:!0,console:!0,autoReload:!0,autoReloadDelay:400,autoFocus:!1,autoHeight:!1,scroll:null,files:[{name:".html",content:""},{name:".js",content:""},{name:".css",content:""}],links:[]});function - $a(o){const a=Bi();return Object.keys(a).forEach(l=>{l in -o||(o[l]=a[l])}),o.middle=Math.min(Math.max(o.middle,0),100),o.files.forEach(l=>{if(l.type=l.type||qo[Ri(l.name)],l.content=l.content||"",typeof - l.compiler=="string"&&!(l.compiler in Qa))throw new -Error("Unknown compler: -"+l.compiler)}),o.files.reduce((l,u)=>{if(l.indexOf(u.name)>-1)throw - new Error("Multiple files with the same name: "+name);return -l.concat(u.name)},[]),o.links.forEach(l=>{if(!zc.test(l.url))throw -new Error("Link url's should start with http:// or -https://");l.type=qo[l.type]||l.type||qo[Ri(l.url)]||"script",l.name=l.name||l.url.slice(l.url.lastIndexOf("/")+1)}),Gn(o,o.selected)||(o.selected=(o.files[0]||{}).name||(o.links[0]||{}).url),o}const - -Za=o=>"https://flems.io/#0="+wh.compressToEncodedURIComponent(JSON.stringify(xh(o)));function - xh(o){const a=Object.keys(Bi()).reduce((l,u)=>(u in -o&&o[u]!==Bi[u]&&(l[u]=o[u]),l),{});return -o.files&&o.files.length&&(a.files=Ja(o.files,["name","content","compiler","selections"])),o.links&&(a.links=Ja(o.links,["name","url","type","patches","selections"])),a}function - Ja(o=[],a){return o.map(l=>a.reduce((u,h)=>(u[h]=l[h],u),{}))}var - -Va={exports:{}};(function(o){(function(){l.SKIP={},l.lift=b,l.scan=p,l.merge=h,l.combine=u,l.scanMerge=S,l["fantasy-land/of"]=l;var - a=!1;Object.defineProperty(l,"HALT",{get:function(){return -a||console.log("HALT is deprecated and has been renamed to -SKIP"),a=!0,l.SKIP}});function l(x){var y=[],A=[];function m(I){return -arguments.length&&I!==l.SKIP&&(x=I,g(m)&&(m._changing(),m._state="active",y.forEach(function(W,N){W(A[N](x))}))),x}m.constructor=l,m._state=arguments.length&&x!==l.SKIP?"active":"pending",m._parents=[],m._changing=function(){g(m)&&(m._state="changing"),y.forEach(function(I){I._changing()})},m._map=function(I,W){var - N=W?l():l(I(x));return -N._parents.push(m),y.push(N),A.push(I),N},m.map=function(I){return -m._map(I,m._state!=="active")};var _;function R(){return -_=l(),_.map(function(I){return -I===!0&&(m._parents.forEach(function(W){W._unregisterChild(m)}),m._state="ended",m._parents.length=y.length=A.length=0),I}),_}return - m.toJSON=function(){return x!=null&&typeof -x.toJSON=="function"?x.toJSON():x},m["fantasy-land/map"]=m.map,m["fantasy-land/ap"]=function(I){return - u(function(W,N){return -W()(N())},[I,m])},m._unregisterChild=function(I){var -W=y.indexOf(I);W!==-1&&(y.splice(W,1),A.splice(W,1))},Object.defineProperty(m,"end",{get:function(){return - _||R()}}),m}function u(x,y){var -A=y.every(function(W){if(W.constructor!==l)throw new Error("Ensure that -each item passed to stream.combine/stream.merge/lift is a -stream");return -W._state==="active"}),m=A?l(x.apply(null,y.concat([y]))):l(),_=[],R=y.map(function(W){return - W._map(function(N){return _.push(W),(A||y.every(function(T){return -T._state!=="pending"}))&&(A=!0,m(x.apply(null,y.concat([_]))),_=[]),N},!0)}),I=m.end.map(function(W){W===!0&&(R.forEach(function(N){N.end(!0)}),I.end(!0))});return - m}function h(x){return u(function(){return x.map(function(y){return -y()})},x)}function p(x,y,A){var m=A.map(function(_){var R=x(y,_);return -R!==l.SKIP&&(y=R),R});return m(y),m}function S(x,y){var -A=x.map(function(_){return _[0]}),m=u(function(){var -_=arguments[arguments.length-1];return -A.forEach(function(R,I){_.indexOf(R)>-1&&(y=x[I][1](y,R()))}),y},A);return - m(y),m}function b(){var -x=arguments[0],y=Array.prototype.slice.call(arguments,1);return -h(y).map(function(A){return x.apply(void 0,A)})}function g(x){return -x._state==="pending"||x._state==="active"||x._state==="changing"}o.exports=l})()})(Va);var - Xo=Va.exports;const -es=document.getElementsByTagName("script"),Yo=es[es.length-1],kh=jn("flems.html",Yo?Yo.src:"")&&Yo.src;function - Sh(o,a,l){a=$a(a);const -h={id:Ch(),dom:o,state:a,selected:Xo(Gn(a,a.selected)),iOS:"overflowScrolling"in - -le,runtimeUrl:l||kh||"flems.html",console:{input:"",inputNumber:0,output:[],history:[],position:0,manualScroll:!1,lineHeight:22,errors:()=>h.console.output.filter(p=>p.type==="error").length,infos:()=>h.console.output.filter(p=>p.type!=="error").length,inputHeight:()=>Math.min(h.console.lineHeight*h.console.input.split(` -`).length,h.console.lineHeight*5)},cmHeight:null,iframe:null,loading:!0,resizing:!1,hideError:!0,dragging:!1,refreshCm:Xo(),focus:Xo(),vertical:()=>o.offsetWidth*1.25h.state.toolbar?40:0};return - h}function -Ch(){return("000"+(Math.random()*46656|0).toString(36)).slice(-3)+("000"+(Math.random()*46656|0).toString(36)).slice(-3)}var - Lh={},Th=Object.freeze({__proto__:null,default:Lh}),Mh=ec(Th),Qo=typeof - -Map=="function"&&Map.prototype,$o=Object.getOwnPropertyDescriptor&&Qo?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Hi=Qo&&$o&&typeof - -$o.get=="function"?$o.get:null,Ah=Qo&&Map.prototype.forEach,Zo=typeof - -Set=="function"&&Set.prototype,Jo=Object.getOwnPropertyDescriptor&&Zo?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Wi=Zo&&Jo&&typeof - -Jo.get=="function"?Jo.get:null,Oh=Zo&&Set.prototype.forEach,_h=Boolean.prototype.valueOf,Eh=Object.prototype.toString,Nh=typeof - -BigInt=="function"?BigInt.prototype.valueOf:null,Vo=Mh.custom,el=Vo&&ns(Vo)?Vo:null,Ph=function - -o(a,l,u,h){if(l||(l={}),tl(l,"quoteStyle")&&l.quoteStyle!=="single"&&l.quoteStyle!=="double")throw - new TypeError('option "quoteStyle" must be "single" or -"double"');if(typeof -a=="undefined")return"undefined";if(a===null)return"null";if(typeof -a=="boolean")return a?"true":"false";if(typeof a=="string")return -Yh(a,l);if(typeof a=="number")return -a===0?1/0/a>0?"0":"-0":String(a);if(typeof a=="bigint")return -String(a)+"n";var p=typeof l.depth=="undefined"?5:l.depth;if(typeof -u=="undefined"&&(u=0),u>=p&&p>0&&typeof -a=="object")return"[Object]";if(typeof h=="undefined")h=[];else -if(Gh(h,a)>=0)return"[Circular]";function S(R,I){return -I&&(h=h.slice(),h.push(I)),o(R,l,u+1,h)}if(typeof -a=="function"){var b=Kh(a);return"[Function"+(b?": -"+b:"")+"]"}if(ns(a)){var g=Symbol.prototype.toString.call(a);return -typeof a=="object"?Xn(g):g}if(Xh(a)){for(var -x="<"+String(a.nodeName).toLowerCase(),y=a.attributes||[],A=0;A",x}if(rs(a))return - a.length===0?"[]":"[ "+rl(a,S).join(", ")+" ]";if(Rh(a)){var -m=rl(a,S);return m.length===0?"["+String(a)+"]":"{ ["+String(a)+"] -"+m.join(", ")+" }"}if(typeof a=="object"){if(el&&typeof -a[el]=="function")return a[el]();if(typeof a.inspect=="function")return -a.inspect()}if(jh(a)){var m=[];return -Ah.call(a,function(I,W){m.push(S(W,a)+" => -"+S(I,a))}),is("Map",Hi.call(a),m)}if(qh(a)){var m=[];return -Oh.call(a,function(I){m.push(S(I,a))}),is("Set",Wi.call(a),m)}if(Bh(a))return - Xn(S(Number(a)));if(Hh(a))return Xn(S(Nh.call(a)));if(Wh(a))return -Xn(_h.call(a));if(Fh(a))return -Xn(S(String(a)));if(!Dh(a)&&!Ih(a)){var _=rl(a,S);return -_.length===0?"{}":"{ "+_.join(", ")+" }"}return String(a)};function -ts(o,a,l){var u=(l.quoteStyle||a)==="double"?'"':"'";return -u+o+u}function zh(o){return String(o).replace(/"/g,""")}function -rs(o){return Lr(o)==="[object Array]"}function Dh(o){return -Lr(o)==="[object Date]"}function Ih(o){return Lr(o)==="[object -RegExp]"}function Rh(o){return Lr(o)==="[object Error]"}function -ns(o){return Lr(o)==="[object Symbol]"}function Fh(o){return -Lr(o)==="[object String]"}function Bh(o){return Lr(o)==="[object -Number]"}function Hh(o){return Lr(o)==="[object BigInt]"}function -Wh(o){return Lr(o)==="[object Boolean]"}var -Uh=Object.prototype.hasOwnProperty||function(o){return o in -this};function tl(o,a){return Uh.call(o,a)}function Lr(o){return -Eh.call(o)}function Kh(o){if(o.name)return o.name;var -a=String(o).match(/^function\s*([\w$]+)/);if(a)return a[1]}function -Gh(o,a){if(o.indexOf)return o.indexOf(a);for(var l=0,u=o.length;la.length?o:a,S=o.length>a.length?a:o,b=p.indexOf(S);if(b!==-1)return - -h=[[ht,p.substring(0,b)],[Ue,S],[ht,p.substring(b+S.length)]],o.length>a.length&&(h[0][0]=h[2][0]=at),h;if(S.length===1)return[[at,o],[ht,a]];const - g=ad(o,a);if(g){const -x=g[0],y=g[1],A=g[2],m=g[3],_=g[4],R=Dr(x,A,l,u),I=Dr(y,m,l,u);return -R.concat([[Ue,_]],I)}return -l&&o.length>100&&a.length>100?nd(o,a,u):id(o,a,u)}function - nd(o,a,l){const u=od(o,a);o=u.chars1,a=u.chars2;const -h=u.lineArray,p=Dr(o,a,!1,l);ld(p,h),cs(p),p.push([Ue,""]);let -S=0,b=0,g=0,x="",y="";for(;S=1&&g>=1){p.splice(S-b-g,b+g),S=S-b-g;const - A=Dr(x,y,!1,l);for(let -m=A.length-1;m>=0;m--)p.splice(S,0,A[m]);S=S+A.length}g=0,b=0,x="",y=""}S++}return - p.pop(),p}function id(o,a,l){const -u=o.length,h=a.length,p=Math.ceil((u+h)/2),S=p,b=2*p,g=new -Array(b),x=new Array(b);for(let W=0;Wl);W++){for(let N=-W+m;N<=W-_;N+=2){const T=S+N;let E;N===-W||N!==W&&g[T-1]u)_+=2;else if(c>h)m+=2;else if(A){const w=S+y-N;if(w>=0&&w=k)return us(o,a,E,c,l)}}}for(let N=-W+R;N<=W-I;N+=2){const T=S+N;let E;N===-W||N!==W&&x[T-1]u)I+=2;else if(c>h)R+=2;else if(!A){const w=S+y-N;if(w>=0&&w=E)return - us(o,a,k,O,l)}}}}return[[at,o],[ht,a]]}function us(o,a,l,u,h){const -p=o.substring(0,l),S=a.substring(0,u),b=o.substring(l),g=a.substring(u),x=Dr(p,S,!1,h),y=Dr(b,g,!1,h);return - x.concat(y)}function od(o,a){const l=[],u={};l[0]="";function h(b){let -g="",x=0,y=-1,A=l.length;for(;yu?o=o.substring(l-u):la.length?o:a,u=o.length>a.length?a:o;if(l.length<4||u.length*2=_.length?[E,c,w,k,T]:null}const - p=h(l,u,Math.ceil(l.length/4)),S=h(l,u,Math.ceil(l.length/2));let -b;if(!p&&!S)return -null;S?p?b=p[4].length>S[4].length?p:S:b=S:b=p;let -g,x,y,A;o.length>a.length?(g=b[0],x=b[1],y=b[2],A=b[3]):(y=b[0],A=b[1],g=b[2],x=b[3]);const - m=b[4];return[g,x,y,A,m]}function cs(o){let a=!1;const l=[];let -u=0,h=null,p=0,S=0,b=0,g=0,x=0;for(;p0?l[u-1]:-1,S=0,b=0,g=0,x=0,h=null,a=!0)),p++;for(a&&Ki(o),hs(o),p=1;p=_?(m>=y.length/2||m>=A.length/2)&&(o.splice(p,0,[Ue,A.substring(0,m)]),o[p-1][1]=y.substring(0,y.length-m),o[p+1][1]=A.substring(m),p++):(_>=y.length/2||_>=A.length/2)&&(o.splice(p,0,[Ue,y.substring(0,_)]),o[p-1][0]=ht,o[p-1][1]=A.substring(0,A.length-_),o[p+1][0]=at,o[p+1][1]=y.substring(_),p++),p++}p++}}function - hs(o){function a(u,h){if(!u||!h)return 6;const -p=u.charAt(u.length-1),S=h.charAt(0),b=p.match(ls),g=S.match(ls),x=b&&p.match(as),y=g&&S.match(as),A=x&&p.match(ss),m=y&&S.match(ss),_=A&&u.match(ed),R=m&&h.match(td);return - _||R?5:A||m?4:b&&!x&&y?3:x||y?2:b||g?1:0}let l=1;for(;l=y&&(y=A,b=u,g=h,x=p)}o[l-1][1]!==b&&(b?o[l-1][1]=b:(o.splice(l-1,1),l--),o[l][1]=g,x?o[l+1][1]=x:(o.splice(l+1,1),l--))}l++}}function - sd(o){let a=!1;const l=[];let u=0,h=null,p=0,S=!1,b=!1,g=!1,x=!1;for(;p0?l[u-1]:-1,g=x=!1),a=!0)),p++;a&&Ki(o)}function Ki(o){o.push([Ue,""]);let a=0,l=0,u=0,h="",p="",S;for(;a1?(l!==0&&u!==0&&(S=nl(p,h),S!==0&&(a-l-u>0&&o[a-l-u-1][0]===Ue?o[a-l-u-1][1]+=p.substring(0,S):(o.splice(0,0,[Ue,p.substring(0,S)]),a++),p=p.substring(S),h=h.substring(S)),S=Ui(p,h),S!==0&&(o[a][1]=p.substring(p.length-S)+o[a][1],p=p.substring(0,p.length-S),h=h.substring(0,h.length-S))),l===0?o.splice(a-u,l+u,[ht,p]):u===0?o.splice(a-l,l+u,[at,h]):o.splice(a-l-u,l+u,[at,h],[ht,p]),a=a-l-u+(l?1:0)+(u?1:0)+1):a!==0&&o[a-1][0]===Ue?(o[a-1][1]+=o[a][1],o.splice(a,1)):a++,u=0,l=0,h="",p="");o[o.length-1][1]===""&&o.pop();let - b=!1;for(a=1;aTr)throw - new Error("Pattern too long for this browser.");const u=ud(a);function -h(m,_){const R=m/a.length,I=Math.abs(l-_);return R+I/Vh}let -p=Jh,S=o.indexOf(a,l);S!==-1&&(p=Math.min(h(0,S),p),S=o.lastIndexOf(a,l+a.length),S!==-1&&(p=Math.min(h(0,S),p)));const - b=1<=_;W--){const - -N=u[o.charAt(W-1)];if(m===0?I[W]=(I[W+1]<<1|1)&N:I[W]=(I[W+1]<<1|1)&N|((A[W+1]|A[W])<<1|1)|A[W+1],I[W]&b){const - T=h(m,W-1);if(T<=p)if(p=T,S=W-1,S>l)_=Math.max(1,2*l-S);else -break}}if(h(m+1,l)>p)break;A=I}return S}function -gs(o,a){if(a.length===0)return;let -l=a.substring(o.start2,o.start2+o.length1),u=0;for(;a.indexOf(l)!==a.lastIndexOf(l)&&l.length2&&(cs(h),sd(h)));const p=[];let S=Gi(),b=0,g=0,x=0,y=u,A=u;for(let m=0;m=2*ir&&b&&(gs(S,y),p.push(S),S=Gi(),b=0,y=A,g=x)),_!==ht&&(g+=R.length),_!==at&&(x+=R.length)}return - b&&(gs(S,y),p.push(S)),md(p)}function hd(o){const a=[];for(let -l=0;lTr?(g=il(o,b.substring(0,Tr),S),g!==-1&&(x=il(o,b.substring(b.length-Tr),S+b.length-Tr),(x===-1||g>=x)&&(g=-1))):g=il(o,b,S),g===-1)h[p]=!1,u-=a[p].length2-a[p].length1;else{h[p]=!0,u=g-S;let - -y;if(x===-1?y=o.substring(g,g+b.length):y=o.substring(g,x+Tr),b===y)o=o.substring(0,g)+ps(a[p].diffs)+o.substring(g+b.length);else{const - A=Dr(b,y,!1,void -0);if(b.length>Tr&&dd(A)/b.length>Zh)h[p]=!1;else{hs(A);let - m=0,_;for(let R=0;Ra));S++)h=l,p=u;return - o.length!==S&&o[S][0]===at?p:p+(a-h)}function gd(o){const -a=ir;let l="";for(let p=1;p<=a;p++)l+=String.fromCharCode(p);for(let -p=0;ph[0][1].length){const - -p=a-h[0][1].length;h[0][1]=l.substring(h[0][1].length)+h[0][1],u.start1-=p,u.start2-=p,u.length1+=p,u.length2+=p}if(u=o[o.length-1],h=u.diffs,h.length===0||h[h.length-1][0]!==Ue)h.push([Ue,l]),u.length1+=a,u.length2+=a;else - if(a>h[h.length-1][1].length){const -p=a-h[h.length-1][1].length;h[h.length-1][1]+=l.substring(0,p),u.length1+=p,u.length2+=p}return - l}function vd(o){const a=Tr;for(let l=0;l2*a?(b.length1+=A.length,h+=A.length,g=!1,b.diffs.push([y,A]),u.diffs.shift()):(A=A.substring(0,a-b.length1-ir),b.length1+=A.length,h+=A.length,y===Ue?(b.length2+=A.length,p+=A.length):g=!1,b.diffs.push([y,A]),A===u.diffs[0][1]?u.diffs.shift():u.diffs[0][1]=u.diffs[0][1].substring(A.length))}S=ps(b.diffs),S=S.substring(S.length-ir);const - -x=ds(u.diffs).substring(0,ir);x!==""&&(b.length1+=x.length,b.length2+=x.length,b.diffs.length!==0&&b.diffs[b.diffs.length-1][0]===Ue?b.diffs[b.diffs.length-1][1]+=x:b.diffs.push([Ue,x])),g||o.splice(++l,0,b)}}}function - -Gi(){return{diffs:[],start1:null,start2:null,length1:0,length2:0}}function - md(o){return -o.length?o.map(a=>a.diffs.concat([a.length1,a.length2,a.start1,a.start2])):void - 0}function yd(o){return -o.map(a=>({diffs:Array.isArray(a[0])?a.slice(0,-4):[[0,a[1]],[a[0],a[2]],[0,a[3]]],length1:a[a.length-4],length2:a[a.length-3],start1:a[a.length-2],start2:a[a.length-1]}))}var - -ji={},ol={},qi={},ll={},ms="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ll.encode=function(o){if(0<=o&&o>1;return - a?-l:l}qi.encode=function(a){var l="",u,h=bd(a);do -u=h&ws,h>>>=al,h>0&&(u|=xs),l+=ys.encode(u);while(h>0);return - l},qi.decode=function(a,l,u){var -h=a.length,p=0,S=0,b,g;do{if(l>=h)throw new Error("Expected more -digits in base 64 VLQ -value.");if(g=ys.decode(a.charCodeAt(l++)),g===-1)throw new -Error("Invalid base64 digit: -"+a.charAt(l-1));b=!!(g&xs),g&=ws,p=p+(g<=0;U--)j=L[U],j==="."?L.splice(U,1):j===".."?B++:B>0&&(j===""?(L.splice(U+1,B),B=0):(L.splice(U,2),B--));return - -w=L.join("/"),w===""&&(w=O?"/":"."),k?(k.path=w,p(k)):w}o.normalize=S;function - b(c,w){c===""&&(c="."),w===""&&(w=".");var -k=h(w),O=h(c);if(O&&(c=O.path||"/"),k&&!k.scheme)return -O&&(k.scheme=O.scheme),p(k);if(k||w.match(u))return -w;if(O&&!O.host&&!O.path)return O.host=w,p(O);var -L=w.charAt(0)==="/"?w:S(c.replace(/\/+$/,"")+"/"+w);return -O?(O.path=L,p(O)):L}o.join=b,o.isAbsolute=function(c){return -c.charAt(0)==="/"||l.test(c)};function -g(c,w){c===""&&(c="."),c=c.replace(/\/$/,"");for(var -k=0;w.indexOf(c+"/")!==0;){var -O=c.lastIndexOf("/");if(O<0||(c=c.slice(0,O),c.match(/^([^\/]+:\/)?\/*$/)))return - w;++k}return -Array(k+1).join("../")+w.substr(c.length+1)}o.relative=g;var -x=function(){var c=Object.create(null);return!("__proto__"in -c)}();function y(c){return c}function A(c){return -_(c)?"$"+c:c}o.toSetString=x?y:A;function m(c){return -_(c)?c.slice(1):c}o.fromSetString=x?y:m;function _(c){if(!c)return!1;var - -w=c.length;if(w<9||c.charCodeAt(w-1)!==95||c.charCodeAt(w-2)!==95||c.charCodeAt(w-3)!==111||c.charCodeAt(w-4)!==116||c.charCodeAt(w-5)!==111||c.charCodeAt(w-6)!==114||c.charCodeAt(w-7)!==112||c.charCodeAt(w-8)!==95||c.charCodeAt(w-9)!==95)return!1;for(var - k=w-10;k>=0;k--)if(c.charCodeAt(k)!==36)return!1;return!0}function -R(c,w,k){var O=W(c.source,w.source);return -O!==0||(O=c.originalLine-w.originalLine,O!==0)||(O=c.originalColumn-w.originalColumn,O!==0||k)||(O=c.generatedColumn-w.generatedColumn,O!==0)||(O=c.generatedLine-w.generatedLine,O!==0)?O:W(c.name,w.name)}o.compareByOriginalPositions=R;function - I(c,w,k){var O=c.generatedLine-w.generatedLine;return -O!==0||(O=c.generatedColumn-w.generatedColumn,O!==0||k)||(O=W(c.source,w.source),O!==0)||(O=c.originalLine-w.originalLine,O!==0)||(O=c.originalColumn-w.originalColumn,O!==0)?O:W(c.name,w.name)}o.compareByGeneratedPositionsDeflated=I;function - W(c,w){return c===w?0:c===null?1:w===null?-1:c>w?1:-1}function -N(c,w){var k=c.generatedLine-w.generatedLine;return -k!==0||(k=c.generatedColumn-w.generatedColumn,k!==0)||(k=W(c.source,w.source),k!==0)||(k=c.originalLine-w.originalLine,k!==0)||(k=c.originalColumn-w.originalColumn,k!==0)?k:W(c.name,w.name)}o.compareByGeneratedPositionsInflated=N;function - T(c){return -JSON.parse(c.replace(/^\)]}'[^\n]*\n/,""))}o.parseSourceMapInput=T;function - -E(c,w,k){if(w=w||"",c&&(c[c.length-1]!=="/"&&w[0]!=="/"&&(c+="/"),w=c+w),k){var - O=h(k);if(!O)throw new Error("sourceMapURL could not be -parsed");if(O.path){var -L=O.path.lastIndexOf("/");L>=0&&(O.path=O.path.substring(0,L+1))}w=b(p(O),w)}return - S(w)}o.computeSourceURL=E})(gn);var -sl={},ul=gn,fl=Object.prototype.hasOwnProperty,$r=typeof -Map!="undefined";function Mr(){this._array=[],this._set=$r?new -Map:Object.create(null)}Mr.fromArray=function(a,l){for(var u=new -Mr,h=0,p=a.length;h=0)return - l}else{var u=ul.toSetString(a);if(fl.call(this._set,u))return -this._set[u]}throw new Error('"'+a+'" is not in the -set.')},Mr.prototype.at=function(a){if(a>=0&&al||u==l&&p>=h||Ss.compareByGeneratedPositionsInflated(o,a)<=0}function - -Xi(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Xi.prototype.unsortedForEach=function(a,l){this._array.forEach(a,l)},Xi.prototype.add=function(a){xd(this._last,a)?(this._last=a,this._array.push(a)):(this._sorted=!1,this._array.push(a))},Xi.prototype.toArray=function(){return - -this._sorted||(this._array.sort(Ss.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},ks.MappingList=Xi;var - Yn=qi,mt=gn,Yi=sl.ArraySet,kd=ks.MappingList;function -er(o){o||(o={}),this._file=mt.getArg(o,"file",null),this._sourceRoot=mt.getArg(o,"sourceRoot",null),this._skipValidation=mt.getArg(o,"skipValidation",!1),this._sources=new - Yi,this._names=new Yi,this._mappings=new -kd,this._sourcesContents=null}er.prototype._version=3,er.fromSourceMap=function(a){var - l=a.sourceRoot,u=new er({file:a.file,sourceRoot:l});return -a.eachMapping(function(h){var -p={generated:{line:h.generatedLine,column:h.generatedColumn}};h.source!=null&&(p.source=h.source,l!=null&&(p.source=mt.relative(l,p.source)),p.original={line:h.originalLine,column:h.originalColumn},h.name!=null&&(p.name=h.name)),u.addMapping(p)}),a.sources.forEach(function(h){var - -p=h;l!==null&&(p=mt.relative(l,h)),u._sources.has(p)||u._sources.add(p);var - -S=a.sourceContentFor(h);S!=null&&u.setSourceContent(h,S)}),u},er.prototype.addMapping=function(a){var - -l=mt.getArg(a,"generated"),u=mt.getArg(a,"original",null),h=mt.getArg(a,"source",null),p=mt.getArg(a,"name",null);this._skipValidation||this._validateMapping(l,u,h,p),h!=null&&(h=String(h),this._sources.has(h)||this._sources.add(h)),p!=null&&(p=String(p),this._names.has(p)||this._names.add(p)),this._mappings.add({generatedLine:l.line,generatedColumn:l.column,originalLine:u!=null&&u.line,originalColumn:u!=null&&u.column,source:h,name:p})},er.prototype.setSourceContent=function(a,l){var - -u=a;this._sourceRoot!=null&&(u=mt.relative(this._sourceRoot,u)),l!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[mt.toSetString(u)]=l):this._sourcesContents&&(delete - -this._sourcesContents[mt.toSetString(u)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},er.prototype.applySourceMap=function(a,l,u){var - h=l;if(l==null){if(a.file==null)throw new -Error(`SourceMapGenerator.prototype.applySourceMap requires either an -explicit source file, or the source map's "file" property. Both were -omitted.`);h=a.file}var -p=this._sourceRoot;p!=null&&(h=mt.relative(p,h));var S=new -Yi,b=new -Yi;this._mappings.unsortedForEach(function(g){if(g.source===h&&g.originalLine!=null){var - -x=a.originalPositionFor({line:g.originalLine,column:g.originalColumn});x.source!=null&&(g.source=x.source,u!=null&&(g.source=mt.join(u,g.source)),p!=null&&(g.source=mt.relative(p,g.source)),g.originalLine=x.line,g.originalColumn=x.column,x.name!=null&&(g.name=x.name))}var - y=g.source;y!=null&&!S.has(y)&&S.add(y);var -A=g.name;A!=null&&!b.has(A)&&b.add(A)},this),this._sources=S,this._names=b,a.sources.forEach(function(g){var - -x=a.sourceContentFor(g);x!=null&&(u!=null&&(g=mt.join(u,g)),p!=null&&(g=mt.relative(p,g)),this.setSourceContent(g,x))},this)},er.prototype._validateMapping=function(a,l,u,h){if(l&&typeof - l.line!="number"&&typeof l.column!="number")throw new -Error("original.line and original.column are not numbers -- you probably - meant to omit the original mapping entirely and only map the generated -position. If so, pass null for the original mapping instead of an object - with empty or null values.");if(!(a&&"line"in -a&&"column"in -a&&a.line>0&&a.column>=0&&!l&&!u&&!h)){if(a&&"line"in - a&&"column"in a&&l&&"line"in -l&&"column"in -l&&a.line>0&&a.column>=0&&l.line>0&&l.column>=0&&u)return;throw - new Error("Invalid mapping: -"+JSON.stringify({generated:a,source:u,original:l,name:h}))}},er.prototype._serializeMappings=function(){for(var - -a=0,l=1,u=0,h=0,p=0,S=0,b="",g,x,y,A,m=this._mappings.toArray(),_=0,R=m.length;_0){if(!mt.compareByGeneratedPositionsInflated(x,m[_-1]))continue;g+=","}g+=Yn.encode(x.generatedColumn-a),a=x.generatedColumn,x.source!=null&&(A=this._sources.indexOf(x.source),g+=Yn.encode(A-S),S=A,g+=Yn.encode(x.originalLine-1-h),h=x.originalLine-1,g+=Yn.encode(x.originalColumn-u),u=x.originalColumn,x.name!=null&&(y=this._names.indexOf(x.name),g+=Yn.encode(y-p),p=y)),b+=g}return - b},er.prototype._generateSourcesContent=function(a,l){return -a.map(function(u){if(!this._sourcesContents)return -null;l!=null&&(u=mt.relative(l,u));var -h=mt.toSetString(u);return -Object.prototype.hasOwnProperty.call(this._sourcesContents,h)?this._sourcesContents[h]:null},this)},er.prototype.toJSON=function(){var - -a={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return - -this._file!=null&&(a.file=this._file),this._sourceRoot!=null&&(a.sourceRoot=this._sourceRoot),this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,a.sourceRoot)),a},er.prototype.toString=function(){return - JSON.stringify(this.toJSON())},ol.SourceMapGenerator=er;var -Qi={},Cs={};(function(o){o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2;function - a(l,u,h,p,S,b){var g=Math.floor((u-l)/2)+l,x=S(h,p[g],!0);return -x===0?g:x>0?u-g>1?a(g,u,h,p,S,b):b==o.LEAST_UPPER_BOUND?u1?a(l,g,h,p,S,b):b==o.LEAST_UPPER_BOUND?g:l<0?-1:l}o.search=function(u,h,p,S){if(h.length===0)return-1;var - -b=a(-1,h.length,u,h,p,S||o.GREATEST_LOWER_BOUND);if(b<0)return-1;for(;b-1>=0&&p(h[b],h[b-1],!0)===0;)--b;return - b}})(Cs);var Ls={};function cl(o,a,l){var -u=o[a];o[a]=o[l],o[l]=u}function Sd(o,a){return -Math.round(o+Math.random()*(a-o))}function hl(o,a,l,u){if(l=0){var - S=this._originalMappings[p];if(a.column===void 0)for(var -b=S.originalLine;S&&S.originalLine===b;)h.push({line:ke.getArg(S,"generatedLine",null),column:ke.getArg(S,"generatedColumn",null),lastColumn:ke.getArg(S,"lastGeneratedColumn",null)}),S=this._originalMappings[++p];else - for(var -g=S.originalColumn;S&&S.originalLine===l&&S.originalColumn==g;)h.push({line:ke.getArg(S,"generatedLine",null),column:ke.getArg(S,"generatedColumn",null),lastColumn:ke.getArg(S,"lastGeneratedColumn",null)}),S=this._originalMappings[++p]}return - h},Qi.SourceMapConsumer=tt;function Mt(o,a){var l=o;typeof -o=="string"&&(l=ke.parseSourceMapInput(o));var -u=ke.getArg(l,"version"),h=ke.getArg(l,"sources"),p=ke.getArg(l,"names",[]),S=ke.getArg(l,"sourceRoot",null),b=ke.getArg(l,"sourcesContent",null),g=ke.getArg(l,"mappings"),x=ke.getArg(l,"file",null);if(u!=this._version)throw - new Error("Unsupported version: -"+u);S&&(S=ke.normalize(S)),h=h.map(String).map(ke.normalize).map(function(y){return - -S&&ke.isAbsolute(S)&&ke.isAbsolute(y)?ke.relative(S,y):y}),this._names=vn.fromArray(p.map(String),!0),this._sources=vn.fromArray(h,!0),this._absoluteSources=this._sources.toArray().map(function(y){return - -ke.computeSourceURL(S,y,a)}),this.sourceRoot=S,this.sourcesContent=b,this._mappings=g,this._sourceMapURL=a,this.file=x}Mt.prototype=Object.create(tt.prototype),Mt.prototype.consumer=tt,Mt.prototype._findSourceIndex=function(o){var - -a=o;if(this.sourceRoot!=null&&(a=ke.relative(this.sourceRoot,a)),this._sources.has(a))return - this._sources.indexOf(a);var l;for(l=0;l1&&(I.source=b+N[1],b+=N[1],I.originalLine=p+N[2],p=I.originalLine,I.originalLine+=1,I.originalColumn=S+N[3],S=I.originalColumn,N.length>4&&(I.name=g+N[4],g+=N[4])),R.push(I),typeof - -I.originalLine=="number"&&_.push(I)}Qn(R,ke.compareByGeneratedPositionsDeflated),this.__generatedMappings=R,Qn(_,ke.compareByOriginalPositions),this.__originalMappings=_},Mt.prototype._findMapping=function(a,l,u,h,p,S){if(a[u]<=0)throw - new TypeError("Line must be greater than or equal to 1, got -"+a[u]);if(a[h]<0)throw new TypeError("Column must be greater than or - equal to 0, got "+a[h]);return -dl.search(a,l,p,S)},Mt.prototype.computeColumnSpans=function(){for(var -a=0;a=0){var - h=this._generatedMappings[u];if(h.generatedLine===l.generatedLine){var -p=ke.getArg(h,"source",null);p!==null&&(p=this._sources.at(p),p=ke.computeSourceURL(this.sourceRoot,p,this._sourceMapURL));var - S=ke.getArg(h,"name",null);return -S!==null&&(S=this._names.at(S)),{source:p,line:ke.getArg(h,"originalLine",null),column:ke.getArg(h,"originalColumn",null),name:S}}}return{source:null,line:null,column:null,name:null}},Mt.prototype.hasContentsOfAllSources=function(){return - -this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(a){return - -a==null}):!1},Mt.prototype.sourceContentFor=function(a,l){if(!this.sourcesContent)return - null;var u=this._findSourceIndex(a);if(u>=0)return -this.sourcesContent[u];var -h=a;this.sourceRoot!=null&&(h=ke.relative(this.sourceRoot,h));var - -p;if(this.sourceRoot!=null&&(p=ke.urlParse(this.sourceRoot))){var - -S=h.replace(/^file:\/\//,"");if(p.scheme=="file"&&this._sources.has(S))return - -this.sourcesContent[this._sources.indexOf(S)];if((!p.path||p.path=="/")&&this._sources.has("/"+h))return - this.sourcesContent[this._sources.indexOf("/"+h)]}if(l)return -null;throw new Error('"'+h+'" is not in the -SourceMap.')},Mt.prototype.generatedPositionFor=function(a){var -l=ke.getArg(a,"source");if(l=this._findSourceIndex(l),l<0)return{line:null,column:null,lastColumn:null};var - -u={source:l,originalLine:ke.getArg(a,"line"),originalColumn:ke.getArg(a,"column")},h=this._findMapping(u,this._originalMappings,"originalLine","originalColumn",ke.compareByOriginalPositions,ke.getArg(a,"bias",tt.GREATEST_LOWER_BOUND));if(h>=0){var - -p=this._originalMappings[h];if(p.source===u.source)return{line:ke.getArg(p,"generatedLine",null),column:ke.getArg(p,"generatedColumn",null),lastColumn:ke.getArg(p,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},Qi.BasicSourceMapConsumer=Mt;function - or(o,a){var l=o;typeof -o=="string"&&(l=ke.parseSourceMapInput(o));var -u=ke.getArg(l,"version"),h=ke.getArg(l,"sections");if(u!=this._version)throw - new Error("Unsupported version: "+u);this._sources=new -vn,this._names=new vn;var -p={line:-1,column:0};this._sections=h.map(function(S){if(S.url)throw new - Error("Support for url field in sections not implemented.");var -b=ke.getArg(S,"offset"),g=ke.getArg(b,"line"),x=ke.getArg(b,"column");if(g=0;l--)this.prepend(a[l]);else - if(a[mn]||typeof a=="string")this.children.unshift(a);else throw new -TypeError("Expected a SourceNode, string, or an array of SourceNodes and - strings. Got "+a);return this},Yt.prototype.walk=function(a){for(var -l,u=0,h=this.children.length;u0){for(l=[],u=0;uS.onchange(o.state),p=V=>pe=>(V(pe),h());o.selected.map(V=>o.state.selected=V.url||V.name);const - -S={onchange:()=>{},setMiddle:V=>o.state.middle=V,toggleConsole:p(V=>o.state.console=o.state.console===!0?"collapsed":!0),resetSize:p(()=>S.setMiddle(50)),loaded:()=>{o.loading=!1,o.console.clearOnNext&&(o.console.output=[],o.console.clearOnNext=!1),typeof - -S.onloaded=="function"&&S.onloaded(o.state)},fileSelectionChange:z,selectFileByIndex:L,toggleAutoReload:I,onConsoleKeyDown:T,onConsoleInput:N,consoleOutput:Q,startDragging:_,stopDragging:R,changeMiddle:te,setShareUrl:m,clearErrors:x,clearLogs:y,fileChange:X,initIframe:j,setState:A,resizing:ue,refresh:de,getLink:k,select:O,scroll:W};return - b(),S;function -b(){Promise.all(o.state.links.map(k)).then(()=>de({force:!0}))}function - g(){o.console.output=[{content:[Le("i","Console was -cleared")]}]}function -x(){o.console.output=o.console.output.filter(V=>V.type!=="error")}function - -y(){o.console.output=o.console.output.filter(V=>V.type==="error")}function - -A(V){o.state=$a(V),O(Gn(o.state,o.state.selected),!0),D(),Le.redraw()}function - -m({dom:V}){V.addEventListener("mousedown",pe=>{V.href=Za(o.state)},!0)}function - _(){o.dragging=!0}function -R(){o.dragging=!1,o.refreshCm(!0),h()}function -I(){o.state.autoReload=!o.state.autoReload,h(),o.state.autoReload&&de()}function - W(V){o.state.scroll=V,h()}function -N(V){o.console.input=V.target.value}function -T(V){if((V.key==="Enter"||V.keyCode===13)&&!V.shiftKey&&!V.altKey)return - V.preventDefault(),o.console.output.push({type:"input",content:["> -"+o.console.input],number:"i"+o.console.inputNumber++}),o.console.input.indexOf("console.clear()")===0&&g(),E(),!1;(V.key==="ArrowUp"||V.keyCode===38)&&(o.console.historyNavigated||V.target.selectionStart===0)?(V.preventDefault(),c()):(V.key==="ArrowDown"||V.keyCode===40)&&(o.console.historyNavigated||o.console.input==="")?(V.preventDefault(),w()):o.console.historyNavigated=!1}function - -E(V){!o.console.input||(o.iframe.contentWindow.postMessage({name:"eval",content:o.console.input},"*"),o.console.position=o.console.history.push(o.console.input),o.console.input="")}function - -c(){o.console.historyNavigated=!0,o.console.position>=0&&(o.console.position-=1),o.console.input=o.console.history[o.console.position]||""}function - w(){o.console.historyNavigated=!0,o.console.position{pe=pe.replace(/\r\n/g,` -`),!(pe.length>3e5)&&(V.content=pe,V.patched=V.patches?pd(pe,V.patches)[0]:pe,o.selected()===V&&O(V))}).catch(()=>{})}function - O(V,pe){typeof -V=="string"&&(V=Gn(o.state,V)),o.selected(V),!pe&&h()}function - L(V){const -pe=o.state.files.concat(o.state.links)[V];pe&&O(pe)}function -j(V){o.iframe=V,o.iframe.addEventListener("load",B)}function -B(){o.iframe.contentWindow.postMessage({name:"init",content:{id:o.id,state:{scroll:o.state.scroll,files:u,links:o.state.links.map(V=>({type:V.type,name:V.name,url:V.url,content:V.patched||V.content}))}}},"*")}function - U(V){const -pe=V.compiler==="function"?V.compiler:Qa[V.compiler||Ri(V.name)];return -pe?pe(V).then(Ne=>(Ne.error&&Q(Ne.error),Ne.map&&(V.map=Ne.map),{name:V.name,type:V.type,content:Ne.code})).catch(Ne=>(Q({content:["Error - compiling -"+V.compiler+":",Ph(Ne)],type:"error",stack:[]}),{name:V.name,type:V.type,content:V.content})):{name:V.name,type:V.type,content:V.content}}function - -Q(V){o.console.clearOnNext&&(o.console.output=[],o.console.clearOnNext=!1),V.stack.forEach(pe=>{const - Ne=Gn(o.state,pe.file);if(!Ne||!Ne.map)return;const je=new -ji.SourceMapConsumer(Ne.map).originalPositionFor({line:pe.line,column:pe.column});pe.line=je.line,pe.column=je.column}),V.content&&!Array.isArray(V.content)&&(V.content=[V.content]),o.console.output.push(V)}function - -X(V,pe,Ne){V.url?V.patched=pe:V.content=pe,Ne&&(V.selections=Ne==="0:0"?void - 0:Ne),typeof S.onload=="function"&&S.onload(),D(V),h()}function - D(V){clearTimeout(l),l=setTimeout(()=>{if(!V)return -de();V.url&&(V.patches=cd(V.content,V.patched)),o.state.autoReload&&(V.type==="style"||V.type==="css")?(o.iframe.contentWindow.postMessage({name:"css",content:{name:V.name,url:V.url,content:V.patched||V.content}},"*"),typeof - -S.onloaded=="function"&&S.onloaded(o.state),h()):de()},o.state.autoReloadDelay||400)}function - z(V,pe){pe=pe==="0:0"?void -0:pe,pe!==V.selections&&(V.selections=pe,h())}function -te(V){const{top:pe,left:Ne}=o.dom.getBoundingClientRect();o.state.middle=Math.min(Math.max(Math.round((o.vertical()?(V.clientY-pe+5)/(o.dom.offsetHeight-o.console.dom.offsetHeight):(V.clientX-Ne+5)/o.dom.offsetWidth)*1e4)/100,0),100),Le.redraw()}function - -ue(){o.iOS||(o.resizing=!0,clearTimeout(a),a=setTimeout(()=>{o.resizing=!1,Le.redraw()},1e3))}function - de(V={}){if(!V.force&&!o.state.autoReload)return -o.hasChanges=!0;o.hasChanges=!1,o.loading=!0,o.console.clearOnNext=!0,Promise.all(o.state.files.map(U)).then(Me),Le.redraw()}function - Me(V){if(!o.iframe)return -setTimeout(Me,10,V);Ad&&(o.iframe.src+="?"),u=V,o.iframe.src=o.runtimeUrl}}var - _d={listen:(o,a)=>{const -l={loaded:a.loaded,console:a.consoleOutput,resize:a.resizing,scroll:a.scroll};window.addEventListener("message",({data:u})=>{u.flems!==o.id||!(u.name - in l)||(l[u.name](u.content),Le.redraw())})}};let As=!1;function -Zi(o,a={},l){const u=Sh(o,a,l),h=Od(u);return -As||(window.addEventListener("resize",()=>Le.redraw()),As=!0),_d.listen(u,h),Le.mount(o,{view:()=>bh(u,h)}),{focus:u.focus,reload:()=>h.refresh({force:!0}),onchange:p=>h.onchange=p,onload:p=>h.onload=p,onloaded:p=>h.onloaded=p,getLink:h.getLink,set:h.setState,redraw:Le.redraw}}return - Zi.defaults=Bi,Zi.createFlemsIoLink=Za,Zi.version="1.5.8",Zi}); -//# sourceMappingURL=flems.js.map -// -->normal \ No newline at end of file diff --git a/docs/flems_soubory/commandline.html b/docs/flems_soubory/commandline.html deleted file mode 100644 index 76930b3..0000000 --- a/docs/flems_soubory/commandline.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - Tridactyl commandline - - - - -
-
- - - - \ No newline at end of file diff --git a/docs/flems_soubory/commandline_data/cleanslate.css b/docs/flems_soubory/commandline_data/cleanslate.css deleted file mode 100644 index 6ebefc6..0000000 --- a/docs/flems_soubory/commandline_data/cleanslate.css +++ /dev/null @@ -1,449 +0,0 @@ -/*! -* CleanSlate -* github.com/premasagar/cleanslate -* -*//* - An extreme CSS reset stylesheet, for normalising the styling of a container element and its children. - - by Premasagar Rose - dharmafly.com - - license - opensource.org/licenses/mit-license.php - - ** - - v0.9.3 - -*/ - -/* == BLANKET RESET RULES == */ - -/* HTML 4.01 */ -.cleanslate, .cleanslate h1, .cleanslate h2, .cleanslate h3, .cleanslate h4, .cleanslate h5, .cleanslate h6, .cleanslate p, .cleanslate td, .cleanslate dl, .cleanslate tr, .cleanslate dt, .cleanslate ol, .cleanslate form, .cleanslate select, .cleanslate option, .cleanslate pre, .cleanslate div, .cleanslate table, .cleanslate th, .cleanslate tbody, .cleanslate tfoot, .cleanslate caption, .cleanslate thead, .cleanslate ul, .cleanslate li, .cleanslate address, .cleanslate blockquote, .cleanslate dd, .cleanslate fieldset, .cleanslate li, .cleanslate iframe, .cleanslate strong, .cleanslate legend, .cleanslate em, .cleanslate summary, .cleanslate cite, .cleanslate span, .cleanslate input, .cleanslate sup, .cleanslate label, .cleanslate dfn, .cleanslate object, .cleanslate big, .cleanslate q, .cleanslate samp, .cleanslate acronym, .cleanslate small, .cleanslate img, .cleanslate strike, .cleanslate code, .cleanslate sub, .cleanslate ins, .cleanslate textarea, .cleanslate button, .cleanslate var, .cleanslate a, .cleanslate abbr, .cleanslate applet, .cleanslate del, .cleanslate kbd, .cleanslate tt, .cleanslate b, .cleanslate i, .cleanslate hr, - -/* HTML5 - Sept 2013 taken from MDN https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/HTML5_element_list */ -.cleanslate article, .cleanslate aside, .cleanslate figure, .cleanslate figcaption, .cleanslate footer, .cleanslate header, .cleanslate menu, .cleanslate nav, .cleanslate section, .cleanslate time, .cleanslate mark, .cleanslate audio, .cleanslate video, .cleanslate abbr, .cleanslate address, .cleanslate area, .cleanslate blockquote, .cleanslate canvas, .cleanslate caption, .cleanslate cite, .cleanslate code, .cleanslate colgroup, .cleanslate col, .cleanslate datalist, .cleanslate fieldset, .cleanslate main, .cleanslate map, .cleanslate meta, .cleanslate optgroup, .cleanslate output, .cleanslate progress { - background-attachment:scroll !important; - background-color:transparent !important; - background-image:none !important; /* This rule affects the use of pngfix JavaScript http://dillerdesign.com/experiment/DD_BelatedPNG for IE6, which is used to force the browser to recognise alpha-transparent PNGs files that replace the IE6 lack of PNG transparency. (The rule overrides the VML image that is used to replace the given CSS background-image). If you don't know what that means, then you probably haven't used the pngfix script, and this comment may be ignored :) */ - background-position:0 0 !important; - background-repeat:repeat !important; - border-color:black !important; - border-color:currentColor !important; /* `border-color` should match font color. Modern browsers (incl. IE9) allow the use of "currentColor" to match the current font 'color' value . For older browsers, a default of 'black' is given before this rule. Guideline to support older browsers: if you haven't already declared a border-color for an element, be sure to do so, e.g. when you first declare the border-width. */ - border-radius:0 !important; - border-style:none !important; - border-width:medium !important; - bottom:auto !important; - clear:none !important; - clip:auto !important; - color:inherit !important; - counter-increment:none !important; - counter-reset:none !important; - cursor:auto !important; - direction:inherit !important; - display:inline !important; - float:none !important; - font-family: inherit !important; /* As with other inherit values, this needs to be set on the root container element */ - font-size: inherit !important; - font-style:inherit !important; - font-variant:normal !important; - font-weight:inherit !important; - height:auto !important; - left:auto !important; - letter-spacing:normal !important; - line-height:inherit !important; - list-style-type: inherit !important; /* Could set list-style-type to none */ - list-style-position: outside !important; - list-style-image: none !important; - margin:0 !important; - max-height:none !important; - max-width:none !important; - min-height:0 !important; - min-width:0 !important; - opacity:1; - outline:invert none medium !important; - overflow:visible !important; - padding:0 !important; - position:static !important; - quotes: "" "" !important; - right:auto !important; - table-layout:auto !important; - text-align:inherit !important; - text-decoration:inherit !important; - text-indent:0 !important; - text-transform:none !important; - top:auto !important; - unicode-bidi:normal !important; - vertical-align:baseline !important; - visibility:inherit !important; - white-space:normal !important; - width:auto !important; - word-spacing:normal !important; - z-index:auto !important; - - /* CSS3 */ - /* Including all prefixes according to http://caniuse.com/ */ - /* CSS Animations don't cascade, so don't require resetting */ - -webkit-background-origin: padding-box !important; - background-origin: padding-box !important; - -webkit-background-clip: border-box !important; - background-clip: border-box !important; - -webkit-background-size: auto !important; - -moz-background-size: auto !important; - background-size: auto !important; - -webkit-border-image: none !important; - -moz-border-image: none !important; - -o-border-image: none !important; - border-image: none !important; - -webkit-border-radius:0 !important; - -moz-border-radius:0 !important; - border-radius: 0 !important; - -webkit-box-shadow: none !important; - box-shadow: none !important; - -webkit-box-sizing: content-box !important; - -moz-box-sizing: content-box !important; - box-sizing: content-box !important; - -webkit-column-count: auto !important; - -moz-column-count: auto !important; - column-count: auto !important; - -webkit-column-gap: normal !important; - -moz-column-gap: normal !important; - column-gap: normal !important; - -webkit-column-rule: medium none black !important; - -moz-column-rule: medium none black !important; - column-rule: medium none black !important; - -webkit-column-span: 1 !important; - -moz-column-span: 1 !important; /* doesn't exist yet but probably will */ - column-span: 1 !important; - -webkit-column-width: auto !important; - -moz-column-width: auto !important; - column-width: auto !important; - font-feature-settings: normal !important; - overflow-x: visible !important; - overflow-y: visible !important; - -webkit-hyphens: manual !important; - -moz-hyphens: manual !important; - hyphens: manual !important; - -webkit-perspective: none !important; - -moz-perspective: none !important; - -ms-perspective: none !important; - -o-perspective: none !important; - perspective: none !important; - -webkit-perspective-origin: 50% 50% !important; - -moz-perspective-origin: 50% 50% !important; - -ms-perspective-origin: 50% 50% !important; - -o-perspective-origin: 50% 50% !important; - perspective-origin: 50% 50% !important; - -webkit-backface-visibility: visible !important; - -moz-backface-visibility: visible !important; - -ms-backface-visibility: visible !important; - -o-backface-visibility: visible !important; - backface-visibility: visible !important; - text-shadow: none !important; - -webkit-transition: all 0s ease 0s !important; - transition: all 0s ease 0s !important; - -webkit-transform: none !important; - -moz-transform: none !important; - -ms-transform: none !important; - -o-transform: none !important; - transform: none !important; - -webkit-transform-origin: 50% 50% !important; - -moz-transform-origin: 50% 50% !important; - -ms-transform-origin: 50% 50% !important; - -o-transform-origin: 50% 50% !important; - transform-origin: 50% 50% !important; - -webkit-transform-style: flat !important; - -moz-transform-style: flat !important; - -ms-transform-style: flat !important; - -o-transform-style: flat !important; - transform-style: flat !important; - word-break: normal !important; -} - -/* == BLOCK-LEVEL == */ -/* Actually, some of these should be inline-block and other values, but block works fine (TODO: rigorously verify this) */ -/* HTML 4.01 */ -.cleanslate, .cleanslate h3, .cleanslate h5, .cleanslate p, .cleanslate h1, .cleanslate dl, .cleanslate dt, .cleanslate h6, .cleanslate ol, .cleanslate form, .cleanslate option, .cleanslate pre, .cleanslate div, .cleanslate h2, .cleanslate caption, .cleanslate h4, .cleanslate ul, .cleanslate address, .cleanslate blockquote, .cleanslate dd, .cleanslate fieldset, .cleanslate hr, - -/* HTML5 new elements */ -.cleanslate article, .cleanslate dialog, .cleanslate figure, .cleanslate footer, .cleanslate header, .cleanslate hgroup, .cleanslate menu, .cleanslate nav, .cleanslate section, .cleanslate audio, .cleanslate video, .cleanslate address, .cleanslate blockquote, .cleanslate colgroup, .cleanslate main, .cleanslate progress, .cleanslate summary { - display:block !important; -} -.cleanslate h1, .cleanslate h2, .cleanslate h3, .cleanslate h4, .cleanslate h5, .cleanslate h6 { - font-weight: bold !important; -} -.cleanslate h1 { - font-size: 2em !important; - padding: .67em 0 !important; -} -.cleanslate h2 { - font-size: 1.5em !important; - padding: .83em 0 !important; -} -.cleanslate h3 { - font-size: 1.17em !important; - padding: .83em 0 !important; -} -.cleanslate h4 { - font-size: 1em !important; -} -.cleanslate h5 { - font-size: .83em !important; -} -.cleanslate p { - margin: 1em 0 !important; -} -.cleanslate table { - display: table !important; -} -.cleanslate thead { - display: table-header-group !important; -} -.cleanslate tbody { - display: table-row-group !important; -} -.cleanslate tfoot { - display: table-footer-group !important; -} -.cleanslate tr { - display: table-row !important; -} -.cleanslate th, .cleanslate td { - display: table-cell !important; - padding: 2px !important; -} - -/* == SPECIFIC ELEMENTS == */ -/* Some of these are browser defaults; some are just useful resets */ -.cleanslate ol, .cleanslate ul { - margin: 1em 0 !important; -} -.cleanslate ul li, .cleanslate ul ul li, .cleanslate ul ul ul li, .cleanslate ol li, .cleanslate ol ol li, .cleanslate ol ol ol li, .cleanslate ul ol ol li, .cleanslate ul ul ol li, .cleanslate ol ul ul li, .cleanslate ol ol ul li { - list-style-position: inside !important; - margin-top: .08em !important; -} -.cleanslate ol ol, .cleanslate ol ol ol, .cleanslate ul ul, .cleanslate ul ul ul, .cleanslate ol ul, .cleanslate ol ul ul, .cleanslate ol ol ul, .cleanslate ul ol, .cleanslate ul ol ol, .cleanslate ul ul ol { - padding-left: 40px !important; - margin: 0 !important; -} -/* helper for general navigation */ -.cleanslate nav ul, .cleanslate nav ol { - list-style-type:none !important; - -} -.cleanslate ul, .cleanslate menu { - list-style-type:disc !important; -} -.cleanslate ol { - list-style-type:decimal !important; -} -.cleanslate ol ul, .cleanslate ul ul, .cleanslate menu ul, .cleanslate ol menu, .cleanslate ul menu, .cleanslate menu menu { - list-style-type:circle !important; -} -.cleanslate ol ol ul, .cleanslate ol ul ul, .cleanslate ol menu ul, .cleanslate ol ol menu, .cleanslate ol ul menu, .cleanslate ol menu menu, .cleanslate ul ol ul, .cleanslate ul ul ul, .cleanslate ul menu ul, .cleanslate ul ol menu, .cleanslate ul ul menu, .cleanslate ul menu menu, .cleanslate menu ol ul, .cleanslate menu ul ul, .cleanslate menu menu ul, .cleanslate menu ol menu, .cleanslate menu ul menu, .cleanslate menu menu menu { - list-style-type:square !important; -} -.cleanslate li { - display:list-item !important; - /* Fixes IE7 issue with positioning of nested bullets */ - min-height:auto !important; - min-width:auto !important; - padding-left: 20px !important; /* replace -webkit-padding-start: 40px; */ -} -.cleanslate strong { - font-weight:bold !important; -} -.cleanslate em { - font-style:italic !important; -} -.cleanslate kbd, .cleanslate samp, .cleanslate code { - font-family:monospace !important; -} -.cleanslate a { - color: blue !important; - text-decoration: underline !important;s -} -.cleanslate a:visited { - color: #529 !important; -} -.cleanslate a, .cleanslate a *, .cleanslate input[type=submit], .cleanslate input[type=radio], .cleanslate input[type=checkbox], .cleanslate select { - cursor:pointer !important; -} -.cleanslate button, .cleanslate input[type=submit] { - text-align: center !important; - padding: 2px 6px 3px !important; - border-radius: 4px !important; - text-decoration: none !important; - font-family: arial, helvetica, sans-serif !important; - font-size: small !important; - background: white !important; - -webkit-appearance: push-button !important; - color: buttontext !important; - border: 1px #a6a6a6 solid !important; - background: lightgrey !important; /* Old browsers */ - background: rgb(255,255,255); /* Old browsers */ - background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(221,221,221,1) 100%, rgba(209,209,209,1) 100%, rgba(221,221,221,1) 100%) !important; /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(221,221,221,1)), color-stop(100%,rgba(209,209,209,1)), color-stop(100%,rgba(221,221,221,1))) !important; /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(221,221,221,1) 100%,rgba(209,209,209,1) 100%,rgba(221,221,221,1) 100%) !important; /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(221,221,221,1) 100%,rgba(209,209,209,1) 100%,rgba(221,221,221,1) 100%) !important; /* Opera 11.10+ */ - background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(221,221,221,1) 100%,rgba(209,209,209,1) 100%,rgba(221,221,221,1) 100%) !important; /* IE10+ */ - background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(221,221,221,1) 100%,rgba(209,209,209,1) 100%,rgba(221,221,221,1) 100%) !important; /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#dddddd',GradientType=0 ) !important; /* IE6-9 */ - -webkit-box-shadow: 1px 1px 0px #eee !important; - -moz-box-shadow: 1px 1px 0px #eee !important; - -o-box-shadow: 1px 1px 0px #eee !important; - box-shadow: 1px 1px 0px #eee !important; - outline: initial !important; -} -.cleanslate button { - padding: 1px 6px 2px 6px !important; - margin-right: 5px !important; -} -.cleanslate input[type=hidden] { - display:none !important; -} -/* restore form defaults */ -.cleanslate textarea { - -webkit-appearance: textarea !important; - background: white !important; - padding: 2px !important; - margin-left: 4px !important; - word-wrap: break-word !important; - white-space: pre-wrap !important; - font-size: 11px !important; - font-family: arial, helvetica, sans-serif !important; - line-height: 13px !important; - resize: both !important; -} -.cleanslate select, .cleanslate textarea, .cleanslate input { - border:1px solid #ccc !important; -} -.cleanslate select { - font-size: 11px !important; - font-family: helvetica, arial, sans-serif !important; - display: inline-block; -} -.cleanslate textarea:focus, .cleanslate input:focus { - outline: auto 5px -webkit-focus-ring-color !important; - outline: initial !important; -} -.cleanslate input[type=text] { - background: white !important; - padding: 1px !important; - font-family: initial !important; - font-size: small !important; -} -.cleanslate input[type=checkbox], .cleanslate input[type=radio] { - border: 1px #2b2b2b solid !important; - border-radius: 4px !important; -} -.cleanslate input[type=checkbox], .cleanslate input[type=radio] { - outline: intial !important; -} -.cleanslate input[type=radio] { - margin: 2px 2px 3px 2px !important; -} -.cleanslate input[type=submit]:active, .cleanslate button:active { - background: rgb(59,103,158) !important; /* Old browsers */ - background: -moz-linear-gradient(top, rgba(59,103,158,1) 0%, rgba(43,136,217,1) 50%, rgba(32,124,202,1) 51%, rgba(125,185,232,1) 100%) !important; /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(59,103,158,1)), color-stop(50%,rgba(43,136,217,1)), color-stop(51%,rgba(32,124,202,1)), color-stop(100%,rgba(125,185,232,1))) !important; /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(59,103,158,1) 0%,rgba(43,136,217,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%) !important; /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(59,103,158,1) 0%,rgba(43,136,217,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%) !important; /* Opera 11.10+ */ - background: -ms-linear-gradient(top, rgba(59,103,158,1) 0%,rgba(43,136,217,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%) !important; /* IE10+ */ - background: linear-gradient(to bottom, rgba(59,103,158,1) 0%,rgba(43,136,217,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%) !important; /* W3C */ - border-color: #5259b0 !important; -} -.cleanslate abbr[title], .cleanslate acronym[title], .cleanslate dfn[title] { - cursor:help !important; - border-bottom-width:1px !important; - border-bottom-style:dotted !important; -} -.cleanslate ins { - background-color:#ff9 !important; - color:black !important; -} -.cleanslate del { - text-decoration: line-through !important; -} -.cleanslate blockquote, .cleanslate q { - quotes:none !important; /* HTML5 */ -} -.cleanslate blockquote:before, .cleanslate blockquote:after, .cleanslate q:before, .cleanslate q:after, .cleanslate li:before, .cleanslate li:after { - content:"" !important; -} -.cleanslate input, .cleanslate select { - vertical-align:middle !important; -} - -.cleanslate table { - border-collapse:collapse !important; - border-spacing:0 !important; -} -.cleanslate hr { - display:block !important; - height:1px !important; - border:0 !important; - border-top:1px solid #ccc !important; - margin:1em 0 !important; -} -.cleanslate *[dir=rtl] { - direction: rtl !important; -} -.cleanslate mark { - background-color:#ff9 !important; - color:black !important; - font-style:italic !important; - font-weight:bold !important; -} -.cleanslate menu { - padding-left: 40px !important; - padding-top: 8px !important; -} - -/* additional helpers */ -.cleanslate [hidden], -.cleanslate template { - display: none !important; -} -.cleanslate abbr[title] { - border-bottom: 1px dotted !important; -} -.cleanslate sub, .cleanslate sup { - font-size: 75% !important; - line-height: 0 !important; - position: relative !important; - vertical-align: baseline !important; -} -.cleanslate sup { - top: -0.5em !important; -} -.cleanslate sub { - bottom: -0.25em !important; -} -.cleanslate img { - border: 0 !important; -} -.cleanslate figure { - margin: 0 !important; -} -.cleanslate textarea { - overflow: auto !important; - vertical-align: top !important; -} - -/* == ROOT CONTAINER ELEMENT == */ -/* This contains default values for child elements to inherit */ -.cleanslate { - font-size: medium !important; - line-height: 1 !important; - direction:ltr !important; - text-align: left !important; /* for IE, Opera */ - text-align: start !important; /* recommended W3C Spec */ - font-family: "Times New Roman", Times, serif !important; /* Override this with whatever font-family is required */ - color: black !important; - font-style:normal !important; - font-weight:normal !important; - text-decoration:none !important; - list-style-type:disc !important; -} diff --git a/docs/flems_soubory/commandline_data/commandline.css b/docs/flems_soubory/commandline_data/commandline.css deleted file mode 100644 index 2cc7146..0000000 --- a/docs/flems_soubory/commandline_data/commandline.css +++ /dev/null @@ -1,299 +0,0 @@ -@import url("../themes/auto/auto.css"); - -body { - overflow: hidden; - margin: 0; - position: absolute; - /* CSS is pants. Move the bar down a tiny bit to cover up the gap. */ - top: 1px; - width: 100%; - display: flex; - flex-direction: column; -} - -#command-line-holder { - background: var(--tridactyl-cmdl-bg); - color: var(--tridactyl-cmdl-fg); - font-family: var(--tridactyl-cmdl-font-family); - font-size: 9pt; - /* reduce the padding added by the colon so that the command line shows up roughly where it used to be */ - padding-left: 0.125ex; -} - -input { - width: 97%; - font-family: var(--tridactyl-cmdl-font-family); - font-size: var(--tridactyl-cmdl-font-size); - line-height: var(--tridactyl-cmdl-line-height); - color: var(--tridactyl-cmdl-fg); - background: var(--tridactyl-cmdl-bg); - border: unset; - /* reduce the padding from the colon */ - /* margin-left: -0.25ex; */ - /* we currently have a border from the completions */ - /* border-top: solid 1px lightgray; */ -} - -input:focus { - outline: none; -} - -#tridactyl-colon::before { - content: ":"; -} - -/* COMPLETIONS */ - -#completions { - --option-height: var(--tridactyl-cmplt-option-height); - color: var(--tridactyl-cmplt-fg); - background: var(--tridactyl-cmplt-bg); - display: inline-block; - font-size: var(--tridactyl-cmplt-font-size); - font-family: var(--tridactyl-cmplt-font-family); - overflow: hidden; - width: 100%; - border-top: var(--tridactyl-cmplt-border-top); -} - -/* Olie doesn't know how CSS inheritance works */ -#completions > div { - max-height: calc(20 * var(--option-height)); - min-height: calc(10 * var(--option-height)); -} - -#completions > div > table { - width: 100%; - font-size: 9pt; - border-spacing: 0; - table-layout: fixed; -} - -#completions table tr td.prefix { - width: 3.2em; - padding-left: 0.5em; - text-align: center; -} -#completions table tr td.container, -#completions table tr td.icon, -#completions table tr td.privatewindow { - width: 1.5em; -} -#completions table tr td.tabcount { - width: 6em; -} -#completions table tr td.tgroup { - width: 10em; - padding-left: 0.5em; - text-align: right; -} -#completions table tr td.tgroup:empty { - display: none; -} -/* #completions table tr td:nth-of-type(3) { width: 5em; } */ -#completions table tr td.content { - width: 50%; -} - -/* Accroding to src/completions/TabHistory.ts formatTimeSpan, - * max-width should be 14 characters (14ex), 20ex for more tolorance. */ -#completions table tr td.time { - width: 20ex; - text-align: right; - padding-right: 2ex; -} - -#completions table tr { - white-space: nowrap; - overflow: hidden; -} - -#completions table tr td { - overflow: hidden; -} - -#completions img { - display: inline; - vertical-align: middle; - height: 1em; - width: 1em; -} - -#completions .sectionHeader { - background: linear-gradient( - var(--tridactyl-header-first-bg), - var(--tridactyl-header-second-bg), - var(--tridactyl-header-third-bg) - ); - font-size: var(--tridactyl-header-font-size); - font-weight: var(--tridactyl-header-font-weight); - border-bottom: var(--tridactyl-header-border-bottom); - padding-left: 0.5ex; -} - -#completions .sectionHeader, -#completions .option { - height: var(--option-height); - line-height: var(--option-height); -} - -.url { - text-decoration: var(--tridactyl-url-text-decoration); -} - -.option:not(.focused) .url { - color: var(--tridactyl-url-fg); - background: var(--tridactyl-url-bg); -} - -a.url:hover { - cursor: var(--tridactyl-url-cursor); - text-decoration: underline; -} - -/* Hide the URLs if the screen is small */ -@media all and (max-width: 500px) { - .url { - display: none; - } -} - -.FindCompletionOption .match { - font-weight: bold; -} - -.hidden { - display: none; -} - -/* Pick the .url out especially because otherwise its link styles dominate. */ -.focused, -.focused .url { - color: var(--tridactyl-of-fg); - background: var(--tridactyl-of-bg); -} - -.option.incognito .privatewindow { - background-image: var(--tridactyl-private-window-icon-url); -} - -/* Still completions, but container-related stuff */ -.option .container { - mask-size: 1em; - mask-repeat: no-repeat; - mask-position: center; -} -.option .privatewindow { - background-size: 1em; - background-repeat: no-repeat; - background-position: center; -} -.option.container_blue .container { - background-color: var(--tridactyl-container-color-blue); -} -.option.container_turquoise .container { - background-color: var(--tridactyl-container-color-turquoise); -} -.option.container_green .container { - background-color: var(--tridactyl-container-color-green); -} -.option.container_yellow .container { - background-color: var(--tridactyl-container-color-yellow); -} -.option.container_orange .container { - background-color: var(--tridactyl-container-color-orange); -} -.option.container_red .container { - background-color: var(--tridactyl-container-color-red); -} -.option.container_pink .container { - background-color: var(--tridactyl-container-color-pink); -} -.option.container_purple .container { - background-color: var(--tridactyl-container-color-purple); -} -.option.container_fingerprint .container { - mask-image: var(--tridactyl-container-fingerprint-url); -} -.option.container_briefcase .container { - mask-image: var(--tridactyl-container-briefcase-url); -} -.option.container_dollar .container { - mask-image: var(--tridactyl-container-dollar-url); -} -.option.container_cart .container { - mask-image: var(--tridactyl-container-cart-url); -} -.option.container_circle .container { - mask-image: var(--tridactyl-container-circle-url); -} -.option.container_gift .container { - mask-image: var(--tridactyl-container-gift-url); -} -.option.container_vacation .container { - mask-image: var(--tridactyl-container-vacation-url); -} -.option.container_food .container { - mask-image: var(--tridactyl-container-food-url); -} -.option.container_fruit .container { - mask-image: var(--tridactyl-container-fruit-url); -} -.option.container_pet .container { - mask-image: var(--tridactyl-container-pet-url); -} -.option.container_tree .container { - mask-image: var(--tridactyl-container-tree-url); -} -.option.container_chill .container { - mask-image: var(--tridactyl-container-chill-url); -} - -.ExcmdCompletionOption td.excmd { - padding-left: 0.5em; - width: 20%; -} - -.ExcmdCompletionOption td.documentation { - width: 100%; -} - -.SettingsCompletionOption td.title { - padding-left: 0.5em; -} - -#completions .SettingsCompletionOption td.title, -#completions .SettingsCompletionOption td.content, -#completions .SettingsCompletionOption td.type { - width: 15%; - text-overflow: ellipsis; -} - -#completions .TabGroupCompletionOption td.title { - width: 15%; -} - -#completions .TabGroupCompletionOption td.content { - width: auto; -} - -.HelpCompletionOption td.name { - width: 25%; -} - -#completions .SessionCompletionOption td.type { - width: 1ch !important; - padding: 0px 3pt; -} - -#completions .SessionCompletionOption td.time { - width: 5ch !important; - padding: 0px 3pt; - text-align: right; -} - -#completions .WindowCompletionOption td.id { - width: 6ch !important; - text-align: right; - padding: 0px 8pt; -} diff --git a/docs/flems_soubory/commandline_data/commandline_frame.js b/docs/flems_soubory/commandline_data/commandline_frame.js deleted file mode 100644 index b0132c1..0000000 --- a/docs/flems_soubory/commandline_data/commandline_frame.js +++ /dev/null @@ -1,14035 +0,0 @@ -"use strict"; -(() => { - var __create = Object.create; - var __defProp = Object.defineProperty; - var __getOwnPropDesc = Object.getOwnPropertyDescriptor; - var __getOwnPropNames = Object.getOwnPropertyNames; - var __getProtoOf = Object.getPrototypeOf; - var __hasOwnProp = Object.prototype.hasOwnProperty; - var __commonJS = (cb2, mod) => function __require() { - return mod || (0, cb2[__getOwnPropNames(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports; - }; - var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; - }; - var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod - )); - var __decorateClass = (decorators, target, key, kind) => { - var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target; - for (var i = decorators.length - 1, decorator; i >= 0; i--) - if (decorator = decorators[i]) - result = (kind ? decorator(target, key, result) : decorator(result)) || result; - if (kind && result) - __defProp(target, key, result); - return result; - }; - - // node_modules/nearley/lib/nearley.js - var require_nearley = __commonJS({ - "node_modules/nearley/lib/nearley.js"(exports, module) { - (function(root, factory) { - if (typeof module === "object" && module.exports) { - module.exports = factory(); - } else { - root.nearley = factory(); - } - })(exports, function() { - function Rule(name, symbols, postprocess) { - this.id = ++Rule.highestId; - this.name = name; - this.symbols = symbols; - this.postprocess = postprocess; - return this; - } - Rule.highestId = 0; - Rule.prototype.toString = function(withCursorAt) { - var symbolSequence = typeof withCursorAt === "undefined" ? this.symbols.map(getSymbolShortDisplay).join(" ") : this.symbols.slice(0, withCursorAt).map(getSymbolShortDisplay).join(" ") + " \u25CF " + this.symbols.slice(withCursorAt).map(getSymbolShortDisplay).join(" "); - return this.name + " \u2192 " + symbolSequence; - }; - function State2(rule, dot, reference, wantedBy) { - this.rule = rule; - this.dot = dot; - this.reference = reference; - this.data = []; - this.wantedBy = wantedBy; - this.isComplete = this.dot === rule.symbols.length; - } - State2.prototype.toString = function() { - return "{" + this.rule.toString(this.dot) + "}, from: " + (this.reference || 0); - }; - State2.prototype.nextState = function(child) { - var state2 = new State2(this.rule, this.dot + 1, this.reference, this.wantedBy); - state2.left = this; - state2.right = child; - if (state2.isComplete) { - state2.data = state2.build(); - state2.right = void 0; - } - return state2; - }; - State2.prototype.build = function() { - var children = []; - var node = this; - do { - children.push(node.right.data); - node = node.left; - } while (node.left); - children.reverse(); - return children; - }; - State2.prototype.finish = function() { - if (this.rule.postprocess) { - this.data = this.rule.postprocess(this.data, this.reference, Parser3.fail); - } - }; - function Column(grammar2, index2) { - this.grammar = grammar2; - this.index = index2; - this.states = []; - this.wants = {}; - this.scannable = []; - this.completed = {}; - } - Column.prototype.process = function(nextColumn) { - var states = this.states; - var wants = this.wants; - var completed = this.completed; - for (var w = 0; w < states.length; w++) { - var state2 = states[w]; - if (state2.isComplete) { - state2.finish(); - if (state2.data !== Parser3.fail) { - var wantedBy = state2.wantedBy; - for (var i = wantedBy.length; i--; ) { - var left = wantedBy[i]; - this.complete(left, state2); - } - if (state2.reference === this.index) { - var exp = state2.rule.name; - (this.completed[exp] = this.completed[exp] || []).push(state2); - } - } - } else { - var exp = state2.rule.symbols[state2.dot]; - if (typeof exp !== "string") { - this.scannable.push(state2); - continue; - } - if (wants[exp]) { - wants[exp].push(state2); - if (completed.hasOwnProperty(exp)) { - var nulls = completed[exp]; - for (var i = 0; i < nulls.length; i++) { - var right = nulls[i]; - this.complete(state2, right); - } - } - } else { - wants[exp] = [state2]; - this.predict(exp); - } - } - } - }; - Column.prototype.predict = function(exp) { - var rules = this.grammar.byName[exp] || []; - for (var i = 0; i < rules.length; i++) { - var r = rules[i]; - var wantedBy = this.wants[exp]; - var s = new State2(r, 0, this.index, wantedBy); - this.states.push(s); - } - }; - Column.prototype.complete = function(left, right) { - var copy = left.nextState(right); - this.states.push(copy); - }; - function Grammar2(rules, start) { - this.rules = rules; - this.start = start || this.rules[0].name; - var byName = this.byName = {}; - this.rules.forEach(function(rule) { - if (!byName.hasOwnProperty(rule.name)) { - byName[rule.name] = []; - } - byName[rule.name].push(rule); - }); - } - Grammar2.fromCompiled = function(rules, start) { - var lexer = rules.Lexer; - if (rules.ParserStart) { - start = rules.ParserStart; - rules = rules.ParserRules; - } - var rules = rules.map(function(r) { - return new Rule(r.name, r.symbols, r.postprocess); - }); - var g = new Grammar2(rules, start); - g.lexer = lexer; - return g; - }; - function StreamLexer() { - this.reset(""); - } - StreamLexer.prototype.reset = function(data, state2) { - this.buffer = data; - this.index = 0; - this.line = state2 ? state2.line : 1; - this.lastLineBreak = state2 ? -state2.col : 0; - }; - StreamLexer.prototype.next = function() { - if (this.index < this.buffer.length) { - var ch = this.buffer[this.index++]; - if (ch === "\n") { - this.line += 1; - this.lastLineBreak = this.index; - } - return { value: ch }; - } - }; - StreamLexer.prototype.save = function() { - return { - line: this.line, - col: this.index - this.lastLineBreak - }; - }; - StreamLexer.prototype.formatError = function(token, message2) { - var buffer = this.buffer; - if (typeof buffer === "string") { - var lines = buffer.split("\n").slice( - Math.max(0, this.line - 5), - this.line - ); - var nextLineBreak = buffer.indexOf("\n", this.index); - if (nextLineBreak === -1) - nextLineBreak = buffer.length; - var col = this.index - this.lastLineBreak; - var lastLineDigits = String(this.line).length; - message2 += " at line " + this.line + " col " + col + ":\n\n"; - message2 += lines.map(function(line, i) { - return pad3(this.line - lines.length + i + 1, lastLineDigits) + " " + line; - }, this).join("\n"); - message2 += "\n" + pad3("", lastLineDigits + col) + "^\n"; - return message2; - } else { - return message2 + " at index " + (this.index - 1); - } - function pad3(n, length) { - var s = String(n); - return Array(length - s.length + 1).join(" ") + s; - } - }; - function Parser3(rules, start, options) { - if (rules instanceof Grammar2) { - var grammar2 = rules; - var options = start; - } else { - var grammar2 = Grammar2.fromCompiled(rules, start); - } - this.grammar = grammar2; - this.options = { - keepHistory: false, - lexer: grammar2.lexer || new StreamLexer() - }; - for (var key in options || {}) { - this.options[key] = options[key]; - } - this.lexer = this.options.lexer; - this.lexerState = void 0; - var column = new Column(grammar2, 0); - var table = this.table = [column]; - column.wants[grammar2.start] = []; - column.predict(grammar2.start); - column.process(); - this.current = 0; - } - Parser3.fail = {}; - Parser3.prototype.feed = function(chunk) { - var lexer = this.lexer; - lexer.reset(chunk, this.lexerState); - var token; - while (true) { - try { - token = lexer.next(); - if (!token) { - break; - } - } catch (e) { - var nextColumn = new Column(this.grammar, this.current + 1); - this.table.push(nextColumn); - var err = new Error(this.reportLexerError(e)); - err.offset = this.current; - err.token = e.token; - throw err; - } - var column = this.table[this.current]; - if (!this.options.keepHistory) { - delete this.table[this.current - 1]; - } - var n = this.current + 1; - var nextColumn = new Column(this.grammar, n); - this.table.push(nextColumn); - var literal = token.text !== void 0 ? token.text : token.value; - var value = lexer.constructor === StreamLexer ? token.value : token; - var scannable = column.scannable; - for (var w = scannable.length; w--; ) { - var state2 = scannable[w]; - var expect = state2.rule.symbols[state2.dot]; - if (expect.test ? expect.test(value) : expect.type ? expect.type === token.type : expect.literal === literal) { - var next = state2.nextState({ data: value, token, isToken: true, reference: n - 1 }); - nextColumn.states.push(next); - } - } - nextColumn.process(); - if (nextColumn.states.length === 0) { - var err = new Error(this.reportError(token)); - err.offset = this.current; - err.token = token; - throw err; - } - if (this.options.keepHistory) { - column.lexerState = lexer.save(); - } - this.current++; - } - if (column) { - this.lexerState = lexer.save(); - } - this.results = this.finish(); - return this; - }; - Parser3.prototype.reportLexerError = function(lexerError) { - var tokenDisplay, lexerMessage; - var token = lexerError.token; - if (token) { - tokenDisplay = "input " + JSON.stringify(token.text[0]) + " (lexer error)"; - lexerMessage = this.lexer.formatError(token, "Syntax error"); - } else { - tokenDisplay = "input (lexer error)"; - lexerMessage = lexerError.message; - } - return this.reportErrorCommon(lexerMessage, tokenDisplay); - }; - Parser3.prototype.reportError = function(token) { - var tokenDisplay = (token.type ? token.type + " token: " : "") + JSON.stringify(token.value !== void 0 ? token.value : token); - var lexerMessage = this.lexer.formatError(token, "Syntax error"); - return this.reportErrorCommon(lexerMessage, tokenDisplay); - }; - Parser3.prototype.reportErrorCommon = function(lexerMessage, tokenDisplay) { - var lines = []; - lines.push(lexerMessage); - var lastColumnIndex = this.table.length - 2; - var lastColumn = this.table[lastColumnIndex]; - var expectantStates = lastColumn.states.filter(function(state2) { - var nextSymbol = state2.rule.symbols[state2.dot]; - return nextSymbol && typeof nextSymbol !== "string"; - }); - if (expectantStates.length === 0) { - lines.push("Unexpected " + tokenDisplay + ". I did not expect any more input. Here is the state of my parse table:\n"); - this.displayStateStack(lastColumn.states, lines); - } else { - lines.push("Unexpected " + tokenDisplay + ". Instead, I was expecting to see one of the following:\n"); - var stateStacks = expectantStates.map(function(state2) { - return this.buildFirstStateStack(state2, []) || [state2]; - }, this); - stateStacks.forEach(function(stateStack) { - var state2 = stateStack[0]; - var nextSymbol = state2.rule.symbols[state2.dot]; - var symbolDisplay = this.getSymbolDisplay(nextSymbol); - lines.push("A " + symbolDisplay + " based on:"); - this.displayStateStack(stateStack, lines); - }, this); - } - lines.push(""); - return lines.join("\n"); - }; - Parser3.prototype.displayStateStack = function(stateStack, lines) { - var lastDisplay; - var sameDisplayCount = 0; - for (var j = 0; j < stateStack.length; j++) { - var state2 = stateStack[j]; - var display = state2.rule.toString(state2.dot); - if (display === lastDisplay) { - sameDisplayCount++; - } else { - if (sameDisplayCount > 0) { - lines.push(" ^ " + sameDisplayCount + " more lines identical to this"); - } - sameDisplayCount = 0; - lines.push(" " + display); - } - lastDisplay = display; - } - }; - Parser3.prototype.getSymbolDisplay = function(symbol) { - return getSymbolLongDisplay(symbol); - }; - Parser3.prototype.buildFirstStateStack = function(state2, visited) { - if (visited.indexOf(state2) !== -1) { - return null; - } - if (state2.wantedBy.length === 0) { - return [state2]; - } - var prevState = state2.wantedBy[0]; - var childVisited = [state2].concat(visited); - var childResult = this.buildFirstStateStack(prevState, childVisited); - if (childResult === null) { - return null; - } - return [state2].concat(childResult); - }; - Parser3.prototype.save = function() { - var column = this.table[this.current]; - column.lexerState = this.lexerState; - return column; - }; - Parser3.prototype.restore = function(column) { - var index2 = column.index; - this.current = index2; - this.table[index2] = column; - this.table.splice(index2 + 1); - this.lexerState = column.lexerState; - this.results = this.finish(); - }; - Parser3.prototype.rewind = function(index2) { - if (!this.options.keepHistory) { - throw new Error("set option `keepHistory` to enable rewinding"); - } - this.restore(this.table[index2]); - }; - Parser3.prototype.finish = function() { - var considerations = []; - var start = this.grammar.start; - var column = this.table[this.table.length - 1]; - column.states.forEach(function(t) { - if (t.rule.name === start && t.dot === t.rule.symbols.length && t.reference === 0 && t.data !== Parser3.fail) { - considerations.push(t); - } - }); - return considerations.map(function(c) { - return c.data; - }); - }; - function getSymbolLongDisplay(symbol) { - var type3 = typeof symbol; - if (type3 === "string") { - return symbol; - } else if (type3 === "object") { - if (symbol.literal) { - return JSON.stringify(symbol.literal); - } else if (symbol instanceof RegExp) { - return "character matching " + symbol; - } else if (symbol.type) { - return symbol.type + " token"; - } else if (symbol.test) { - return "token matching " + String(symbol.test); - } else { - throw new Error("Unknown symbol type: " + symbol); - } - } - } - function getSymbolShortDisplay(symbol) { - var type3 = typeof symbol; - if (type3 === "string") { - return symbol; - } else if (type3 === "object") { - if (symbol.literal) { - return JSON.stringify(symbol.literal); - } else if (symbol instanceof RegExp) { - return symbol.toString(); - } else if (symbol.type) { - return "%" + symbol.type; - } else if (symbol.test) { - return "<" + String(symbol.test) + ">"; - } else { - throw new Error("Unknown symbol type: " + symbol); - } - } - } - return { - Parser: Parser3, - Grammar: Grammar2, - Rule - }; - }); - } - }); - - // node_modules/semver-compare/index.js - var require_semver_compare = __commonJS({ - "node_modules/semver-compare/index.js"(exports, module) { - module.exports = function cmp(a, b) { - var pa = a.split("."); - var pb = b.split("."); - for (var i = 0; i < 3; i++) { - var na = Number(pa[i]); - var nb = Number(pb[i]); - if (na > nb) - return 1; - if (nb > na) - return -1; - if (!isNaN(na) && isNaN(nb)) - return 1; - if (isNaN(na) && !isNaN(nb)) - return -1; - } - return 0; - }; - } - }); - - // node_modules/css/lib/parse/index.js - var require_parse = __commonJS({ - "node_modules/css/lib/parse/index.js"(exports, module) { - var commentre = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g; - module.exports = function(css, options) { - options = options || {}; - var lineno = 1; - var column = 1; - function updatePosition(str) { - var lines = str.match(/\n/g); - if (lines) - lineno += lines.length; - var i = str.lastIndexOf("\n"); - column = ~i ? str.length - i : column + str.length; - } - function position() { - var start = { line: lineno, column }; - return function(node) { - node.position = new Position(start); - whitespace(); - return node; - }; - } - function Position(start) { - this.start = start; - this.end = { line: lineno, column }; - this.source = options.source; - } - Position.prototype.content = css; - var errorsList = []; - function error(msg) { - var err = new Error(options.source + ":" + lineno + ":" + column + ": " + msg); - err.reason = msg; - err.filename = options.source; - err.line = lineno; - err.column = column; - err.source = css; - if (options.silent) { - errorsList.push(err); - } else { - throw err; - } - } - function stylesheet() { - var rulesList = rules(); - return { - type: "stylesheet", - stylesheet: { - source: options.source, - rules: rulesList, - parsingErrors: errorsList - } - }; - } - function open() { - return match(/^{\s*/); - } - function close() { - return match(/^}/); - } - function rules() { - var node; - var rules2 = []; - whitespace(); - comments(rules2); - while (css.length && css.charAt(0) != "}" && (node = atrule() || rule())) { - if (node !== false) { - rules2.push(node); - comments(rules2); - } - } - return rules2; - } - function match(re) { - var m = re.exec(css); - if (!m) - return; - var str = m[0]; - updatePosition(str); - css = css.slice(str.length); - return m; - } - function whitespace() { - match(/^\s*/); - } - function comments(rules2) { - var c; - rules2 = rules2 || []; - while (c = comment()) { - if (c !== false) { - rules2.push(c); - } - } - return rules2; - } - function comment() { - var pos = position(); - if ("/" != css.charAt(0) || "*" != css.charAt(1)) - return; - var i = 2; - while ("" != css.charAt(i) && ("*" != css.charAt(i) || "/" != css.charAt(i + 1))) - ++i; - i += 2; - if ("" === css.charAt(i - 1)) { - return error("End of comment missing"); - } - var str = css.slice(2, i - 2); - column += 2; - updatePosition(str); - css = css.slice(i); - column += 2; - return pos({ - type: "comment", - comment: str - }); - } - function selector() { - var m = match(/^([^{]+)/); - if (!m) - return; - return trim(m[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, "").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g, function(m2) { - return m2.replace(/,/g, "\u200C"); - }).split(/\s*(?![^(]*\)),\s*/).map(function(s) { - return s.replace(/\u200C/g, ","); - }); - } - function declaration() { - var pos = position(); - var prop = match(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/); - if (!prop) - return; - prop = trim(prop[0]); - if (!match(/^:\s*/)) - return error("property missing ':'"); - var val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/); - var ret = pos({ - type: "declaration", - property: prop.replace(commentre, ""), - value: val ? trim(val[0]).replace(commentre, "") : "" - }); - match(/^[;\s]*/); - return ret; - } - function declarations() { - var decls = []; - if (!open()) - return error("missing '{'"); - comments(decls); - var decl; - while (decl = declaration()) { - if (decl !== false) { - decls.push(decl); - comments(decls); - } - } - if (!close()) - return error("missing '}'"); - return decls; - } - function keyframe() { - var m; - var vals = []; - var pos = position(); - while (m = match(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/)) { - vals.push(m[1]); - match(/^,\s*/); - } - if (!vals.length) - return; - return pos({ - type: "keyframe", - values: vals, - declarations: declarations() - }); - } - function atkeyframes() { - var pos = position(); - var m = match(/^@([-\w]+)?keyframes\s*/); - if (!m) - return; - var vendor = m[1]; - var m = match(/^([-\w]+)\s*/); - if (!m) - return error("@keyframes missing name"); - var name = m[1]; - if (!open()) - return error("@keyframes missing '{'"); - var frame; - var frames = comments(); - while (frame = keyframe()) { - frames.push(frame); - frames = frames.concat(comments()); - } - if (!close()) - return error("@keyframes missing '}'"); - return pos({ - type: "keyframes", - name, - vendor, - keyframes: frames - }); - } - function atsupports() { - var pos = position(); - var m = match(/^@supports *([^{]+)/); - if (!m) - return; - var supports = trim(m[1]); - if (!open()) - return error("@supports missing '{'"); - var style = comments().concat(rules()); - if (!close()) - return error("@supports missing '}'"); - return pos({ - type: "supports", - supports, - rules: style - }); - } - function athost() { - var pos = position(); - var m = match(/^@host\s*/); - if (!m) - return; - if (!open()) - return error("@host missing '{'"); - var style = comments().concat(rules()); - if (!close()) - return error("@host missing '}'"); - return pos({ - type: "host", - rules: style - }); - } - function atmedia() { - var pos = position(); - var m = match(/^@media *([^{]+)/); - if (!m) - return; - var media = trim(m[1]); - if (!open()) - return error("@media missing '{'"); - var style = comments().concat(rules()); - if (!close()) - return error("@media missing '}'"); - return pos({ - type: "media", - media, - rules: style - }); - } - function atcustommedia() { - var pos = position(); - var m = match(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/); - if (!m) - return; - return pos({ - type: "custom-media", - name: trim(m[1]), - media: trim(m[2]) - }); - } - function atpage() { - var pos = position(); - var m = match(/^@page */); - if (!m) - return; - var sel = selector() || []; - if (!open()) - return error("@page missing '{'"); - var decls = comments(); - var decl; - while (decl = declaration()) { - decls.push(decl); - decls = decls.concat(comments()); - } - if (!close()) - return error("@page missing '}'"); - return pos({ - type: "page", - selectors: sel, - declarations: decls - }); - } - function atdocument() { - var pos = position(); - var m = match(/^@([-\w]+)?document *([^{]+)/); - if (!m) - return; - var vendor = trim(m[1]); - var doc = trim(m[2]); - if (!open()) - return error("@document missing '{'"); - var style = comments().concat(rules()); - if (!close()) - return error("@document missing '}'"); - return pos({ - type: "document", - document: doc, - vendor, - rules: style - }); - } - function atfontface() { - var pos = position(); - var m = match(/^@font-face\s*/); - if (!m) - return; - if (!open()) - return error("@font-face missing '{'"); - var decls = comments(); - var decl; - while (decl = declaration()) { - decls.push(decl); - decls = decls.concat(comments()); - } - if (!close()) - return error("@font-face missing '}'"); - return pos({ - type: "font-face", - declarations: decls - }); - } - var atimport = _compileAtrule("import"); - var atcharset = _compileAtrule("charset"); - var atnamespace = _compileAtrule("namespace"); - function _compileAtrule(name) { - var re = new RegExp("^@" + name + "\\s*([^;]+);"); - return function() { - var pos = position(); - var m = match(re); - if (!m) - return; - var ret = { type: name }; - ret[name] = m[1].trim(); - return pos(ret); - }; - } - function atrule() { - if (css[0] != "@") - return; - return atkeyframes() || atmedia() || atcustommedia() || atsupports() || atimport() || atcharset() || atnamespace() || atdocument() || atpage() || athost() || atfontface(); - } - function rule() { - var pos = position(); - var sel = selector(); - if (!sel) - return error("selector missing"); - comments(); - return pos({ - type: "rule", - selectors: sel, - declarations: declarations() - }); - } - return addParent(stylesheet()); - }; - function trim(str) { - return str ? str.replace(/^\s+|\s+$/g, "") : ""; - } - function addParent(obj, parent) { - var isNode = obj && typeof obj.type === "string"; - var childParent = isNode ? obj : parent; - for (var k in obj) { - var value = obj[k]; - if (Array.isArray(value)) { - value.forEach(function(v) { - addParent(v, childParent); - }); - } else if (value && typeof value === "object") { - addParent(value, childParent); - } - } - if (isNode) { - Object.defineProperty(obj, "parent", { - configurable: true, - writable: true, - enumerable: false, - value: parent || null - }); - } - return obj; - } - } - }); - - // node_modules/css/lib/stringify/compiler.js - var require_compiler = __commonJS({ - "node_modules/css/lib/stringify/compiler.js"(exports, module) { - module.exports = Compiler; - function Compiler(opts) { - this.options = opts || {}; - } - Compiler.prototype.emit = function(str) { - return str; - }; - Compiler.prototype.visit = function(node) { - return this[node.type](node); - }; - Compiler.prototype.mapVisit = function(nodes, delim) { - var buf = ""; - delim = delim || ""; - for (var i = 0, length = nodes.length; i < length; i++) { - buf += this.visit(nodes[i]); - if (delim && i < length - 1) - buf += this.emit(delim); - } - return buf; - }; - } - }); - - // node_modules/inherits/inherits_browser.js - var require_inherits_browser = __commonJS({ - "node_modules/inherits/inherits_browser.js"(exports, module) { - if (typeof Object.create === "function") { - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - } - }; - } else { - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() { - }; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - } - }; - } - } - }); - - // node_modules/css/lib/stringify/compress.js - var require_compress = __commonJS({ - "node_modules/css/lib/stringify/compress.js"(exports, module) { - var Base = require_compiler(); - var inherits = require_inherits_browser(); - module.exports = Compiler; - function Compiler(options) { - Base.call(this, options); - } - inherits(Compiler, Base); - Compiler.prototype.compile = function(node) { - return node.stylesheet.rules.map(this.visit, this).join(""); - }; - Compiler.prototype.comment = function(node) { - return this.emit("", node.position); - }; - Compiler.prototype.import = function(node) { - return this.emit("@import " + node.import + ";", node.position); - }; - Compiler.prototype.media = function(node) { - return this.emit("@media " + node.media, node.position) + this.emit("{") + this.mapVisit(node.rules) + this.emit("}"); - }; - Compiler.prototype.document = function(node) { - var doc = "@" + (node.vendor || "") + "document " + node.document; - return this.emit(doc, node.position) + this.emit("{") + this.mapVisit(node.rules) + this.emit("}"); - }; - Compiler.prototype.charset = function(node) { - return this.emit("@charset " + node.charset + ";", node.position); - }; - Compiler.prototype.namespace = function(node) { - return this.emit("@namespace " + node.namespace + ";", node.position); - }; - Compiler.prototype.supports = function(node) { - return this.emit("@supports " + node.supports, node.position) + this.emit("{") + this.mapVisit(node.rules) + this.emit("}"); - }; - Compiler.prototype.keyframes = function(node) { - return this.emit("@" + (node.vendor || "") + "keyframes " + node.name, node.position) + this.emit("{") + this.mapVisit(node.keyframes) + this.emit("}"); - }; - Compiler.prototype.keyframe = function(node) { - var decls = node.declarations; - return this.emit(node.values.join(","), node.position) + this.emit("{") + this.mapVisit(decls) + this.emit("}"); - }; - Compiler.prototype.page = function(node) { - var sel = node.selectors.length ? node.selectors.join(", ") : ""; - return this.emit("@page " + sel, node.position) + this.emit("{") + this.mapVisit(node.declarations) + this.emit("}"); - }; - Compiler.prototype["font-face"] = function(node) { - return this.emit("@font-face", node.position) + this.emit("{") + this.mapVisit(node.declarations) + this.emit("}"); - }; - Compiler.prototype.host = function(node) { - return this.emit("@host", node.position) + this.emit("{") + this.mapVisit(node.rules) + this.emit("}"); - }; - Compiler.prototype["custom-media"] = function(node) { - return this.emit("@custom-media " + node.name + " " + node.media + ";", node.position); - }; - Compiler.prototype.rule = function(node) { - var decls = node.declarations; - if (!decls.length) - return ""; - return this.emit(node.selectors.join(","), node.position) + this.emit("{") + this.mapVisit(decls) + this.emit("}"); - }; - Compiler.prototype.declaration = function(node) { - return this.emit(node.property + ":" + node.value, node.position) + this.emit(";"); - }; - } - }); - - // node_modules/css/lib/stringify/identity.js - var require_identity = __commonJS({ - "node_modules/css/lib/stringify/identity.js"(exports, module) { - var Base = require_compiler(); - var inherits = require_inherits_browser(); - module.exports = Compiler; - function Compiler(options) { - options = options || {}; - Base.call(this, options); - this.indentation = options.indent; - } - inherits(Compiler, Base); - Compiler.prototype.compile = function(node) { - return this.stylesheet(node); - }; - Compiler.prototype.stylesheet = function(node) { - return this.mapVisit(node.stylesheet.rules, "\n\n"); - }; - Compiler.prototype.comment = function(node) { - return this.emit(this.indent() + "/*" + node.comment + "*/", node.position); - }; - Compiler.prototype.import = function(node) { - return this.emit("@import " + node.import + ";", node.position); - }; - Compiler.prototype.media = function(node) { - return this.emit("@media " + node.media, node.position) + this.emit( - " {\n" + this.indent(1) - ) + this.mapVisit(node.rules, "\n\n") + this.emit( - this.indent(-1) + "\n}" - ); - }; - Compiler.prototype.document = function(node) { - var doc = "@" + (node.vendor || "") + "document " + node.document; - return this.emit(doc, node.position) + this.emit( - " {\n" + this.indent(1) - ) + this.mapVisit(node.rules, "\n\n") + this.emit( - this.indent(-1) + "\n}" - ); - }; - Compiler.prototype.charset = function(node) { - return this.emit("@charset " + node.charset + ";", node.position); - }; - Compiler.prototype.namespace = function(node) { - return this.emit("@namespace " + node.namespace + ";", node.position); - }; - Compiler.prototype.supports = function(node) { - return this.emit("@supports " + node.supports, node.position) + this.emit( - " {\n" + this.indent(1) - ) + this.mapVisit(node.rules, "\n\n") + this.emit( - this.indent(-1) + "\n}" - ); - }; - Compiler.prototype.keyframes = function(node) { - return this.emit("@" + (node.vendor || "") + "keyframes " + node.name, node.position) + this.emit( - " {\n" + this.indent(1) - ) + this.mapVisit(node.keyframes, "\n") + this.emit( - this.indent(-1) + "}" - ); - }; - Compiler.prototype.keyframe = function(node) { - var decls = node.declarations; - return this.emit(this.indent()) + this.emit(node.values.join(", "), node.position) + this.emit( - " {\n" + this.indent(1) - ) + this.mapVisit(decls, "\n") + this.emit( - this.indent(-1) + "\n" + this.indent() + "}\n" - ); - }; - Compiler.prototype.page = function(node) { - var sel = node.selectors.length ? node.selectors.join(", ") + " " : ""; - return this.emit("@page " + sel, node.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(node.declarations, "\n") + this.emit(this.indent(-1)) + this.emit("\n}"); - }; - Compiler.prototype["font-face"] = function(node) { - return this.emit("@font-face ", node.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(node.declarations, "\n") + this.emit(this.indent(-1)) + this.emit("\n}"); - }; - Compiler.prototype.host = function(node) { - return this.emit("@host", node.position) + this.emit( - " {\n" + this.indent(1) - ) + this.mapVisit(node.rules, "\n\n") + this.emit( - this.indent(-1) + "\n}" - ); - }; - Compiler.prototype["custom-media"] = function(node) { - return this.emit("@custom-media " + node.name + " " + node.media + ";", node.position); - }; - Compiler.prototype.rule = function(node) { - var indent = this.indent(); - var decls = node.declarations; - if (!decls.length) - return ""; - return this.emit(node.selectors.map(function(s) { - return indent + s; - }).join(",\n"), node.position) + this.emit(" {\n") + this.emit(this.indent(1)) + this.mapVisit(decls, "\n") + this.emit(this.indent(-1)) + this.emit("\n" + this.indent() + "}"); - }; - Compiler.prototype.declaration = function(node) { - return this.emit(this.indent()) + this.emit(node.property + ": " + node.value, node.position) + this.emit(";"); - }; - Compiler.prototype.indent = function(level) { - this.level = this.level || 1; - if (null != level) { - this.level += level; - return ""; - } - return Array(this.level).join(this.indentation || " "); - }; - } - }); - - // node_modules/source-map/lib/base64.js - var require_base64 = __commonJS({ - "node_modules/source-map/lib/base64.js"(exports) { - var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); - exports.encode = function(number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - exports.decode = function(charCode) { - var bigA = 65; - var bigZ = 90; - var littleA = 97; - var littleZ = 122; - var zero = 48; - var nine = 57; - var plus = 43; - var slash = 47; - var littleOffset = 26; - var numberOffset = 52; - if (bigA <= charCode && charCode <= bigZ) { - return charCode - bigA; - } - if (littleA <= charCode && charCode <= littleZ) { - return charCode - littleA + littleOffset; - } - if (zero <= charCode && charCode <= nine) { - return charCode - zero + numberOffset; - } - if (charCode == plus) { - return 62; - } - if (charCode == slash) { - return 63; - } - return -1; - }; - } - }); - - // node_modules/source-map/lib/base64-vlq.js - var require_base64_vlq = __commonJS({ - "node_modules/source-map/lib/base64-vlq.js"(exports) { - var base64 = require_base64(); - var VLQ_BASE_SHIFT = 5; - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - var VLQ_BASE_MASK = VLQ_BASE - 1; - var VLQ_CONTINUATION_BIT = VLQ_BASE; - function toVLQSigned(aValue) { - return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0; - } - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative ? -shifted : shifted; - } - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - var vlq = toVLQSigned(aValue); - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - return encoded; - }; - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - } - }); - - // node_modules/source-map/lib/util.js - var require_util = __commonJS({ - "node_modules/source-map/lib/util.js"(exports) { - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - function urlGenerate(aParsedUrl) { - var url = ""; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ":"; - } - url += "//"; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + "@"; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port; - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === ".") { - parts.splice(i, 1); - } else if (part === "..") { - up++; - } else if (up > 0) { - if (part === "") { - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join("/"); - if (path === "") { - path = isAbsolute ? "/" : "."; - } - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || "/"; - } - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath); - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - exports.isAbsolute = function(aPath) { - return aPath.charAt(0) === "/" || urlRegexp.test(aPath); - }; - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - aRoot = aRoot.replace(/\/$/, ""); - var level = 0; - while (aPath.indexOf(aRoot + "/") !== 0) { - var index2 = aRoot.lastIndexOf("/"); - if (index2 < 0) { - return aPath; - } - aRoot = aRoot.slice(0, index2); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - ++level; - } - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - var supportsNullProto = function() { - var obj = /* @__PURE__ */ Object.create(null); - return !("__proto__" in obj); - }(); - function identity2(s) { - return s; - } - function toSetString(aStr) { - if (isProtoString(aStr)) { - return "$" + aStr; - } - return aStr; - } - exports.toSetString = supportsNullProto ? identity2 : toSetString; - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - return aStr; - } - exports.fromSetString = supportsNullProto ? identity2 : fromSetString; - function isProtoString(s) { - if (!s) { - return false; - } - var length = s.length; - if (length < 9) { - return false; - } - if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) { - return false; - } - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36) { - return false; - } - } - return true; - } - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByOriginalPositions = compareByOriginalPositions; - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - if (aStr1 === null) { - return 1; - } - if (aStr2 === null) { - return -1; - } - if (aStr1 > aStr2) { - return 1; - } - return -1; - } - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, "")); - } - exports.parseSourceMapInput = parseSourceMapInput; - function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ""; - if (sourceRoot) { - if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") { - sourceRoot += "/"; - } - sourceURL = sourceRoot + sourceURL; - } - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - var index2 = parsed.path.lastIndexOf("/"); - if (index2 >= 0) { - parsed.path = parsed.path.substring(0, index2 + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - return normalize(sourceURL); - } - exports.computeSourceURL = computeSourceURL; - } - }); - - // node_modules/source-map/lib/array-set.js - var require_array_set = __commonJS({ - "node_modules/source-map/lib/array-set.js"(exports) { - var util = require_util(); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null); - } - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - throw new Error('"' + aStr + '" is not in the set.'); - }; - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error("No element indexed by " + aIdx); - }; - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - exports.ArraySet = ArraySet; - } - }); - - // node_modules/source-map/lib/mapping-list.js - var require_mapping_list = __commonJS({ - "node_modules/source-map/lib/mapping-list.js"(exports) { - var util = require_util(); - function generatedPositionAfter(mappingA, mappingB) { - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - function MappingList() { - this._array = []; - this._sorted = true; - this._last = { generatedLine: -1, generatedColumn: 0 }; - } - MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - exports.MappingList = MappingList; - } - }); - - // node_modules/source-map/lib/source-map-generator.js - var require_source_map_generator = __commonJS({ - "node_modules/source-map/lib/source-map-generator.js"(exports) { - var base64VLQ = require_base64_vlq(); - var util = require_util(); - var ArraySet = require_array_set().ArraySet; - var MappingList = require_mapping_list().MappingList; - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, "file", null); - this._sourceRoot = util.getArg(aArgs, "sourceRoot", null); - this._skipValidation = util.getArg(aArgs, "skipValidation", false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - SourceMapGenerator.prototype._version = 3; - SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot - }); - aSourceMapConsumer.eachMapping(function(mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function(sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); - } - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, "generated"); - var original = util.getArg(aArgs, "original", null); - var source = util.getArg(aArgs, "source", null); - var name = util.getArg(aArgs, "name", null); - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source, - name - }); - }; - SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - if (aSourceContent != null) { - if (!this._sourcesContents) { - this._sourcesContents = /* @__PURE__ */ Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - `SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.` - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - var newSources = new ArraySet(); - var newNames = new ArraySet(); - this._mappings.unsortedForEach(function(mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source); - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - }, this); - this._sources = newSources; - this._names = newNames; - aSourceMapConsumer.sources.forEach(function(sourceFile2) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile2); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile2 = util.join(aSourceMapPath, sourceFile2); - } - if (sourceRoot != null) { - sourceFile2 = util.relative(sourceRoot, sourceFile2); - } - this.setSourceContent(sourceFile2, content); - } - }, this); - }; - SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) { - if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") { - throw new Error( - "original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values." - ); - } - if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) { - return; - } else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) { - return; - } else { - throw new Error("Invalid mapping: " + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ""; - var next; - var mapping; - var nameIdx; - var sourceIdx; - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = ""; - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ";"; - previousGeneratedLine++; - } - } else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ","; - } - } - next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - result += next; - } - return result; - }; - SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function(source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null; - }, this); - }; - SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() { - var map3 = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map3.file = this._file; - } - if (this._sourceRoot != null) { - map3.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map3.sourcesContent = this._generateSourcesContent(map3.sources, map3.sourceRoot); - } - return map3; - }; - SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - exports.SourceMapGenerator = SourceMapGenerator; - } - }); - - // node_modules/source-map/lib/binary-search.js - var require_binary_search = __commonJS({ - "node_modules/source-map/lib/binary-search.js"(exports) { - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - return mid; - } else if (cmp > 0) { - if (aHigh - mid > 1) { - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } else { - if (mid - aLow > 1) { - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - exports.search = function search2(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - var index2 = recursiveSearch( - -1, - aHaystack.length, - aNeedle, - aHaystack, - aCompare, - aBias || exports.GREATEST_LOWER_BOUND - ); - if (index2 < 0) { - return -1; - } - while (index2 - 1 >= 0) { - if (aCompare(aHaystack[index2], aHaystack[index2 - 1], true) !== 0) { - break; - } - --index2; - } - return index2; - }; - } - }); - - // node_modules/source-map/lib/quick-sort.js - var require_quick_sort = __commonJS({ - "node_modules/source-map/lib/quick-sort.js"(exports) { - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - function randomIntInRange(low, high) { - return Math.round(low + Math.random() * (high - low)); - } - function doQuickSort(ary, comparator, p, r) { - if (p < r) { - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - swap(ary, pivotIndex, r); - var pivot = ary[r]; - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - swap(ary, i + 1, j); - var q = i + 1; - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - exports.quickSort = function(ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - } - }); - - // node_modules/source-map/lib/source-map-consumer.js - var require_source_map_consumer = __commonJS({ - "node_modules/source-map/lib/source-map-consumer.js"(exports) { - var util = require_util(); - var binarySearch = require_binary_search(); - var ArraySet = require_array_set().ArraySet; - var base64VLQ = require_base64_vlq(); - var quickSort = require_quick_sort().quickSort; - function SourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === "string") { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); - } - SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); - }; - SourceMapConsumer.prototype._version = 3; - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", { - configurable: true, - enumerable: true, - get: function() { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - return this.__generatedMappings; - } - }); - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", { - configurable: true, - enumerable: true, - get: function() { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - return this.__originalMappings; - } - }); - SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index2) { - var c = aStr.charAt(index2); - return c === ";" || c === ","; - }; - SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - var sourceRoot = this.sourceRoot; - mappings.map(function(mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); - return { - source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, "line"); - var needle = { - source: util.getArg(aArgs, "source"), - originalLine: line, - originalColumn: util.getArg(aArgs, "column", 0) - }; - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - var mappings = []; - var index2 = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND - ); - if (index2 >= 0) { - var mapping = this._originalMappings[index2]; - if (aArgs.column === void 0) { - var originalLine = mapping.originalLine; - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, "generatedLine", null), - column: util.getArg(mapping, "generatedColumn", null), - lastColumn: util.getArg(mapping, "lastGeneratedColumn", null) - }); - mapping = this._originalMappings[++index2]; - } - } else { - var originalColumn = mapping.originalColumn; - while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, "generatedLine", null), - column: util.getArg(mapping, "generatedColumn", null), - lastColumn: util.getArg(mapping, "lastGeneratedColumn", null) - }); - mapping = this._originalMappings[++index2]; - } - } - } - return mappings; - }; - exports.SourceMapConsumer = SourceMapConsumer; - function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === "string") { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - var version = util.getArg(sourceMap, "version"); - var sources = util.getArg(sourceMap, "sources"); - var names = util.getArg(sourceMap, "names", []); - var sourceRoot = util.getArg(sourceMap, "sourceRoot", null); - var sourcesContent = util.getArg(sourceMap, "sourcesContent", null); - var mappings = util.getArg(sourceMap, "mappings"); - var file = util.getArg(sourceMap, "file", null); - if (version != this._version) { - throw new Error("Unsupported version: " + version); - } - if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); - } - sources = sources.map(String).map(util.normalize).map(function(source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source; - }); - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - this._absoluteSources = this._sources.toArray().map(function(s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; - } - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - return -1; - }; - BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent( - smc._sources.toArray(), - smc.sourceRoot - ); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function(s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping(); - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - destOriginalMappings.push(destMapping); - } - destGeneratedMappings.push(destMapping); - } - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - return smc; - }; - BasicSourceMapConsumer.prototype._version = 3; - Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", { - get: function() { - return this._absoluteSources.slice(); - } - }); - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index2 = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - while (index2 < length) { - if (aStr.charAt(index2) === ";") { - generatedLine++; - index2++; - previousGeneratedColumn = 0; - } else if (aStr.charAt(index2) === ",") { - index2++; - } else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - for (end = index2; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index2, end); - segment = cachedSegments[str]; - if (segment) { - index2 += str.length; - } else { - segment = []; - while (index2 < end) { - base64VLQ.decode(aStr, index2, temp); - value = temp.value; - index2 = temp.rest; - segment.push(value); - } - if (segment.length === 2) { - throw new Error("Found a source, but no line and column"); - } - if (segment.length === 3) { - throw new Error("Found a source and line, but no column"); - } - cachedSegments[str] = segment; - } - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - if (segment.length > 1) { - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - mapping.originalLine += 1; - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - if (segment.length > 4) { - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - generatedMappings.push(mapping); - if (typeof mapping.originalLine === "number") { - originalMappings.push(mapping); - } - } - } - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) { - if (aNeedle[aLineName] <= 0) { - throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]); - } - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() { - for (var index2 = 0; index2 < this._generatedMappings.length; ++index2) { - var mapping = this._generatedMappings[index2]; - if (index2 + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index2 + 1]; - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - mapping.lastGeneratedColumn = Infinity; - } - }; - BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, "line"), - generatedColumn: util.getArg(aArgs, "column") - }; - var index2 = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - if (index2 >= 0) { - var mapping = this._generatedMappings[index2]; - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, "source", null); - if (source !== null) { - source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util.getArg(mapping, "name", null); - if (name !== null) { - name = this._names.at(name); - } - return { - source, - line: util.getArg(mapping, "originalLine", null), - column: util.getArg(mapping, "originalColumn", null), - name - }; - } - } - return { - source: null, - line: null, - column: null, - name: null - }; - }; - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) { - return sc == null; - }); - }; - BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - var index2 = this._findSourceIndex(aSource); - if (index2 >= 0) { - return this.sourcesContent[index2]; - } - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - var url; - if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) { - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]; - } - if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - if (nullOnMissing) { - return null; - } else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, "source"); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - var needle = { - source, - originalLine: util.getArg(aArgs, "line"), - originalColumn: util.getArg(aArgs, "column") - }; - var index2 = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - if (index2 >= 0) { - var mapping = this._originalMappings[index2]; - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, "generatedLine", null), - column: util.getArg(mapping, "generatedColumn", null), - lastColumn: util.getArg(mapping, "lastGeneratedColumn", null) - }; - } - } - return { - line: null, - column: null, - lastColumn: null - }; - }; - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === "string") { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - var version = util.getArg(sourceMap, "version"); - var sections = util.getArg(sourceMap, "sections"); - if (version != this._version) { - throw new Error("Unsupported version: " + version); - } - this._sources = new ArraySet(); - this._names = new ArraySet(); - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function(s) { - if (s.url) { - throw new Error("Support for url field in sections not implemented."); - } - var offset = util.getArg(s, "offset"); - var offsetLine = util.getArg(offset, "line"); - var offsetColumn = util.getArg(offset, "column"); - if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) { - throw new Error("Section offsets must be ordered and non-overlapping."); - } - lastOffset = offset; - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL) - }; - }); - } - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - IndexedSourceMapConsumer.prototype._version = 3; - Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { - get: function() { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, "line"), - generatedColumn: util.getArg(aArgs, "column") - }; - var sectionIndex = binarySearch.search( - needle, - this._sections, - function(needle2, section2) { - var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - return needle2.generatedColumn - section2.generatedOffset.generatedColumn; - } - ); - var section = this._sections[sectionIndex]; - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - return section.consumer.originalPositionFor({ - line: needle.generatedLine - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), - bias: aArgs.bias - }); - }; - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function(s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - if (section.consumer._findSourceIndex(util.getArg(aArgs, "source")) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0) - }; - return ret; - } - } - return { - line: null, - column: null - }; - }; - IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - var source = section.consumer._sources.at(mapping.source); - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - this._sources.add(source); - source = this._sources.indexOf(source); - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - var adjustedMapping = { - source, - generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name - }; - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === "number") { - this.__originalMappings.push(adjustedMapping); - } - } - } - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - } - }); - - // node_modules/source-map/lib/source-node.js - var require_source_node = __commonJS({ - "node_modules/source-map/lib/source-node.js"(exports) { - var SourceMapGenerator = require_source_map_generator().SourceMapGenerator; - var util = require_util(); - var REGEX_NEWLINE = /(\r?\n)/; - var NEWLINE_CODE = 10; - var isSourceNode = "$$$isSourceNode$$$"; - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) - this.add(aChunks); - } - SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - var node = new SourceNode(); - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - var newLine = getNextLine() || ""; - return lineContents + newLine; - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0; - } - }; - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - var lastMapping = null; - aSourceMapConsumer.eachMapping(function(mapping) { - if (lastMapping !== null) { - if (lastGeneratedLine < mapping.generatedLine) { - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - } else { - var nextLine = remainingLines[remainingLinesIndex] || ""; - var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - lastMapping = mapping; - return; - } - } - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ""; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - addMappingWithCode(lastMapping, shiftNextLine()); - } - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - aSourceMapConsumer.sources.forEach(function(sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - return node; - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === void 0) { - node.add(code); - } else { - var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source; - node.add(new SourceNode( - mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name - )); - } - } - }; - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function(chunk) { - this.add(chunk); - }, this); - } else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length - 1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } else { - if (chunk !== "") { - aFn(chunk, { - source: this.source, - line: this.line, - column: this.column, - name: this.name - }); - } - } - } - }; - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len - 1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } else if (typeof lastChild === "string") { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } else { - this.children.push("".replace(aPattern, aReplacement)); - } - return this; - }; - SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function(chunk) { - str += chunk; - }); - return str; - }; - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map3 = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function(chunk, original) { - generated.code += chunk; - if (original.source !== null && original.line !== null && original.column !== null) { - if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) { - map3.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map3.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map3.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function(sourceFile, sourceContent) { - map3.setSourceContent(sourceFile, sourceContent); - }); - return { code: generated.code, map: map3 }; - }; - exports.SourceNode = SourceNode; - } - }); - - // node_modules/source-map/source-map.js - var require_source_map = __commonJS({ - "node_modules/source-map/source-map.js"(exports) { - exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator; - exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer; - exports.SourceNode = require_source_node().SourceNode; - } - }); - - // node_modules/atob/browser-atob.js - var require_browser_atob = __commonJS({ - "node_modules/atob/browser-atob.js"(exports, module) { - (function(w) { - "use strict"; - function findBest(atobNative) { - if ("function" === typeof atobNative) { - return atobNative; - } - if ("function" === typeof Buffer) { - return function atobBrowserify(a) { - return new Buffer(a, "base64").toString("binary"); - }; - } - if ("object" === typeof w.base64js) { - return function atobWebWorker_iOS(a) { - var buf = w.base64js.b64ToByteArray(a); - return Array.prototype.map.call(buf, function(ch) { - return String.fromCharCode(ch); - }).join(""); - }; - } - return function() { - throw new Error("You're probably in an old browser or an iOS webworker. It might help to include beatgammit's base64-js."); - }; - } - var atobBest = findBest(w.atob); - w.atob = atobBest; - if (typeof module === "object" && module && module.exports) { - module.exports = atobBest; - } - })(window); - } - }); - - // (disabled):url - var require_url = __commonJS({ - "(disabled):url"() { - } - }); - - // (disabled):path - var require_path = __commonJS({ - "(disabled):path"() { - } - }); - - // node_modules/decode-uri-component/index.js - var require_decode_uri_component = __commonJS({ - "node_modules/decode-uri-component/index.js"(exports, module) { - "use strict"; - var token = "%[a-f0-9]{2}"; - var singleMatcher = new RegExp("(" + token + ")|([^%]+?)", "gi"); - var multiMatcher = new RegExp("(" + token + ")+", "gi"); - function decodeComponents(components, split) { - try { - return [decodeURIComponent(components.join(""))]; - } catch (err) { - } - if (components.length === 1) { - return components; - } - split = split || 1; - var left = components.slice(0, split); - var right = components.slice(split); - return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right)); - } - function decode(input) { - try { - return decodeURIComponent(input); - } catch (err) { - var tokens = input.match(singleMatcher) || []; - for (var i = 1; i < tokens.length; i++) { - input = decodeComponents(tokens, i).join(""); - tokens = input.match(singleMatcher) || []; - } - return input; - } - } - function customDecodeURIComponent(input) { - var replaceMap = { - "%FE%FF": "\uFFFD\uFFFD", - "%FF%FE": "\uFFFD\uFFFD" - }; - var match = multiMatcher.exec(input); - while (match) { - try { - replaceMap[match[0]] = decodeURIComponent(match[0]); - } catch (err) { - var result = decode(match[0]); - if (result !== match[0]) { - replaceMap[match[0]] = result; - } - } - match = multiMatcher.exec(input); - } - replaceMap["%C2"] = "\uFFFD"; - var entries = Object.keys(replaceMap); - for (var i = 0; i < entries.length; i++) { - var key = entries[i]; - input = input.replace(new RegExp(key, "g"), replaceMap[key]); - } - return input; - } - module.exports = function(encodedURI) { - if (typeof encodedURI !== "string") { - throw new TypeError("Expected `encodedURI` to be of type `string`, got `" + typeof encodedURI + "`"); - } - try { - encodedURI = encodedURI.replace(/\+/g, " "); - return decodeURIComponent(encodedURI); - } catch (err) { - return customDecodeURIComponent(encodedURI); - } - }; - } - }); - - // node_modules/source-map-resolve/index.js - var require_source_map_resolve = __commonJS({ - "node_modules/source-map-resolve/index.js"(exports, module) { - var atob = require_browser_atob(); - var urlLib = require_url(); - var pathLib = require_path(); - var decodeUriComponentLib = require_decode_uri_component(); - function resolveUrl() { - return Array.prototype.reduce.call(arguments, function(resolved, nextUrl) { - return urlLib.resolve(resolved, nextUrl); - }); - } - function convertWindowsPath(aPath) { - return pathLib.sep === "\\" ? aPath.replace(/\\/g, "/").replace(/^[a-z]:\/?/i, "/") : aPath; - } - function customDecodeUriComponent(string) { - return decodeUriComponentLib(string.replace(/\+/g, "%2B")); - } - function callbackAsync(callback, error, result) { - setImmediate(function() { - callback(error, result); - }); - } - function parseMapToJSON(string, data) { - try { - return JSON.parse(string.replace(/^\)\]\}'/, "")); - } catch (error) { - error.sourceMapData = data; - throw error; - } - } - function readSync(read2, url, data) { - var readUrl = customDecodeUriComponent(url); - try { - return String(read2(readUrl)); - } catch (error) { - error.sourceMapData = data; - throw error; - } - } - var innerRegex = /[#@] sourceMappingURL=([^\s'"]*)/; - var sourceMappingURLRegex = RegExp( - "(?:/\\*(?:\\s*\r?\n(?://)?)?(?:" + innerRegex.source + ")\\s*\\*/|//(?:" + innerRegex.source + "))\\s*" - ); - function getSourceMappingUrl(code) { - var match = code.match(sourceMappingURLRegex); - return match ? match[1] || match[2] || "" : null; - } - function resolveSourceMap(code, codeUrl, read2, callback) { - var mapData; - try { - mapData = resolveSourceMapHelper(code, codeUrl); - } catch (error) { - return callbackAsync(callback, error); - } - if (!mapData || mapData.map) { - return callbackAsync(callback, null, mapData); - } - var readUrl = customDecodeUriComponent(mapData.url); - read2(readUrl, function(error, result) { - if (error) { - error.sourceMapData = mapData; - return callback(error); - } - mapData.map = String(result); - try { - mapData.map = parseMapToJSON(mapData.map, mapData); - } catch (error2) { - return callback(error2); - } - callback(null, mapData); - }); - } - function resolveSourceMapSync(code, codeUrl, read2) { - var mapData = resolveSourceMapHelper(code, codeUrl); - if (!mapData || mapData.map) { - return mapData; - } - mapData.map = readSync(read2, mapData.url, mapData); - mapData.map = parseMapToJSON(mapData.map, mapData); - return mapData; - } - var dataUriRegex = /^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/; - var jsonMimeTypeRegex = /^(?:application|text)\/json$/; - var jsonCharacterEncoding = "utf-8"; - function base64ToBuf(b64) { - var binStr = atob(b64); - var len = binStr.length; - var arr = new Uint8Array(len); - for (var i = 0; i < len; i++) { - arr[i] = binStr.charCodeAt(i); - } - return arr; - } - function decodeBase64String(b64) { - if (typeof TextDecoder === "undefined" || typeof Uint8Array === "undefined") { - return atob(b64); - } - var buf = base64ToBuf(b64); - var decoder = new TextDecoder(jsonCharacterEncoding, { fatal: true }); - return decoder.decode(buf); - } - function resolveSourceMapHelper(code, codeUrl) { - codeUrl = convertWindowsPath(codeUrl); - var url = getSourceMappingUrl(code); - if (!url) { - return null; - } - var dataUri = url.match(dataUriRegex); - if (dataUri) { - var mimeType = dataUri[1] || "text/plain"; - var lastParameter = dataUri[2] || ""; - var encoded = dataUri[3] || ""; - var data = { - sourceMappingURL: url, - url: null, - sourcesRelativeTo: codeUrl, - map: encoded - }; - if (!jsonMimeTypeRegex.test(mimeType)) { - var error = new Error("Unuseful data uri mime type: " + mimeType); - error.sourceMapData = data; - throw error; - } - try { - data.map = parseMapToJSON( - lastParameter === ";base64" ? decodeBase64String(encoded) : decodeURIComponent(encoded), - data - ); - } catch (error2) { - error2.sourceMapData = data; - throw error2; - } - return data; - } - var mapUrl = resolveUrl(codeUrl, url); - return { - sourceMappingURL: url, - url: mapUrl, - sourcesRelativeTo: mapUrl, - map: null - }; - } - function resolveSources(map3, mapUrl, read2, options, callback) { - if (typeof options === "function") { - callback = options; - options = {}; - } - var pending = map3.sources ? map3.sources.length : 0; - var result = { - sourcesResolved: [], - sourcesContent: [] - }; - if (pending === 0) { - callbackAsync(callback, null, result); - return; - } - var done = function() { - pending--; - if (pending === 0) { - callback(null, result); - } - }; - resolveSourcesHelper(map3, mapUrl, options, function(fullUrl, sourceContent, index2) { - result.sourcesResolved[index2] = fullUrl; - if (typeof sourceContent === "string") { - result.sourcesContent[index2] = sourceContent; - callbackAsync(done, null); - } else { - var readUrl = customDecodeUriComponent(fullUrl); - read2(readUrl, function(error, source) { - result.sourcesContent[index2] = error ? error : String(source); - done(); - }); - } - }); - } - function resolveSourcesSync(map3, mapUrl, read2, options) { - var result = { - sourcesResolved: [], - sourcesContent: [] - }; - if (!map3.sources || map3.sources.length === 0) { - return result; - } - resolveSourcesHelper(map3, mapUrl, options, function(fullUrl, sourceContent, index2) { - result.sourcesResolved[index2] = fullUrl; - if (read2 !== null) { - if (typeof sourceContent === "string") { - result.sourcesContent[index2] = sourceContent; - } else { - var readUrl = customDecodeUriComponent(fullUrl); - try { - result.sourcesContent[index2] = String(read2(readUrl)); - } catch (error) { - result.sourcesContent[index2] = error; - } - } - } - }); - return result; - } - var endingSlash = /\/?$/; - function resolveSourcesHelper(map3, mapUrl, options, fn) { - options = options || {}; - mapUrl = convertWindowsPath(mapUrl); - var fullUrl; - var sourceContent; - var sourceRoot; - for (var index2 = 0, len = map3.sources.length; index2 < len; index2++) { - sourceRoot = null; - if (typeof options.sourceRoot === "string") { - sourceRoot = options.sourceRoot; - } else if (typeof map3.sourceRoot === "string" && options.sourceRoot !== false) { - sourceRoot = map3.sourceRoot; - } - if (sourceRoot === null || sourceRoot === "") { - fullUrl = resolveUrl(mapUrl, map3.sources[index2]); - } else { - fullUrl = resolveUrl(mapUrl, sourceRoot.replace(endingSlash, "/"), map3.sources[index2]); - } - sourceContent = (map3.sourcesContent || [])[index2]; - fn(fullUrl, sourceContent, index2); - } - } - function resolve(code, codeUrl, read2, options, callback) { - if (typeof options === "function") { - callback = options; - options = {}; - } - if (code === null) { - var mapUrl = codeUrl; - var data = { - sourceMappingURL: null, - url: mapUrl, - sourcesRelativeTo: mapUrl, - map: null - }; - var readUrl = customDecodeUriComponent(mapUrl); - read2(readUrl, function(error, result) { - if (error) { - error.sourceMapData = data; - return callback(error); - } - data.map = String(result); - try { - data.map = parseMapToJSON(data.map, data); - } catch (error2) { - return callback(error2); - } - _resolveSources(data); - }); - } else { - resolveSourceMap(code, codeUrl, read2, function(error, mapData) { - if (error) { - return callback(error); - } - if (!mapData) { - return callback(null, null); - } - _resolveSources(mapData); - }); - } - function _resolveSources(mapData) { - resolveSources(mapData.map, mapData.sourcesRelativeTo, read2, options, function(error, result) { - if (error) { - return callback(error); - } - mapData.sourcesResolved = result.sourcesResolved; - mapData.sourcesContent = result.sourcesContent; - callback(null, mapData); - }); - } - } - function resolveSync(code, codeUrl, read2, options) { - var mapData; - if (code === null) { - var mapUrl = codeUrl; - mapData = { - sourceMappingURL: null, - url: mapUrl, - sourcesRelativeTo: mapUrl, - map: null - }; - mapData.map = readSync(read2, mapUrl, mapData); - mapData.map = parseMapToJSON(mapData.map, mapData); - } else { - mapData = resolveSourceMapSync(code, codeUrl, read2); - if (!mapData) { - return null; - } - } - var result = resolveSourcesSync(mapData.map, mapData.sourcesRelativeTo, read2, options); - mapData.sourcesResolved = result.sourcesResolved; - mapData.sourcesContent = result.sourcesContent; - return mapData; - } - module.exports = { - resolveSourceMap, - resolveSourceMapSync, - resolveSources, - resolveSourcesSync, - resolve, - resolveSync, - parseMapToJSON - }; - } - }); - - // (disabled):fs - var require_fs = __commonJS({ - "(disabled):fs"() { - } - }); - - // node_modules/css/lib/stringify/source-map-support.js - var require_source_map_support = __commonJS({ - "node_modules/css/lib/stringify/source-map-support.js"(exports, module) { - var SourceMap = require_source_map().SourceMapGenerator; - var SourceMapConsumer = require_source_map().SourceMapConsumer; - var sourceMapResolve = require_source_map_resolve(); - var fs = require_fs(); - var path = require_path(); - module.exports = mixin; - var makeFriendlyPath = function(aPath) { - return path.sep === "\\" ? aPath.replace(/\\/g, "/").replace(/^[a-z]:\/?/i, "/") : aPath; - }; - function mixin(compiler) { - compiler._comment = compiler.comment; - compiler.map = new SourceMap(); - compiler.position = { line: 1, column: 1 }; - compiler.files = {}; - for (var k in exports) - compiler[k] = exports[k]; - } - exports.updatePosition = function(str) { - var lines = str.match(/\n/g); - if (lines) - this.position.line += lines.length; - var i = str.lastIndexOf("\n"); - this.position.column = ~i ? str.length - i : this.position.column + str.length; - }; - exports.emit = function(str, pos) { - if (pos) { - var sourceFile = makeFriendlyPath(pos.source || "source.css"); - this.map.addMapping({ - source: sourceFile, - generated: { - line: this.position.line, - column: Math.max(this.position.column - 1, 0) - }, - original: { - line: pos.start.line, - column: pos.start.column - 1 - } - }); - this.addFile(sourceFile, pos); - } - this.updatePosition(str); - return str; - }; - exports.addFile = function(file, pos) { - if (typeof pos.content !== "string") - return; - if (Object.prototype.hasOwnProperty.call(this.files, file)) - return; - this.files[file] = pos.content; - }; - exports.applySourceMaps = function() { - Object.keys(this.files).forEach(function(file) { - var content = this.files[file]; - this.map.setSourceContent(file, content); - if (this.options.inputSourcemaps !== false) { - var originalMap = sourceMapResolve.resolveSync( - content, - file, - fs.readFileSync - ); - if (originalMap) { - var map3 = new SourceMapConsumer(originalMap.map); - var relativeTo = originalMap.sourcesRelativeTo; - this.map.applySourceMap(map3, file, makeFriendlyPath(path.dirname(relativeTo))); - } - } - }, this); - }; - exports.comment = function(node) { - if (/^# sourceMappingURL=/.test(node.comment)) - return this.emit("", node.position); - else - return this._comment(node); - }; - } - }); - - // node_modules/css/lib/stringify/index.js - var require_stringify = __commonJS({ - "node_modules/css/lib/stringify/index.js"(exports, module) { - var Compressed = require_compress(); - var Identity = require_identity(); - module.exports = function(node, options) { - options = options || {}; - var compiler = options.compress ? new Compressed(options) : new Identity(options); - if (options.sourcemap) { - var sourcemaps = require_source_map_support(); - sourcemaps(compiler); - var code = compiler.compile(node); - compiler.applySourceMaps(); - var map3 = options.sourcemap === "generator" ? compiler.map : compiler.map.toJSON(); - return { code, map: map3 }; - } - var code = compiler.compile(node); - return code; - }; - } - }); - - // node_modules/css/index.js - var require_css = __commonJS({ - "node_modules/css/index.js"(exports) { - exports.parse = require_parse(); - exports.stringify = require_stringify(); - } - }); - - // src/commandline_frame.ts - var commandline_frame_exports = {}; - __export(commandline_frame_exports, { - clear: () => clear, - editor_function: () => editor_function, - enableCompletions: () => enableCompletions, - fillcmdline: () => fillcmdline, - focus: () => focus, - getContent: () => getContent, - refresh_completions: () => refresh_completions - }); - - // node_modules/fuse.js/dist/fuse.esm.js - function isArray(value) { - return !Array.isArray ? getTag(value) === "[object Array]" : Array.isArray(value); - } - var INFINITY = 1 / 0; - function baseToString(value) { - if (typeof value == "string") { - return value; - } - let result = value + ""; - return result == "0" && 1 / value == -INFINITY ? "-0" : result; - } - function toString(value) { - return value == null ? "" : baseToString(value); - } - function isString(value) { - return typeof value === "string"; - } - function isNumber(value) { - return typeof value === "number"; - } - function isBoolean(value) { - return value === true || value === false || isObjectLike(value) && getTag(value) == "[object Boolean]"; - } - function isObject(value) { - return typeof value === "object"; - } - function isObjectLike(value) { - return isObject(value) && value !== null; - } - function isDefined(value) { - return value !== void 0 && value !== null; - } - function isBlank(value) { - return !value.trim().length; - } - function getTag(value) { - return value == null ? value === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(value); - } - var INCORRECT_INDEX_TYPE = "Incorrect 'index' type"; - var LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) => `Invalid value for key ${key}`; - var PATTERN_LENGTH_TOO_LARGE = (max) => `Pattern length exceeds max of ${max}.`; - var MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`; - var INVALID_KEY_WEIGHT_VALUE = (key) => `Property 'weight' in key '${key}' must be a positive integer`; - var hasOwn = Object.prototype.hasOwnProperty; - var KeyStore = class { - constructor(keys4) { - this._keys = []; - this._keyMap = {}; - let totalWeight = 0; - keys4.forEach((key) => { - let obj = createKey(key); - totalWeight += obj.weight; - this._keys.push(obj); - this._keyMap[obj.id] = obj; - totalWeight += obj.weight; - }); - this._keys.forEach((key) => { - key.weight /= totalWeight; - }); - } - get(keyId) { - return this._keyMap[keyId]; - } - keys() { - return this._keys; - } - toJSON() { - return JSON.stringify(this._keys); - } - }; - function createKey(key) { - let path = null; - let id2 = null; - let src = null; - let weight = 1; - let getFn = null; - if (isString(key) || isArray(key)) { - src = key; - path = createKeyPath(key); - id2 = createKeyId(key); - } else { - if (!hasOwn.call(key, "name")) { - throw new Error(MISSING_KEY_PROPERTY("name")); - } - const name = key.name; - src = name; - if (hasOwn.call(key, "weight")) { - weight = key.weight; - if (weight <= 0) { - throw new Error(INVALID_KEY_WEIGHT_VALUE(name)); - } - } - path = createKeyPath(name); - id2 = createKeyId(name); - getFn = key.getFn; - } - return { path, id: id2, weight, src, getFn }; - } - function createKeyPath(key) { - return isArray(key) ? key : key.split("."); - } - function createKeyId(key) { - return isArray(key) ? key.join(".") : key; - } - function get(obj, path) { - let list = []; - let arr = false; - const deepGet = (obj2, path2, index2) => { - if (!isDefined(obj2)) { - return; - } - if (!path2[index2]) { - list.push(obj2); - } else { - let key = path2[index2]; - const value = obj2[key]; - if (!isDefined(value)) { - return; - } - if (index2 === path2.length - 1 && (isString(value) || isNumber(value) || isBoolean(value))) { - list.push(toString(value)); - } else if (isArray(value)) { - arr = true; - for (let i = 0, len = value.length; i < len; i += 1) { - deepGet(value[i], path2, index2 + 1); - } - } else if (path2.length) { - deepGet(value, path2, index2 + 1); - } - } - }; - deepGet(obj, isString(path) ? path.split(".") : path, 0); - return arr ? list : list[0]; - } - var MatchOptions = { - // Whether the matches should be included in the result set. When `true`, each record in the result - // set will include the indices of the matched characters. - // These can consequently be used for highlighting purposes. - includeMatches: false, - // When `true`, the matching function will continue to the end of a search pattern even if - // a perfect match has already been located in the string. - findAllMatches: false, - // Minimum number of characters that must be matched before a result is considered a match - minMatchCharLength: 1 - }; - var BasicOptions = { - // When `true`, the algorithm continues searching to the end of the input even if a perfect - // match is found before the end of the same input. - isCaseSensitive: false, - // When true, the matching function will continue to the end of a search pattern even if - includeScore: false, - // List of properties that will be searched. This also supports nested properties. - keys: [], - // Whether to sort the result list, by score - shouldSort: true, - // Default sort function: sort by ascending score, ascending index - sortFn: (a, b) => a.score === b.score ? a.idx < b.idx ? -1 : 1 : a.score < b.score ? -1 : 1 - }; - var FuzzyOptions = { - // Approximately where in the text is the pattern expected to be found? - location: 0, - // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match - // (of both letters and location), a threshold of '1.0' would match anything. - threshold: 0.6, - // Determines how close the match must be to the fuzzy location (specified above). - // An exact letter match which is 'distance' characters away from the fuzzy location - // would score as a complete mismatch. A distance of '0' requires the match be at - // the exact location specified, a threshold of '1000' would require a perfect match - // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold. - distance: 100 - }; - var AdvancedOptions = { - // When `true`, it enables the use of unix-like search commands - useExtendedSearch: false, - // The get function to use when fetching an object's properties. - // The default will search nested paths *ie foo.bar.baz* - getFn: get, - // When `true`, search will ignore `location` and `distance`, so it won't matter - // where in the string the pattern appears. - // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score - ignoreLocation: false, - // When `true`, the calculation for the relevance score (used for sorting) will - // ignore the field-length norm. - // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm - ignoreFieldNorm: false, - // The weight to determine how much field length norm effects scoring. - fieldNormWeight: 1 - }; - var Config = { - ...BasicOptions, - ...MatchOptions, - ...FuzzyOptions, - ...AdvancedOptions - }; - var SPACE = /[^ ]+/g; - function norm(weight = 1, mantissa = 3) { - const cache = /* @__PURE__ */ new Map(); - const m = Math.pow(10, mantissa); - return { - get(value) { - const numTokens = value.match(SPACE).length; - if (cache.has(numTokens)) { - return cache.get(numTokens); - } - const norm2 = 1 / Math.pow(numTokens, 0.5 * weight); - const n = parseFloat(Math.round(norm2 * m) / m); - cache.set(numTokens, n); - return n; - }, - clear() { - cache.clear(); - } - }; - } - var FuseIndex = class { - constructor({ - getFn = Config.getFn, - fieldNormWeight = Config.fieldNormWeight - } = {}) { - this.norm = norm(fieldNormWeight, 3); - this.getFn = getFn; - this.isCreated = false; - this.setIndexRecords(); - } - setSources(docs = []) { - this.docs = docs; - } - setIndexRecords(records = []) { - this.records = records; - } - setKeys(keys4 = []) { - this.keys = keys4; - this._keysMap = {}; - keys4.forEach((key, idx) => { - this._keysMap[key.id] = idx; - }); - } - create() { - if (this.isCreated || !this.docs.length) { - return; - } - this.isCreated = true; - if (isString(this.docs[0])) { - this.docs.forEach((doc, docIndex) => { - this._addString(doc, docIndex); - }); - } else { - this.docs.forEach((doc, docIndex) => { - this._addObject(doc, docIndex); - }); - } - this.norm.clear(); - } - // Adds a doc to the end of the index - add(doc) { - const idx = this.size(); - if (isString(doc)) { - this._addString(doc, idx); - } else { - this._addObject(doc, idx); - } - } - // Removes the doc at the specified index of the index - removeAt(idx) { - this.records.splice(idx, 1); - for (let i = idx, len = this.size(); i < len; i += 1) { - this.records[i].i -= 1; - } - } - getValueForItemAtKeyId(item, keyId) { - return item[this._keysMap[keyId]]; - } - size() { - return this.records.length; - } - _addString(doc, docIndex) { - if (!isDefined(doc) || isBlank(doc)) { - return; - } - let record = { - v: doc, - i: docIndex, - n: this.norm.get(doc) - }; - this.records.push(record); - } - _addObject(doc, docIndex) { - let record = { i: docIndex, $: {} }; - this.keys.forEach((key, keyIndex) => { - let value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path); - if (!isDefined(value)) { - return; - } - if (isArray(value)) { - let subRecords = []; - const stack = [{ nestedArrIndex: -1, value }]; - while (stack.length) { - const { nestedArrIndex, value: value2 } = stack.pop(); - if (!isDefined(value2)) { - continue; - } - if (isString(value2) && !isBlank(value2)) { - let subRecord = { - v: value2, - i: nestedArrIndex, - n: this.norm.get(value2) - }; - subRecords.push(subRecord); - } else if (isArray(value2)) { - value2.forEach((item, k) => { - stack.push({ - nestedArrIndex: k, - value: item - }); - }); - } else - ; - } - record.$[keyIndex] = subRecords; - } else if (isString(value) && !isBlank(value)) { - let subRecord = { - v: value, - n: this.norm.get(value) - }; - record.$[keyIndex] = subRecord; - } - }); - this.records.push(record); - } - toJSON() { - return { - keys: this.keys, - records: this.records - }; - } - }; - function createIndex(keys4, docs, { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}) { - const myIndex = new FuseIndex({ getFn, fieldNormWeight }); - myIndex.setKeys(keys4.map(createKey)); - myIndex.setSources(docs); - myIndex.create(); - return myIndex; - } - function parseIndex(data, { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}) { - const { keys: keys4, records } = data; - const myIndex = new FuseIndex({ getFn, fieldNormWeight }); - myIndex.setKeys(keys4); - myIndex.setIndexRecords(records); - return myIndex; - } - function computeScore$1(pattern, { - errors = 0, - currentLocation = 0, - expectedLocation = 0, - distance = Config.distance, - ignoreLocation = Config.ignoreLocation - } = {}) { - const accuracy = errors / pattern.length; - if (ignoreLocation) { - return accuracy; - } - const proximity = Math.abs(expectedLocation - currentLocation); - if (!distance) { - return proximity ? 1 : accuracy; - } - return accuracy + proximity / distance; - } - function convertMaskToIndices(matchmask = [], minMatchCharLength = Config.minMatchCharLength) { - let indices = []; - let start = -1; - let end = -1; - let i = 0; - for (let len = matchmask.length; i < len; i += 1) { - let match = matchmask[i]; - if (match && start === -1) { - start = i; - } else if (!match && start !== -1) { - end = i - 1; - if (end - start + 1 >= minMatchCharLength) { - indices.push([start, end]); - } - start = -1; - } - } - if (matchmask[i - 1] && i - start >= minMatchCharLength) { - indices.push([start, i - 1]); - } - return indices; - } - var MAX_BITS = 32; - function search(text, pattern, patternAlphabet, { - location = Config.location, - distance = Config.distance, - threshold = Config.threshold, - findAllMatches = Config.findAllMatches, - minMatchCharLength = Config.minMatchCharLength, - includeMatches = Config.includeMatches, - ignoreLocation = Config.ignoreLocation - } = {}) { - if (pattern.length > MAX_BITS) { - throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS)); - } - const patternLen = pattern.length; - const textLen = text.length; - const expectedLocation = Math.max(0, Math.min(location, textLen)); - let currentThreshold = threshold; - let bestLocation = expectedLocation; - const computeMatches = minMatchCharLength > 1 || includeMatches; - const matchMask = computeMatches ? Array(textLen) : []; - let index2; - while ((index2 = text.indexOf(pattern, bestLocation)) > -1) { - let score = computeScore$1(pattern, { - currentLocation: index2, - expectedLocation, - distance, - ignoreLocation - }); - currentThreshold = Math.min(score, currentThreshold); - bestLocation = index2 + patternLen; - if (computeMatches) { - let i = 0; - while (i < patternLen) { - matchMask[index2 + i] = 1; - i += 1; - } - } - } - bestLocation = -1; - let lastBitArr = []; - let finalScore = 1; - let binMax = patternLen + textLen; - const mask = 1 << patternLen - 1; - for (let i = 0; i < patternLen; i += 1) { - let binMin = 0; - let binMid = binMax; - while (binMin < binMid) { - const score2 = computeScore$1(pattern, { - errors: i, - currentLocation: expectedLocation + binMid, - expectedLocation, - distance, - ignoreLocation - }); - if (score2 <= currentThreshold) { - binMin = binMid; - } else { - binMax = binMid; - } - binMid = Math.floor((binMax - binMin) / 2 + binMin); - } - binMax = binMid; - let start = Math.max(1, expectedLocation - binMid + 1); - let finish = findAllMatches ? textLen : Math.min(expectedLocation + binMid, textLen) + patternLen; - let bitArr = Array(finish + 2); - bitArr[finish + 1] = (1 << i) - 1; - for (let j = finish; j >= start; j -= 1) { - let currentLocation = j - 1; - let charMatch = patternAlphabet[text.charAt(currentLocation)]; - if (computeMatches) { - matchMask[currentLocation] = +!!charMatch; - } - bitArr[j] = (bitArr[j + 1] << 1 | 1) & charMatch; - if (i) { - bitArr[j] |= (lastBitArr[j + 1] | lastBitArr[j]) << 1 | 1 | lastBitArr[j + 1]; - } - if (bitArr[j] & mask) { - finalScore = computeScore$1(pattern, { - errors: i, - currentLocation, - expectedLocation, - distance, - ignoreLocation - }); - if (finalScore <= currentThreshold) { - currentThreshold = finalScore; - bestLocation = currentLocation; - if (bestLocation <= expectedLocation) { - break; - } - start = Math.max(1, 2 * expectedLocation - bestLocation); - } - } - } - const score = computeScore$1(pattern, { - errors: i + 1, - currentLocation: expectedLocation, - expectedLocation, - distance, - ignoreLocation - }); - if (score > currentThreshold) { - break; - } - lastBitArr = bitArr; - } - const result = { - isMatch: bestLocation >= 0, - // Count exact matches (those with a score of 0) to be "almost" exact - score: Math.max(1e-3, finalScore) - }; - if (computeMatches) { - const indices = convertMaskToIndices(matchMask, minMatchCharLength); - if (!indices.length) { - result.isMatch = false; - } else if (includeMatches) { - result.indices = indices; - } - } - return result; - } - function createPatternAlphabet(pattern) { - let mask = {}; - for (let i = 0, len = pattern.length; i < len; i += 1) { - const char = pattern.charAt(i); - mask[char] = (mask[char] || 0) | 1 << len - i - 1; - } - return mask; - } - var BitapSearch = class { - constructor(pattern, { - location = Config.location, - threshold = Config.threshold, - distance = Config.distance, - includeMatches = Config.includeMatches, - findAllMatches = Config.findAllMatches, - minMatchCharLength = Config.minMatchCharLength, - isCaseSensitive = Config.isCaseSensitive, - ignoreLocation = Config.ignoreLocation - } = {}) { - this.options = { - location, - threshold, - distance, - includeMatches, - findAllMatches, - minMatchCharLength, - isCaseSensitive, - ignoreLocation - }; - this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase(); - this.chunks = []; - if (!this.pattern.length) { - return; - } - const addChunk = (pattern2, startIndex) => { - this.chunks.push({ - pattern: pattern2, - alphabet: createPatternAlphabet(pattern2), - startIndex - }); - }; - const len = this.pattern.length; - if (len > MAX_BITS) { - let i = 0; - const remainder = len % MAX_BITS; - const end = len - remainder; - while (i < end) { - addChunk(this.pattern.substr(i, MAX_BITS), i); - i += MAX_BITS; - } - if (remainder) { - const startIndex = len - MAX_BITS; - addChunk(this.pattern.substr(startIndex), startIndex); - } - } else { - addChunk(this.pattern, 0); - } - } - searchIn(text) { - const { isCaseSensitive, includeMatches } = this.options; - if (!isCaseSensitive) { - text = text.toLowerCase(); - } - if (this.pattern === text) { - let result2 = { - isMatch: true, - score: 0 - }; - if (includeMatches) { - result2.indices = [[0, text.length - 1]]; - } - return result2; - } - const { - location, - distance, - threshold, - findAllMatches, - minMatchCharLength, - ignoreLocation - } = this.options; - let allIndices = []; - let totalScore = 0; - let hasMatches = false; - this.chunks.forEach(({ pattern, alphabet, startIndex }) => { - const { isMatch, score, indices } = search(text, pattern, alphabet, { - location: location + startIndex, - distance, - threshold, - findAllMatches, - minMatchCharLength, - includeMatches, - ignoreLocation - }); - if (isMatch) { - hasMatches = true; - } - totalScore += score; - if (isMatch && indices) { - allIndices = [...allIndices, ...indices]; - } - }); - let result = { - isMatch: hasMatches, - score: hasMatches ? totalScore / this.chunks.length : 1 - }; - if (hasMatches && includeMatches) { - result.indices = allIndices; - } - return result; - } - }; - var BaseMatch = class { - constructor(pattern) { - this.pattern = pattern; - } - static isMultiMatch(pattern) { - return getMatch(pattern, this.multiRegex); - } - static isSingleMatch(pattern) { - return getMatch(pattern, this.singleRegex); - } - search() { - } - }; - function getMatch(pattern, exp) { - const matches = pattern.match(exp); - return matches ? matches[1] : null; - } - var ExactMatch = class extends BaseMatch { - constructor(pattern) { - super(pattern); - } - static get type() { - return "exact"; - } - static get multiRegex() { - return /^="(.*)"$/; - } - static get singleRegex() { - return /^=(.*)$/; - } - search(text) { - const isMatch = text === this.pattern; - return { - isMatch, - score: isMatch ? 0 : 1, - indices: [0, this.pattern.length - 1] - }; - } - }; - var InverseExactMatch = class extends BaseMatch { - constructor(pattern) { - super(pattern); - } - static get type() { - return "inverse-exact"; - } - static get multiRegex() { - return /^!"(.*)"$/; - } - static get singleRegex() { - return /^!(.*)$/; - } - search(text) { - const index2 = text.indexOf(this.pattern); - const isMatch = index2 === -1; - return { - isMatch, - score: isMatch ? 0 : 1, - indices: [0, text.length - 1] - }; - } - }; - var PrefixExactMatch = class extends BaseMatch { - constructor(pattern) { - super(pattern); - } - static get type() { - return "prefix-exact"; - } - static get multiRegex() { - return /^\^"(.*)"$/; - } - static get singleRegex() { - return /^\^(.*)$/; - } - search(text) { - const isMatch = text.startsWith(this.pattern); - return { - isMatch, - score: isMatch ? 0 : 1, - indices: [0, this.pattern.length - 1] - }; - } - }; - var InversePrefixExactMatch = class extends BaseMatch { - constructor(pattern) { - super(pattern); - } - static get type() { - return "inverse-prefix-exact"; - } - static get multiRegex() { - return /^!\^"(.*)"$/; - } - static get singleRegex() { - return /^!\^(.*)$/; - } - search(text) { - const isMatch = !text.startsWith(this.pattern); - return { - isMatch, - score: isMatch ? 0 : 1, - indices: [0, text.length - 1] - }; - } - }; - var SuffixExactMatch = class extends BaseMatch { - constructor(pattern) { - super(pattern); - } - static get type() { - return "suffix-exact"; - } - static get multiRegex() { - return /^"(.*)"\$$/; - } - static get singleRegex() { - return /^(.*)\$$/; - } - search(text) { - const isMatch = text.endsWith(this.pattern); - return { - isMatch, - score: isMatch ? 0 : 1, - indices: [text.length - this.pattern.length, text.length - 1] - }; - } - }; - var InverseSuffixExactMatch = class extends BaseMatch { - constructor(pattern) { - super(pattern); - } - static get type() { - return "inverse-suffix-exact"; - } - static get multiRegex() { - return /^!"(.*)"\$$/; - } - static get singleRegex() { - return /^!(.*)\$$/; - } - search(text) { - const isMatch = !text.endsWith(this.pattern); - return { - isMatch, - score: isMatch ? 0 : 1, - indices: [0, text.length - 1] - }; - } - }; - var FuzzyMatch = class extends BaseMatch { - constructor(pattern, { - location = Config.location, - threshold = Config.threshold, - distance = Config.distance, - includeMatches = Config.includeMatches, - findAllMatches = Config.findAllMatches, - minMatchCharLength = Config.minMatchCharLength, - isCaseSensitive = Config.isCaseSensitive, - ignoreLocation = Config.ignoreLocation - } = {}) { - super(pattern); - this._bitapSearch = new BitapSearch(pattern, { - location, - threshold, - distance, - includeMatches, - findAllMatches, - minMatchCharLength, - isCaseSensitive, - ignoreLocation - }); - } - static get type() { - return "fuzzy"; - } - static get multiRegex() { - return /^"(.*)"$/; - } - static get singleRegex() { - return /^(.*)$/; - } - search(text) { - return this._bitapSearch.searchIn(text); - } - }; - var IncludeMatch = class extends BaseMatch { - constructor(pattern) { - super(pattern); - } - static get type() { - return "include"; - } - static get multiRegex() { - return /^'"(.*)"$/; - } - static get singleRegex() { - return /^'(.*)$/; - } - search(text) { - let location = 0; - let index2; - const indices = []; - const patternLen = this.pattern.length; - while ((index2 = text.indexOf(this.pattern, location)) > -1) { - location = index2 + patternLen; - indices.push([index2, location - 1]); - } - const isMatch = !!indices.length; - return { - isMatch, - score: isMatch ? 0 : 1, - indices - }; - } - }; - var searchers = [ - ExactMatch, - IncludeMatch, - PrefixExactMatch, - InversePrefixExactMatch, - InverseSuffixExactMatch, - SuffixExactMatch, - InverseExactMatch, - FuzzyMatch - ]; - var searchersLen = searchers.length; - var SPACE_RE = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/; - var OR_TOKEN = "|"; - function parseQuery(pattern, options = {}) { - return pattern.split(OR_TOKEN).map((item) => { - let query2 = item.trim().split(SPACE_RE).filter((item2) => item2 && !!item2.trim()); - let results = []; - for (let i = 0, len = query2.length; i < len; i += 1) { - const queryItem = query2[i]; - let found = false; - let idx = -1; - while (!found && ++idx < searchersLen) { - const searcher = searchers[idx]; - let token = searcher.isMultiMatch(queryItem); - if (token) { - results.push(new searcher(token, options)); - found = true; - } - } - if (found) { - continue; - } - idx = -1; - while (++idx < searchersLen) { - const searcher = searchers[idx]; - let token = searcher.isSingleMatch(queryItem); - if (token) { - results.push(new searcher(token, options)); - break; - } - } - } - return results; - }); - } - var MultiMatchSet = /* @__PURE__ */ new Set([FuzzyMatch.type, IncludeMatch.type]); - var ExtendedSearch = class { - constructor(pattern, { - isCaseSensitive = Config.isCaseSensitive, - includeMatches = Config.includeMatches, - minMatchCharLength = Config.minMatchCharLength, - ignoreLocation = Config.ignoreLocation, - findAllMatches = Config.findAllMatches, - location = Config.location, - threshold = Config.threshold, - distance = Config.distance - } = {}) { - this.query = null; - this.options = { - isCaseSensitive, - includeMatches, - minMatchCharLength, - findAllMatches, - ignoreLocation, - location, - threshold, - distance - }; - this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase(); - this.query = parseQuery(this.pattern, this.options); - } - static condition(_, options) { - return options.useExtendedSearch; - } - searchIn(text) { - const query2 = this.query; - if (!query2) { - return { - isMatch: false, - score: 1 - }; - } - const { includeMatches, isCaseSensitive } = this.options; - text = isCaseSensitive ? text : text.toLowerCase(); - let numMatches = 0; - let allIndices = []; - let totalScore = 0; - for (let i = 0, qLen = query2.length; i < qLen; i += 1) { - const searchers2 = query2[i]; - allIndices.length = 0; - numMatches = 0; - for (let j = 0, pLen = searchers2.length; j < pLen; j += 1) { - const searcher = searchers2[j]; - const { isMatch, indices, score } = searcher.search(text); - if (isMatch) { - numMatches += 1; - totalScore += score; - if (includeMatches) { - const type3 = searcher.constructor.type; - if (MultiMatchSet.has(type3)) { - allIndices = [...allIndices, ...indices]; - } else { - allIndices.push(indices); - } - } - } else { - totalScore = 0; - numMatches = 0; - allIndices.length = 0; - break; - } - } - if (numMatches) { - let result = { - isMatch: true, - score: totalScore / numMatches - }; - if (includeMatches) { - result.indices = allIndices; - } - return result; - } - } - return { - isMatch: false, - score: 1 - }; - } - }; - var registeredSearchers = []; - function register(...args) { - registeredSearchers.push(...args); - } - function createSearcher(pattern, options) { - for (let i = 0, len = registeredSearchers.length; i < len; i += 1) { - let searcherClass = registeredSearchers[i]; - if (searcherClass.condition(pattern, options)) { - return new searcherClass(pattern, options); - } - } - return new BitapSearch(pattern, options); - } - var LogicalOperator = { - AND: "$and", - OR: "$or" - }; - var KeyType = { - PATH: "$path", - PATTERN: "$val" - }; - var isExpression = (query2) => !!(query2[LogicalOperator.AND] || query2[LogicalOperator.OR]); - var isPath = (query2) => !!query2[KeyType.PATH]; - var isLeaf = (query2) => !isArray(query2) && isObject(query2) && !isExpression(query2); - var convertToExplicit = (query2) => ({ - [LogicalOperator.AND]: Object.keys(query2).map((key) => ({ - [key]: query2[key] - })) - }); - function parse(query2, options, { auto = true } = {}) { - const next = (query3) => { - let keys4 = Object.keys(query3); - const isQueryPath = isPath(query3); - if (!isQueryPath && keys4.length > 1 && !isExpression(query3)) { - return next(convertToExplicit(query3)); - } - if (isLeaf(query3)) { - const key = isQueryPath ? query3[KeyType.PATH] : keys4[0]; - const pattern = isQueryPath ? query3[KeyType.PATTERN] : query3[key]; - if (!isString(pattern)) { - throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key)); - } - const obj = { - keyId: createKeyId(key), - pattern - }; - if (auto) { - obj.searcher = createSearcher(pattern, options); - } - return obj; - } - let node = { - children: [], - operator: keys4[0] - }; - keys4.forEach((key) => { - const value = query3[key]; - if (isArray(value)) { - value.forEach((item) => { - node.children.push(next(item)); - }); - } - }); - return node; - }; - if (!isExpression(query2)) { - query2 = convertToExplicit(query2); - } - return next(query2); - } - function computeScore(results, { ignoreFieldNorm = Config.ignoreFieldNorm }) { - results.forEach((result) => { - let totalScore = 1; - result.matches.forEach(({ key, norm: norm2, score }) => { - const weight = key ? key.weight : null; - totalScore *= Math.pow( - score === 0 && weight ? Number.EPSILON : score, - (weight || 1) * (ignoreFieldNorm ? 1 : norm2) - ); - }); - result.score = totalScore; - }); - } - function transformMatches(result, data) { - const matches = result.matches; - data.matches = []; - if (!isDefined(matches)) { - return; - } - matches.forEach((match) => { - if (!isDefined(match.indices) || !match.indices.length) { - return; - } - const { indices, value } = match; - let obj = { - indices, - value - }; - if (match.key) { - obj.key = match.key.src; - } - if (match.idx > -1) { - obj.refIndex = match.idx; - } - data.matches.push(obj); - }); - } - function transformScore(result, data) { - data.score = result.score; - } - function format(results, docs, { - includeMatches = Config.includeMatches, - includeScore = Config.includeScore - } = {}) { - const transformers = []; - if (includeMatches) - transformers.push(transformMatches); - if (includeScore) - transformers.push(transformScore); - return results.map((result) => { - const { idx } = result; - const data = { - item: docs[idx], - refIndex: idx - }; - if (transformers.length) { - transformers.forEach((transformer) => { - transformer(result, data); - }); - } - return data; - }); - } - var Fuse = class { - constructor(docs, options = {}, index2) { - this.options = { ...Config, ...options }; - if (this.options.useExtendedSearch && false) { - throw new Error(EXTENDED_SEARCH_UNAVAILABLE); - } - this._keyStore = new KeyStore(this.options.keys); - this.setCollection(docs, index2); - } - setCollection(docs, index2) { - this._docs = docs; - if (index2 && !(index2 instanceof FuseIndex)) { - throw new Error(INCORRECT_INDEX_TYPE); - } - this._myIndex = index2 || createIndex(this.options.keys, this._docs, { - getFn: this.options.getFn, - fieldNormWeight: this.options.fieldNormWeight - }); - } - add(doc) { - if (!isDefined(doc)) { - return; - } - this._docs.push(doc); - this._myIndex.add(doc); - } - remove(predicate = () => false) { - const results = []; - for (let i = 0, len = this._docs.length; i < len; i += 1) { - const doc = this._docs[i]; - if (predicate(doc, i)) { - this.removeAt(i); - i -= 1; - len -= 1; - results.push(doc); - } - } - return results; - } - removeAt(idx) { - this._docs.splice(idx, 1); - this._myIndex.removeAt(idx); - } - getIndex() { - return this._myIndex; - } - search(query2, { limit = -1 } = {}) { - const { - includeMatches, - includeScore, - shouldSort, - sortFn, - ignoreFieldNorm - } = this.options; - let results = isString(query2) ? isString(this._docs[0]) ? this._searchStringList(query2) : this._searchObjectList(query2) : this._searchLogical(query2); - computeScore(results, { ignoreFieldNorm }); - if (shouldSort) { - results.sort(sortFn); - } - if (isNumber(limit) && limit > -1) { - results = results.slice(0, limit); - } - return format(results, this._docs, { - includeMatches, - includeScore - }); - } - _searchStringList(query2) { - const searcher = createSearcher(query2, this.options); - const { records } = this._myIndex; - const results = []; - records.forEach(({ v: text, i: idx, n: norm2 }) => { - if (!isDefined(text)) { - return; - } - const { isMatch, score, indices } = searcher.searchIn(text); - if (isMatch) { - results.push({ - item: text, - idx, - matches: [{ score, value: text, norm: norm2, indices }] - }); - } - }); - return results; - } - _searchLogical(query2) { - const expression = parse(query2, this.options); - const evaluate = (node, item, idx) => { - if (!node.children) { - const { keyId, searcher } = node; - const matches = this._findMatches({ - key: this._keyStore.get(keyId), - value: this._myIndex.getValueForItemAtKeyId(item, keyId), - searcher - }); - if (matches && matches.length) { - return [ - { - idx, - item, - matches - } - ]; - } - return []; - } - const res = []; - for (let i = 0, len = node.children.length; i < len; i += 1) { - const child = node.children[i]; - const result = evaluate(child, item, idx); - if (result.length) { - res.push(...result); - } else if (node.operator === LogicalOperator.AND) { - return []; - } - } - return res; - }; - const records = this._myIndex.records; - const resultMap = {}; - const results = []; - records.forEach(({ $: item, i: idx }) => { - if (isDefined(item)) { - let expResults = evaluate(expression, item, idx); - if (expResults.length) { - if (!resultMap[idx]) { - resultMap[idx] = { idx, item, matches: [] }; - results.push(resultMap[idx]); - } - expResults.forEach(({ matches }) => { - resultMap[idx].matches.push(...matches); - }); - } - } - }); - return results; - } - _searchObjectList(query2) { - const searcher = createSearcher(query2, this.options); - const { keys: keys4, records } = this._myIndex; - const results = []; - records.forEach(({ $: item, i: idx }) => { - if (!isDefined(item)) { - return; - } - let matches = []; - keys4.forEach((key, keyIndex) => { - matches.push( - ...this._findMatches({ - key, - value: item[keyIndex], - searcher - }) - ); - }); - if (matches.length) { - results.push({ - idx, - item, - matches - }); - } - }); - return results; - } - _findMatches({ key, value, searcher }) { - if (!isDefined(value)) { - return []; - } - let matches = []; - if (isArray(value)) { - value.forEach(({ v: text, i: idx, n: norm2 }) => { - if (!isDefined(text)) { - return; - } - const { isMatch, score, indices } = searcher.searchIn(text); - if (isMatch) { - matches.push({ - score, - key, - value: text, - idx, - norm: norm2, - indices - }); - } - }); - } else { - const { v: text, n: norm2 } = value; - const { isMatch, score, indices } = searcher.searchIn(text); - if (isMatch) { - matches.push({ score, key, value: text, norm: norm2, indices }); - } - } - return matches; - } - }; - Fuse.version = "6.6.2"; - Fuse.createIndex = createIndex; - Fuse.parseIndex = parseIndex; - Fuse.config = Config; - { - Fuse.parseQuery = parse; - } - { - register(ExtendedSearch); - } - - // src/lib/number.mod.ts - Number.prototype.mod = function(n) { - return knuth_mod(this, n); - }; - function knuth_mod(dividend, divisor) { - return dividend - divisor * Math.floor(dividend / divisor); - } - - // src/lib/itertools.ts - function head(iterable) { - const iterator = iterable[Symbol.iterator](); - const result = iterator.next(); - if (result.done) - throw RangeError("Empty iterator has no head/tail"); - else - return result.value; - } - function* filter(iter, predicate) { - for (const v of iter) { - if (predicate(v)) - yield v; - } - } - function find(iter, predicate) { - return head(filter(iter, predicate)); - } - function* enumerate(iterable) { - let index2 = 0; - for (const element of iterable) { - yield [index2, element]; - index2++; - } - } - function* izip(...arrays) { - const iterators = arrays.map((e) => e[Symbol.iterator]()); - const box = Array(arrays.length); - for (let v of iterators[0]) { - box[0] = v; - let i; - try { - for ([i, v] of enumerate(iterators.slice(1))) { - box[i + 1] = head(v); - } - yield [...box]; - } catch (e) { - return; - } - } - } - - // src/lib/convert.ts - function toNumber(s) { - const n = Number(s); - if (isNaN(n)) - throw new Error("Not a number! " + s); - else - return n; - } - - // node_modules/ramda/es/internal/_isPlaceholder.js - function _isPlaceholder(a) { - return a != null && typeof a === "object" && a["@@functional/placeholder"] === true; - } - - // node_modules/ramda/es/internal/_curry1.js - function _curry1(fn) { - return function f1(a) { - if (arguments.length === 0 || _isPlaceholder(a)) { - return f1; - } else { - return fn.apply(this, arguments); - } - }; - } - - // node_modules/ramda/es/internal/_curry2.js - function _curry2(fn) { - return function f2(a, b) { - switch (arguments.length) { - case 0: - return f2; - case 1: - return _isPlaceholder(a) ? f2 : _curry1(function(_b) { - return fn(a, _b); - }); - default: - return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function(_a) { - return fn(_a, b); - }) : _isPlaceholder(b) ? _curry1(function(_b) { - return fn(a, _b); - }) : fn(a, b); - } - }; - } - - // node_modules/ramda/es/internal/_arity.js - function _arity(n, fn) { - switch (n) { - case 0: - return function() { - return fn.apply(this, arguments); - }; - case 1: - return function(a0) { - return fn.apply(this, arguments); - }; - case 2: - return function(a0, a1) { - return fn.apply(this, arguments); - }; - case 3: - return function(a0, a1, a2) { - return fn.apply(this, arguments); - }; - case 4: - return function(a0, a1, a2, a3) { - return fn.apply(this, arguments); - }; - case 5: - return function(a0, a1, a2, a3, a4) { - return fn.apply(this, arguments); - }; - case 6: - return function(a0, a1, a2, a3, a4, a5) { - return fn.apply(this, arguments); - }; - case 7: - return function(a0, a1, a2, a3, a4, a5, a6) { - return fn.apply(this, arguments); - }; - case 8: - return function(a0, a1, a2, a3, a4, a5, a6, a7) { - return fn.apply(this, arguments); - }; - case 9: - return function(a0, a1, a2, a3, a4, a5, a6, a7, a8) { - return fn.apply(this, arguments); - }; - case 10: - return function(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { - return fn.apply(this, arguments); - }; - default: - throw new Error("First argument to _arity must be a non-negative integer no greater than ten"); - } - } - - // node_modules/ramda/es/internal/_curryN.js - function _curryN(length, received, fn) { - return function() { - var combined = []; - var argsIdx = 0; - var left = length; - var combinedIdx = 0; - while (combinedIdx < received.length || argsIdx < arguments.length) { - var result; - if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) { - result = received[combinedIdx]; - } else { - result = arguments[argsIdx]; - argsIdx += 1; - } - combined[combinedIdx] = result; - if (!_isPlaceholder(result)) { - left -= 1; - } - combinedIdx += 1; - } - return left <= 0 ? fn.apply(this, combined) : _arity(left, _curryN(length, combined, fn)); - }; - } - - // node_modules/ramda/es/curryN.js - var curryN = /* @__PURE__ */ _curry2(function curryN2(length, fn) { - if (length === 1) { - return _curry1(fn); - } - return _arity(length, _curryN(length, [], fn)); - }); - var curryN_default = curryN; - - // node_modules/ramda/es/internal/_curry3.js - function _curry3(fn) { - return function f3(a, b, c) { - switch (arguments.length) { - case 0: - return f3; - case 1: - return _isPlaceholder(a) ? f3 : _curry2(function(_b, _c) { - return fn(a, _b, _c); - }); - case 2: - return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function(_a, _c) { - return fn(_a, b, _c); - }) : _isPlaceholder(b) ? _curry2(function(_b, _c) { - return fn(a, _b, _c); - }) : _curry1(function(_c) { - return fn(a, b, _c); - }); - default: - return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function(_a, _b) { - return fn(_a, _b, c); - }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function(_a, _c) { - return fn(_a, b, _c); - }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function(_b, _c) { - return fn(a, _b, _c); - }) : _isPlaceholder(a) ? _curry1(function(_a) { - return fn(_a, b, c); - }) : _isPlaceholder(b) ? _curry1(function(_b) { - return fn(a, _b, c); - }) : _isPlaceholder(c) ? _curry1(function(_c) { - return fn(a, b, _c); - }) : fn(a, b, c); - } - }; - } - - // node_modules/ramda/es/internal/_isArray.js - var isArray_default = Array.isArray || function _isArray(val) { - return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]"; - }; - - // node_modules/ramda/es/internal/_isTransformer.js - function _isTransformer(obj) { - return obj != null && typeof obj["@@transducer/step"] === "function"; - } - - // node_modules/ramda/es/internal/_dispatchable.js - function _dispatchable(methodNames, transducerCreator, fn) { - return function() { - if (arguments.length === 0) { - return fn(); - } - var obj = arguments[arguments.length - 1]; - if (!isArray_default(obj)) { - var idx = 0; - while (idx < methodNames.length) { - if (typeof obj[methodNames[idx]] === "function") { - return obj[methodNames[idx]].apply(obj, Array.prototype.slice.call(arguments, 0, -1)); - } - idx += 1; - } - if (_isTransformer(obj)) { - var transducer = transducerCreator.apply(null, Array.prototype.slice.call(arguments, 0, -1)); - return transducer(obj); - } - } - return fn.apply(this, arguments); - }; - } - - // node_modules/ramda/es/internal/_xfBase.js - var xfBase_default = { - init: function() { - return this.xf["@@transducer/init"](); - }, - result: function(result) { - return this.xf["@@transducer/result"](result); - } - }; - - // node_modules/ramda/es/internal/_map.js - function _map(fn, functor) { - var idx = 0; - var len = functor.length; - var result = Array(len); - while (idx < len) { - result[idx] = fn(functor[idx]); - idx += 1; - } - return result; - } - - // node_modules/ramda/es/internal/_isString.js - function _isString(x) { - return Object.prototype.toString.call(x) === "[object String]"; - } - - // node_modules/ramda/es/internal/_isArrayLike.js - var _isArrayLike = /* @__PURE__ */ _curry1(function isArrayLike(x) { - if (isArray_default(x)) { - return true; - } - if (!x) { - return false; - } - if (typeof x !== "object") { - return false; - } - if (_isString(x)) { - return false; - } - if (x.length === 0) { - return true; - } - if (x.length > 0) { - return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1); - } - return false; - }); - var isArrayLike_default = _isArrayLike; - - // node_modules/ramda/es/internal/_xwrap.js - var XWrap = /* @__PURE__ */ function() { - function XWrap2(fn) { - this.f = fn; - } - XWrap2.prototype["@@transducer/init"] = function() { - throw new Error("init not implemented on XWrap"); - }; - XWrap2.prototype["@@transducer/result"] = function(acc) { - return acc; - }; - XWrap2.prototype["@@transducer/step"] = function(acc, x) { - return this.f(acc, x); - }; - return XWrap2; - }(); - function _xwrap(fn) { - return new XWrap(fn); - } - - // node_modules/ramda/es/bind.js - var bind = /* @__PURE__ */ _curry2(function bind2(fn, thisObj) { - return _arity(fn.length, function() { - return fn.apply(thisObj, arguments); - }); - }); - var bind_default = bind; - - // node_modules/ramda/es/internal/_reduce.js - function _arrayReduce(xf, acc, list) { - var idx = 0; - var len = list.length; - while (idx < len) { - acc = xf["@@transducer/step"](acc, list[idx]); - if (acc && acc["@@transducer/reduced"]) { - acc = acc["@@transducer/value"]; - break; - } - idx += 1; - } - return xf["@@transducer/result"](acc); - } - function _iterableReduce(xf, acc, iter) { - var step = iter.next(); - while (!step.done) { - acc = xf["@@transducer/step"](acc, step.value); - if (acc && acc["@@transducer/reduced"]) { - acc = acc["@@transducer/value"]; - break; - } - step = iter.next(); - } - return xf["@@transducer/result"](acc); - } - function _methodReduce(xf, acc, obj, methodName) { - return xf["@@transducer/result"](obj[methodName](bind_default(xf["@@transducer/step"], xf), acc)); - } - var symIterator = typeof Symbol !== "undefined" ? Symbol.iterator : "@@iterator"; - function _reduce(fn, acc, list) { - if (typeof fn === "function") { - fn = _xwrap(fn); - } - if (isArrayLike_default(list)) { - return _arrayReduce(fn, acc, list); - } - if (typeof list["fantasy-land/reduce"] === "function") { - return _methodReduce(fn, acc, list, "fantasy-land/reduce"); - } - if (list[symIterator] != null) { - return _iterableReduce(fn, acc, list[symIterator]()); - } - if (typeof list.next === "function") { - return _iterableReduce(fn, acc, list); - } - if (typeof list.reduce === "function") { - return _methodReduce(fn, acc, list, "reduce"); - } - throw new TypeError("reduce: list must be array or iterable"); - } - - // node_modules/ramda/es/internal/_xmap.js - var XMap = /* @__PURE__ */ function() { - function XMap2(f, xf) { - this.xf = xf; - this.f = f; - } - XMap2.prototype["@@transducer/init"] = xfBase_default.init; - XMap2.prototype["@@transducer/result"] = xfBase_default.result; - XMap2.prototype["@@transducer/step"] = function(result, input) { - return this.xf["@@transducer/step"](result, this.f(input)); - }; - return XMap2; - }(); - var _xmap = /* @__PURE__ */ _curry2(function _xmap2(f, xf) { - return new XMap(f, xf); - }); - var xmap_default = _xmap; - - // node_modules/ramda/es/internal/_has.js - function _has(prop, obj) { - return Object.prototype.hasOwnProperty.call(obj, prop); - } - - // node_modules/ramda/es/internal/_isArguments.js - var toString2 = Object.prototype.toString; - var _isArguments = /* @__PURE__ */ function() { - return toString2.call(arguments) === "[object Arguments]" ? function _isArguments2(x) { - return toString2.call(x) === "[object Arguments]"; - } : function _isArguments2(x) { - return _has("callee", x); - }; - }(); - var isArguments_default = _isArguments; - - // node_modules/ramda/es/keys.js - var hasEnumBug = !/* @__PURE__ */ { - toString: null - }.propertyIsEnumerable("toString"); - var nonEnumerableProps = ["constructor", "valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString"]; - var hasArgsEnumBug = /* @__PURE__ */ function() { - "use strict"; - return arguments.propertyIsEnumerable("length"); - }(); - var contains = function contains2(list, item) { - var idx = 0; - while (idx < list.length) { - if (list[idx] === item) { - return true; - } - idx += 1; - } - return false; - }; - var keys = typeof Object.keys === "function" && !hasArgsEnumBug ? /* @__PURE__ */ _curry1(function keys2(obj) { - return Object(obj) !== obj ? [] : Object.keys(obj); - }) : /* @__PURE__ */ _curry1(function keys3(obj) { - if (Object(obj) !== obj) { - return []; - } - var prop, nIdx; - var ks = []; - var checkArgsLength = hasArgsEnumBug && isArguments_default(obj); - for (prop in obj) { - if (_has(prop, obj) && (!checkArgsLength || prop !== "length")) { - ks[ks.length] = prop; - } - } - if (hasEnumBug) { - nIdx = nonEnumerableProps.length - 1; - while (nIdx >= 0) { - prop = nonEnumerableProps[nIdx]; - if (_has(prop, obj) && !contains(ks, prop)) { - ks[ks.length] = prop; - } - nIdx -= 1; - } - } - return ks; - }); - var keys_default = keys; - - // node_modules/ramda/es/map.js - var map = /* @__PURE__ */ _curry2( - /* @__PURE__ */ _dispatchable(["fantasy-land/map", "map"], xmap_default, function map2(fn, functor) { - switch (Object.prototype.toString.call(functor)) { - case "[object Function]": - return curryN_default(functor.length, function() { - return fn.call(this, functor.apply(this, arguments)); - }); - case "[object Object]": - return _reduce(function(acc, key) { - acc[key] = fn(functor[key]); - return acc; - }, {}, keys_default(functor)); - default: - return _map(fn, functor); - } - }) - ); - var map_default = map; - - // node_modules/ramda/es/internal/_isInteger.js - var isInteger_default = Number.isInteger || function _isInteger(n) { - return n << 0 === n; - }; - - // node_modules/ramda/es/reduce.js - var reduce = /* @__PURE__ */ _curry3(_reduce); - var reduce_default = reduce; - - // node_modules/ramda/es/type.js - var type = /* @__PURE__ */ _curry1(function type2(val) { - return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1); - }); - var type_default = type; - - // node_modules/ramda/es/internal/_pipe.js - function _pipe(f, g) { - return function() { - return g.call(this, f.apply(this, arguments)); - }; - } - - // node_modules/ramda/es/internal/_checkForMethod.js - function _checkForMethod(methodname, fn) { - return function() { - var length = arguments.length; - if (length === 0) { - return fn(); - } - var obj = arguments[length - 1]; - return isArray_default(obj) || typeof obj[methodname] !== "function" ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1)); - }; - } - - // node_modules/ramda/es/slice.js - var slice = /* @__PURE__ */ _curry3( - /* @__PURE__ */ _checkForMethod("slice", function slice2(fromIndex, toIndex, list) { - return Array.prototype.slice.call(list, fromIndex, toIndex); - }) - ); - var slice_default = slice; - - // node_modules/ramda/es/tail.js - var tail = /* @__PURE__ */ _curry1( - /* @__PURE__ */ _checkForMethod( - "tail", - /* @__PURE__ */ slice_default(1, Infinity) - ) - ); - var tail_default = tail; - - // node_modules/ramda/es/pipe.js - function pipe() { - if (arguments.length === 0) { - throw new Error("pipe requires at least one argument"); - } - return _arity(arguments[0].length, reduce_default(_pipe, arguments[0], tail_default(arguments))); - } - - // node_modules/ramda/es/reverse.js - var reverse = /* @__PURE__ */ _curry1(function reverse2(list) { - return _isString(list) ? list.split("").reverse().join("") : Array.prototype.slice.call(list, 0).reverse(); - }); - var reverse_default = reverse; - - // node_modules/ramda/es/internal/_identity.js - function _identity(x) { - return x; - } - - // node_modules/ramda/es/identity.js - var identity = /* @__PURE__ */ _curry1(_identity); - var identity_default = identity; - - // node_modules/ramda/es/internal/_arrayFromIterator.js - function _arrayFromIterator(iter) { - var list = []; - var next; - while (!(next = iter.next()).done) { - list.push(next.value); - } - return list; - } - - // node_modules/ramda/es/internal/_includesWith.js - function _includesWith(pred, x, list) { - var idx = 0; - var len = list.length; - while (idx < len) { - if (pred(x, list[idx])) { - return true; - } - idx += 1; - } - return false; - } - - // node_modules/ramda/es/internal/_functionName.js - function _functionName(f) { - var match = String(f).match(/^function (\w*)/); - return match == null ? "" : match[1]; - } - - // node_modules/ramda/es/internal/_objectIs.js - function _objectIs(a, b) { - if (a === b) { - return a !== 0 || 1 / a === 1 / b; - } else { - return a !== a && b !== b; - } - } - var objectIs_default = typeof Object.is === "function" ? Object.is : _objectIs; - - // node_modules/ramda/es/internal/_equals.js - function _uniqContentEquals(aIterator, bIterator, stackA, stackB) { - var a = _arrayFromIterator(aIterator); - var b = _arrayFromIterator(bIterator); - function eq(_a, _b) { - return _equals(_a, _b, stackA.slice(), stackB.slice()); - } - return !_includesWith(function(b2, aItem) { - return !_includesWith(eq, aItem, b2); - }, b, a); - } - function _equals(a, b, stackA, stackB) { - if (objectIs_default(a, b)) { - return true; - } - var typeA = type_default(a); - if (typeA !== type_default(b)) { - return false; - } - if (typeof a["fantasy-land/equals"] === "function" || typeof b["fantasy-land/equals"] === "function") { - return typeof a["fantasy-land/equals"] === "function" && a["fantasy-land/equals"](b) && typeof b["fantasy-land/equals"] === "function" && b["fantasy-land/equals"](a); - } - if (typeof a.equals === "function" || typeof b.equals === "function") { - return typeof a.equals === "function" && a.equals(b) && typeof b.equals === "function" && b.equals(a); - } - switch (typeA) { - case "Arguments": - case "Array": - case "Object": - if (typeof a.constructor === "function" && _functionName(a.constructor) === "Promise") { - return a === b; - } - break; - case "Boolean": - case "Number": - case "String": - if (!(typeof a === typeof b && objectIs_default(a.valueOf(), b.valueOf()))) { - return false; - } - break; - case "Date": - if (!objectIs_default(a.valueOf(), b.valueOf())) { - return false; - } - break; - case "Error": - return a.name === b.name && a.message === b.message; - case "RegExp": - if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) { - return false; - } - break; - } - var idx = stackA.length - 1; - while (idx >= 0) { - if (stackA[idx] === a) { - return stackB[idx] === b; - } - idx -= 1; - } - switch (typeA) { - case "Map": - if (a.size !== b.size) { - return false; - } - return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b])); - case "Set": - if (a.size !== b.size) { - return false; - } - return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b])); - case "Arguments": - case "Array": - case "Object": - case "Boolean": - case "Number": - case "String": - case "Date": - case "Error": - case "RegExp": - case "Int8Array": - case "Uint8Array": - case "Uint8ClampedArray": - case "Int16Array": - case "Uint16Array": - case "Int32Array": - case "Uint32Array": - case "Float32Array": - case "Float64Array": - case "ArrayBuffer": - break; - default: - return false; - } - var keysA = keys_default(a); - if (keysA.length !== keys_default(b).length) { - return false; - } - var extendedStackA = stackA.concat([a]); - var extendedStackB = stackB.concat([b]); - idx = keysA.length - 1; - while (idx >= 0) { - var key = keysA[idx]; - if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) { - return false; - } - idx -= 1; - } - return true; - } - - // node_modules/ramda/es/equals.js - var equals = /* @__PURE__ */ _curry2(function equals2(a, b) { - return _equals(a, b, [], []); - }); - var equals_default = equals; - - // node_modules/ramda/es/internal/_indexOf.js - function _indexOf(list, a, idx) { - var inf, item; - if (typeof list.indexOf === "function") { - switch (typeof a) { - case "number": - if (a === 0) { - inf = 1 / a; - while (idx < list.length) { - item = list[idx]; - if (item === 0 && 1 / item === inf) { - return idx; - } - idx += 1; - } - return -1; - } else if (a !== a) { - while (idx < list.length) { - item = list[idx]; - if (typeof item === "number" && item !== item) { - return idx; - } - idx += 1; - } - return -1; - } - return list.indexOf(a, idx); - case "string": - case "boolean": - case "function": - case "undefined": - return list.indexOf(a, idx); - case "object": - if (a === null) { - return list.indexOf(a, idx); - } - } - } - while (idx < list.length) { - if (equals_default(list[idx], a)) { - return idx; - } - idx += 1; - } - return -1; - } - - // node_modules/ramda/es/internal/_includes.js - function _includes(a, list) { - return _indexOf(list, a, 0) >= 0; - } - - // node_modules/ramda/es/internal/_toISOString.js - var pad = function pad2(n) { - return (n < 10 ? "0" : "") + n; - }; - var _toISOString = typeof Date.prototype.toISOString === "function" ? function _toISOString2(d) { - return d.toISOString(); - } : function _toISOString3(d) { - return d.getUTCFullYear() + "-" + pad(d.getUTCMonth() + 1) + "-" + pad(d.getUTCDate()) + "T" + pad(d.getUTCHours()) + ":" + pad(d.getUTCMinutes()) + ":" + pad(d.getUTCSeconds()) + "." + (d.getUTCMilliseconds() / 1e3).toFixed(3).slice(2, 5) + "Z"; - }; - - // node_modules/ramda/es/internal/_complement.js - function _complement(f) { - return function() { - return !f.apply(this, arguments); - }; - } - - // node_modules/ramda/es/internal/_filter.js - function _filter(fn, list) { - var idx = 0; - var len = list.length; - var result = []; - while (idx < len) { - if (fn(list[idx])) { - result[result.length] = list[idx]; - } - idx += 1; - } - return result; - } - - // node_modules/ramda/es/internal/_isObject.js - function _isObject(x) { - return Object.prototype.toString.call(x) === "[object Object]"; - } - - // node_modules/ramda/es/internal/_xfilter.js - var XFilter = /* @__PURE__ */ function() { - function XFilter2(f, xf) { - this.xf = xf; - this.f = f; - } - XFilter2.prototype["@@transducer/init"] = xfBase_default.init; - XFilter2.prototype["@@transducer/result"] = xfBase_default.result; - XFilter2.prototype["@@transducer/step"] = function(result, input) { - return this.f(input) ? this.xf["@@transducer/step"](result, input) : result; - }; - return XFilter2; - }(); - var _xfilter = /* @__PURE__ */ _curry2(function _xfilter2(f, xf) { - return new XFilter(f, xf); - }); - var xfilter_default = _xfilter; - - // node_modules/ramda/es/filter.js - var filter2 = /* @__PURE__ */ _curry2( - /* @__PURE__ */ _dispatchable(["fantasy-land/filter", "filter"], xfilter_default, function(pred, filterable) { - return _isObject(filterable) ? _reduce(function(acc, key) { - if (pred(filterable[key])) { - acc[key] = filterable[key]; - } - return acc; - }, {}, keys_default(filterable)) : ( - // else - _filter(pred, filterable) - ); - }) - ); - var filter_default = filter2; - - // node_modules/ramda/es/reject.js - var reject = /* @__PURE__ */ _curry2(function reject2(pred, filterable) { - return filter_default(_complement(pred), filterable); - }); - var reject_default = reject; - - // node_modules/ramda/es/internal/_Set.js - var _Set = /* @__PURE__ */ function() { - function _Set2() { - this._nativeSet = typeof Set === "function" ? /* @__PURE__ */ new Set() : null; - this._items = {}; - } - _Set2.prototype.add = function(item) { - return !hasOrAdd(item, true, this); - }; - _Set2.prototype.has = function(item) { - return hasOrAdd(item, false, this); - }; - return _Set2; - }(); - function hasOrAdd(item, shouldAdd, set) { - var type3 = typeof item; - var prevSize, newSize; - switch (type3) { - case "string": - case "number": - if (item === 0 && 1 / item === -Infinity) { - if (set._items["-0"]) { - return true; - } else { - if (shouldAdd) { - set._items["-0"] = true; - } - return false; - } - } - if (set._nativeSet !== null) { - if (shouldAdd) { - prevSize = set._nativeSet.size; - set._nativeSet.add(item); - newSize = set._nativeSet.size; - return newSize === prevSize; - } else { - return set._nativeSet.has(item); - } - } else { - if (!(type3 in set._items)) { - if (shouldAdd) { - set._items[type3] = {}; - set._items[type3][item] = true; - } - return false; - } else if (item in set._items[type3]) { - return true; - } else { - if (shouldAdd) { - set._items[type3][item] = true; - } - return false; - } - } - case "boolean": - if (type3 in set._items) { - var bIdx = item ? 1 : 0; - if (set._items[type3][bIdx]) { - return true; - } else { - if (shouldAdd) { - set._items[type3][bIdx] = true; - } - return false; - } - } else { - if (shouldAdd) { - set._items[type3] = item ? [false, true] : [true, false]; - } - return false; - } - case "function": - if (set._nativeSet !== null) { - if (shouldAdd) { - prevSize = set._nativeSet.size; - set._nativeSet.add(item); - newSize = set._nativeSet.size; - return newSize === prevSize; - } else { - return set._nativeSet.has(item); - } - } else { - if (!(type3 in set._items)) { - if (shouldAdd) { - set._items[type3] = [item]; - } - return false; - } - if (!_includes(item, set._items[type3])) { - if (shouldAdd) { - set._items[type3].push(item); - } - return false; - } - return true; - } - case "undefined": - if (set._items[type3]) { - return true; - } else { - if (shouldAdd) { - set._items[type3] = true; - } - return false; - } - case "object": - if (item === null) { - if (!set._items["null"]) { - if (shouldAdd) { - set._items["null"] = true; - } - return false; - } - return true; - } - default: - type3 = Object.prototype.toString.call(item); - if (!(type3 in set._items)) { - if (shouldAdd) { - set._items[type3] = [item]; - } - return false; - } - if (!_includes(item, set._items[type3])) { - if (shouldAdd) { - set._items[type3].push(item); - } - return false; - } - return true; - } - } - var Set_default = _Set; - - // node_modules/ramda/es/internal/_xuniqBy.js - var XUniqBy = /* @__PURE__ */ function() { - function XUniqBy2(f, xf) { - this.xf = xf; - this.f = f; - this.set = new Set_default(); - } - XUniqBy2.prototype["@@transducer/init"] = xfBase_default.init; - XUniqBy2.prototype["@@transducer/result"] = xfBase_default.result; - XUniqBy2.prototype["@@transducer/step"] = function(result, input) { - return this.set.add(this.f(input)) ? this.xf["@@transducer/step"](result, input) : result; - }; - return XUniqBy2; - }(); - var _xuniqBy = /* @__PURE__ */ _curry2(function _xuniqBy2(f, xf) { - return new XUniqBy(f, xf); - }); - var xuniqBy_default = _xuniqBy; - - // node_modules/ramda/es/uniqBy.js - var uniqBy = /* @__PURE__ */ _curry2( - /* @__PURE__ */ _dispatchable([], xuniqBy_default, function(fn, list) { - var set = new Set_default(); - var result = []; - var idx = 0; - var appliedItem, item; - while (idx < list.length) { - item = list[idx]; - appliedItem = fn(item); - if (set.add(appliedItem)) { - result.push(item); - } - idx += 1; - } - return result; - }) - ); - var uniqBy_default = uniqBy; - - // node_modules/ramda/es/uniq.js - var uniq = /* @__PURE__ */ uniqBy_default(identity_default); - var uniq_default = uniq; - - // node_modules/ramda/es/internal/_objectAssign.js - function _objectAssign(target) { - if (target == null) { - throw new TypeError("Cannot convert undefined or null to object"); - } - var output = Object(target); - var idx = 1; - var length = arguments.length; - while (idx < length) { - var source = arguments[idx]; - if (source != null) { - for (var nextKey in source) { - if (_has(nextKey, source)) { - output[nextKey] = source[nextKey]; - } - } - } - idx += 1; - } - return output; - } - var objectAssign_default = typeof Object.assign === "function" ? Object.assign : _objectAssign; - - // node_modules/ramda/es/is.js - var is = /* @__PURE__ */ _curry2(function is2(Ctor, val) { - return val instanceof Ctor || val != null && (val.constructor === Ctor || Ctor.name === "Object" && typeof val === "object"); - }); - var is_default = is; - - // node_modules/ramda/es/mergeLeft.js - var mergeLeft = /* @__PURE__ */ _curry2(function mergeLeft2(l, r) { - return objectAssign_default({}, r, l); - }); - var mergeLeft_default = mergeLeft; - - // node_modules/ramda/es/mergeRight.js - var mergeRight = /* @__PURE__ */ _curry2(function mergeRight2(l, r) { - return objectAssign_default({}, l, r); - }); - var mergeRight_default = mergeRight; - - // node_modules/ramda/es/pick.js - var pick = /* @__PURE__ */ _curry2(function pick2(names, obj) { - var result = {}; - var idx = 0; - while (idx < names.length) { - if (names[idx] in obj) { - result[names[idx]] = obj[names[idx]]; - } - idx += 1; - } - return result; - }); - var pick_default = pick; - - // node_modules/ramda/es/trim.js - var hasProtoTrim = typeof String.prototype.trim === "function"; - - // node_modules/ramda/es/when.js - var when = /* @__PURE__ */ _curry3(function when2(pred, whenTrueFn, x) { - return pred(x) ? whenTrueFn(x) : x; - }); - var when_default = when; - - // src/lib/nearley_utils.ts - var nearley = __toESM(require_nearley()); - var Parser2 = class { - /* public results */ - constructor(grammar2) { - this.parser = new nearley.Parser(nearley.Grammar.fromCompiled(grammar2)); - this.initial_state = this.parser.save(); - } - feedUntilError(input) { - let lastResult; - let consumedIndex = 0; - try { - for (const val of input) { - this.parser.feed(val); - lastResult = this.parser.results[0]; - consumedIndex++; - } - } finally { - this.reset(); - if (lastResult === void 0) { - throw new Error("Error: no result!"); - } else { - return [lastResult, input.slice(consumedIndex)]; - } - } - } - reset() { - this.parser.restore(this.initial_state); - } - /* feed(input) { */ - /* return this.parser.feed(input) */ - /* } */ - }; - - // src/grammars/.bracketexpr.generated.ts - function id(d) { - return d[0]; - } - var grammar = { - Lexer: void 0, - ParserRules: [ - { "name": "BracketExpr", "symbols": [{ "literal": "<" }, "Modifier", "ModKey", { "literal": ">" }], "postprocess": (bexpr) => bexpr.slice(1, -1) }, - { "name": "BracketExpr", "symbols": [{ "literal": "<" }, "Key", { "literal": ">" }], "postprocess": (bexpr) => [{}].concat(bexpr.slice(1, -1)) }, - { "name": "Modifier$ebnf$1", "symbols": [/[acmsACMS]/], "postprocess": id }, - { "name": "Modifier$ebnf$1", "symbols": [], "postprocess": () => null }, - { "name": "Modifier$ebnf$2", "symbols": [/[acmsACMS]/], "postprocess": id }, - { "name": "Modifier$ebnf$2", "symbols": [], "postprocess": () => null }, - { "name": "Modifier$ebnf$3", "symbols": [/[acmsACMS]/], "postprocess": id }, - { "name": "Modifier$ebnf$3", "symbols": [], "postprocess": () => null }, - { "name": "Modifier$ebnf$4", "symbols": [/[acmsACMS]/], "postprocess": id }, - { "name": "Modifier$ebnf$4", "symbols": [], "postprocess": () => null }, - { - "name": "Modifier", - "symbols": ["Modifier$ebnf$1", "Modifier$ebnf$2", "Modifier$ebnf$3", "Modifier$ebnf$4", { "literal": "-" }], - "postprocess": ( - /** For each modifier present, - add its long name as an attribute set to true to an object */ - (mods, _, reject3) => { - const longNames = /* @__PURE__ */ new Map([ - ["A", "altKey"], - ["C", "ctrlKey"], - ["M", "metaKey"], - ["S", "shiftKey"] - ]); - let modifiersObj = {}; - for (let mod of mods) { - if (mod === null || mod === "-") - continue; - let longName = longNames.get(mod.toUpperCase()); - if (longName) { - if (longName in modifiersObj) - return reject3; - else - modifiersObj[longName] = true; - } - } - return modifiersObj; - } - ) - }, - { "name": "ModKey", "symbols": [{ "literal": "<" }], "postprocess": id }, - { "name": "ModKey", "symbols": [{ "literal": ">" }], "postprocess": id }, - { "name": "ModKey", "symbols": [{ "literal": "-" }], "postprocess": id }, - { "name": "ModKey", "symbols": ["Key"], "postprocess": id }, - { "name": "Key$ebnf$1", "symbols": [/[^\s<>-]/] }, - { "name": "Key$ebnf$1", "symbols": ["Key$ebnf$1", /[^\s<>-]/], "postprocess": (d) => d[0].concat([d[1]]) }, - { "name": "Key", "symbols": ["Key$ebnf$1"], "postprocess": (key) => key[0].join("") } - ], - ParserStart: "BracketExpr" - }; - var bracketexpr_generated_default = grammar; - - // src/lib/keyseq.ts - var bracketexpr_grammar = bracketexpr_generated_default; - var bracketexpr_parser = new Parser2(bracketexpr_grammar); - var KEYCODETRANSLATEMAP = {}; - var modifiers = /* @__PURE__ */ new Map([ - ["A", "altKey"], - ["C", "ctrlKey"], - ["M", "metaKey"], - ["S", "shiftKey"] - ]); - var MinimalKey = class { - constructor(key, modifiers2) { - this.key = key; - this.altKey = false; - this.ctrlKey = false; - this.metaKey = false; - this.shiftKey = false; - this.translated = false; - if (modifiers2 !== void 0) { - for (const mod of Object.keys(modifiers2)) { - if (this.key.length === 1 && this.key !== " " && mod === "shiftKey") - continue; - this[mod] = modifiers2[mod]; - } - } - } - /** Does this key match another MinimalKey */ - match(keyevent) { - if (this.key !== keyevent.key) - return false; - for (const [_, attr] of modifiers.entries()) { - if (this[attr] !== keyevent[attr]) - return false; - } - return true; - } - translate(keytranslatemap) { - let newkey = keytranslatemap[this.key]; - if (newkey === void 0 || this.translated) - newkey = this.key; - const result = new MinimalKey(newkey, { - altKey: this.altKey, - ctrlKey: this.ctrlKey, - metaKey: this.metaKey, - shiftKey: this.shiftKey - }); - result.translated = true; - return result; - } - toMapstr() { - let str = ""; - let needsBrackets = this.key.length > 1; - for (const [letter, attr] of modifiers.entries()) { - if (this[attr]) { - str += letter; - needsBrackets = true; - } - } - if (str) { - str += "-"; - } - let key = this.key; - if (key === " ") { - key = "Space"; - needsBrackets = true; - } - str += key; - if (needsBrackets) { - str = "<" + str + ">"; - } - return str; - } - isPrintable() { - return this.key.length === 1; - } - }; - function splitNumericPrefix(keyseq) { - if (!hasModifiers(keyseq[0]) && [1, 2, 3, 4, 5, 6, 7, 8, 9].includes(Number(keyseq[0].key))) { - const prefix = [keyseq[0]]; - for (const ke of keyseq.slice(1)) { - if (!hasModifiers(ke) && [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].includes(Number(ke.key))) - prefix.push(ke); - else - break; - } - const rest2 = keyseq.slice(prefix.length); - return [prefix, rest2]; - } else { - return [[], keyseq]; - } - } - function stripOnlyModifiers(keyseq) { - return keyseq.filter( - (key) => !["Control", "Shift", "Alt", "AltGraph", "Meta"].includes(key.key) - ); - } - function parse2(keyseq, map3) { - keyseq = stripOnlyModifiers(keyseq); - if (keyseq.length === 0) - return { keys: [], isMatch: false }; - let numericPrefix; - [numericPrefix, keyseq] = splitNumericPrefix(keyseq); - let possibleMappings = completions(keyseq, map3); - while (possibleMappings.size === 0 && keyseq.length > 0) { - keyseq.shift(); - numericPrefix = []; - possibleMappings = completions(keyseq, map3); - } - if (possibleMappings.size > 0) { - try { - const perfect = find( - possibleMappings, - ([k, _v]) => k.length === keyseq.length - ); - return { - value: perfect[1], - exstr: perfect[1] + numericPrefixToExstrSuffix(numericPrefix), - isMatch: true, - numericPrefix: numericPrefix.length ? Number(numericPrefix.map((ke) => ke.key).join("")) : void 0, - keys: [] - }; - } catch (e) { - if (!(e instanceof RangeError)) - throw e; - } - } - return { keys: numericPrefix.concat(keyseq), isMatch: keyseq.length > 0 }; - } - function prefixes(seq1, seq2) { - if (seq1.length > seq2.length) { - return false; - } else { - for (const [key1, key2] of izip(seq1, seq2)) { - if (!key2.match(key1)) - return false; - } - return true; - } - } - function completions(keyseq, map3) { - return new Map( - filter(map3.entries(), ([ks, _maptarget]) => prefixes(keyseq, ks)) - ); - } - function expandAliases(key) { - const aliases = { - cr: "Enter", - esc: "Escape", - return: "Enter", - enter: "Enter", - space: " ", - bar: "|", - del: "Delete", - bs: "Backspace", - lt: "<" - }; - if (key.toLowerCase() in aliases) - return aliases[key.toLowerCase()]; - else - return key; - } - function bracketexprToKey(inputStr) { - if (inputStr.indexOf(">") > 0) { - try { - const [[modifiers2, key], remainder] = bracketexpr_parser.feedUntilError(inputStr); - return [new MinimalKey(expandAliases(key), modifiers2), remainder]; - } catch (e) { - return [new MinimalKey("<"), inputStr.slice(1)]; - } - } else { - return [new MinimalKey("<"), inputStr.slice(1)]; - } - } - function mapstrToKeyseq(mapstr) { - const keyseq = []; - let key; - while (mapstr.length) { - if (mapstr[0] === "<") { - ; - [key, mapstr] = bracketexprToKey(mapstr); - keyseq.push(key); - } else { - keyseq.push(new MinimalKey(mapstr[0])); - mapstr = mapstr.slice(1); - } - } - return keyseq; - } - function mapstrMapToKeyMap(mapstrMap) { - const newKeyMap = /* @__PURE__ */ new Map(); - for (const [mapstr, target] of mapstrMap.entries()) { - newKeyMap.set(mapstrToKeyseq(mapstr), target); - } - return newKeyMap; - } - var KEYMAP_CACHE = {}; - function keyMap(conf) { - if (KEYMAP_CACHE[conf]) - return KEYMAP_CACHE[conf]; - if (!INITIALISED) - return /* @__PURE__ */ new Map(); - const mapobj = get2(conf); - if (mapobj === void 0) - throw new Error( - "No binds defined for this mode. Reload page with and add binds, e.g. :bind --mode=[mode] mode normal" - ); - const maps = new Map(Object.entries(mapobj)); - KEYMAP_CACHE[conf] = mapstrMapToKeyMap(maps); - return KEYMAP_CACHE[conf]; - } - function hasModifiers(keyEvent) { - return keyEvent.ctrlKey || keyEvent.altKey || keyEvent.metaKey || keyEvent.shiftKey; - } - function numericPrefixToExstrSuffix(numericPrefix) { - if (numericPrefix.length > 0) { - return " " + numericPrefix.map((k) => k.key).join(""); - } else { - return ""; - } - } - function minimalKeyFromKeyboardEvent(keyEvent) { - const modifiers2 = { - altKey: keyEvent.altKey, - ctrlKey: keyEvent.ctrlKey, - metaKey: keyEvent.metaKey, - shiftKey: keyEvent.shiftKey - }; - if (get2("keyboardlayoutforce") === "true") { - Object.keys(KEYCODETRANSLATEMAP).length === 0 && updateBaseLayout(); - let newkey = keyEvent.key; - const translation = KEYCODETRANSLATEMAP[keyEvent.code]; - if (translation) - newkey = translation[+keyEvent.shiftKey]; - return new MinimalKey(newkey, modifiers2); - } - const result = new MinimalKey(keyEvent.key, modifiers2); - if (get2("usekeytranslatemap") === "true") { - const translationmap = get2("keytranslatemap"); - return result.translate(translationmap); - } - return result; - } - browser.storage.onChanged.addListener((changes) => { - if ("userconfig" in changes) { - KEYMAP_CACHE = {}; - } - }); - function updateBaseLayout() { - KEYCODETRANSLATEMAP = mergeRight_default( - keyboardlayouts[get2("keyboardlayoutbase")], - get2("keyboardlayoutoverrides") - ); - } - - // src/lib/binding.ts - var mode2maps = /* @__PURE__ */ new Map([ - ["normal", "nmaps"], - ["ignore", "ignoremaps"], - ["insert", "imaps"], - ["input", "inputmaps"], - ["ex", "exmaps"], - ["hint", "hintmaps"], - ["visual", "vmaps"], - ["browser", "browsermaps"] - ]); - var maps2mode = new Map( - Array.from(mode2maps.keys()).map((k) => [mode2maps.get(k), k]) - ); - var modes = Array.from(mode2maps.keys()); - var modeMaps = Array.from(maps2mode.keys()); - - // src/lib/platform.ts - function getPlatformOs() { - const platform = navigator.platform; - const mapping = { - win: "Win", - openbsd: "BSD", - mac: "Mac", - linux: "Linux" - }; - return keys_default( - filter_default((x) => platform.includes(x), mapping) - )[0]; - } - - // src/lib/config.ts - var removeNull = when_default( - is_default(Object), - pipe( - // Ramda gives an error here without the any - reject_default((val) => val === null), - map_default((a) => removeNull(a)) - ) - ); - var CONFIGNAME = "userconfig"; - var WAITERS = []; - var INITIALISED = false; - function o(object) { - return Object.assign(/* @__PURE__ */ Object.create(null), object); - } - function schlepp(settings) { - Object.assign(USERCONFIG, settings); - } - var USERCONFIG = o({}); - var default_config = class { - constructor() { - /** - * Internal version number Tridactyl uses to know whether it needs to update from old versions of the configuration. - * - * Changing this might do weird stuff. - */ - this.configversion = "0.0"; - /** - * Internal field to handle site-specific configs. Use :seturl/:unseturl to change these values. - */ - this.subconfigs = { - "www.google.com": { - followpagepatterns: { - next: "Next", - prev: "Previous" - } - }, - "^https://web.whatsapp.com": { - nmaps: { - f: "hint -c [tabindex]:not(.two)>div,a", - F: "hint -bc [tabindex]:not(.two)>div,a" - } - } - }; - /** - * Internal field to handle mode-specific configs. Use :setmode/:unsetmode to change these values. - * - * Changing this might do weird stuff. - */ - this.modesubconfigs = { - normal: {}, - insert: {}, - input: {}, - ignore: {}, - ex: {}, - hint: {}, - visual: {} - }; - /** - * Internal field to handle site-specific config priorities. Use :seturl/:unseturl to change this value. - */ - this.priority = 0; - // Note to developers: When creating new maps, make sure to make the modifier uppercase (e.g. instead of ) otherwise some commands might not be able to find them (e.g. `bind `) - /** - * exmaps contains all of the bindings for the command line. - * You can of course bind regular ex commands but also [editor functions](/static/docs/modules/_src_lib_editor_.html) and [commandline-specific functions](/static/docs/modules/_src_commandline_frame_.html). - */ - this.exmaps = { - "": "ex.accept_line", - "": "ex.execute_ex_on_completion", - "": "ex.accept_line", - "": "ex.accept_line", - "": "ex.hide_and_clear", - "": "ex.hide_and_clear", - "": "ex.prev_history", - "": "ex.next_history", - "": "ex.execute_ex_on_completion_args tabclose", - "": "text.backward_word", - "": "text.forward_word", - "": "text.end_of_line", - "": "text.kill_word", - "": "text.backward_kill_word", - "": "text.backward_kill_line", - "": "text.kill_line", - "": "ex.complete", - "": "ex.next_completion", - "": "ex.prev_completion", - "": "ex.insert_space_or_completion", - "": "ex.insert_space", - "yy": "ex.execute_ex_on_completion_args clipboard yank", - "t": "ex.execute_ex_on_completion_args tabopen -b", - "w": "ex.execute_ex_on_completion_args winopen" - }; - /** - * ignoremaps contain all of the bindings for "ignore mode". - * - * They consist of key sequences mapped to ex commands. - */ - this.ignoremaps = { - "": "mode normal", - "": "mode normal", - "": "mode normal", - "": "mode normal", - "": "nmode normal 1 mode ignore" - }; - /** - * imaps contain all of the bindings for "insert mode". - * - * On top of regular ex commands, you can also bind [editor functions](/static/docs/modules/_src_lib_editor_.html) in insert mode. - * - * They consist of key sequences mapped to ex commands. - */ - this.imaps = { - "": "composite unfocus | mode normal", - "": "composite unfocus | mode normal", - "": "editor", - "": "mode normal", - "": "mode normal", - "": "mode ignore" - }; - /** - * inputmaps contain all of the bindings for "input mode". - * - * On top of regular ex commands, you can also bind [editor functions](/static/docs/modules/_src_lib_editor_.html) in input mode. - * - * They consist of key sequences mapped to ex commands. - */ - this.inputmaps = { - "": "focusinput -n", - "": "focusinput -N", - /** - * Config objects with this key inherit their keys from the object specified. - * - * Only supports "root" objects. Subconfigs (`seturl`) work as expected. - * - * Here, this means that input mode is the same as insert mode except it has added binds for tab and shift-tab. - */ - "\u{1F577}\u{1F577}INHERITS\u{1F577}\u{1F577}": "imaps" - }; - /** - * Disable Tridactyl almost completely within a page, e.g. `seturl ^https?://mail.google.com disable true`. Only takes affect on page reload. - * - * You are usually better off using `blacklistadd` and `seturl [url] noiframe true` as you can then still use some Tridactyl binds, e.g. `shift-insert` for exiting ignore mode. - * - * NB: you should only use this with `seturl`. If you get trapped with Tridactyl disabled everywhere just run `tri unset superignore` in the Firefox address bar. If that still doesn't fix things, you can totally reset Tridactyl by running `tri help superignore` in the Firefox address bar, scrolling to the bottom of that page and then clicking "Reset Tridactyl config". - */ - this.superignore = "false"; - /** - * nmaps contain all of the bindings for "normal mode". - * - * They consist of key sequences mapped to ex commands. - */ - this.nmaps = { - "": "pin", - "": "mute toggle", - "": "help", - o: "fillcmdline open", - O: "current_url open", - w: "fillcmdline winopen", - W: "current_url winopen", - t: "fillcmdline tabopen", - "]]": "followpage next", - "[[": "followpage prev", - "[c": "urlincrement -1", - "]c": "urlincrement 1", - "": "urlincrement -1", - "": "urlincrement 1", - T: "current_url tabopen", - yy: "clipboard yank", - ys: "clipboard yankshort", - yq: "text2qr --timeout 5", - yc: "clipboard yankcanon", - ym: "clipboard yankmd", - yo: "clipboard yankorg", - yt: "clipboard yanktitle", - gh: "home", - gH: "home true", - p: "clipboard open", - P: "clipboard tabopen", - j: "scrollline 10", - "": "scrollline 10", - k: "scrollline -10", - "": "scrollline -10", - h: "scrollpx -50", - l: "scrollpx 50", - G: "scrollto 100", - gg: "scrollto 0", - "": "scrollpage -0.5", - "": "scrollpage 0.5", - "": "scrollpage 1", - "": "scrollpage -1", - "": "nmode ignore 1 mode normal", - // Is this a terrible idea? Pentadactyl did it http://bug.5digits.org/help/pentadactyl/browsing.xhtml#send-key - $: "scrollto 100 x", - // "0": "scrollto 0 x", // will get interpreted as a count - "^": "scrollto 0 x", - H: "back", - L: "forward", - "": "jumpprev", - "": "jumpnext", - d: "tabclose", - D: "composite tabprev; tabclose #", - gx0: "tabclosealltoleft", - gx$: "tabclosealltoright", - "<<": "tabmove -1", - ">>": "tabmove +1", - u: "undo", - U: "undo window", - r: "reload", - R: "reloadhard", - x: "stop", - gi: "focusinput -l", - "g?": "rot13", - "g!": "jumble", - "g;": "changelistjump -1", - J: "tabprev", - K: "tabnext", - gt: "tabnext_gt", - gT: "tabprev", - // "": "tabnext_gt", // c-n is reserved for new window - // "": "tabprev", - "g^": "tabfirst", - g0: "tabfirst", - g$: "tablast", - ga: "tabaudio", - gr: "reader --old", - gu: "urlparent", - gU: "urlroot", - gf: "viewsource", - ":": "fillcmdline_notrail", - s: "fillcmdline open search", - S: "fillcmdline tabopen search", - // find mode not suitable for general consumption yet. - // "/": "fillcmdline find", - // "?": "fillcmdline find -?", - // n: "findnext 1", - // N: "findnext -1", - // ",": "nohlsearch", - M: "gobble 1 quickmark", - B: "fillcmdline taball", - b: "fillcmdline tab", - ZZ: "qall", - f: "hint", - F: "hint -b", - gF: "hint -qb", - ";i": "hint -i", - ";b": "hint -b", - ";o": "hint", - ";I": "hint -I", - ";k": "hint -k", - ";K": "hint -K", - ";y": "hint -y", - ";Y": "hint -cF img i => tri.excmds.yankimage(tri.urlutils.getAbsoluteURL(i.src))", - ";p": "hint -p", - ";h": "hint -h", - v: "hint -h", - // Easiest way of entering visual mode for now. Expect this bind to change - ";P": "hint -P", - ";r": "hint -r", - ";s": "hint -s", - ";S": "hint -S", - ";a": "hint -a", - ";A": "hint -A", - ";;": "hint -; *", - ";#": "hint -#", - ";v": "hint -W mpvsafe", - ";V": "hint -V", - ";w": "hint -w", - ";t": "hint -W tabopen", - ";O": "hint -W fillcmdline_notrail open ", - ";W": "hint -W fillcmdline_notrail winopen ", - ";T": "hint -W fillcmdline_notrail tabopen ", - ";d": "hint -W tabopen --discard", - ";gd": "hint -qW tabopen --discard", - ";z": "hint -z", - ";m": "hint -JFc img i => tri.excmds.open('https://lens.google.com/uploadbyurl?url='+i.src)", - ";M": "hint -JFc img i => tri.excmds.tabopen('https://lens.google.com/uploadbyurl?url='+i.src)", - ";gi": "hint -qi", - ";gI": "hint -qI", - ";gk": "hint -qk", - ";gy": "hint -qy", - ";gp": "hint -qp", - ";gP": "hint -qP", - ";gr": "hint -qr", - ";gs": "hint -qs", - ";gS": "hint -qS", - ";ga": "hint -qa", - ";gA": "hint -qA", - ";g;": "hint -q;", - ";g#": "hint -q#", - ";gv": "hint -qW mpvsafe", - ";gw": "hint -qw", - ";gb": "hint -qb", - // These two don't strictly follow the "bind is ;g[flag]" rule but they make sense - ";gF": "hint -qb", - ";gf": "hint -q", - "": "mode ignore", - "": "mode ignore", - "": "mode ignore", - "": "mode ignore", - "": "composite mode normal ; hidecmdline", - "": "composite mode normal ; hidecmdline", - a: "current_url bmark", - A: "bmark", - zi: "zoom 0.1 true", - zo: "zoom -0.1 true", - zm: "zoom 0.5 true", - zr: "zoom -0.5 true", - zM: "zoom 0.5 true", - zR: "zoom -0.5 true", - zz: "zoom 1", - zI: "zoom 3", - zO: "zoom 0.3", - ".": "repeat", - "ba": "open https://www.youtube.com/watch?v=M3iOROuTuMA", - m: "gobble 1 markadd", - "`": "gobble 1 markjump" - }; - this.vmaps = { - "": "composite js document.getSelection().empty(); mode normal; hidecmdline", - "": "composite js document.getSelection().empty(); mode normal ; hidecmdline", - y: "composite js document.getSelection().toString() | clipboard yank", - s: "composite js document.getSelection().toString() | fillcmdline open search", - S: "composite js document.getSelection().toString() | fillcmdline tabopen search", - l: 'js document.getSelection().modify("extend","forward","character")', - h: 'js document.getSelection().modify("extend","backward","character")', - e: 'js document.getSelection().modify("extend","forward","word")', - w: 'js document.getSelection().modify("extend","forward","word"); document.getSelection().modify("extend","forward","word"); document.getSelection().modify("extend","backward","word"); document.getSelection().modify("extend","forward","character")', - b: 'js document.getSelection().modify("extend","backward","character"); document.getSelection().modify("extend","backward","word"); document.getSelection().modify("extend","forward","character")', - j: 'js document.getSelection().modify("extend","forward","line")', - q: "composite js document.getSelection().toString() | text2qr --timeout 5", - // "j": 'js document.getSelection().modify("extend","forward","paragraph")', // not implemented in Firefox - k: 'js document.getSelection().modify("extend","backward","line")', - $: 'js document.getSelection().modify("extend","forward","lineboundary")', - "0": 'js document.getSelection().modify("extend","backward","lineboundary")', - "=": "js let n = document.getSelection().anchorNode.parentNode; let s = window.getSelection(); let r = document.createRange(); s.removeAllRanges(); r.selectNodeContents(n); s.addRange(r)", - o: "js tri.visual.reverseSelection(document.getSelection())", - "\u{1F577}\u{1F577}INHERITS\u{1F577}\u{1F577}": "nmaps" - }; - this.hintmaps = { - "": "hint.popKey", - "": "hint.reset", - "": "hint.reset", - "": "hint.focusNextHint", - "": "hint.focusPreviousHint", - "": "hint.focusTopHint", - "": "hint.focusBottomHint", - "": "hint.focusLeftHint", - "": "hint.focusRightHint", - "": "hint.selectFocusedHint", - "": "hint.selectFocusedHint" - }; - /** - * Browser-wide binds accessible in all modes and on pages where Tridactyl "cannot run". - * - */ - this.browsermaps = { - "": "escapehatch", - "": "tab #" - // "": "tab #", // banned by e2e tests - }; - /** - * Whether to allow pages (not necessarily github) to override `/`, which is a default Firefox binding. - */ - this.leavegithubalone = "false"; - /** - * Which keys to protect from pages that try to override them. Requires [[leavegithubalone]] to be set to false. - */ - this.blacklistkeys = ["/"]; - /** - * Autocommands that run when certain events happen, and other conditions are met. - * - * Related ex command: `autocmd`. - */ - this.autocmds = { - /** - * Commands that will be run as soon as Tridactyl loads into a page. - * - * Each key corresponds to a URL fragment which, if contained within the page URL, will run the corresponding command. - */ - DocStart: { - // "addons.mozilla.org": "mode ignore", - }, - /** - * Commands that will be run when pages are loaded. - * - * Each key corresponds to a URL fragment which, if contained within the page URL, will run the corresponding command. - */ - DocLoad: { - "^https://github.com/tridactyl/tridactyl/issues/new$": "issue" - }, - /** - * Commands that will be run when pages are unloaded. - * - * Each key corresponds to a URL fragment which, if contained within the page URL, will run the corresponding command. - */ - DocEnd: { - // "emacs.org": "sanitise history", - }, - /** - * Commands that will be run when Tridactyl first runs each time you start your browser. - * - * Each key corresponds to a javascript regex that matches the hostname of the computer Firefox is running on. Note that fetching the hostname could be a little slow, if you want to execute something unconditionally, use ".*" as Tridactyl special-cases this pattern to avoid hostname lookups. - */ - TriStart: { - ".*": "source_quiet" - }, - /** - * Commands that will be run when you enter a tab. - * - * Each key corresponds to a URL fragment which, if contained within the page URL, will run the corresponding command. - */ - TabEnter: { - // "gmail.com": "mode ignore", - }, - /** - * Commands that will be run when you leave a tab. - * - * Each key corresponds to a URL fragment which, if contained within the page URL, will run the corresponding command. - */ - TabLeft: { - // Actually, this doesn't work because tabclose closes the current tab - // Too bad :/ - // "emacs.org": "tabclose", - }, - /** - * Commands that will be run when fullscreen state changes. - */ - FullscreenChange: {}, - /** - * Commands that will be run when fullscreen state is entered. - */ - FullscreenEnter: {}, - /** - * Commands that will be run when fullscreen state is left. - */ - FullscreenLeft: {} - }; - /** - * @deprecated Map for translating keys directly into other keys in normal-ish modes. - * For example, if you have an entry in this config option mapping `п` to `g`, - * then you could type `пп` instead of `gg` or `пi` instead of `gi` or `;п` instead - * of `;g`. - * - * This was primarily useful for international users, but now you can `set - * keyboardlayoutforce true`, which will make everything layout-independent(and work like qwerty by default), - * and use [[keyboardlayoutoverrides]] setting to change the desired layout. - * - * - * For example, you may want to map 'a' to 'q` on azerty - * or 'r' to 'p' if you use dvorak. - * - * Note that the current implementation does not allow you to "chain" keys, for example, "a"=>"b" and "b"=>"c" for "a"=>"c". You can, however, swap or rotate keys, so "a"=>"b" and "b"=>"a" will work the way you'd expect, as will "a"=>"b" and "b"=>"c" and "c"=>"a". - */ - this.keytranslatemap = { - // Examples (I think >_>): - // "д": "l", // Russian language - // "é" : "w", // BÉPO - // "h": "j", // Dvorak - // "n": "j", // Colemak - // etc - }; - /** - * @deprecated Whether to use the keytranslatemap. - * Legacy option to map one keyboard character to another, was used to emulate - * layout-independence. Now deprecated since you can set your layout once with [[keyboardlayoutforce]] - * and [[keyboardlayoutoverrides]]. - */ - this.usekeytranslatemap = "true"; - /** - * Instead of fetching actual character which depends on selected layout, - * use machine code of a key and convert to character according to keyboardlayoutoverrides. The default layout mapping - * is US `qwerty`, but can be changed with [[keyboardlayoutbase]]. - * - * There is a much more detailed help page towards the end of `:tutor` under the title "Non-QWERTY layouts". - * - * Recommended for everyone with multiple or/and non-latin keyboard layouts. Make sure [[usekeytranslatemap]] is false - * if you have previously used `keymap`. - */ - this.keyboardlayoutforce = "false"; - /** - * Base keyboard layout to use when [[keyboardlayoutforce]] is enabled. At the time of writing, the following layouts are supported: `qwerty, azerty, german, dvorak, uk, ca, bepo`. Requires page reload to take effect. - * - * If your layout is missing, you can contribute it with the help of https://gistpreview.github.io/?324119c773fac31651f6422087b36804 - please just open an `:issue` with your layout and we'll add it. - * - * You can manually override individual keys for a layout with [[keyboardlayoutoverrides]]. - */ - this.keyboardlayoutbase = "qwerty"; - /** - * Override individual keys for a layout when [[keyboardlayoutforce]] is enabled. Changes take effect only after a page reload. - * - * Key codes for printable keys for [[keyboardlayoutforce]], lower and upper register. See https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_code_values for the names of each key. - * - * NB: due to a Tridactyl bug, you cannot set this using array notation as you can for, e.g. [[homepage]]. - * You must instead set the lower and upper registers using a string with no spaces in it, for example - * `:set keyboardlayoutoverrides Digit2: 2"` for the British English layout. - */ - this.keyboardlayoutoverrides = {}; - /** - * Automatically place these sites in the named container. - * - * Each key corresponds to a URL fragment which, if contained within the page URL, the site will be opened in a container tab instead. - */ - this.autocontain = o({ - // "github.com": "microsoft", - // "youtube.com": "google", - }); - /** - * Default proxy to use for all URLs. Has to be the name of a proxy. To add a proxy, see `:help proxyadd`. NB: usage with `:seturl` is buggy, use `:autocontain -s [regex to match URL] none [proxy]` instead - */ - this.proxy = ""; - /** - * Definitions of proxies. - * - * You can add a new proxy with `proxyadd proxyname proxyurl` - */ - this.proxies = o({ - // "socksName": "socks://hostname:port", - // "socks4": "socks4://hostname:port", - // "https": "https://username:password@hostname:port" - }); - /** - * Whether to use proxy settings. - * - * If set to `true`, all proxy settings will be ignored. - */ - this.noproxy = "false"; - /** - * Strict mode will always ensure a domain is open in the correct container, replacing the current tab if necessary. - * - * Relaxed mode is less aggressive and instead treats container domains as a default when opening a new tab. - */ - this.autocontainmode = "strict"; - /** - * Aliases for the commandline. - * - * You can make a new one with `command alias ex-command`. - */ - this.exaliases = { - alias: "command", - au: "autocmd", - aucon: "autocontain", - audel: "autocmddelete", - audelete: "autocmddelete", - blacklistremove: "autocmddelete DocStart", - b: "tab", - clsh: "clearsearchhighlight", - nohlsearch: "clearsearchhighlight", - noh: "clearsearchhighlight", - o: "open", - w: "winopen", - t: "tabopen", - tabgroupabort: "tgroupabort", - tabgroupclose: "tgroupclose", - tabgroupcreate: "tgroupcreate", - tabgrouplast: "tgrouplast", - tabgroupmove: "tgroupmove", - tabgrouprename: "tgrouprename", - tabgroupswitch: "tgroupswitch", - tabnew: "tabopen", - tabm: "tabmove", - tabo: "tabonly", - tn: "tabnext_gt", - bn: "tabnext_gt", - tnext: "tabnext_gt", - bnext: "tabnext_gt", - tp: "tabprev", - tN: "tabprev", - bp: "tabprev", - bN: "tabprev", - tprev: "tabprev", - bprev: "tabprev", - tabfirst: "tab 1", - tablast: "tab 0", - bfirst: "tabfirst", - blast: "tablast", - tfirst: "tabfirst", - tlast: "tablast", - buffer: "tab", - bufferall: "taball", - bd: "tabclose", - bdelete: "tabclose", - quit: "tabclose", - q: "tabclose", - qa: "qall", - sanitize: "sanitise", - "saveas!": "saveas --cleanup --overwrite", - tutorial: "tutor", - h: "help", - unmute: "mute unmute", - authors: "credits", - openwith: "hint -W", - "!": "exclaim", - "!s": "exclaim_quiet", - containerremove: "containerdelete", - colours: "colourscheme", - colorscheme: "colourscheme", - colors: "colourscheme", - man: "help", - "!js": "fillcmdline_tmp 3000 !js is deprecated. Please use js instead", - "!jsb": "fillcmdline_tmp 3000 !jsb is deprecated. Please use jsb instead", - get_current_url: "js document.location.href", - current_url: "composite get_current_url | fillcmdline_notrail ", - stop: "js window.stop()", - zo: "zoom", - installnative: "nativeinstall", - nativeupdate: "updatenative", - mkt: "mktridactylrc", - "mkt!": "mktridactylrc -f", - "mktridactylrc!": "mktridactylrc -f", - mpvsafe: "js -p tri.excmds.shellescape(JS_ARG).then(url => tri.excmds.exclaim_quiet('mpv --no-terminal ' + url))", - drawingstop: "mouse_mode", - exto: "extoptions", - extpreferences: "extoptions", - extp: "extpreferences", - prefset: "setpref", - prefremove: "removepref", - tabclosealltoright: "tabcloseallto right", - tabclosealltoleft: "tabcloseallto left", - reibadailty: "jumble" - }; - /** - * Used by `]]` and `[[` to look for links containing these words. - * - * Edit these if you want to add, e.g. other language support. - */ - this.followpagepatterns = { - next: "^(next|newer)\\b|\xBB|>>|more", - prev: "^(prev(ious)?|older)\\b|\xAB|<<" - }; - /** - * The default search engine used by `open search`. If empty string, your browser's default search engine will be used. If set to something, Tridactyl will first look at your [[searchurls]] and then at the search engines for which you have defined a keyword on `about:preferences#search`. - */ - this.searchengine = ""; - /** - * Definitions of search engines for use via `open [keyword]`. - * - * `%s` will be replaced with your whole query and `%s1`, `%s2`, ..., `%sn` will be replaced with the first, second and nth word of your query. Also supports array slicing, e.g. `%s[2:4]`, `%s[5:]`. If there are none of these patterns in your search urls, your query will simply be appended to the searchurl. - * - * Aliases are supported - for example, if you have a `google` searchurl, you can run `:set searchurls.g google` in which case `g` will act as if it was the `google` searchurl. - * - * Examples: - * - When running `open gi cute puppies`, with a `gi` searchurl defined with `set searchurls.gi https://www.google.com/search?q=%s&tbm=isch`, tridactyl will navigate to `https://www.google.com/search?q=cute puppies&tbm=isch`. - * - When running `tabopen translate en ja Tridactyl`, with a `translate` searchurl defined with `set searchurls.translate https://translate.google.com/#view=home&op=translate&sl=%s1&tl=%s2&text=%s3`, tridactyl will navigate to `https://translate.google.com/#view=home&op=translate&sl=en&tl=ja&text=Tridactyl`. - * - * [[setnull]] can be used to "delete" the default search engines. E.g. `setnull searchurls.google`. - */ - this.searchurls = { - google: "https://www.google.com/search?q=", - googlelucky: "https://www.google.com/search?btnI=I'm+Feeling+Lucky&q=", - scholar: "https://scholar.google.com/scholar?q=", - googleuk: "https://www.google.co.uk/search?q=", - bing: "https://www.bing.com/search?q=", - duckduckgo: "https://duckduckgo.com/?q=", - yahoo: "https://search.yahoo.com/search?p=", - twitter: "https://twitter.com/search?q=", - wikipedia: "https://en.wikipedia.org/wiki/Special:Search/", - youtube: "https://www.youtube.com/results?search_query=", - amazon: "https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=", - amazonuk: "https://www.amazon.co.uk/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=", - startpage: "https://startpage.com/do/search?language=english&cat=web&query=", - github: "https://github.com/search?utf8=\u2713&q=", - searx: "https://searx.me/?category_general=on&q=", - cnrtl: "http://www.cnrtl.fr/lexicographie/", - osm: "https://www.openstreetmap.org/search?query=", - mdn: "https://developer.mozilla.org/en-US/search?q=", - gentoo_wiki: "https://wiki.gentoo.org/index.php?title=Special%3ASearch&profile=default&fulltext=Search&search=", - qwant: "https://www.qwant.com/?q=" - }; - /** - * Like [[searchurls]] but must be a Javascript function that takes one argument (a single string with the remainder of the command line including spaces) and maps it to a valid href (or a promise that resolves to a valid href) that will be followed, e.g. `set jsurls.googleloud query => "https://google.com/search?q=" + query.toUpperCase()` - * - * NB: the href must be valid, i.e. it must include the protocol (e.g. "http://") and not just be e.g. "www.". - */ - this.jsurls = {}; - /** - * URL the newtab will redirect to. - * - * All usual rules about things you can open with `open` apply, with the caveat that you'll get interesting results if you try to use something that needs `nativeopen`: so don't try `about:newtab` or a `file:///` URI. You should instead use a data URI - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs - or host a local webserver (e.g. Caddy). - */ - this.newtab = ""; - /** - * Whether `:viewsource` will use our own page that you can use Tridactyl binds on, or Firefox's default viewer, which you cannot use Tridactyl on. - */ - this.viewsource = "tridactyl"; - /** - * Pages opened with `gH`. In order to set this value, use `:set homepages ["example.org", "example.net", "example.com"]` and so on. - */ - this.homepages = []; - /** - * Characters to use in hint mode. - * - * They are used preferentially from left to right. - */ - this.hintchars = "hjklasdfgyuiopqwertnmzxcvb"; - /** - * The type of hinting to use. `vimperator` will allow you to filter links based on their names by typing non-hint chars. It is recommended that you use this in conjuction with the [[hintchars]] setting, which you should probably set to e.g, `5432167890`. ´vimperator-reflow´ additionally updates the hint labels after filtering. - */ - this.hintfiltermode = "simple"; - /** - * Whether to optimise for the shortest possible names for each hint, or to use a simple numerical ordering. If set to `numeric`, overrides `hintchars` setting. - */ - this.hintnames = "short"; - /** - * Whether to display the names for hints in uppercase. - */ - this.hintuppercase = "true"; - /** - * The delay in milliseconds in `vimperator` style hint modes after selecting a hint before you are returned to normal mode. - * - * The point of this is to prevent accidental execution of normal mode binds due to people typing more than is necessary to choose a hint. - */ - this.hintdelay = 300; - /** - * Controls whether hints should be shifted in quick-hints mode. - * - * Here's what it means: let's say you have hints from a to z but are only - * interested in every second hint. You first press `a`, then `c`. - * Tridactyl will realize that you skipped over `b`, and so that the next - * hint you're going to trigger is probably `e`. Tridactyl will shift all - * hint names so that `e` becomes `c`, `d` becomes `b`, `c` becomes `a` and - * so on. - * This means that once you pressed `c`, you can keep on pressing `c` to - * trigger every second hint. Only makes sense with hintnames = short. - */ - this.hintshift = "false"; - /** - * Controls whether hints should be followed automatically. - * - * If set to `false`, hints will only be followed upon confirmation. This applies to cases when there is only a single match or only one link on the page. - */ - this.hintautoselect = "true"; - /** - * Controls whether the page can focus elements for you via js - * - * NB: will break fancy editors such as CodeMirror on Jupyter. Simply use `seturl` to whitelist pages you need it on. - * - * Best used in conjunction with browser.autofocus in `about:config` - */ - this.allowautofocus = "true"; - /** - * Uses a loop to prevent focus until you interact with a page. Only recommended for use via `seturl` for problematic sites as it can be a little heavy on CPU if running on all tabs. Should be used in conjuction with [[allowautofocus]] - */ - this.preventautofocusjackhammer = "false"; - /** - * Whether to use Tridactyl's (bad) smooth scrolling. - */ - this.smoothscroll = "false"; - /** - * How viscous you want smooth scrolling to feel. - */ - this.scrollduration = 100; - /** - * Where to open tabs opened with `tabopen` - to the right of the current tab, or at the end of the tabs. - */ - this.tabopenpos = "next"; - /** - * When enabled (the default), running tabclose will close the tabs whether they are pinned or not. When disabled, tabclose will fail with an error if a tab is pinned. - */ - this.tabclosepinned = "true"; - /** - * Controls which tab order to use when numbering tabs. Either mru = sort by most recent tab or default = by tab index - * - * Applies to all places where Tridactyl numbers tabs including `:tab`, `:tabnext_gt` etc. (so, for example, with `:set tabsort mru` `2gt` would take you to the second most recently used tab, not the second tab in the tab bar). - */ - this.tabsort = "default"; - /** - * Where to open tabs opened with hinting - as if it had been middle clicked, to the right of the current tab, or at the end of the tabs. - */ - this.relatedopenpos = "related"; - /** - * The name of the voice to use for text-to-speech. You can get the list of installed voices by running the following snippet: `js alert(window.speechSynthesis.getVoices().reduce((a, b) => a + " " + b.name))` - */ - this.ttsvoice = "default"; - // chosen from the listvoices list or "default" - /** - * Controls text-to-speech volume. Has to be a number between 0 and 1. - */ - this.ttsvolume = 1; - /** - * Controls text-to-speech speed. Has to be a number between 0.1 and 10. - */ - this.ttsrate = 1; - /** - * Controls text-to-speech pitch. Has to be between 0 and 2. - */ - this.ttspitch = 1; - /** - * When set to "nextinput", pressing `` after gi selects the next input. - * - * When set to "firefox", `` behaves like normal, focusing the next tab-indexed element regardless of type. - */ - this.gimode = "nextinput"; - /** - * Decides where to place the cursor when selecting non-empty input fields - */ - this.cursorpos = "end"; - /** - * The theme to use. - * - * Permitted values: run `:composite js tri.styling.THEMES | fillcmdline` to find out. - */ - this.theme = "default"; - /** - * Storage for custom themes - * - * Maps theme names to CSS. Predominantly used automatically by [[colourscheme]] to store themes read from disk, as documented by [[colourscheme]]. Setting this manually is untested but might work provided that [[colourscheme]] is then used to change the theme to the right theme name. - */ - this.customthemes = {}; - /** - * Whether to display the mode indicator or not. - */ - this.modeindicator = "true"; - /** - * Whether to display the mode indicator in various modes. Ignored if modeindicator set to false. - */ - this.modeindicatormodes = { - normal: "true", - insert: "true", - input: "true", - ignore: "true", - ex: "true", - hint: "true", - visual: "true" - }; - /** - * Milliseconds before registering a scroll in the jumplist - */ - this.jumpdelay = 3e3; - /** - * Logging levels. Unless you're debugging Tridactyl, it's unlikely you'll ever need to change these. - */ - this.logging = { - cmdline: "warning", - containers: "warning", - controller: "warning", - excmd: "error", - hinting: "warning", - messaging: "warning", - native: "warning", - performance: "warning", - state: "warning", - styling: "warning", - autocmds: "warning" - }; - /** - * Disables the commandline iframe. Dangerous setting, use [[seturl]] to set it. If you ever set this setting to "true" globally and then want to set it to false again, you can do this by opening Tridactyl's preferences page from about:addons. - */ - this.noiframe = "false"; - /** - * @deprecated A list of URLs on which to not load the iframe. Use `seturl [URL] noiframe true` instead, as shown in [[noiframe]]. - */ - this.noiframeon = []; - /** - * Insert / input mode edit-in-$EDITOR command to run - * This has to be a command that stays in the foreground for the whole editing session - * "auto" will attempt to find a sane editor in your path. - * Please send your requests to have your favourite terminal moved further up the list to /dev/null. - * (but we are probably happy to add your terminal to the list if it isn't already there.) - * - * Example values: - * - linux: `xterm -e vim` - * - windows: `start cmd.exe /c \"vim\"`. - * - * Also see [:editor](/static/docs/modules/_src_excmds_.html#editor). - */ - this.editorcmd = "auto"; - /** - * Command that should be run by the [[rssexec]] ex command. Has the - * following format: - * - %u: url - * - %t: title - * - %y: type (rss, atom, xml...) - * Warning: This is a very large footgun. %u will be inserted without any - * kind of escaping, hence you must obey the following rules if you care - * about security: - * - Do not use a composite command. If you need a composite command, - * create an alias. - * - Do not use `js` or `jsb`. If you need to use them, create an alias. - * - Do not insert any %u, %t or %y in shell commands run by the native - * messenger. Use pipes instead. - * - * Here's an example of how to save an rss url in a file on your disk - * safely: - * `alias save_rss jsb -p tri.native.run("cat >> ~/.config.newsboat/urls", JS_ARG)` - * `set rsscmd save_rss %u` - * This is safe because the url is passed to jsb as an argument rather than - * being expanded inside of the string it will execute and because it is - * piped to the shell command rather than being expanded inside of it. - */ - this.rsscmd = "yank %u"; - /** - * The browser executable to look for in commands such as `restart`. Not as mad as it seems if you have multiple versions of Firefox... - */ - this.browser = "firefox"; - /** - * Which clipboard to store items in. Requires the native messenger to be installed. - */ - this.yankto = "clipboard"; - /** - * Which clipboard to retrieve items from. Requires the native messenger to be installed. - * - * Permitted values: `clipboard`, or `selection`. - */ - this.putfrom = "clipboard"; - /** - * Clipboard command to try to get the selection from (e.g. `xsel` or `xclip`) - */ - this.externalclipboardcmd = "auto"; - /** - * Whether downloads (e.g. via ;s hint modes) appear in your download history. - * - * NB: will cause downloads to fail silently if Tridactyl is not allowed to run in private windows (regardless of whether you are trying to call it in a private window). - */ - this.downloadsskiphistory = "false"; - /** - * Set of characters that are to be considered illegal as download filenames. - */ - this.downloadforbiddenchars = "/\0"; - /** - * Value that will be used to replace the illegal character(s), if found, in the download filename. - */ - this.downloadforbiddenreplacement = "_"; - /** - * Comma-separated list of whole filenames which, if match - * with the download filename, will be suffixed with the - * "downloadforbiddenreplacement" value. - */ - this.downloadforbiddennames = ""; - /** - * Set this to something weird if you want to have fun every time Tridactyl tries to update its native messenger. - * - * %TAG will be replaced with your version of Tridactyl for stable builds, or "master" for beta builds - * - * NB: Windows has its own platform-specific default. - */ - this.nativeinstallcmd = "curl -fsSl https://raw.githubusercontent.com/tridactyl/native_messenger/master/installers/install.sh -o /tmp/trinativeinstall.sh && sh /tmp/trinativeinstall.sh %TAG"; - /** - * Used by :updatecheck and related built-in functionality to automatically check for updates and prompt users to upgrade. - */ - this.update = { - /** - * Whether Tridactyl should check for available updates at startup. - */ - nag: true, - /** - * How many days to wait after an update is first available until telling people. - */ - nagwait: 7, - /** - * The version we last nagged you about. We only nag you once per version. - */ - lastnaggedversion: "1.14.0", - /** - * Time we last checked for an update, milliseconds since unix epoch. - */ - lastchecktime: 0, - /** - * Minimum interval between automatic update checks, in seconds. - */ - checkintervalsecs: 60 * 60 * 24 - }; - /** - * Profile directory to use with native messenger with e.g, `guiset`. - */ - this.profiledir = "auto"; - // Container settings - /** - * If enabled, tabopen opens a new tab in the currently active tab's container. - */ - this.tabopencontaineraware = "false"; - /** - * If moodeindicator is enabled, containerindicator will color the border of the mode indicator with the container color. - */ - this.containerindicator = "true"; - /** - * Autocontain directives create a container if it doesn't exist already. - */ - this.auconcreatecontainer = "true"; - /** - * Initial urls to navigate to when creating a new tab for a new tab group. - */ - this.tabgroupnewtaburls = {}; - /** - * Whether :tab shows completions for hidden tabs (e.g. tabs in other tab groups). - */ - this.tabshowhidden = "false"; - /** - * Number of most recent results to ask Firefox for. We display the top 20 or so most frequently visited ones. - */ - this.historyresults = 50; - /** - * When displaying bookmarks in history completions, how many page views to pretend they have. - */ - this.bmarkweight = 100; - /** - * When displaying searchurls in history completions, how many page views to pretend they have. - */ - this.searchurlweight = 150; - /** - * Default selector for :goto command. - */ - this.gotoselector = "h1, h2, h3, h4, h5, h6"; - /** - * General completions options - NB: options are set according to our internal completion source name - see - `src/completions/[name].ts` in the Tridactyl source. - */ - this.completions = { - Goto: { - autoselect: "true" - }, - Tab: { - /** - * Whether to automatically select the closest matching completion - */ - autoselect: "true", - /** - * Whether to use unicode symbols to display tab statuses - */ - statusstylepretty: "false" - }, - TabAll: { - autoselect: "true" - }, - Rss: { - autoselect: "true" - }, - Bmark: { - autoselect: "true" - }, - Sessions: { - autoselect: "true" - } - }; - /** - * Number of results that should be shown in completions. -1 for unlimited - */ - this.findresults = -1; - /** - * Number of characters to use as context for the matches shown in completions - */ - this.findcontextlen = 100; - /** - * Whether find should be case-sensitive - */ - this.findcase = "smart"; - /** - * How long find highlights should persist in milliseconds. `<= 0` means they persist until cleared - */ - this.findhighlighttimeout = 0; - /** - * Whether Tridactyl should jump to the first match when using `:find` - */ - this.incsearch = "false"; - /** - * How many characters should be typed before triggering incsearch/completions - */ - this.minincsearchlen = 3; - /** - * Deprecated. - * Change this to "clobber" to ruin the "Content Security Policy" of all sites a bit and make Tridactyl run a bit better on some of them, e.g. raw.github* - */ - this.csp = "untouched"; - /** - * JavaScript RegExp used to recognize words in text.* functions (e.g. text.transpose_words). Should match any character belonging to a word. - */ - this.wordpattern = "[^\\s]+"; - /** - * Activate tridactyl's performance counters. These have a - * measurable performance impact, since every sample is a few - * hundred bytes and we sample tridactyl densely, but they're good - * when you're trying to optimize things. - */ - this.perfcounters = "false"; - /** - * How many samples to store from the perf counters. - * - * Each performance entry is two numbers (16 bytes), an entryType - * of either "mark" or "measure" (js strings are utf-16 ad we have - * two marks for each measure, so amortize to about 10 bytes per - * entry), and a string name that for Tridactyl object will be - * about 40 (utf-16) characters (80 bytes), plus object overhead - * roughly proportional to the string-length of the name of the - * constructor (in this case something like 30 bytes), for a total - * of what we'll call 128 bytes for ease of math. - * - * We want to store, by default, about 1MB of performance - * statistics, so somewhere around 10k samples. - * - */ - this.perfsamples = "10000"; - /** - * Show (partial) command in the mode indicator. - * Corresponds to 'showcmd' option of vi. - */ - this.modeindicatorshowkeys = "false"; - /** - * Whether a trailing slash is appended when we get the parent of a url with - * gu (or other means). - */ - this.urlparenttrailingslash = "true"; - /** - * Whether to enter visual mode when text is selected. Visual mode can always be entered with `:mode visual`. - */ - this.visualenterauto = "true"; - /** - * Whether to return to normal mode when text is deselected. - */ - this.visualexitauto = "true"; - /** - * Whether to open and close the sidebar quickly to get focus back to the page when is pressed. - * - * Disable if the fact that it closes TreeStyleTabs gets on your nerves too much : ) - * - * NB: when disabled, can't get focus back from the address bar, but it can still get it back from lots of other places (e.g. Flash-style video players) - */ - this.escapehatchsidebarhack = "true"; - /** - * Threshold for fuzzy matching on completions. Lower => stricter matching. Range between 0 and 1: 0 corresponds to perfect matches only. 1 will match anything. - * - * https://fusejs.io/api/options.html#threshold - */ - this.completionfuzziness = 0.3; - /** - * Whether to show article url in the document.title of Reader View. - */ - this.readerurlintitle = "false"; - } - }; - var platform_defaults = { - win: { - browsermaps: { - "": null, - "": "buffer #" - }, - // typescript doesn't like me adding new binds like this - nmaps: { - "": "buffer #" - }, - imaps: { - "": "buffer #" - }, - inputmaps: { - "": "buffer #" - }, - ignoremaps: { - "": "buffer #" - }, - nativeinstallcmd: `powershell -ExecutionPolicy Bypass -NoProfile -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12;(New-Object System.Net.WebClient).DownloadFile('https://raw.githubusercontent.com/tridactyl/native_messenger/master/installers/windows.ps1', '%TEMP%/tridactyl_installnative.ps1');& '%TEMP%/tridactyl_installnative.ps1' -Tag %TAG;Remove-Item '%TEMP%/tridactyl_installnative.ps1'"`, - downloadforbiddenchars: "#%&{}\\<>*?/$!'\":@+`|=", - downloadforbiddennames: "CON, PRN, AUX, NUL, COM1, COM2,COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1,LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9," - }, - linux: { - nmaps: { - ";x": 'hint -F e => { const pos = tri.dom.getAbsoluteCentre(e); tri.excmds.exclaim_quiet("xdotool mousemove --sync " + window.devicePixelRatio * pos.x + " " + window.devicePixelRatio * pos.y + "; xdotool click 1")}', - ";X": 'hint -F e => { const pos = tri.dom.getAbsoluteCentre(e); tri.excmds.exclaim_quiet("xdotool mousemove --sync " + window.devicePixelRatio * pos.x + " " + window.devicePixelRatio * pos.y + "; xdotool keydown ctrl+shift; xdotool click 1; xdotool keyup ctrl+shift")}' - } - } - }; - var keyboardlayouts = { - qwerty: { - KeyA: ["a", "A"], - KeyB: ["b", "B"], - KeyC: ["c", "C"], - KeyD: ["d", "D"], - KeyE: ["e", "E"], - KeyF: ["f", "F"], - KeyG: ["g", "G"], - KeyH: ["h", "H"], - KeyI: ["i", "I"], - KeyJ: ["j", "J"], - KeyK: ["k", "K"], - KeyL: ["l", "L"], - KeyM: ["m", "M"], - KeyN: ["n", "N"], - KeyO: ["o", "O"], - KeyP: ["p", "P"], - KeyQ: ["q", "Q"], - KeyR: ["r", "R"], - KeyS: ["s", "S"], - KeyT: ["t", "T"], - KeyU: ["u", "U"], - KeyV: ["v", "V"], - KeyW: ["w", "W"], - KeyX: ["x", "X"], - KeyY: ["y", "Y"], - KeyZ: ["z", "Z"], - Digit0: ["0", ")"], - Digit1: ["1", "!"], - Digit2: ["2", "@"], - Digit3: ["3", "#"], - Digit4: ["4", "$"], - Digit5: ["5", "%"], - Digit6: ["6", "^"], - Digit7: ["7", "&"], - Digit8: ["8", "*"], - Digit9: ["9", "("], - Equal: ["=", "+"], - Backquote: ["`", "~"], - Backslash: ["\\", "|"], - Period: [".", ">"], - Comma: [",", "<"], - Semicolon: [";", ":"], - Slash: ["/", "?"], - BracketLeft: ["[", "{"], - BracketRight: ["]", "}"], - Quote: ["'", '"'], - Minus: ["-", "_"] - }, - azerty: { - Backquote: ["\xB2", "\xB2"], - Digit1: ["&", "1"], - Digit2: ["\xE9", "2"], - Digit3: ['"', "3"], - Digit4: ["'", "4"], - Digit5: ["(", "5"], - Digit6: ["-", "6"], - Digit7: ["\xE8", "7"], - Digit8: ["_", "8"], - Digit9: ["\xE7", "9"], - Digit0: ["\xE0", "0"], - Minus: [")", "\xB0"], - Equal: ["=", "+"], - KeyQ: ["a", "A"], - KeyW: ["z", "Z"], - KeyE: ["e", "E"], - KeyR: ["r", "R"], - KeyT: ["t", "T"], - KeyY: ["y", "Y"], - KeyU: ["u", "U"], - KeyI: ["i", "I"], - KeyO: ["o", "O"], - KeyP: ["p", "P"], - BracketRight: ["$", "\xA3"], - Backslash: ["*", "\xB5"], - KeyA: ["q", "Q"], - KeyS: ["s", "S"], - KeyD: ["d", "D"], - KeyF: ["f", "F"], - KeyG: ["g", "G"], - KeyH: ["h", "H"], - KeyJ: ["j", "J"], - KeyK: ["k", "K"], - KeyL: ["l", "L"], - Semicolon: ["m", "M"], - Quote: ["\xF9", "%"], - KeyZ: ["w", "W"], - KeyX: ["x", "X"], - KeyC: ["c", "C"], - KeyV: ["v", "V"], - KeyB: ["b", "B"], - KeyN: ["n", "N"], - KeyM: [",", "?"], - Comma: [";", "."], - Period: [":", "/"], - Slash: ["!", "\xA7"] - }, - german: { - Digit1: ["1", "!"], - Digit2: ["2", '"'], - Digit3: ["3", "\xA7"], - Digit4: ["4", "$"], - Digit5: ["5", "%"], - Digit6: ["6", "&"], - Digit7: ["7", "/"], - Digit8: ["8", "("], - Digit9: ["9", ")"], - Digit0: ["0", "="], - Minus: ["\xDF", "?"], - KeyQ: ["q", "Q"], - KeyW: ["w", "W"], - KeyE: ["e", "E"], - KeyR: ["r", "R"], - KeyT: ["t", "T"], - KeyY: ["z", "Z"], - KeyU: ["u", "U"], - KeyI: ["i", "I"], - KeyO: ["o", "O"], - KeyP: ["p", "P"], - BracketLeft: ["\xFC", "\xDC"], - BracketRight: ["+", "*"], - Backslash: ["#", "'"], - KeyA: ["a", "A"], - KeyS: ["s", "S"], - KeyD: ["d", "D"], - KeyF: ["f", "F"], - KeyG: ["g", "G"], - KeyH: ["h", "H"], - KeyJ: ["j", "J"], - KeyK: ["k", "K"], - KeyL: ["l", "L"], - Semicolon: ["\xF6", "\xD6"], - Quote: ["\xE4", "\xC4"], - KeyZ: ["y", "Y"], - KeyX: ["x", "X"], - KeyC: ["c", "C"], - KeyV: ["v", "V"], - KeyB: ["b", "B"], - KeyN: ["n", "N"], - KeyM: ["m", "M"], - Comma: [",", ";"], - Period: [".", ":"], - Slash: ["-", "_"], - Backquote: ["", "\xB0"] - }, - dvorak: { - Backquote: ["`", "~"], - Digit1: ["1", "!"], - Digit2: ["2", "@"], - Digit3: ["3", "#"], - Digit4: ["4", "$"], - Digit5: ["5", "%"], - Digit6: ["6", "^"], - Digit7: ["7", "&"], - Digit8: ["8", "*"], - Digit9: ["9", "("], - Digit0: ["0", ")"], - Minus: ["[", "{"], - Equal: ["]", "}"], - KeyQ: ["'", '"'], - KeyW: [",", "<"], - KeyE: [".", ">"], - KeyR: ["p", "P"], - KeyT: ["y", "Y"], - KeyY: ["f", "F"], - KeyU: ["g", "G"], - KeyI: ["c", "C"], - KeyO: ["r", "R"], - KeyP: ["l", "L"], - BracketLeft: ["/", "?"], - BracketRight: ["=", "+"], - Backslash: ["\\", "|"], - KeyA: ["a", "A"], - KeyS: ["o", "O"], - KeyD: ["e", "E"], - KeyF: ["u", "U"], - KeyG: ["i", "I"], - KeyH: ["d", "D"], - KeyJ: ["h", "H"], - KeyK: ["t", "T"], - KeyL: ["n", "N"], - Semicolon: ["s", "S"], - Quote: ["-", "_"], - KeyZ: [";", ":"], - KeyX: ["q", "Q"], - KeyC: ["j", "J"], - KeyV: ["k", "K"], - KeyB: ["x", "X"], - KeyN: ["b", "B"], - KeyM: ["m", "M"], - Comma: ["w", "W"], - Period: ["v", "V"], - Slash: ["z", "Z"] - }, - uk: { - Digit1: ["1", "!"], - Digit2: ["2", '"'], - Digit3: ["3", "\xA3"], - Digit4: ["4", "$"], - Digit5: ["5", "%"], - Digit6: ["6", "^"], - Digit7: ["7", "&"], - Digit8: ["8", "*"], - Digit9: ["9", "("], - Digit0: ["0", ")"], - Minus: ["-", "_"], - Equal: ["=", "+"], - KeyQ: ["q", "Q"], - KeyW: ["w", "W"], - KeyE: ["e", "E"], - KeyR: ["r", "R"], - KeyT: ["t", "T"], - KeyY: ["y", "Y"], - KeyU: ["u", "U"], - KeyI: ["i", "I"], - KeyO: ["o", "O"], - KeyP: ["p", "P"], - BracketLeft: ["[", "{"], - KeyK: ["k", "K"], - BracketRight: ["]", "}"], - KeyA: ["a", "A"], - KeyS: ["s", "S"], - KeyD: ["d", "D"], - KeyF: ["f", "F"], - KeyG: ["g", "G"], - KeyH: ["h", "H"], - KeyJ: ["j", "J"], - Semicolon: [";", ":"], - Quote: ["'", "@"], - Backslash: ["#", "~"], - IntlBackslash: ["\\", "|"], - KeyZ: ["z", "Z"], - KeyX: ["x", "X"], - KeyC: ["c", "C"], - KeyV: ["v", "V"], - KeyB: ["b", "B"], - KeyN: ["n", "N"], - KeyM: ["m", "M"], - Period: [".", ">"], - Slash: ["/", "?"], - Backquote: ["`", "\xAC"], - KeyL: ["l", "L"], - Comma: [",", "<"] - }, - ca: { - Backquote: ["#", "|"], - Digit1: ["1", "!"], - Digit2: ["2", '"'], - Digit3: ["3", "/"], - Digit4: ["4", "$"], - Digit5: ["5", "%"], - Digit6: ["6", "?"], - Digit7: ["7", "&"], - Digit8: ["8", "*"], - Digit9: ["9", "("], - Digit0: ["0", ")"], - Minus: ["-", "_"], - Equal: ["=", "+"], - KeyQ: ["q", "Q"], - KeyW: ["w", "W"], - KeyE: ["e", "E"], - KeyR: ["r", "R"], - KeyT: ["t", "T"], - KeyY: ["y", "Y"], - KeyU: ["u", "U"], - KeyI: ["i", "I"], - KeyO: ["o", "O"], - KeyP: ["p", "P"], - KeyA: ["a", "A"], - KeyS: ["s", "S"], - KeyD: ["d", "D"], - KeyF: ["f", "F"], - KeyG: ["g", "G"], - KeyH: ["h", "H"], - KeyJ: ["j", "J"], - KeyK: ["k", "K"], - KeyL: ["l", "L"], - Semicolon: [";", ":"], - Backslash: ["<", ">"], - IntlBackslash: ["\xAB", "\xBB"], - KeyZ: ["z", "Z"], - KeyX: ["x", "X"], - KeyC: ["c", "C"], - KeyV: ["v", "V"], - KeyB: ["b", "B"], - KeyN: ["n", "N"], - KeyM: ["m", "M"], - Comma: [",", "'"], - Period: [".", "."], - Slash: ["\xE9", "\xC9"] - }, - bepo: { - Backquote: ["$", "#"], - Digit1: ['"', "1"], - Digit2: ["\xAB", "2"], - Digit3: ["\xBB", "3"], - Digit4: ["(", "4"], - Digit5: [")", "5"], - Digit6: ["@", "6"], - Digit7: ["+", "7"], - Digit8: ["-", "8"], - Digit9: ["/", "9"], - Digit0: ["*", "0"], - Minus: ["=", "\xB0"], - Equal: ["%", "`"], - KeyQ: ["b", "B"], - KeyW: ["\xE9", "\xC9"], - KeyE: ["p", "P"], - KeyR: ["o", "O"], - KeyT: ["\xE8", "\xC8"], - KeyU: ["v", "V"], - KeyI: ["d", "D"], - KeyO: ["l", "L"], - KeyP: ["j", "J"], - BracketLeft: ["z", "Z"], - BracketRight: ["w", "W"], - KeyA: ["a", "A"], - KeyS: ["u", "U"], - KeyD: ["i", "I"], - KeyF: ["e", "E"], - KeyG: [",", ";"], - KeyH: ["c", "C"], - KeyJ: ["t", "T"], - KeyK: ["s", "S"], - KeyL: ["r", "R"], - Semicolon: ["n", "N"], - Quote: ["m", "M"], - Backslash: ["\xE7", "\xC7"], - IntlBackslash: ["\xEA", "\xCA"], - KeyZ: ["\xE0", "\xC0"], - KeyX: ["y", "Y"], - KeyC: ["x", "X"], - KeyV: [".", ":"], - KeyB: ["k", "K"], - KeyN: ["'", "?"], - KeyM: ["q", "Q"], - Comma: ["g", "G"], - Period: ["h", "H"], - Slash: ["f", "F"], - KeyY: ["", "!"] - } - }; - var mergeDeepCull = pipe(mergeDeep, removeNull); - var DEFAULTS = mergeDeepCull( - o(new default_config()), - platform_defaults[getPlatformOs()] - ); - function getDeepProperty(obj, target) { - if (obj !== void 0 && obj !== null && target.length) { - if (obj["\u{1F577}\u{1F577}INHERITS\u{1F577}\u{1F577}"] === void 0) { - return getDeepProperty(obj[target[0]], target.slice(1)); - } else { - return getDeepProperty( - mergeDeepCull(get2(obj["\u{1F577}\u{1F577}INHERITS\u{1F577}\u{1F577}"]), obj)[target[0]], - target.slice(1) - ); - } - } else { - if (obj === void 0 || obj === null) - return obj; - if (obj["\u{1F577}\u{1F577}INHERITS\u{1F577}\u{1F577}"] !== void 0) { - return mergeDeepCull(get2(obj["\u{1F577}\u{1F577}INHERITS\u{1F577}\u{1F577}"]), obj); - } else { - return obj; - } - } - } - function mergeDeep(o1, o2) { - if (o1 === null) - return Object.assign({}, o2); - const r = Array.isArray(o1) ? o1.slice() : Object.create(o1); - Object.assign(r, o1, o2); - if (o2 === void 0) - return r; - Object.keys(o1).filter( - (key) => typeof o1[key] === "object" && typeof o2[key] === "object" - ).forEach( - (key) => r[key] == null ? null : Object.assign(r[key], mergeDeep(o1[key], o2[key])) - ); - return r; - } - function getURL(url, target) { - function _getURL(conf, url2, target2) { - if (!conf.subconfigs) - return void 0; - return Object.keys(conf.subconfigs).filter( - (k) => url2.match(k) && getDeepProperty(conf.subconfigs[k], target2) !== void 0 - ).sort( - (k1, k2) => (conf.subconfigs[k1].priority || 10) - (conf.subconfigs[k2].priority || 10) - ).reduce((acc, curKey) => { - const curVal = getDeepProperty( - conf.subconfigs[curKey], - target2 - ); - if (acc instanceof Object && curVal instanceof Object) - return mergeDeep(acc, curVal); - return curVal; - }, void 0); - } - const user = _getURL(USERCONFIG, url, target); - const deflt = _getURL(DEFAULTS, url, target); - if (user === void 0 || user === null) - return deflt; - if (typeof user !== "object" || typeof deflt !== "object") - return user; - return mergeDeepCull(deflt, user); - } - function get2(target_typed, ...target) { - if (target_typed === void 0) { - target = []; - } else { - target = [target_typed].concat(target); - } - let loc = window.location; - if (window.tri && window.tri.contentLocation) - loc = window.tri.contentLocation; - const site = getURL(loc.href, target); - const user = getDeepProperty(USERCONFIG, target); - const defult = getDeepProperty(DEFAULTS, target); - if (typeof defult === "object") { - return mergeDeepCull(mergeDeepCull(defult, user), site); - } else { - if (site !== void 0) { - return site; - } else if (user !== void 0) { - return user; - } else { - return defult; - } - } - } - async function getAsync(target_typed, ...target) { - if (INITIALISED) { - const browserconfig = await browser.storage.local.get(CONFIGNAME); - USERCONFIG = browserconfig[CONFIGNAME] || o({}); - return get2(target_typed, ...target); - } else { - return new Promise( - (resolve) => WAITERS.push(() => resolve(get2(target_typed, ...target))) - ); - } - } - async function init() { - const localConfig = await browser.storage.local.get(CONFIGNAME); - schlepp(localConfig[CONFIGNAME]); - INITIALISED = true; - for (const waiter of WAITERS) { - waiter(); - } - } - var changeListeners = /* @__PURE__ */ new Map(); - function addChangeListener(name, listener) { - let arr = changeListeners.get(name); - if (!arr) { - arr = []; - changeListeners.set(name, arr); - } - arr.push(listener); - } - browser.storage.onChanged.addListener((changes, areaname) => { - if (CONFIGNAME in changes) { - let triggerChangeListeners2 = function(key, value = newValue[key]) { - const arr = changeListeners.get(key); - if (arr) { - const v = old[key] === void 0 ? DEFAULTS[key] : old[key]; - arr.forEach((f) => f(v, value)); - } - }; - var triggerChangeListeners = triggerChangeListeners2; - const { newValue, oldValue } = changes[CONFIGNAME]; - const old = oldValue || {}; - if (areaname === "sync") { - } else if (newValue !== void 0) { - const unsetKeys = Object.keys(old).filter( - (k) => newValue[k] === void 0 && JSON.stringify(old[k]) !== JSON.stringify(DEFAULTS[k]) - ); - const changedKeys = Object.keys(newValue).filter( - (k) => JSON.stringify( - old[k] !== void 0 ? old[k] : DEFAULTS[k] - ) !== JSON.stringify(newValue[k]) - ); - changedKeys.forEach((key) => USERCONFIG[key] = newValue[key]); - unsetKeys.forEach((key) => delete USERCONFIG[key]); - unsetKeys.forEach((key) => triggerChangeListeners2(key, DEFAULTS[key])); - changedKeys.forEach((key) => triggerChangeListeners2(key)); - } else { - USERCONFIG = o({}); - Object.keys(old).filter((key) => old[key] !== DEFAULTS[key]).forEach((key) => triggerChangeListeners2(key)); - } - } - }); - init(); - - // src/lib/aliases.ts - function expandExstr(exstr, aliases = get2("exaliases"), prevExpansions = []) { - const [command] = exstr.trim().split(/\s+/); - if (aliases[command] === void 0) { - return exstr; - } - if (prevExpansions.includes(command)) { - throw new Error( - `Infinite loop detected while expanding aliases. Stack: ${prevExpansions}.` - ); - } - prevExpansions.push(command); - return expandExstr( - exstr.replace(command, aliases[command]), - aliases, - prevExpansions - ); - } - function getCmdAliasMapping(aliases = get2("exaliases")) { - const commands = {}; - for (const alias of Object.keys(aliases)) { - const cmd = expandExstr(alias, aliases).trim(); - if (!commands[cmd]) - commands[cmd] = []; - commands[cmd].push(alias.trim()); - } - return commands; - } - - // src/lib/patience.ts - var sleep = (duration) => new Promise((res) => setTimeout(res, duration)); - var backoff = (fn, retries = 5, delay = 50) => fn().catch((err) => { - retries > 1 ? sleep(delay).then(() => backoff(fn, retries - 1, delay * 2)) : Promise.reject(err); - }); - - // src/completions.ts - var DEFAULT_FAVICON = browser.runtime.getURL( - "static/defaultFavicon.svg" - ); - var CompletionOption = class { - }; - var CompletionSource = class { - constructor(prefixes2) { - this.prefixes = []; - const commands = getCmdAliasMapping(); - prefixes2.map((p) => p.trim()).forEach((p) => { - this.prefixes.push(p); - if (commands[p]) - this.prefixes = this.prefixes.concat(commands[p]); - }); - this.prefixes = this.prefixes.map((p) => p + " "); - } - /** Control presentation of Source */ - set state(newstate) { - switch (newstate) { - case "normal": - this.node.classList.remove("hidden"); - this.completion = void 0; - break; - case "hidden": - this.node.classList.add("hidden"); - break; - } - this._prevState = this._state; - this._state = newstate; - } - get state() { - return this._state; - } - shouldRefresh() { - return this._state !== "hidden" || this.state !== this._prevState; - } - prev(inc = 1) { - return this.next(-1 * inc); - } - deselect() { - this.completion = void 0; - if (this.lastFocused !== void 0) - this.lastFocused.state = "normal"; - } - }; - var CompletionOptionHTML = class extends CompletionOption { - constructor() { - super(...arguments); - this._state = "hidden"; - } - /** Control presentation of element */ - set state(newstate) { - switch (newstate) { - case "focused": - this.html.classList.add("focused"); - this.html.classList.remove("hidden"); - const myRect = this.html.getClientRects()[0]; - if (myRect) { - const container = document.getElementById("completions"); - const boxRect = container.getClientRects()[0]; - if (myRect.bottom > boxRect.bottom) - this.html.scrollIntoView(); - else if (myRect.top < boxRect.top) - this.html.scrollIntoView(false); - } - break; - case "normal": - this.html.classList.remove("focused"); - this.html.classList.remove("hidden"); - break; - case "hidden": - this.html.classList.remove("focused"); - this.html.classList.add("hidden"); - break; - } - this._state = newstate; - } - get state() { - return this._state; - } - }; - var CompletionSourceFuse = class extends CompletionSource { - constructor(prefixes2, className, title) { - super(prefixes2); - this.fuseOptions = { - keys: ["fuseKeys"], - shouldSort: true, - includeScore: true, - findAllMatches: true, - ignoreLocation: true, - ignoreFieldNorm: true, - threshold: get2("completionfuzziness"), - minMatchCharLength: 1 - }; - // PERF: Could be expensive not to cache Fuse() - // yeah, it was. - this.fuse = void 0; - this.sortScoredOptions = false; - this.optionContainer = html`
`; - this.node = html``; - this.node.appendChild(this.optionContainer); - this.state = "hidden"; - } - // Helpful default implementations - async filter(exstr) { - this.lastExstr = exstr; - await this.onInput(exstr); - return this.updateChain(); - } - updateChain(exstr = this.lastExstr, options = this.options) { - if (options === void 0) { - this.state = "hidden"; - return; - } - const [prefix, query2] = this.splitOnPrefix(exstr); - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - if (query2) { - this.setStateFromScore(this.scoredOptions(query2)); - } else { - options.forEach((option) => option.state = "normal"); - } - this.updateDisplay(); - } - select(option) { - if (this.lastExstr !== void 0 && option !== void 0) { - const [prefix] = this.splitOnPrefix(this.lastExstr); - this.completion = [prefix, option.value].join(" "); - this.args = option.value; - option.state = "focused"; - this.lastFocused = option; - } else { - throw new Error("lastExstr and option must be defined!"); - } - } - splitOnPrefix(exstr) { - for (const prefix of this.prefixes) { - if (exstr.startsWith(prefix)) { - const query2 = exstr.replace(prefix, ""); - return [prefix.trim(), query2]; - } - } - return [void 0, void 0]; - } - /** Rtn sorted array of {option, score} */ - scoredOptions(query2) { - const searchThis = this.options.map((elem, index2) => ({ - index: index2, - fuseKeys: elem.fuseKeys - })); - this.fuse = new Fuse(searchThis, this.fuseOptions); - return this.fuse.search(query2).map((result) => { - const index2 = toNumber(result.item.index); - return { - index: index2, - option: this.options[index2], - score: result.score - }; - }); - } - /** Set option state by score - - For now just displays all scored elements (see threshold in fuse) and - focus the best match. - */ - setStateFromScore(scoredOpts, autoselect = false) { - const matches = scoredOpts.map((res) => res.index); - const hidden_options = []; - for (const [index2, option] of enumerate(this.options)) { - if (matches.includes(index2)) - option.state = "normal"; - else { - option.state = "hidden"; - hidden_options.push(option); - } - } - if (matches.length && autoselect) { - this.select(this.options[matches[0]]); - } else { - this.deselect(); - } - if (this.sortScoredOptions) { - const sorted_options = matches.map((index2) => this.options[index2]); - this.options = sorted_options.concat(hidden_options); - } - } - /** Call to replace the current display */ - updateDisplay() { - const newContainer = this.optionContainer.cloneNode( - false - ); - for (const option of this.options) { - if (option.state !== "hidden") - newContainer.appendChild(option.html); - } - this.optionContainer.replaceWith(newContainer); - this.optionContainer = newContainer; - this.next(0); - } - async next(inc = 1) { - if (this.state !== "hidden") { - return backoff(async () => { - const visopts = this.options.filter((o2) => o2.state !== "hidden"); - const currind = visopts.findIndex((o2) => o2.state === "focused"); - this.deselect(); - const max = visopts.length + 1; - const opt = visopts[(currind + inc + max) % max]; - if (opt) - this.select(opt); - return true; - }); - } else - return false; - } - /* abstract onUpdate(query: string, prefix: string, options: CompletionOptionFuse[]) */ - // Lots of methods don't need this but some do - // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars-experimental - async onInput(exstr) { - } - }; - - // compiler/types/AnyType.ts - var AnyType = class { - constructor(isDotDotDot = false, isQuestion = false) { - this.isDotDotDot = isDotDotDot; - this.isQuestion = isQuestion; - this.kind = "any"; - } - toConstructor() { - return `new AnyType(${!this.isDotDotDot}, ${this.isQuestion})`; - } - toString() { - return this.kind; - } - convert(argument) { - return argument; - } - }; - - // compiler/types/BooleanType.ts - var BooleanType = class { - constructor(isDotDotDot = false, isQuestion = false) { - this.isDotDotDot = isDotDotDot; - this.isQuestion = isQuestion; - this.kind = "boolean"; - } - toConstructor() { - return `new BooleanType(${this.isDotDotDot}, ${this.isQuestion})`; - } - toString() { - return this.kind; - } - convert(argument) { - if (argument === "true") { - return true; - } else if (argument === "false") { - return false; - } - throw new Error("Can't convert ${argument} to boolean"); - } - }; - - // compiler/types/FunctionType.ts - var FunctionType = class { - constructor(args, ret, isDotDotDot = false, isQuestion = false) { - this.args = args; - this.ret = ret; - this.isDotDotDot = isDotDotDot; - this.isQuestion = isQuestion; - this.kind = "function"; - } - toConstructor() { - return `new FunctionType([` + // Convert every argument type to its string constructor representation - this.args.map((cur) => cur.toConstructor()) + `], ${this.ret.toConstructor()}, ${this.isDotDotDot}, ${this.isQuestion})`; - } - toString() { - return `(${this.args.map((a) => a.toString()).join(", ")}) => ${this.ret.toString()}`; - } - convert(argument) { - throw new Error(`Conversion to function not implemented: ${argument}`); - } - }; - - // compiler/types/NumberType.ts - var NumberType = class { - constructor(isDotDotDot = false, isQuestion = false) { - this.isDotDotDot = isDotDotDot; - this.isQuestion = isQuestion; - this.kind = "number"; - } - toConstructor() { - return `new NumberType(${this.isDotDotDot}, ${this.isQuestion})`; - } - toString() { - return this.kind; - } - convert(argument) { - const n = parseFloat(argument); - if (!Number.isNaN(n)) { - return n; - } - throw new Error(`Can't convert to number: ${argument}`); - } - }; - - // compiler/types/ObjectType.ts - var ObjectType = class { - // Note: a map that has an empty key ("") uses the corresponding type as default type - constructor(members = /* @__PURE__ */ new Map(), isDotDotDot = false, isQuestion = false) { - this.members = members; - this.isDotDotDot = isDotDotDot; - this.isQuestion = isQuestion; - this.kind = "object"; - } - toConstructor() { - return `new ObjectType(new Map([` + Array.from(this.members.entries()).map(([n, m]) => `[${JSON.stringify(n)}, ${m.toConstructor()}]`).join(", ") + `]), ${this.isDotDotDot}, ${this.isQuestion})`; - } - toString() { - return this.kind; - } - convertMember(memberName, memberValue) { - let type3 = this.members.get(memberName[0]); - if (!type3) { - type3 = this.members.get(""); - if (!type3) { - return memberValue; - } - } - if (type3.kind === "object") { - return type3.convertMember(memberName.slice(1), memberValue); - } - return type3.convert(memberValue); - } - convert(argument) { - try { - return JSON.parse(argument); - } catch (e) { - throw new Error(`Can't convert to object: ${argument}`); - } - } - }; - - // compiler/types/StringType.ts - var StringType = class { - constructor(isDotDotDot = false, isQuestion = false) { - this.isDotDotDot = isDotDotDot; - this.isQuestion = isQuestion; - this.kind = "string"; - } - toConstructor() { - return `new StringType(${this.isDotDotDot}, ${this.isQuestion})`; - } - toString() { - return this.kind; - } - convert(argument) { - if (typeof argument === "string") { - return argument; - } - throw new Error(`Can't convert to string: ${argument}`); - } - }; - - // compiler/types/TypeReferenceType.ts - var TypeReferenceType = class { - constructor(kind, args, isDotDotDot = false, isQuestion = false) { - this.kind = kind; - this.args = args; - this.isDotDotDot = isDotDotDot; - this.isQuestion = isQuestion; - } - toConstructor() { - return `new TypeReferenceType(${JSON.stringify(this.kind)}, [` + // Turn every type argument into its constructor representation - this.args.map((cur) => cur.toConstructor()).join(",\n") + `], ${this.isDotDotDot}, ${this.isQuestion})`; - } - toString() { - return `${this.kind}<${this.args.map((a) => a.toString()).join(", ")}>`; - } - convert(argument) { - throw new Error("Conversion of simple type references not implemented."); - } - }; - - // compiler/types/VoidType.ts - var VoidType = class { - constructor(isDotDotDot = false, isQuestion = false) { - this.isDotDotDot = isDotDotDot; - this.isQuestion = isQuestion; - this.kind = "void"; - } - toConstructor() { - return `new VoidType(${this.isDotDotDot}, ${this.isQuestion})`; - } - toString() { - return this.kind; - } - convert(argument) { - return null; - } - }; - - // compiler/types/ArrayType.ts - var ArrayType = class { - constructor(elemType, isDotDotDot = false, isQuestion = false) { - this.elemType = elemType; - this.isDotDotDot = isDotDotDot; - this.isQuestion = isQuestion; - this.kind = "array"; - } - toConstructor() { - return `new ArrayType(${this.elemType.toConstructor()}, ${this.isDotDotDot}, ${this.isQuestion})`; - } - toString() { - return `${this.elemType.toString()}[]`; - } - convert(argument) { - if (!Array.isArray(argument)) { - try { - argument = JSON.parse(argument); - } catch (e) { - throw new Error(`Can't convert ${argument} to array:`); - } - if (!Array.isArray(argument)) { - throw new Error(`Can't convert ${argument} to array:`); - } - } - return argument.map((v) => this.elemType.convert(v)); - } - }; - - // compiler/types/LiteralTypeType.ts - var LiteralTypeType = class { - constructor(value, isDotDotDot = false, isQuestion = false) { - this.value = value; - this.isDotDotDot = isDotDotDot; - this.isQuestion = isQuestion; - this.kind = "LiteralType"; - } - toConstructor() { - return `new LiteralTypeType(${JSON.stringify(this.value)}, ${this.isDotDotDot}, ${this.isQuestion})`; - } - toString() { - return JSON.stringify(this.value); - } - convert(argument) { - if (argument === this.value) { - return argument; - } - throw new Error( - `Argument does not match expected value (${this.value}): ${argument}` - ); - } - }; - - // compiler/types/TupleType.ts - var TupleType = class { - constructor(elemTypes, isDotDotDot = false, isQuestion = false) { - this.elemTypes = elemTypes; - this.isDotDotDot = isDotDotDot; - this.isQuestion = isQuestion; - this.kind = "tuple"; - } - toConstructor() { - return `new TupleType([` + // Convert every element type to its constructor representation - this.elemTypes.map((cur) => cur.toConstructor()).join(",\n") + `], ${this.isDotDotDot}, ${this.isQuestion})`; - } - toString() { - return `[${this.elemTypes.map((e) => e.toString()).join(", ")}]`; - } - convert(argument) { - if (!Array.isArray(argument)) { - try { - argument = JSON.parse(argument); - } catch (e) { - throw new Error(`Can't convert to tuple: ${argument}`); - } - if (!Array.isArray(argument)) { - throw new Error(`Can't convert to tuple: ${argument}`); - } - } - if (argument.length !== this.elemTypes.length) { - throw new Error( - `Error converting tuple: number of elements and type mismatch ${argument}` - ); - } - return argument.map((v, i) => this.elemTypes[i].convert(v)); - } - }; - - // compiler/types/UnionType.ts - var UnionType = class { - constructor(types, isDotDotDot = false, isQuestion = false) { - this.types = types; - this.isDotDotDot = isDotDotDot; - this.isQuestion = isQuestion; - this.kind = "union"; - } - toConstructor() { - return `new UnionType([` + // Convert every type to its string constructor representation - this.types.map((cur) => cur.toConstructor()).join(",\n") + `], ${this.isDotDotDot}, ${this.isQuestion})`; - } - toString() { - return this.types.map((t) => t.toString()).join(" | "); - } - convert(argument) { - for (const t of this.types) { - try { - return t.convert(argument); - } catch (e) { - } - } - throw new Error(`Can't convert "${argument}" to any of: ${this.types}`); - } - }; - - // compiler/metadata/SymbolMetadata.ts - var SymbolMetadata = class { - constructor(doc, type3, hidden = false) { - this.doc = doc; - this.type = type3; - this.hidden = hidden; - } - toConstructor() { - return `new SymbolMetadata(${JSON.stringify( - this.doc - )}, ${this.type.toConstructor()}, ${this.hidden})`; - } - }; - - // compiler/metadata/ClassMetadata.ts - var ClassMetadata = class { - constructor(members = /* @__PURE__ */ new Map()) { - this.members = members; - } - setMember(name, s) { - this.members.set(name, s); - } - getMember(name) { - return this.members.get(name); - } - getMembers() { - return this.members.keys(); - } - toConstructor() { - return `new ClassMetadata(new Map([` + Array.from(this.members.entries()).map(([n, m]) => `[${JSON.stringify(n)}, ${m.toConstructor()}]`).join(",\n") + `]))`; - } - }; - - // compiler/metadata/FileMetadata.ts - var FileMetadata = class { - constructor(classes = /* @__PURE__ */ new Map(), functions = /* @__PURE__ */ new Map()) { - this.classes = classes; - this.functions = functions; - } - setClass(name, c) { - this.classes.set(name, c); - } - getClass(name) { - return this.classes.get(name); - } - getClasses() { - return Array.from(this.classes.keys()); - } - setFunction(name, f) { - this.functions.set(name, f); - } - getFunction(name) { - return this.functions.get(name); - } - getFunctions() { - return Array.from(this.functions.entries()); - } - getFunctionNames() { - return Array.from(this.functions.keys()); - } - toConstructor() { - return `new FileMetadata(new Map([` + Array.from(this.classes.entries()).map(([n, c]) => `[${JSON.stringify(n)}, ${c.toConstructor()}]`).join(",\n") + `]), new Map([` + Array.from(this.functions.entries()).map(([n, f]) => `[${JSON.stringify(n)}, ${f.toConstructor()}]`).join(",\n") + `]))`; - } - }; - - // compiler/metadata/ProgramMetadata.ts - var ProgramMetadata = class { - constructor(files = /* @__PURE__ */ new Map()) { - this.files = files; - } - setFile(name, file) { - this.files.set(name, file); - } - getFile(name) { - return this.files.get(name); - } - toConstructor() { - return `new ProgramMetadata(new Map([` + Array.from(this.files.entries()).map(([n, f]) => `[${JSON.stringify(n)}, ${f.toConstructor()}]`).join(",\n") + `]))`; - } - }; - - // src/.metadata.generated.ts - var everything = new ProgramMetadata(/* @__PURE__ */ new Map([ - ["src/excmds.ts", new FileMetadata(/* @__PURE__ */ new Map([]), /* @__PURE__ */ new Map([ - ["getNativeVersion", new SymbolMetadata("", new FunctionType([], new TypeReferenceType("Promise", [new StringType(false, false)], false, false), false, false), true)], - ["getRssLinks", new SymbolMetadata("", new FunctionType([], new TypeReferenceType("Promise", [new ArrayType(new ObjectType(/* @__PURE__ */ new Map([]), false, false), false, false)], false, false), false, false), true)], - ["rssexec", new SymbolMetadata("Execute [[rsscmd]] for an rss link.\n\nIf `url` is undefined, Tridactyl will look for rss links in the current\npage. If it doesn't find any, it will display an error message. If it finds\nmultiple urls, it will offer completions in order for you to select the link\nyou're interested in. If a single rss feed is found, it will automatically\nbe selected.", new FunctionType([new StringType(false, false), new StringType(false, true), new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["fillinput", new SymbolMetadata("Fills the element matched by `selector` with content and falls back to the last used input if the element can't be found. You probably don't want this; it used to be used internally for [[editor]].\n\nThat said, `bind gs fillinput null [Tridactyl](https://addons.mozilla.org/en-US/firefox/addon/tridactyl-vim/) is my favourite add-on` could probably come in handy.", new FunctionType([new StringType(false, false), new ArrayType(new StringType(false, false), true, false)], new VoidType(false, false), false, false), false)], - ["getInput", new SymbolMetadata("", new FunctionType([new TypeReferenceType("HTMLElement", [], false, false)], new StringType(false, false), false, false), true)], - ["getinput", new SymbolMetadata("", new FunctionType([], new StringType(false, false), false, false), true)], - ["getInputSelector", new SymbolMetadata("", new FunctionType([], new AnyType(true, false), false, false), true)], - ["addTridactylEditorClass", new SymbolMetadata("", new FunctionType([new StringType(false, false)], new VoidType(false, false), false, false), true)], - ["removeTridactylEditorClass", new SymbolMetadata("", new FunctionType([new StringType(false, false)], new VoidType(false, false), false, false), true)], - ["editor", new SymbolMetadata("Opens your favourite editor (which is currently gVim) and fills the last used input with whatever you write into that file.\n**Requires that the native messenger is installed, see [[native]] and [[nativeinstall]]**.\n\nUses the `editorcmd` config option, default = `auto` looks through a list defined in lib/native.ts try find a sensible combination. If it's a bit slow, or chooses the wrong editor, or gives up completely, set editorcmd to something you want. The command must stay in the foreground until the editor exits.\n\nThe editorcmd needs to accept a filename, stay in the foreground while it's edited, save the file and exit. By default the filename is added to the end of editorcmd, if you require control over the position of that argument, the first occurrence of %f in editorcmd is replaced with the filename. %l, if it exists, is replaced with the line number of the cursor and %c with the column number. For example:\n```\nset editorcmd terminator -u -e \"vim %f '+normal!%lGzv%c|'\"\n```\n\nYou're probably better off using the default insert mode bind of `` (Ctrl-i) to access this.\n\nThis function returns a tuple containing the path to the file that was opened by the editor and its content. This enables creating commands such as the following one, which deletes the temporary file created by the editor:\n```\nalias editor_rm composite editor | jsb -p tri.native.run(`rm -f '${JS_ARG[0]}'`)\nbind --mode=insert editor_rm\nbind --mode=input editor_rm\n```", new FunctionType([], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["guiset_quiet", new SymbolMetadata("Like [[guiset]] but quieter.", new FunctionType([new StringType(false, false), new StringType(false, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["guiset", new SymbolMetadata("Change which parts of the Firefox user interface are shown. **NB: This feature is experimental and might break stuff.**\n\nMight mangle your userChrome. Requires native messenger, and you must restart Firefox each time to see any changes (this can be done using [[restart]]). \n\nAlso flips the preference `toolkit.legacyUserProfileCustomizations.stylesheets` to true so that FF will read your userChrome.\n\nView available rules and options [here](/static/docs/modules/_src_lib_css_util_.html#potentialrules) and [here](/static/docs/modules/_src_lib_css_util_.html#metarules).\n\nExample usage: `guiset gui none`, `guiset gui full`, `guiset tabs autohide`.\n\nSome of the available options:\n\n- gui\n - full\n - none\n\n- tabs\n - always\n - autohide\n\n- navbar\n - always\n - autohide\n - none\n\n- hoverlink (the little link that appears when you hover over a link)\n - none\n - left\n - right\n - top-left\n - top-right\n\n- statuspanel (hoverlink + the indicator that appears when a website is loading)\n - none\n - left\n - right\n - top-left\n - top-right\n\nIf you want to use guiset in your tridactylrc, you might want to use [[guiset_quiet]] instead.", new FunctionType([new StringType(false, false), new StringType(false, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["cssparse", new SymbolMetadata("", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new VoidType(false, false), false, false), true)], - ["loadtheme", new SymbolMetadata("", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), true)], - ["unloadtheme", new SymbolMetadata("", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), true)], - ["colourscheme", new SymbolMetadata("Changes the current theme.\n\nIf THEMENAME is any of the themes that can be found in the [Tridactyl repo](https://github.com/tridactyl/tridactyl/tree/master/src/static/themes) (e.g. 'dark'), the theme will be loaded from Tridactyl's internal storage.\n\nIf THEMENAME is set to any other value except `--url`, Tridactyl will attempt to use its native binary (see [[native]]) in order to load a CSS file named THEMENAME from disk. The CSS file has to be in a directory named \"themes\" and this directory has to be in the same directory as your tridactylrc. If this fails, Tridactyl will attempt to load the theme from its internal storage.\n\nLastly, themes can be loaded from URLs with `:colourscheme --url [url] [themename]`. They are stored internally - if you want to update the theme run the whole command again.\n\nNote that the theme name should NOT contain any dot.\n\nExample: `:colourscheme mysupertheme`\nOn linux, this will load ~/.config/tridactyl/themes/mysupertheme.css\n\n__NB__: due to Tridactyl's architecture, the theme will take a small amount of time to apply as each page is loaded. If this annoys you, you may use [userContent.css](http://kb.mozillazine.org/index.php?title=UserContent.css&printable=yes) to make changes to Tridactyl earlier. For example, users using the dark theme may like to put\n\n```\n:root {\n --tridactyl-bg: black !important;\n --tridactyl-fg: white !important;\n}\n```\n\nin their `userContent.css`. Follow [issue #2510](https://github.com/tridactyl/tridactyl/issues/2510) if you would like to find out when we have made a more user-friendly solution.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["setpref", new SymbolMetadata("Write a setting to your user.js file. Requires a [[restart]] after running to take effect.", new FunctionType([new StringType(false, false), new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["removepref", new SymbolMetadata("Remove a setting from your user.js file.", new FunctionType([new StringType(false, false)], new AnyType(true, false), false, false), false)], - ["fixamo_quiet", new SymbolMetadata("Like [[fixamo]] but quieter.\n\nNow purely a placebo as [[fixamo]] has been removed.", new FunctionType([], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["fixamo", new SymbolMetadata('Used to simply set\n```js\n "privacy.resistFingerprinting.block_mozAddonManager":true\n "extensions.webextensions.restrictedDomains":""\n```\nin about:config via user.js so that Tridactyl (and other extensions!) can be used on addons.mozilla.org and other sites.\n\nRemoved at the request of the Firefox Security team. Replacements exist in our exemplar RC file.\n\nRequires `native` and a `restart`.', new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["nativeopen", new SymbolMetadata("Uses the native messenger to open URLs.\n\n**Be *seriously* careful with this:**\n\n1. the implementation basically execs `firefox --new-tab `\n2. you can use it to open any URL you can open in the Firefox address bar,\n including ones that might cause side effects (firefox does not guarantee\n that about: pages ignore query strings).\n\nYou've been warned.\n\nThis uses the [[browser]] setting to know which binary to call. If you need to pass additional arguments to firefox (e.g. '--new-window'), make sure they appear before the url.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["exclaim", new SymbolMetadata("Run command in /bin/sh (unless you're on Windows), and print the output in the command line. Non-zero exit codes and stderr are ignored, currently.\n\nRequires the native messenger, obviously.\n\nIf you're using `exclaim` with arguments coming from a pipe, consider using [[shellescape]] to properly escape arguments and to prevent unsafe commands.\n\nIf you want to use a different shell, just prepend your command with whatever the invocation is and keep in mind that most shells require quotes around the command to be executed, e.g. `:exclaim xonsh -c \"1+2\"`.\n\nAliased to `!` but the exclamation mark **must be followed with a space**.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["exclaim_quiet", new SymbolMetadata("Like exclaim, but without any output to the command line.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new StringType(false, false)], false, false), false, false), false)], - ["native", new SymbolMetadata("Tells you if the native messenger is installed and its version.\n\nFor snap, flatpak, and other sandboxed installations, additional setup is required \u2013 see https://github.com/tridactyl/tridactyl#extra-features-through-native-messaging.", new FunctionType([], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["nativeinstall", new SymbolMetadata("Copies the installation command for the native messenger to the clipboard and asks the user to run it in their shell.\n\nThe native messenger's source code may be found here: https://github.com/tridactyl/native_messenger/blob/master/src/native_main.nim\n\nIf your corporate IT policy disallows execution of binaries which have not been whitelisted but allows Python scripts, you may instead use the old native messenger by running `install.sh` or `win_install.ps1` from https://github.com/tridactyl/tridactyl/tree/master/native - the main downside is that it is significantly slower.\n\nFor snap, flatpak, and other sandboxed installations, additional setup is required \u2013 see https://github.com/tridactyl/tridactyl#extra-features-through-native-messaging.", new FunctionType([], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["mktridactylrc", new SymbolMetadata("Writes current config to a file.\n\nNB: an RC file is not required for your settings to persist: all settings are stored in a local Firefox storage database by default as soon as you set them.\n\nWith no arguments supplied the excmd will try to find an appropriate\nconfig path and write the rc file to there. Any argument given to the\nexcmd excluding the `-f` flag will be treated as a path to write the rc\nfile to relative to the native messenger's location (`~/.local/share/tridactyl/`). By default, it silently refuses to overwrite existing files.\n\nThe RC file will be split into sections that will be created if a config\nproperty is discovered within one of them:\n- General settings\n- Binds\n- Aliases\n- Autocmds\n- Autocontainers\n- Logging\n\nNote:\n- Subconfig paths fall back to using `js tri.config.set(key: obj)` notation.\n- This method is also used as a fallback mechanism for objects that didn't hit\n any of the heuristics.\n\nAvailable flags:\n- `-f` will overwrite the config file if it exists.\n- `--clipboard` write config to clipboard - no [[native]] required", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["source", new SymbolMetadata("Runs an RC file from disk or a URL\n\nThis function accepts a flag: `--url` to load a RC from a URL.\n\nIf no argument given, it will try to open ~/.tridactylrc, ~/.config/tridactyl/tridactylrc or $XDG_CONFIG_HOME/tridactyl/tridactylrc in reverse order. You may use a `_` in place of a leading `.` if you wish, e.g, if you use Windows.\n\nIf no url is specified with the `--url` flag, the current page's URL is used to locate the RC file. Ensure the URL you pass (or page you are on) is a \"raw\" RC file, e.g. https://raw.githubusercontent.com/tridactyl/tridactyl/master/.tridactylrc and not https://github.com/tridactyl/tridactyl/blob/master/.tridactylrc.\n\nTridactyl won't run on many raw pages due to a Firefox bug with Content Security Policy, so you may need to use the `source --url [URL]` form.\n\nOn Windows, the `~` expands to `%USERPROFILE%`.\n\nThe RC file is just a bunch of Tridactyl excmds (i.e, the stuff on this help page). Settings persist in local storage. There's an [example file](https://raw.githubusercontent.com/tridactyl/tridactyl/master/.tridactylrc) if you want it.\n\nThere is a [bug](https://github.com/tridactyl/tridactyl/issues/1409) where not all lines of the RC file are executed if you use `sanitise` at the top of it. We instead recommend you put `:bind ZZ composite sanitise tridactyllocal; qall` in your RC file and use `ZZ` to exit Firefox.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["source_quiet", new SymbolMetadata("Same as [[source]] but suppresses all errors", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["updatenative", new SymbolMetadata("Updates the native messenger if it is installed, using our GitHub repo. This is run every time Tridactyl is updated.\n\nIf you want to disable this, or point it to your own native messenger, edit the `nativeinstallcmd` setting.", new FunctionType([new BooleanType(false, true)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["restart", new SymbolMetadata("Restarts firefox with the same commandline arguments.\n\nWarning: This can kill your tabs, especially if you :restart several times\nin a row", new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["saveas", new SymbolMetadata("Download the current document.\n\nIf you have the native messenger v>=0.1.9 installed, the function accepts an optional argument, filename, which can be:\n- An absolute path\n- A path starting with ~, which will be expanded to your home directory\n- A relative path, relative to the native messenger executable (e.g. ~/.local/share/tridactyl on linux).\nIf filename is not given, a download dialogue will be opened. If filename is a directory, the file will be saved inside of it, its name being inferred from the URL. If the directories mentioned in the path do not exist or if a file already exists at this path, the file will be kept in your downloads folder and an error message will be given.\n\n**NB**: if a non-default save location is chosen, Firefox's download manager will say the file is missing. It is not - it is where you asked it to be saved.\n\nFlags:\n- `--overwrite`: overwrite the destination file.\n- `--cleanup`: removes the downloaded source file e.g. `$HOME/Downlods/downloaded.doc` if moving it to the desired directory fails.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["tabSetActive", new SymbolMetadata("", new FunctionType([new NumberType(false, false)], new TypeReferenceType("Promise", [new TypeReferenceType("Tab", [], false, false)], false, false), false, false), true)], - ["getJumpPageId", new SymbolMetadata("This is used as an ID for the current page in the jumplist.\nIt has a potentially confusing behavior: if you visit site A, then site B, then visit site A again, the jumplist that was created for your first visit on A will be re-used for your second visit.\nAn ideal solution would be to have a counter that is incremented every time a new page is visited within the tab and use that as the return value for getJumpPageId but this doesn't seem to be trivial to implement.", new FunctionType([], new StringType(false, false), false, false), true)], - ["saveJumps", new SymbolMetadata("", new FunctionType([new AnyType(true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), true)], - ["saveTabHistory", new SymbolMetadata("", new FunctionType([new AnyType(true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), true)], - ["curTabHistory", new SymbolMetadata("", new FunctionType([], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), true)], - ["curJumps", new SymbolMetadata("Returns a promise for an object containing the jumplist of all pages accessed in the current tab.\nThe keys of the object currently are the page's URL, however this might change some day. Use [[getJumpPageId]] to access the jumplist of a specific page.", new FunctionType([], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), true)], - ["jumpnext", new SymbolMetadata("Calls [[jumpprev]](-n)", new FunctionType([new NumberType(false, true)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["jumpprev", new SymbolMetadata("Similar to Pentadactyl or vim's jump list.\n\nWhen you scroll on a page, either by using the mouse or Tridactyl's key bindings, your position in the page will be saved after jumpdelay milliseconds (`:get jumpdelay` to know how many milliseconds that is). If you scroll again, you'll be able to go back to your previous position by using `:jumpprev 1`. If you need to go forward in the jumplist, use `:jumpprev -1`.\n\nKnown bug: Tridactyl will use the same jumplist for multiple visits to a same website in the same tab, see [github issue 834](https://github.com/tridactyl/tridactyl/issues/834).", new FunctionType([new NumberType(false, true)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["markjump", new SymbolMetadata("Jumps to a local mark, a global mark, or the location before the last mark jump.\n[a-z] are local marks, [A-Z] are global marks and '`' is the location before the last mark jump.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["markjumplocal", new SymbolMetadata("Jumps to a local mark.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["markjumpglobal", new SymbolMetadata("Jumps to a global mark. If the tab with the mark no longer exists or its url differs from the mark's url,\njumps to another tab with the mark's url or creates it first if such tab does not exist.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["markjumpbefore", new SymbolMetadata("Jumps to a location saved before the last mark jump as long as the tab it's located in exists and its url didn't change.\nOverwrites the location before the last mark jump - repeating this method will jump back and forth between two locations.", new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["scrolltab", new SymbolMetadata("Scrolls to a given position in a tab identified by tabId and prints a message in it.", new FunctionType([new NumberType(false, false), new NumberType(false, false), new NumberType(false, false), new StringType(false, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["markadd", new SymbolMetadata("Adds a global or a local mark. In case of a local mark, it will be assigned to the current page url.\nIf a mark is already assigned, it is overwritten.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["markaddlocal", new SymbolMetadata("Assigns a local mark to the current url and the given key. If a mark is already assigned, it is overwritten.\nTwo urls are considered the same if they're identical ignoring anchors.\nLocal marks are not persisted between browser restarts.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["markaddglobal", new SymbolMetadata("Assigns a global mark to the given key. If a mark is already assigned, it is overwritten.\nGlobal marks are persisted between browser restarts.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["addJump", new SymbolMetadata("Called on 'scroll' events.\nIf you want to have a function that moves within the page but doesn't add a\nlocation to the jumplist, make sure to set JUMPED to true before moving\naround.\nThe setTimeout call is required because sometimes a user wants to move\nsomewhere by pressing 'j' multiple times and we don't want to add the\nin-between locations to the jump list", new FunctionType([], new VoidType(false, false), false, false), true)], - ["addTabHistory", new SymbolMetadata("", new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), true)], - ["unfocus", new SymbolMetadata("Blur (unfocus) the active element and enter normal mode", new FunctionType([], new VoidType(false, false), false, false), false)], - ["scrollpx", new SymbolMetadata("Scrolls the window or any scrollable child element by a pixels on the horizontal axis and b pixels on the vertical axis.", new FunctionType([new NumberType(false, false), new NumberType(false, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["scrollto", new SymbolMetadata("If two numbers are given, treat as x and y values to give to window.scrollTo\nIf one number is given, scroll to that percentage along a chosen axis, defaulting to the y-axis. If the number has 'c' appended to it, it will be interpreted in radians.\n\nNote that if `a` is 0 or 100 and if the document is not scrollable in the given direction, Tridactyl will attempt to scroll the first scrollable element until it reaches the very bottom of that element.\n\nExamples:\n\n- `scrollto 50` -> scroll halfway down the page.\n- `scrollto 3.14c` -> scroll approximately 49.97465213% of the way down the page.", new FunctionType([new UnionType([ - new StringType(false, false), - new NumberType(false, false) - ], false, false), new UnionType([ - new NumberType(false, false), - new LiteralTypeType("x", false, false), - new LiteralTypeType("y", false, false) - ], false, true)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["scrollline", new SymbolMetadata("Scrolls the document of its first scrollable child element by n lines.\n\nThe height of a line is defined by the site's CSS. If Tridactyl can't get it, it'll default to 22 pixels.", new FunctionType([new NumberType(false, true), new NumberType(false, true)], new AnyType(true, false), false, false), false)], - ["scrollpage", new SymbolMetadata("Scrolls the document by n pages.\nThe height of a page is the current height of the window.", new FunctionType([new NumberType(false, true), new NumberType(false, true)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["find", new SymbolMetadata('Rudimentary find mode, left unbound by default as we don\'t currently support `incsearch`. Suggested binds:\n\n bind / fillcmdline find\n bind ? fillcmdline find --reverse\n bind n findnext --search-from-view\n bind N findnext --search-from-view --reverse\n bind gn findselect\n bind gN composite findnext --search-from-view --reverse; findselect\n bind , nohlsearch\n\nArgument: A string you want to search for.\n\nThis function accepts two flags: `-?` or `--reverse` to search from the bottom rather than the top and `-: n` or `--jump-to n` to jump directly to the nth match.\n\nThe behavior of this function is affected by the following setting:\n\n`findcase`: either "smart", "sensitive" or "insensitive". If "smart", find will be case-sensitive if the pattern contains uppercase letters.\n\nKnown bugs: find will currently happily jump to a non-visible element, and pressing n or N without having searched for anything will cause an error.', new FunctionType([new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["findnext", new SymbolMetadata("Jump to the next nth searched pattern.\n\nAvailable flags:\n- `-f` or `--search-from-view` to search from the current view instead of the previous match\n- `-?` or `--reverse` to reverse the sign of the number", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["clearsearchhighlight", new SymbolMetadata("", new FunctionType([], new AnyType(true, false), false, false), false)], - ["findselect", new SymbolMetadata("Highlight the current find-mode match result and enter the visual mode.", new FunctionType([], new VoidType(false, false), false, false), false)], - ["history", new SymbolMetadata("", new FunctionType([new StringType(false, false), new NumberType(false, false)], new VoidType(false, false), false, false), true)], - ["forward", new SymbolMetadata("Navigate forward one page in history.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new VoidType(false, false), false, false), false)], - ["back", new SymbolMetadata("Navigate back one page in history.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new VoidType(false, false), false, false), false)], - ["reload", new SymbolMetadata("Reload the next n tabs, starting with activeTab, possibly bypassingCache", new FunctionType([new NumberType(false, true), new BooleanType(false, true)], new TypeReferenceType("Promise", [new ArrayType(new VoidType(false, false), false, false)], false, false), false, false), false)], - ["reloadall", new SymbolMetadata("Reloads all tabs, bypassing the cache if hard is set to true", new FunctionType([new BooleanType(false, true)], new TypeReferenceType("Promise", [new ArrayType(new VoidType(false, false), false, false)], false, false), false, false), false)], - ["reloadallbut", new SymbolMetadata("Reloads all tabs except the current one, bypassing the cache if hard is set to true\nYou probably want to use [[reloaddead]] instead if you just want to be able to ensure Tridactyl is loaded in all tabs where it can be", new FunctionType([new BooleanType(false, true)], new TypeReferenceType("Promise", [new ArrayType(new VoidType(false, false), false, false)], false, false), false, false), false)], - ["reloaddead", new SymbolMetadata("Reloads all tabs which Tridactyl isn't loaded in", new FunctionType([new BooleanType(false, true)], new TypeReferenceType("Promise", [new TupleType([ - new AnyType(true, false), - new AnyType(true, false), - new AnyType(true, false), - new AnyType(true, false), - new AnyType(true, false), - new AnyType(true, false), - new AnyType(true, false), - new AnyType(true, false), - new AnyType(true, false), - new AnyType(true, false) - ], false, false)], false, false), false, false), false)], - ["reloadhard", new SymbolMetadata("Reload the next n tabs, starting with activeTab. bypass cache for all", new FunctionType([new NumberType(false, true)], new TypeReferenceType("Promise", [new ArrayType(new VoidType(false, false), false, false)], false, false), false, false), false)], - ["open", new SymbolMetadata("Open a new page in the current tab.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["bmarks", new SymbolMetadata("Works exactly like [[open]], but only suggests bookmarks.\n\nIf you want to use optional flags, you should run `:set completions.Bmark.autoselect false` to prevent the spacebar from inserting the URL of the top bookmark.", new FunctionType([new StringType(false, false), new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["open_quiet", new SymbolMetadata("Like [[open]] but doesn't make a new entry in history.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["url2args", new SymbolMetadata('If the url of the current document matches one of your search engines, will convert it to a list of arguments that open/tabopen will understand. If the url doesn\'t match any search engine, returns the url without modifications.\n\nFor example, if you have searchurls.gi set to "https://www.google.com/search?q=%s&tbm=isch", using this function on a page you opened using "gi butterflies" will return "gi butterflies".\n\nThis is useful when combined with fillcmdline, for example like this: `bind O composite url2args | fillcmdline open`.\n\nNote that this might break with search engines that redirect you to other pages/add GET parameters that do not exist in your searchurl.', new FunctionType([], new TypeReferenceType("Promise", [new StringType(false, false)], false, false), false, false), false)], - ["removeSource", new SymbolMetadata("", new FunctionType([], new VoidType(false, false), false, false), true)], - ["viewsource", new SymbolMetadata("Display the (HTML) source of the current page.\n\nBehaviour can be changed by the 'viewsource' setting.\n\nIf the 'viewsource' setting is set to 'default' rather than 'tridactyl',\nthe url the source of which should be displayed can be given as argument.\nOtherwise, the source of the current document will be displayed.", new FunctionType([new StringType(false, true)], new VoidType(false, false), false, false), false)], - ["home", new SymbolMetadata('Go to the homepages you have set with `set homepages ["url1", "url2"]`.', new FunctionType([new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, true)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["help", new SymbolMetadata('Show this page.\n\n`:help something` jumps to the entry for something. Something can be an excmd, an alias for an excmd, a binding or a setting.\n\nOn the ex command page, the "nmaps" list is a list of all the bindings for the command you\'re seeing and the "exaliases" list lists all its aliases.\n\nIf there\'s a conflict (e.g. you have a "go" binding that does something, a "go" excmd that does something else and a "go" setting that does a third thing), the binding is chosen first, then the setting, then the excmd. In such situations, if you want to let Tridactyl know you\'re looking for something specfic, you can specify the following flags as first arguments:\n\n`-a`: look for an alias\n`-b`: look for a binding\n`-e`: look for an ex command\n`-s`: look for a setting\n\nIf the keyword you gave to `:help` is actually an alias for a composite command (see [[composite]]) , you will be taken to the help section for the first command of the pipeline. You will be able to see the whole pipeline by hovering your mouse over the alias in the "exaliases" list. Unfortunately there currently is no way to display these HTML tooltips from the keyboard.\n\ne.g. `:help bind`', new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["apropos", new SymbolMetadata("Search through the help pages. Accepts the same flags as [[help]]. Only useful in interactive usage with completions; the command itself is just a wrapper for [[help]].", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["tutor", new SymbolMetadata("Start the tutorial", new FunctionType([new StringType(false, true)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["credits", new SymbolMetadata("Display Tridactyl's contributors in order of commits in a user-friendly fashion", new FunctionType([], new TypeReferenceType("Promise", [new TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)], - ["no_mouse_mode", new SymbolMetadata('Hides the cursor and covers the current page in an overlay to prevent clicking on links with the mouse to force yourself to use hint mode.\n\nTo bring back mouse control, use [[mouse_mode]] or refresh the page.\n\nSuggested usage: `autocmd DocLoad .* no_mouse_mode`\n\n"There is no mouse".', new FunctionType([], new VoidType(false, false), false, false), false)], - ["neo_mouse_mode", new SymbolMetadata('Matrix variant of [[no_mouse_mode]]\n\n"There is no mouse".\n\nCoincidentally added to Tridactyl at the same time as we reached 1337 stars on GitHub.', new FunctionType([], new VoidType(false, false), false, false), false)], - ["snow_mouse_mode", new SymbolMetadata("Christmas variant of [[no_mouse_mode]] (if you live in $DEFAULT hemisphere).", new FunctionType([], new VoidType(false, false), false, false), false)], - ["pied_piper_mouse_mode", new SymbolMetadata("Music variant of [[no_mouse_mode]].", new FunctionType([], new VoidType(false, false), false, false), false)], - ["drawingstart", new SymbolMetadata("Drawable variant of [[no_mouse_mode]]\nIn this mode, you can use the mouse or a digital stylus to draw. To switch to an eraser, use [[drawingerasertoggle]]\nUse [[mouse_mode]] to return, or refresh page.\nSuggested usage: `autocmd DocLoad .* drawingstart\n\n**Warning**: Windows Ink enabled input devices don't work, disable it for your browser, or use a mouse.", new FunctionType([], new VoidType(false, false), false, false), false)], - ["drawingerasertoggle", new SymbolMetadata("Switch between pen and eraser for [[drawingstart]]\nSuggested usage: `bind e drawingerasertoggle`. If you have a digital pen, map the button to `e` to switch easily.", new FunctionType([], new VoidType(false, false), false, false), false)], - ["mouse_mode", new SymbolMetadata("Revert any variant of the [[no_mouse_mode]]\n\nSuggested usage: `bind mouse_mode` with the autocmd mentioned in [[no_mouse_mode]] or [[drawingstart]].", new FunctionType([], new VoidType(false, false), false, false), false)], - ["findRelLink", new SymbolMetadata("", new FunctionType([new TypeReferenceType("RegExp", [], false, false)], new TypeReferenceType("HTMLAnchorElement", [], false, false), false, false), true)], - ["selectLast", new SymbolMetadata("", new FunctionType([new StringType(false, false)], new TypeReferenceType("HTMLElement", [], false, false), false, false), true)], - ["followpage", new SymbolMetadata("Find a likely next/previous link and follow it\n\nIf a link or anchor element with rel=rel exists, use that, otherwise fall back to:\n\n 1) find the last anchor on the page with innerText matching the appropriate `followpagepattern`.\n 2) call [[urlincrement]] with 1 or -1\n\nIf you want to support e.g. French:\n\n```\nset followpagepatterns.next ^(next|newer|prochain)\\b|\xBB|>>\nset followpagepatterns.prev ^(prev(ious)?|older|pr\xE9c\xE9dent)\\b|\xAB|<<\n```", new FunctionType([new UnionType([ - new LiteralTypeType("next", false, false), - new LiteralTypeType("prev", false, false) - ], false, true)], new VoidType(false, false), false, false), false)], - ["urlincrement", new SymbolMetadata("Increment the current tab URL", new FunctionType([new NumberType(false, true), new NumberType(false, true)], new VoidType(false, false), false, false), false)], - ["urlroot", new SymbolMetadata("Go to the root domain of the current URL", new FunctionType([], new VoidType(false, false), false, false), false)], - ["urlparent", new SymbolMetadata("Go to the parent URL of the current tab's URL", new FunctionType([new NumberType(false, true)], new VoidType(false, false), false, false), false)], - ["urlmodify", new SymbolMetadata('Open a URL made by modifying the current URL\n\nThere are several modes:\n\n* Text replace mode: `urlmodify -t `\n\n Replaces the first instance of the text `old` with `new`.\n * `http://example.com` -> (`-t exa peta`) -> `http://petample.com`\n\n* Regex replacment mode: `urlmodify -r [flags]`\n\n Replaces the first match of the `regexp` with `new`. You can use\n flags `i` and `g` to match case-insensitively and to match\n all instances respectively\n * `http://example.com` -> (`-r [ea] X g`) -> `http://XxXmplX.com`\n\n* Query set mode: `urlmodify -s `\n\n Sets the value of a query to be a specific one. If the query already\n exists, it will be replaced.\n * `http://e.com?id=abc` -> (`-s foo bar`) -> `http://e.com?id=abc&foo=bar\n\n* Query replace mode: `urlmodify -q `\n\n Replace the value of a query with a new one:\n * `http://e.com?id=foo` -> (`-q id bar`) -> `http://e.com?id=bar\n\n* Query delete mode: `urlmodify -Q `\n\n Deletes the given query (and the value if any):\n * `http://e.com?id=foo&page=1` -> (`-Q id`) -> `http://e.com?page=1`\n\n* Graft mode: `urlmodify -g `\n\n "Grafts" a new tail on the URL path, possibly removing some of the old\n tail. Graft point indicates where the old URL is truncated before adding\n the new path.\n\n * `graft_point` >= 0 counts path levels, starting from the left\n (beginning). 0 will append from the "root", and no existing path will\n remain, 1 will keep one path level, and so on.\n * `graft_point` < 0 counts from the right (i.e. the end of the current\n path). -1 will append to the existing path, -2 will remove the last path\n level, and so on.\n\n ```plaintext\n http://website.com/this/is/the/path/component\n Graft point: ^ ^ ^ ^ ^ ^\n From left: 0 1 2 3 4 5\n From right: -6 -5 -4 -3 -2 -1\n ```\n\n Examples:\n\n * `http://e.com/issues/42` -> (`-g 0 foo`) -> `http://e.com/foo`\n * `http://e.com/issues/42` -> (`-g 1 foo`) -> `http://e.com/issues/foo`\n * `http://e.com/issues/42` -> (`-g -1 foo`) -> `http://e.com/issues/42/foo`\n * `http://e.com/issues/42` -> (`-g -2 foo`) -> `http://e.com/issues/foo`\n\n\n* URL Input: `urlmodify -*u `\n\n Each mode can be augmented to accept a URL as the last argument instead of\n the current url.\n\n Examples:\n\n * `urlmodify -tu `\n * `urlmodify -su `\n * `urlmodify -gu `', new FunctionType([new UnionType([ - new LiteralTypeType("-t", false, false), - new LiteralTypeType("-r", false, false), - new LiteralTypeType("-s", false, false), - new LiteralTypeType("-q", false, false), - new LiteralTypeType("-Q", false, false), - new LiteralTypeType("-g", false, false), - new LiteralTypeType("-tu", false, false), - new LiteralTypeType("-ru", false, false), - new LiteralTypeType("-su", false, false), - new LiteralTypeType("-qu", false, false), - new LiteralTypeType("-Qu", false, false), - new LiteralTypeType("-gu", false, false) - ], false, false), new ArrayType(new StringType(false, false), true, false)], new VoidType(false, false), false, false), false)], - ["urlmodify_js", new SymbolMetadata("Like [[urlmodify]] but returns the modified URL for use with [[js]] and [[composite]]\n\nE.g.\n\n`:composite urlmodify_js -t www. old. | tabopen `", new FunctionType([new UnionType([ - new LiteralTypeType("-t", false, false), - new LiteralTypeType("-r", false, false), - new LiteralTypeType("-s", false, false), - new LiteralTypeType("-q", false, false), - new LiteralTypeType("-Q", false, false), - new LiteralTypeType("-g", false, false), - new LiteralTypeType("-tu", false, false), - new LiteralTypeType("-ru", false, false), - new LiteralTypeType("-su", false, false), - new LiteralTypeType("-qu", false, false), - new LiteralTypeType("-Qu", false, false), - new LiteralTypeType("-gu", false, false) - ], false, false), new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["geturlsforlinks", new SymbolMetadata("Returns the url of links that have a matching rel.\n\nDon't bind to this: it's an internal function.", new FunctionType([new StringType(false, false), new StringType(false, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), true)], - ["zoom", new SymbolMetadata("Sets the current page's zoom level anywhere between 30% and 300%.\n\nIf you overshoot the level while using relative adjustments i.e. level > 300% or level < 30% the zoom level will be set to it's maximum or minimum position. Relative adjustments are made * in percentage points, i.e. `:zoom +10 true` increases the zoom level from 50% to 60% or from * 200% to 210%.", new FunctionType([new NumberType(false, true), new StringType(false, true), new StringType(false, true)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["readerold", new SymbolMetadata("", new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), true)], - ["loadaucmds", new SymbolMetadata("", new FunctionType([new UnionType([ - new LiteralTypeType("UriChange", false, false), - new LiteralTypeType("DocStart", false, false), - new LiteralTypeType("DocLoad", false, false), - new LiteralTypeType("DocEnd", false, false), - new LiteralTypeType("TabEnter", false, false), - new LiteralTypeType("TabLeft", false, false), - new LiteralTypeType("FullscreenEnter", false, false), - new LiteralTypeType("FullscreenLeft", false, false), - new LiteralTypeType("FullscreenChange", false, false), - new LiteralTypeType("HistoryState", false, false) - ], false, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), true)], - ["focusinput", new SymbolMetadata("Focus the last used input on the page", new FunctionType([new UnionType([ - new StringType(false, false), - new NumberType(false, false) - ], false, false)], new VoidType(false, false), false, false), false)], - ["changelistjump", new SymbolMetadata("Focus the tab which contains the last focussed input element. If you're lucky, it will focus the right input, too.\n\nCurrently just goes to the last focussed input; being able to jump forwards and backwards is planned.", new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["focusbyid", new SymbolMetadata("", new FunctionType([new StringType(false, false)], new VoidType(false, false), false, false), true)], - ["tabIndexSetActive", new SymbolMetadata("", new FunctionType([new UnionType([ - new StringType(false, false), - new NumberType(false, false) - ], false, false)], new TypeReferenceType("Promise", [new TypeReferenceType("Tab", [], false, false)], false, false), false, false), true)], - ["tabnext", new SymbolMetadata("Switch to the next tab, wrapping round.\n\nIf increment is specified, move that many tabs forwards.", new FunctionType([new NumberType(false, true)], new TypeReferenceType("Promise", [new TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)], - ["tabnext_gt", new SymbolMetadata("Switch to the next tab, wrapping round.\n\nIf an index is specified, go to the tab with that number (this mimics the\nbehaviour of `{count}gt` in vim, except that this command will accept a\ncount that is out of bounds (and will mod it so that it is within bounds as\nper [[tabmove]], etc)).", new FunctionType([new NumberType(false, true)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["tabprev", new SymbolMetadata("Switch to the previous tab, wrapping round.\n\nIf increment is specified, move that many tabs backwards.", new FunctionType([new NumberType(false, true)], new TypeReferenceType("Promise", [new TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)], - ["tabpush", new SymbolMetadata("Pushes the current tab to another window. Only works for windows of the same type\n(can't push a non-private tab to a private window or a private tab to\na non-private window).\nIf *windowId* is not specified, pushes to the next newest window,\nwrapping around.", new FunctionType([new NumberType(false, true)], new TypeReferenceType("Promise", [new UnionType([ - new TypeReferenceType("Tab", [], false, false), - new ArrayType(new TypeReferenceType("Tab", [], false, false), false, false) - ], false, false)], false, false), false, false), false)], - ["tabaudio", new SymbolMetadata("Switch to the tab currently playing audio, if any.", new FunctionType([], new TypeReferenceType("Promise", [new TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)], - ["winmerge", new SymbolMetadata("Moves all of the targetted window's tabs to the current window. Only works for windows of the same type\n(can't merge a non-private tab with a private window).", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["parseWinTabIndex", new SymbolMetadata("Given a string of the format windowIndex.tabIndex, returns a tuple of\nnumbers corresponding to the window index and tab index or the current\nwindow and tab if the string doesn't have the right format.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new ArrayType(new NumberType(false, false), false, false)], false, false), false, false), false)], - ["tabgrab", new SymbolMetadata("Moves a tab identified by a windowIndex.tabIndex id to the current window.\nOnly works for windows of the same type (can't grab a non-private tab from a\nprivate window and can't grab a private tab from a non-private window).", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new UnionType([ - new TypeReferenceType("Tab", [], false, false), - new ArrayType(new TypeReferenceType("Tab", [], false, false), false, false) - ], false, false)], false, false), false, false), false)], - ["tabopen", new SymbolMetadata('Like [[open]], but in a new tab. If no address is given, it will open the newtab page, which can be set with `set newtab [url]`\n\nUse the `-c` flag followed by a container name to open a tab in said container. Tridactyl will try to fuzzy match a name if an exact match is not found (opening the tab in no container can be enforced with "firefox-default" or "none"). If any autocontainer directives are configured and -c is not set, Tridactyl will try to use the right container automatically using your configurations.\n\nUse the `-b` flag to open the tab in the background.\n\nUse the `-w` flag to wait for the web page to load before "returning". This only makes sense for use with [[composite]], which waits for each command to return before moving on to the next one, e.g. `composite tabopen -b -w news.bbc.co.uk ; tabnext`.\n\nThe special flag "--focus-address-bar" should focus the Firefox address bar after opening if no URL is provided.\n\nThese three can be combined in any order, but need to be placed as the first arguments.\n\nUnlike Firefox\'s Ctrl-t shortcut, this opens tabs immediately after the\ncurrently active tab rather than at the end of the tab list because that is\nthe authors\' preference.\n\nIf you would rather the Firefox behaviour `set tabopenpos last`. This\npreference also affects the clipboard, quickmarks, home, help, etc.\n\nIf you would rather the URL be opened as if you\'d middle clicked it, `set\ntabopenpos related`.\n\nHinting is controlled by `relatedopenpos`\n\nAlso see the [[searchengine]] and [[searchurls]] settings.', new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)], - ["tabopenwait", new SymbolMetadata("Like [[tabopen]] but waits for the DOM to load before resolving its promise. Useful if you're hoping to execute ex-commands in that tab.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)], - ["tabopen_helper", new SymbolMetadata("", new FunctionType([new ObjectType(/* @__PURE__ */ new Map([]), false, false)], new TypeReferenceType("Promise", [new TypeReferenceType("Tab", [], false, false)], false, false), false, false), true)], - ["tabqueue", new SymbolMetadata("Passes its first argument to `tabopen -b`. Once the tab opened by `tabopen\n-b` is activated/selected/focused, opens its second argument with `tabopen\n-b`. Once the second tab is activated/selected/focused, opens its third\nargument with `tabopen -b` and so on and so forth until all arguments have\nbeen opened in a new tab or until a tab is closed without being\nactivated/selected/focused.\n\nExample usage:\n `tabqueue http://example.org http://example.com http://example.net`\n `composite hint -qpipe a href | tabqueue`", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["idFromIndex", new SymbolMetadata("Resolve a tab index to the tab id of the corresponding tab in this window.", new FunctionType([new UnionType([ - new StringType(false, false), - new NumberType(false, false) - ], false, true)], new TypeReferenceType("Promise", [new NumberType(false, false)], false, false), false, false), true)], - ["tabFromIndex", new SymbolMetadata("Like [[idFromIndex]] but returns the whole tab object", new FunctionType([new UnionType([ - new StringType(false, false), - new NumberType(false, false) - ], false, true)], new TypeReferenceType("Promise", [new TypeReferenceType("Tab", [], false, false)], false, false), false, false), true)], - ["tabonly", new SymbolMetadata("Close all other tabs in this window", new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["tabduplicate", new SymbolMetadata("Duplicate a tab.", new FunctionType([new NumberType(false, true)], new TypeReferenceType("Promise", [new TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)], - ["tabdetach", new SymbolMetadata("Detach a tab, opening it in a new window.", new FunctionType([new NumberType(false, true)], new TypeReferenceType("Promise", [new TypeReferenceType("Window", [], false, false)], false, false), false, false), false)], - ["fullscreen", new SymbolMetadata("Toggle fullscreen state", new FunctionType([], new TypeReferenceType("Promise", [new TypeReferenceType("Window", [], false, false)], false, false), false, false), false)], - ["tabclose", new SymbolMetadata("Close a tab.\n\nKnown bug: autocompletion will make it impossible to close more than one tab at once if the list of numbers looks enough like an open tab's title or URL.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["tabcloseallto", new SymbolMetadata("Close all tabs to the side specified", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["undo", new SymbolMetadata('Restore the most recently closed item.\nThe default behaviour is to restore the most recently closed tab in the\ncurrent window unless the most recently closed item is a window.\n\nSupplying either "tab" or "window" as an argument will specifically only\nrestore an item of the specified type. Supplying "tab_strict" only restores\ntabs that were open in the current window.', new FunctionType([new StringType(false, true)], new TypeReferenceType("Promise", [new NumberType(false, false)], false, false), false, false), false)], - ["tabmove", new SymbolMetadata("Move the current tab to be just in front of the index specified.\n\nKnown bug: This supports relative movement with `tabmove +pos` and `tabmove -pos`, but autocomplete doesn't know that yet and will override positive and negative indexes.\n\nPut a space in front of tabmove if you want to disable completion and have the relative indexes at the command line.\n\nBinds are unaffected.", new FunctionType([new StringType(false, true)], new TypeReferenceType("Promise", [new UnionType([ - new TypeReferenceType("Tab", [], false, false), - new ArrayType(new TypeReferenceType("Tab", [], false, false), false, false) - ], false, false)], false, false), false, false), false)], - ["tabsort", new SymbolMetadata("Move tabs in current window according to various criteria:\n\n- `--containers` groups tabs by containers\n- `--title` sorts tabs by title\n- `--url` sorts tabs by url (the default)\n- `(tab1, tab2) => true|false`\n - sort by arbitrary comparison function. `tab{1,2}` are objects with properties described here: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/Tab", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["pin", new SymbolMetadata("Pin the current tab", new FunctionType([], new TypeReferenceType("Promise", [new TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)], - ["mute", new SymbolMetadata('Mute current tab or all tabs.\n\nPassing "all" to the excmd will operate on the mute state of all tabs.\nPassing "unmute" to the excmd will unmute.\nPassing "toggle" to the excmd will toggle the state of `browser.tabs.tab.MutedInfo`', new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["winopen", new SymbolMetadata("Like [[tabopen]], but in a new window.\n\n`winopen -private [...]` will open the result in a private window (and won't store the command in your ex-history ;) ).\n\n`winopen -popup [...]` will open it in a popup window. You can combine the two for a private popup.\n\n`winopen -c containername [...]` will open the result in a container while ignoring other options given. See [[tabopen]] for more details on containers.\n\nExample: `winopen -popup -private ddg.gg`", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["winclose", new SymbolMetadata("Close a window.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new ArrayType(new VoidType(false, false), false, false)], false, false), false, false), false)], - ["wintitle", new SymbolMetadata("Add/change a prefix to the current window title\n\nExample: `wintitle [Hovercraft research]`\n\nProtip: unicode emojis work :)", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new TypeReferenceType("Window", [], false, false)], false, false), false, false), false)], - ["qall", new SymbolMetadata("Close all windows", new FunctionType([], new TypeReferenceType("Promise", [new ArrayType(new VoidType(false, false), false, false)], false, false), false, false), false)], - ["sidebaropen", new SymbolMetadata("EXPERIMENTAL: like [[open]] but loads queries in the sidebar. Doesn't actually open the sidebar - see [[sidebartoggle]].\n\nNot all schemas are supported, such as `about:*` and Firefox's built-in search engines. Tridactyl's searchurls and jsurls work fine - `:set searchengine google` will be sufficient for most users.\n\nIf you try to open the command line in the sidebar things will break.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["jsua", new SymbolMetadata('Like [[jsb]] but preserves "user action" intent for use with certain web extension APIs. Can only be called with browser mode binds, e.g.\n\n`:bind --mode=browser jsua browser.sidebarAction.open(); tri.excmds.sidebaropen("https://mail.google.com/mail/mu")`', new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["sidebartoggle", new SymbolMetadata("Toggle the side bar. Can only be called through browser mode binds, e.g.\n\n`:bind --mode=browser sidebartoggle`", new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["containerclose", new SymbolMetadata("Closes all tabs open in the same container across all windows.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["containercreate", new SymbolMetadata("Creates a new container. Note that container names must be unique and that the checks are case-insensitive.\n\nFurther reading https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextualIdentities/ContextualIdentity\n\nExample usage:\n - `:containercreate tridactyl green dollar`", new FunctionType([new StringType(false, false), new StringType(false, true), new StringType(false, true)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["containerdelete", new SymbolMetadata("Delete a container. Closes all tabs associated with that container beforehand. Note: container names are case-insensitive.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["containerupdate", new SymbolMetadata("Update a container's information. Note that none of the parameters are optional and that container names are case-insensitive.\n\nExample usage:\n\n- Changing the container name: `:containerupdate banking blockchain green dollar`\n\n- Changing the container icon: `:containerupdate banking banking green briefcase`\n\n- Changing the container color: `:containerupdate banking banking purple dollar`", new FunctionType([new StringType(false, false), new StringType(false, false), new StringType(false, false), new StringType(false, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["viewcontainers", new SymbolMetadata("Shows a list of the current containers in Firefox's native JSON viewer in the current tab.\n\nNB: Tridactyl cannot run on this page!", new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["recontain", new SymbolMetadata("Opens the current tab in another container.\n\nThis is probably not a good idea if you care about tracking protection!\nTransfering URLs from one container to another allows websites to track\nyou across those containers.\n\nRead more here:\nhttps://github.com/mozilla/multi-account-containers/wiki/Moving-between-containers", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["setContentStateGroup", new SymbolMetadata("", new FunctionType([new StringType(false, false)], new VoidType(false, false), false, false), true)], - ["tgroupcreate", new SymbolMetadata("Create a new tab group in the current window. NB: use [[tgroupswitch]] instead\nin most cases, since it will create non-existent tab groups before switching\nto them.\n\nTab groups are a way of organizing different groups of related tabs within a\nsingle window. Groups allow you to have different named contexts and show\nonly the tabs for a single group at a time.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new StringType(false, false)], false, false), false, false), false)], - ["tgroupswitch", new SymbolMetadata('Switch to a different tab group, hiding all other tabs.\n\n"%" denotes the current tab group and "#" denotes the tab group that was\nlast active. "A" indates a tab group that contains an audible tab. Use\n`:set completions.Tab.statusstylepretty true` to display a unicode character\ninstead.', new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new StringType(false, false)], false, false), false, false), false)], - ["tgrouplast", new SymbolMetadata("Switch to the previously active tab group.", new FunctionType([], new TypeReferenceType("Promise", [new StringType(false, false)], false, false), false, false), false)], - ["tgrouprename", new SymbolMetadata("Rename the current tab group.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new StringType(false, false)], false, false), false, false), false)], - ["tgroupclose", new SymbolMetadata("Close all tabs in a tab group and delete the group.", new FunctionType([new StringType(false, true)], new TypeReferenceType("Promise", [new StringType(false, false)], false, false), false, false), false)], - ["tgroupmove", new SymbolMetadata("Move the current tab to another tab group, creating it if it does not exist.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new StringType(false, false)], false, false), false, false), false)], - ["tgroupabort", new SymbolMetadata("Delete all tab group information for the current window and show all tabs.", new FunctionType([], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["version", new SymbolMetadata("", new FunctionType([], new AnyType(true, false), false, false), false)], - ["mode", new SymbolMetadata("Switch mode.\n\nFor now you probably shouldn't manually switch to other modes than `normal` and `ignore`. Make sure you're aware of the key bindings (ignoremaps) that will allow you to go come back to normal mode from ignore mode before you run `:mode ignore` otherwise you're going to have a hard time re-enabling Tridactyl.\n\nExample:\n - `mode ignore` to ignore almost all keys.\n\nIf you're looking for a way to temporarily disable Tridactyl, `mode ignore` might be what you're looking for.\n\nNote that when in ignore mode, Tridactyl will not switch to insert mode when focusing text areas/inputs. This is by design.\n\n**New feature:** you can add modes as simply as adding binds with `bind --mode=[newmodename]` and then enter the mode with `mode [newmodename]`.", new FunctionType([new AnyType(true, false)], new VoidType(false, false), false, false), false)], - ["getnexttabs", new SymbolMetadata("", new FunctionType([new NumberType(false, false), new NumberType(false, true)], new TypeReferenceType("Promise", [new ArrayType(new NumberType(false, false), false, false)], false, false), false, false), true)], - ["repeat", new SymbolMetadata("Repeats a `cmd` `n` times.\nIf `cmd` doesn't exist, re-executes the last exstr that was executed in the tab.\nExecutes the command once if `n` isn't defined either.\n\nThis re-executes the last *exstr*, not the last *excmd*. Some excmds operate internally by constructing and evaluating exstrs, others by directly invoking excmds without going through the exstr parser. For example, aucmds and keybindings evaluate exstrs and are repeatable, while commands like `:bmarks` directly invoke `:tabopen` and you'll repeat the `:bmarks` rather than the internal `:tabopen`.\n\nIt's difficult to execute this in the background script (`:jsb`, `:run_excmd`, `:autocmd TriStart`, `:source`), but if you you do, it will re-execute the last exstr that was executed in the background script. What this may have been is unpredictable and not precisely encouraged.", new FunctionType([new NumberType(false, true), new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["composite", new SymbolMetadata("Split `cmds` on pipes (|) and treat each as its own command. Return values are passed as the last argument of the next ex command, e.g,\n\n`composite echo yes | fillcmdline` becomes `fillcmdline yes`. A more complicated example is the ex alias, `command current_url composite get_current_url | fillcmdline_notrail `, which is used in, e.g. `bind T current_url tabopen`.\n\nWorkaround: this should clearly be in the parser, but we haven't come up with a good way to deal with |s in URLs, search terms, etc. yet.\n\n`cmds` are also split with semicolons (;) and don't pass things along to each other.\n\nIf you wish to have a command that has semi-colons in it (e.g. some JavaScript or `hint -;`), first bind a [[command]] to it. For example, `command hint_focus -;`, and then `composite hint_focus; !s xdotool key Menu`.\n\nThe behaviour of combining ; and | in the same composite command is left as an exercise for the reader.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["shellescape", new SymbolMetadata("Escape command for safe use in shell with composite. E.g: `composite js MALICIOUS_WEBSITE_FUNCTION() | shellescape | exclaim ls`", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["escapehatch", new SymbolMetadata("Magic escape hatch: if Tridactyl can't run in the current tab, return to a tab in the current window where Tridactyl can run, making such a tab if it doesn't currently exist. If Tridactyl can run in the current tab, return focus to the document body from e.g. the URL bar or a video player.\n\nOnly useful if called from a background context, e.g. at the end of an RC file to ensure that when you start the browser you don't get trapped on an about: page, or via `bind --mode=browser escapehatch` (bound to `` by default).\n\nNB: when called via `bind --mode=browser`, we return focus from the address bar by opening and closing the \"sidebar\" (which is used exclusively for this purpose). If escapehatch is called in any other way, we cannot do this as Mozilla thinks it might [spook](https://extensionworkshop.com/documentation/publish/add-on-policies/#no-surprises) [you](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/User_actions) : ).\n\nThis sidebar hack will close other sidebars such a TreestyleTabs. You can disable it with `:set escapehatchsidebarhack false`, but Tridactyl will no longer be able to get focus back from certain places such as the address bar.", new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["sleep", new SymbolMetadata("Sleep time_ms milliseconds.\nThis is probably only useful for composite commands that need to wait until the previous asynchronous command has finished running.", new FunctionType([new NumberType(false, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["showcmdline", new SymbolMetadata("", new FunctionType([new BooleanType(false, true)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), true)], - ["hidecmdline", new SymbolMetadata("", new FunctionType([], new VoidType(false, false), false, false), true)], - ["fillcmdline", new SymbolMetadata("Set the current value of the commandline to string *with* a trailing space", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["fillcmdline_notrail", new SymbolMetadata("Set the current value of the commandline to string *without* a trailing space", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["fillcmdline_nofocus", new SymbolMetadata("Show and fill the command line without focusing it", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["fillcmdline_tmp", new SymbolMetadata("Shows str in the command line for ms milliseconds. Recommended duration: 3000ms.", new FunctionType([new NumberType(false, false), new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["yank", new SymbolMetadata('Copy `content` to clipboard without feedback. Use `clipboard yank` for interactive use.\n\ne.g. `yank bob` puts "bob" in the clipboard; `composite js document.title | yank` puts the document title in the clipboard.', new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new ArrayType(new AnyType(true, false), false, false)], false, false), false, false), false)], - ["setclip", new SymbolMetadata("Copies a string to the clipboard/selection buffer depending on the user's preferences.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new ArrayType(new AnyType(true, false), false, false)], false, false), false, false), true)], - ["setclip_webapi", new SymbolMetadata("Copies a string to the clipboard using the Clipboard API.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), true)], - ["getclip", new SymbolMetadata("Fetches the content of the clipboard/selection buffer depending on user's preferences\n\nExposed for use with [[composite]], e.g. `composite getclip | fillcmdline`", new FunctionType([new UnionType([ - new LiteralTypeType("clipboard", false, false), - new LiteralTypeType("selection", false, false) - ], false, true)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["getclip_webapi", new SymbolMetadata("Gets the clipboard content using the Clipboard API.", new FunctionType([], new TypeReferenceType("Promise", [new StringType(false, false)], false, false), false, false), true)], - ["clipboard", new SymbolMetadata('Use the system clipboard.\n\nIf `excmd === "open"`, call [[open]] with the contents of the clipboard. Similarly for [[tabopen]].\n\nIf `excmd === "yank"`, copy the current URL, or if given, the value of toYank, into the system clipboard.\n\nIf `excmd === "yankcanon"`, copy the canonical URL of the current page if it exists, otherwise copy the current URL.\n\nIf `excmd === "yankshort"`, copy the shortlink version of the current URL, and fall back to the canonical then actual URL. Known to work on https://yankshort.neocities.org/.\n\nIf `excmd === "yanktitle"`, copy the title of the open page.\n\nIf `excmd === "yankmd"`, copy the title and url of the open page formatted in Markdown for easy use on sites such as reddit. `yankorg` is similar but for Emacs orgmode.\n\nIf you\'re on Linux and the native messenger is installed, Tridactyl will call an external binary (either xclip or xsel) to read or write to your X selection buffer. If you want another program to be used, set "externalclipboardcmd" to its name and make sure it has the same interface as xsel/xclip ("-i"/"-o" and reading from stdin).\n\nWhen doing a read operation (i.e. open or tabopen), if "putfrom" is set to "selection", the X selection buffer will be read instead of the clipboard. Set "putfrom" to "clipboard" to use the clipboard.\n\nWhen doing a write operation, if "yankto" is set to "selection", only the X selection buffer will be written to. If "yankto" is set to "both", both the X selection and the clipboard will be written to. If "yankto" is set to "clipboard", only the clipboard will be written to.', new FunctionType([new UnionType([ - new LiteralTypeType("open", false, false), - new LiteralTypeType("yank", false, false), - new LiteralTypeType("yankshort", false, false), - new LiteralTypeType("yankcanon", false, false), - new LiteralTypeType("yanktitle", false, false), - new LiteralTypeType("yankmd", false, false), - new LiteralTypeType("yankorg", false, false), - new LiteralTypeType("xselpaste", false, false), - new LiteralTypeType("tabopen", false, false) - ], false, true), new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["yankimage", new SymbolMetadata("Copy an image to the clipboard.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["tab", new SymbolMetadata("Change active tab.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["taball", new SymbolMetadata("Wrapper for [[tab]] with multi-window completions", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["tabcurrentrename", new SymbolMetadata("Rename current tab.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new VoidType(false, false), false, false), true)], - ["tabrename", new SymbolMetadata("Rename a tab.", new FunctionType([new StringType(false, false), new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["tab_helper", new SymbolMetadata("Helper to change active tab. Used by [[tab]] and [[taball]].", new FunctionType([new BooleanType(false, false), new BooleanType(false, false), new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["command", new SymbolMetadata("Similar to vim's `:command`. Maps one ex-mode command to another.\nIf command already exists, this will override it, and any new commands\nadded in a future release will be SILENTLY overridden. Aliases are\nexpanded recursively.\n\nExamples:\n - `command t tabopen`\n - `command tn tabnext_gt`\n - `command hello t` This will expand recursively into 'hello'->'tabopen'\n\nCommands/aliases are expanded as in a shell, so, given the commands above,\nentering `:tn 43` will expand to `:tabnext_gt 43`. You can use this to create\nyour own ex-commands in conjunction with [[js]], specifically `js -p` and `js -d`.\n\nNote that this is only for excmd -> excmd mappings. To map a normal-mode\ncommand to an excommand, see [[bind]].\n\nSee also:\n - [[comclear]]", new FunctionType([new StringType(false, false), new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["comclear", new SymbolMetadata("Similar to vim's `comclear` command. Clears an excmd alias defined by\n`command`.\n\nFor example: `comclear helloworld` will reverse any changes caused\nby `command helloworld xxx`\n\nSee also:\n - [[command]]", new FunctionType([new StringType(false, false)], new VoidType(false, false), false, false), false)], - ["bind", new SymbolMetadata("Bind a sequence of keys to an excmd or view bound sequence.\n\nThis is an easier-to-implement bodge while we work on vim-style maps.\n\nExamples:\n\n - `bind G fillcmdline tabopen google`\n - `bind D composite tabclose | tab #` -> close current tab and switch to most recent previous tab\n - `bind j scrollline 20`\n - `bind F hint -b`\n\nYou can view binds by omitting the command line:\n\n - `bind j`\n - `bind k`\n\nYou can bind to modifiers and special keys by enclosing them with angle brackets, for example `bind z fullscreen`, `unbind ` (a favourite of people who use TreeStyleTabs :) ), or `bind forward`.\n\nModifiers are truncated to a single character, so Ctrl -> C, Alt -> A, and Shift -> S. Shift is a bit special as it is only required if Shift does not change the key inputted, e.g. `` is OK, but `` should just be `A`.\n\nYou can view all special key names here: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values\n\nUse [[composite]] if you want to execute multiple excmds. Use\n[[fillcmdline]] to put a string in the cmdline and focus the cmdline\n(otherwise the string is executed immediately).\n\nYou can bind to other modes with `bind --mode={insert|ignore|normal|input|ex|hint} ...`, e.g, `bind --mode=insert emacs qall` (NB: unlike vim, all preceeding characters will not be input), or `bind --mode=hint hint.reset`.\n\n`bind --mode=browser [key sequence] [ex command]` binds to a special mode which can be accessed all the time in all browser tabs - even tabs in which Tridactyl cannot run. It comes with a few caveats:\n\n- you may only have a few browser-mode binds at once. At the time of writing, this is 20, with 3 initially taken by Tridactyl. If you desperately need more, file an [[issue]].\n- the key sequence must consist of a single, simple key with at least one and no more than two modifiers. An error will be thrown if you try to bind to an invalid key sequence.\n- the `ex command` you bind to may not work fully unless you are on a tab which Tridactyl has access to. Generally, browser-wide actions like making or closing tabs will work but tab-specific actions like scrolling down or entering hint mode will not.\n\nA list of editor functions can be found\n[here](/static/docs/modules/_src_lib_editor_.html).\n\nSee also:\n\n - [[unbind]]\n - [[reset]]", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["bindshow", new SymbolMetadata("", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["bindwizard", new SymbolMetadata("Generate a key sequence from keypresses. Once Enter is pressed, the command line is filled with a [[bind]]\ncommand with the key sequence and provided arguments, which you can choose to modify and execute.\n\nIf you have `:set keyboardlayoutforce true`, it will bind commands to physical keys regardless of layout.\n\nAccepts the same arguments as [[bind]] (except for the key sequence which will be generated):\n\n - `bindwizard [command]`, then press the keys you want to bind, then hit Enter.\n - `bindwizard --mode=[mode] [command]` also works.\n\nYou can execute it without arguments to see what is bound to the keys you type.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["bindurl", new SymbolMetadata("Like [[bind]] but for a specific url pattern (also see [[seturl]]).", new FunctionType([new StringType(false, false), new StringType(false, false), new StringType(false, false), new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["keymap", new SymbolMetadata("Deprecated: use `:set keyboardlayoutforce true` instead.\n\nMakes one key equivalent to another for the purposes of most of our parsers. Useful for international keyboard layouts. See user-provided examples for various layouts on our wiki: https://github.com/tridactyl/tridactyl/wiki/Internationalisation\n\ne.g,\n keymap \u0119 e", new FunctionType([new StringType(false, false), new StringType(false, false)], new AnyType(true, false), false, false), false)], - ["searchsetkeyword", new SymbolMetadata("", new FunctionType([], new VoidType(false, false), false, false), true)], - ["validateSetArgs", new SymbolMetadata("Validates arguments for set/seturl", new FunctionType([new StringType(false, false), new ArrayType(new StringType(false, false), false, false)], new ArrayType(new AnyType(true, false), false, false), false, false), true)], - ["seturl", new SymbolMetadata("Usage: `seturl [pattern] key values`", new FunctionType([new StringType(false, false), new StringType(false, false), new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["setmode", new SymbolMetadata("Usage: `setmode mode key values`", new FunctionType([new StringType(false, false), new StringType(false, false), new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["set", new SymbolMetadata('Set a key value pair in config.\n\nUse to set any values found [here](/static/docs/classes/_src_lib_config_.default_config.html).\n\nArrays should be set using JS syntax, e.g. `:set blacklistkeys ["/",","]`.\n\ne.g.\n set searchurls.google https://www.google.com/search?q=\n set logging.messaging info\n\nIf no value is given, the value of the of the key will be displayed.\n\nSee also: [[unset]]', new FunctionType([new StringType(false, false), new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["firefoxsyncpull", new SymbolMetadata("Replaces your local configuration with that stored in the Firefox Sync area.\n\nIt does not merge your configurations: it overwrites.\n\nAlso see [[firefoxsyncpush]].", new FunctionType([], new AnyType(true, false), false, false), false)], - ["firefoxsyncpush", new SymbolMetadata("Pushes your local configuration to the Firefox Sync area.\n\nIt does not merge your configurations: it overwrites.\n\nAlso see [[firefoxsyncpull]].", new FunctionType([], new AnyType(true, false), false, false), false)], - ["getAutocmdEvents", new SymbolMetadata("", new FunctionType([], new ArrayType(new StringType(false, false), false, false), false, false), true)], - ["autocmd", new SymbolMetadata("Set autocmds to run when certain events happen.", new FunctionType([new StringType(false, false), new StringType(false, false), new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["autocontain", new SymbolMetadata('Automatically open a domain and all its subdomains in a specified container.\n\n__NB:__ You should use this command with an -s (sane mode) or -u (URL mode) flag. Usage without a flag uses an incorrect regular expression which may cause weird behaviour and has been left in for compatibility reasons.\n\nThis function accepts a `-u` flag to treat the pattern as a URL rather than a domain.\nFor example: `autocontain -u ^https?://([^/]*\\.|)youtube\\.com/ google` is equivalent to `autocontain -s youtube\\.com google`\n\nFor declaring containers that do not yet exist, consider using `auconcreatecontainer true` in your tridactylrc.\nThis allows Tridactyl to automatically create containers from your autocontain directives. Note that they will be random icons and colors.\n\nThe domain is passed through as a regular expression so there are a few gotchas to be aware of:\n* Unescaped periods will match *anything*. `autocontain -s google.co.uk work` will match `google!co$uk`. Escape your periods (i.e. `\\.`) or accept that you might get some false positives.\n* You can use regex in your pattern. `autocontain -s google\\.(co\\.uk|com) work` will match either `google.co.uk` or `google.com`. If multiple rules match a certain URL, the one with the longest regex will be picked.\n\nThis *should* now peacefully coexist with the Temporary Containers and Multi-Account Containers addons. Do not trust this claim. If a fight starts the participants will try to open infinite tabs. It is *strongly* recommended that you use a tridactylrc so that you can abort a sorceror\'s-apprentice scenario by killing firefox, commenting out all of autocontainer directives in your rc file, and restarting firefox to clean up the mess. There are a number of strange behaviors resulting from limited coordination between extensions. Redirects can be particularly surprising; for example, with `:autocontain -s will-redirect.example.org example` set and `will-redirect.example.org` redirecting to `redirected.example.org`, navigating to `will-redirect.example.org` will result in the new tab being in the `example` container under some conditions and in the `firefox-default` container under others.\n\nPass an optional space-separated list of proxy names to assign a proxy (followed by failover proxies) to a URL and open in a specified container.\nFor example: `autocontain [-{u,s}] pattern container proxy1 proxy2`\n\nTo assign a proxy and open in no container, use "firefox-default" or "none" as a container name.\nSee also:\n - [[proxyadd]]\n - [[proxyremove]]', new FunctionType([new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["proxyadd", new SymbolMetadata("Add a proxy for use with [[autocontain]] or `:set proxy`", new FunctionType([new StringType(false, false), new StringType(false, false)], new AnyType(true, false), false, false), false)], - ["proxyremove", new SymbolMetadata("Remove proxies.", new FunctionType([new StringType(false, false)], new VoidType(false, false), false, false), false)], - ["autocmddelete", new SymbolMetadata("Remove autocmds", new FunctionType([new StringType(false, false), new StringType(false, false)], new AnyType(true, false), false, false), false)], - ["blacklistadd", new SymbolMetadata("Helper function to put Tridactyl into ignore mode on the provided URL.\n\nSimply creates a DocStart [[autocmd]] that runs `mode ignore`. NB: ignore mode does have a few keybinds by default - see `:viewconfig ignoremaps`. These can be unbound with, e.g. `:unbind --mode=ignore `, or `:unbindurl [url] --mode=ignore `.\n\nRemove sites from the blacklist with `blacklistremove [url]` or `autocmddelete DocStart [url]`.\n\nIf you're looking for a way to temporarily disable Tridactyl, this might be what you're looking for. If you need to disable Tridactyl more thoroughly on a page look at `:help superignore` instead.\n\n", new FunctionType([new StringType(false, false)], new AnyType(true, false), false, false), false)], - ["unbind", new SymbolMetadata("Unbind a sequence of keys so that they do nothing at all.\n\nSee also:\n\n - [[bind]]\n - [[reset]]", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["unbindurl", new SymbolMetadata("Unbind a sequence of keys you have set with [[bindurl]]. Note that this **kills** a bind, which means Tridactyl will pass it to the page on `pattern`. If instead you want to use the default setting again, use [[reseturl]].", new FunctionType([new StringType(false, false), new StringType(false, false), new StringType(false, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["reset", new SymbolMetadata("Restores a sequence of keys to their default value.", new FunctionType([new StringType(false, false), new StringType(false, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["reseturl", new SymbolMetadata("Restores a sequence of keys to their value in the global config for a specific URL pattern.\n\nSee also:\n - [[bind]]\n - [[unbind]]\n - [[reset]]\n - [[bindurl]]\n - [[unbindurl]]\n - [[seturl]]\n - [[unseturl]]\n - [[setmode]]\n - [[unsetmode]]", new FunctionType([new StringType(false, false), new StringType(false, false), new StringType(false, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["sanitise", new SymbolMetadata("Deletes various bits of Firefox or Tridactyl data\n\nThe list of possible arguments can be found here:\nhttps://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/browsingData/DataTypeSet\n\nAdditional Tridactyl-specific arguments are:\n- `commandline`: Removes the in-memory commandline history.\n- `tridactyllocal`: Removes all tridactyl storage local to this machine. Use it with\n commandline if you want to delete your commandline history.\n- `tridactylsync`: Removes all tridactyl storage associated with your Firefox Account (i.e, all user configuration, by default).\nThese arguments aren't affected by the timespan parameter.\n\nTimespan parameter:\n-t [0-9]+(m|h|d|w)\n\nExamples:\n\n- `sanitise all` -> Deletes __everything__, including any saved usernames / passwords(!)\n- `sanitise history` -> Deletes all history\n- `sanitise commandline tridactyllocal tridactylsync` -> Deletes every bit of data Tridactyl holds\n- `sanitise cookies -t 3d` -> Deletes cookies that were set during the last three days.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["quickmark", new SymbolMetadata("Bind a quickmark for the current URL or space-separated list of URLs to a key on the keyboard.\n\nAfterwards use go[key], gn[key], or gw[key] to [[open]], [[tabopen]], or\n[[winopen]] the URL respectively.\n\nExample:\n- `quickmark m https://mail.google.com/mail/u/0/#inbox`", new FunctionType([new StringType(false, false), new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["get", new SymbolMetadata("Puts the contents of config value with keys `keys` into the commandline and the background page console\n\nIt's a bit rubbish, but we don't have a good way to provide feedback to the commandline yet.\n\nYou can view the log entry in the browser console (Ctrl-Shift-j).\n\nFor example, you might try `get nmaps` to see all of your current binds.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["viewconfig", new SymbolMetadata("Opens the current configuration in Firefox's native JSON viewer in a new tab.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new VoidType(false, false), false, false), false)], - ["jsonview", new SymbolMetadata("View a JSON object in Firefox's JSON viewer.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new ArrayType(new AnyType(true, false), false, false)], false, false), false, false), false)], - ["unseturl", new SymbolMetadata("Reset a site-specific setting.\n\nusage: `unseturl [pattern] key`", new FunctionType([new StringType(false, false), new StringType(false, false)], new AnyType(true, false), false, false), false)], - ["unsetmode", new SymbolMetadata("Reset a mode-specific setting.\n\nusage: `unsetmode mode key`", new FunctionType([new StringType(false, false), new StringType(false, false)], new AnyType(true, false), false, false), false)], - ["unset", new SymbolMetadata("Reset a config setting to default", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["setnull", new SymbolMetadata('"Delete" a default setting. E.g. `setnull searchurls.github` means `open github test` would search your default search engine for "github test".', new FunctionType([new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["hint", new SymbolMetadata("Hint a page.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["rot13", new SymbolMetadata("Perform rot13.\n\nTransforms all text nodes in the current tab via rot13. Only characters in\nthe ASCII range are considered.", new FunctionType([new NumberType(false, false)], new VoidType(false, false), false, false), false)], - ["jumble", new SymbolMetadata("Perform text jumbling (reibadailty).\n\nShuffles letters except for first and last in all words in text nodes in the current tab. Only characters in\nthe ASCII range are considered.\n\nInspired by: https://www.newscientist.com/letter/mg16221887-600-reibadailty/", new FunctionType([], new VoidType(false, false), false, false), false)], - ["run_exstr", new SymbolMetadata("Hacky ex string parser.\n\nUse it for fire-and-forget running of background commands in content.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["gobble", new SymbolMetadata("Initialize gobble mode.\n\nIf numKeysOrTerminator is a number, it will read the provided amount of keys;\nIf numKeysOrTerminator is a key or key combination like 'k', '' or '';\nit will read keys until the provided key is pressed.\nThen it will append the keypresses to `endCmd` and execute that string,\nalso appending arguments if provided.", new FunctionType([new StringType(false, false), new StringType(false, false), new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["getGotoSelectors", new SymbolMetadata("", new FunctionType([], new TypeReferenceType("Promise", [new ArrayType(new ObjectType(/* @__PURE__ */ new Map([]), false, false), false, false)], false, false), false, false), true)], - ["goto", new SymbolMetadata("Jump to selector.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["nmode", new SymbolMetadata("Initialize n [mode] mode.\n\nIn this special mode, a series of key sequences are executed as bindings from a different mode, as specified by the\n`mode` argument. After the count of accepted sequences is `n`, the finalizing ex command given as the `endexArr`\nargument is executed, which defaults to `mode ignore`.\n\nExample: `:nmode normal 1 mode ignore`\nThis looks up the next key sequence in the normal mode bindings, executes it, and switches the mode to `ignore`.\nIf the key sequence does not match a binding, it will be silently passed through to Firefox, but it will be counted\nfor the termination condition.", new FunctionType([new StringType(false, false), new NumberType(false, false), new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["tssReadFromCss", new SymbolMetadata("Read text content of elements matching the given selector", new FunctionType([new StringType(false, false)], new VoidType(false, false), false, false), false)], - ["ttsread", new SymbolMetadata("Read the given text using the browser's text to speech functionality and\nthe settings currently set", new FunctionType([new UnionType([ - new LiteralTypeType("-t", false, false), - new LiteralTypeType("-c", false, false) - ], false, false), new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["ttsvoices", new SymbolMetadata("Show a list of the voices available to the TTS system. These can be\nset in the config using `ttsvoice`", new FunctionType([], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["ttscontrol", new SymbolMetadata("Cancel current reading and clear pending queue\n\nArguments:\n - stop: cancel current and pending utterances", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["buildFilterConfigs", new SymbolMetadata("Build a set of FilterConfigs from a list of human-input filter\nspecs.", new FunctionType([new ArrayType(new StringType(false, false), false, false)], new ArrayType(new AnyType(true, false), false, false), false, false), true)], - ["perfdump", new SymbolMetadata('Dump the raw json for our performance counters. Filters with\ntrailing slashes are class names, :start | :end | :measure specify\nwhat type of sample to pass through, and all others are function\nnames. All filters must match for a sample to be dumped.\n\nTridactyl does not collect performance information by default. To\nget this data you\'ll have to set the configuration option\n`perfcounters` to `"true"`. You may also want to examine the value\nof `perfsamples`.', new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["perfhistogram", new SymbolMetadata("Pretty-print a histogram of execution durations for you. Arguments\nare as above, with the addition that this automatically filters to\ncounter samples of type :measure.\n\nNote that this will display its output by opening a data: url with\ntext in the place of your current tab.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["bmark", new SymbolMetadata("Add or remove a bookmark.\n\nOptionally, you may give the bookmark a title. If no URL is given, a bookmark is added for the current page.\n\nIf a bookmark already exists for the URL, it is removed, even if a title is given.\n\nDoes not support creation of folders: you'll need to use the Firefox menus for that.", new FunctionType([new StringType(false, true), new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new TypeReferenceType("BookmarkTreeNode", [], false, false)], false, false), false, false), false)], - ["echo", new SymbolMetadata("", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new StringType(false, false), false, false), false)], - ["js_helper", new SymbolMetadata("helper function for js and jsb\n\n-p to take a single extra argument located at the end of str[]\n-d[delimiter character] to take a space-separated array of arguments after the delimiter\n-s to load js script of a source file from the config path", new FunctionType([new ArrayType(new StringType(false, false), false, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), true)], - ["js", new SymbolMetadata("Lets you execute JavaScript in the page context. If you want to get the result back, use\n\n `composite js ... | fillcmdline`", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["jsb", new SymbolMetadata("Lets you execute JavaScript in the background context. All the help from [[js]] applies. Gives you a different `tri` object which has access to more excmds and web-extension APIs.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["issue", new SymbolMetadata('Opens a new tab the url of which is "https://github.com/tridactyl/tridactyl/issues/new" and automatically fill add tridactyl, firefox and os version to the issue.', new FunctionType([], new TypeReferenceType("Promise", [new TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)], - ["text2qr", new SymbolMetadata("Generates a QR code for the given text. By default opens in new tab. Default binds close the new tab after 5 seconds.\nIf no text is passed as an argument then it checks if any text is selected and creates a QR code for that.\nIf no selection is found then it creates QR code for the current tab's URL\n\n`text2qr --popup [...]` will open the QR code in a new popup window\n\n`text2qr --window [...]` will open the QR code in a new window\n\n`text2qr --current [...]` will open in the current tab\n\n`text2qr --timeout [...]` closes the tab/window/popup after specified number of seconds\n\nExample: text2qr --timeout 5 --popup hello world", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["updatecheck", new SymbolMetadata("Checks if there are any stable updates available for Tridactyl.\n\nRelated settings:\n\n- `update.nag = true | false` - checks for updates on Tridactyl start.\n- `update.nagwait = 7` - waits 7 days before nagging you to update.\n- `update.checkintervalsecs = 86400` - waits 24 hours between checking for an update.", new FunctionType([new UnionType([ - new LiteralTypeType("manual", false, false), - new LiteralTypeType("auto_polite", false, false), - new LiteralTypeType("auto_impolite", false, false) - ], false, true)], new TypeReferenceType("Promise", [new BooleanType(false, false)], false, false), false, false), false)], - ["keyfeed", new SymbolMetadata("Feed some keys to Tridactyl's parser. E.g. `keyfeed jkjkjkjkjkjkjkjkjkjkjkjkjkjkjkjkjkjkjkjkjkjjkj`.\n\nNB:\n\n- Does _not_ function like Vim's noremap - `bind j keyfeed j` will cause an infinite loop.\n- Doesn't work in exmode - i.e. `keyfeed t` won't work.", new FunctionType([new StringType(false, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["extoptions", new SymbolMetadata("Opens optionsUrl for the selected extension in a popup window.\n\nNB: Tridactyl cannot run on this page!", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["readerurl", new SymbolMetadata("", new FunctionType([], new TypeReferenceType("Promise", [new StringType(false, false)], false, false), false, false), true)], - ["reader", new SymbolMetadata("Open the current page as an article in reader view for easier reading. Flags `--tab` and `--window` open the article in new tabs and windows respectively.\n\nUse `:reader --old` to use Firefox's built-in reader mode, which Tridactyl can't run on.\n\n__NB:__ the reader page is a privileged environment which has access to all Tridactyl functions, notably the native messenger if you have it installed. We are parsing untrusted web-content to run in this environment. Mozilla's readability library will strip out most of these, then we use a sanitation library, `js-xss`, to strip out any remaining unsafe tags, but if there was a serious bug in this library, and a targeted attack against Tridactyl, an attacker could get remote code execution. If you're worried about this, use `:reader --old` instead or only use `:reader` on pages you trust.\n\nYou may use [userContent.css](http://kb.mozillazine.org/index.php?title=UserContent.css&printable=yes) to enhance or override default styling of the new reader view. The `body` of the page has id `tridactyl-reader` and the article content follows in a `main` tag. Therefore to alter default styling, you can do something like this in your `userContent.css`:\n\n```css\n#tridactyl-reader > main {\n width: 80vw !important;\n text-align: left;\n}\n```\n\nFollow [issue #4657](https://github.com/tridactyl/tridactyl/issues/4657) if you would like to find out when we have made a more user-friendly solution.", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["elementunhide", new SymbolMetadata("Restore the most recently hidden element. Repeated invocations restore the next-most-recently-hidden element.\n\n(Elements can be hidden with `;K` and `:hint -K`.)", new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)] - ]))], - ["src/lib/config.ts", new FileMetadata(/* @__PURE__ */ new Map([["default_config", new ClassMetadata(/* @__PURE__ */ new Map([ - ["configversion", new SymbolMetadata("Internal version number Tridactyl uses to know whether it needs to update from old versions of the configuration.\n\nChanging this might do weird stuff.", new StringType(false, false), false)], - ["subconfigs", new SymbolMetadata("Internal field to handle site-specific configs. Use :seturl/:unseturl to change these values.", new ObjectType(/* @__PURE__ */ new Map([["", new TypeReferenceType("DeepPartial", [new TypeReferenceType("default_config", [], false, false)], false, false)]]), false, false), false)], - ["modesubconfigs", new SymbolMetadata("Internal field to handle mode-specific configs. Use :setmode/:unsetmode to change these values.\n\nChanging this might do weird stuff.", new ObjectType(/* @__PURE__ */ new Map([["", new TypeReferenceType("DeepPartial", [new TypeReferenceType("default_config", [], false, false)], false, false)]]), false, false), false)], - ["priority", new SymbolMetadata("Internal field to handle site-specific config priorities. Use :seturl/:unseturl to change this value.", new NumberType(false, false), false)], - ["exmaps", new SymbolMetadata("exmaps contains all of the bindings for the command line.\nYou can of course bind regular ex commands but also [editor functions](/static/docs/modules/_src_lib_editor_.html) and [commandline-specific functions](/static/docs/modules/_src_commandline_frame_.html).", new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["ignoremaps", new SymbolMetadata('ignoremaps contain all of the bindings for "ignore mode".\n\nThey consist of key sequences mapped to ex commands.', new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["imaps", new SymbolMetadata('imaps contain all of the bindings for "insert mode".\n\nOn top of regular ex commands, you can also bind [editor functions](/static/docs/modules/_src_lib_editor_.html) in insert mode.\n\nThey consist of key sequences mapped to ex commands.', new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["inputmaps", new SymbolMetadata('inputmaps contain all of the bindings for "input mode".\n\nOn top of regular ex commands, you can also bind [editor functions](/static/docs/modules/_src_lib_editor_.html) in input mode.\n\nThey consist of key sequences mapped to ex commands.', new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["superignore", new SymbolMetadata('Disable Tridactyl almost completely within a page, e.g. `seturl ^https?://mail.google.com disable true`. Only takes affect on page reload.\n\nYou are usually better off using `blacklistadd` and `seturl [url] noiframe true` as you can then still use some Tridactyl binds, e.g. `shift-insert` for exiting ignore mode.\n\nNB: you should only use this with `seturl`. If you get trapped with Tridactyl disabled everywhere just run `tri unset superignore` in the Firefox address bar. If that still doesn\'t fix things, you can totally reset Tridactyl by running `tri help superignore` in the Firefox address bar, scrolling to the bottom of that page and then clicking "Reset Tridactyl config".', new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["nmaps", new SymbolMetadata('nmaps contain all of the bindings for "normal mode".\n\nThey consist of key sequences mapped to ex commands.', new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["vmaps", new SymbolMetadata("", new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["hintmaps", new SymbolMetadata("", new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["browsermaps", new SymbolMetadata('Browser-wide binds accessible in all modes and on pages where Tridactyl "cannot run".\n', new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["leavegithubalone", new SymbolMetadata("Whether to allow pages (not necessarily github) to override `/`, which is a default Firefox binding.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["blacklistkeys", new SymbolMetadata("Which keys to protect from pages that try to override them. Requires [[leavegithubalone]] to be set to false.", new ArrayType(new StringType(false, false), false, false), false)], - ["autocmds", new SymbolMetadata("Autocommands that run when certain events happen, and other conditions are met.\n\nRelated ex command: `autocmd`.", new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["keytranslatemap", new SymbolMetadata("", new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["usekeytranslatemap", new SymbolMetadata("", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["keyboardlayoutforce", new SymbolMetadata('Instead of fetching actual character which depends on selected layout,\nuse machine code of a key and convert to character according to keyboardlayoutoverrides. The default layout mapping\nis US `qwerty`, but can be changed with [[keyboardlayoutbase]].\n\nThere is a much more detailed help page towards the end of `:tutor` under the title "Non-QWERTY layouts".\n\nRecommended for everyone with multiple or/and non-latin keyboard layouts. Make sure [[usekeytranslatemap]] is false\nif you have previously used `keymap`.', new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["keyboardlayoutbase", new SymbolMetadata("Base keyboard layout to use when [[keyboardlayoutforce]] is enabled. At the time of writing, the following layouts are supported: `qwerty, azerty, german, dvorak, uk, ca, bepo`. Requires page reload to take effect.\n\nIf your layout is missing, you can contribute it with the help of https://gistpreview.github.io/?324119c773fac31651f6422087b36804 - please just open an `:issue` with your layout and we'll add it.\n\nYou can manually override individual keys for a layout with [[keyboardlayoutoverrides]].", new UnionType([ - new LiteralTypeType("qwerty", false, false), - new LiteralTypeType("azerty", false, false), - new LiteralTypeType("german", false, false), - new LiteralTypeType("dvorak", false, false), - new LiteralTypeType("uk", false, false), - new LiteralTypeType("ca", false, false), - new LiteralTypeType("bepo", false, false) - ], false, false), false)], - ["keyboardlayoutoverrides", new SymbolMetadata('Override individual keys for a layout when [[keyboardlayoutforce]] is enabled. Changes take effect only after a page reload.\n\nKey codes for printable keys for [[keyboardlayoutforce]], lower and upper register. See https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_code_values for the names of each key.\n\nNB: due to a Tridactyl bug, you cannot set this using array notation as you can for, e.g. [[homepage]].\nYou must instead set the lower and upper registers using a string with no spaces in it, for example\n`:set keyboardlayoutoverrides Digit2: 2"` for the British English layout.', new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["autocontain", new SymbolMetadata("Automatically place these sites in the named container.\n\nEach key corresponds to a URL fragment which, if contained within the page URL, the site will be opened in a container tab instead.", new AnyType(true, false), false)], - ["proxy", new SymbolMetadata("Default proxy to use for all URLs. Has to be the name of a proxy. To add a proxy, see `:help proxyadd`. NB: usage with `:seturl` is buggy, use `:autocontain -s [regex to match URL] none [proxy]` instead", new StringType(false, false), false)], - ["proxies", new SymbolMetadata("Definitions of proxies.\n\nYou can add a new proxy with `proxyadd proxyname proxyurl`", new AnyType(true, false), false)], - ["noproxy", new SymbolMetadata("Whether to use proxy settings.\n\nIf set to `true`, all proxy settings will be ignored.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["autocontainmode", new SymbolMetadata("Strict mode will always ensure a domain is open in the correct container, replacing the current tab if necessary.\n\nRelaxed mode is less aggressive and instead treats container domains as a default when opening a new tab.", new UnionType([ - new LiteralTypeType("strict", false, false), - new LiteralTypeType("relaxed", false, false) - ], false, false), false)], - ["exaliases", new SymbolMetadata("Aliases for the commandline.\n\nYou can make a new one with `command alias ex-command`.", new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["followpagepatterns", new SymbolMetadata("Used by `]]` and `[[` to look for links containing these words.\n\nEdit these if you want to add, e.g. other language support.", new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["searchengine", new SymbolMetadata("The default search engine used by `open search`. If empty string, your browser's default search engine will be used. If set to something, Tridactyl will first look at your [[searchurls]] and then at the search engines for which you have defined a keyword on `about:preferences#search`.", new StringType(false, false), false)], - ["searchurls", new SymbolMetadata('Definitions of search engines for use via `open [keyword]`.\n\n`%s` will be replaced with your whole query and `%s1`, `%s2`, ..., `%sn` will be replaced with the first, second and nth word of your query. Also supports array slicing, e.g. `%s[2:4]`, `%s[5:]`. If there are none of these patterns in your search urls, your query will simply be appended to the searchurl.\n\nAliases are supported - for example, if you have a `google` searchurl, you can run `:set searchurls.g google` in which case `g` will act as if it was the `google` searchurl.\n\nExamples:\n- When running `open gi cute puppies`, with a `gi` searchurl defined with `set searchurls.gi https://www.google.com/search?q=%s&tbm=isch`, tridactyl will navigate to `https://www.google.com/search?q=cute puppies&tbm=isch`.\n- When running `tabopen translate en ja Tridactyl`, with a `translate` searchurl defined with `set searchurls.translate https://translate.google.com/#view=home&op=translate&sl=%s1&tl=%s2&text=%s3`, tridactyl will navigate to `https://translate.google.com/#view=home&op=translate&sl=en&tl=ja&text=Tridactyl`.\n\n[[setnull]] can be used to "delete" the default search engines. E.g. `setnull searchurls.google`.', new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["jsurls", new SymbolMetadata('Like [[searchurls]] but must be a Javascript function that takes one argument (a single string with the remainder of the command line including spaces) and maps it to a valid href (or a promise that resolves to a valid href) that will be followed, e.g. `set jsurls.googleloud query => "https://google.com/search?q=" + query.toUpperCase()`\n\nNB: the href must be valid, i.e. it must include the protocol (e.g. "http://") and not just be e.g. "www.".', new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["newtab", new SymbolMetadata("URL the newtab will redirect to.\n\nAll usual rules about things you can open with `open` apply, with the caveat that you'll get interesting results if you try to use something that needs `nativeopen`: so don't try `about:newtab` or a `file:///` URI. You should instead use a data URI - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs - or host a local webserver (e.g. Caddy).", new StringType(false, false), false)], - ["viewsource", new SymbolMetadata("Whether `:viewsource` will use our own page that you can use Tridactyl binds on, or Firefox's default viewer, which you cannot use Tridactyl on.", new UnionType([ - new LiteralTypeType("tridactyl", false, false), - new LiteralTypeType("default", false, false) - ], false, false), false)], - ["homepages", new SymbolMetadata('Pages opened with `gH`. In order to set this value, use `:set homepages ["example.org", "example.net", "example.com"]` and so on.', new ArrayType(new StringType(false, false), false, false), false)], - ["hintchars", new SymbolMetadata("Characters to use in hint mode.\n\nThey are used preferentially from left to right.", new StringType(false, false), false)], - ["hintfiltermode", new SymbolMetadata("The type of hinting to use. `vimperator` will allow you to filter links based on their names by typing non-hint chars. It is recommended that you use this in conjuction with the [[hintchars]] setting, which you should probably set to e.g, `5432167890`. \xB4vimperator-reflow\xB4 additionally updates the hint labels after filtering.", new UnionType([ - new LiteralTypeType("simple", false, false), - new LiteralTypeType("vimperator", false, false), - new LiteralTypeType("vimperator-reflow", false, false) - ], false, false), false)], - ["hintnames", new SymbolMetadata("Whether to optimise for the shortest possible names for each hint, or to use a simple numerical ordering. If set to `numeric`, overrides `hintchars` setting.", new UnionType([ - new LiteralTypeType("short", false, false), - new LiteralTypeType("numeric", false, false), - new LiteralTypeType("uniform", false, false) - ], false, false), false)], - ["hintuppercase", new SymbolMetadata("Whether to display the names for hints in uppercase.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["hintdelay", new SymbolMetadata("The delay in milliseconds in `vimperator` style hint modes after selecting a hint before you are returned to normal mode.\n\nThe point of this is to prevent accidental execution of normal mode binds due to people typing more than is necessary to choose a hint.", new NumberType(false, false), false)], - ["hintshift", new SymbolMetadata("Controls whether hints should be shifted in quick-hints mode.\n\nHere's what it means: let's say you have hints from a to z but are only\ninterested in every second hint. You first press `a`, then `c`.\nTridactyl will realize that you skipped over `b`, and so that the next\nhint you're going to trigger is probably `e`. Tridactyl will shift all\nhint names so that `e` becomes `c`, `d` becomes `b`, `c` becomes `a` and\nso on.\nThis means that once you pressed `c`, you can keep on pressing `c` to\ntrigger every second hint. Only makes sense with hintnames = short.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["hintautoselect", new SymbolMetadata("Controls whether hints should be followed automatically.\n\nIf set to `false`, hints will only be followed upon confirmation. This applies to cases when there is only a single match or only one link on the page.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["allowautofocus", new SymbolMetadata("Controls whether the page can focus elements for you via js\n\nNB: will break fancy editors such as CodeMirror on Jupyter. Simply use `seturl` to whitelist pages you need it on.\n\nBest used in conjunction with browser.autofocus in `about:config`", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["preventautofocusjackhammer", new SymbolMetadata("Uses a loop to prevent focus until you interact with a page. Only recommended for use via `seturl` for problematic sites as it can be a little heavy on CPU if running on all tabs. Should be used in conjuction with [[allowautofocus]]", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["smoothscroll", new SymbolMetadata("Whether to use Tridactyl's (bad) smooth scrolling.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["scrollduration", new SymbolMetadata("How viscous you want smooth scrolling to feel.", new NumberType(false, false), false)], - ["tabopenpos", new SymbolMetadata("Where to open tabs opened with `tabopen` - to the right of the current tab, or at the end of the tabs.", new UnionType([ - new LiteralTypeType("next", false, false), - new LiteralTypeType("last", false, false), - new LiteralTypeType("related", false, false) - ], false, false), false)], - ["tabclosepinned", new SymbolMetadata("When enabled (the default), running tabclose will close the tabs whether they are pinned or not. When disabled, tabclose will fail with an error if a tab is pinned.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["tabsort", new SymbolMetadata("Controls which tab order to use when numbering tabs. Either mru = sort by most recent tab or default = by tab index\n\nApplies to all places where Tridactyl numbers tabs including `:tab`, `:tabnext_gt` etc. (so, for example, with `:set tabsort mru` `2gt` would take you to the second most recently used tab, not the second tab in the tab bar).", new UnionType([ - new LiteralTypeType("default", false, false), - new LiteralTypeType("mru", false, false) - ], false, false), false)], - ["relatedopenpos", new SymbolMetadata("Where to open tabs opened with hinting - as if it had been middle clicked, to the right of the current tab, or at the end of the tabs.", new UnionType([ - new LiteralTypeType("next", false, false), - new LiteralTypeType("last", false, false), - new LiteralTypeType("related", false, false) - ], false, false), false)], - ["ttsvoice", new SymbolMetadata('The name of the voice to use for text-to-speech. You can get the list of installed voices by running the following snippet: `js alert(window.speechSynthesis.getVoices().reduce((a, b) => a + " " + b.name))`', new StringType(false, false), false)], - ["ttsvolume", new SymbolMetadata("Controls text-to-speech volume. Has to be a number between 0 and 1.", new NumberType(false, false), false)], - ["ttsrate", new SymbolMetadata("Controls text-to-speech speed. Has to be a number between 0.1 and 10.", new NumberType(false, false), false)], - ["ttspitch", new SymbolMetadata("Controls text-to-speech pitch. Has to be between 0 and 2.", new NumberType(false, false), false)], - ["gimode", new SymbolMetadata('When set to "nextinput", pressing `` after gi selects the next input.\n\nWhen set to "firefox", `` behaves like normal, focusing the next tab-indexed element regardless of type.', new UnionType([ - new LiteralTypeType("nextinput", false, false), - new LiteralTypeType("firefox", false, false) - ], false, false), false)], - ["cursorpos", new SymbolMetadata("Decides where to place the cursor when selecting non-empty input fields", new UnionType([ - new LiteralTypeType("beginning", false, false), - new LiteralTypeType("end", false, false) - ], false, false), false)], - ["theme", new SymbolMetadata("The theme to use.\n\nPermitted values: run `:composite js tri.styling.THEMES | fillcmdline` to find out.", new StringType(false, false), false)], - ["customthemes", new SymbolMetadata("Storage for custom themes\n\nMaps theme names to CSS. Predominantly used automatically by [[colourscheme]] to store themes read from disk, as documented by [[colourscheme]]. Setting this manually is untested but might work provided that [[colourscheme]] is then used to change the theme to the right theme name.", new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["modeindicator", new SymbolMetadata("Whether to display the mode indicator or not.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["modeindicatormodes", new SymbolMetadata("Whether to display the mode indicator in various modes. Ignored if modeindicator set to false.", new ObjectType(/* @__PURE__ */ new Map([["", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false)]]), false, false), false)], - ["jumpdelay", new SymbolMetadata("Milliseconds before registering a scroll in the jumplist", new NumberType(false, false), false)], - ["logging", new SymbolMetadata("Logging levels. Unless you're debugging Tridactyl, it's unlikely you'll ever need to change these.", new ObjectType(/* @__PURE__ */ new Map([["", new UnionType([ - new LiteralTypeType("never", false, false), - new LiteralTypeType("error", false, false), - new LiteralTypeType("warning", false, false), - new LiteralTypeType("info", false, false), - new LiteralTypeType("debug", false, false) - ], false, false)]]), false, false), false)], - ["noiframe", new SymbolMetadata(`Disables the commandline iframe. Dangerous setting, use [[seturl]] to set it. If you ever set this setting to "true" globally and then want to set it to false again, you can do this by opening Tridactyl's preferences page from about:addons.`, new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["noiframeon", new SymbolMetadata("", new ArrayType(new StringType(false, false), false, false), false)], - ["editorcmd", new SymbolMetadata('Insert / input mode edit-in-$EDITOR command to run\nThis has to be a command that stays in the foreground for the whole editing session\n"auto" will attempt to find a sane editor in your path.\nPlease send your requests to have your favourite terminal moved further up the list to /dev/null.\n (but we are probably happy to add your terminal to the list if it isn\'t already there.)\n\nExample values:\n- linux: `xterm -e vim`\n- windows: `start cmd.exe /c \\"vim\\"`.\n\nAlso see [:editor](/static/docs/modules/_src_excmds_.html#editor).', new StringType(false, false), false)], - ["rsscmd", new SymbolMetadata('Command that should be run by the [[rssexec]] ex command. Has the\nfollowing format:\n- %u: url\n- %t: title\n- %y: type (rss, atom, xml...)\nWarning: This is a very large footgun. %u will be inserted without any\nkind of escaping, hence you must obey the following rules if you care\nabout security:\n- Do not use a composite command. If you need a composite command,\ncreate an alias.\n- Do not use `js` or `jsb`. If you need to use them, create an alias.\n- Do not insert any %u, %t or %y in shell commands run by the native\nmessenger. Use pipes instead.\n\nHere\'s an example of how to save an rss url in a file on your disk\nsafely:\n`alias save_rss jsb -p tri.native.run("cat >> ~/.config.newsboat/urls", JS_ARG)`\n`set rsscmd save_rss %u`\nThis is safe because the url is passed to jsb as an argument rather than\nbeing expanded inside of the string it will execute and because it is\npiped to the shell command rather than being expanded inside of it.', new StringType(false, false), false)], - ["browser", new SymbolMetadata("The browser executable to look for in commands such as `restart`. Not as mad as it seems if you have multiple versions of Firefox...", new StringType(false, false), false)], - ["yankto", new SymbolMetadata("Which clipboard to store items in. Requires the native messenger to be installed.", new UnionType([ - new LiteralTypeType("clipboard", false, false), - new LiteralTypeType("selection", false, false), - new LiteralTypeType("both", false, false) - ], false, false), false)], - ["putfrom", new SymbolMetadata("Which clipboard to retrieve items from. Requires the native messenger to be installed.\n\nPermitted values: `clipboard`, or `selection`.", new UnionType([ - new LiteralTypeType("clipboard", false, false), - new LiteralTypeType("selection", false, false) - ], false, false), false)], - ["externalclipboardcmd", new SymbolMetadata("Clipboard command to try to get the selection from (e.g. `xsel` or `xclip`)", new StringType(false, false), false)], - ["downloadsskiphistory", new SymbolMetadata("Whether downloads (e.g. via ;s hint modes) appear in your download history.\n\nNB: will cause downloads to fail silently if Tridactyl is not allowed to run in private windows (regardless of whether you are trying to call it in a private window).", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["downloadforbiddenchars", new SymbolMetadata("Set of characters that are to be considered illegal as download filenames.", new StringType(false, false), false)], - ["downloadforbiddenreplacement", new SymbolMetadata("Value that will be used to replace the illegal character(s), if found, in the download filename.", new StringType(false, false), false)], - ["downloadforbiddennames", new SymbolMetadata('Comma-separated list of whole filenames which, if match\nwith the download filename, will be suffixed with the\n"downloadforbiddenreplacement" value.', new StringType(false, false), false)], - ["nativeinstallcmd", new SymbolMetadata('Set this to something weird if you want to have fun every time Tridactyl tries to update its native messenger.\n\n%TAG will be replaced with your version of Tridactyl for stable builds, or "master" for beta builds\n\nNB: Windows has its own platform-specific default.', new StringType(false, false), false)], - ["update", new SymbolMetadata("Used by :updatecheck and related built-in functionality to automatically check for updates and prompt users to upgrade.", new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["profiledir", new SymbolMetadata("Profile directory to use with native messenger with e.g, `guiset`.", new StringType(false, false), false)], - ["tabopencontaineraware", new SymbolMetadata("If enabled, tabopen opens a new tab in the currently active tab's container.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["containerindicator", new SymbolMetadata("If moodeindicator is enabled, containerindicator will color the border of the mode indicator with the container color.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["auconcreatecontainer", new SymbolMetadata("Autocontain directives create a container if it doesn't exist already.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["tabgroupnewtaburls", new SymbolMetadata("Initial urls to navigate to when creating a new tab for a new tab group.", new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["tabshowhidden", new SymbolMetadata("Whether :tab shows completions for hidden tabs (e.g. tabs in other tab groups).", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["historyresults", new SymbolMetadata("Number of most recent results to ask Firefox for. We display the top 20 or so most frequently visited ones.", new NumberType(false, false), false)], - ["bmarkweight", new SymbolMetadata("When displaying bookmarks in history completions, how many page views to pretend they have.", new NumberType(false, false), false)], - ["searchurlweight", new SymbolMetadata("When displaying searchurls in history completions, how many page views to pretend they have.", new NumberType(false, false), false)], - ["gotoselector", new SymbolMetadata("Default selector for :goto command.", new StringType(false, false), false)], - ["completions", new SymbolMetadata("General completions options - NB: options are set according to our internal completion source name - see - `src/completions/[name].ts` in the Tridactyl source.", new ObjectType(/* @__PURE__ */ new Map([]), false, false), false)], - ["findresults", new SymbolMetadata("Number of results that should be shown in completions. -1 for unlimited", new NumberType(false, false), false)], - ["findcontextlen", new SymbolMetadata("Number of characters to use as context for the matches shown in completions", new NumberType(false, false), false)], - ["findcase", new SymbolMetadata("Whether find should be case-sensitive", new UnionType([ - new LiteralTypeType("smart", false, false), - new LiteralTypeType("sensitive", false, false), - new LiteralTypeType("insensitive", false, false) - ], false, false), false)], - ["findhighlighttimeout", new SymbolMetadata("How long find highlights should persist in milliseconds. `<= 0` means they persist until cleared", new NumberType(false, false), false)], - ["incsearch", new SymbolMetadata("Whether Tridactyl should jump to the first match when using `:find`", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["minincsearchlen", new SymbolMetadata("How many characters should be typed before triggering incsearch/completions", new NumberType(false, false), false)], - ["csp", new SymbolMetadata('Deprecated.\nChange this to "clobber" to ruin the "Content Security Policy" of all sites a bit and make Tridactyl run a bit better on some of them, e.g. raw.github*', new UnionType([ - new LiteralTypeType("untouched", false, false), - new LiteralTypeType("clobber", false, false) - ], false, false), false)], - ["wordpattern", new SymbolMetadata("JavaScript RegExp used to recognize words in text.* functions (e.g. text.transpose_words). Should match any character belonging to a word.", new StringType(false, false), false)], - ["perfcounters", new SymbolMetadata("Activate tridactyl's performance counters. These have a\nmeasurable performance impact, since every sample is a few\nhundred bytes and we sample tridactyl densely, but they're good\nwhen you're trying to optimize things.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["perfsamples", new SymbolMetadata(`How many samples to store from the perf counters. - -Each performance entry is two numbers (16 bytes), an entryType -of either "mark" or "measure" (js strings are utf-16 ad we have -two marks for each measure, so amortize to about 10 bytes per -entry), and a string name that for Tridactyl object will be -about 40 (utf-16) characters (80 bytes), plus object overhead -roughly proportional to the string-length of the name of the -constructor (in this case something like 30 bytes), for a total -of what we'll call 128 bytes for ease of math. - -We want to store, by default, about 1MB of performance -statistics, so somewhere around 10k samples.`, new StringType(false, false), false)], - ["modeindicatorshowkeys", new SymbolMetadata("Show (partial) command in the mode indicator.\nCorresponds to 'showcmd' option of vi.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["urlparenttrailingslash", new SymbolMetadata("Whether a trailing slash is appended when we get the parent of a url with\ngu (or other means).", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["visualenterauto", new SymbolMetadata("Whether to enter visual mode when text is selected. Visual mode can always be entered with `:mode visual`.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["visualexitauto", new SymbolMetadata("Whether to return to normal mode when text is deselected.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["escapehatchsidebarhack", new SymbolMetadata("Whether to open and close the sidebar quickly to get focus back to the page when is pressed.\n\nDisable if the fact that it closes TreeStyleTabs gets on your nerves too much : )\n\nNB: when disabled, can't get focus back from the address bar, but it can still get it back from lots of other places (e.g. Flash-style video players)", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)], - ["completionfuzziness", new SymbolMetadata("Threshold for fuzzy matching on completions. Lower => stricter matching. Range between 0 and 1: 0 corresponds to perfect matches only. 1 will match anything.\n\nhttps://fusejs.io/api/options.html#threshold", new NumberType(false, false), false)], - ["readerurlintitle", new SymbolMetadata("Whether to show article url in the document.title of Reader View.", new UnionType([ - new LiteralTypeType("false", false, false), - new LiteralTypeType("true", false, false) - ], false, false), false)] - ]))]]), /* @__PURE__ */ new Map([ - ["o", new SymbolMetadata("", new FunctionType([new AnyType(true, false)], new AnyType(true, false), false, false), true)], - ["schlepp", new SymbolMetadata("", new FunctionType([new AnyType(true, false)], new VoidType(false, false), false, false), true)], - ["getDeepProperty", new SymbolMetadata("Given an object and a target, extract the target if it exists, else return undefined", new FunctionType([new AnyType(true, false), new ArrayType(new StringType(false, false), false, false)], new AnyType(true, false), false, false), true)], - ["setDeepProperty", new SymbolMetadata("Create the key path target if it doesn't exist and set the final property to value.\n\nIf the path is an empty array, replace the obj.", new FunctionType([new AnyType(true, false), new AnyType(true, false), new AnyType(true, false)], new AnyType(true, false), false, false), true)], - ["mergeDeep", new SymbolMetadata("", new FunctionType([new AnyType(true, false), new AnyType(true, false)], new AnyType(true, false), false, false), true)], - ["getURL", new SymbolMetadata("", new FunctionType([new StringType(false, false), new ArrayType(new StringType(false, false), false, false)], new AnyType(true, false), false, false), true)], - ["get", new SymbolMetadata("Get the value of the key target.\n\nIf the user has not specified a key, use the corresponding key from\ndefaults, if one exists, else undefined.", new FunctionType([new UnionType([ - new LiteralTypeType("rsscmd", false, false), - new LiteralTypeType("theme", false, false), - new LiteralTypeType("autocmds", false, false), - new LiteralTypeType("exaliases", false, false), - new LiteralTypeType("modesubconfigs", false, false), - new LiteralTypeType("allowautofocus", false, false), - new LiteralTypeType("autocontain", false, false), - new LiteralTypeType("proxies", false, false), - new LiteralTypeType("update", false, false), - new LiteralTypeType("imaps", false, false), - new LiteralTypeType("viewsource", false, false), - new LiteralTypeType("nmaps", false, false), - new LiteralTypeType("configversion", false, false), - new TypeReferenceType("... 89 more ...", [], false, false), - new LiteralTypeType("readerurlintitle", false, false) - ], false, true), new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), true)], - ["getDynamic", new SymbolMetadata("Get the value of the key target.\n\nPlease only use this with targets that will be used at runtime - it skips static checks. Prefer [[get]].", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new AnyType(true, false), false, false), false)], - ["getAsyncDynamic", new SymbolMetadata("Get the value of the key target.\n\nPlease only use this with targets that will be used at runtime - it skips static checks. Prefer [[getAsync]].", new FunctionType([new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new AnyType(true, false)], false, false), false, false), false)], - ["getAsync", new SymbolMetadata("Get the value of the key target, but wait for config to be loaded from the\ndatabase first if it has not been at least once before.\n\nThis is useful if you are a content script and you've just been loaded.", new FunctionType([new UnionType([ - new LiteralTypeType("rsscmd", false, false), - new LiteralTypeType("theme", false, false), - new LiteralTypeType("autocmds", false, false), - new LiteralTypeType("exaliases", false, false), - new LiteralTypeType("modesubconfigs", false, false), - new LiteralTypeType("allowautofocus", false, false), - new LiteralTypeType("autocontain", false, false), - new LiteralTypeType("proxies", false, false), - new LiteralTypeType("update", false, false), - new LiteralTypeType("imaps", false, false), - new LiteralTypeType("viewsource", false, false), - new LiteralTypeType("nmaps", false, false), - new LiteralTypeType("configversion", false, false), - new TypeReferenceType("... 89 more ...", [], false, false), - new LiteralTypeType("readerurlintitle", false, false) - ], false, true), new ArrayType(new StringType(false, false), true, false)], new TypeReferenceType("Promise", [new TypeReferenceType("...", [], false, false)], false, false), false, false), true)], - ["push", new SymbolMetadata("", new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["pull", new SymbolMetadata("", new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), false)], - ["setURL", new SymbolMetadata("", new FunctionType([new AnyType(true, false), new ArrayType(new AnyType(true, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), true)], - ["set", new SymbolMetadata('Full target specification, then value\n\ne.g.\n set("nmaps", "o", "open")\n set("search", "default", "google")\n set("aucmd", "BufRead", "memrise.com", "open memrise.com")', new FunctionType([new ArrayType(new AnyType(true, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), true)], - ["unsetURL", new SymbolMetadata("", new FunctionType([new AnyType(true, false), new ArrayType(new AnyType(true, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), true)], - ["unset", new SymbolMetadata("Delete the key at target in USERCONFIG if it exists", new FunctionType([new ArrayType(new AnyType(true, false), true, false)], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), true)], - ["save", new SymbolMetadata("Save the config back to storage API.\n\nConfig is not synchronised between different instances of this module until\nsometime after this happens.", new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), true)], - ["update", new SymbolMetadata(`Updates the config to the latest version. -Proposed semantic for config versionning: -- x.y -> x+1.0 : major architectural changes -- x.y -> x.y+1 : renaming settings/changing their types -There's no need for an updater if you're only adding a new setting/changing -a default setting - -When adding updaters, don't forget to set("configversion", newversionnumber)!`, new FunctionType([], new TypeReferenceType("Promise", [new BooleanType(false, false)], false, false), false, false), true)], - ["init", new SymbolMetadata("Read all user configuration from storage API then notify any waiting asynchronous calls\n\nasynchronous calls generated by getAsync.", new FunctionType([], new TypeReferenceType("Promise", [new VoidType(false, false)], false, false), false, false), true)], - ["addChangeListener", new SymbolMetadata("", new FunctionType([new TypeReferenceType("P", [], false, false), new FunctionType([new AnyType(true, false), new AnyType(true, false)], new VoidType(false, false), false, false)], new VoidType(false, false), false, false), true)], - ["removeChangeListener", new SymbolMetadata("", new FunctionType([new TypeReferenceType("P", [], false, false), new FunctionType([new AnyType(true, false), new AnyType(true, false)], new VoidType(false, false), false, false)], new VoidType(false, false), false, false), true)], - ["parseConfig", new SymbolMetadata('Parse the config into a string representation of a .tridactylrc config file.\nTries to parse the config into sectionable chunks based on keywords.\nBinds, aliases, autocmds and logging settings each have their own section while the rest are dumped into "General Settings".', new FunctionType([], new StringType(false, false), false, false), false)] - ]))] - ])); - var staticThemes = ["auto", "dark", "default", "greenmat", "halloween", "midnight", "quake", "quakelight", "shydactyl"]; - - // src/completions/Apropos.ts - var AproposCompletionOption = class extends CompletionOptionHTML { - constructor(name, doc, flag) { - super(); - this.name = name; - this.fuseKeys = []; - this.value = `${flag} ${name}`; - this.html = html` - ${name} - ${doc} - `; - } - }; - var AproposCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super(["apropos"], "AproposCompletionSource", "Apropos"); - this._parent = _parent; - this._parent.appendChild(this.node); - } - async filter(exstr) { - this.lastExstr = exstr; - this.completion = void 0; - const [prefix, query2] = this.splitOnPrefix(exstr); - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - const file = everything.getFile("src/lib/config.ts"); - const default_config2 = file.getClass("default_config"); - const excmds = everything.getFile("src/excmds.ts"); - const fns = excmds.getFunctions(); - const settings = get2(); - const exaliases = settings.exaliases; - const bindings = settings.nmaps; - if (fns === void 0 || exaliases === void 0 || bindings === void 0) { - return; - } - const flags = { - "-a": (options, query3) => options.concat( - Object.keys(exaliases).filter( - (alias) => (alias + expandExstr(alias) + excmds.getFunction(expandExstr(alias))).toLowerCase().includes(query3) - ).map((alias) => { - const cmd = expandExstr(alias); - const doc = (excmds.getFunction(cmd) || {}).doc || ""; - return new AproposCompletionOption( - alias, - `Alias for \`${cmd}\`. ${doc}`, - "-a" - ); - }) - ), - "-b": (options, query3) => options.concat( - Object.keys(bindings).filter( - (binding) => (binding + bindings[binding]).toLowerCase().includes(query3) - ).map( - (binding) => new AproposCompletionOption( - binding, - `Normal mode binding for \`${bindings[binding]}\``, - "-b" - ) - ) - ), - "-e": (options, query3) => options.concat( - fns.filter( - ([name, fn]) => !fn.hidden && (name + fn.doc).toLowerCase().includes(query3) - ).map( - ([name, fn]) => new AproposCompletionOption( - name, - `Excmd. ${fn.doc}`, - "-e" - ) - ) - ), - "-s": (options, query3) => options.concat( - Object.keys(settings).filter( - (x) => (x + default_config2.getMember(x).doc).toLowerCase().includes(query3) - ).map((setting) => { - const member = default_config2.getMember(setting); - let doc = ""; - if (member !== void 0) { - doc = member.doc; - } - return new AproposCompletionOption( - setting, - `Setting. ${doc}`, - "-s" - ); - }) - ) - }; - const args = query2.split(" "); - let opts = []; - if (Object.keys(flags).includes(args[0])) { - opts = flags[args[0]](opts, args.slice(1).join(" ")); - } else { - opts = Object.keys(flags).reduce( - (acc, curFlag) => flags[curFlag](acc, query2), - [] - ); - } - this.options = opts; - this.options.sort( - (compopt1, compopt2) => compopt1.name.localeCompare(compopt2.name) - ); - return this.updateChain(); - } - updateChain() { - this.options.forEach((option) => option.state = "normal"); - return this.updateDisplay(); - } - }; - - // src/lib/browser_proxy.ts - var browserProxy = new Proxy(/* @__PURE__ */ Object.create(null), { - get(target, api) { - return new Proxy( - {}, - { - get(_, func) { - return (...args) => message( - "browser_proxy_background", - "shim", - api, - func, - args - ); - } - } - ); - } - }); - var browser_proxy_default = browserProxy; - - // src/lib/url_util.ts - function interpolateSearchItem(urlPattern, query2) { - const hasInterpolationPoint = urlPattern.href.includes("%s"); - let queryWords = query2.split(" "); - if (hasInterpolationPoint && urlPattern.search.includes("%s") || urlPattern.search !== "") { - query2 = encodeURIComponent(query2); - queryWords = queryWords.map((w) => encodeURIComponent(w)); - } - if (hasInterpolationPoint) { - const resultingURL = new URL( - urlPattern.href.replace(/%s\d+/g, function(x) { - const index2 = parseInt(x.slice(2), 10) - 1; - if (index2 >= queryWords.length) { - return ""; - } - return queryWords[index2]; - }).replace(/%s\[(-?\d+)?:(-?\d+)?\]/g, function(match, p1, p2) { - const l = (x) => x >= 1 ? x - 1 : x; - const start = p1 ? l(parseInt(p1, 10)) : 0; - const slice3 = p2 ? queryWords.slice(start, l(parseInt(p2, 10))) : queryWords.slice(start); - return slice3.join(" "); - }) - ); - return new URL(resultingURL.href.replace("%s", query2)); - } else { - return new URL(urlPattern.href + query2); - } - } - - // src/lib/webext.ts - async function getSortedTabs(forceSort) { - const sortAlg = forceSort != null ? forceSort : get2("tabsort"); - const comp = sortAlg === "mru" ? (a, b) => +a.active || -b.active || b.lastAccessed - a.lastAccessed : (a, b) => a.index - b.index; - const hiddenVal = get2("tabshowhidden") === "true" ? void 0 : false; - return browserBg.tabs.query({ - currentWindow: true, - hidden: hiddenVal - }).then((tabs) => tabs.sort(comp)); - } - function inContentScript() { - return getContext() === "content"; - } - function getTriVersion() { - const manifest = browser.runtime.getManifest(); - return manifest.version_name; - } - function getPrettyTriVersion() { - const manifest = browser.runtime.getManifest(); - return manifest.name + " " + getTriVersion(); - } - function notBackground() { - return getContext() !== "background"; - } - function getContext() { - if (!browser.tabs) { - return "content"; - } else if (browser.runtime.getURL("_generated_background_page.html") === window.location.href) { - return "background"; - } else { - return "extension"; - } - } - var browserBg = inContentScript() ? browser_proxy_default : browser; - async function activeTab() { - return (await browserBg.tabs.query({ - active: true, - currentWindow: true - }))[0]; - } - async function activeTabId() { - return (await activeTab()).id; - } - async function prevActiveTab() { - const tabs = (await browserBg.tabs.query({ - currentWindow: true - })).sort((a, b) => b.lastAccessed - a.lastAccessed); - if (tabs.length > 1) - return tabs[1]; - return tabs[0]; - } - async function activeWindowId() { - return (await browserBg.windows.getCurrent()).id; - } - async function removeActiveWindowValue(value) { - browserBg.sessions.removeWindowValue(await activeWindowId(), value); - } - async function activeTabContainerId() { - return (await activeTab()).cookieStoreId; - } - async function ownTab() { - return browser.runtime.sendMessage({ type: "owntab_background" }); - } - async function ownTabId() { - return (await ownTab()).id; - } - async function windows() { - return (await browserBg.windows.getAll()).map((w) => w.id).sort((a, b) => a - b); - } - async function ownWinTriIndex() { - return (await windows()).indexOf((await ownTab()).windowId); - } - async function getWinIdFromIndex(index2) { - return (await windows())[index2]; - } - async function ownTabContainer() { - return browserBg.contextualIdentities.get((await ownTab()).cookieStoreId); - } - async function activeTabContainer() { - const containerId = await activeTabContainerId(); - if (containerId !== "firefox-default") - return browserBg.contextualIdentities.get(containerId); - else - throw new Error( - "firefox-default is not a valid contextualIdentity (activeTabContainer)" - ); - } - async function firefoxVersionAtLeast(desiredmajor) { - const versionstr = (await browserBg.runtime.getBrowserInfo()).version; - const actualmajor = toNumber(versionstr.split(".")[0]); - return actualmajor >= desiredmajor; - } - async function openInNewTab(url, kwargs = { - active: true, - related: false, - cookieStoreId: void 0, - bypassFocusHack: false, - discarded: false - }, waitForDOM = false) { - kwargs = mergeLeft_default(kwargs, { - active: true, - related: false, - cookieStoreId: void 0, - bypassFocusHack: false, - discarded: false - }); - const thisTab = await activeTab(); - const options = { - active: kwargs.bypassFocusHack, - url, - cookieStoreId: kwargs.cookieStoreId, - discarded: kwargs.discarded - }; - let pos; - if (kwargs.related) - pos = get2("relatedopenpos"); - else - pos = get2("tabopenpos"); - switch (pos) { - case "next": - options.index = thisTab.index + 1; - if (kwargs.related && await firefoxVersionAtLeast(57)) - options.openerTabId = thisTab.id; - break; - case "last": - options.index = (await browserBg.tabs.query({ - currentWindow: true - })).length; - break; - case "related": - if (await firefoxVersionAtLeast(57)) { - options.openerTabId = thisTab.id; - } else { - options.index = thisTab.index + 1; - } - break; - } - const tabCreateWrapper = async (options2) => { - const tab = await browserBg.tabs.create(options2); - const answer = new Promise((resolve) => { - if (waitForDOM) { - const listener = (message2, sender) => { - var _a; - if (message2 === "dom_loaded_background" && ((_a = sender == null ? void 0 : sender.tab) == null ? void 0 : _a.id) === tab.id) { - browserBg.runtime.onMessage.removeListener(listener); - resolve(tab); - } - }; - browserBg.runtime.onMessage.addListener(listener); - } else { - resolve(tab); - } - }); - return Promise.race([ - answer, - (async () => { - await sleep(750); - return tab; - })() - ]); - }; - if (kwargs.active === false) { - return tabCreateWrapper(options); - } else { - return tabCreateWrapper(options).then( - (newtab) => browserBg.tabs.update(newtab.id, { active: true }) - ); - } - } - function openInNewWindow(createData = {}) { - browserBg.windows.create(createData); - } - async function queryAndURLwrangler(query) { - let address = query.join(" "); - if (address === "") { - address = get2("newtab"); - } - if (address === "about:newtab") { - return void 0; - } - const index = address.indexOf(" "); - let firstWord = address; - if (index > -1) - firstWord = address.substr(0, index); - if (firstWord === "") { - return void 0; - } - if (/^[a-zA-Z0-9+.-]+:[^\s:]/.test(address)) { - try { - return new URL(address).href; - } catch (e) { - } - } - const rest = address.substr(firstWord.length + 1); - const expandRecursively = (name, dict, prevExpansions = []) => { - if (name in dict) { - if (prevExpansions.includes(name)) { - throw new Error( - `Infinite loop detected while expanding ${name}. Stack: ${prevExpansions}.` - ); - } - prevExpansions.push(name); - return expandRecursively(dict[name], dict, prevExpansions); - } - return name; - }; - const searchurls = get2("searchurls"); - const template = expandRecursively(firstWord, searchurls); - if (template != firstWord) { - const url = interpolateSearchItem(new URL(template), rest); - return url.href; - } - const jsurls = get2("jsurls"); - const js = expandRecursively(firstWord, jsurls); - if (js != firstWord) { - return eval(js)(rest); - } - const searchEngines = await browserBg.search.get(); - let engine = searchEngines.find((engine2) => engine2.alias === firstWord); - if (engine !== void 0) { - return { engine: engine.name, query: rest }; - } - try { - const url = new URL("http://" + address); - if (url.hostname.indexOf(".") > 0 || url.port || url.password) { - return url.href; - } - } catch (e) { - } - let queryString = address; - if (firstWord === "search") { - queryString = rest; - } - const enginename = get2("searchengine"); - if (enginename) { - if (searchurls[enginename]) { - const url = interpolateSearchItem( - new URL(searchurls[enginename]), - queryString - ); - return url.href; - } - engine = searchEngines.find((engine2) => engine2.alias === enginename); - if (engine !== void 0) { - return { engine: engine.name, query: queryString }; - } - } - return { query: queryString }; - } - async function openInTab(tab, opts = {}, strarr) { - const maybeURL = await queryAndURLwrangler(strarr); - if (typeof maybeURL === "string") { - return browserBg.tabs.update( - tab.id, - Object.assign({ url: maybeURL }, opts) - ); - } - if (typeof maybeURL === "object") { - return browserBg.search.search({ tabId: tab.id, ...maybeURL }); - } - return browserBg.tabs.update( - tab.id, - Object.assign({ url: "/static/newtab.html" }, opts) - ); - } - async function goToTab(tabId) { - const tab = await browserBg.tabs.update(tabId, { active: true }); - await browserBg.windows.update(tab.windowId, { focused: true }); - return tab; - } - - // src/lib/logging.ts - var LevelToNum = /* @__PURE__ */ new Map(); - LevelToNum.set("never", 0); - LevelToNum.set("error", 1); - LevelToNum.set("warning", 2); - LevelToNum.set("info", 3); - LevelToNum.set("debug", 4); - var Logger = class { - /** - * Config-aware Logger class. - * - * @param logModule the logging module name: this is ued to look up the - * configured/default level in the user config - */ - constructor(logModule) { - this.logModule = logModule; - } - /** - * Config-aware logging function. - * - * @param level the level of the logging - if <= configured, the message - * will be shown - * - * @return logging function: this is returned as a function to - * retain the call site - */ - log(level) { - const configedLevel = get2("logging", this.logModule); - if (LevelToNum.get(level) <= LevelToNum.get(configedLevel)) { - switch (level) { - case "error": - return async (...message2) => { - console.error(...message2); - return browser.runtime.sendMessage({ - type: "controller_background", - command: "acceptExCmd", - args: [ - "fillcmdline_nofocus # " + message2.join(" ") - ] - }); - }; - case "warning": - return console.warn; - case "info": - return console.log; - case "debug": - return console.debug; - } - } - return function() { - }; - } - // These are all getters so that logger.debug = console.debug and - // logger.debug('blah') translates into console.debug('blah') with the - // filename and line correct. - get debug() { - return this.log("debug"); - } - get info() { - return this.log("info"); - } - get warning() { - return this.log("warning"); - } - get error() { - return this.log("error"); - } - }; - var logging_default = Logger; - - // src/lib/messaging.ts - var logger = new logging_default("messaging"); - function attributeCaller(obj) { - function handler(message2, sender, sendResponse) { - logger.debug(message2); - if (message2.args === void 0) - message2.args = []; - try { - const response = obj[message2.command](...message2.args); - if (response instanceof Promise) { - logger.debug("Returning promise...", response); - sendResponse(response); - } else if (response !== void 0) { - logger.debug("Returning synchronously...", response); - sendResponse(response); - } - } catch (e) { - logger.error( - `Error processing ${message2.command}(${message2.args})`, - e - ); - return Promise.reject(e); - } - } - return handler; - } - async function message(type3, command, ...args) { - const message2 = { - type: type3, - command, - args - }; - return browser.runtime.sendMessage(message2); - } - async function messageTab(tabId, type3, command, args) { - const message2 = { - type: type3, - command, - args - }; - return browserBg.tabs.sendMessage(tabId, message2); - } - var _ownTabId; - async function messageOwnTab(type3, command, args) { - if (_ownTabId === void 0) { - _ownTabId = await ownTabId(); - } - if (_ownTabId === void 0) - throw new Error("Can't message own tab: _ownTabId is undefined"); - return messageTab(_ownTabId, type3, command, args); - } - var listeners = /* @__PURE__ */ new Map(); - function addListener(type3, callback) { - if (!listeners.get(type3)) { - listeners.set(type3, /* @__PURE__ */ new Set()); - } - listeners.get(type3).add(callback); - return () => { - listeners.get(type3).delete(callback); - }; - } - if (getContext() === "background") { - addListener("owntab_background", (message2, sender, sendResponse) => { - const x = Object.assign(/* @__PURE__ */ Object.create(null), sender.tab); - x.mutedInfo = Object.assign(/* @__PURE__ */ Object.create(null), sender.tab.mutedInfo); - x.sharingState = Object.assign( - /* @__PURE__ */ Object.create(null), - sender.tab.sharingState - ); - sendResponse(Promise.resolve(x)); - }); - } - function onMessage(message2, sender, sendResponse) { - if (listeners.get(message2.type)) { - for (const listener of listeners.get(message2.type)) { - listener(message2, sender, sendResponse); - } - } - } - browser.runtime.onMessage.addListener(onMessage); - - // src/completions/Autocmd.ts - var AutocmdCompletionOption = class extends CompletionOptionHTML { - constructor(displayValue, description, value) { - super(); - this.displayValue = displayValue; - this.description = description; - this.value = value; - this.fuseKeys = []; - this.fuseKeys.push(value); - this.html = html` - - ${displayValue} - ${description} - `; - } - }; - var AutocmdCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super( - ["autocmd", "autocmddelete"], - "AutocmdCompletionSource", - "Autocommands" - ); - this._parent = _parent; - this.options = []; - this.shouldSetStateFromScore = true; - this.updateOptions(); - this.shouldSetStateFromScore = get2("completions", "Autocmd", "autoselect") === "true"; - this._parent.appendChild(this.node); - } - setStateFromScore(scoredOpts) { - super.setStateFromScore(scoredOpts, this.shouldSetStateFromScore); - } - onInput(...whatever) { - return this.updateOptions(...whatever); - } - async updateOptions(exstr = "") { - this.lastExstr = exstr; - const [prefix, rest2] = this.splitOnPrefix(exstr); - const args = rest2 ? rest2.split(/\s+/) : []; - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - const is_autocmddelete = /del/.test(prefix); - const filter_defined_autocmds = is_autocmddelete; - const defined_autocmds = get2("autocmds"); - Object.keys(defined_autocmds).forEach((k) => { - if (Object.keys(defined_autocmds[k]).length == 0) { - delete defined_autocmds[k]; - } - }); - if (args.length < 2) { - const all_autocmds = await message( - "excmd_background", - "getAutocmdEvents" - ); - let autocmds_to_suggest; - if (filter_defined_autocmds) { - const defined_events = new Set(Object.keys(defined_autocmds)); - autocmds_to_suggest = all_autocmds.filter( - (s) => defined_events.has(s) - ); - } else { - autocmds_to_suggest = all_autocmds; - } - if (args.length > 0) { - autocmds_to_suggest = autocmds_to_suggest.filter( - (s) => s.startsWith(args[0]) - ); - } - this.options = autocmds_to_suggest.sort((a, b) => a.localeCompare(b)).map((event) => { - let value = event; - const patterns = Object.keys(defined_autocmds[event] || {}); - let description; - if (patterns.length == 0) { - description = ""; - } else if (patterns.length == 1) { - description = patterns[0]; - value = `${event} ${description}`; - } else if (patterns.length > 1) { - description = `[${patterns.join(", ")}]`; - } - const opt = new AutocmdCompletionOption( - event, - description, - value - ); - opt.state = "normal"; - return opt; - }); - } else if (args.length == 2) { - const event = args[0]; - const pat = args[1]; - const existing_patterns = Object.entries(defined_autocmds).filter(([e, _]) => !filter_defined_autocmds || e == event).map(([_, v]) => Object.entries(v)).flat(); - this.options = existing_patterns.filter(([pattern, _]) => pattern.startsWith(pat)).sort((a, b) => a[0].localeCompare(b[0])).map(([pattern, command]) => { - let description = ""; - if (is_autocmddelete) { - description = command; - } - const opt = new AutocmdCompletionOption( - pattern, - description, - `${event} ${pattern}` - ); - opt.state = "normal"; - return opt; - }); - } else { - this.options = []; - } - return this.updateChain(); - } - }; - - // src/completions/Bindings.ts - var BindingsCompletionOption = class extends CompletionOptionHTML { - constructor(value, binding) { - super(); - this.value = value; - this.fuseKeys = []; - this.html = html` - ${binding.name} - ${binding.value} - ${binding.mode} - `; - } - }; - var BindingsCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super( - ["bind", "unbind", "bindurl", "unbindurl", "reset", "reseturl"], - "BindingsCompletionSource", - "Bindings" - ); - this._parent = _parent; - this._parent.appendChild(this.node); - } - async filter(exstr) { - this.lastExstr = exstr; - let options = ""; - let [prefix, query2] = this.splitOnPrefix(exstr); - const args = query2 ? query2.split(/\s+/) : []; - let configName = "nmaps"; - let modeName = "normal"; - let urlPattern = null; - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - this.deselect(); - if (prefix.trim().endsWith("url")) { - urlPattern = args.length > 0 ? args.shift() : ""; - options += urlPattern ? urlPattern + " " : ""; - if (args.length === 0) { - const patterns = get2("subconfigs"); - this.options = Object.keys(patterns).filter((pattern) => pattern.startsWith(urlPattern)).sort().map( - (pattern) => new BindingsCompletionOption(pattern, { - name: pattern, - value: "", - mode: "URL Pattern" - }) - ); - return this.updateChain(); - } - } - if (args.length === 1 && args[0].startsWith("--m")) { - const margs = args[0].split("="); - if ("--mode".includes(margs[0])) { - const modeStr = margs.length > 1 ? margs[1] : ""; - this.options = modes.filter((k) => k.startsWith(modeStr)).map( - (name) => new BindingsCompletionOption( - options + "--mode=" + name, - { - name, - value: "", - mode: "Mode Name" - } - ) - ); - return this.updateChain(); - } - } - if (args.length > 0 && args[0].startsWith("--mode=")) { - const modeStr = args.shift(); - const mode = modeStr.replace("--mode=", ""); - modeName = mode; - if (maps2mode.has(mode + "maps")) { - modeName = maps2mode.get(mode + "maps"); - } - configName = mode2maps.get(modeName); - options += `--mode=${modeName} `; - } - if (!configName) { - this.options = []; - return this.updateChain(); - } - const bindings = urlPattern ? getURL(urlPattern, [configName]) : get2(configName); - if (bindings === void 0) { - this.options = []; - return this.updateChain(); - } - query2 = args.join(" ").toLowerCase(); - this.options = Object.keys(bindings).filter((x) => x.toLowerCase().startsWith(query2)).sort().map( - (keystr) => new BindingsCompletionOption( - options + keystr, - { - name: keystr, - value: JSON.stringify(bindings[keystr]), - mode: `${configName} (${modeName})` - } - ) - ); - return this.updateChain(); - } - updateChain() { - this.options.forEach((option) => option.state = "normal"); - return this.updateDisplay(); - } - }; - - // src/completions/providers.ts - function newtaburl() { - const newtab = browser.runtime.getManifest().chrome_url_overrides.newtab; - return newtab !== null ? browser.runtime.getURL(newtab) : null; - } - async function getBookmarks(query2) { - let bookmarks = await browserBg.bookmarks.search({ query: query2 }); - bookmarks = bookmarks.filter((b) => { - try { - return new URL(b.url); - } catch (e) { - return false; - } - }); - bookmarks.sort((a, b) => b.dateAdded - a.dateAdded); - const seen = /* @__PURE__ */ new Map(); - bookmarks = bookmarks.filter((b) => { - if (seen.get(b.title) === b.url) - return false; - else { - seen.set(b.title, b.url); - return true; - } - }); - return bookmarks; - } - async function getSearchUrls(query2) { - const suconf = get2("searchurls"); - const searchUrls = []; - for (const prop in suconf) { - if (Object.prototype.hasOwnProperty.call(suconf, prop) && prop.startsWith(query2)) { - searchUrls.push({ title: prop, url: suconf[prop] }); - } - } - return searchUrls; - } - function frecency(item) { - return item.visitCount * -1; - } - async function getHistory(query2) { - let history2 = await browserBg.history.search({ - text: query2, - maxResults: get2("historyresults"), - startTime: 0 - }); - const dedupe = /* @__PURE__ */ new Map(); - for (const page of history2) { - if (page.url !== newtaburl()) { - if (dedupe.has(page.url)) { - if (dedupe.get(page.url).title.length < page.title.length) { - dedupe.set(page.url, page); - } - } else { - dedupe.set(page.url, page); - } - } - } - history2 = [...dedupe.values()]; - history2.sort((a, b) => frecency(a) - frecency(b)); - return history2; - } - async function getTopSites() { - return (await browserBg.topSites.get()).filter( - (page) => page.url !== newtaburl() - ); - } - async function getCombinedHistoryBmarks(query2) { - const [history2, bookmarks, searchUrls] = await Promise.all([ - getHistory(query2), - getBookmarks(query2), - getSearchUrls(query2) - ]); - const combinedMap = new Map( - bookmarks.map((bmark) => [ - bmark.url, - { title: bmark.title, url: bmark.url, bmark } - ]) - ); - history2.forEach((page) => { - if (combinedMap.has(page.url)) - combinedMap.get(page.url).history = page; - else - combinedMap.set(page.url, { - title: page.title, - url: page.url, - history: page - }); - }); - searchUrls.forEach((su) => { - combinedMap.set(su.url, { - title: su.title, - url: su.url, - search: true - }); - }); - const score = (x) => (x.history ? frecency(x.history) : 0) - (x.bmark ? get2("bmarkweight") : 0) - (x.search ? get2("searchurlweight") : 0); - return Array.from(combinedMap.values()).sort((a, b) => score(a) - score(b)); - } - - // src/completions/Bmark.ts - var BmarkCompletionOption = class extends CompletionOptionHTML { - constructor(value, bmark) { - super(); - this.value = value; - this.fuseKeys = []; - if (!bmark.title) { - bmark.title = new URL(bmark.url).host; - } - this.fuseKeys.push(bmark.title, bmark.url); - this.html = html` - ${"".padEnd(2)} - ${bmark.title} - - ${bmark.url} - - `; - } - }; - var BmarkCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super(["bmarks"], "BmarkCompletionSource", "Bookmarks"); - this._parent = _parent; - this.shouldSetStateFromScore = true; - this._parent.appendChild(this.node); - this.sortScoredOptions = true; - this.shouldSetStateFromScore = get2("completions", "Bmark", "autoselect") === "true"; - } - async filter(exstr) { - this.lastExstr = exstr; - let [prefix, query2] = this.splitOnPrefix(exstr); - let option = ""; - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - if (query2.startsWith("-t ")) { - option = "-t "; - query2 = query2.slice(3); - } - if (query2.startsWith("-c")) { - const args = query2.split(" "); - option += args.slice(0, 2).join(" "); - option += " "; - query2 = args.slice(2).join(" "); - } - this.completion = void 0; - this.options = (await getBookmarks(query2)).slice(0, 10).map((page) => new BmarkCompletionOption(option + page.url, page)); - this.lastExstr = [prefix, query2].join(" "); - return this.updateChain(); - } - setStateFromScore(scoredOpts) { - super.setStateFromScore(scoredOpts, this.shouldSetStateFromScore); - } - updateChain() { - const query2 = this.splitOnPrefix(this.lastExstr)[1]; - if (query2 && query2.trim().length > 0) { - this.setStateFromScore(this.scoredOptions(query2)); - } else { - this.options.forEach((option) => option.state = "normal"); - } - return this.updateDisplay(); - } - select(option) { - if (this.lastExstr !== void 0 && option !== void 0) { - this.completion = "bmarks " + option.value; - option.state = "focused"; - this.lastFocused = option; - } else { - throw new Error("lastExstr and option must be defined!"); - } - } - }; - - // src/completions/Excmd.ts - var ExcmdCompletionOption = class extends CompletionOptionHTML { - constructor(value, documentation = "") { - super(); - this.value = value; - this.documentation = documentation; - this.fuseKeys = []; - this.fuseKeys.push(this.value); - this.html = html` - ${value} - ${documentation} - `; - } - }; - var ExcmdCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super([], "ExcmdCompletionSource", "ex commands"); - this._parent = _parent; - this.updateOptions(); - this._parent.appendChild(this.node); - } - async filter(exstr) { - this.lastExstr = exstr; - return this.onInput(exstr); - } - async onInput(exstr) { - return this.updateOptions(exstr); - } - // eslint-disable-next-line @typescript-eslint/no-unused-vars-experimental - updateChain(exstr = this.lastExstr, options = this.options) { - if (this.options.length > 0) - this.state = "normal"; - else - this.state = "hidden"; - this.updateDisplay(); - } - select(option) { - this.completion = option.value; - option.state = "focused"; - this.lastFocused = option; - } - setStateFromScore(scoredOpts) { - super.setStateFromScore(scoredOpts, false); - } - async updateOptions(exstr = "") { - this.lastExstr = exstr; - const excmds = everything.getFile("src/excmds.ts"); - if (!excmds) - return; - const fns = excmds.getFunctions(); - this.options = this.scoreOptions( - fns.filter(([name, fn]) => !fn.hidden && name.startsWith(exstr)).map(([name, fn]) => new ExcmdCompletionOption(name, fn.doc)) - ); - const exaliasesConfig = get2("exaliases"); - const exaliases = Object.keys(exaliasesConfig).filter((a) => a.startsWith(exstr)).reduce((obj, key) => { - obj[key] = exaliasesConfig[key]; - return obj; - }, {}); - for (const alias of Object.keys(exaliases)) { - const cmd = expandExstr(alias, exaliases); - const fn = excmds.getFunction(cmd); - if (fn) { - this.options.push( - new ExcmdCompletionOption( - alias, - `Alias for \`${cmd}\`. ${fn.doc}` - ) - ); - } else { - this.options.push( - new ExcmdCompletionOption(alias, `Alias for \`${cmd}\`.`) - ); - } - } - const seen = new Set(this.options.map((o2) => o2.value)); - const partial_options = this.scoreOptions( - fns.filter( - ([name, fn]) => !fn.hidden && name.includes(exstr) && !seen.has(name) - ).map(([name, fn]) => new ExcmdCompletionOption(name, fn.doc)) - ); - this.options = this.options.concat(partial_options); - this.options.forEach((o2) => o2.state = "normal"); - return this.updateChain(); - } - scoreOptions(options) { - return options.sort((o1, o2) => o1.value.localeCompare(o2.value)); - } - }; - - // src/completions/Composite.ts - var PREFIX = "composite"; - var regex = new RegExp("^" + PREFIX + " "); - var CompositeCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super([PREFIX], "CompositeCompletionSource", "ex commands"); - this._parent = _parent; - this.updateOptions(); - this._parent.appendChild(this.node); - } - async filter(exstr) { - this.lastExstr = exstr; - return this.onInput(exstr); - } - async onInput(exstr) { - return this.updateOptions(exstr); - } - // eslint-disable-next-line @typescript-eslint/no-unused-vars-experimental - updateChain(exstr = this.lastExstr, options = this.options) { - if (this.options.length > 0) - this.state = "normal"; - else - this.state = "hidden"; - this.updateDisplay(); - } - select(option) { - this.completion = this.lastExstr.replace( - new RegExp(this.getendexstr(this.lastExstr) + "$"), - "" - ) + option.value; - option.state = "focused"; - this.lastFocused = option; - } - setStateFromScore(scoredOpts) { - super.setStateFromScore(scoredOpts, false); - } - async updateOptions(exstr = "") { - const end_exstr = this.getendexstr(exstr); - this.lastExstr = exstr; - const [prefix] = this.splitOnPrefix(exstr); - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - const excmds = everything.getFile("src/excmds.ts"); - if (!excmds) - return; - const fns = excmds.getFunctions(); - this.options = this.scoreOptions( - fns.filter( - ([name, fn]) => !fn.hidden && name.startsWith(end_exstr) - ).map( - ([name, fn]) => new ExcmdCompletionOption( - name, - fn.doc - ) - ) - ); - const exaliases = Object.keys(get2("exaliases")).filter( - (a) => a.startsWith(end_exstr) - ); - for (const alias of exaliases) { - const cmd = expandExstr(alias); - const fn = excmds.getFunction(cmd); - if (fn) { - this.options.push( - new ExcmdCompletionOption( - alias, - `Alias for \`${cmd}\`. ${fn.doc}` - ) - ); - } else { - this.options.push( - new ExcmdCompletionOption( - alias, - `Alias for \`${cmd}\`.` - ) - ); - } - } - this.options.forEach((o2) => o2.state = "normal"); - return this.updateChain(); - } - scoreOptions(options) { - return options.sort((o1, o2) => o1.value.localeCompare(o2.value)); - } - getendexstr(exstr) { - return exstr.replace(regex, "").split("|").slice(-1)[0].split(";").slice(-1)[0].trim(); - } - }; - - // src/lib/extension_info.ts - var installedExtensions = {}; - function updateExtensionInfo(extension) { - installedExtensions[extension.id] = extension; - } - async function hasManagementPermission() { - return browser.permissions.contains({ - permissions: ["management"] - }); - } - async function init2() { - const hasPermission = await hasManagementPermission(); - if (!hasPermission) { - return; - } - let extensions = []; - try { - extensions = await browser.management.getAll(); - } catch (e) { - return; - } - for (const extension of extensions) { - installedExtensions[extension.id] = extension; - } - browser.management.onInstalled.addListener(updateExtensionInfo); - browser.management.onEnabled.addListener(updateExtensionInfo); - browser.management.onDisabled.addListener(updateExtensionInfo); - browser.management.onUninstalled.addListener(updateExtensionInfo); - } - async function listExtensions() { - await init2(); - return Object.keys(installedExtensions).map((key) => installedExtensions[key]).filter((obj) => obj.optionsUrl.length > 0); - } - - // src/completions/Extensions.ts - var ExtensionsCompletionOption = class extends CompletionOptionHTML { - constructor(name, optionsUrl) { - super(); - this.name = name; - this.optionsUrl = optionsUrl; - this.fuseKeys = []; - this.fuseKeys.push(this.name); - this.html = html` - ${name} - `; - } - }; - var ExtensionsCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super(["extoptions"], "ExtensionsCompletionSource", "Extension options"); - this._parent = _parent; - this._parent.appendChild(this.node); - } - async filter(exstr) { - this.lastExstr = exstr; - const [prefix, query2] = this.splitOnPrefix(exstr); - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - const extensions = await listExtensions(); - this.options = this.scoreOptions( - extensions.filter((extension) => extension.name.startsWith(query2)).map( - (extension) => new ExtensionsCompletionOption( - extension.name, - extension.optionsUrl - ) - ) - ); - return this.updateChain(); - } - updateChain() { - this.options.forEach((option) => option.state = "normal"); - return this.updateDisplay(); - } - select(option) { - this.completion = "extoptions " + option.name; - option.state = "focused"; - this.lastFocused = option; - } - scoreOptions(options) { - return options.sort((o1, o2) => o1.name.localeCompare(o2.name)); - } - }; - - // src/lib/native.ts - var import_semver_compare = __toESM(require_semver_compare()); - var logger2 = new logging_default("native"); - var NATIVE_NAME = "tridactyl"; - async function sendNativeMsg(cmd, opts, quiet = false) { - const send = Object.assign({ cmd }, opts); - let resp; - logger2.info(`Sending message: ${JSON.stringify(send)}`); - try { - resp = await browserBg.runtime.sendNativeMessage(NATIVE_NAME, send); - logger2.info(`Received response:`, resp); - return resp; - } catch (e) { - if (!quiet) { - throw new Error( - "Failed to send message to native messenger. If it is correctly installed (run `:native`), please report this bug on https://github.com/tridactyl/tridactyl/issues ." - ); - } - } - } - var NATIVE_VERSION_CACHE; - async function getNativeMessengerVersion(quiet = false) { - if (NATIVE_VERSION_CACHE !== void 0) { - return NATIVE_VERSION_CACHE; - } - const res = await sendNativeMsg("version", {}, quiet); - if (res === void 0) { - if (quiet) - return void 0; - throw new Error(`Error retrieving version: ${res.error}`); - } - if (res.version && !res.error) { - logger2.info(`Native version: ${res.version}`); - NATIVE_VERSION_CACHE = res.version.toString(); - setTimeout(() => NATIVE_VERSION_CACHE = void 0, 500); - return NATIVE_VERSION_CACHE; - } - } - async function nativegate(version = "0", interactive = true, desiredOS = ["mac", "win", "linux", "openbsd"]) { - if (!desiredOS.includes((await browserBg.runtime.getPlatformInfo()).os)) { - if (interactive) { - logger2.error( - "# Tridactyl's native messenger doesn't support your operating system, yet." - ); - } - return false; - } - try { - const actualVersion = await getNativeMessengerVersion(); - if (actualVersion !== void 0) { - if ((0, import_semver_compare.default)(version, actualVersion) > 0) { - if (interactive) - logger2.error( - "# Please update to native messenger " + version + ", for example by running `:updatenative`." - ); - return false; - } - return true; - } else if (interactive) - logger2.error( - "# Native messenger not found. Please run `:installnative` and follow the instructions." - ); - return false; - } catch (e) { - if (interactive) - logger2.error( - "# Native messenger not found. Please run `:installnative` and follow the instructions." - ); - return false; - } - } - async function read(file) { - return sendNativeMsg("read", { file }).catch((e) => { - throw new Error(`Failed to read ${file}. ${e}`); - }); - } - async function listDir(dir) { - return sendNativeMsg("list_dir", { path: dir }).catch((e) => { - throw new Error(`Failed to read directory '${dir}'. ${e}`); - }); - } - async function run(command, content = "") { - const msg = await sendNativeMsg("run", { command, content }); - logger2.info(msg); - return msg; - } - async function pyeval(command) { - return sendNativeMsg("eval", { command }); - } - async function getenv(variable) { - const required_version = "0.1.2"; - if (!await nativegate(required_version, false)) { - throw new Error( - `'getenv' needs native messenger version >= ${required_version}.` - ); - } - return (await sendNativeMsg("env", { var: variable })).content; - } - async function ff_cmdline() { - let output; - if ((await browserBg.runtime.getPlatformInfo()).os === "win") { - if (!await nativegate("0.3.3", false)) { - const browser_name = await get2("browser"); - output = await run( - `powershell -NoProfile -Command "$processes = Get-CimInstance -Property ProcessId,ParentProcessId,Name,CommandLine -ClassName Win32_Process;if (-not ($processes | where { $_.Name -match '^${browser_name}' })) { exit 1; };$ppid = ($processes | where { $_.ProcessId -EQ $PID }).ParentProcessId;$pproc = $processes | where { $_.ProcessId -EQ $ppid };while ($pproc.Name -notmatch '^${browser_name}') { $ppid = $pproc.ParentProcessId; $pproc = $processes | where { $_.ProcessId -EQ $ppid };};Write-Output $pproc.CommandLine;"` - ); - } else { - output = await run( - `powershell -NoProfile -Command "Get-CimInstance -Property CommandLine,ProcessId -ClassName Win32_Process | where { $_.ProcessId -EQ ${(await sendNativeMsg("ppid", {})).content} } | select -ExpandProperty CommandLine | Write-Output"` - ); - } - } else { - const actualVersion = await getNativeMessengerVersion(); - if ((0, import_semver_compare.default)("0.2.0", actualVersion) > 0) { - output = await pyeval( - // Using ' and + rather than ` because we don't want newlines - 'handleMessage({"cmd": "run", "command": "ps -p " + str(os.getppid()) + " -oargs="})["content"]' - ); - } else { - const ppid = (await sendNativeMsg("ppid", {})).content.trim(); - output = await run("ps -p " + ppid + " -oargs="); - } - output.content = output.content.replace("\n", ""); - } - return output.content.trim().split(" "); - } - async function parseProfilesIni(content, basePath) { - const lines = content.split("\n"); - let current = "General"; - const result = {}; - for (const line of lines) { - let match = /^\[([^\]]+)\]$/.exec(line); - if (match !== null) { - current = match[1]; - result[current] = {}; - } else { - match = /^([^=]+)=([^=]+)$/.exec(line); - if (match !== null) { - result[current][match[1]] = match[2]; - } - } - } - for (const profileName of Object.keys(result)) { - const profile = result[profileName]; - if (profile.Path == void 0) { - delete result[profileName]; - continue; - } - if ((await browserBg.runtime.getPlatformInfo()).os === "win") { - profile.Path = profile.Path.replace("/", "\\"); - } - if (profile.IsRelative === "1") { - profile.relativePath = profile.Path; - profile.absolutePath = basePath + profile.relativePath; - } else if (profile.IsRelative === "0") { - if (profile.Path.substring(0, basePath.length) !== basePath) { - throw new Error( - `Error parsing profiles ini: basePath "${basePath}" doesn't match profile path ${profile.Path}` - ); - } - profile.relativePath = profile.Path.substring(basePath.length); - profile.absolutePath = profile.Path; - } - } - return result; - } - async function getFirefoxDir() { - switch ((await browserBg.runtime.getPlatformInfo()).os) { - case "win": - return getenv("APPDATA").then((path) => path + "\\Mozilla\\Firefox\\"); - case "mac": - return getenv("HOME").then( - (path) => path + "/Library/Application Support/Firefox/" - ); - default: - return getenv("HOME").then((path) => path + "/.mozilla/firefox/"); - } - } - async function getProfileUncached() { - const ffDir = await getFirefoxDir(); - const iniPath = ffDir + "profiles.ini"; - let iniObject = {}; - let iniSucceeded = false; - const iniContent = await read(iniPath); - if (iniContent.code === 0 && iniContent.content.length > 0) { - try { - iniObject = await parseProfilesIni(iniContent.content, ffDir); - iniSucceeded = true; - } catch (e) { - } - } - const curProfileDir = get2("profiledir"); - if (curProfileDir !== "auto") { - if (iniSucceeded) { - for (const profileName of Object.keys(iniObject)) { - const profile2 = iniObject[profileName]; - if (profile2.absolutePath === curProfileDir) { - return profile2; - } - } - } - return { - Name: void 0, - IsRelative: "0", - Path: curProfileDir, - relativePath: void 0, - absolutePath: curProfileDir - }; - } - const cmdline = await ff_cmdline().catch(() => ""); - let profile = cmdline.indexOf("--profile"); - if (profile === -1) - profile = cmdline.indexOf("-profile"); - if (profile >= 0 && profile < cmdline.length - 1) { - const profilePath = cmdline[profile + 1]; - if (iniSucceeded) { - for (const profileName of Object.keys(iniObject)) { - const profile2 = iniObject[profileName]; - if (profile2.absolutePath === profilePath) { - return profile2; - } - } - } - return { - Name: void 0, - IsRelative: "0", - Path: profilePath, - relativePath: void 0, - absolutePath: profilePath - }; - } - if (iniSucceeded) { - let p = cmdline.indexOf("-p"); - if (p === -1) - p = cmdline.indexOf("-P"); - if (p >= 0 && p < cmdline.length - 1) { - const pName = cmdline[p + 1]; - for (const profileName of Object.keys(iniObject)) { - const profile2 = iniObject[profileName]; - if (profile2.Name === pName) { - return profile2; - } - } - throw new Error( - `native.ts:getProfile() : '${cmdline[p]}' found in command line arguments but no matching profile name found in "${iniPath}"` - ); - } - } - let hacky_profile_finder = `find "${ffDir}" -maxdepth 2 -name lock`; - if ((await browserBg.runtime.getPlatformInfo()).os === "mac") - hacky_profile_finder = `find "${ffDir}" -maxdepth 2 -name .parentlock`; - const profilecmd = await run(hacky_profile_finder); - if (profilecmd.code === 0 && profilecmd.content.length !== 0) { - profilecmd.content = profilecmd.content.trim(); - if (profilecmd.content.split("\n").length === 1) { - const path = profilecmd.content.split("/").slice(0, -1).join("/"); - if (iniSucceeded) { - for (const profileName of Object.keys(iniObject)) { - const profile2 = iniObject[profileName]; - if (profile2.absolutePath === path) { - return profile2; - } - } - } - return { - Name: void 0, - IsRelative: "0", - Path: path, - relativePath: void 0, - absolutePath: path - }; - } - } - if (iniSucceeded) { - for (const profileName of Object.keys(iniObject)) { - const profile2 = iniObject[profileName]; - if (profile2.Default === 1 || profile2.Default === "1") { - return profile2; - } - } - } - throw new Error( - `Couldn't deduce which profile you want. See ':help profiledir'` - ); - } - var cachedProfile; - async function getProfile() { - if (cachedProfile === void 0) - cachedProfile = await getProfileUncached(); - return cachedProfile; - } - if (getContext() === "background") { - getProfile(); - } - addChangeListener("profiledir", () => { - cachedProfile = void 0; - getProfile(); - }); - async function getProfileDir() { - const profiledir = get2("profiledir"); - if (profiledir !== "auto") - return Promise.resolve(profiledir); - return getProfile().then((p) => p.absolutePath); - } - function parsePrefs(prefFileContent) { - const regex2 = new RegExp( - /^(user_|sticky_|lock)?[pP]ref\("([^"]+)",\s*"?([^\)]+?)"?\);$/ - ); - return prefFileContent.split("\n").reduce((prefs, line) => { - const matches = regex2.exec(line); - if (!matches) { - return prefs; - } - const key = matches[2]; - let value = matches[3]; - if (value === '"') - value = ""; - prefs[key] = value; - return prefs; - }, {}); - } - async function loadPrefs(filename) { - const result = await read(filename); - if (result.code !== 0) - return {}; - return parsePrefs(result.content); - } - var cached_prefs = null; - async function getPrefs() { - if (cached_prefs !== null) - return cached_prefs; - const profile = await getProfileDir() + "/"; - const prefFiles = [ - // Debian has these - "/usr/share/firefox/browser/defaults/preferences/firefox.js", - "/usr/share/firefox/browser/defaults/preferences/debugger.js", - "/usr/share/firefox/browser/defaults/preferences/devtools-startup-prefs.js", - "/usr/share/firefox/browser/defaults/preferences/devtools.js", - "/usr/share/firefox/browser/defaults/preferences/firefox-branding.js", - "/usr/share/firefox/browser/defaults/preferences/vendor.js", - "/usr/share/firefox/browser/defaults/preferences/firefox.js", - "/etc/firefox/firefox.js", - // Pref files can be found here: - // https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences - profile + "grepref.js", - profile + "services/common/services-common.js", - profile + "defaults/pref/services-sync.js", - profile + "browser/app/profile/channel-prefs.js", - profile + "browser/app/profile/firefox.js", - profile + "browser/app/profile/firefox-branding.js", - profile + "browser/defaults/preferences/firefox-l10n.js", - profile + "prefs.js", - profile + "user.js" - ]; - const promises = []; - for (const file of prefFiles) { - promises.push(loadPrefs(file)); - } - cached_prefs = promises.reduce( - async (a, b) => Object.assign(await a, await b) - ); - return cached_prefs; - } - - // src/completions/FileSystem.ts - var FileSystemCompletionOption = class extends CompletionOptionHTML { - constructor(value) { - super(); - this.value = value; - this.fuseKeys = []; - this.fuseKeys = [value]; - this.html = html` - ${value} - `; - } - }; - var FileSystemCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super( - ["saveas", "source", "js -s", "jsb -s"], - "FileSystemCompletionSource", - "FileSystem" - ); - this._parent = _parent; - this._parent.appendChild(this.node); - } - async onInput(exstr) { - return this.filter(exstr); - } - async filter(exstr) { - if (!exstr || exstr.indexOf(" ") === -1) { - this.state = "hidden"; - return; - } - let [cmd, path] = this.splitOnPrefix(exstr); - if (cmd === void 0) { - this.state = "hidden"; - return; - } - if (!path) - path = "."; - if (!["/", "$", "~", "."].find((s) => path.startsWith(s))) { - path = "./" + path; - } - this.lastExstr = [cmd, path].join(" "); - let req; - try { - req = await listDir(path); - } catch (e) { - this.state = "hidden"; - return; - } - if (req.isDir) { - if (!path.endsWith(req.sep)) - path += req.sep; - } else { - path = path.substring(0, path.lastIndexOf("/") + 1); - } - this.options = req.files.map( - (p) => new FileSystemCompletionOption(path + p) - ); - this.state = "normal"; - return this.updateChain(); - } - }; - - // src/completions/Goto.ts - var GotoCompletionOption = class extends CompletionOptionHTML { - constructor(level, y, title, value) { - super(); - this.level = level; - this.y = y; - this.title = title; - this.value = value; - this.fuseKeys = []; - this.fuseKeys.push(title); - this.html = html` - ${title} - `; - } - }; - var GotoCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super(["goto"], "GotoCompletionSource", "Headings"); - this._parent = _parent; - this.options = []; - this.shouldSetStateFromScore = true; - this.updateOptions(); - this.shouldSetStateFromScore = get2("completions", "Goto", "autoselect") === "true"; - this._parent.appendChild(this.node); - } - setStateFromScore(scoredOpts) { - super.setStateFromScore(scoredOpts, this.shouldSetStateFromScore); - } - onInput(...whatever) { - return this.updateOptions(...whatever); - } - async updateOptions(exstr = "") { - this.lastExstr = exstr; - const [prefix] = this.splitOnPrefix(exstr); - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - if (this.options.length < 1) { - this.options = (await messageOwnTab( - "excmd_content", - "getGotoSelectors", - [] - )).sort((a, b) => a.y - b.y).map((heading) => { - const opt = new GotoCompletionOption( - heading.level, - heading.y, - heading.title, - heading.selector - ); - opt.state = "normal"; - return opt; - }); - } - return this.updateChain(); - } - }; - - // src/lib/css_util.ts - var CSS = __toESM(require_css()); - var potentialRules = { - statuspanel: { - name: `#statuspanel`, - options: { - none: `display: none !important;`, - right: `right: 0; display: inline;`, - left: ``, - "top-left": `top: 2em; z-index: 2; display: inline;`, - "top-right": `top: 2em; z-index: 2; right: 0; display: inline;` - } - }, - hoverlink: { - name: `statuspanel[type="overLink"], #statuspanel[type="overLink"]`, - options: { - none: `display: none !important;`, - right: `right: 0; display: inline;`, - left: ``, - "top-left": `top: 2em; z-index: 2; display: inline;`, - "top-right": `top: 2em; z-index: 2; right: 0; display: inline;` - } - }, - tabstoolbar: { - name: `#TabsToolbar`, - options: { - none: `visibility: collapse;`, - show: `` - } - }, - tabstoolbarunfocused: { - name: `:root:not([customizing]) #navigator-toolbox:not(:hover):not(:focus-within) #TabsToolbar`, - options: { - hide: `visibility: collapse;`, - show: `` - } - }, - tabcounter: { - name: `tabs`, - options: { - off: ``, - on: `counter-reset: tab-counter;` - } - }, - tabcounters: { - name: `.tab-label::before`, - options: { - hide: ``, - show: ` counter-increment: tab-counter; - content: counter(tab-counter) " - ";` - } - }, - navtoolboxunfocused: { - name: `:root:not([customizing]) #navigator-toolbox:not(:hover):not(:focus-within)`, - options: { - hide: `max-height: 1px; min-height: calc(0px); overflow: hidden;`, - show: `` - } - }, - navbarunfocused: { - name: `:root:not([customizing]) #navigator-toolbox:not(:hover):not(:focus-within) #nav-bar`, - // tridactyl auto show zone doesn't seem to make a difference - options: { - hide: `max-height: 0; - min-height: 0!important; - --tridactyl-auto-show-zone: 10px; - margin-bottom: calc(-1 * var(--tridactyl-auto-show-zone)); - opacity: 0;`, - show: `` - } - }, - // Annoying black line at top in fullscreen - navbarafter: { - name: `#navigator-toolbox::after`, - options: { - hide: `display: none !important;`, - show: `` - } - }, - // All children except add-on panels - navbarnonaddonchildren: { - name: `:root:not([customizing]) #nav-bar > :not(#customizationui-widget-panel)`, - options: { - hide: `display: none !important;`, - show: `` - } - }, - // Set navbar height to 0 - navbarnoheight: { - name: `:root:not([customizing]) #nav-bar`, - options: { - hide: ``, - show: `max-height: 0; min-height: 0 !important;` - } - }, - // This inherits transparency if we aren't careful - menubar: { - name: `#navigator-toolbox:not(:hover):not(:focus-within) #toolbar-menubar > *`, - options: { - grey: `background-color: rgb(232, 232, 231);`, - default: `` - } - }, - // Window dectorations - titlebar: { - name: `#titlebar`, - options: { - hide: `display: none !important;`, - show: `` - } - }, - padwhenmaximised: { - name: `#main-window[sizemode="maximized"] #content-deck`, - options: { - some: `padding-top: 8px;`, - none: `` - } - } - }; - var metaRules = { - gui: { - none: { - hoverlink: "none", - tabs: "none", - navbar: "autohide", - menubar: "grey", - padwhenmaximised: "some" - }, - full: { - hoverlink: "left", - tabs: "always", - navbar: "always", - menubar: "default", - padwhenmaximised: "none" - } - }, - tabs: { - none: { - tabstoolbar: "none", - navtoolboxunfocused: "hide" - }, - always: { - tabstoolbar: "show", - tabstoolbarunfocused: "show", - navtoolboxunfocused: "show" - }, - autohide: { - tabstoolbar: "show", - tabstoolbarunfocused: "hide", - navtoolboxunfocused: "hide" - }, - count: { - tabcounter: "on", - tabcounters: "show" - }, - nocount: { - tabcounter: "off", - tabcounters: "hide" - } - }, - navbar: { - autohide: { - navbarunfocused: "hide", - navtoolboxunfocused: "hide", - navbarafter: "hide", - navbarnonaddonchildren: "show", - navbarnoheight: "hide" - }, - always: { - navbarunfocused: "show", - navtoolboxunfocused: "show", - navbarafter: "show", - navbarnonaddonchildren: "show", - navbarnoheight: "hide" - }, - none: { - navbarunfocused: "show", - navtoolboxunfocused: "show", - navbarafter: "hide", - navbarnonaddonchildren: "hide", - navbarnoheight: "show" - } - } - }; - - // src/completions/Guiset.ts - var GuisetCompletionOption = class extends CompletionOptionHTML { - constructor(value, displayValue) { - super(); - this.value = value; - this.fuseKeys = []; - this.fuseKeys.push(value); - this.html = html` - ${displayValue} - `; - } - }; - var GuisetCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super(["guiset", "guiset_quiet"], "GuisetCompletionSource", "Guiset"); - this._parent = _parent; - this._parent.appendChild(this.node); - } - async filter(exstr) { - this.lastExstr = exstr; - const [prefix, query2] = this.splitOnPrefix(exstr); - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - this.completion = void 0; - let ruleName = ""; - let subRule = ""; - if (query2) { - const args = query2.trim().split(" "); - ruleName = args[0] || ""; - subRule = args[1] || ""; - } - this.options = []; - if (metaRules[ruleName]) { - this.options = this.options.concat( - Object.keys(metaRules[ruleName]).filter((s) => s.startsWith(subRule)).map( - (s) => new GuisetCompletionOption(`${ruleName} ${s}`, s) - ) - ); - } - if (potentialRules[ruleName]) { - this.options = this.options.concat( - Object.keys(potentialRules[ruleName].options).filter((s) => s.startsWith(subRule)).map( - (s) => new GuisetCompletionOption(`${ruleName} ${s}`, s) - ) - ); - } - if (this.options.length === 0) { - this.options = Object.keys(metaRules).concat(Object.keys(potentialRules)).filter((s) => s.startsWith(ruleName)).map((s) => new GuisetCompletionOption(s, s)); - } - return this.updateChain(); - } - updateChain() { - this.options.forEach((option) => option.state = "normal"); - return this.updateDisplay(); - } - onInput(arg) { - return this.filter(arg); - } - }; - - // src/completions/Help.ts - var HelpCompletionOption = class extends CompletionOptionHTML { - constructor(name, doc, flag) { - super(); - this.name = name; - this.fuseKeys = []; - this.value = `${flag} ${name}`; - this.html = html` - ${name} - ${doc} - `; - } - }; - var HelpCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super(["help"], "HelpCompletionSource", "Help"); - this._parent = _parent; - this._parent.appendChild(this.node); - } - async filter(exstr) { - this.lastExstr = exstr; - this.completion = void 0; - const [prefix, query2] = this.splitOnPrefix(exstr); - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - const file = everything.getFile("src/lib/config.ts"); - const default_config2 = file.getClass("default_config"); - const excmds = everything.getFile("src/excmds.ts"); - const fns = excmds.getFunctions(); - const settings = get2(); - const exaliases = settings.exaliases; - const bindings = settings.nmaps; - if (fns === void 0 || exaliases === void 0 || bindings === void 0) { - return; - } - const flags = { - "-a": (options, query3) => options.concat( - Object.keys(exaliases).filter((alias) => alias.startsWith(query3)).map((alias) => { - const cmd = expandExstr(alias); - const doc = (excmds.getFunction(cmd) || {}).doc || ""; - return new HelpCompletionOption( - alias, - `Alias for \`${cmd}\`. ${doc}`, - "-a" - ); - }) - ), - "-b": (options, query3) => options.concat( - Object.keys(bindings).filter((binding) => binding.startsWith(query3)).map( - (binding) => new HelpCompletionOption( - binding, - `Normal mode binding for \`${bindings[binding]}\``, - "-b" - ) - ) - ), - "-e": (options, query3) => options.concat( - fns.filter( - ([name, fn]) => !fn.hidden && name.startsWith(query3) - ).map( - ([name, fn]) => new HelpCompletionOption( - name, - `Excmd. ${fn.doc}`, - "-e" - ) - ) - ), - "-s": (options, query3) => options.concat( - Object.keys(settings).filter((x) => x.startsWith(query3)).map((setting) => { - const member = default_config2.getMember(setting); - let doc = ""; - if (member !== void 0) { - doc = member.doc; - } - return new HelpCompletionOption( - setting, - `Setting. ${doc}`, - "-s" - ); - }) - ) - }; - const args = query2.split(" "); - let opts = []; - if (Object.keys(flags).includes(args[0])) { - opts = flags[args[0]](opts, args.slice(1).join(" ")); - } else { - opts = Object.keys(flags).reduce( - (acc, curFlag) => flags[curFlag](acc, query2), - [] - ); - } - this.options = opts; - this.options.sort( - (compopt1, compopt2) => compopt1.name.localeCompare(compopt2.name) - ); - return this.updateChain(); - } - updateChain() { - this.options.forEach((option) => option.state = "normal"); - return this.updateDisplay(); - } - }; - - // src/completions/History.ts - var HistoryCompletionOption = class extends CompletionOptionHTML { - constructor(page, options) { - super(); - this.fuseKeys = []; - if (!page.title) { - page.title = new URL(page.url).host; - } - this.value = page.search ? options + page.title : options + page.url; - let preplain = page.bmark ? "B" : ""; - preplain += page.search ? "S" : ""; - let pre = preplain; - if (get2("completions", "Tab", "statusstylepretty") === "true") { - pre = page.bmark ? "\u2B50" : ""; - pre += page.search ? "\u{1F50D}" : ""; - } - this.fuseKeys.push(preplain, page.title, page.url); - this.html = html` - ${pre} - ${preplain} - ${page.title} - - ${page.search ? "Search " : ""} - ${page.url} - - `; - } - }; - var _HistoryCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super( - ["open", "tabopen", "winopen"], - "HistoryCompletionSource", - _HistoryCompletionSource.DEFAULT_SECTION_HEADER - ); - this._parent = _parent; - this._parent.appendChild(this.node); - } - async filter(exstr) { - const prevStr = this.lastExstr; - this.lastExstr = exstr; - let [prefix, query2] = this.splitOnPrefix(exstr); - let options = ""; - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - const headerPostfix = []; - if (prefix === "tabopen") { - if (query2.startsWith("-c ")) { - const args = query2.split(" "); - if (args.length > 2) { - options = args.slice(0, 2).join(" "); - headerPostfix.push("container: " + args[1]); - } - } - if (query2.startsWith("-b ")) { - const args = query2.split(" "); - options = args.slice(0, 1).join(" "); - headerPostfix.push("background tab"); - } - } else if (prefix === "winopen" && query2.startsWith("-private ")) { - options = "-private"; - headerPostfix.push("private window"); - } - options += options ? " " : ""; - query2 = query2.substring(options.length); - this.updateSectionHeader( - _HistoryCompletionSource.DEFAULT_SECTION_HEADER, - headerPostfix - ); - const tokens = query2.split(" "); - if (tokens.length > 1 || query2.endsWith(" ")) { - const match = (await getSearchUrls(tokens[0])).find( - (su) => su.title === tokens[0] - ); - if (match !== void 0) { - query2 = tokens.slice(1).join(" "); - this.updateSectionHeader("Search " + match.title, headerPostfix); - query2 = match.url.split("%s").join(" ") + " " + query2; - } - } - this.options = (await this.scoreOptions( - query2, - get2("historyresults") - )).map((page) => new HistoryCompletionOption(page, options)); - const lastFocused = this.lastFocused; - this.deselect(); - this.options.forEach((option) => option.state = "normal"); - for (const option of this.options) { - if (lastFocused !== void 0 && lastFocused.value === option.value && prevStr.length <= exstr.length) { - this.select(option); - break; - } - } - return this.updateDisplay(); - } - // We don't need this inherited function - // eslint-disable-next-line @typescript-eslint/no-empty-function - updateChain() { - } - async scoreOptions(query2, n) { - if (!query2 || get2("historyresults") === 0) { - return (await getTopSites()).slice(0, n); - } else { - return (await getCombinedHistoryBmarks(query2)).slice(0, n); - } - } - updateSectionHeader(newTitle, postfix) { - if (postfix.length > 0) { - newTitle += " (" + postfix.join(", ") + ")"; - } - const headerNode = this.node.firstElementChild; - const oldTitle = headerNode.innerHTML; - if (newTitle !== oldTitle) { - headerNode.innerHTML = newTitle; - } - } - }; - var HistoryCompletionSource = _HistoryCompletionSource; - HistoryCompletionSource.DEFAULT_SECTION_HEADER = "History and bookmarks"; - - // src/completions/Preferences.ts - var PreferenceCompletionOption = class extends CompletionOptionHTML { - constructor(value, prefvalue) { - super(); - this.value = value; - this.prefvalue = prefvalue; - this.fuseKeys = []; - this.fuseKeys.push(value); - this.html = html` - ${value} - ${prefvalue} - `; - } - }; - var PreferenceCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super(["setpref"], "PreferenceCompletionSource", "Preference"); - this._parent = _parent; - this._parent.appendChild(this.node); - } - onInput(exstr) { - return this.filter(exstr); - } - async filter(exstr) { - if (!exstr) { - this.state = "hidden"; - return; - } - const pref = this.splitOnPrefix(exstr)[1]; - if (pref === void 0) { - this.state = "hidden"; - return; - } - this.lastExstr = exstr; - const preferences = await getPrefs(); - this.options = Object.keys(preferences).filter((key) => key.startsWith(pref)).map((key) => new PreferenceCompletionOption(key, preferences[key])); - if (this.options.length > 0) - this.state = "normal"; - return this.updateChain(); - } - }; - - // src/completions/Rss.ts - var RssCompletionOption = class extends CompletionOptionHTML { - constructor(url, title, type3) { - super(); - this.url = url; - this.title = title; - this.type = type3; - this.fuseKeys = []; - this.value = `${url} ${type3} ${title}`; - this.fuseKeys.push(url); - this.fuseKeys.push(title); - this.html = html` - ${title} - - ${url} - - ${type3} - `; - } - }; - var RssCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super(["rssexec"], "RssCompletionSource", "Feeds"); - this._parent = _parent; - this.options = []; - this.shouldSetStateFromScore = true; - this.updateOptions(); - this.shouldSetStateFromScore = get2("completions", "Rss", "autoselect") === "true"; - this._parent.appendChild(this.node); - } - setStateFromScore(scoredOpts) { - super.setStateFromScore(scoredOpts, this.shouldSetStateFromScore); - } - onInput(...whatever) { - return this.updateOptions(...whatever); - } - async updateOptions(exstr = "") { - this.lastExstr = exstr; - const [prefix] = this.splitOnPrefix(exstr); - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - if (this.options.length < 1) { - this.options = (await messageOwnTab( - "excmd_content", - "getRssLinks", - [] - )).map((link) => { - const opt = new RssCompletionOption( - link.url, - link.title, - link.type - ); - opt.state = "normal"; - return opt; - }); - } - return this.updateChain(); - } - }; - - // src/completions/Sessions.ts - function computeDate(session) { - let howLong = Math.round( - (/* @__PURE__ */ new Date() - session.lastModified) / 1e3 - ); - let qualifier = "s"; - if (Math.abs(howLong) > 60) { - qualifier = "m"; - howLong = Math.round(howLong / 60); - if (Math.abs(howLong) > 60) { - qualifier = "h"; - howLong = Math.round(howLong / 60); - if (Math.abs(howLong) > 24) { - qualifier = "d"; - howLong = Math.round(howLong / 24); - } - } - } - return [howLong, qualifier]; - } - function getTabInfo(session) { - let tab; - let extraInfo; - if (session.tab) { - tab = session.tab; - extraInfo = tab.url; - } else { - tab = session.window.tabs.sort( - (a, b) => b.lastAccessed - a.lastAccessed - )[0]; - const tabCount = session.window.tabs.length; - if (tabCount < 2) { - extraInfo = tab.url; - } else { - extraInfo = `${tabCount - 1} more tab${tabCount > 2 ? "s" : ""}.`; - } - } - return [tab, extraInfo]; - } - var SessionCompletionOption = class extends CompletionOptionHTML { - constructor(session) { - super(); - this.session = session; - this.fuseKeys = []; - this.value = (session.tab || session.window).sessionId; - const [howLong, qualifier] = computeDate(session); - const [tab, extraInfo] = getTabInfo(session); - this.fuseKeys.push(tab.title, tab.url); - this.html = html` - ${session.tab ? "T" : "W"} - ${howLong}${qualifier} - - - - ${tab.title} - ${extraInfo} - `; - } - }; - var SessionsCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super(["undo"], "SessionCompletionSource", "sessions"); - this._parent = _parent; - this.shouldSetStateFromScore = true; - this.updateOptions(); - this.shouldSetStateFromScore = get2("completions", "Sessions", "autoselect") === "true"; - this._parent.appendChild(this.node); - } - async onInput(exstr) { - return this.updateOptions(exstr); - } - setStateFromScore(scoredOpts) { - super.setStateFromScore(scoredOpts, this.shouldSetStateFromScore); - } - async updateOptions(exstr = "") { - this.lastExstr = exstr; - const [prefix] = this.splitOnPrefix(exstr); - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - const sessions = await browserBg.sessions.getRecentlyClosed(); - this.options = sessions.map((s) => new SessionCompletionOption(s)); - } - }; - - // src/completions/Settings.ts - var SettingsCompletionOption = class extends CompletionOptionHTML { - constructor(value, setting) { - super(); - this.value = value; - this.fuseKeys = []; - this.html = html` - ${setting.name} - ${setting.value} - ${setting.type} - ${setting.doc} - `; - } - }; - var SettingsCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super( - ["set", "get", "unset", "seturl", "unseturl", "viewconfig"], - "SettingsCompletionSource", - "Settings" - ); - this._parent = _parent; - this._parent.appendChild(this.node); - } - async filter(exstr) { - this.lastExstr = exstr; - let [prefix, query2] = this.splitOnPrefix(exstr); - let options = ""; - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - if (prefix === "seturl" || prefix === "unseturl" || prefix === "viewconfig" && (query2.startsWith("--user") || query2.startsWith("--default"))) { - const args = query2.split(" "); - options = args.slice(0, 1).join(" "); - query2 = args.slice(1).join(" "); - } - options += options ? " " : ""; - const file = everything.getFile("src/lib/config.ts"); - const default_config2 = file.getClass("default_config"); - const settings = get2(); - if (default_config2 === void 0 || settings === void 0) { - return; - } - this.options = Object.keys(settings).filter((x) => x.startsWith(query2)).sort().map((setting) => { - const md = default_config2.getMember(setting); - let doc = ""; - let type3 = ""; - if (md !== void 0) { - doc = md.doc; - type3 = md.type.toString(); - } - return new SettingsCompletionOption(options + setting, { - name: setting, - value: JSON.stringify(settings[setting]), - doc, - type: type3 - }); - }); - return this.updateChain(); - } - updateChain() { - this.options.forEach((option) => option.state = "normal"); - return this.updateDisplay(); - } - }; - - // src/perf.ts - var logger3 = new Logger("performance"); - function measuredAsync(cls, propertyKey, descriptor) { - if (!performanceApiAvailable()) - return; - const originalMethod = descriptor.value; - descriptor.value = async function(...args) { - const marker = new Marker(cls.constructor.name, propertyKey).start(); - const result = await originalMethod.apply(this, args); - marker.end(); - return result; - }; - return descriptor; - } - var Marker = class { - constructor(ownerName, functionName, active = performanceApiAvailable() && get2("perfcounters") === "true", metricName = new MetricName( - ownerName, - functionName - )) { - this.active = active; - this.metricName = metricName; - } - start() { - if (!this.active) - return this; - logger3.debug( - "Marking startpoint of performance counter for %o", - this.metricName - ); - performance.mark(this.metricName.startName); - return this; - } - end() { - if (!this.active) - return this; - logger3.debug( - "Marking endpoint of performance counter for %o", - this.metricName - ); - performance.mark(this.metricName.endName); - performance.measure( - this.metricName.fullName, - this.metricName.startName, - this.metricName.endName - ); - return this; - } - }; - function listenForCounters(statsLogger) { - let callback; - if (statsLogger === void 0) { - callback = (list) => { - sendStats(list.getEntries()); - }; - } else { - callback = (list) => { - statsLogger.pushList(list.getEntries()); - }; - } - const perfObserver = new PerformanceObserver(callback); - perfObserver.observe({ entryTypes: ["mark", "measure"] }); - return perfObserver; - } - var TRI_PERFORMANCE_NAME_PREFIX = "tri"; - function performanceApiAvailable() { - return performance.mark !== void 0; - } - var extractRegExp = new RegExp( - `^${TRI_PERFORMANCE_NAME_PREFIX}/([^/]+)/([^:]+):([^:]+)` - // No need to handle :start/:end - // because we can get that from the - // sample itself. - ); - var MetricName = class { - constructor(ownerName, functionName) { - const uniqueSuffix = Math.floor( - Math.random() * Math.floor(1e6) - ).toString(); - this.fullName = `${TRI_PERFORMANCE_NAME_PREFIX}/${ownerName}/${functionName}:${uniqueSuffix}`; - this.startName = `${this.fullName}:start`; - this.endName = `${this.fullName}:end`; - } - }; - function sendStats(list) { - message( - "performance_background", - "receiveStatsJson", - JSON.stringify(list) - ); - } - - // src/lib/containers.ts - var logger4 = new Logger("containers"); - var DefaultContainer = Object.freeze( - fromString("default", "invisible", "noicond", "firefox-default") - ); - async function getFromId(containerId) { - try { - return await browserBg.contextualIdentities.get(containerId); - } catch (e) { - return DefaultContainer; - } - } - function fromString(name, color, icon, id2 = "") { - return { - name, - color, - icon, - cookieStoreId: id2 - }; - } - - // src/completions/Tab.ts - var BufferCompletionOption = class extends CompletionOptionHTML { - constructor(value, tab, isAlternative = false, container, tabIndex) { - super(); - this.value = value; - this.isAlternative = isAlternative; - this.tabIndex = tabIndex; - this.fuseKeys = []; - this.tabId = tab.id; - let preplain = ""; - if (tab.active) - preplain += "%"; - else if (isAlternative) { - preplain += "#"; - this.value = "#"; - } - let pre = preplain; - if (tab.pinned) - preplain += "P"; - if (tab.audible) - preplain += "A"; - if (tab.mutedInfo.muted) - preplain += "M"; - if (tab.discarded) - preplain += "D"; - if (get2("completions", "Tab", "statusstylepretty") === "true") { - if (tab.pinned) - pre += "\u{1F4CC}"; - if (tab.audible) - pre += "\u{1F50A}"; - if (tab.mutedInfo.muted) - pre += "\u{1F507}"; - if (tab.discarded) - pre += "\u2296"; - } else { - pre = preplain; - } - this.fuseKeys.push(pre); - this.fuseKeys.push(preplain); - this.fuseKeys.push(String(tab.index + 1), tab.title, tab.url); - const favIconUrl = tab.favIconUrl ? tab.favIconUrl : DEFAULT_FAVICON; - const indicator = tab.audible ? String.fromCodePoint(128266) : ""; - this.html = html` - ${pre} - ${preplain} - - - - ${this.tabIndex + 1}: ${indicator} ${tab.title} - - - ${tab.url} - - `; - } - }; - var BufferCompletionSource = class extends CompletionSourceFuse { - // TODO: - // - store the exstr and trigger redraws on user or data input without - // callback faffery - // - sort out the element redrawing. - constructor(_parent) { - super( - [ - "tab", - "tabclose", - "tabdetach", - "tabduplicate", - "tabmove", - "tabrename" - ], - "BufferCompletionSource", - "Tabs" - ); - this._parent = _parent; - this.shouldSetStateFromScore = true; - this.sortScoredOptions = true; - this.shouldSetStateFromScore = get2("completions", "Tab", "autoselect") === "true"; - this.updateOptions(); - this._parent.appendChild(this.node); - addListener("tab_changes", () => this.reactToTabChanges()); - } - async onInput(exstr) { - return this.updateOptions(exstr); - } - async filter(exstr) { - this.lastExstr = exstr; - const prefix = this.splitOnPrefix(exstr).shift(); - if (prefix === "tabrename") - this.shouldSetStateFromScore = false; - return this.onInput(exstr); - } - setStateFromScore(scoredOpts) { - super.setStateFromScore(scoredOpts, this.shouldSetStateFromScore); - } - /** Score with fuse unless query is a single # or looks like a tab index */ - scoredOptions(query2, options = this.options) { - const args = query2.trim().split(/\s+/gu); - if (args.length === 1) { - if (Number.isInteger(Number(args[0]))) { - let index2 = Number(args[0]) - 1; - if (Math.abs(index2) < options.length) { - index2 = index2.mod(options.length); - return this.TabscoredOptionsStartsWithN(index2, options); - } - } else if (args[0] === "#") { - for (const [index2, option] of enumerate(options)) { - if (option.isAlternative) { - return [ - { - index: index2, - option, - score: 0 - } - ]; - } - } - } - } - return super.scoredOptions(query2); - } - /** Return the scoredOption[] result for the tab index startswith n */ - TabscoredOptionsStartsWithN(n, options) { - const nstr = (n + 1).toString(); - const res = []; - for (const [index2, option] of enumerate(options)) { - if ((option.tabIndex + 1).toString().startsWith(nstr)) { - res.push({ - index: index2, - // index is not tabIndex, changed by score - option, - score: 0 - }); - } - } - res.sort((a, b) => a.option.tabIndex - b.option.tabIndex); - return res; - } - async fillOptions(prefix) { - const altTab = await prevActiveTab(); - const forceSort = prefix === "tabmove" ? "default" : void 0; - const tabs = await getSortedTabs(forceSort); - const options = []; - const container_all = await browserBg.contextualIdentities.query({}); - const container_map = /* @__PURE__ */ new Map(); - container_all.forEach( - (elem) => container_map.set(elem.cookieStoreId, elem) - ); - container_map.set("firefox-default", DefaultContainer); - for (const [index2, tab] of tabs.entries()) { - let tab_container = container_map.get(tab.cookieStoreId); - if (!tab_container) { - tab_container = DefaultContainer; - } - options.push( - new BufferCompletionOption( - (index2 + 1).toString(), - tab, - tab.index === altTab.index, - tab_container, - index2 - ) - ); - } - this.options = options; - } - async updateOptions(exstr = "") { - this.lastExstr = exstr; - const [prefix, query2] = this.splitOnPrefix(exstr); - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - if (prefix === "tabmove") - this.shouldSetStateFromScore = !/^[+-][0-9]+$/.exec(query2); - await this.fillOptions(prefix); - this.completion = void 0; - if (query2 && query2.trim().length > 0) { - this.setStateFromScore(this.scoredOptions(query2)); - } else { - this.options.forEach((option) => option.state = "normal"); - } - return this.updateDisplay(); - } - /** - * Update the list of possible tab options and select (focus on) - * the appropriate option. - */ - async reactToTabChanges() { - const prevOptions = this.options; - await this.updateOptions(this.lastExstr); - if (!prevOptions || !this.options || !this.lastFocused) - return; - const diff = []; - for (const prevOption of prevOptions) { - if (!this.options.find( - (newOption) => prevOption.tabId === newOption.tabId - )) - diff.push(prevOption); - } - const lastFocusedTabCompletion = this.lastFocused; - if (diff.length === 1 && diff[0].tabId === lastFocusedTabCompletion.tabId) { - this.select(this.getTheNextTabOption(lastFocusedTabCompletion)); - } - } - /** - * Gets the next option in this BufferCompletionSource assuming - * that this BufferCompletionSource length has been reduced by 1 - */ - getTheNextTabOption(option) { - if (option.tabIndex === this.options.length) { - return this.options[this.options.length - 1]; - } - return this.options[option.tabIndex]; - } - }; - __decorateClass([ - measuredAsync - ], BufferCompletionSource.prototype, "updateOptions", 1); - - // src/lib/tab_groups.ts - async function tgroups() { - const groups = await browserBg.sessions.getWindowValue( - await activeWindowId(), - "tridactyl-tgroups" - ); - return new Set(groups); - } - async function windowTgroup(id2) { - if (id2 === void 0) { - id2 = await activeWindowId(); - } - return browserBg.sessions.getWindowValue( - id2, - "tridactyl-active-tgroup" - ); - } - async function windowLastTgroup(id2) { - const otherGroupsTabs = await tgroupTabs(await windowTgroup(id2), true); - if (otherGroupsTabs.length === 0) { - return void 0; - } - otherGroupsTabs.sort((a, b) => b.lastAccessed - a.lastAccessed); - const lastTabId = otherGroupsTabs[0].id; - return tabTgroup(lastTabId); - } - async function tabTgroup(id2) { - if (id2 === void 0) { - id2 = await activeTabId(); - } - return browserBg.sessions.getTabValue( - id2, - "tridactyl-tgroup" - ); - } - async function tgroupTabs(name, other = false, id2) { - if (id2 === void 0) { - id2 = await activeWindowId(); - } - return browserBg.tabs.query({ windowId: id2 }).then(async (tabs) => { - const sameGroupIndices = await Promise.all( - tabs.map(async ({ id: id3 }) => { - const groupMatched = await tabTgroup(id3) == name; - return other ? !groupMatched : groupMatched; - }) - ); - tabs = tabs.filter((_, index2) => sameGroupIndices[index2]); - return tabs; - }); - } - - // src/completions/TabAll.ts - var TabAllCompletionOption = class extends CompletionOptionHTML { - constructor(value, tab, isAlternative, isCurrent, winindex, container, incognito, tgroupname) { - super(); - this.value = value; - this.fuseKeys = []; - const valueStr = `${winindex}.${tab.index + 1}`; - this.value = valueStr; - this.fuseKeys.push(this.value, tab.title, tab.url); - this.tab = tab; - let preplain = ""; - if (isCurrent) { - preplain += "%"; - } else if (isAlternative) { - preplain += "#"; - this.value = "#"; - } - let pre = preplain; - if (tab.pinned) - preplain += "P"; - if (tab.audible) - preplain += "A"; - if (tab.mutedInfo.muted) - preplain += "M"; - if (tab.discarded) - preplain += "D"; - if (get2("completions", "Tab", "statusstylepretty") === "true") { - if (tab.pinned) - pre += "\u{1F4CC}"; - if (tab.audible) - pre += "\u{1F50A}"; - if (tab.mutedInfo.muted) - pre += "\u{1F507}"; - if (tab.discarded) - pre += "\u2296"; - } else { - pre = preplain; - } - tgroupname = tgroupname === void 0 ? "" : tgroupname; - this.fuseKeys.push(pre); - this.fuseKeys.push(preplain); - this.fuseKeys.push(tgroupname); - this.fuseKeys.push(String(tab.index + 1), tab.title, tab.url); - const favIconUrl = tab.favIconUrl ? tab.favIconUrl : DEFAULT_FAVICON; - this.html = html` - ${pre} - ${preplain} - - - - ${valueStr}: ${tab.title} - - ${tab.url} - - ${tgroupname} - `; - } - }; - var TabAllCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super(["taball", "tabgrab"], "TabAllCompletionSource", "All Tabs"); - this._parent = _parent; - this.shouldSetStateFromScore = true; - this.updateOptions(); - this._parent.appendChild(this.node); - this.shouldSetStateFromScore = get2("completions", "TabAll", "autoselect") === "true"; - addListener("tab_changes", () => this.reactToTabChanges()); - } - async onInput(exstr) { - return this.updateOptions(exstr); - } - setStateFromScore(scoredOpts) { - super.setStateFromScore(scoredOpts, this.shouldSetStateFromScore); - } - /** - * Map all windows into a {[windowId]: window} object - */ - async getWindows() { - const windows2 = await browserBg.windows.getAll(); - const response = {}; - windows2.forEach((win) => response[win.id] = win); - return response; - } - /** - * Update the list of possible tab options and select (focus on) - * the appropriate option. - */ - async reactToTabChanges() { - await this.updateOptions(this.lastExstr); - } - async updateOptions(exstr = "") { - this.lastExstr = exstr; - const [prefix] = this.splitOnPrefix(exstr); - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - const tabsPromise = browserBg.tabs.query({}); - const windowsPromise = this.getWindows(); - const [tabs, windows2] = await Promise.all([tabsPromise, windowsPromise]); - const options = []; - tabs.sort((a, b) => { - if (a.windowId === b.windowId) - return a.index - b.index; - return a.windowId - b.windowId; - }); - const altTab = await prevActiveTab(); - const excludeCurrentWindow = ["tabgrab"].includes(prefix.trim()); - const currentWindow = await browserBg.windows.getCurrent(); - let lastId = 0; - let winindex = 0; - for (const tab of tabs) { - if (lastId !== tab.windowId) { - lastId = tab.windowId; - winindex += 1; - } - if (excludeCurrentWindow && tab.windowId === currentWindow.id) - continue; - options.push( - new TabAllCompletionOption( - tab.id.toString(), - tab, - tab.index === altTab.index && tab.windowId === altTab.windowId, - tab.active && tab.windowId === currentWindow.id, - winindex, - await getFromId(tab.cookieStoreId), - windows2[tab.windowId].incognito, - await tabTgroup(tab.id) - ) - ); - } - this.completion = void 0; - this.options = options; - return this.updateChain(); - } - }; - __decorateClass([ - measuredAsync - ], TabAllCompletionSource.prototype, "updateOptions", 1); - - // src/completions/Theme.ts - var ThemeCompletionOption = class extends CompletionOptionHTML { - constructor(value, documentation = "") { - super(); - this.value = value; - this.documentation = documentation; - this.fuseKeys = []; - this.fuseKeys.push(this.value); - this.html = html` - ${value} - `; - } - }; - var ThemeCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super(["set theme", "colourscheme"], "ThemeCompletionSource", "Themes"); - this._parent = _parent; - this.updateOptions(); - this._parent.appendChild(this.node); - } - async filter(exstr) { - this.lastExstr = exstr; - return this.onInput(exstr); - } - async onInput(exstr) { - return this.updateOptions(exstr); - } - setStateFromScore(scoredOpts) { - super.setStateFromScore(scoredOpts, false); - } - async updateOptions(exstr = "") { - this.lastExstr = exstr; - const themes = staticThemes.concat( - Object.keys(await get2("customthemes")) - ); - const [prefix, query2] = this.splitOnPrefix(exstr); - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - this.options = this.scoreOptions( - themes.filter((name) => name.startsWith(query2)).map((name) => new ThemeCompletionOption(name)) - ); - this.options.forEach((o2) => o2.state = "normal"); - return this.updateChain(); - } - scoreOptions(options) { - return options.sort((o1, o2) => o1.value.localeCompare(o2.value)); - } - }; - - // src/completions/TabHistory.ts - var TabHistoryCompletionOption = class extends CompletionOptionHTML { - constructor(value, tab) { - super(); - this.value = value; - this.fuseKeys = []; - this.fuseKeys.push(this.value, tab.title); - const index2 = tab.id ? tab.id : ""; - const timeSpan = tab.formatTimeSpan; - this.fuseKeys.push(String(index2)); - this.html = html` - ${index2} - - ${tab.prefix}${tab.title} - - ${tab.href} - - ${timeSpan} - `; - } - }; - var TabHistoryCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super(["back", "forward"], "TabHistoryCompletionSource", "Tab history"); - this._parent = _parent; - this.updateOptions(); - this._parent.appendChild(this.node); - } - async filter(exstr) { - this.lastExstr = exstr; - return this.onInput(exstr); - } - async onInput(exstr) { - return this.updateOptions(exstr); - } - makeTree(nodes, parentId = null, level = 0) { - return nodes.filter((node) => node["parent"] === parentId).reduce( - (tree, node) => [ - ...tree, - { - ...node, - children: this.makeTree(nodes, node["id"], level + 1), - level - } - ], - [] - ); - } - flattenTree(node, flat = []) { - flat.push({ - title: node["title"], - href: node["href"], - parent: node["parent"], - id: node["id"], - level: node["level"] === 0 ? node["level"] : node["level"] - 1, - time: node["time"] - }); - for (const child of node["children"]) { - this.flattenTree(child, flat); - } - return flat; - } - addFormatTimeSpan(tree) { - const now = Date.now(); - for (const node of tree) { - const past = now - node["time"]; - node["formatTimeSpan"] = this.formatTimeSpan(past); - } - } - formatTimeSpan(ms) { - const s = Math.floor(ms / 1e3); - const m = Math.floor(s / 60); - const h = Math.floor(m / 60); - const day = Math.floor(h / 24); - if (m < 1) - return `${s} second${s == 1 ? "" : "s"} ago`; - else if (m < 10) - return `${m}m ${s % 60}s ago`; - else if (h < 1) - return `${m} min${m == 1 ? "" : "s"} ago`; - else if (h < 10) - return `${h}h ${m % 60}m ago`; - else if (day < 1) - return `${h} hour${h == 1 ? "" : "s"} ago`; - else if (day < 10) - return `${day} day${day == 1 ? "" : "s"} ${h % 24}h ago`; - else - return `${day} day${day == 1 ? "" : "s"} ago`; - } - addIndicies(tree) { - for (const node of tree) { - const parentCount = node["level"]; - let string = " "; - for (let i = 0; i <= parentCount; ++i) { - if (i === parentCount - 1) { - string += "\u250C\u2500"; - } else if (i < parentCount) { - string += "\u2003\u2003"; - } else { - string += "\xB7 "; - } - } - node["prefix"] = string; - } - } - async updateOptions(exstr = "") { - this.lastExstr = exstr; - const tab = await browserBg.tabs.query({ - active: true, - currentWindow: true - }); - let history2 = await browserBg.sessions.getTabValue(tab[0].id, "history"); - if (!history2) - history2 = { list: [] }; - const tree = this.makeTree(history2["list"]); - history2["list"] = this.flattenTree(tree[0]).reverse(); - this.addIndicies(history2["list"]); - this.addFormatTimeSpan(history2["list"]); - this.options = this.scoreOptions( - history2["list"].map( - (item) => new TabHistoryCompletionOption(item.href, { - href: item.href, - id: item.index, - title: item.title, - prefix: item.prefix, - index: item.level, - formatTimeSpan: item.formatTimeSpan - }) - ) - ); - this.updateChain(); - } - scoreOptions(options) { - return options; - } - }; - - // src/completions/Window.ts - var WindowCompletionOption = class extends CompletionOptionHTML { - constructor(win) { - super(); - this.fuseKeys = []; - this.value = win.id; - this.fuseKeys.push(`${win.title}`); - this.fuseKeys.push(`${win.id}`); - this.html = html` - - ${win.focused ? "%" : ""} - ${win.id} - ${win.title} - - ${win.tabs.length} tab${win.tabs.length !== 1 ? "s" : ""} - - `; - } - }; - var WindowCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super( - ["tabpush", "winclose", "winmerge"], - "WindowCompletionSource", - "Windows" - ); - this._parent = _parent; - this.updateOptions(); - this._parent.appendChild(this.node); - } - async onInput(exstr) { - return this.updateOptions(exstr); - } - async filter(exstr) { - this.lastExstr = exstr; - return this.onInput(exstr); - } - async updateOptions(exstr = "") { - this.lastExstr = exstr; - const [prefix] = this.splitOnPrefix(exstr); - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - const excludeCurrentWindow = ["tabpush"].includes(prefix.trim()); - this.options = (await browserBg.windows.getAll({ populate: true })).filter((win) => !(excludeCurrentWindow && win.focused)).map( - (win) => { - const o2 = new WindowCompletionOption(win); - o2.state = "normal"; - return o2; - } - ); - return this.updateDisplay(); - } - }; - - // src/completions/Proxy.ts - var ProxyCompletionOption = class extends CompletionOptionHTML { - constructor(value, proxy) { - super(); - this.value = value; - this.fuseKeys = []; - this.html = html` - ${proxy.name} - ${proxy.value} - `; - } - }; - var ProxyCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super( - ["proxyadd", "proxyremove"], - "ProxyCompletionSource", - "Proxy" - ); - this._parent = _parent; - this._parent.appendChild(this.node); - } - async filter(exstr) { - this.lastExstr = exstr; - let [prefix, query2] = this.splitOnPrefix(exstr); - const args = query2 ? query2.split(/\s+/) : []; - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - const proxies = get2("proxies"); - if (!proxies) { - this.options = []; - return this.updateChain(); - } - query2 = args.join(" ").toLowerCase(); - this.options = Object.keys(proxies).filter((x) => x.toLowerCase().startsWith(query2)).sort().map( - (key) => new ProxyCompletionOption( - key, - { - name: key, - value: JSON.stringify(proxies[key]) - } - ) - ); - return this.updateChain(); - } - updateChain() { - this.options.forEach((option) => option.state = "normal"); - return this.updateDisplay(); - } - }; - - // src/content/state_content.ts - var logger5 = new logging_default("state"); - var onChangedListeners = []; - var contentState = new Proxy( - { mode: "normal" }, - { - get(target, property) { - return target[property]; - }, - set(target, property, newValue) { - logger5.debug("Content state changed!", property, newValue); - const oldValue = target[property]; - const mode = target.mode; - target[property] = newValue; - for (const listener of onChangedListeners) { - listener(property, mode, oldValue, newValue); - } - return true; - } - } - ); - - // src/content/styling.ts - var logger6 = new Logger("styling"); - var THEMES = staticThemes; - function capitalise(str) { - if (str === "") - return str; - return str[0].toUpperCase() + str.slice(1); - } - function prefixTheme(name) { - return "TridactylTheme" + capitalise(name); - } - var THEMED_ELEMENTS = []; - var insertedCSS = false; - var customCss = { - allFrames: true, - matchAboutBlank: true, - code: "" - }; - async function theme(element) { - for (const theme2 of THEMES.map(prefixTheme)) { - element.classList.remove(theme2); - } - if (insertedCSS) { - await browserBg.tabs.removeCSS(await ownTabId(), customCss); - insertedCSS = false; - } - const newTheme = await getAsync("theme"); - if (newTheme !== "default") { - element.classList.add(prefixTheme(newTheme)); - } - if (newTheme !== "default") { - customCss.code = THEMES.includes(newTheme) ? "@import url('" + browser.runtime.getURL( - "static/themes/" + newTheme + "/" + newTheme + ".css" - ) + "');" : await getAsync("customthemes", newTheme); - if (customCss.code) { - await browserBg.tabs.insertCSS(await ownTabId(), customCss); - insertedCSS = true; - } else { - logger6.error("Theme " + newTheme + " couldn't be found."); - } - } - if (THEMED_ELEMENTS.length < 2 && element.tagName.toUpperCase() === "HTML") { - THEMED_ELEMENTS.push(element); - } - } - function retheme() { - THEMED_ELEMENTS.forEach((element) => { - theme(element).catch((e) => { - logger6.warning( - `Failed to retheme element "${element}". Error: ${e}` - ); - }); - }); - } - addChangeListener("theme", retheme); - var cb = async (mutationList) => { - const theme2 = await getAsync("theme"); - mutationList.filter((m) => m.target.className.search(prefixTheme("")) === -1).forEach((m) => m.target.classList.add(prefixTheme(theme2))); - }; - new MutationObserver(cb).observe(document.documentElement, { - attributes: true, - childList: false, - characterData: false, - subtree: false, - attributeOldValue: false, - attributeFilter: ["class"] - }); - - // src/state.ts - var logger7 = new logging_default("state"); - var State = class { - constructor() { - this.lastSearchQuery = void 0; - this.cmdHistory = []; - this.prevInputs = [ - { - inputId: void 0, - tab: void 0, - jumppos: void 0 - } - ]; - this.last_ex_str = "echo"; - this.globalMarks = /* @__PURE__ */ new Map(); - this.localMarks = /* @__PURE__ */ new Map(); - this.beforeJumpMark = void 0; - } - }; - var PERSISTENT_KEYS = ["cmdHistory", "globalMarks"]; - var defaults = Object.freeze(new State()); - var overlay = {}; - browser.storage.local.get("state").then((res) => { - if ("state" in res) { - logger7.debug("Loaded initial state:", res.state); - Object.assign(overlay, res.state); - } - }).catch((...args) => logger7.error(...args)); - var state = new Proxy(overlay, { - /** Give defaults if overlay doesn't have the key */ - get(target, property) { - if (notBackground()) - throw new Error( - "State object must be accessed with getAsync in content" - ); - if (property in target) { - return target[property]; - } else { - return defaults[property]; - } - }, - set(target, property, value) { - logger7.debug("State changed!", property, value); - if (notBackground()) { - const inIncognitoContext = browser.extension.inIncognitoContext; - browser.runtime.sendMessage({ - type: "state", - command: "stateUpdate", - args: { property, value, inIncognitoContext } - }); - return true; - } - target[property] = value; - if (PERSISTENT_KEYS.includes(property)) { - if (browser.extension.inIncognitoContext) { - console.error( - "Attempted to write to storage in private window." - ); - return false; - } - browser.storage.local.set({ - state: pick_default(PERSISTENT_KEYS, target) - }); - } - return true; - } - }); - async function getAsync2(property) { - if (notBackground()) - return browser.runtime.sendMessage({ - type: "state", - command: "stateGet", - args: [{ prop: property }] - }); - else - return state[property]; - } - notBackground && !notBackground() && addListener("state", (message2, sender, sendResponse) => { - if (message2.command == "stateUpdate") { - const property = message2.args.property; - const value = message2.args.value; - const inIncognitoContext = message2.args.inIncognitoContext; - if (inIncognitoContext) { - console.error( - "Attempted to write to storage in private window." - ); - return; - } - logger7.debug("State changed!", property, value); - state[property] = value; - } else if (message2.command == "stateGet") { - sendResponse(state[message2.args[0].prop]); - } else - throw new Error( - "Unsupported message to state, type " + message2.command - ); - }); - - // src/lib/commandline_cmds.ts - var sleep2 = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); - async function awaitProxyEq(proxy, a, b) { - let counter = 0; - while (proxy[a] != proxy[b] && counter < 50) { - await sleep2(10); - counter += 1; - } - return proxy[a] == proxy[b]; - } - function getCommandlineFns(cmdline_state) { - return { - /** - * Insert the first command line history line that starts with the content of the command line in the command line. - */ - complete: async () => { - const fragment = cmdline_state.clInput.value; - const matches = (await getAsync2("cmdHistory")).filter( - (key) => key.startsWith(fragment) - ); - const mostrecent = matches[matches.length - 1]; - if (mostrecent !== void 0) - cmdline_state.clInput.value = mostrecent; - return cmdline_state.refresh_completions( - cmdline_state.clInput.value - ); - }, - /** - * Selects the next completion. - */ - next_completion: async () => { - await awaitProxyEq( - contentState, - "current_cmdline", - "cmdline_filter" - ); - if (cmdline_state.activeCompletions) - cmdline_state.activeCompletions.forEach((comp) => comp.next()); - }, - /** - * Selects the previous completion. - */ - prev_completion: async () => { - await awaitProxyEq( - contentState, - "current_cmdline", - "cmdline_filter" - ); - if (cmdline_state.activeCompletions) - cmdline_state.activeCompletions.forEach((comp) => comp.prev()); - }, - /** - * Deselects the currently selected completion. - */ - deselect_completion: () => { - if (cmdline_state.activeCompletions) - cmdline_state.activeCompletions.forEach((comp) => comp.deselect()); - }, - /** - * Inserts the currently selected completion and a space in the command line. - */ - insert_completion: async () => { - await awaitProxyEq( - contentState, - "current_cmdline", - "cmdline_filter" - ); - const command = cmdline_state.getCompletion(); - if (cmdline_state.activeCompletions) { - cmdline_state.activeCompletions.forEach( - (comp) => comp.completion = void 0 - ); - } - let result = Promise.resolve([]); - if (command) { - cmdline_state.clInput.value = command + " "; - result = cmdline_state.refresh_completions( - cmdline_state.clInput.value - ); - } - return result; - }, - /** - * If a completion is selected, inserts it in the command line with a space. - * If no completion is selected, inserts a space where the caret is. - */ - insert_space_or_completion: () => { - const command = cmdline_state.getCompletion(); - if (cmdline_state.activeCompletions) { - cmdline_state.activeCompletions.forEach( - (comp) => comp.completion = void 0 - ); - } - if (command) { - cmdline_state.clInput.value = command + " "; - } else { - space(cmdline_state); - } - return cmdline_state.refresh_completions( - cmdline_state.clInput.value - ); - }, - /** - * Insert a space - */ - insert_space: () => { - space(cmdline_state); - }, - /** Hide the command line and cmdline_state.clear its content without executing it. **/ - hide_and_clear: () => { - cmdline_state.clear(true); - cmdline_state.keyEvents = []; - messageOwnTab("commandline_content", "hide"); - messageOwnTab("commandline_content", "blur"); - if (cmdline_state.activeCompletions) - cmdline_state.activeCompletions.forEach( - (comp) => cmdline_state.completionsDiv.removeChild(comp.node) - ); - cmdline_state.activeCompletions = void 0; - cmdline_state.isVisible = false; - }, - /** - * Check if the command is valid - */ - is_valid_commandline: (command) => { - if (command === void 0) - return false; - const func = command.trim().split(/\s+/)[0]; - return !(func.length === 0 || func.startsWith("#")); - }, - /** - * Save non-secret commands to the cmdHistory and update the cmdline_history_position - */ - store_ex_string: (command) => { - const [func, ...args] = command.trim().split(/\s+/); - if (!browser.extension.inIncognitoContext && !(func === "winopen" && args[0] === "-private")) { - getAsync2("cmdHistory").then((c) => { - cmdline_state.state.cmdHistory = c.concat([command]); - }); - cmdline_state.cmdline_history_position = 0; - } - }, - /** - * Selects the next history line. - */ - next_history: () => cmdline_state.history(1), - /** - * Selects the prev history line. - */ - prev_history: () => cmdline_state.history(-1), - /** - * Execute the content of the command line and hide it. - **/ - accept_line: async () => { - await awaitProxyEq( - contentState, - "current_cmdline", - "cmdline_filter" - ); - const command = cmdline_state.getCompletion() || cmdline_state.clInput.value; - cmdline_state.fns.hide_and_clear(); - if (cmdline_state.fns.is_valid_commandline(command) === false) - return; - cmdline_state.fns.store_ex_string(command); - return messageOwnTab("controller_content", "acceptExCmd", [command]); - }, - execute_ex_on_completion_args: (excmd) => execute_ex_on_x(true, cmdline_state, excmd), - execute_ex_on_completion: (excmd) => execute_ex_on_x(false, cmdline_state, excmd), - copy_completion: () => { - const command = cmdline_state.getCompletion(); - cmdline_state.fns.hide_and_clear(); - return messageOwnTab("controller_content", "acceptExCmd", [ - "clipboard yank " + command - ]); - } - }; - } - function execute_ex_on_x(args_only, cmdline_state, excmd) { - const args = cmdline_state.getCompletion(args_only) || cmdline_state.clInput.value; - const cmdToExec = (excmd ? excmd + " " : "") + args; - cmdline_state.fns.store_ex_string(cmdToExec); - return messageOwnTab("controller_content", "acceptExCmd", [cmdToExec]); - } - function space(cmdline_state) { - const selectionStart = cmdline_state.clInput.selectionStart; - const selectionEnd = cmdline_state.clInput.selectionEnd; - cmdline_state.clInput.value = cmdline_state.clInput.value.substring(0, selectionStart) + " " + cmdline_state.clInput.value.substring(selectionEnd); - cmdline_state.clInput.selectionStart = cmdline_state.clInput.selectionEnd = selectionStart + 1; - } - - // src/lib/editor.ts - var editor_exports = {}; - __export(editor_exports, { - backward_char: () => backward_char, - backward_kill_line: () => backward_kill_line, - backward_kill_word: () => backward_kill_word, - backward_word: () => backward_word, - beginning_of_line: () => beginning_of_line, - capitalize_word: () => capitalize_word, - delete_backward_char: () => delete_backward_char, - delete_char: () => delete_char, - downcase_word: () => downcase_word, - end_of_line: () => end_of_line, - forward_char: () => forward_char, - forward_word: () => forward_word, - insert_text: () => insert_text, - jumble: () => jumble, - kill_line: () => kill_line, - kill_whole_line: () => kill_whole_line, - kill_word: () => kill_word, - rot13: () => rot13, - tab_insert: () => tab_insert, - transpose_chars: () => transpose_chars, - transpose_words: () => transpose_words, - upcase_word: () => upcase_word - }); - - // src/lib/editor_utils.ts - function applyToElem(e, fn) { - let result; - if (e instanceof HTMLInputElement && e.type !== "text") { - const t = e.type; - e.type = "text"; - result = fn(e); - e.type = t; - } else { - result = fn(e); - } - return result; - } - function getSimpleValues(e) { - return applyToElem(e, (e2) => [e2.value, e2.selectionStart, e2.selectionEnd]); - } - function getContentEditableValues(e) { - const selection = e.ownerDocument.getSelection(); - let n = selection.anchorNode; - while (n && n !== e) - n = n.parentNode; - if (!n) - return [null, null, null]; - const r = selection.getRangeAt(0).cloneRange(); - const selectionLength = r.toString().length; - r.setEnd(e, e.childNodes.length); - const lengthFromCaretToEndOfText = r.toString().length; - r.setStart(e, 0); - const s = r.toString(); - const caretPos = s.length - lengthFromCaretToEndOfText; - return [s, caretPos, caretPos + selectionLength]; - } - function setSimpleValues(e, text, start, end) { - return applyToElem(e, (e2) => { - if (text !== null) - e2.value = text; - if (start !== null) { - if (end === null) - end = start; - e2.selectionStart = start; - e2.selectionEnd = end; - } - }); - } - function setContentEditableValues(e, text, start, end) { - const selection = e.ownerDocument.getSelection(); - if (selection.rangeCount < 1) { - const r = new Range(); - r.setStart(e, 0); - r.setEnd(e, e.childNodes.length); - selection.addRange(r); - } - if (text !== null) { - const range = selection.getRangeAt(0); - const anchorNode = selection.anchorNode; - const focusNode = selection.focusNode; - range.setStart(anchorNode, 0); - range.setEndAfter(focusNode, focusNode.length); - e.ownerDocument.execCommand("insertText", false, text); - } - if (start !== null) { - if (end === null) - end = start; - let range = selection.getRangeAt(0); - range.setStart(range.startContainer, start); - range = selection.getRangeAt(0); - range.setEnd(range.startContainer, end); - } - } - function wrap_input(fn) { - return (e, arg) => { - let getValues = getSimpleValues; - let setValues = setSimpleValues; - if (e.isContentEditable) { - getValues = getContentEditableValues; - setValues = setContentEditableValues; - } - const [origText, origStart, origEnd] = getValues(e); - if (origText === null || origStart === null) - return false; - setValues(e, ...fn(origText, origStart, origEnd, arg)); - return true; - }; - } - function needs_text(fn, arg) { - return (text, selectionStart, selectionEnd, arg2) => { - if (text.length === 0 || selectionStart === null || selectionStart === void 0) - return [null, null, null]; - return fn( - text, - selectionStart, - typeof selectionEnd === "number" ? selectionEnd : selectionStart, - arg2 - ); - }; - } - function getWordBoundaries(text, position, before) { - if (position < 0 || position > text.length) - throw new Error( - `getWordBoundaries: position (${position}) should be within text ("${text}") boundaries (0, ${text.length})` - ); - const pattern = new RegExp(get2("wordpattern"), "g"); - let boundary1 = position < text.length ? position : text.length; - const direction = before ? -1 : 1; - if (before && boundary1 > 0) - boundary1 -= 1; - while (boundary1 >= 0 && boundary1 < text.length && !text[boundary1].match(pattern)) { - boundary1 += direction; - } - if (boundary1 < 0) - boundary1 = 0; - else if (boundary1 >= text.length) - boundary1 = text.length - 1; - while (boundary1 >= 0 && boundary1 < text.length && !text[boundary1].match(pattern)) { - boundary1 -= direction; - } - if (boundary1 < 0) - boundary1 = 0; - else if (boundary1 >= text.length) - boundary1 = text.length - 1; - if (!text[boundary1].match(pattern)) { - throw new Error( - `getWordBoundaries: no characters matching wordpattern (${pattern.source}) in text (${text})` - ); - } - while (boundary1 >= 0 && boundary1 < text.length && !!text[boundary1].match(pattern)) { - boundary1 += direction; - } - boundary1 -= direction; - let boundary2 = boundary1; - while (boundary2 >= 0 && boundary2 < text.length && !!text[boundary2].match(pattern)) { - boundary2 -= direction; - } - boundary2 += direction; - if (boundary1 > boundary2) - return [boundary2, boundary1 + 1]; - return [boundary1, boundary2 + 1]; - } - function wordAfterPos(text, position) { - if (position < 0) - throw new Error(`wordAfterPos: position (${position}) is less that 0`); - const pattern = new RegExp(get2("wordpattern"), "g"); - while (position < text.length && !!text[position].match(pattern)) - position += 1; - while (position < text.length && !text[position].match(pattern)) - position += 1; - if (position >= text.length) - return -1; - return position; - } - var rot13_helper = (s, n = 13) => { - let sa = s.split(""); - sa = sa.map((x) => charesar(x, n)); - return sa.join(""); - }; - var charesar = (c, n = 13) => { - const cn = c.charCodeAt(0); - if (cn >= 65 && cn <= 90) - return String.fromCharCode((cn - 65 + n) % 26 + 65); - if (cn >= 97 && cn <= 122) - return String.fromCharCode((cn - 97 + n) % 26 + 97); - return c; - }; - var jumble_helper = (text) => { - const wordSplitRegex = new RegExp("([^a-zA-Z]|[A-Z][a-z]+)"); - return text.split(wordSplitRegex).map(jumbleWord).join(""); - }; - function jumbleWord(word) { - if (word.length < 4 || isAcronym()) { - return word; - } - const innerText = word.slice(1, -1); - return word.charAt(0) + shuffle(innerText) + word.charAt(word.length - 1); - function isAcronym() { - return word.length < 5 && word.toUpperCase() === word; - } - } - var shuffle = (text) => { - const arr = text.split(""); - for (let i = arr.length - 1; i >= 0; i--) { - const j = Math.floor(Math.random() * i + 1); - const t = arr[i]; - arr[i] = arr[j]; - arr[j] = t; - } - return arr.join(""); - }; - - // src/lib/editor.ts - var delete_char = wrap_input( - needs_text((text, selectionStart, selectionEnd) => { - if (selectionStart !== selectionEnd) { - text = text.substring(0, selectionStart) + text.substring(selectionEnd); - } else { - text = text.substring(0, selectionStart) + text.substring(selectionStart + 1); - } - return [text, selectionStart, null]; - }) - ); - var delete_backward_char = wrap_input( - needs_text((text, selectionStart, selectionEnd) => { - if (selectionStart !== selectionEnd) { - text = text.substring(0, selectionStart) + text.substring(selectionEnd); - } else { - text = text.substring(0, selectionStart - 1) + text.substring(selectionStart); - } - selectionStart -= 1; - return [text, selectionStart, null]; - }) - ); - var tab_insert = wrap_input((text, selectionStart, selectionEnd) => { - if (selectionStart !== selectionEnd) { - text = text.substring(0, selectionStart) + " " + text.substring(selectionEnd); - } else { - text = text.substring(0, selectionStart) + " " + text.substring(selectionStart); - } - selectionStart += 1; - return [text, selectionStart, null]; - }); - var transpose_chars = wrap_input( - (text, selectionStart) => { - if (text.length < 2) - return [null, null, null]; - if (selectionStart === 0) - selectionStart = 1; - if (selectionStart >= text.length) - selectionStart = text.length - 1; - text = text.substring(0, selectionStart - 1) + text.substring(selectionStart, selectionStart + 1) + text.substring(selectionStart - 1, selectionStart) + text.substring(selectionStart + 1); - selectionStart += 1; - return [text, selectionStart, null]; - } - ); - function applyWord(text, selectionStart, selectionEnd, fn) { - if (text.length === 0) - return [null, null, null]; - if (selectionStart >= text.length) { - selectionStart = text.length - 1; - } - const boundaries = getWordBoundaries(text, selectionStart, false); - const beginning = text.substring(0, boundaries[0]) + fn(text.substring(boundaries[0], boundaries[1])); - text = beginning + text.substring(boundaries[1]); - selectionStart = beginning.length + 1; - return [text, selectionStart, null]; - } - var transpose_words = wrap_input( - needs_text((text, selectionStart) => { - if (selectionStart >= text.length) { - selectionStart = text.length - 1; - } - let firstBoundaries = getWordBoundaries(text, selectionStart, false); - let secondBoundaries = firstBoundaries; - const nextWord = wordAfterPos(text, firstBoundaries[1]); - if (nextWord > -1) { - secondBoundaries = getWordBoundaries(text, nextWord, false); - } else { - firstBoundaries = getWordBoundaries( - text, - firstBoundaries[0] - 1, - true - ); - } - const firstWord2 = text.substring(firstBoundaries[0], firstBoundaries[1]); - const secondWord = text.substring( - secondBoundaries[0], - secondBoundaries[1] - ); - const beginning = text.substring(0, firstBoundaries[0]) + secondWord + text.substring(firstBoundaries[1], secondBoundaries[0]); - selectionStart = beginning.length; - return [ - beginning + firstWord2 + text.substring(secondBoundaries[1]), - selectionStart, - null - ]; - }) - ); - var upcase_word = wrap_input( - needs_text( - (text, selectionStart, selectionEnd) => applyWord( - text, - selectionStart, - selectionEnd, - (word) => word.toUpperCase() - ) - ) - ); - var downcase_word = wrap_input( - needs_text( - (text, selectionStart, selectionEnd) => applyWord( - text, - selectionStart, - selectionEnd, - (word) => word.toLowerCase() - ) - ) - ); - var capitalize_word = wrap_input( - needs_text( - (text, selectionStart, selectionEnd) => applyWord( - text, - selectionStart, - selectionEnd, - (word) => word[0].toUpperCase() + word.substring(1) - ) - ) - ); - var kill_line = wrap_input( - needs_text((text, selectionStart) => { - let newLine = text.substring(selectionStart).search("\n"); - if (newLine !== -1) { - if (newLine === 0) - newLine = 1; - text = text.substring(0, selectionStart) + text.substring(selectionStart + newLine); - } else { - text = text.substring(0, selectionStart); - } - return [text, selectionStart, null]; - }) - ); - var backward_kill_line = wrap_input( - needs_text((text, selectionStart) => { - if (selectionStart > 0 && text[selectionStart - 1] === "\n") { - return [ - text.substring(0, selectionStart - 1) + text.substring(selectionStart), - selectionStart, - null - ]; - } - let newLine; - for (newLine = selectionStart; newLine > 0 && text[newLine - 1] !== "\n"; --newLine) - ; - return [ - text.substring(0, newLine) + text.substring(selectionStart), - newLine, - null - ]; - }) - ); - var kill_whole_line = wrap_input( - needs_text((text, selectionStart) => { - let firstNewLine; - let secondNewLine; - for (firstNewLine = selectionStart; firstNewLine > 0 && text[firstNewLine - 1] !== "\n"; --firstNewLine) - ; - for (secondNewLine = selectionStart; secondNewLine < text.length && text[secondNewLine - 1] !== "\n"; ++secondNewLine) - ; - return [ - text.substring(0, firstNewLine) + text.substring(secondNewLine), - firstNewLine, - null - ]; - }) - ); - var kill_word = wrap_input( - needs_text((text, selectionStart) => { - const boundaries = getWordBoundaries(text, selectionStart, false); - if (selectionStart < boundaries[1]) { - boundaries[0] = selectionStart; - return [ - text.substring(0, boundaries[0]) + text.substring(boundaries[1]), - boundaries[0], - null - ]; - } else { - return [null, selectionStart, null]; - } - }) - ); - var backward_kill_word = wrap_input( - needs_text((text, selectionStart) => { - const boundaries = getWordBoundaries(text, selectionStart, true); - if (selectionStart > boundaries[0]) { - boundaries[1] = selectionStart; - return [ - text.substring(0, boundaries[0]) + text.substring(boundaries[1]), - boundaries[0], - null - ]; - } else { - return [null, selectionStart, null]; - } - }) - ); - var beginning_of_line = wrap_input( - needs_text((text, selectionStart) => { - while (text[selectionStart - 1] !== void 0 && text[selectionStart - 1] !== "\n") - selectionStart -= 1; - return [null, selectionStart, null]; - }) - ); - var end_of_line = wrap_input( - needs_text((text, selectionStart) => { - while (text[selectionStart] !== void 0 && text[selectionStart] !== "\n") - selectionStart += 1; - return [null, selectionStart, null]; - }) - ); - var forward_char = wrap_input((text, selectionStart) => [ - null, - selectionStart + 1, - null - ]); - var backward_char = wrap_input( - (text, selectionStart) => [null, selectionStart - 1, null] - ); - var forward_word = wrap_input( - needs_text((text, selectionStart) => { - if (selectionStart === text.length) - return [null, null, null]; - const boundaries = getWordBoundaries(text, selectionStart, false); - return [null, boundaries[1], null]; - }) - ); - var backward_word = wrap_input( - (text, selectionStart) => { - if (selectionStart === 0) - return [null, null, null]; - const boundaries = getWordBoundaries(text, selectionStart, true); - return [null, boundaries[0], null]; - } - ); - var insert_text = wrap_input( - (text, selectionStart, selectionEnd, arg) => [ - text.slice(0, selectionStart) + arg + text.slice(selectionEnd), - selectionStart + arg.length, - null - ] - ); - var rot13 = wrap_input((text, selectionStart, selectionEnd) => [ - rot13_helper(text.slice(0, selectionStart) + text.slice(selectionEnd)), - selectionStart, - null - ]); - var jumble = wrap_input((text, selectionStart, selectionEnd) => [ - jumble_helper(text.slice(0, selectionStart) + text.slice(selectionEnd)), - selectionStart, - null - ]); - - // src/lib/DANGEROUS-html-tagged-template.js - (function(window2) { - "use strict"; - try { - (function testSpreadOpAndTemplate() { - const tag = function tag2() { - return; - }; - tag`test`; - })(); - if (!("content" in document.createElement("template") && "from" in Array)) { - throw new Error(); - } - } catch (e) { - console.log( - "Your browser does not support the needed functionality to use the html tagged template" - ); - return; - } - if (typeof window2.html === "undefined") { - let encodeAttributeHTMLEntities = function(str) { - return str.replace(ENCODINGS_REGEX.attribute, function(match) { - return ENCODINGS.attribute[match]; - }); - }, encodeURIEntities = function(str) { - return str.replace(ENCODINGS_REGEX.uri, function(match) { - return ENCODINGS.uri[match]; - }); - }; - const SUBSTITUTION_INDEX = "substitutionindex:"; - const SUBSTITUTION_REGEX = new RegExp( - SUBSTITUTION_INDEX + "([0-9]+):", - "g" - ); - const REJECTION_STRING = "zXssPreventedz"; - const ENCODINGS = { - attribute: { - "&": "&", - "<": "<", - ">": ">" - }, - uri: { - "&": "&" - } - }; - const DOM_EVENTS = [ - "onclick", - "ondblclick", - "onmousedown", - "onmouseup", - "onmouseover", - "onmousemove", - "onmouseout", - "ondragstart", - "ondrag", - "ondragenter", - "ondragleave", - "ondragover", - "ondrop", - "ondragend", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onunload", - "onabort", - "onerror", - "onresize", - "onscroll", - "onselect", - "onchange", - "onsubmit", - "onreset", - "onfocus", - "onblur", - "onpointerdown", - "onpointerup", - "onpointercancel", - "onpointermove", - "onpointerover", - "onpointerout", - "onpointerenter", - "onpointerleave", - "ongotpointercapture", - "onlostpointercapture", - "oncut", - "oncopy", - "onpaste", - "onbeforecut", - "onbeforecopy", - "onbeforepaste", - "onafterupdate", - "onbeforeupdate", - "oncellchange", - "ondataavailable", - "ondatasetchanged", - "ondatasetcomplete", - "onerrorupdate", - "onrowenter", - "onrowexit", - "onrowsdelete", - "onrowinserted", - "oncontextmenu", - "ondrag", - "ondragstart", - "ondragenter", - "ondragover", - "ondragleave", - "ondragend", - "ondrop", - "onselectstart", - "help", - "onbeforeunload", - "onstop", - "beforeeditfocus", - "onstart", - "onfinish", - "onbounce", - "onbeforeprint", - "onafterprint", - "onpropertychange", - "onfilterchange", - "onreadystatechange", - "onlosecapture", - "DOMMouseScroll", - "ondragdrop", - "ondragenter", - "ondragexit", - "ondraggesture", - "ondragover", - "onclose", - "oncommand", - "oninput", - "DOMMenuItemActive", - "DOMMenuItemInactive", - "oncontextmenu", - "onoverflow", - "onoverflowchanged", - "onunderflow", - "onpopuphidden", - "onpopuphiding", - "onpopupshowing", - "onpopupshown", - "onbroadcast", - "oncommandupdate" - ]; - const URI_ATTRIBUTES = [ - "action", - "background", - "cite", - "classid", - "codebase", - "data", - "href", - "longdesc", - "profile", - "src", - "usemap" - ]; - const ENCODINGS_REGEX = { - attribute: new RegExp( - "[" + Object.keys(ENCODINGS.attribute).join("") + "]", - "g" - ), - uri: new RegExp( - "[" + Object.keys(ENCODINGS.uri).join("") + "]", - "g" - ) - }; - const ATTRIBUTE_PARSER_REGEX = /\s([^">=\s]+)(?:="[^"]+")?/g; - const WRAPPED_WITH_QUOTES_REGEX = /^('|")[\s\S]*\1$/; - const CUSTOM_URI_ATTRIBUTES_REGEX = /\bur[il]|ur[il]s?$/i; - window2.html = function(strings, ...values) { - if (!strings[0] && values.length === 0) { - return; - } - function replaceSubstitution(match, index2) { - return values[parseInt(index2, 10)]; - } - let str = strings[0]; - for (let i = 0; i < values.length; i++) { - str += SUBSTITUTION_INDEX + i + ":" + strings[i + 1]; - } - const template2 = document.createElement("template"); - template2.innerHTML = str; - const walker = document.createNodeIterator( - template2.content, - NodeFilter.SHOW_ALL - ); - let node; - while (node = walker.nextNode()) { - let tag = null; - const attributesToRemove = []; - let nodeName = node.nodeName.toLowerCase(); - if (nodeName.indexOf(SUBSTITUTION_INDEX) !== -1) { - nodeName = nodeName.replace( - SUBSTITUTION_REGEX, - replaceSubstitution - ); - tag = document.createElement(nodeName); - node._replacedWith = tag; - node.parentNode.insertBefore(tag, node); - } else if (node.nodeName === "SCRIPT") { - const script = document.createElement("script"); - tag = script; - node._replacedWith = script; - node.parentNode.insertBefore(script, node); - } - let attributes; - if (node.attributes) { - if (!(node.attributes instanceof NamedNodeMap)) { - const temp = node.cloneNode(); - const attributeMatches = temp.outerHTML.match( - ATTRIBUTE_PARSER_REGEX - ); - attributes = []; - for (const attribute of attributeMatches.length) { - const attributeName = attribute.trim().split("=")[0]; - const attributeValue = node.getAttribute( - attributeName - ); - attributes.push({ - name: attributeName, - value: attributeValue - }); - } - } else { - attributes = Array.from(node.attributes); - } - for (const attribute of attributes) { - let name = attribute.name; - let value = attribute.value; - let hasSubstitution = false; - if (name.indexOf(SUBSTITUTION_INDEX) !== -1) { - name = name.replace( - SUBSTITUTION_REGEX, - replaceSubstitution - ); - if (name && typeof name === "string") { - hasSubstitution = true; - } - attributesToRemove.push(attribute.name); - } - if (name && value.indexOf(SUBSTITUTION_INDEX) !== -1) { - hasSubstitution = true; - let isRejected = false; - value = value.replace(SUBSTITUTION_REGEX, function(match, index2, offset) { - if (isRejected) { - return ""; - } - let substitutionValue = values[parseInt(index2, 10)]; - if (DOM_EVENTS.indexOf(name) !== -1 && typeof substitutionValue === "string" && !WRAPPED_WITH_QUOTES_REGEX.test( - substitutionValue - )) { - substitutionValue = '"' + substitutionValue + '"'; - } else if (URI_ATTRIBUTES.indexOf(name) !== -1 || CUSTOM_URI_ATTRIBUTES_REGEX.test(name)) { - const queryParamIndex = value.indexOf("="); - if (queryParamIndex !== -1 && offset > queryParamIndex) { - substitutionValue = encodeURIComponent( - substitutionValue - ); - } else { - substitutionValue = encodeURI( - encodeURIEntities( - substitutionValue - ) - ); - if (offset === 0 && substitutionValue.indexOf(":") !== -1) { - const authorized_protocols = [ - "http://", - "https://", - "moz-extension://", - "about://", - "data:image/png;base64", - "data:image/gif;base64", - "data:image/jpg;base64", - "data:image/jpeg;base64", - "data:image/x-icon;base64", - // NB: THIS V COULD BE DANGEROUS - "data:image/svg+xml;base64" - // NB: THIS ^ COULD BE DANGEROUS - ]; - if (!authorized_protocols.find( - (p) => substitutionValue.startsWith( - p - ) - )) { - isRejected = true; - } - } - } - } else if (typeof substitutionValue === "string") { - substitutionValue = encodeAttributeHTMLEntities( - substitutionValue - ); - } - return substitutionValue; - }); - if (isRejected) { - value = "#" + REJECTION_STRING; - } - } - if (tag || hasSubstitution) { - const el = tag || node; - if (name.substr(-1) === "?") { - el.removeAttribute(name); - if (value === "true") { - name = name.slice(0, -1); - el.setAttribute(name, ""); - } - } else { - el.setAttribute(name, value); - } - } - } - } - attributesToRemove.forEach(function(attribute) { - node.removeAttribute(attribute); - }); - let parentNode; - if (node.parentNode && node.parentNode._replacedWith) { - parentNode = node.parentNode; - node.parentNode._replacedWith.appendChild(node); - } - if (node._replacedWith && node.childNodes.length === 0 || parentNode && parentNode.childNodes.length === 0) { - (parentNode || node).remove(); - } - if (node.nodeType === 3 && node.nodeValue.indexOf(SUBSTITUTION_INDEX) !== -1) { - const nodeValue = node.nodeValue.replace( - SUBSTITUTION_REGEX, - replaceSubstitution - ); - const text = document.createTextNode(nodeValue); - node.parentNode.replaceChild(text, node); - } - } - if (template2.content.childNodes.length > 1) { - return template2.content; - } - return template2.content.firstChild; - }; - } - })(window); - - // src/lib/number.clamp.ts - Number.prototype.clamp = function(lo, hi) { - return Math.max(lo, Math.min(this, hi)); - }; - - // src/parsers/genericmode.ts - function parser(conf, keys4) { - const maps = keyMap(conf); - return parse2(keys4, maps); - } - - // src/completions/TabGroup.ts - var TabGroupCompletionOption = class extends CompletionOptionHTML { - constructor(group, tabCount, current, alternate, audible, urls) { - super(); - this.fuseKeys = []; - this.value = group; - let preplain = ""; - if (current) { - preplain += "%"; - } - if (alternate) { - preplain += "#"; - } - let pre = preplain; - if (audible) { - preplain += "A"; - } - if (get2("completions", "Tab", "statusstylepretty") === "true") { - if (audible) { - pre += "\u{1F50A}"; - } - } else { - pre = preplain; - } - this.fuseKeys.push(group); - this.fuseKeys.push(pre); - this.fuseKeys.push(preplain); - this.fuseKeys.push(urls); - this.html = html` - ${pre} - ${preplain} - ${group} - - ${tabCount} tab${tabCount !== 1 ? "s" : ""} - - - `; - const urlMarkup = urls.map( - (u) => `${u}` - ); - this.html.lastElementChild.innerHTML = urlMarkup.join(", "); - } - }; - var TabGroupCompletionSource = class extends CompletionSourceFuse { - constructor(_parent) { - super( - ["tgroupswitch", "tgroupmove", "tgroupclose"], - "TabGroupCompletionSource", - "Tab Groups" - ); - this._parent = _parent; - this.updateOptions(); - this._parent.appendChild(this.node); - } - async onInput(exstr) { - return this.updateOptions(exstr); - } - async updateOptions(exstr = "") { - this.lastExstr = exstr; - const [prefix] = this.splitOnPrefix(exstr); - if (prefix) { - if (this.state === "hidden") { - this.state = "normal"; - } - } else { - this.state = "hidden"; - return; - } - const currentGroup = await windowTgroup(); - const alternateGroup = await windowLastTgroup(); - const groups = [...await tgroups()]; - this.options = await Promise.all( - groups.map(async (group) => { - const tabs = await tgroupTabs(group); - const audible = tabs.some((t) => t.audible); - tabs.sort((a, b) => b.lastAccessed - a.lastAccessed); - const urls = tabs.map((t) => t.url); - const o2 = new TabGroupCompletionOption( - group, - tabs.length, - group === currentGroup, - group === alternateGroup, - audible, - urls - ); - o2.state = "normal"; - return o2; - }) - ); - this.completion = void 0; - return this.updateChain(); - } - }; - - // src/commandline_frame.ts - var logger8 = new logging_default("cmdline"); - var commandline_state = { - activeCompletions: void 0, - clInput: window.document.getElementById( - "tridactyl-input" - ), - clear, - cmdline_history_position: 0, - completionsDiv: window.document.getElementById("completions"), - fns: void 0, - getCompletion, - history, - /** @hidden - * This is to handle Escape key which, while the cmdline is focused, - * ends up firing both keydown and input listeners. In the worst case - * hides the cmdline, shows and refocuses it and replaces its text - * which could be the prefix to generate a completion. - * tl;dr TODO: delete this and better resolve race condition - */ - isVisible: false, - keyEvents: new Array(), - refresh_completions, - state - }; - theme(document.querySelector(":root")); - function resizeArea() { - if (commandline_state.isVisible) { - messageOwnTab("commandline_content", "show"); - messageOwnTab("commandline_content", "focus"); - focus(); - } - } - function getCompletion(args_only = false) { - if (!commandline_state.activeCompletions) - return void 0; - for (const comp of commandline_state.activeCompletions) { - if (comp.state === "normal" && comp.completion !== void 0) { - return args_only ? comp.args : comp.completion; - } - } - } - commandline_state.getCompletion = getCompletion; - function enableCompletions() { - if (!commandline_state.activeCompletions) { - commandline_state.activeCompletions = [ - AutocmdCompletionSource, - // FindCompletionSource, - BindingsCompletionSource, - BmarkCompletionSource, - TabAllCompletionSource, - BufferCompletionSource, - ExcmdCompletionSource, - ThemeCompletionSource, - TabHistoryCompletionSource, - CompositeCompletionSource, - FileSystemCompletionSource, - GotoCompletionSource, - GuisetCompletionSource, - HelpCompletionSource, - AproposCompletionSource, - HistoryCompletionSource, - PreferenceCompletionSource, - RssCompletionSource, - SessionsCompletionSource, - SettingsCompletionSource, - TabGroupCompletionSource, - WindowCompletionSource, - ExtensionsCompletionSource, - ProxyCompletionSource - ].map((constructorr) => { - try { - return new constructorr(commandline_state.completionsDiv); - } catch (e) { - } - }).filter((c) => c); - const fragment = document.createDocumentFragment(); - commandline_state.activeCompletions.forEach( - (comp) => fragment.appendChild(comp.node) - ); - commandline_state.completionsDiv.appendChild(fragment); - logger8.debug(commandline_state.activeCompletions); - } - } - var noblur = () => setTimeout(() => commandline_state.clInput.focus(), 0); - function focus() { - commandline_state.clInput.focus(); - commandline_state.clInput.removeEventListener("blur", noblur); - commandline_state.clInput.addEventListener("blur", noblur); - } - var HISTORY_SEARCH_STRING; - var keyParser = (keys4) => parser("exmaps", keys4); - var history_called = false; - var prev_cmd_called_history = false; - var QUEUE = [(async () => { - })()]; - commandline_state.clInput.addEventListener( - "keydown", - function(keyevent) { - if (!keyevent.isTrusted) - return; - commandline_state.keyEvents.push(minimalKeyFromKeyboardEvent(keyevent)); - const response = keyParser(commandline_state.keyEvents); - if (response.isMatch) { - keyevent.preventDefault(); - keyevent.stopImmediatePropagation(); - } else { - prev_cmd_called_history = false; - } - if (response.value) { - commandline_state.keyEvents = []; - history_called = false; - if (response.value.startsWith("ex.")) { - const [funcname, ...args] = response.value.slice(3).split(/\s+/); - QUEUE[QUEUE.length - 1].then(() => { - QUEUE.push( - // Abuse async to wrap non-promises in a promise - // eslint-disable-next-line @typescript-eslint/require-await - (async () => commandline_state.fns[funcname]( - args.length === 0 ? void 0 : args.join(" ") - ))() - ); - prev_cmd_called_history = history_called; - }); - } else { - messageOwnTab("controller_content", "acceptExCmd", [ - response.value - ]).then((_) => prev_cmd_called_history = history_called); - } - } else { - commandline_state.keyEvents = response.keys; - } - }, - true - ); - function refresh_completions(exstr) { - if (!commandline_state.activeCompletions) - enableCompletions(); - return Promise.all( - commandline_state.activeCompletions.map( - (comp) => comp.filter(exstr).then(() => { - if (comp.shouldRefresh()) { - return resizeArea(); - } - }) - ) - ).catch((err) => { - console.error(err); - return []; - }); - } - var onInputPromise = Promise.resolve(); - commandline_state.clInput.addEventListener("input", () => { - const exstr = commandline_state.clInput.value; - contentState.current_cmdline = exstr; - contentState.cmdline_filter = ""; - setTimeout(async () => { - await onInputPromise; - if (exstr !== commandline_state.clInput.value) { - contentState.cmdline_filter = exstr; - return; - } - onInputPromise = refresh_completions(exstr); - onInputPromise.then(() => { - contentState.cmdline_filter = exstr; - }); - }, 100); - }); - var cmdline_history_current = ""; - function clear(evlistener = false) { - if (evlistener) - commandline_state.clInput.removeEventListener("blur", noblur); - commandline_state.clInput.value = ""; - commandline_state.cmdline_history_position = 0; - cmdline_history_current = ""; - } - commandline_state.clear = clear; - async function history(n) { - history_called = true; - if (!prev_cmd_called_history) { - HISTORY_SEARCH_STRING = commandline_state.clInput.value; - } - const matches = reverse_default( - uniq_default(reverse_default(await getAsync2("cmdHistory"))) - ).filter((key) => key.startsWith(HISTORY_SEARCH_STRING)); - if (commandline_state.cmdline_history_position === 0) { - cmdline_history_current = commandline_state.clInput.value; - } - let clamped_ind = matches.length + n - commandline_state.cmdline_history_position; - clamped_ind = clamped_ind.clamp(0, matches.length); - const pot_history = matches[clamped_ind]; - commandline_state.clInput.value = pot_history === void 0 ? cmdline_history_current : pot_history; - if (clamped_ind === matches.length + n - commandline_state.cmdline_history_position) - commandline_state.cmdline_history_position = commandline_state.cmdline_history_position - n; - } - commandline_state.history = history; - function fillcmdline(newcommand, trailspace = true, ffocus = true) { - if (trailspace) - commandline_state.clInput.value = newcommand + " "; - else - commandline_state.clInput.value = newcommand; - commandline_state.isVisible = true; - let result = Promise.resolve([]); - if (ffocus) { - focus(); - result = refresh_completions(commandline_state.clInput.value); - } - return result; - } - function getContent() { - return commandline_state.clInput.value; - } - function editor_function(fn_name, ...args) { - let result = Promise.resolve([]); - if (editor_exports[fn_name]) { - editor_exports[fn_name](commandline_state.clInput, ...args); - result = refresh_completions(commandline_state.clInput.value); - } else { - console.error(`No editor function named ${fn_name}!`); - } - return result; - } - addListener("commandline_frame", attributeCaller(commandline_frame_exports)); - commandline_state.fns = getCommandlineFns(commandline_state); - addListener( - "commandline_cmd", - attributeCaller(commandline_state.fns) - ); - window.tri = Object.assign(window.tri || {}, { - perfObserver: listenForCounters() - }); -})(); -/*! Bundled license information: - -atob/browser-atob.js: - (*!! Deliberately using an API that's deprecated in node.js because *) - (*!! this file is for browsers and we expect them to cope with it. *) - (*!! Discussion: github.com/node-browser-compat/atob/pull/9 *) -*/ -//# sourceMappingURL=commandline_frame.js.map diff --git a/docs/flems_soubory/page-script.js b/docs/flems_soubory/page-script.js deleted file mode 100644 index 9250dc4..0000000 --- a/docs/flems_soubory/page-script.js +++ /dev/null @@ -1,16971 +0,0 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ 3737: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(55050); -var callBind = __webpack_require__(68375); -var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); -module.exports = function callBoundIntrinsic(name, allowMissing) { - var intrinsic = GetIntrinsic(name, !!allowMissing); - if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { - return callBind(intrinsic); - } - return intrinsic; -}; - -/***/ }), - -/***/ 68375: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var bind = __webpack_require__(36046); -var GetIntrinsic = __webpack_require__(55050); -var $apply = GetIntrinsic('%Function.prototype.apply%'); -var $call = GetIntrinsic('%Function.prototype.call%'); -var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); -var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); -var $max = GetIntrinsic('%Math.max%'); -if ($defineProperty) { - try { - $defineProperty({}, 'a', { - value: 1 - }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = null; - } -} -module.exports = function callBind(originalFunction) { - var func = $reflectApply(bind, $call, arguments); - if ($gOPD && $defineProperty) { - var desc = $gOPD(func, 'length'); - if (desc.configurable) { - // original length, plus the receiver, minus any additional arguments (after the receiver) - $defineProperty(func, 'length', { - value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) - }); - } - } - return func; -}; -var applyBind = function applyBind() { - return $reflectApply(bind, $apply, arguments); -}; -if ($defineProperty) { - $defineProperty(module.exports, 'apply', { - value: applyBind - }); -} else { - module.exports.apply = applyBind; -} - -/***/ }), - -/***/ 51820: -/***/ ((module) => { - -"use strict"; - - -/* eslint no-invalid-this: 1 */ -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; -var toStr = Object.prototype.toString; -var funcType = '[object Function]'; -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slice.call(arguments, 1); - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply(this, args.concat(slice.call(arguments))); - if (Object(result) === result) { - return result; - } - return this; - } else { - return target.apply(that, args.concat(slice.call(arguments))); - } - }; - var boundLength = Math.max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); - } - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - return bound; -}; - -/***/ }), - -/***/ 36046: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var implementation = __webpack_require__(51820); -module.exports = Function.prototype.bind || implementation; - -/***/ }), - -/***/ 55050: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var undefined; -var $SyntaxError = SyntaxError; -var $Function = Function; -var $TypeError = TypeError; - -// eslint-disable-next-line consistent-return -var getEvalledConstructor = function (expressionSyntax) { - try { - return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} -}; -var $gOPD = Object.getOwnPropertyDescriptor; -if ($gOPD) { - try { - $gOPD({}, ''); - } catch (e) { - $gOPD = null; // this is IE 8, which has a broken gOPD - } -} - -var throwTypeError = function () { - throw new $TypeError(); -}; -var ThrowTypeError = $gOPD ? function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } -}() : throwTypeError; -var hasSymbols = __webpack_require__(8269)(); -var hasProto = __webpack_require__(1886)(); -var getProto = Object.getPrototypeOf || (hasProto ? function (x) { - return x.__proto__; -} // eslint-disable-line no-proto -: null); -var needsEval = {}; -var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); -var INTRINSICS = { - '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, - '%Array%': Array, - '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': needsEval, - '%AsyncGenerator%': needsEval, - '%AsyncGeneratorFunction%': needsEval, - '%AsyncIteratorPrototype%': needsEval, - '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, - '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, - '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, - '%Boolean%': Boolean, - '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '%Date%': Date, - '%decodeURI%': decodeURI, - '%decodeURIComponent%': decodeURIComponent, - '%encodeURI%': encodeURI, - '%encodeURIComponent%': encodeURIComponent, - '%Error%': Error, - '%eval%': eval, - // eslint-disable-line no-eval - '%EvalError%': EvalError, - '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': needsEval, - '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '%isFinite%': isFinite, - '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': typeof JSON === 'object' ? JSON : undefined, - '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), - '%Math%': Math, - '%Number%': Number, - '%Object%': Object, - '%parseFloat%': parseFloat, - '%parseInt%': parseInt, - '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '%RangeError%': RangeError, - '%ReferenceError%': ReferenceError, - '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '%RegExp%': RegExp, - '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), - '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '%String%': String, - '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '%URIError%': URIError, - '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, - '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet -}; -if (getProto) { - try { - null.error; // eslint-disable-line no-unused-expressions - } catch (e) { - // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 - var errorProto = getProto(getProto(e)); - INTRINSICS['%Error.prototype%'] = errorProto; - } -} -var doEval = function doEval(name) { - var value; - if (name === '%AsyncFunction%') { - value = getEvalledConstructor('async function () {}'); - } else if (name === '%GeneratorFunction%') { - value = getEvalledConstructor('function* () {}'); - } else if (name === '%AsyncGeneratorFunction%') { - value = getEvalledConstructor('async function* () {}'); - } else if (name === '%AsyncGenerator%') { - var fn = doEval('%AsyncGeneratorFunction%'); - if (fn) { - value = fn.prototype; - } - } else if (name === '%AsyncIteratorPrototype%') { - var gen = doEval('%AsyncGenerator%'); - if (gen && getProto) { - value = getProto(gen.prototype); - } - } - INTRINSICS[name] = value; - return value; -}; -var LEGACY_ALIASES = { - '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], - '%ArrayPrototype%': ['Array', 'prototype'], - '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], - '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], - '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], - '%ArrayProto_values%': ['Array', 'prototype', 'values'], - '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], - '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], - '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], - '%BooleanPrototype%': ['Boolean', 'prototype'], - '%DataViewPrototype%': ['DataView', 'prototype'], - '%DatePrototype%': ['Date', 'prototype'], - '%ErrorPrototype%': ['Error', 'prototype'], - '%EvalErrorPrototype%': ['EvalError', 'prototype'], - '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], - '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], - '%FunctionPrototype%': ['Function', 'prototype'], - '%Generator%': ['GeneratorFunction', 'prototype'], - '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], - '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], - '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], - '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], - '%JSONParse%': ['JSON', 'parse'], - '%JSONStringify%': ['JSON', 'stringify'], - '%MapPrototype%': ['Map', 'prototype'], - '%NumberPrototype%': ['Number', 'prototype'], - '%ObjectPrototype%': ['Object', 'prototype'], - '%ObjProto_toString%': ['Object', 'prototype', 'toString'], - '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], - '%PromisePrototype%': ['Promise', 'prototype'], - '%PromiseProto_then%': ['Promise', 'prototype', 'then'], - '%Promise_all%': ['Promise', 'all'], - '%Promise_reject%': ['Promise', 'reject'], - '%Promise_resolve%': ['Promise', 'resolve'], - '%RangeErrorPrototype%': ['RangeError', 'prototype'], - '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], - '%RegExpPrototype%': ['RegExp', 'prototype'], - '%SetPrototype%': ['Set', 'prototype'], - '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], - '%StringPrototype%': ['String', 'prototype'], - '%SymbolPrototype%': ['Symbol', 'prototype'], - '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], - '%TypedArrayPrototype%': ['TypedArray', 'prototype'], - '%TypeErrorPrototype%': ['TypeError', 'prototype'], - '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], - '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], - '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], - '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], - '%URIErrorPrototype%': ['URIError', 'prototype'], - '%WeakMapPrototype%': ['WeakMap', 'prototype'], - '%WeakSetPrototype%': ['WeakSet', 'prototype'] -}; -var bind = __webpack_require__(36046); -var hasOwn = __webpack_require__(50163); -var $concat = bind.call(Function.call, Array.prototype.concat); -var $spliceApply = bind.call(Function.apply, Array.prototype.splice); -var $replace = bind.call(Function.call, String.prototype.replace); -var $strSlice = bind.call(Function.call, String.prototype.slice); -var $exec = bind.call(Function.call, RegExp.prototype.exec); - -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var first = $strSlice(string, 0, 1); - var last = $strSlice(string, -1); - if (first === '%' && last !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); - } else if (last === '%' && first !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); - } - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }); - return result; -}; -/* end adaptation */ - -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = '%' + alias[0] + '%'; - } - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (value === needsEval) { - value = doEval(intrinsicName); - } - if (typeof value === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - return { - alias: alias, - name: intrinsicName, - value: value - }; - } - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); -}; -module.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== 'string' || name.length === 0) { - throw new $TypeError('intrinsic name must be a non-empty string'); - } - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new $TypeError('"allowMissing" argument must be a boolean'); - } - if ($exec(/^%?[^%]*%?$/, name) === null) { - throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); - } - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; - var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); - } - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - var first = $strSlice(part, 0, 1); - var last = $strSlice(part, -1); - if ((first === '"' || first === "'" || first === '`' || last === '"' || last === "'" || last === '`') && first !== last) { - throw new $SyntaxError('property names with quotes must have matching quotes'); - } - if (part === 'constructor' || !isOwn) { - skipFurtherCaching = true; - } - intrinsicBaseName += '.' + part; - intrinsicRealName = '%' + intrinsicBaseName + '%'; - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if (!(part in value)) { - if (!allowMissing) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } - return void undefined; - } - if ($gOPD && i + 1 >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; - - // By convention, when a data property is converted to an accessor - // property to emulate a data property that does not suffer from - // the override mistake, that accessor's getter is marked with - // an `originalValue` property. Here, when we detect this, we - // uphold the illusion by pretending to see that original data - // property, i.e., returning the value rather than the getter - // itself. - if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } - } - } - return value; -}; - -/***/ }), - -/***/ 1886: -/***/ ((module) => { - -"use strict"; - - -var test = { - foo: {} -}; -var $Object = Object; -module.exports = function hasProto() { - return { - __proto__: test - }.foo === test.foo && !({ - __proto__: null - } instanceof $Object); -}; - -/***/ }), - -/***/ 8269: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var origSymbol = typeof Symbol !== 'undefined' && Symbol; -var hasSymbolSham = __webpack_require__(88928); -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { - return false; - } - if (typeof Symbol !== 'function') { - return false; - } - if (typeof origSymbol('foo') !== 'symbol') { - return false; - } - if (typeof Symbol('bar') !== 'symbol') { - return false; - } - return hasSymbolSham(); -}; - -/***/ }), - -/***/ 88928: -/***/ ((module) => { - -"use strict"; - - -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { - return false; - } - if (typeof Symbol.iterator === 'symbol') { - return true; - } - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { - return false; - } - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { - return false; - } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { - return false; - } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { - return false; - } // eslint-disable-line no-restricted-syntax, no-unreachable-loop - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { - return false; - } - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { - return false; - } - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { - return false; - } - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { - return false; - } - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { - return false; - } - } - return true; -}; - -/***/ }), - -/***/ 50163: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var bind = __webpack_require__(36046); -module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); - -/***/ }), - -/***/ 87676: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var hasMap = typeof Map === 'function' && Map.prototype; -var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; -var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; -var mapForEach = hasMap && Map.prototype.forEach; -var hasSet = typeof Set === 'function' && Set.prototype; -var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; -var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; -var setForEach = hasSet && Set.prototype.forEach; -var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; -var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; -var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; -var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; -var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; -var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; -var booleanValueOf = Boolean.prototype.valueOf; -var objectToString = Object.prototype.toString; -var functionToString = Function.prototype.toString; -var $match = String.prototype.match; -var $slice = String.prototype.slice; -var $replace = String.prototype.replace; -var $toUpperCase = String.prototype.toUpperCase; -var $toLowerCase = String.prototype.toLowerCase; -var $test = RegExp.prototype.test; -var $concat = Array.prototype.concat; -var $join = Array.prototype.join; -var $arrSlice = Array.prototype.slice; -var $floor = Math.floor; -var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; -var gOPS = Object.getOwnPropertySymbols; -var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; -var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; -// ie, `has-tostringtag/shams -var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') ? Symbol.toStringTag : null; -var isEnumerable = Object.prototype.propertyIsEnumerable; -var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype // eslint-disable-line no-proto -? function (O) { - return O.__proto__; // eslint-disable-line no-proto -} : null); -function addNumericSeparator(num, str) { - if (num === Infinity || num === -Infinity || num !== num || num && num > -1000 && num < 1000 || $test.call(/e/, str)) { - return str; - } - var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; - if (typeof num === 'number') { - var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) - if (int !== num) { - var intStr = String(int); - var dec = $slice.call(str, intStr.length + 1); - return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); - } - } - return $replace.call(str, sepRegex, '$&_'); -} -var utilInspect = __webpack_require__(53260); -var inspectCustom = utilInspect.custom; -var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; -module.exports = function inspect_(obj, options, depth, seen) { - var opts = options || {}; - if (has(opts, 'quoteStyle') && opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double') { - throw new TypeError('option "quoteStyle" must be "single" or "double"'); - } - if (has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) { - throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); - } - var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; - if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { - throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); - } - if (has(opts, 'indent') && opts.indent !== null && opts.indent !== '\t' && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) { - throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); - } - if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { - throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); - } - var numericSeparator = opts.numericSeparator; - if (typeof obj === 'undefined') { - return 'undefined'; - } - if (obj === null) { - return 'null'; - } - if (typeof obj === 'boolean') { - return obj ? 'true' : 'false'; - } - if (typeof obj === 'string') { - return inspectString(obj, opts); - } - if (typeof obj === 'number') { - if (obj === 0) { - return Infinity / obj > 0 ? '0' : '-0'; - } - var str = String(obj); - return numericSeparator ? addNumericSeparator(obj, str) : str; - } - if (typeof obj === 'bigint') { - var bigIntStr = String(obj) + 'n'; - return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; - } - var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; - if (typeof depth === 'undefined') { - depth = 0; - } - if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { - return isArray(obj) ? '[Array]' : '[Object]'; - } - var indent = getIndent(opts, depth); - if (typeof seen === 'undefined') { - seen = []; - } else if (indexOf(seen, obj) >= 0) { - return '[Circular]'; - } - function inspect(value, from, noIndent) { - if (from) { - seen = $arrSlice.call(seen); - seen.push(from); - } - if (noIndent) { - var newOpts = { - depth: opts.depth - }; - if (has(opts, 'quoteStyle')) { - newOpts.quoteStyle = opts.quoteStyle; - } - return inspect_(value, newOpts, depth + 1, seen); - } - return inspect_(value, opts, depth + 1, seen); - } - if (typeof obj === 'function' && !isRegExp(obj)) { - // in older engines, regexes are callable - var name = nameOf(obj); - var keys = arrObjKeys(obj, inspect); - return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); - } - if (isSymbol(obj)) { - var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); - return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; - } - if (isElement(obj)) { - var s = '<' + $toLowerCase.call(String(obj.nodeName)); - var attrs = obj.attributes || []; - for (var i = 0; i < attrs.length; i++) { - s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); - } - s += '>'; - if (obj.childNodes && obj.childNodes.length) { - s += '...'; - } - s += ''; - return s; - } - if (isArray(obj)) { - if (obj.length === 0) { - return '[]'; - } - var xs = arrObjKeys(obj, inspect); - if (indent && !singleLineValues(xs)) { - return '[' + indentedJoin(xs, indent) + ']'; - } - return '[ ' + $join.call(xs, ', ') + ' ]'; - } - if (isError(obj)) { - var parts = arrObjKeys(obj, inspect); - if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { - return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; - } - if (parts.length === 0) { - return '[' + String(obj) + ']'; - } - return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; - } - if (typeof obj === 'object' && customInspect) { - if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { - return utilInspect(obj, { - depth: maxDepth - depth - }); - } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { - return obj.inspect(); - } - } - if (isMap(obj)) { - var mapParts = []; - if (mapForEach) { - mapForEach.call(obj, function (value, key) { - mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); - }); - } - return collectionOf('Map', mapSize.call(obj), mapParts, indent); - } - if (isSet(obj)) { - var setParts = []; - if (setForEach) { - setForEach.call(obj, function (value) { - setParts.push(inspect(value, obj)); - }); - } - return collectionOf('Set', setSize.call(obj), setParts, indent); - } - if (isWeakMap(obj)) { - return weakCollectionOf('WeakMap'); - } - if (isWeakSet(obj)) { - return weakCollectionOf('WeakSet'); - } - if (isWeakRef(obj)) { - return weakCollectionOf('WeakRef'); - } - if (isNumber(obj)) { - return markBoxed(inspect(Number(obj))); - } - if (isBigInt(obj)) { - return markBoxed(inspect(bigIntValueOf.call(obj))); - } - if (isBoolean(obj)) { - return markBoxed(booleanValueOf.call(obj)); - } - if (isString(obj)) { - return markBoxed(inspect(String(obj))); - } - if (!isDate(obj) && !isRegExp(obj)) { - var ys = arrObjKeys(obj, inspect); - var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; - var protoTag = obj instanceof Object ? '' : 'null prototype'; - var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; - var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; - var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); - if (ys.length === 0) { - return tag + '{}'; - } - if (indent) { - return tag + '{' + indentedJoin(ys, indent) + '}'; - } - return tag + '{ ' + $join.call(ys, ', ') + ' }'; - } - return String(obj); -}; -function wrapQuotes(s, defaultStyle, opts) { - var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; - return quoteChar + s + quoteChar; -} -function quote(s) { - return $replace.call(String(s), /"/g, '"'); -} -function isArray(obj) { - return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); -} -function isDate(obj) { - return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); -} -function isRegExp(obj) { - return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); -} -function isError(obj) { - return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); -} -function isString(obj) { - return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); -} -function isNumber(obj) { - return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); -} -function isBoolean(obj) { - return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); -} - -// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives -function isSymbol(obj) { - if (hasShammedSymbols) { - return obj && typeof obj === 'object' && obj instanceof Symbol; - } - if (typeof obj === 'symbol') { - return true; - } - if (!obj || typeof obj !== 'object' || !symToString) { - return false; - } - try { - symToString.call(obj); - return true; - } catch (e) {} - return false; -} -function isBigInt(obj) { - if (!obj || typeof obj !== 'object' || !bigIntValueOf) { - return false; - } - try { - bigIntValueOf.call(obj); - return true; - } catch (e) {} - return false; -} -var hasOwn = Object.prototype.hasOwnProperty || function (key) { - return key in this; -}; -function has(obj, key) { - return hasOwn.call(obj, key); -} -function toStr(obj) { - return objectToString.call(obj); -} -function nameOf(f) { - if (f.name) { - return f.name; - } - var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); - if (m) { - return m[1]; - } - return null; -} -function indexOf(xs, x) { - if (xs.indexOf) { - return xs.indexOf(x); - } - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) { - return i; - } - } - return -1; -} -function isMap(x) { - if (!mapSize || !x || typeof x !== 'object') { - return false; - } - try { - mapSize.call(x); - try { - setSize.call(x); - } catch (s) { - return true; - } - return x instanceof Map; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} -function isWeakMap(x) { - if (!weakMapHas || !x || typeof x !== 'object') { - return false; - } - try { - weakMapHas.call(x, weakMapHas); - try { - weakSetHas.call(x, weakSetHas); - } catch (s) { - return true; - } - return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} -function isWeakRef(x) { - if (!weakRefDeref || !x || typeof x !== 'object') { - return false; - } - try { - weakRefDeref.call(x); - return true; - } catch (e) {} - return false; -} -function isSet(x) { - if (!setSize || !x || typeof x !== 'object') { - return false; - } - try { - setSize.call(x); - try { - mapSize.call(x); - } catch (m) { - return true; - } - return x instanceof Set; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} -function isWeakSet(x) { - if (!weakSetHas || !x || typeof x !== 'object') { - return false; - } - try { - weakSetHas.call(x, weakSetHas); - try { - weakMapHas.call(x, weakMapHas); - } catch (s) { - return true; - } - return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} -function isElement(x) { - if (!x || typeof x !== 'object') { - return false; - } - if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { - return true; - } - return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; -} -function inspectString(str, opts) { - if (str.length > opts.maxStringLength) { - var remaining = str.length - opts.maxStringLength; - var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); - return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; - } - // eslint-disable-next-line no-control-regex - var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); - return wrapQuotes(s, 'single', opts); -} -function lowbyte(c) { - var n = c.charCodeAt(0); - var x = { - 8: 'b', - 9: 't', - 10: 'n', - 12: 'f', - 13: 'r' - }[n]; - if (x) { - return '\\' + x; - } - return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); -} -function markBoxed(str) { - return 'Object(' + str + ')'; -} -function weakCollectionOf(type) { - return type + ' { ? }'; -} -function collectionOf(type, size, entries, indent) { - var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); - return type + ' (' + size + ') {' + joinedEntries + '}'; -} -function singleLineValues(xs) { - for (var i = 0; i < xs.length; i++) { - if (indexOf(xs[i], '\n') >= 0) { - return false; - } - } - return true; -} -function getIndent(opts, depth) { - var baseIndent; - if (opts.indent === '\t') { - baseIndent = '\t'; - } else if (typeof opts.indent === 'number' && opts.indent > 0) { - baseIndent = $join.call(Array(opts.indent + 1), ' '); - } else { - return null; - } - return { - base: baseIndent, - prev: $join.call(Array(depth + 1), baseIndent) - }; -} -function indentedJoin(xs, indent) { - if (xs.length === 0) { - return ''; - } - var lineJoiner = '\n' + indent.prev + indent.base; - return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; -} -function arrObjKeys(obj, inspect) { - var isArr = isArray(obj); - var xs = []; - if (isArr) { - xs.length = obj.length; - for (var i = 0; i < obj.length; i++) { - xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; - } - } - var syms = typeof gOPS === 'function' ? gOPS(obj) : []; - var symMap; - if (hasShammedSymbols) { - symMap = {}; - for (var k = 0; k < syms.length; k++) { - symMap['$' + syms[k]] = syms[k]; - } - } - for (var key in obj) { - // eslint-disable-line no-restricted-syntax - if (!has(obj, key)) { - continue; - } // eslint-disable-line no-restricted-syntax, no-continue - if (isArr && String(Number(key)) === key && key < obj.length) { - continue; - } // eslint-disable-line no-restricted-syntax, no-continue - if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { - // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section - continue; // eslint-disable-line no-restricted-syntax, no-continue - } else if ($test.call(/[^\w$]/, key)) { - xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); - } else { - xs.push(key + ': ' + inspect(obj[key], obj)); - } - } - if (typeof gOPS === 'function') { - for (var j = 0; j < syms.length; j++) { - if (isEnumerable.call(obj, syms[j])) { - xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); - } - } - } - return xs; -} - -/***/ }), - -/***/ 14375: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -/* provided dependency */ var process = __webpack_require__(71624); -// 'path' module extracted from Node.js v8.11.1 (only the posix part) -// transplited with Babel - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -function assertPath(path) { - if (typeof path !== 'string') { - throw new TypeError('Path must be a string. Received ' + JSON.stringify(path)); - } -} - -// Resolves . and .. elements in a path with directory names -function normalizeStringPosix(path, allowAboveRoot) { - var res = ''; - var lastSegmentLength = 0; - var lastSlash = -1; - var dots = 0; - var code; - for (var i = 0; i <= path.length; ++i) { - if (i < path.length) code = path.charCodeAt(i);else if (code === 47 /*/*/) break;else code = 47 /*/*/; - if (code === 47 /*/*/) { - if (lastSlash === i - 1 || dots === 1) { - // NOOP - } else if (lastSlash !== i - 1 && dots === 2) { - if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) { - if (res.length > 2) { - var lastSlashIndex = res.lastIndexOf('/'); - if (lastSlashIndex !== res.length - 1) { - if (lastSlashIndex === -1) { - res = ''; - lastSegmentLength = 0; - } else { - res = res.slice(0, lastSlashIndex); - lastSegmentLength = res.length - 1 - res.lastIndexOf('/'); - } - lastSlash = i; - dots = 0; - continue; - } - } else if (res.length === 2 || res.length === 1) { - res = ''; - lastSegmentLength = 0; - lastSlash = i; - dots = 0; - continue; - } - } - if (allowAboveRoot) { - if (res.length > 0) res += '/..';else res = '..'; - lastSegmentLength = 2; - } - } else { - if (res.length > 0) res += '/' + path.slice(lastSlash + 1, i);else res = path.slice(lastSlash + 1, i); - lastSegmentLength = i - lastSlash - 1; - } - lastSlash = i; - dots = 0; - } else if (code === 46 /*.*/ && dots !== -1) { - ++dots; - } else { - dots = -1; - } - } - return res; -} -function _format(sep, pathObject) { - var dir = pathObject.dir || pathObject.root; - var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || ''); - if (!dir) { - return base; - } - if (dir === pathObject.root) { - return dir + base; - } - return dir + sep + base; -} -var posix = { - // path.resolve([from ...], to) - resolve: function resolve() { - var resolvedPath = ''; - var resolvedAbsolute = false; - var cwd; - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path; - if (i >= 0) path = arguments[i];else { - if (cwd === undefined) cwd = process.cwd(); - path = cwd; - } - assertPath(path); - - // Skip empty entries - if (path.length === 0) { - continue; - } - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute); - if (resolvedAbsolute) { - if (resolvedPath.length > 0) return '/' + resolvedPath;else return '/'; - } else if (resolvedPath.length > 0) { - return resolvedPath; - } else { - return '.'; - } - }, - normalize: function normalize(path) { - assertPath(path); - if (path.length === 0) return '.'; - var isAbsolute = path.charCodeAt(0) === 47 /*/*/; - var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/; - - // Normalize the path - path = normalizeStringPosix(path, !isAbsolute); - if (path.length === 0 && !isAbsolute) path = '.'; - if (path.length > 0 && trailingSeparator) path += '/'; - if (isAbsolute) return '/' + path; - return path; - }, - isAbsolute: function isAbsolute(path) { - assertPath(path); - return path.length > 0 && path.charCodeAt(0) === 47 /*/*/; - }, - - join: function join() { - if (arguments.length === 0) return '.'; - var joined; - for (var i = 0; i < arguments.length; ++i) { - var arg = arguments[i]; - assertPath(arg); - if (arg.length > 0) { - if (joined === undefined) joined = arg;else joined += '/' + arg; - } - } - if (joined === undefined) return '.'; - return posix.normalize(joined); - }, - relative: function relative(from, to) { - assertPath(from); - assertPath(to); - if (from === to) return ''; - from = posix.resolve(from); - to = posix.resolve(to); - if (from === to) return ''; - - // Trim any leading backslashes - var fromStart = 1; - for (; fromStart < from.length; ++fromStart) { - if (from.charCodeAt(fromStart) !== 47 /*/*/) break; - } - var fromEnd = from.length; - var fromLen = fromEnd - fromStart; - - // Trim any leading backslashes - var toStart = 1; - for (; toStart < to.length; ++toStart) { - if (to.charCodeAt(toStart) !== 47 /*/*/) break; - } - var toEnd = to.length; - var toLen = toEnd - toStart; - - // Compare paths to find the longest common path from root - var length = fromLen < toLen ? fromLen : toLen; - var lastCommonSep = -1; - var i = 0; - for (; i <= length; ++i) { - if (i === length) { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === 47 /*/*/) { - // We get here if `from` is the exact base path for `to`. - // For example: from='/foo/bar'; to='/foo/bar/baz' - return to.slice(toStart + i + 1); - } else if (i === 0) { - // We get here if `from` is the root - // For example: from='/'; to='/foo' - return to.slice(toStart + i); - } - } else if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === 47 /*/*/) { - // We get here if `to` is the exact base path for `from`. - // For example: from='/foo/bar/baz'; to='/foo/bar' - lastCommonSep = i; - } else if (i === 0) { - // We get here if `to` is the root. - // For example: from='/foo'; to='/' - lastCommonSep = 0; - } - } - break; - } - var fromCode = from.charCodeAt(fromStart + i); - var toCode = to.charCodeAt(toStart + i); - if (fromCode !== toCode) break;else if (fromCode === 47 /*/*/) lastCommonSep = i; - } - var out = ''; - // Generate the relative path based on the path difference between `to` - // and `from` - for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { - if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) { - if (out.length === 0) out += '..';else out += '/..'; - } - } - - // Lastly, append the rest of the destination (`to`) path that comes after - // the common path parts - if (out.length > 0) return out + to.slice(toStart + lastCommonSep);else { - toStart += lastCommonSep; - if (to.charCodeAt(toStart) === 47 /*/*/) ++toStart; - return to.slice(toStart); - } - }, - _makeLong: function _makeLong(path) { - return path; - }, - dirname: function dirname(path) { - assertPath(path); - if (path.length === 0) return '.'; - var code = path.charCodeAt(0); - var hasRoot = code === 47 /*/*/; - var end = -1; - var matchedSlash = true; - for (var i = path.length - 1; i >= 1; --i) { - code = path.charCodeAt(i); - if (code === 47 /*/*/) { - if (!matchedSlash) { - end = i; - break; - } - } else { - // We saw the first non-path separator - matchedSlash = false; - } - } - if (end === -1) return hasRoot ? '/' : '.'; - if (hasRoot && end === 1) return '//'; - return path.slice(0, end); - }, - basename: function basename(path, ext) { - if (ext !== undefined && typeof ext !== 'string') throw new TypeError('"ext" argument must be a string'); - assertPath(path); - var start = 0; - var end = -1; - var matchedSlash = true; - var i; - if (ext !== undefined && ext.length > 0 && ext.length <= path.length) { - if (ext.length === path.length && ext === path) return ''; - var extIdx = ext.length - 1; - var firstNonSlashEnd = -1; - for (i = path.length - 1; i >= 0; --i) { - var code = path.charCodeAt(i); - if (code === 47 /*/*/) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } else { - if (firstNonSlashEnd === -1) { - // We saw the first non-path separator, remember this index in case - // we need it if the extension ends up not matching - matchedSlash = false; - firstNonSlashEnd = i + 1; - } - if (extIdx >= 0) { - // Try to match the explicit extension - if (code === ext.charCodeAt(extIdx)) { - if (--extIdx === -1) { - // We matched the extension, so mark this as the end of our path - // component - end = i; - } - } else { - // Extension does not match, so our result is the entire path - // component - extIdx = -1; - end = firstNonSlashEnd; - } - } - } - } - if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length; - return path.slice(start, end); - } else { - for (i = path.length - 1; i >= 0; --i) { - if (path.charCodeAt(i) === 47 /*/*/) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } else if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // path component - matchedSlash = false; - end = i + 1; - } - } - if (end === -1) return ''; - return path.slice(start, end); - } - }, - extname: function extname(path) { - assertPath(path); - var startDot = -1; - var startPart = 0; - var end = -1; - var matchedSlash = true; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - var preDotState = 0; - for (var i = path.length - 1; i >= 0; --i) { - var code = path.charCodeAt(i); - if (code === 47 /*/*/) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === 46 /*.*/) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - if (startDot === -1 || end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - return ''; - } - return path.slice(startDot, end); - }, - format: function format(pathObject) { - if (pathObject === null || typeof pathObject !== 'object') { - throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject); - } - return _format('/', pathObject); - }, - parse: function parse(path) { - assertPath(path); - var ret = { - root: '', - dir: '', - base: '', - ext: '', - name: '' - }; - if (path.length === 0) return ret; - var code = path.charCodeAt(0); - var isAbsolute = code === 47 /*/*/; - var start; - if (isAbsolute) { - ret.root = '/'; - start = 1; - } else { - start = 0; - } - var startDot = -1; - var startPart = 0; - var end = -1; - var matchedSlash = true; - var i = path.length - 1; - - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - var preDotState = 0; - - // Get non-dir info - for (; i >= start; --i) { - code = path.charCodeAt(i); - if (code === 47 /*/*/) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === 46 /*.*/) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - if (startDot === -1 || end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - if (end !== -1) { - if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end); - } - } else { - if (startPart === 0 && isAbsolute) { - ret.name = path.slice(1, startDot); - ret.base = path.slice(1, end); - } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - } - ret.ext = path.slice(startDot, end); - } - if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/'; - return ret; - }, - sep: '/', - delimiter: ':', - win32: null, - posix: null -}; -posix.posix = posix; -module.exports = posix; - -/***/ }), - -/***/ 71624: -/***/ ((module) => { - -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout() { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -})(); -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - var len = queue.length; - while (len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; -function noop() {} -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; -process.listeners = function (name) { - return []; -}; -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; -process.cwd = function () { - return '/'; -}; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function () { - return 0; -}; - -/***/ }), - -/***/ 43277: -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ decode: () => (/* binding */ decode), -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), -/* harmony export */ encode: () => (/* binding */ encode), -/* harmony export */ toASCII: () => (/* binding */ toASCII), -/* harmony export */ toUnicode: () => (/* binding */ toUnicode), -/* harmony export */ ucs2decode: () => (/* binding */ ucs2decode), -/* harmony export */ ucs2encode: () => (/* binding */ ucs2encode) -/* harmony export */ }); - - -/** Highest positive signed 32-bit float value */ -const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -const base = 36; -const tMin = 1; -const tMax = 26; -const skew = 38; -const damp = 700; -const initialBias = 72; -const initialN = 128; // 0x80 -const delimiter = '-'; // '\x2D' - -/** Regular expressions */ -const regexPunycode = /^xn--/; -const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. -const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -const errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -const baseMinusTMin = base - tMin; -const floor = Math.floor; -const stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, callback) { - const result = []; - let length = array.length; - while (length--) { - result[length] = callback(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {String} A new string of characters returned by the callback - * function. - */ -function mapDomain(domain, callback) { - const parts = domain.split('@'); - let result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - domain = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - domain = domain.replace(regexSeparators, '\x2E'); - const labels = domain.split('.'); - const encoded = map(labels, callback).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - const output = []; - let counter = 0; - const length = string.length; - while (counter < length) { - const value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - const extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { - // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -const ucs2encode = codePoints => String.fromCodePoint(...codePoints); - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -const basicToDigit = function (codePoint) { - if (codePoint >= 0x30 && codePoint < 0x3A) { - return 26 + (codePoint - 0x30); - } - if (codePoint >= 0x41 && codePoint < 0x5B) { - return codePoint - 0x41; - } - if (codePoint >= 0x61 && codePoint < 0x7B) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -const digitToBasic = function (digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -const adapt = function (delta, numPoints, firstTime) { - let k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for /* no initialization */ - (; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -const decode = function (input) { - // Don't use UCS-2. - const output = []; - const inputLength = input.length; - let i = 0; - let n = initialN; - let bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - let basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - for (let j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for /* no final expression */ - (let index = basic > 0 ? basic + 1 : 0; index < inputLength;) { - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - const oldi = i; - for /* no condition */ - (let w = 1, k = base;; k += base) { - if (index >= inputLength) { - error('invalid-input'); - } - const digit = basicToDigit(input.charCodeAt(index++)); - if (digit >= base) { - error('invalid-input'); - } - if (digit > floor((maxInt - i) / w)) { - error('overflow'); - } - i += digit * w; - const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (digit < t) { - break; - } - const baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - w *= baseMinusT; - } - const out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - } - return String.fromCodePoint(...output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -const encode = function (input) { - const output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - const inputLength = input.length; - - // Initialize the state. - let n = initialN; - let delta = 0; - let bias = initialBias; - - // Handle the basic code points. - for (const currentValue of input) { - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - const basicLength = output.length; - let handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - // All non-basic code points < n have been handled already. Find the next - // larger one: - let m = maxInt; - for (const currentValue of input) { - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - const handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - delta += (m - n) * handledCPCountPlusOne; - n = m; - for (const currentValue of input) { - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - if (currentValue === n) { - // Represent delta as a generalized variable-length integer. - let q = delta; - for /* no condition */ - (let k = base;; k += base) { - const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (q < t) { - break; - } - const qMinusT = q - t; - const baseMinusT = base - t; - output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); - q = floor(qMinusT / baseMinusT); - } - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); - delta = 0; - ++handledCPCount; - } - } - ++delta; - ++n; - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -const toUnicode = function (input) { - return mapDomain(input, function (string) { - return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -const toASCII = function (input) { - return mapDomain(input, function (string) { - return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -const punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.1.0', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (punycode); - -/***/ }), - -/***/ 43512: -/***/ ((module) => { - -"use strict"; - - -var replace = String.prototype.replace; -var percentTwenties = /%20/g; -var Format = { - RFC1738: 'RFC1738', - RFC3986: 'RFC3986' -}; -module.exports = { - 'default': Format.RFC3986, - formatters: { - RFC1738: function (value) { - return replace.call(value, percentTwenties, '+'); - }, - RFC3986: function (value) { - return String(value); - } - }, - RFC1738: Format.RFC1738, - RFC3986: Format.RFC3986 -}; - -/***/ }), - -/***/ 349: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var stringify = __webpack_require__(74082); -var parse = __webpack_require__(48169); -var formats = __webpack_require__(43512); -module.exports = { - formats: formats, - parse: parse, - stringify: stringify -}; - -/***/ }), - -/***/ 48169: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var utils = __webpack_require__(40775); -var has = Object.prototype.hasOwnProperty; -var isArray = Array.isArray; -var defaults = { - allowDots: false, - allowPrototypes: false, - allowSparse: false, - arrayLimit: 20, - charset: 'utf-8', - charsetSentinel: false, - comma: false, - decoder: utils.decode, - delimiter: '&', - depth: 5, - ignoreQueryPrefix: false, - interpretNumericEntities: false, - parameterLimit: 1000, - parseArrays: true, - plainObjects: false, - strictNullHandling: false -}; -var interpretNumericEntities = function (str) { - return str.replace(/&#(\d+);/g, function ($0, numberStr) { - return String.fromCharCode(parseInt(numberStr, 10)); - }); -}; -var parseArrayValue = function (val, options) { - if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) { - return val.split(','); - } - return val; -}; - -// This is what browsers will submit when the ✓ character occurs in an -// application/x-www-form-urlencoded body and the encoding of the page containing -// the form is iso-8859-1, or when the submitted form has an accept-charset -// attribute of iso-8859-1. Presumably also with other charsets that do not contain -// the ✓ character, such as us-ascii. -var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') - -// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. -var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') - -var parseValues = function parseQueryStringValues(str, options) { - var obj = { - __proto__: null - }; - var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; - var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; - var parts = cleanStr.split(options.delimiter, limit); - var skipIndex = -1; // Keep track of where the utf8 sentinel was found - var i; - var charset = options.charset; - if (options.charsetSentinel) { - for (i = 0; i < parts.length; ++i) { - if (parts[i].indexOf('utf8=') === 0) { - if (parts[i] === charsetSentinel) { - charset = 'utf-8'; - } else if (parts[i] === isoSentinel) { - charset = 'iso-8859-1'; - } - skipIndex = i; - i = parts.length; // The eslint settings do not allow break; - } - } - } - - for (i = 0; i < parts.length; ++i) { - if (i === skipIndex) { - continue; - } - var part = parts[i]; - var bracketEqualsPos = part.indexOf(']='); - var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; - var key, val; - if (pos === -1) { - key = options.decoder(part, defaults.decoder, charset, 'key'); - val = options.strictNullHandling ? null : ''; - } else { - key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); - val = utils.maybeMap(parseArrayValue(part.slice(pos + 1), options), function (encodedVal) { - return options.decoder(encodedVal, defaults.decoder, charset, 'value'); - }); - } - if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { - val = interpretNumericEntities(val); - } - if (part.indexOf('[]=') > -1) { - val = isArray(val) ? [val] : val; - } - if (has.call(obj, key)) { - obj[key] = utils.combine(obj[key], val); - } else { - obj[key] = val; - } - } - return obj; -}; -var parseObject = function (chain, val, options, valuesParsed) { - var leaf = valuesParsed ? val : parseArrayValue(val, options); - for (var i = chain.length - 1; i >= 0; --i) { - var obj; - var root = chain[i]; - if (root === '[]' && options.parseArrays) { - obj = [].concat(leaf); - } else { - obj = options.plainObjects ? Object.create(null) : {}; - var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; - var index = parseInt(cleanRoot, 10); - if (!options.parseArrays && cleanRoot === '') { - obj = { - 0: leaf - }; - } else if (!isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && options.parseArrays && index <= options.arrayLimit) { - obj = []; - obj[index] = leaf; - } else if (cleanRoot !== '__proto__') { - obj[cleanRoot] = leaf; - } - } - leaf = obj; - } - return leaf; -}; -var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { - if (!givenKey) { - return; - } - - // Transform dot notation to bracket notation - var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; - - // The regex chunks - - var brackets = /(\[[^[\]]*])/; - var child = /(\[[^[\]]*])/g; - - // Get the parent - - var segment = options.depth > 0 && brackets.exec(key); - var parent = segment ? key.slice(0, segment.index) : key; - - // Stash the parent if it exists - - var keys = []; - if (parent) { - // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties - if (!options.plainObjects && has.call(Object.prototype, parent)) { - if (!options.allowPrototypes) { - return; - } - } - keys.push(parent); - } - - // Loop through children appending to the array until we hit depth - - var i = 0; - while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { - i += 1; - if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { - if (!options.allowPrototypes) { - return; - } - } - keys.push(segment[1]); - } - - // If there's a remainder, just add whatever is left - - if (segment) { - keys.push('[' + key.slice(segment.index) + ']'); - } - return parseObject(keys, val, options, valuesParsed); -}; -var normalizeParseOptions = function normalizeParseOptions(opts) { - if (!opts) { - return defaults; - } - if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') { - throw new TypeError('Decoder has to be a function.'); - } - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); - } - var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; - return { - allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, - allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, - allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse, - arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, - decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, - delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, - // eslint-disable-next-line no-implicit-coercion, no-extra-parens - depth: typeof opts.depth === 'number' || opts.depth === false ? +opts.depth : defaults.depth, - ignoreQueryPrefix: opts.ignoreQueryPrefix === true, - interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, - parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, - parseArrays: opts.parseArrays !== false, - plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling - }; -}; -module.exports = function (str, opts) { - var options = normalizeParseOptions(opts); - if (str === '' || str === null || typeof str === 'undefined') { - return options.plainObjects ? Object.create(null) : {}; - } - var tempObj = typeof str === 'string' ? parseValues(str, options) : str; - var obj = options.plainObjects ? Object.create(null) : {}; - - // Iterate over the keys and setup the new object - - var keys = Object.keys(tempObj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); - obj = utils.merge(obj, newObj, options); - } - if (options.allowSparse === true) { - return obj; - } - return utils.compact(obj); -}; - -/***/ }), - -/***/ 74082: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var getSideChannel = __webpack_require__(67546); -var utils = __webpack_require__(40775); -var formats = __webpack_require__(43512); -var has = Object.prototype.hasOwnProperty; -var arrayPrefixGenerators = { - brackets: function brackets(prefix) { - return prefix + '[]'; - }, - comma: 'comma', - indices: function indices(prefix, key) { - return prefix + '[' + key + ']'; - }, - repeat: function repeat(prefix) { - return prefix; - } -}; -var isArray = Array.isArray; -var push = Array.prototype.push; -var pushToArray = function (arr, valueOrArray) { - push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); -}; -var toISO = Date.prototype.toISOString; -var defaultFormat = formats['default']; -var defaults = { - addQueryPrefix: false, - allowDots: false, - charset: 'utf-8', - charsetSentinel: false, - delimiter: '&', - encode: true, - encoder: utils.encode, - encodeValuesOnly: false, - format: defaultFormat, - formatter: formats.formatters[defaultFormat], - // deprecated - indices: false, - serializeDate: function serializeDate(date) { - return toISO.call(date); - }, - skipNulls: false, - strictNullHandling: false -}; -var isNonNullishPrimitive = function isNonNullishPrimitive(v) { - return typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean' || typeof v === 'symbol' || typeof v === 'bigint'; -}; -var sentinel = {}; -var stringify = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) { - var obj = object; - var tmpSc = sideChannel; - var step = 0; - var findFlag = false; - while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { - // Where object last appeared in the ref tree - var pos = tmpSc.get(object); - step += 1; - if (typeof pos !== 'undefined') { - if (pos === step) { - throw new RangeError('Cyclic object value'); - } else { - findFlag = true; // Break while - } - } - - if (typeof tmpSc.get(sentinel) === 'undefined') { - step = 0; - } - } - if (typeof filter === 'function') { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = serializeDate(obj); - } else if (generateArrayPrefix === 'comma' && isArray(obj)) { - obj = utils.maybeMap(obj, function (value) { - if (value instanceof Date) { - return serializeDate(value); - } - return value; - }); - } - if (obj === null) { - if (strictNullHandling) { - return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix; - } - obj = ''; - } - if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { - if (encoder) { - var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format); - return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))]; - } - return [formatter(prefix) + '=' + formatter(String(obj))]; - } - var values = []; - if (typeof obj === 'undefined') { - return values; - } - var objKeys; - if (generateArrayPrefix === 'comma' && isArray(obj)) { - // we need to join elements in - if (encodeValuesOnly && encoder) { - obj = utils.maybeMap(obj, encoder); - } - objKeys = [{ - value: obj.length > 0 ? obj.join(',') || null : void undefined - }]; - } else if (isArray(filter)) { - objKeys = filter; - } else { - var keys = Object.keys(obj); - objKeys = sort ? keys.sort(sort) : keys; - } - var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix; - for (var j = 0; j < objKeys.length; ++j) { - var key = objKeys[j]; - var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key]; - if (skipNulls && value === null) { - continue; - } - var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']'); - sideChannel.set(object, step); - var valueSideChannel = getSideChannel(); - valueSideChannel.set(sentinel, sideChannel); - pushToArray(values, stringify(value, keyPrefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel)); - } - return values; -}; -var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { - if (!opts) { - return defaults; - } - if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') { - throw new TypeError('Encoder has to be a function.'); - } - var charset = opts.charset || defaults.charset; - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); - } - var format = formats['default']; - if (typeof opts.format !== 'undefined') { - if (!has.call(formats.formatters, opts.format)) { - throw new TypeError('Unknown format option provided.'); - } - format = opts.format; - } - var formatter = formats.formatters[format]; - var filter = defaults.filter; - if (typeof opts.filter === 'function' || isArray(opts.filter)) { - filter = opts.filter; - } - return { - addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, - allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, - encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, - encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, - encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, - filter: filter, - format: format, - formatter: formatter, - serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, - skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, - sort: typeof opts.sort === 'function' ? opts.sort : null, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling - }; -}; -module.exports = function (object, opts) { - var obj = object; - var options = normalizeStringifyOptions(opts); - var objKeys; - var filter; - if (typeof options.filter === 'function') { - filter = options.filter; - obj = filter('', obj); - } else if (isArray(options.filter)) { - filter = options.filter; - objKeys = filter; - } - var keys = []; - if (typeof obj !== 'object' || obj === null) { - return ''; - } - var arrayFormat; - if (opts && opts.arrayFormat in arrayPrefixGenerators) { - arrayFormat = opts.arrayFormat; - } else if (opts && 'indices' in opts) { - arrayFormat = opts.indices ? 'indices' : 'repeat'; - } else { - arrayFormat = 'indices'; - } - var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; - if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') { - throw new TypeError('`commaRoundTrip` must be a boolean, or absent'); - } - var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip; - if (!objKeys) { - objKeys = Object.keys(obj); - } - if (options.sort) { - objKeys.sort(options.sort); - } - var sideChannel = getSideChannel(); - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - if (options.skipNulls && obj[key] === null) { - continue; - } - pushToArray(keys, stringify(obj[key], key, generateArrayPrefix, commaRoundTrip, options.strictNullHandling, options.skipNulls, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel)); - } - var joined = keys.join(options.delimiter); - var prefix = options.addQueryPrefix === true ? '?' : ''; - if (options.charsetSentinel) { - if (options.charset === 'iso-8859-1') { - // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark - prefix += 'utf8=%26%2310003%3B&'; - } else { - // encodeURIComponent('✓') - prefix += 'utf8=%E2%9C%93&'; - } - } - return joined.length > 0 ? prefix + joined : ''; -}; - -/***/ }), - -/***/ 40775: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var formats = __webpack_require__(43512); -var has = Object.prototype.hasOwnProperty; -var isArray = Array.isArray; -var hexTable = function () { - var array = []; - for (var i = 0; i < 256; ++i) { - array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); - } - return array; -}(); -var compactQueue = function compactQueue(queue) { - while (queue.length > 1) { - var item = queue.pop(); - var obj = item.obj[item.prop]; - if (isArray(obj)) { - var compacted = []; - for (var j = 0; j < obj.length; ++j) { - if (typeof obj[j] !== 'undefined') { - compacted.push(obj[j]); - } - } - item.obj[item.prop] = compacted; - } - } -}; -var arrayToObject = function arrayToObject(source, options) { - var obj = options && options.plainObjects ? Object.create(null) : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; - } - } - return obj; -}; -var merge = function merge(target, source, options) { - /* eslint no-param-reassign: 0 */ - if (!source) { - return target; - } - if (typeof source !== 'object') { - if (isArray(target)) { - target.push(source); - } else if (target && typeof target === 'object') { - if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) { - target[source] = true; - } - } else { - return [target, source]; - } - return target; - } - if (!target || typeof target !== 'object') { - return [target].concat(source); - } - var mergeTarget = target; - if (isArray(target) && !isArray(source)) { - mergeTarget = arrayToObject(target, options); - } - if (isArray(target) && isArray(source)) { - source.forEach(function (item, i) { - if (has.call(target, i)) { - var targetItem = target[i]; - if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { - target[i] = merge(targetItem, item, options); - } else { - target.push(item); - } - } else { - target[i] = item; - } - }); - return target; - } - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; - if (has.call(acc, key)) { - acc[key] = merge(acc[key], value, options); - } else { - acc[key] = value; - } - return acc; - }, mergeTarget); -}; -var assign = function assignSingleSource(target, source) { - return Object.keys(source).reduce(function (acc, key) { - acc[key] = source[key]; - return acc; - }, target); -}; -var decode = function (str, decoder, charset) { - var strWithoutPlus = str.replace(/\+/g, ' '); - if (charset === 'iso-8859-1') { - // unescape never throws, no try...catch needed: - return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); - } - // utf-8 - try { - return decodeURIComponent(strWithoutPlus); - } catch (e) { - return strWithoutPlus; - } -}; -var encode = function encode(str, defaultEncoder, charset, kind, format) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } - var string = str; - if (typeof str === 'symbol') { - string = Symbol.prototype.toString.call(str); - } else if (typeof str !== 'string') { - string = String(str); - } - if (charset === 'iso-8859-1') { - return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { - return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; - }); - } - var out = ''; - for (var i = 0; i < string.length; ++i) { - var c = string.charCodeAt(i); - if (c === 0x2D // - - || c === 0x2E // . - || c === 0x5F // _ - || c === 0x7E // ~ - || c >= 0x30 && c <= 0x39 // 0-9 - || c >= 0x41 && c <= 0x5A // a-z - || c >= 0x61 && c <= 0x7A // A-Z - || format === formats.RFC1738 && (c === 0x28 || c === 0x29) // ( ) - ) { - out += string.charAt(i); - continue; - } - if (c < 0x80) { - out = out + hexTable[c]; - continue; - } - if (c < 0x800) { - out = out + (hexTable[0xC0 | c >> 6] + hexTable[0x80 | c & 0x3F]); - continue; - } - if (c < 0xD800 || c >= 0xE000) { - out = out + (hexTable[0xE0 | c >> 12] + hexTable[0x80 | c >> 6 & 0x3F] + hexTable[0x80 | c & 0x3F]); - continue; - } - i += 1; - c = 0x10000 + ((c & 0x3FF) << 10 | string.charCodeAt(i) & 0x3FF); - /* eslint operator-linebreak: [2, "before"] */ - out += hexTable[0xF0 | c >> 18] + hexTable[0x80 | c >> 12 & 0x3F] + hexTable[0x80 | c >> 6 & 0x3F] + hexTable[0x80 | c & 0x3F]; - } - return out; -}; -var compact = function compact(value) { - var queue = [{ - obj: { - o: value - }, - prop: 'o' - }]; - var refs = []; - for (var i = 0; i < queue.length; ++i) { - var item = queue[i]; - var obj = item.obj[item.prop]; - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - var val = obj[key]; - if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { - queue.push({ - obj: obj, - prop: key - }); - refs.push(val); - } - } - } - compactQueue(queue); - return value; -}; -var isRegExp = function isRegExp(obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; -var isBuffer = function isBuffer(obj) { - if (!obj || typeof obj !== 'object') { - return false; - } - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; -var combine = function combine(a, b) { - return [].concat(a, b); -}; -var maybeMap = function maybeMap(val, fn) { - if (isArray(val)) { - var mapped = []; - for (var i = 0; i < val.length; i += 1) { - mapped.push(fn(val[i])); - } - return mapped; - } - return fn(val); -}; -module.exports = { - arrayToObject: arrayToObject, - assign: assign, - combine: combine, - compact: compact, - decode: decode, - encode: encode, - isBuffer: isBuffer, - isRegExp: isRegExp, - maybeMap: maybeMap, - merge: merge -}; - -/***/ }), - -/***/ 67546: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(55050); -var callBound = __webpack_require__(3737); -var inspect = __webpack_require__(87676); -var $TypeError = GetIntrinsic('%TypeError%'); -var $WeakMap = GetIntrinsic('%WeakMap%', true); -var $Map = GetIntrinsic('%Map%', true); -var $weakMapGet = callBound('WeakMap.prototype.get', true); -var $weakMapSet = callBound('WeakMap.prototype.set', true); -var $weakMapHas = callBound('WeakMap.prototype.has', true); -var $mapGet = callBound('Map.prototype.get', true); -var $mapSet = callBound('Map.prototype.set', true); -var $mapHas = callBound('Map.prototype.has', true); - -/* - * This function traverses the list returning the node corresponding to the - * given key. - * - * That node is also moved to the head of the list, so that if it's accessed - * again we don't need to traverse the whole list. By doing so, all the recently - * used nodes can be accessed relatively quickly. - */ -var listGetNode = function (list, key) { - // eslint-disable-line consistent-return - for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) { - if (curr.key === key) { - prev.next = curr.next; - curr.next = list.next; - list.next = curr; // eslint-disable-line no-param-reassign - return curr; - } - } -}; -var listGet = function (objects, key) { - var node = listGetNode(objects, key); - return node && node.value; -}; -var listSet = function (objects, key, value) { - var node = listGetNode(objects, key); - if (node) { - node.value = value; - } else { - // Prepend the new node to the beginning of the list - objects.next = { - // eslint-disable-line no-param-reassign - key: key, - next: objects.next, - value: value - }; - } -}; -var listHas = function (objects, key) { - return !!listGetNode(objects, key); -}; -module.exports = function getSideChannel() { - var $wm; - var $m; - var $o; - var channel = { - assert: function (key) { - if (!channel.has(key)) { - throw new $TypeError('Side channel does not contain ' + inspect(key)); - } - }, - get: function (key) { - // eslint-disable-line consistent-return - if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { - if ($wm) { - return $weakMapGet($wm, key); - } - } else if ($Map) { - if ($m) { - return $mapGet($m, key); - } - } else { - if ($o) { - // eslint-disable-line no-lonely-if - return listGet($o, key); - } - } - }, - has: function (key) { - if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { - if ($wm) { - return $weakMapHas($wm, key); - } - } else if ($Map) { - if ($m) { - return $mapHas($m, key); - } - } else { - if ($o) { - // eslint-disable-line no-lonely-if - return listHas($o, key); - } - } - return false; - }, - set: function (key, value) { - if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { - if (!$wm) { - $wm = new $WeakMap(); - } - $weakMapSet($wm, key, value); - } else if ($Map) { - if (!$m) { - $m = new $Map(); - } - $mapSet($m, key, value); - } else { - if (!$o) { - /* - * Initialize the linked list as an empty node, so that we don't have - * to special-case handling of the first node: we can always refer to - * it as (previous node).next, instead of something like (list).head - */ - $o = { - key: {}, - next: null - }; - } - listSet($o, key, value); - } - } - }; - return channel; -}; - -/***/ }), - -/***/ 69573: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; -/* - * Copyright Joyent, Inc. and other Node contributors. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to permit - * persons to whom the Software is furnished to do so, subject to the - * following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - - -var punycode = __webpack_require__(43277); -function Url() { - this.protocol = null; - this.slashes = null; - this.auth = null; - this.host = null; - this.port = null; - this.hostname = null; - this.hash = null; - this.search = null; - this.query = null; - this.pathname = null; - this.path = null; - this.href = null; -} - -// Reference: RFC 3986, RFC 1808, RFC 2396 - -/* - * define these here so at least they only have to be - * compiled once on the first module load. - */ -var protocolPattern = /^([a-z0-9.+-]+:)/i, - portPattern = /:[0-9]*$/, - // Special case for a simple path URL - simplePathPattern = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, - /* - * RFC 2396: characters reserved for delimiting URLs. - * We actually just auto-escape these. - */ - delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], - // RFC 2396: characters not allowed for various reasons. - unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), - // Allowed by RFCs, but cause of XSS attacks. Always escape these. - autoEscape = ['\''].concat(unwise), - /* - * Characters that are never ever allowed in a hostname. - * Note that any invalid chars are also handled, but these - * are the ones that are *expected* to be seen, so we fast-path - * them. - */ - nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), - hostEndingChars = ['/', '?', '#'], - hostnameMaxLen = 255, - hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, - hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, - // protocols that can allow "unsafe" and "unwise" chars. - unsafeProtocol = { - javascript: true, - 'javascript:': true - }, - // protocols that never have a hostname. - hostlessProtocol = { - javascript: true, - 'javascript:': true - }, - // protocols that always contain a // bit. - slashedProtocol = { - http: true, - https: true, - ftp: true, - gopher: true, - file: true, - 'http:': true, - 'https:': true, - 'ftp:': true, - 'gopher:': true, - 'file:': true - }, - querystring = __webpack_require__(349); -function urlParse(url, parseQueryString, slashesDenoteHost) { - if (url && typeof url === 'object' && url instanceof Url) { - return url; - } - var u = new Url(); - u.parse(url, parseQueryString, slashesDenoteHost); - return u; -} -Url.prototype.parse = function (url, parseQueryString, slashesDenoteHost) { - if (typeof url !== 'string') { - throw new TypeError("Parameter 'url' must be a string, not " + typeof url); - } - - /* - * Copy chrome, IE, opera backslash-handling behavior. - * Back slashes before the query string get converted to forward slashes - * See: https://code.google.com/p/chromium/issues/detail?id=25916 - */ - var queryIndex = url.indexOf('?'), - splitter = queryIndex !== -1 && queryIndex < url.indexOf('#') ? '?' : '#', - uSplit = url.split(splitter), - slashRegex = /\\/g; - uSplit[0] = uSplit[0].replace(slashRegex, '/'); - url = uSplit.join(splitter); - var rest = url; - - /* - * trim before proceeding. - * This is to support parse stuff like " http://foo.com \n" - */ - rest = rest.trim(); - if (!slashesDenoteHost && url.split('#').length === 1) { - // Try fast path regexp - var simplePath = simplePathPattern.exec(rest); - if (simplePath) { - this.path = rest; - this.href = rest; - this.pathname = simplePath[1]; - if (simplePath[2]) { - this.search = simplePath[2]; - if (parseQueryString) { - this.query = querystring.parse(this.search.substr(1)); - } else { - this.query = this.search.substr(1); - } - } else if (parseQueryString) { - this.search = ''; - this.query = {}; - } - return this; - } - } - var proto = protocolPattern.exec(rest); - if (proto) { - proto = proto[0]; - var lowerProto = proto.toLowerCase(); - this.protocol = lowerProto; - rest = rest.substr(proto.length); - } - - /* - * figure out if it's got a host - * user@server is *always* interpreted as a hostname, and url - * resolution will treat //foo/bar as host=foo,path=bar because that's - * how the browser resolves relative URLs. - */ - if (slashesDenoteHost || proto || rest.match(/^\/\/[^@/]+@[^@/]+/)) { - var slashes = rest.substr(0, 2) === '//'; - if (slashes && !(proto && hostlessProtocol[proto])) { - rest = rest.substr(2); - this.slashes = true; - } - } - if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) { - /* - * there's a hostname. - * the first instance of /, ?, ;, or # ends the host. - * - * If there is an @ in the hostname, then non-host chars *are* allowed - * to the left of the last @ sign, unless some host-ending character - * comes *before* the @-sign. - * URLs are obnoxious. - * - * ex: - * http://a@b@c/ => user:a@b host:c - * http://a@b?@c => user:a host:c path:/?@c - */ - - /* - * v0.12 TODO(isaacs): This is not quite how Chrome does things. - * Review our test case against browsers more comprehensively. - */ - - // find the first instance of any hostEndingChars - var hostEnd = -1; - for (var i = 0; i < hostEndingChars.length; i++) { - var hec = rest.indexOf(hostEndingChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { - hostEnd = hec; - } - } - - /* - * at this point, either we have an explicit point where the - * auth portion cannot go past, or the last @ char is the decider. - */ - var auth, atSign; - if (hostEnd === -1) { - // atSign can be anywhere. - atSign = rest.lastIndexOf('@'); - } else { - /* - * atSign must be in auth portion. - * http://a@b/c@d => host:b auth:a path:/c@d - */ - atSign = rest.lastIndexOf('@', hostEnd); - } - - /* - * Now we have a portion which is definitely the auth. - * Pull that off. - */ - if (atSign !== -1) { - auth = rest.slice(0, atSign); - rest = rest.slice(atSign + 1); - this.auth = decodeURIComponent(auth); - } - - // the host is the remaining to the left of the first non-host char - hostEnd = -1; - for (var i = 0; i < nonHostChars.length; i++) { - var hec = rest.indexOf(nonHostChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { - hostEnd = hec; - } - } - // if we still have not hit it, then the entire thing is a host. - if (hostEnd === -1) { - hostEnd = rest.length; - } - this.host = rest.slice(0, hostEnd); - rest = rest.slice(hostEnd); - - // pull out port. - this.parseHost(); - - /* - * we've indicated that there is a hostname, - * so even if it's empty, it has to be present. - */ - this.hostname = this.hostname || ''; - - /* - * if hostname begins with [ and ends with ] - * assume that it's an IPv6 address. - */ - var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']'; - - // validate a little. - if (!ipv6Hostname) { - var hostparts = this.hostname.split(/\./); - for (var i = 0, l = hostparts.length; i < l; i++) { - var part = hostparts[i]; - if (!part) { - continue; - } - if (!part.match(hostnamePartPattern)) { - var newpart = ''; - for (var j = 0, k = part.length; j < k; j++) { - if (part.charCodeAt(j) > 127) { - /* - * we replace non-ASCII char with a temporary placeholder - * we need this to make sure size of hostname is not - * broken by replacing non-ASCII by nothing - */ - newpart += 'x'; - } else { - newpart += part[j]; - } - } - // we test again with ASCII char only - if (!newpart.match(hostnamePartPattern)) { - var validParts = hostparts.slice(0, i); - var notHost = hostparts.slice(i + 1); - var bit = part.match(hostnamePartStart); - if (bit) { - validParts.push(bit[1]); - notHost.unshift(bit[2]); - } - if (notHost.length) { - rest = '/' + notHost.join('.') + rest; - } - this.hostname = validParts.join('.'); - break; - } - } - } - } - if (this.hostname.length > hostnameMaxLen) { - this.hostname = ''; - } else { - // hostnames are always lower case. - this.hostname = this.hostname.toLowerCase(); - } - if (!ipv6Hostname) { - /* - * IDNA Support: Returns a punycoded representation of "domain". - * It only converts parts of the domain name that - * have non-ASCII characters, i.e. it doesn't matter if - * you call it with a domain that already is ASCII-only. - */ - this.hostname = punycode.toASCII(this.hostname); - } - var p = this.port ? ':' + this.port : ''; - var h = this.hostname || ''; - this.host = h + p; - this.href += this.host; - - /* - * strip [ and ] from the hostname - * the host field still retains them, though - */ - if (ipv6Hostname) { - this.hostname = this.hostname.substr(1, this.hostname.length - 2); - if (rest[0] !== '/') { - rest = '/' + rest; - } - } - } - - /* - * now rest is set to the post-host stuff. - * chop off any delim chars. - */ - if (!unsafeProtocol[lowerProto]) { - /* - * First, make 100% sure that any "autoEscape" chars get - * escaped, even if encodeURIComponent doesn't think they - * need to be. - */ - for (var i = 0, l = autoEscape.length; i < l; i++) { - var ae = autoEscape[i]; - if (rest.indexOf(ae) === -1) { - continue; - } - var esc = encodeURIComponent(ae); - if (esc === ae) { - esc = escape(ae); - } - rest = rest.split(ae).join(esc); - } - } - - // chop off from the tail first. - var hash = rest.indexOf('#'); - if (hash !== -1) { - // got a fragment string. - this.hash = rest.substr(hash); - rest = rest.slice(0, hash); - } - var qm = rest.indexOf('?'); - if (qm !== -1) { - this.search = rest.substr(qm); - this.query = rest.substr(qm + 1); - if (parseQueryString) { - this.query = querystring.parse(this.query); - } - rest = rest.slice(0, qm); - } else if (parseQueryString) { - // no query string, but parseQueryString still requested - this.search = ''; - this.query = {}; - } - if (rest) { - this.pathname = rest; - } - if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) { - this.pathname = '/'; - } - - // to support http.request - if (this.pathname || this.search) { - var p = this.pathname || ''; - var s = this.search || ''; - this.path = p + s; - } - - // finally, reconstruct the href based on what has been validated. - this.href = this.format(); - return this; -}; - -// format a parsed object into a url string -function urlFormat(obj) { - /* - * ensure it's an object, and not a string url. - * If it's an obj, this is a no-op. - * this way, you can call url_format() on strings - * to clean up potentially wonky urls. - */ - if (typeof obj === 'string') { - obj = urlParse(obj); - } - if (!(obj instanceof Url)) { - return Url.prototype.format.call(obj); - } - return obj.format(); -} -Url.prototype.format = function () { - var auth = this.auth || ''; - if (auth) { - auth = encodeURIComponent(auth); - auth = auth.replace(/%3A/i, ':'); - auth += '@'; - } - var protocol = this.protocol || '', - pathname = this.pathname || '', - hash = this.hash || '', - host = false, - query = ''; - if (this.host) { - host = auth + this.host; - } else if (this.hostname) { - host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']'); - if (this.port) { - host += ':' + this.port; - } - } - if (this.query && typeof this.query === 'object' && Object.keys(this.query).length) { - query = querystring.stringify(this.query); - } - var search = this.search || query && '?' + query || ''; - if (protocol && protocol.substr(-1) !== ':') { - protocol += ':'; - } - - /* - * only the slashedProtocols get the //. Not mailto:, xmpp:, etc. - * unless they had them to begin with. - */ - if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) { - host = '//' + (host || ''); - if (pathname && pathname.charAt(0) !== '/') { - pathname = '/' + pathname; - } - } else if (!host) { - host = ''; - } - if (hash && hash.charAt(0) !== '#') { - hash = '#' + hash; - } - if (search && search.charAt(0) !== '?') { - search = '?' + search; - } - pathname = pathname.replace(/[?#]/g, function (match) { - return encodeURIComponent(match); - }); - search = search.replace('#', '%23'); - return protocol + host + pathname + search + hash; -}; -function urlResolve(source, relative) { - return urlParse(source, false, true).resolve(relative); -} -Url.prototype.resolve = function (relative) { - return this.resolveObject(urlParse(relative, false, true)).format(); -}; -function urlResolveObject(source, relative) { - if (!source) { - return relative; - } - return urlParse(source, false, true).resolveObject(relative); -} -Url.prototype.resolveObject = function (relative) { - if (typeof relative === 'string') { - var rel = new Url(); - rel.parse(relative, false, true); - relative = rel; - } - var result = new Url(); - var tkeys = Object.keys(this); - for (var tk = 0; tk < tkeys.length; tk++) { - var tkey = tkeys[tk]; - result[tkey] = this[tkey]; - } - - /* - * hash is always overridden, no matter what. - * even href="" will remove it. - */ - result.hash = relative.hash; - - // if the relative url is empty, then there's nothing left to do here. - if (relative.href === '') { - result.href = result.format(); - return result; - } - - // hrefs like //foo/bar always cut to the protocol. - if (relative.slashes && !relative.protocol) { - // take everything except the protocol from relative - var rkeys = Object.keys(relative); - for (var rk = 0; rk < rkeys.length; rk++) { - var rkey = rkeys[rk]; - if (rkey !== 'protocol') { - result[rkey] = relative[rkey]; - } - } - - // urlParse appends trailing / to urls like http://www.example.com - if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) { - result.pathname = '/'; - result.path = result.pathname; - } - result.href = result.format(); - return result; - } - if (relative.protocol && relative.protocol !== result.protocol) { - /* - * if it's a known url protocol, then changing - * the protocol does weird things - * first, if it's not file:, then we MUST have a host, - * and if there was a path - * to begin with, then we MUST have a path. - * if it is file:, then the host is dropped, - * because that's known to be hostless. - * anything else is assumed to be absolute. - */ - if (!slashedProtocol[relative.protocol]) { - var keys = Object.keys(relative); - for (var v = 0; v < keys.length; v++) { - var k = keys[v]; - result[k] = relative[k]; - } - result.href = result.format(); - return result; - } - result.protocol = relative.protocol; - if (!relative.host && !hostlessProtocol[relative.protocol]) { - var relPath = (relative.pathname || '').split('/'); - while (relPath.length && !(relative.host = relPath.shift())) {} - if (!relative.host) { - relative.host = ''; - } - if (!relative.hostname) { - relative.hostname = ''; - } - if (relPath[0] !== '') { - relPath.unshift(''); - } - if (relPath.length < 2) { - relPath.unshift(''); - } - result.pathname = relPath.join('/'); - } else { - result.pathname = relative.pathname; - } - result.search = relative.search; - result.query = relative.query; - result.host = relative.host || ''; - result.auth = relative.auth; - result.hostname = relative.hostname || relative.host; - result.port = relative.port; - // to support http.request - if (result.pathname || result.search) { - var p = result.pathname || ''; - var s = result.search || ''; - result.path = p + s; - } - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; - } - var isSourceAbs = result.pathname && result.pathname.charAt(0) === '/', - isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === '/', - mustEndAbs = isRelAbs || isSourceAbs || result.host && relative.pathname, - removeAllDots = mustEndAbs, - srcPath = result.pathname && result.pathname.split('/') || [], - relPath = relative.pathname && relative.pathname.split('/') || [], - psychotic = result.protocol && !slashedProtocol[result.protocol]; - - /* - * if the url is a non-slashed url, then relative - * links like ../.. should be able - * to crawl up to the hostname, as well. This is strange. - * result.protocol has already been set by now. - * Later on, put the first path part into the host field. - */ - if (psychotic) { - result.hostname = ''; - result.port = null; - if (result.host) { - if (srcPath[0] === '') { - srcPath[0] = result.host; - } else { - srcPath.unshift(result.host); - } - } - result.host = ''; - if (relative.protocol) { - relative.hostname = null; - relative.port = null; - if (relative.host) { - if (relPath[0] === '') { - relPath[0] = relative.host; - } else { - relPath.unshift(relative.host); - } - } - relative.host = null; - } - mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); - } - if (isRelAbs) { - // it's absolute. - result.host = relative.host || relative.host === '' ? relative.host : result.host; - result.hostname = relative.hostname || relative.hostname === '' ? relative.hostname : result.hostname; - result.search = relative.search; - result.query = relative.query; - srcPath = relPath; - // fall through to the dot-handling below. - } else if (relPath.length) { - /* - * it's relative - * throw away the existing file, and take the new path instead. - */ - if (!srcPath) { - srcPath = []; - } - srcPath.pop(); - srcPath = srcPath.concat(relPath); - result.search = relative.search; - result.query = relative.query; - } else if (relative.search != null) { - /* - * just pull out the search. - * like href='?foo'. - * Put this after the other two cases because it simplifies the booleans - */ - if (psychotic) { - result.host = srcPath.shift(); - result.hostname = result.host; - /* - * occationaly the auth can get stuck only in host - * this especially happens in cases like - * url.resolveObject('mailto:local1@domain1', 'local2@domain2') - */ - var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.hostname = authInHost.shift(); - result.host = result.hostname; - } - } - result.search = relative.search; - result.query = relative.query; - // to support http.request - if (result.pathname !== null || result.search !== null) { - result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : ''); - } - result.href = result.format(); - return result; - } - if (!srcPath.length) { - /* - * no path at all. easy. - * we've already handled the other stuff above. - */ - result.pathname = null; - // to support http.request - if (result.search) { - result.path = '/' + result.search; - } else { - result.path = null; - } - result.href = result.format(); - return result; - } - - /* - * if a url ENDs in . or .., then it must get a trailing slash. - * however, if it ends in anything else non-slashy, - * then it must NOT get a trailing slash. - */ - var last = srcPath.slice(-1)[0]; - var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === ''; - - /* - * strip single dots, resolve double dots to parent dir - * if the path tries to go above the root, `up` ends up > 0 - */ - var up = 0; - for (var i = srcPath.length; i >= 0; i--) { - last = srcPath[i]; - if (last === '.') { - srcPath.splice(i, 1); - } else if (last === '..') { - srcPath.splice(i, 1); - up++; - } else if (up) { - srcPath.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (!mustEndAbs && !removeAllDots) { - for (; up--; up) { - srcPath.unshift('..'); - } - } - if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { - srcPath.unshift(''); - } - if (hasTrailingSlash && srcPath.join('/').substr(-1) !== '/') { - srcPath.push(''); - } - var isAbsolute = srcPath[0] === '' || srcPath[0] && srcPath[0].charAt(0) === '/'; - - // put the host back - if (psychotic) { - result.hostname = isAbsolute ? '' : srcPath.length ? srcPath.shift() : ''; - result.host = result.hostname; - /* - * occationaly the auth can get stuck only in host - * this especially happens in cases like - * url.resolveObject('mailto:local1@domain1', 'local2@domain2') - */ - var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.hostname = authInHost.shift(); - result.host = result.hostname; - } - } - mustEndAbs = mustEndAbs || result.host && srcPath.length; - if (mustEndAbs && !isAbsolute) { - srcPath.unshift(''); - } - if (srcPath.length > 0) { - result.pathname = srcPath.join('/'); - } else { - result.pathname = null; - result.path = null; - } - - // to support request.http - if (result.pathname !== null || result.search !== null) { - result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : ''); - } - result.auth = relative.auth || result.auth; - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; -}; -Url.prototype.parseHost = function () { - var host = this.host; - var port = portPattern.exec(host); - if (port) { - port = port[0]; - if (port !== ':') { - this.port = port.substr(1); - } - host = host.substr(0, host.length - port.length); - } - if (host) { - this.hostname = host; - } -}; -exports.parse = urlParse; -exports.resolve = urlResolve; -exports.resolveObject = urlResolveObject; -exports.format = urlFormat; -exports.Url = Url; - -/***/ }), - -/***/ 53260: -/***/ (() => { - -/* (ignored) */ - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/global */ -/******/ (() => { -/******/ __webpack_require__.g = (function() { -/******/ if (typeof globalThis === 'object') return globalThis; -/******/ try { -/******/ return this || new Function('return this')(); -/******/ } catch (e) { -/******/ if (typeof window === 'object') return window; -/******/ } -/******/ })(); -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. -(() => { -"use strict"; - -;// CONCATENATED MODULE: ../../libs/common/src/vault/abstractions/fido2/fido2-client.service.abstraction.ts -const UserRequestedFallbackAbortReason = "UserRequestedFallback"; -/** - * This class represents an abstraction of the WebAuthn Client as described by W3C: - * https://www.w3.org/TR/webauthn-3/#webauthn-client - * - * The WebAuthn Client is an intermediary entity typically implemented in the user agent - * (in whole, or in part). Conceptually, it underlies the Web Authentication API and embodies - * the implementation of the Web Authentication API's operations. - * - * It is responsible for both marshalling the inputs for the underlying authenticator operations, - * and for returning the results of the latter operations to the Web Authentication API's callers. - */ -class Fido2ClientService { -} -/** - * Error thrown when the user requests a fallback to the browser's built-in WebAuthn implementation. - */ -class FallbackRequestedError extends Error { - constructor() { - super("FallbackRequested"); - this.fallbackRequested = true; - } -} - -// EXTERNAL MODULE: ../../node_modules/path-browserify/index.js -var path_browserify = __webpack_require__(14375); -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js -function isFunction_isFunction(value) { - return typeof value === 'function'; -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/isScheduler.js - -function isScheduler(value) { - return value && isFunction_isFunction(value.schedule); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/args.js - - -function last(arr) { - return arr[arr.length - 1]; -} -function popResultSelector(args) { - return isFunction(last(args)) ? args.pop() : undefined; -} -function popScheduler(args) { - return isScheduler(last(args)) ? args.pop() : undefined; -} -function popNumber(args, defaultValue) { - return typeof last(args) === 'number' ? args.pop() : defaultValue; -} -;// CONCATENATED MODULE: ../../node_modules/tslib/tslib.es6.js -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise */ - -var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - }; - return extendStatics(d, b); -}; -function __extends(d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -var __assign = function () { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate(decorators, target, key, desc) { - var c = arguments.length, - r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, - d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param(paramIndex, decorator) { - return function (target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, - key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, - done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { - get: descriptor.get, - set: descriptor.set - } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.push(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.push(_);else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -; -function __runInitializers(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -; -function __propKey(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -; -function __setFunctionName(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { - configurable: true, - value: prefix ? "".concat(prefix, " ", name) : name - }); -} -; -function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator(thisArg, body) { - var _ = { - label: 0, - sent: function () { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { - value: op[1], - done: false - }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -} -var __createBinding = Object.create ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { - enumerable: true, - get: function () { - return m[k]; - } - }; - } - Object.defineProperty(o, k2, desc); -} : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}; -function __exportStar(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); -} -function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, - m = s && o[s], - i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { - value: o && o[i++], - done: !o - }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), - r, - ar = [], - e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error) { - e = { - error: error - }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} - -/** @deprecated */ -function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -} - -/** @deprecated */ -function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; - return r; -} -function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} -function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), - i, - q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function (v) { - return new Promise(function (a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function () { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function (v) { - return (p = !p) ? { - value: __await(o[n](v)), - done: false - } : f ? f(v) : v; - } : f; - } -} -function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], - i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function (v) { - return new Promise(function (resolve, reject) { - v = o[n](v), settle(resolve, reject, v.done, v.value); - }); - }; - } - function settle(resolve, reject, d, v) { - Promise.resolve(v).then(function (v) { - resolve({ - value: v, - done: d - }); - }, reject); - } -} -function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { - value: raw - }); - } else { - cooked.raw = raw; - } - return cooked; -} -; -var __setModuleDefault = Object.create ? function (o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); -} : function (o, v) { - o["default"] = v; -}; -function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -} -function __importDefault(mod) { - return mod && mod.__esModule ? mod : { - default: mod - }; -} -function __classPrivateFieldGet(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js -var isArrayLike = function (x) { - return x && typeof x.length === 'number' && typeof x !== 'function'; -}; -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/isPromise.js - -function isPromise(value) { - return isFunction_isFunction(value === null || value === void 0 ? void 0 : value.then); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js -function createErrorClass(createImpl) { - var _super = function (instance) { - Error.call(instance); - instance.stack = new Error().stack; - }; - var ctorFunc = createImpl(_super); - ctorFunc.prototype = Object.create(Error.prototype); - ctorFunc.prototype.constructor = ctorFunc; - return ctorFunc; -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js - -var UnsubscriptionError = createErrorClass(function (_super) { - return function UnsubscriptionErrorImpl(errors) { - _super(this); - this.message = errors ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { - return i + 1 + ") " + err.toString(); - }).join('\n ') : ''; - this.name = 'UnsubscriptionError'; - this.errors = errors; - }; -}); -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/arrRemove.js -function arrRemove(arr, item) { - if (arr) { - var index = arr.indexOf(item); - 0 <= index && arr.splice(index, 1); - } -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/Subscription.js - - - - -var Subscription = function () { - function Subscription(initialTeardown) { - this.initialTeardown = initialTeardown; - this.closed = false; - this._parentage = null; - this._finalizers = null; - } - Subscription.prototype.unsubscribe = function () { - var e_1, _a, e_2, _b; - var errors; - if (!this.closed) { - this.closed = true; - var _parentage = this._parentage; - if (_parentage) { - this._parentage = null; - if (Array.isArray(_parentage)) { - try { - for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) { - var parent_1 = _parentage_1_1.value; - parent_1.remove(this); - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1); - } finally { - if (e_1) throw e_1.error; - } - } - } else { - _parentage.remove(this); - } - } - var initialFinalizer = this.initialTeardown; - if (isFunction_isFunction(initialFinalizer)) { - try { - initialFinalizer(); - } catch (e) { - errors = e instanceof UnsubscriptionError ? e.errors : [e]; - } - } - var _finalizers = this._finalizers; - if (_finalizers) { - this._finalizers = null; - try { - for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) { - var finalizer = _finalizers_1_1.value; - try { - execFinalizer(finalizer); - } catch (err) { - errors = errors !== null && errors !== void 0 ? errors : []; - if (err instanceof UnsubscriptionError) { - errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors)); - } else { - errors.push(err); - } - } - } - } catch (e_2_1) { - e_2 = { - error: e_2_1 - }; - } finally { - try { - if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1); - } finally { - if (e_2) throw e_2.error; - } - } - } - if (errors) { - throw new UnsubscriptionError(errors); - } - } - }; - Subscription.prototype.add = function (teardown) { - var _a; - if (teardown && teardown !== this) { - if (this.closed) { - execFinalizer(teardown); - } else { - if (teardown instanceof Subscription) { - if (teardown.closed || teardown._hasParent(this)) { - return; - } - teardown._addParent(this); - } - (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown); - } - } - }; - Subscription.prototype._hasParent = function (parent) { - var _parentage = this._parentage; - return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent); - }; - Subscription.prototype._addParent = function (parent) { - var _parentage = this._parentage; - this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; - }; - Subscription.prototype._removeParent = function (parent) { - var _parentage = this._parentage; - if (_parentage === parent) { - this._parentage = null; - } else if (Array.isArray(_parentage)) { - arrRemove(_parentage, parent); - } - }; - Subscription.prototype.remove = function (teardown) { - var _finalizers = this._finalizers; - _finalizers && arrRemove(_finalizers, teardown); - if (teardown instanceof Subscription) { - teardown._removeParent(this); - } - }; - Subscription.EMPTY = function () { - var empty = new Subscription(); - empty.closed = true; - return empty; - }(); - return Subscription; -}(); - -var EMPTY_SUBSCRIPTION = Subscription.EMPTY; -function isSubscription(value) { - return value instanceof Subscription || value && 'closed' in value && isFunction_isFunction(value.remove) && isFunction_isFunction(value.add) && isFunction_isFunction(value.unsubscribe); -} -function execFinalizer(finalizer) { - if (isFunction_isFunction(finalizer)) { - finalizer(); - } else { - finalizer.unsubscribe(); - } -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/config.js -var config = { - onUnhandledError: null, - onStoppedNotification: null, - Promise: undefined, - useDeprecatedSynchronousErrorHandling: false, - useDeprecatedNextContext: false -}; -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js - -var timeoutProvider = { - setTimeout: function (handler, timeout) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - var delegate = timeoutProvider.delegate; - if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { - return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args))); - } - return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args))); - }, - clearTimeout: function (handle) { - var delegate = timeoutProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); - }, - delegate: undefined -}; -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js - - -function reportUnhandledError(err) { - timeoutProvider.setTimeout(function () { - var onUnhandledError = config.onUnhandledError; - if (onUnhandledError) { - onUnhandledError(err); - } else { - throw err; - } - }); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/noop.js -function noop() {} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/NotificationFactories.js -var COMPLETE_NOTIFICATION = function () { - return createNotification('C', undefined, undefined); -}(); -function errorNotification(error) { - return createNotification('E', undefined, error); -} -function nextNotification(value) { - return createNotification('N', value, undefined); -} -function createNotification(kind, value, error) { - return { - kind: kind, - value: value, - error: error - }; -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/errorContext.js - -var context = null; -function errorContext(cb) { - if (config.useDeprecatedSynchronousErrorHandling) { - var isRoot = !context; - if (isRoot) { - context = { - errorThrown: false, - error: null - }; - } - cb(); - if (isRoot) { - var _a = context, - errorThrown = _a.errorThrown, - error = _a.error; - context = null; - if (errorThrown) { - throw error; - } - } - } else { - cb(); - } -} -function captureError(err) { - if (config.useDeprecatedSynchronousErrorHandling && context) { - context.errorThrown = true; - context.error = err; - } -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/Subscriber.js - - - - - - - - - -var Subscriber = function (_super) { - __extends(Subscriber, _super); - function Subscriber(destination) { - var _this = _super.call(this) || this; - _this.isStopped = false; - if (destination) { - _this.destination = destination; - if (isSubscription(destination)) { - destination.add(_this); - } - } else { - _this.destination = EMPTY_OBSERVER; - } - return _this; - } - Subscriber.create = function (next, error, complete) { - return new SafeSubscriber(next, error, complete); - }; - Subscriber.prototype.next = function (value) { - if (this.isStopped) { - handleStoppedNotification(nextNotification(value), this); - } else { - this._next(value); - } - }; - Subscriber.prototype.error = function (err) { - if (this.isStopped) { - handleStoppedNotification(errorNotification(err), this); - } else { - this.isStopped = true; - this._error(err); - } - }; - Subscriber.prototype.complete = function () { - if (this.isStopped) { - handleStoppedNotification(COMPLETE_NOTIFICATION, this); - } else { - this.isStopped = true; - this._complete(); - } - }; - Subscriber.prototype.unsubscribe = function () { - if (!this.closed) { - this.isStopped = true; - _super.prototype.unsubscribe.call(this); - this.destination = null; - } - }; - Subscriber.prototype._next = function (value) { - this.destination.next(value); - }; - Subscriber.prototype._error = function (err) { - try { - this.destination.error(err); - } finally { - this.unsubscribe(); - } - }; - Subscriber.prototype._complete = function () { - try { - this.destination.complete(); - } finally { - this.unsubscribe(); - } - }; - return Subscriber; -}(Subscription); - -var _bind = Function.prototype.bind; -function bind(fn, thisArg) { - return _bind.call(fn, thisArg); -} -var ConsumerObserver = function () { - function ConsumerObserver(partialObserver) { - this.partialObserver = partialObserver; - } - ConsumerObserver.prototype.next = function (value) { - var partialObserver = this.partialObserver; - if (partialObserver.next) { - try { - partialObserver.next(value); - } catch (error) { - handleUnhandledError(error); - } - } - }; - ConsumerObserver.prototype.error = function (err) { - var partialObserver = this.partialObserver; - if (partialObserver.error) { - try { - partialObserver.error(err); - } catch (error) { - handleUnhandledError(error); - } - } else { - handleUnhandledError(err); - } - }; - ConsumerObserver.prototype.complete = function () { - var partialObserver = this.partialObserver; - if (partialObserver.complete) { - try { - partialObserver.complete(); - } catch (error) { - handleUnhandledError(error); - } - } - }; - return ConsumerObserver; -}(); -var SafeSubscriber = function (_super) { - __extends(SafeSubscriber, _super); - function SafeSubscriber(observerOrNext, error, complete) { - var _this = _super.call(this) || this; - var partialObserver; - if (isFunction_isFunction(observerOrNext) || !observerOrNext) { - partialObserver = { - next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined, - error: error !== null && error !== void 0 ? error : undefined, - complete: complete !== null && complete !== void 0 ? complete : undefined - }; - } else { - var context_1; - if (_this && config.useDeprecatedNextContext) { - context_1 = Object.create(observerOrNext); - context_1.unsubscribe = function () { - return _this.unsubscribe(); - }; - partialObserver = { - next: observerOrNext.next && bind(observerOrNext.next, context_1), - error: observerOrNext.error && bind(observerOrNext.error, context_1), - complete: observerOrNext.complete && bind(observerOrNext.complete, context_1) - }; - } else { - partialObserver = observerOrNext; - } - } - _this.destination = new ConsumerObserver(partialObserver); - return _this; - } - return SafeSubscriber; -}(Subscriber); - -function handleUnhandledError(error) { - if (config.useDeprecatedSynchronousErrorHandling) { - captureError(error); - } else { - reportUnhandledError(error); - } -} -function defaultErrorHandler(err) { - throw err; -} -function handleStoppedNotification(notification, subscriber) { - var onStoppedNotification = config.onStoppedNotification; - onStoppedNotification && timeoutProvider.setTimeout(function () { - return onStoppedNotification(notification, subscriber); - }); -} -var EMPTY_OBSERVER = { - closed: true, - next: noop, - error: defaultErrorHandler, - complete: noop -}; -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/symbol/observable.js -var observable = function () { - return typeof Symbol === 'function' && Symbol.observable || '@@observable'; -}(); -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/identity.js -function identity(x) { - return x; -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/pipe.js - -function pipe() { - var fns = []; - for (var _i = 0; _i < arguments.length; _i++) { - fns[_i] = arguments[_i]; - } - return pipeFromArray(fns); -} -function pipeFromArray(fns) { - if (fns.length === 0) { - return identity; - } - if (fns.length === 1) { - return fns[0]; - } - return function piped(input) { - return fns.reduce(function (prev, fn) { - return fn(prev); - }, input); - }; -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/Observable.js - - - - - - - -var Observable = function () { - function Observable(subscribe) { - if (subscribe) { - this._subscribe = subscribe; - } - } - Observable.prototype.lift = function (operator) { - var observable = new Observable(); - observable.source = this; - observable.operator = operator; - return observable; - }; - Observable.prototype.subscribe = function (observerOrNext, error, complete) { - var _this = this; - var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete); - errorContext(function () { - var _a = _this, - operator = _a.operator, - source = _a.source; - subscriber.add(operator ? operator.call(subscriber, source) : source ? _this._subscribe(subscriber) : _this._trySubscribe(subscriber)); - }); - return subscriber; - }; - Observable.prototype._trySubscribe = function (sink) { - try { - return this._subscribe(sink); - } catch (err) { - sink.error(err); - } - }; - Observable.prototype.forEach = function (next, promiseCtor) { - var _this = this; - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor(function (resolve, reject) { - var subscriber = new SafeSubscriber({ - next: function (value) { - try { - next(value); - } catch (err) { - reject(err); - subscriber.unsubscribe(); - } - }, - error: reject, - complete: resolve - }); - _this.subscribe(subscriber); - }); - }; - Observable.prototype._subscribe = function (subscriber) { - var _a; - return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); - }; - Observable.prototype[observable] = function () { - return this; - }; - Observable.prototype.pipe = function () { - var operations = []; - for (var _i = 0; _i < arguments.length; _i++) { - operations[_i] = arguments[_i]; - } - return pipeFromArray(operations)(this); - }; - Observable.prototype.toPromise = function (promiseCtor) { - var _this = this; - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor(function (resolve, reject) { - var value; - _this.subscribe(function (x) { - return value = x; - }, function (err) { - return reject(err); - }, function () { - return resolve(value); - }); - }); - }; - Observable.create = function (subscribe) { - return new Observable(subscribe); - }; - return Observable; -}(); - -function getPromiseCtor(promiseCtor) { - var _a; - return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise; -} -function isObserver(value) { - return value && isFunction_isFunction(value.next) && isFunction_isFunction(value.error) && isFunction_isFunction(value.complete); -} -function isSubscriber(value) { - return value && value instanceof Subscriber || isObserver(value) && isSubscription(value); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js - - -function isInteropObservable(input) { - return isFunction_isFunction(input[observable]); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js - -function isAsyncIterable(obj) { - return Symbol.asyncIterator && isFunction_isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js -function createInvalidObservableTypeError(input) { - return new TypeError("You provided " + (input !== null && typeof input === 'object' ? 'an invalid object' : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/symbol/iterator.js -function getSymbolIterator() { - if (typeof Symbol !== 'function' || !Symbol.iterator) { - return '@@iterator'; - } - return Symbol.iterator; -} -var iterator_iterator = getSymbolIterator(); -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/isIterable.js - - -function isIterable(input) { - return isFunction_isFunction(input === null || input === void 0 ? void 0 : input[iterator_iterator]); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js - - -function readableStreamLikeToAsyncGenerator(readableStream) { - return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() { - var reader, _a, value, done; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - reader = readableStream.getReader(); - _b.label = 1; - case 1: - _b.trys.push([1,, 9, 10]); - _b.label = 2; - case 2: - if (false) {} - return [4, __await(reader.read())]; - case 3: - _a = _b.sent(), value = _a.value, done = _a.done; - if (!done) return [3, 5]; - return [4, __await(void 0)]; - case 4: - return [2, _b.sent()]; - case 5: - return [4, __await(value)]; - case 6: - return [4, _b.sent()]; - case 7: - _b.sent(); - return [3, 2]; - case 8: - return [3, 10]; - case 9: - reader.releaseLock(); - return [7]; - case 10: - return [2]; - } - }); - }); -} -function isReadableStreamLike(obj) { - return isFunction_isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js - - - - - - - - - - - - -function innerFrom(input) { - if (input instanceof Observable) { - return input; - } - if (input != null) { - if (isInteropObservable(input)) { - return fromInteropObservable(input); - } - if (isArrayLike(input)) { - return fromArrayLike(input); - } - if (isPromise(input)) { - return fromPromise(input); - } - if (isAsyncIterable(input)) { - return fromAsyncIterable(input); - } - if (isIterable(input)) { - return fromIterable(input); - } - if (isReadableStreamLike(input)) { - return fromReadableStreamLike(input); - } - } - throw createInvalidObservableTypeError(input); -} -function fromInteropObservable(obj) { - return new Observable(function (subscriber) { - var obs = obj[observable](); - if (isFunction_isFunction(obs.subscribe)) { - return obs.subscribe(subscriber); - } - throw new TypeError('Provided object does not correctly implement Symbol.observable'); - }); -} -function fromArrayLike(array) { - return new Observable(function (subscriber) { - for (var i = 0; i < array.length && !subscriber.closed; i++) { - subscriber.next(array[i]); - } - subscriber.complete(); - }); -} -function fromPromise(promise) { - return new Observable(function (subscriber) { - promise.then(function (value) { - if (!subscriber.closed) { - subscriber.next(value); - subscriber.complete(); - } - }, function (err) { - return subscriber.error(err); - }).then(null, reportUnhandledError); - }); -} -function fromIterable(iterable) { - return new Observable(function (subscriber) { - var e_1, _a; - try { - for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) { - var value = iterable_1_1.value; - subscriber.next(value); - if (subscriber.closed) { - return; - } - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1); - } finally { - if (e_1) throw e_1.error; - } - } - subscriber.complete(); - }); -} -function fromAsyncIterable(asyncIterable) { - return new Observable(function (subscriber) { - process(asyncIterable, subscriber).catch(function (err) { - return subscriber.error(err); - }); - }); -} -function fromReadableStreamLike(readableStream) { - return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream)); -} -function process(asyncIterable, subscriber) { - var asyncIterable_1, asyncIterable_1_1; - var e_2, _a; - return __awaiter(this, void 0, void 0, function () { - var value, e_2_1; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _b.trys.push([0, 5, 6, 11]); - asyncIterable_1 = __asyncValues(asyncIterable); - _b.label = 1; - case 1: - return [4, asyncIterable_1.next()]; - case 2: - if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4]; - value = asyncIterable_1_1.value; - subscriber.next(value); - if (subscriber.closed) { - return [2]; - } - _b.label = 3; - case 3: - return [3, 1]; - case 4: - return [3, 11]; - case 5: - e_2_1 = _b.sent(); - e_2 = { - error: e_2_1 - }; - return [3, 11]; - case 6: - _b.trys.push([6,, 9, 10]); - if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8]; - return [4, _a.call(asyncIterable_1)]; - case 7: - _b.sent(); - _b.label = 8; - case 8: - return [3, 10]; - case 9: - if (e_2) throw e_2.error; - return [7]; - case 10: - return [7]; - case 11: - subscriber.complete(); - return [2]; - } - }); - }); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js -function executeSchedule(parentSubscription, scheduler, work, delay, repeat) { - if (delay === void 0) { - delay = 0; - } - if (repeat === void 0) { - repeat = false; - } - var scheduleSubscription = scheduler.schedule(function () { - work(); - if (repeat) { - parentSubscription.add(this.schedule(null, delay)); - } else { - this.unsubscribe(); - } - }, delay); - parentSubscription.add(scheduleSubscription); - if (!repeat) { - return scheduleSubscription; - } -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/util/lift.js - -function hasLift(source) { - return isFunction_isFunction(source === null || source === void 0 ? void 0 : source.lift); -} -function operate(init) { - return function (source) { - if (hasLift(source)) { - return source.lift(function (liftedSource) { - try { - return init(liftedSource, this); - } catch (err) { - this.error(err); - } - }); - } - throw new TypeError('Unable to lift unknown Observable type'); - }; -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js - - -function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { - return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); -} -var OperatorSubscriber = function (_super) { - __extends(OperatorSubscriber, _super); - function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { - var _this = _super.call(this, destination) || this; - _this.onFinalize = onFinalize; - _this.shouldUnsubscribe = shouldUnsubscribe; - _this._next = onNext ? function (value) { - try { - onNext(value); - } catch (err) { - destination.error(err); - } - } : _super.prototype._next; - _this._error = onError ? function (err) { - try { - onError(err); - } catch (err) { - destination.error(err); - } finally { - this.unsubscribe(); - } - } : _super.prototype._error; - _this._complete = onComplete ? function () { - try { - onComplete(); - } catch (err) { - destination.error(err); - } finally { - this.unsubscribe(); - } - } : _super.prototype._complete; - return _this; - } - OperatorSubscriber.prototype.unsubscribe = function () { - var _a; - if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { - var closed_1 = this.closed; - _super.prototype.unsubscribe.call(this); - !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); - } - }; - return OperatorSubscriber; -}(Subscriber); - -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/operators/observeOn.js - - - -function observeOn(scheduler, delay) { - if (delay === void 0) { - delay = 0; - } - return operate(function (source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - return executeSchedule(subscriber, scheduler, function () { - return subscriber.next(value); - }, delay); - }, function () { - return executeSchedule(subscriber, scheduler, function () { - return subscriber.complete(); - }, delay); - }, function (err) { - return executeSchedule(subscriber, scheduler, function () { - return subscriber.error(err); - }, delay); - })); - }); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js - -function subscribeOn(scheduler, delay) { - if (delay === void 0) { - delay = 0; - } - return operate(function (source, subscriber) { - subscriber.add(scheduler.schedule(function () { - return source.subscribe(subscriber); - }, delay)); - }); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js - - - -function scheduleObservable(input, scheduler) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js - - - -function schedulePromise(input, scheduler) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js - -function scheduleArray(input, scheduler) { - return new Observable(function (subscriber) { - var i = 0; - return scheduler.schedule(function () { - if (i === input.length) { - subscriber.complete(); - } else { - subscriber.next(input[i++]); - if (!subscriber.closed) { - this.schedule(); - } - } - }); - }); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js - - - - -function scheduleIterable(input, scheduler) { - return new Observable(function (subscriber) { - var iterator; - executeSchedule(subscriber, scheduler, function () { - iterator = input[iterator_iterator](); - executeSchedule(subscriber, scheduler, function () { - var _a; - var value; - var done; - try { - _a = iterator.next(), value = _a.value, done = _a.done; - } catch (err) { - subscriber.error(err); - return; - } - if (done) { - subscriber.complete(); - } else { - subscriber.next(value); - } - }, 0, true); - }); - return function () { - return isFunction_isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); - }; - }); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js - - -function scheduleAsyncIterable(input, scheduler) { - if (!input) { - throw new Error('Iterable cannot be null'); - } - return new Observable(function (subscriber) { - executeSchedule(subscriber, scheduler, function () { - var iterator = input[Symbol.asyncIterator](); - executeSchedule(subscriber, scheduler, function () { - iterator.next().then(function (result) { - if (result.done) { - subscriber.complete(); - } else { - subscriber.next(result.value); - } - }); - }, 0, true); - }); - }); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js - - -function scheduleReadableStreamLike(input, scheduler) { - return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js - - - - - - - - - - - - - -function scheduled(input, scheduler) { - if (input != null) { - if (isInteropObservable(input)) { - return scheduleObservable(input, scheduler); - } - if (isArrayLike(input)) { - return scheduleArray(input, scheduler); - } - if (isPromise(input)) { - return schedulePromise(input, scheduler); - } - if (isAsyncIterable(input)) { - return scheduleAsyncIterable(input, scheduler); - } - if (isIterable(input)) { - return scheduleIterable(input, scheduler); - } - if (isReadableStreamLike(input)) { - return scheduleReadableStreamLike(input, scheduler); - } - } - throw createInvalidObservableTypeError(input); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/observable/from.js - - -function from(input, scheduler) { - return scheduler ? scheduled(input, scheduler) : innerFrom(input); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/observable/of.js - - -function of() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - return from(args, scheduler); -} -;// CONCATENATED MODULE: ../../node_modules/rxjs/dist/esm5/internal/operators/switchMap.js - - - -function switchMap(project, resultSelector) { - return operate(function (source, subscriber) { - var innerSubscriber = null; - var index = 0; - var isComplete = false; - var checkComplete = function () { - return isComplete && !innerSubscriber && subscriber.complete(); - }; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); - var innerIndex = 0; - var outerIndex = index++; - innerFrom(project(value, outerIndex)).subscribe(innerSubscriber = createOperatorSubscriber(subscriber, function (innerValue) { - return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); - }, function () { - innerSubscriber = null; - checkComplete(); - })); - }, function () { - isComplete = true; - checkComplete(); - })); - }); -} -;// CONCATENATED MODULE: ../../node_modules/tldts-core/dist/es6/src/domain.js -/** - * Check if `vhost` is a valid suffix of `hostname` (top-domain) - * - * It means that `vhost` needs to be a suffix of `hostname` and we then need to - * make sure that: either they are equal, or the character preceding `vhost` in - * `hostname` is a '.' (it should not be a partial label). - * - * * hostname = 'not.evil.com' and vhost = 'vil.com' => not ok - * * hostname = 'not.evil.com' and vhost = 'evil.com' => ok - * * hostname = 'not.evil.com' and vhost = 'not.evil.com' => ok - */ -function shareSameDomainSuffix(hostname, vhost) { - if (hostname.endsWith(vhost)) { - return hostname.length === vhost.length || hostname[hostname.length - vhost.length - 1] === '.'; - } - return false; -} -/** - * Given a hostname and its public suffix, extract the general domain. - */ -function extractDomainWithSuffix(hostname, publicSuffix) { - // Locate the index of the last '.' in the part of the `hostname` preceding - // the public suffix. - // - // examples: - // 1. not.evil.co.uk => evil.co.uk - // ^ ^ - // | | start of public suffix - // | index of the last dot - // - // 2. example.co.uk => example.co.uk - // ^ ^ - // | | start of public suffix - // | - // | (-1) no dot found before the public suffix - const publicSuffixIndex = hostname.length - publicSuffix.length - 2; - const lastDotBeforeSuffixIndex = hostname.lastIndexOf('.', publicSuffixIndex); - // No '.' found, then `hostname` is the general domain (no sub-domain) - if (lastDotBeforeSuffixIndex === -1) { - return hostname; - } - // Extract the part between the last '.' - return hostname.slice(lastDotBeforeSuffixIndex + 1); -} -/** - * Detects the domain based on rules and upon and a host string - */ -function getDomain(suffix, hostname, options) { - // Check if `hostname` ends with a member of `validHosts`. - if (options.validHosts !== null) { - const validHosts = options.validHosts; - for (const vhost of validHosts) { - if ( /*@__INLINE__*/shareSameDomainSuffix(hostname, vhost)) { - return vhost; - } - } - } - let numberOfLeadingDots = 0; - if (hostname.startsWith('.')) { - while (numberOfLeadingDots < hostname.length && hostname[numberOfLeadingDots] === '.') { - numberOfLeadingDots += 1; - } - } - // If `hostname` is a valid public suffix, then there is no domain to return. - // Since we already know that `getPublicSuffix` returns a suffix of `hostname` - // there is no need to perform a string comparison and we only compare the - // size. - if (suffix.length === hostname.length - numberOfLeadingDots) { - return null; - } - // To extract the general domain, we start by identifying the public suffix - // (if any), then consider the domain to be the public suffix with one added - // level of depth. (e.g.: if hostname is `not.evil.co.uk` and public suffix: - // `co.uk`, then we take one more level: `evil`, giving the final result: - // `evil.co.uk`). - return (/*@__INLINE__*/extractDomainWithSuffix(hostname, suffix) - ); -} -;// CONCATENATED MODULE: ../../node_modules/tldts-core/dist/es6/src/domain-without-suffix.js -/** - * Return the part of domain without suffix. - * - * Example: for domain 'foo.com', the result would be 'foo'. - */ -function getDomainWithoutSuffix(domain, suffix) { - // Note: here `domain` and `suffix` cannot have the same length because in - // this case we set `domain` to `null` instead. It is thus safe to assume - // that `suffix` is shorter than `domain`. - return domain.slice(0, -suffix.length - 1); -} -;// CONCATENATED MODULE: ../../node_modules/tldts-core/dist/es6/src/extract-hostname.js -/** - * @param url - URL we want to extract a hostname from. - * @param urlIsValidHostname - hint from caller; true if `url` is already a valid hostname. - */ -function extractHostname(url, urlIsValidHostname) { - let start = 0; - let end = url.length; - let hasUpper = false; - // If url is not already a valid hostname, then try to extract hostname. - if (!urlIsValidHostname) { - // Special handling of data URLs - if (url.startsWith('data:')) { - return null; - } - // Trim leading spaces - while (start < url.length && url.charCodeAt(start) <= 32) { - start += 1; - } - // Trim trailing spaces - while (end > start + 1 && url.charCodeAt(end - 1) <= 32) { - end -= 1; - } - // Skip scheme. - if (url.charCodeAt(start) === 47 /* '/' */ && url.charCodeAt(start + 1) === 47 /* '/' */) { - start += 2; - } else { - const indexOfProtocol = url.indexOf(':/', start); - if (indexOfProtocol !== -1) { - // Implement fast-path for common protocols. We expect most protocols - // should be one of these 4 and thus we will not need to perform the - // more expansive validity check most of the time. - const protocolSize = indexOfProtocol - start; - const c0 = url.charCodeAt(start); - const c1 = url.charCodeAt(start + 1); - const c2 = url.charCodeAt(start + 2); - const c3 = url.charCodeAt(start + 3); - const c4 = url.charCodeAt(start + 4); - if (protocolSize === 5 && c0 === 104 /* 'h' */ && c1 === 116 /* 't' */ && c2 === 116 /* 't' */ && c3 === 112 /* 'p' */ && c4 === 115 /* 's' */) { - // https - } else if (protocolSize === 4 && c0 === 104 /* 'h' */ && c1 === 116 /* 't' */ && c2 === 116 /* 't' */ && c3 === 112 /* 'p' */) { - // http - } else if (protocolSize === 3 && c0 === 119 /* 'w' */ && c1 === 115 /* 's' */ && c2 === 115 /* 's' */) { - // wss - } else if (protocolSize === 2 && c0 === 119 /* 'w' */ && c1 === 115 /* 's' */) { - // ws - } else { - // Check that scheme is valid - for (let i = start; i < indexOfProtocol; i += 1) { - const lowerCaseCode = url.charCodeAt(i) | 32; - if (!(lowerCaseCode >= 97 && lowerCaseCode <= 122 || - // [a, z] - lowerCaseCode >= 48 && lowerCaseCode <= 57 || - // [0, 9] - lowerCaseCode === 46 || - // '.' - lowerCaseCode === 45 || - // '-' - lowerCaseCode === 43 // '+' - )) { - return null; - } - } - } - // Skip 0, 1 or more '/' after ':/' - start = indexOfProtocol + 2; - while (url.charCodeAt(start) === 47 /* '/' */) { - start += 1; - } - } - } - // Detect first occurrence of '/', '?' or '#'. We also keep track of the - // last occurrence of '@', ']' or ':' to speed-up subsequent parsing of - // (respectively), identifier, ipv6 or port. - let indexOfIdentifier = -1; - let indexOfClosingBracket = -1; - let indexOfPort = -1; - for (let i = start; i < end; i += 1) { - const code = url.charCodeAt(i); - if (code === 35 || - // '#' - code === 47 || - // '/' - code === 63 // '?' - ) { - end = i; - break; - } else if (code === 64) { - // '@' - indexOfIdentifier = i; - } else if (code === 93) { - // ']' - indexOfClosingBracket = i; - } else if (code === 58) { - // ':' - indexOfPort = i; - } else if (code >= 65 && code <= 90) { - hasUpper = true; - } - } - // Detect identifier: '@' - if (indexOfIdentifier !== -1 && indexOfIdentifier > start && indexOfIdentifier < end) { - start = indexOfIdentifier + 1; - } - // Handle ipv6 addresses - if (url.charCodeAt(start) === 91 /* '[' */) { - if (indexOfClosingBracket !== -1) { - return url.slice(start + 1, indexOfClosingBracket).toLowerCase(); - } - return null; - } else if (indexOfPort !== -1 && indexOfPort > start && indexOfPort < end) { - // Detect port: ':' - end = indexOfPort; - } - } - // Trim trailing dots - while (end > start + 1 && url.charCodeAt(end - 1) === 46 /* '.' */) { - end -= 1; - } - const hostname = start !== 0 || end !== url.length ? url.slice(start, end) : url; - if (hasUpper) { - return hostname.toLowerCase(); - } - return hostname; -} -;// CONCATENATED MODULE: ../../node_modules/tldts-core/dist/es6/src/is-ip.js -/** - * Check if a hostname is an IP. You should be aware that this only works - * because `hostname` is already garanteed to be a valid hostname! - */ -function isProbablyIpv4(hostname) { - // Cannot be shorted than 1.1.1.1 - if (hostname.length < 7) { - return false; - } - // Cannot be longer than: 255.255.255.255 - if (hostname.length > 15) { - return false; - } - let numberOfDots = 0; - for (let i = 0; i < hostname.length; i += 1) { - const code = hostname.charCodeAt(i); - if (code === 46 /* '.' */) { - numberOfDots += 1; - } else if (code < 48 /* '0' */ || code > 57 /* '9' */) { - return false; - } - } - return numberOfDots === 3 && hostname.charCodeAt(0) !== 46 /* '.' */ && hostname.charCodeAt(hostname.length - 1) !== 46 /* '.' */; -} -/** - * Similar to isProbablyIpv4. - */ -function isProbablyIpv6(hostname) { - if (hostname.length < 3) { - return false; - } - let start = hostname.startsWith('[') ? 1 : 0; - let end = hostname.length; - if (hostname[end - 1] === ']') { - end -= 1; - } - // We only consider the maximum size of a normal IPV6. Note that this will - // fail on so-called "IPv4 mapped IPv6 addresses" but this is a corner-case - // and a proper validation library should be used for these. - if (end - start > 39) { - return false; - } - let hasColon = false; - for (; start < end; start += 1) { - const code = hostname.charCodeAt(start); - if (code === 58 /* ':' */) { - hasColon = true; - } else if (!(code >= 48 && code <= 57 || - // 0-9 - code >= 97 && code <= 102 || - // a-f - code >= 65 && code <= 90 // A-F - )) { - return false; - } - } - return hasColon; -} -/** - * Check if `hostname` is *probably* a valid ip addr (either ipv6 or ipv4). - * This *will not* work on any string. We need `hostname` to be a valid - * hostname. - */ -function isIp(hostname) { - return isProbablyIpv6(hostname) || isProbablyIpv4(hostname); -} -;// CONCATENATED MODULE: ../../node_modules/tldts-core/dist/es6/src/is-valid.js -/** - * Implements fast shallow verification of hostnames. This does not perform a - * struct check on the content of labels (classes of Unicode characters, etc.) - * but instead check that the structure is valid (number of labels, length of - * labels, etc.). - * - * If you need stricter validation, consider using an external library. - */ -function isValidAscii(code) { - return code >= 97 && code <= 122 || code >= 48 && code <= 57 || code > 127; -} -/** - * Check if a hostname string is valid. It's usually a preliminary check before - * trying to use getDomain or anything else. - * - * Beware: it does not check if the TLD exists. - */ -/* harmony default export */ function is_valid(hostname) { - if (hostname.length > 255) { - return false; - } - if (hostname.length === 0) { - return false; - } - if ( /*@__INLINE__*/!isValidAscii(hostname.charCodeAt(0)) && hostname.charCodeAt(0) !== 46 && - // '.' (dot) - hostname.charCodeAt(0) !== 95 // '_' (underscore) - ) { - return false; - } - // Validate hostname according to RFC - let lastDotIndex = -1; - let lastCharCode = -1; - const len = hostname.length; - for (let i = 0; i < len; i += 1) { - const code = hostname.charCodeAt(i); - if (code === 46 /* '.' */) { - if ( - // Check that previous label is < 63 bytes long (64 = 63 + '.') - i - lastDotIndex > 64 || - // Check that previous character was not already a '.' - lastCharCode === 46 || - // Check that the previous label does not end with a '-' (dash) - lastCharCode === 45 || - // Check that the previous label does not end with a '_' (underscore) - lastCharCode === 95) { - return false; - } - lastDotIndex = i; - } else if (!( /*@__INLINE__*/isValidAscii(code) || code === 45 || code === 95)) { - // Check if there is a forbidden character in the label - return false; - } - lastCharCode = code; - } - return ( - // Check that last label is shorter than 63 chars - len - lastDotIndex - 1 <= 63 && - // Check that the last character is an allowed trailing label character. - // Since we already checked that the char is a valid hostname character, - // we only need to check that it's different from '-'. - lastCharCode !== 45 - ); -} -;// CONCATENATED MODULE: ../../node_modules/tldts-core/dist/es6/src/options.js -function setDefaultsImpl({ - allowIcannDomains = true, - allowPrivateDomains = false, - detectIp = true, - extractHostname = true, - mixedInputs = true, - validHosts = null, - validateHostname = true -}) { - return { - allowIcannDomains, - allowPrivateDomains, - detectIp, - extractHostname, - mixedInputs, - validHosts, - validateHostname - }; -} -const DEFAULT_OPTIONS = /*@__INLINE__*/setDefaultsImpl({}); -function setDefaults(options) { - if (options === undefined) { - return DEFAULT_OPTIONS; - } - return (/*@__INLINE__*/setDefaultsImpl(options) - ); -} -;// CONCATENATED MODULE: ../../node_modules/tldts-core/dist/es6/src/subdomain.js -/** - * Returns the subdomain of a hostname string - */ -function getSubdomain(hostname, domain) { - // If `hostname` and `domain` are the same, then there is no sub-domain - if (domain.length === hostname.length) { - return ''; - } - return hostname.slice(0, -domain.length - 1); -} -;// CONCATENATED MODULE: ../../node_modules/tldts-core/dist/es6/src/factory.js -/** - * Implement a factory allowing to plug different implementations of suffix - * lookup (e.g.: using a trie or the packed hashes datastructures). This is used - * and exposed in `tldts.ts` and `tldts-experimental.ts` bundle entrypoints. - */ - - - - - - - -function getEmptyResult() { - return { - domain: null, - domainWithoutSuffix: null, - hostname: null, - isIcann: null, - isIp: null, - isPrivate: null, - publicSuffix: null, - subdomain: null - }; -} -function factory_resetResult(result) { - result.domain = null; - result.domainWithoutSuffix = null; - result.hostname = null; - result.isIcann = null; - result.isIp = null; - result.isPrivate = null; - result.publicSuffix = null; - result.subdomain = null; -} -function factory_parseImpl(url, step, suffixLookup, partialOptions, result) { - const options = /*@__INLINE__*/setDefaults(partialOptions); - // Very fast approximate check to make sure `url` is a string. This is needed - // because the library will not necessarily be used in a typed setup and - // values of arbitrary types might be given as argument. - if (typeof url !== 'string') { - return result; - } - // Extract hostname from `url` only if needed. This can be made optional - // using `options.extractHostname`. This option will typically be used - // whenever we are sure the inputs to `parse` are already hostnames and not - // arbitrary URLs. - // - // `mixedInput` allows to specify if we expect a mix of URLs and hostnames - // as input. If only hostnames are expected then `extractHostname` can be - // set to `false` to speed-up parsing. If only URLs are expected then - // `mixedInputs` can be set to `false`. The `mixedInputs` is only a hint - // and will not change the behavior of the library. - if (!options.extractHostname) { - result.hostname = url; - } else if (options.mixedInputs) { - result.hostname = extractHostname(url, is_valid(url)); - } else { - result.hostname = extractHostname(url, false); - } - if (step === 0 /* FLAG.HOSTNAME */ || result.hostname === null) { - return result; - } - // Check if `hostname` is a valid ip address - if (options.detectIp) { - result.isIp = isIp(result.hostname); - if (result.isIp) { - return result; - } - } - // Perform optional hostname validation. If hostname is not valid, no need to - // go further as there will be no valid domain or sub-domain. - if (options.validateHostname && options.extractHostname && !is_valid(result.hostname)) { - result.hostname = null; - return result; - } - // Extract public suffix - suffixLookup(result.hostname, options, result); - if (step === 2 /* FLAG.PUBLIC_SUFFIX */ || result.publicSuffix === null) { - return result; - } - // Extract domain - result.domain = getDomain(result.publicSuffix, result.hostname, options); - if (step === 3 /* FLAG.DOMAIN */ || result.domain === null) { - return result; - } - // Extract subdomain - result.subdomain = getSubdomain(result.hostname, result.domain); - if (step === 4 /* FLAG.SUB_DOMAIN */) { - return result; - } - // Extract domain without suffix - result.domainWithoutSuffix = getDomainWithoutSuffix(result.domain, result.publicSuffix); - return result; -} -;// CONCATENATED MODULE: ../../node_modules/tldts-core/dist/es6/src/lookup/fast-path.js -/* harmony default export */ function fast_path(hostname, options, out) { - // Fast path for very popular suffixes; this allows to by-pass lookup - // completely as well as any extra allocation or string manipulation. - if (!options.allowPrivateDomains && hostname.length > 3) { - const last = hostname.length - 1; - const c3 = hostname.charCodeAt(last); - const c2 = hostname.charCodeAt(last - 1); - const c1 = hostname.charCodeAt(last - 2); - const c0 = hostname.charCodeAt(last - 3); - if (c3 === 109 /* 'm' */ && c2 === 111 /* 'o' */ && c1 === 99 /* 'c' */ && c0 === 46 /* '.' */) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = 'com'; - return true; - } else if (c3 === 103 /* 'g' */ && c2 === 114 /* 'r' */ && c1 === 111 /* 'o' */ && c0 === 46 /* '.' */) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = 'org'; - return true; - } else if (c3 === 117 /* 'u' */ && c2 === 100 /* 'd' */ && c1 === 101 /* 'e' */ && c0 === 46 /* '.' */) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = 'edu'; - return true; - } else if (c3 === 118 /* 'v' */ && c2 === 111 /* 'o' */ && c1 === 103 /* 'g' */ && c0 === 46 /* '.' */) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = 'gov'; - return true; - } else if (c3 === 116 /* 't' */ && c2 === 101 /* 'e' */ && c1 === 110 /* 'n' */ && c0 === 46 /* '.' */) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = 'net'; - return true; - } else if (c3 === 101 /* 'e' */ && c2 === 100 /* 'd' */ && c1 === 46 /* '.' */) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = 'de'; - return true; - } - } - return false; -} -;// CONCATENATED MODULE: ../../node_modules/tldts-core/dist/es6/index.js - - - -;// CONCATENATED MODULE: ../../node_modules/tldts/dist/es6/src/data/trie.js -const exceptions = function () { - const _0 = [1, {}], - _1 = [0, { - "city": _0 - }]; - const exceptions = [0, { - "ck": [0, { - "www": _0 - }], - "jp": [0, { - "kawasaki": _1, - "kitakyushu": _1, - "kobe": _1, - "nagoya": _1, - "sapporo": _1, - "sendai": _1, - "yokohama": _1 - }] - }]; - return exceptions; -}(); -const rules = function () { - const _2 = [1, {}], - _3 = [2, {}], - _4 = [1, { - "gov": _2, - "com": _2, - "org": _2, - "net": _2, - "edu": _2 - }], - _5 = [0, { - "*": _3 - }], - _6 = [1, { - "blogspot": _3 - }], - _7 = [1, { - "gov": _2 - }], - _8 = [0, { - "*": _2 - }], - _9 = [0, { - "cloud": _3 - }], - _10 = [1, { - "co": _3 - }], - _11 = [2, { - "nodes": _3 - }], - _12 = [0, { - "s3": _3 - }], - _13 = [0, { - "direct": _3 - }], - _14 = [2, { - "id": _3 - }], - _15 = [0, { - "webview-assets": _3 - }], - _16 = [0, { - "vfs": _3, - "webview-assets": _3 - }], - _17 = [0, { - "aws-cloud9": _15, - "cloud9": _16 - }], - _18 = [0, { - "dualstack": _12, - "analytics-gateway": _3, - "aws-cloud9": _15, - "cloud9": _16 - }], - _19 = [0, { - "dualstack": _12, - "s3": _3, - "s3-website": _3, - "aws-cloud9": _15, - "cloud9": _16 - }], - _20 = [0, { - "dualstack": _12, - "aws-cloud9": _15, - "cloud9": _16 - }], - _21 = [0, { - "apps": _3 - }], - _22 = [0, { - "paas": _3 - }], - _23 = [0, { - "app": _3 - }], - _24 = [2, { - "eu": _3 - }], - _25 = [0, { - "site": _3 - }], - _26 = [0, { - "pages": _3 - }], - _27 = [1, { - "com": _2, - "edu": _2, - "net": _2, - "org": _2 - }], - _28 = [0, { - "j": _3 - }], - _29 = [0, { - "jelastic": _3 - }], - _30 = [0, { - "user": _3 - }], - _31 = [1, { - "ybo": _3 - }], - _32 = [0, { - "cust": _3, - "reservd": _3 - }], - _33 = [0, { - "cust": _3 - }], - _34 = [1, { - "gov": _2, - "edu": _2, - "mil": _2, - "com": _2, - "org": _2, - "net": _2 - }], - _35 = [1, { - "edu": _2, - "biz": _2, - "net": _2, - "org": _2, - "gov": _2, - "info": _2, - "com": _2 - }], - _36 = [1, { - "gov": _2, - "blogspot": _3 - }], - _37 = [1, { - "framer": _3 - }], - _38 = [1, { - "barsy": _3 - }], - _39 = [0, { - "forgot": _3 - }], - _40 = [1, { - "gs": _2 - }], - _41 = [0, { - "nes": _2 - }], - _42 = [1, { - "k12": _2, - "cc": _2, - "lib": _2 - }], - _43 = [1, { - "cc": _2, - "lib": _2 - }]; - const rules = [0, { - "ac": [1, { - "com": _2, - "edu": _2, - "gov": _2, - "net": _2, - "mil": _2, - "org": _2, - "drr": _3 - }], - "ad": [1, { - "nom": _2 - }], - "ae": [1, { - "co": _2, - "net": _2, - "org": _2, - "sch": _2, - "ac": _2, - "gov": _2, - "mil": _2, - "blogspot": _3 - }], - "aero": [1, { - "accident-investigation": _2, - "accident-prevention": _2, - "aerobatic": _2, - "aeroclub": _2, - "aerodrome": _2, - "agents": _2, - "aircraft": _2, - "airline": _2, - "airport": _2, - "air-surveillance": _2, - "airtraffic": _2, - "air-traffic-control": _2, - "ambulance": _2, - "amusement": _2, - "association": _2, - "author": _2, - "ballooning": _2, - "broker": _2, - "caa": _2, - "cargo": _2, - "catering": _2, - "certification": _2, - "championship": _2, - "charter": _2, - "civilaviation": _2, - "club": _2, - "conference": _2, - "consultant": _2, - "consulting": _2, - "control": _2, - "council": _2, - "crew": _2, - "design": _2, - "dgca": _2, - "educator": _2, - "emergency": _2, - "engine": _2, - "engineer": _2, - "entertainment": _2, - "equipment": _2, - "exchange": _2, - "express": _2, - "federation": _2, - "flight": _2, - "fuel": _2, - "gliding": _2, - "government": _2, - "groundhandling": _2, - "group": _2, - "hanggliding": _2, - "homebuilt": _2, - "insurance": _2, - "journal": _2, - "journalist": _2, - "leasing": _2, - "logistics": _2, - "magazine": _2, - "maintenance": _2, - "media": _2, - "microlight": _2, - "modelling": _2, - "navigation": _2, - "parachuting": _2, - "paragliding": _2, - "passenger-association": _2, - "pilot": _2, - "press": _2, - "production": _2, - "recreation": _2, - "repbody": _2, - "res": _2, - "research": _2, - "rotorcraft": _2, - "safety": _2, - "scientist": _2, - "services": _2, - "show": _2, - "skydiving": _2, - "software": _2, - "student": _2, - "trader": _2, - "trading": _2, - "trainer": _2, - "union": _2, - "workinggroup": _2, - "works": _2 - }], - "af": _4, - "ag": [1, { - "com": _2, - "org": _2, - "net": _2, - "co": _2, - "nom": _2 - }], - "ai": [1, { - "off": _2, - "com": _2, - "net": _2, - "org": _2, - "uwu": _3 - }], - "al": [1, { - "com": _2, - "edu": _2, - "gov": _2, - "mil": _2, - "net": _2, - "org": _2, - "blogspot": _3 - }], - "am": [1, { - "co": _2, - "com": _2, - "commune": _2, - "net": _2, - "org": _2, - "radio": _3, - "blogspot": _3, - "neko": _3, - "nyaa": _3 - }], - "ao": [1, { - "ed": _2, - "gv": _2, - "og": _2, - "co": _2, - "pb": _2, - "it": _2 - }], - "aq": _2, - "ar": [1, { - "bet": _2, - "com": _6, - "coop": _2, - "edu": _2, - "gob": _2, - "gov": _2, - "int": _2, - "mil": _2, - "musica": _2, - "mutual": _2, - "net": _2, - "org": _2, - "senasa": _2, - "tur": _2 - }], - "arpa": [1, { - "e164": _2, - "in-addr": _2, - "ip6": _2, - "iris": _2, - "uri": _2, - "urn": _2 - }], - "as": _7, - "asia": [1, { - "cloudns": _3 - }], - "at": [1, { - "ac": [1, { - "sth": _2 - }], - "co": _6, - "gv": _2, - "or": _2, - "funkfeuer": [0, { - "wien": _3 - }], - "futurecms": [0, { - "*": _3, - "ex": _5, - "in": _5 - }], - "futurehosting": _3, - "futuremailing": _3, - "ortsinfo": [0, { - "ex": _5, - "kunden": _5 - }], - "biz": _3, - "info": _3, - "123webseite": _3, - "priv": _3, - "myspreadshop": _3, - "12hp": _3, - "2ix": _3, - "4lima": _3, - "lima-city": _3 - }], - "au": [1, { - "com": [1, { - "blogspot": _3, - "cloudlets": [0, { - "mel": _3 - }], - "myspreadshop": _3 - }], - "net": _2, - "org": _2, - "edu": [1, { - "act": _2, - "catholic": _2, - "nsw": [1, { - "schools": _2 - }], - "nt": _2, - "qld": _2, - "sa": _2, - "tas": _2, - "vic": _2, - "wa": _2 - }], - "gov": [1, { - "qld": _2, - "sa": _2, - "tas": _2, - "vic": _2, - "wa": _2 - }], - "asn": _2, - "id": _2, - "info": _2, - "conf": _2, - "oz": _2, - "act": _2, - "nsw": _2, - "nt": _2, - "qld": _2, - "sa": _2, - "tas": _2, - "vic": _2, - "wa": _2 - }], - "aw": [1, { - "com": _2 - }], - "ax": [1, { - "be": _3, - "cat": _3, - "es": _3, - "eu": _3, - "gg": _3, - "mc": _3, - "us": _3, - "xy": _3 - }], - "az": [1, { - "com": _2, - "net": _2, - "int": _2, - "gov": _2, - "org": _2, - "edu": _2, - "info": _2, - "pp": _2, - "mil": _2, - "name": _2, - "pro": _2, - "biz": _2 - }], - "ba": [1, { - "com": _2, - "edu": _2, - "gov": _2, - "mil": _2, - "net": _2, - "org": _2, - "rs": _3, - "blogspot": _3 - }], - "bb": [1, { - "biz": _2, - "co": _2, - "com": _2, - "edu": _2, - "gov": _2, - "info": _2, - "net": _2, - "org": _2, - "store": _2, - "tv": _2 - }], - "bd": _8, - "be": [1, { - "ac": _2, - "webhosting": _3, - "blogspot": _3, - "interhostsolutions": _9, - "kuleuven": [0, { - "ezproxy": _3 - }], - "123website": _3, - "myspreadshop": _3, - "transurl": _5 - }], - "bf": _7, - "bg": [1, { - "0": _2, - "1": _2, - "2": _2, - "3": _2, - "4": _2, - "5": _2, - "6": _2, - "7": _2, - "8": _2, - "9": _2, - "a": _2, - "b": _2, - "c": _2, - "d": _2, - "e": _2, - "f": _2, - "g": _2, - "h": _2, - "i": _2, - "j": _2, - "k": _2, - "l": _2, - "m": _2, - "n": _2, - "o": _2, - "p": _2, - "q": _2, - "r": _2, - "s": _2, - "t": _2, - "u": _2, - "v": _2, - "w": _2, - "x": _2, - "y": _2, - "z": _2, - "blogspot": _3, - "barsy": _3 - }], - "bh": _4, - "bi": [1, { - "co": _2, - "com": _2, - "edu": _2, - "or": _2, - "org": _2 - }], - "biz": [1, { - "activetrail": _3, - "cloudns": _3, - "jozi": _3, - "dyndns": _3, - "for-better": _3, - "for-more": _3, - "for-some": _3, - "for-the": _3, - "selfip": _3, - "webhop": _3, - "orx": _3, - "mmafan": _3, - "myftp": _3, - "no-ip": _3, - "dscloud": _3 - }], - "bj": [1, { - "africa": _2, - "agro": _2, - "architectes": _2, - "assur": _2, - "avocats": _2, - "co": _2, - "com": _2, - "eco": _2, - "econo": _2, - "edu": _2, - "info": _2, - "loisirs": _2, - "money": _2, - "net": _2, - "org": _2, - "ote": _2, - "resto": _2, - "restaurant": _2, - "tourism": _2, - "univ": _2, - "blogspot": _3 - }], - "bm": _4, - "bn": [1, { - "com": _2, - "edu": _2, - "gov": _2, - "net": _2, - "org": _2, - "co": _3 - }], - "bo": [1, { - "com": _2, - "edu": _2, - "gob": _2, - "int": _2, - "org": _2, - "net": _2, - "mil": _2, - "tv": _2, - "web": _2, - "academia": _2, - "agro": _2, - "arte": _2, - "blog": _2, - "bolivia": _2, - "ciencia": _2, - "cooperativa": _2, - "democracia": _2, - "deporte": _2, - "ecologia": _2, - "economia": _2, - "empresa": _2, - "indigena": _2, - "industria": _2, - "info": _2, - "medicina": _2, - "movimiento": _2, - "musica": _2, - "natural": _2, - "nombre": _2, - "noticias": _2, - "patria": _2, - "politica": _2, - "profesional": _2, - "plurinacional": _2, - "pueblo": _2, - "revista": _2, - "salud": _2, - "tecnologia": _2, - "tksat": _2, - "transporte": _2, - "wiki": _2 - }], - "br": [1, { - "9guacu": _2, - "abc": _2, - "adm": _2, - "adv": _2, - "agr": _2, - "aju": _2, - "am": _2, - "anani": _2, - "aparecida": _2, - "app": _2, - "arq": _2, - "art": _2, - "ato": _2, - "b": _2, - "barueri": _2, - "belem": _2, - "bhz": _2, - "bib": _2, - "bio": _2, - "blog": _2, - "bmd": _2, - "boavista": _2, - "bsb": _2, - "campinagrande": _2, - "campinas": _2, - "caxias": _2, - "cim": _2, - "cng": _2, - "cnt": _2, - "com": [1, { - "blogspot": _3, - "simplesite": _3 - }], - "contagem": _2, - "coop": _2, - "coz": _2, - "cri": _2, - "cuiaba": _2, - "curitiba": _2, - "def": _2, - "des": _2, - "det": _2, - "dev": _2, - "ecn": _2, - "eco": _2, - "edu": _2, - "emp": _2, - "enf": _2, - "eng": _2, - "esp": _2, - "etc": _2, - "eti": _2, - "far": _2, - "feira": _2, - "flog": _2, - "floripa": _2, - "fm": _2, - "fnd": _2, - "fortal": _2, - "fot": _2, - "foz": _2, - "fst": _2, - "g12": _2, - "geo": _2, - "ggf": _2, - "goiania": _2, - "gov": [1, { - "ac": _2, - "al": _2, - "am": _2, - "ap": _2, - "ba": _2, - "ce": _2, - "df": _2, - "es": _2, - "go": _2, - "ma": _2, - "mg": _2, - "ms": _2, - "mt": _2, - "pa": _2, - "pb": _2, - "pe": _2, - "pi": _2, - "pr": _2, - "rj": _2, - "rn": _2, - "ro": _2, - "rr": _2, - "rs": _2, - "sc": _2, - "se": _2, - "sp": _2, - "to": _2 - }], - "gru": _2, - "imb": _2, - "ind": _2, - "inf": _2, - "jab": _2, - "jampa": _2, - "jdf": _2, - "joinville": _2, - "jor": _2, - "jus": _2, - "leg": [1, { - "ac": _3, - "al": _3, - "am": _3, - "ap": _3, - "ba": _3, - "ce": _3, - "df": _3, - "es": _3, - "go": _3, - "ma": _3, - "mg": _3, - "ms": _3, - "mt": _3, - "pa": _3, - "pb": _3, - "pe": _3, - "pi": _3, - "pr": _3, - "rj": _3, - "rn": _3, - "ro": _3, - "rr": _3, - "rs": _3, - "sc": _3, - "se": _3, - "sp": _3, - "to": _3 - }], - "lel": _2, - "log": _2, - "londrina": _2, - "macapa": _2, - "maceio": _2, - "manaus": _2, - "maringa": _2, - "mat": _2, - "med": _2, - "mil": _2, - "morena": _2, - "mp": _2, - "mus": _2, - "natal": _2, - "net": _2, - "niteroi": _2, - "nom": _8, - "not": _2, - "ntr": _2, - "odo": _2, - "ong": _2, - "org": _2, - "osasco": _2, - "palmas": _2, - "poa": _2, - "ppg": _2, - "pro": _2, - "psc": _2, - "psi": _2, - "pvh": _2, - "qsl": _2, - "radio": _2, - "rec": _2, - "recife": _2, - "rep": _2, - "ribeirao": _2, - "rio": _2, - "riobranco": _2, - "riopreto": _2, - "salvador": _2, - "sampa": _2, - "santamaria": _2, - "santoandre": _2, - "saobernardo": _2, - "saogonca": _2, - "seg": _2, - "sjc": _2, - "slg": _2, - "slz": _2, - "sorocaba": _2, - "srv": _2, - "taxi": _2, - "tc": _2, - "tec": _2, - "teo": _2, - "the": _2, - "tmp": _2, - "trd": _2, - "tur": _2, - "tv": _2, - "udi": _2, - "vet": _2, - "vix": _2, - "vlog": _2, - "wiki": _2, - "zlg": _2 - }], - "bs": [1, { - "com": _2, - "net": _2, - "org": _2, - "edu": _2, - "gov": _2, - "we": _3 - }], - "bt": _4, - "bv": _2, - "bw": [1, { - "co": _2, - "org": _2 - }], - "by": [1, { - "gov": _2, - "mil": _2, - "com": _6, - "of": _2, - "mycloud": _3, - "mediatech": _3 - }], - "bz": [1, { - "com": _2, - "net": _2, - "org": _2, - "edu": _2, - "gov": _2, - "za": _3, - "gsj": _3 - }], - "ca": [1, { - "ab": _2, - "bc": _2, - "mb": _2, - "nb": _2, - "nf": _2, - "nl": _2, - "ns": _2, - "nt": _2, - "nu": _2, - "on": _2, - "pe": _2, - "qc": _2, - "sk": _2, - "yk": _2, - "gc": _2, - "barsy": _3, - "awdev": _5, - "co": _3, - "blogspot": _3, - "no-ip": _3, - "myspreadshop": _3 - }], - "cat": _2, - "cc": [1, { - "cloudns": _3, - "ftpaccess": _3, - "game-server": _3, - "myphotos": _3, - "scrapping": _3, - "twmail": _3, - "csx": _3, - "fantasyleague": _3, - "spawn": [0, { - "instances": _3 - }] - }], - "cd": _7, - "cf": _6, - "cg": _2, - "ch": [1, { - "square7": _3, - "blogspot": _3, - "flow": [0, { - "ae": [0, { - "alp1": _3 - }], - "appengine": _3 - }], - "linkyard-cloud": _3, - "dnsking": _3, - "gotdns": _3, - "123website": _3, - "myspreadshop": _3, - "firenet": [0, { - "*": _3, - "svc": _5 - }], - "12hp": _3, - "2ix": _3, - "4lima": _3, - "lima-city": _3 - }], - "ci": [1, { - "org": _2, - "or": _2, - "com": _2, - "co": _2, - "edu": _2, - "ed": _2, - "ac": _2, - "net": _2, - "go": _2, - "asso": _2, - "xn--aroport-bya": _2, - "aéroport": _2, - "int": _2, - "presse": _2, - "md": _2, - "gouv": _2, - "fin": _3, - "nl": _3 - }], - "ck": _8, - "cl": [1, { - "co": _2, - "gob": _2, - "gov": _2, - "mil": _2, - "blogspot": _3 - }], - "cm": [1, { - "co": _2, - "com": _2, - "gov": _2, - "net": _2 - }], - "cn": [1, { - "ac": _2, - "com": [1, { - "amazonaws": [0, { - "compute": _5, - "cn-north-1": _12, - "eb": [0, { - "cn-north-1": _3, - "cn-northwest-1": _3 - }], - "elb": _5 - }] - }], - "edu": _2, - "gov": _2, - "net": _2, - "org": _2, - "mil": _2, - "xn--55qx5d": _2, - "公司": _2, - "xn--io0a7i": _2, - "网络": _2, - "xn--od0alg": _2, - "網絡": _2, - "ah": _2, - "bj": _2, - "cq": _2, - "fj": _2, - "gd": _2, - "gs": _2, - "gz": _2, - "gx": _2, - "ha": _2, - "hb": _2, - "he": _2, - "hi": _2, - "hl": _2, - "hn": _2, - "jl": _2, - "js": _2, - "jx": _2, - "ln": _2, - "nm": _2, - "nx": _2, - "qh": _2, - "sc": _2, - "sd": _2, - "sh": _2, - "sn": _2, - "sx": _2, - "tj": _2, - "xj": _2, - "xz": _2, - "yn": _2, - "zj": _2, - "hk": _2, - "mo": _2, - "tw": _2, - "canva-apps": _3, - "instantcloud": _3, - "quickconnect": _13 - }], - "co": [1, { - "arts": _2, - "com": _6, - "edu": _2, - "firm": _2, - "gov": _2, - "info": _2, - "int": _2, - "mil": _2, - "net": _2, - "nom": _2, - "org": _2, - "rec": _2, - "web": _2, - "carrd": _3, - "crd": _3, - "otap": _5, - "leadpages": _3, - "lpages": _3, - "mypi": _3, - "n4t": _3, - "firewalledreplit": _14, - "repl": _14, - "supabase": _3 - }], - "com": [1, { - "devcdnaccesso": _5, - "adobeaemcloud": [2, { - "dev": _5 - }], - "airkitapps": _3, - "airkitapps-au": _3, - "aivencloud": _3, - "kasserver": _3, - "amazonaws": [0, { - "compute": _5, - "compute-1": _5, - "us-east-1": [2, { - "dualstack": _12, - "analytics-gateway": _3, - "aws-cloud9": _15, - "cloud9": _16 - }], - "ap-northeast-1": _18, - "ap-northeast-2": _19, - "ap-south-1": _19, - "ap-southeast-1": _20, - "ap-southeast-2": _20, - "ca-central-1": _19, - "eu-central-1": _19, - "eu-west-1": _18, - "eu-west-2": _19, - "eu-west-3": _19, - "s3": _3, - "s3-ap-northeast-1": _3, - "s3-ap-northeast-2": _3, - "s3-ap-south-1": _3, - "s3-ap-southeast-1": _3, - "s3-ap-southeast-2": _3, - "s3-ca-central-1": _3, - "s3-eu-central-1": _3, - "s3-eu-west-1": _3, - "s3-eu-west-2": _3, - "s3-eu-west-3": _3, - "s3-external-1": _3, - "s3-fips-us-gov-west-1": _3, - "s3-sa-east-1": _3, - "s3-us-east-2": _3, - "s3-us-gov-west-1": _3, - "s3-us-west-1": _3, - "s3-us-west-2": _3, - "s3-website-ap-northeast-1": _3, - "s3-website-ap-southeast-1": _3, - "s3-website-ap-southeast-2": _3, - "s3-website-eu-west-1": _3, - "s3-website-sa-east-1": _3, - "s3-website-us-east-1": _3, - "s3-website-us-west-1": _3, - "s3-website-us-west-2": _3, - "sa-east-1": _20, - "us-east-2": [0, { - "dualstack": _12, - "s3": _3, - "s3-website": _3, - "analytics-gateway": _3, - "aws-cloud9": _15, - "cloud9": _16 - }], - "us-west-2": [0, { - "analytics-gateway": _3, - "aws-cloud9": _15, - "cloud9": _16 - }], - "af-south-1": _17, - "ap-east-1": _17, - "ap-northeast-3": _17, - "eu-north-1": _17, - "eu-south-1": _17, - "me-south-1": _17, - "us-west-1": _17, - "elb": _5 - }], - "elasticbeanstalk": [2, { - "ap-northeast-1": _3, - "ap-northeast-2": _3, - "ap-northeast-3": _3, - "ap-south-1": _3, - "ap-southeast-1": _3, - "ap-southeast-2": _3, - "ca-central-1": _3, - "eu-central-1": _3, - "eu-west-1": _3, - "eu-west-2": _3, - "eu-west-3": _3, - "sa-east-1": _3, - "us-east-1": _3, - "us-east-2": _3, - "us-gov-west-1": _3, - "us-west-1": _3, - "us-west-2": _3 - }], - "awsglobalaccelerator": _3, - "siiites": _3, - "appspacehosted": _3, - "appspaceusercontent": _3, - "on-aptible": _3, - "myasustor": _3, - "balena-devices": _3, - "betainabox": _3, - "boutir": _3, - "bplaced": _3, - "cafjs": _3, - "canva-apps": _3, - "br": _3, - "cn": _3, - "de": _3, - "eu": _3, - "jpn": _3, - "mex": _3, - "ru": _3, - "sa": _3, - "uk": _3, - "us": _3, - "za": _3, - "ar": _3, - "hu": _3, - "kr": _3, - "no": _3, - "qc": _3, - "uy": _3, - "africa": _3, - "gr": _3, - "co": _3, - "jdevcloud": _3, - "wpdevcloud": _3, - "cloudcontrolled": _3, - "cloudcontrolapp": _3, - "cf-ipfs": _3, - "cloudflare-ipfs": _3, - "trycloudflare": _3, - "customer-oci": [0, { - "*": _3, - "oci": _5, - "ocp": _5, - "ocs": _5 - }], - "dattolocal": _3, - "dattorelay": _3, - "dattoweb": _3, - "mydatto": _3, - "builtwithdark": _3, - "datadetect": [0, { - "demo": _3, - "instance": _3 - }], - "ddns5": _3, - "discordsays": _3, - "discordsez": _3, - "drayddns": _3, - "dreamhosters": _3, - "mydrobo": _3, - "dyndns-at-home": _3, - "dyndns-at-work": _3, - "dyndns-blog": _3, - "dyndns-free": _3, - "dyndns-home": _3, - "dyndns-ip": _3, - "dyndns-mail": _3, - "dyndns-office": _3, - "dyndns-pics": _3, - "dyndns-remote": _3, - "dyndns-server": _3, - "dyndns-web": _3, - "dyndns-wiki": _3, - "dyndns-work": _3, - "blogdns": _3, - "cechire": _3, - "dnsalias": _3, - "dnsdojo": _3, - "doesntexist": _3, - "dontexist": _3, - "doomdns": _3, - "dyn-o-saur": _3, - "dynalias": _3, - "est-a-la-maison": _3, - "est-a-la-masion": _3, - "est-le-patron": _3, - "est-mon-blogueur": _3, - "from-ak": _3, - "from-al": _3, - "from-ar": _3, - "from-ca": _3, - "from-ct": _3, - "from-dc": _3, - "from-de": _3, - "from-fl": _3, - "from-ga": _3, - "from-hi": _3, - "from-ia": _3, - "from-id": _3, - "from-il": _3, - "from-in": _3, - "from-ks": _3, - "from-ky": _3, - "from-ma": _3, - "from-md": _3, - "from-mi": _3, - "from-mn": _3, - "from-mo": _3, - "from-ms": _3, - "from-mt": _3, - "from-nc": _3, - "from-nd": _3, - "from-ne": _3, - "from-nh": _3, - "from-nj": _3, - "from-nm": _3, - "from-nv": _3, - "from-oh": _3, - "from-ok": _3, - "from-or": _3, - "from-pa": _3, - "from-pr": _3, - "from-ri": _3, - "from-sc": _3, - "from-sd": _3, - "from-tn": _3, - "from-tx": _3, - "from-ut": _3, - "from-va": _3, - "from-vt": _3, - "from-wa": _3, - "from-wi": _3, - "from-wv": _3, - "from-wy": _3, - "getmyip": _3, - "gotdns": _3, - "hobby-site": _3, - "homelinux": _3, - "homeunix": _3, - "iamallama": _3, - "is-a-anarchist": _3, - "is-a-blogger": _3, - "is-a-bookkeeper": _3, - "is-a-bulls-fan": _3, - "is-a-caterer": _3, - "is-a-chef": _3, - "is-a-conservative": _3, - "is-a-cpa": _3, - "is-a-cubicle-slave": _3, - "is-a-democrat": _3, - "is-a-designer": _3, - "is-a-doctor": _3, - "is-a-financialadvisor": _3, - "is-a-geek": _3, - "is-a-green": _3, - "is-a-guru": _3, - "is-a-hard-worker": _3, - "is-a-hunter": _3, - "is-a-landscaper": _3, - "is-a-lawyer": _3, - "is-a-liberal": _3, - "is-a-libertarian": _3, - "is-a-llama": _3, - "is-a-musician": _3, - "is-a-nascarfan": _3, - "is-a-nurse": _3, - "is-a-painter": _3, - "is-a-personaltrainer": _3, - "is-a-photographer": _3, - "is-a-player": _3, - "is-a-republican": _3, - "is-a-rockstar": _3, - "is-a-socialist": _3, - "is-a-student": _3, - "is-a-teacher": _3, - "is-a-techie": _3, - "is-a-therapist": _3, - "is-an-accountant": _3, - "is-an-actor": _3, - "is-an-actress": _3, - "is-an-anarchist": _3, - "is-an-artist": _3, - "is-an-engineer": _3, - "is-an-entertainer": _3, - "is-certified": _3, - "is-gone": _3, - "is-into-anime": _3, - "is-into-cars": _3, - "is-into-cartoons": _3, - "is-into-games": _3, - "is-leet": _3, - "is-not-certified": _3, - "is-slick": _3, - "is-uberleet": _3, - "is-with-theband": _3, - "isa-geek": _3, - "isa-hockeynut": _3, - "issmarterthanyou": _3, - "likes-pie": _3, - "likescandy": _3, - "neat-url": _3, - "saves-the-whales": _3, - "selfip": _3, - "sells-for-less": _3, - "sells-for-u": _3, - "servebbs": _3, - "simple-url": _3, - "space-to-rent": _3, - "teaches-yoga": _3, - "writesthisblog": _3, - "digitaloceanspaces": _5, - "ddnsfree": _3, - "ddnsgeek": _3, - "giize": _3, - "gleeze": _3, - "kozow": _3, - "loseyourip": _3, - "ooguy": _3, - "theworkpc": _3, - "mytuleap": _3, - "tuleap-partners": _3, - "encoreapi": _3, - "evennode": [0, { - "eu-1": _3, - "eu-2": _3, - "eu-3": _3, - "eu-4": _3, - "us-1": _3, - "us-2": _3, - "us-3": _3, - "us-4": _3 - }], - "onfabrica": _3, - "fbsbx": _21, - "fastly-edge": _3, - "fastly-terrarium": _3, - "fastvps-server": _3, - "mydobiss": _3, - "firebaseapp": _3, - "fldrv": _3, - "forgeblocks": _3, - "framercanvas": _3, - "freebox-os": _3, - "freeboxos": _3, - "freemyip": _3, - "gentapps": _3, - "gentlentapis": _3, - "githubusercontent": _3, - "0emm": _5, - "appspot": [2, { - "r": _5 - }], - "codespot": _3, - "googleapis": _3, - "googlecode": _3, - "pagespeedmobilizer": _3, - "publishproxy": _3, - "withgoogle": _3, - "withyoutube": _3, - "blogspot": _3, - "awsmppl": _3, - "herokuapp": _3, - "herokussl": _3, - "impertrixcdn": _3, - "impertrix": _3, - "smushcdn": _3, - "wphostedmail": _3, - "wpmucdn": _3, - "pixolino": _3, - "amscompute": _3, - "dopaas": _3, - "hosted-by-previder": _22, - "hosteur": [0, { - "rag-cloud": _3, - "rag-cloud-ch": _3 - }], - "ik-server": [0, { - "jcloud": _3, - "jcloud-ver-jpc": _3 - }], - "jelastic": [0, { - "demo": _3 - }], - "kilatiron": _3, - "massivegrid": _22, - "wafaicloud": [0, { - "jed": _3, - "lon": _3, - "ryd": _3 - }], - "joyent": [0, { - "cns": _5 - }], - "ktistory": _3, - "lpusercontent": _3, - "lmpm": _23, - "linode": [0, { - "members": _3, - "nodebalancer": _5 - }], - "linodeobjects": _5, - "linodeusercontent": [0, { - "ip": _3 - }], - "barsycenter": _3, - "barsyonline": _3, - "mazeplay": _3, - "miniserver": _3, - "meteorapp": _24, - "hostedpi": _3, - "mythic-beasts": [0, { - "customer": _3, - "caracal": _3, - "fentiger": _3, - "lynx": _3, - "ocelot": _3, - "oncilla": _3, - "onza": _3, - "sphinx": _3, - "vs": _3, - "x": _3, - "yali": _3 - }], - "nospamproxy": _9, - "4u": _3, - "nfshost": _3, - "001www": _3, - "ddnslive": _3, - "myiphost": _3, - "blogsyte": _3, - "ciscofreak": _3, - "damnserver": _3, - "ditchyourip": _3, - "dnsiskinky": _3, - "dynns": _3, - "geekgalaxy": _3, - "health-carereform": _3, - "homesecuritymac": _3, - "homesecuritypc": _3, - "myactivedirectory": _3, - "mysecuritycamera": _3, - "net-freaks": _3, - "onthewifi": _3, - "point2this": _3, - "quicksytes": _3, - "securitytactics": _3, - "serveexchange": _3, - "servehumour": _3, - "servep2p": _3, - "servesarcasm": _3, - "stufftoread": _3, - "unusualperson": _3, - "workisboring": _3, - "3utilities": _3, - "ddnsking": _3, - "myvnc": _3, - "servebeer": _3, - "servecounterstrike": _3, - "serveftp": _3, - "servegame": _3, - "servehalflife": _3, - "servehttp": _3, - "serveirc": _3, - "servemp3": _3, - "servepics": _3, - "servequake": _3, - "observableusercontent": [0, { - "static": _3 - }], - "simplesite": _3, - "orsites": _3, - "operaunite": _3, - "authgear-staging": _3, - "authgearapps": _3, - "skygearapp": _3, - "outsystemscloud": _3, - "ownprovider": _3, - "pgfog": _3, - "pagefrontapp": _3, - "pagexl": _3, - "paywhirl": _5, - "gotpantheon": _3, - "platter-app": _3, - "pleskns": _3, - "postman-echo": _3, - "prgmr": [0, { - "xen": _3 - }], - "pythonanywhere": _24, - "qualifioapp": _3, - "ladesk": _3, - "qbuser": _3, - "qa2": _3, - "dev-myqnapcloud": _3, - "alpha-myqnapcloud": _3, - "myqnapcloud": _3, - "quipelements": _5, - "rackmaze": _3, - "rhcloud": _3, - "render": _23, - "onrender": _3, - "180r": _3, - "dojin": _3, - "sakuratan": _3, - "sakuraweb": _3, - "x0": _3, - "code": [0, { - "builder": _5, - "dev-builder": _5, - "stg-builder": _5 - }], - "logoip": _3, - "scrysec": _3, - "firewall-gateway": _3, - "myshopblocks": _3, - "myshopify": _3, - "shopitsite": _3, - "1kapp": _3, - "appchizi": _3, - "applinzi": _3, - "sinaapp": _3, - "vipsinaapp": _3, - "bounty-full": [2, { - "alpha": _3, - "beta": _3 - }], - "streamlitapp": _3, - "try-snowplow": _3, - "stackhero-network": _3, - "playstation-cloud": _3, - "myspreadshop": _3, - "stdlib": [0, { - "api": _3 - }], - "temp-dns": _3, - "dsmynas": _3, - "familyds": _3, - "mytabit": _3, - "tb-hosting": _25, - "reservd": _3, - "thingdustdata": _3, - "bloxcms": _3, - "townnews-staging": _3, - "typeform": [0, { - "pro": _3 - }], - "hk": _3, - "it": _3, - "vultrobjects": _5, - "wafflecell": _3, - "reserve-online": _3, - "hotelwithflight": _3, - "remotewd": _3, - "wiardweb": _26, - "messwithdns": _3, - "woltlab-demo": _3, - "wpenginepowered": [2, { - "js": _3 - }], - "wixsite": _3, - "xnbay": [2, { - "u2": _3, - "u2-local": _3 - }], - "yolasite": _3 - }], - "coop": _2, - "cr": [1, { - "ac": _2, - "co": _2, - "ed": _2, - "fi": _2, - "go": _2, - "or": _2, - "sa": _2 - }], - "cu": [1, { - "com": _2, - "edu": _2, - "org": _2, - "net": _2, - "gov": _2, - "inf": _2 - }], - "cv": [1, { - "com": _2, - "edu": _2, - "int": _2, - "nome": _2, - "org": _2, - "blogspot": _3 - }], - "cw": _27, - "cx": [1, { - "gov": _2, - "ath": _3, - "info": _3 - }], - "cy": [1, { - "ac": _2, - "biz": _2, - "com": [1, { - "blogspot": _3, - "scaleforce": _28 - }], - "ekloges": _2, - "gov": _2, - "ltd": _2, - "mil": _2, - "net": _2, - "org": _2, - "press": _2, - "pro": _2, - "tm": _2 - }], - "cz": [1, { - "co": _3, - "realm": _3, - "e4": _3, - "blogspot": _3, - "metacentrum": [0, { - "cloud": _5, - "custom": _3 - }], - "muni": [0, { - "cloud": [0, { - "flt": _3, - "usr": _3 - }] - }] - }], - "de": [1, { - "bplaced": _3, - "square7": _3, - "com": _3, - "cosidns": [0, { - "dyn": _3 - }], - "dynamisches-dns": _3, - "dnsupdater": _3, - "internet-dns": _3, - "l-o-g-i-n": _3, - "dnshome": _3, - "fuettertdasnetz": _3, - "isteingeek": _3, - "istmein": _3, - "lebtimnetz": _3, - "leitungsen": _3, - "traeumtgerade": _3, - "ddnss": [2, { - "dyn": _3, - "dyndns": _3 - }], - "dyndns1": _3, - "dyn-ip24": _3, - "home-webserver": [2, { - "dyn": _3 - }], - "myhome-server": _3, - "frusky": _5, - "goip": _3, - "blogspot": _3, - "xn--gnstigbestellen-zvb": _3, - "günstigbestellen": _3, - "xn--gnstigliefern-wob": _3, - "günstigliefern": _3, - "hs-heilbronn": [0, { - "it": _26 - }], - "dyn-berlin": _3, - "in-berlin": _3, - "in-brb": _3, - "in-butter": _3, - "in-dsl": _3, - "in-vpn": _3, - "iservschule": _3, - "mein-iserv": _3, - "schulplattform": _3, - "schulserver": _3, - "test-iserv": _3, - "keymachine": _3, - "git-repos": _3, - "lcube-server": _3, - "svn-repos": _3, - "barsy": _3, - "123webseite": _3, - "logoip": _3, - "firewall-gateway": _3, - "my-gateway": _3, - "my-router": _3, - "spdns": _3, - "speedpartner": [0, { - "customer": _3 - }], - "myspreadshop": _3, - "taifun-dns": _3, - "12hp": _3, - "2ix": _3, - "4lima": _3, - "lima-city": _3, - "dd-dns": _3, - "dray-dns": _3, - "draydns": _3, - "dyn-vpn": _3, - "dynvpn": _3, - "mein-vigor": _3, - "my-vigor": _3, - "my-wan": _3, - "syno-ds": _3, - "synology-diskstation": _3, - "synology-ds": _3, - "uberspace": _5, - "virtualuser": _3, - "virtual-user": _3, - "community-pro": _3, - "diskussionsbereich": _3 - }], - "dj": _2, - "dk": [1, { - "biz": _3, - "co": _3, - "firm": _3, - "reg": _3, - "store": _3, - "blogspot": _3, - "123hjemmeside": _3, - "myspreadshop": _3 - }], - "dm": _4, - "do": [1, { - "art": _2, - "com": _2, - "edu": _2, - "gob": _2, - "gov": _2, - "mil": _2, - "net": _2, - "org": _2, - "sld": _2, - "web": _2 - }], - "dz": [1, { - "art": _2, - "asso": _2, - "com": _2, - "edu": _2, - "gov": _2, - "org": _2, - "net": _2, - "pol": _2, - "soc": _2, - "tm": _2 - }], - "ec": [1, { - "com": _2, - "info": _2, - "net": _2, - "fin": _2, - "k12": _2, - "med": _2, - "pro": _2, - "org": _2, - "edu": _2, - "gov": _2, - "gob": _2, - "mil": _2, - "base": _3, - "official": _3 - }], - "edu": [1, { - "rit": [0, { - "git-pages": _3 - }] - }], - "ee": [1, { - "edu": _2, - "gov": _2, - "riik": _2, - "lib": _2, - "med": _2, - "com": _6, - "pri": _2, - "aip": _2, - "org": _2, - "fie": _2 - }], - "eg": [1, { - "com": _6, - "edu": _2, - "eun": _2, - "gov": _2, - "mil": _2, - "name": _2, - "net": _2, - "org": _2, - "sci": _2 - }], - "er": _8, - "es": [1, { - "com": _6, - "nom": _2, - "org": _2, - "gob": _2, - "edu": _2, - "123miweb": _3, - "myspreadshop": _3 - }], - "et": [1, { - "com": _2, - "gov": _2, - "org": _2, - "edu": _2, - "biz": _2, - "name": _2, - "info": _2, - "net": _2 - }], - "eu": [1, { - "airkitapps": _3, - "mycd": _3, - "cloudns": _3, - "dogado": _29, - "barsy": _3, - "wellbeingzone": _3, - "spdns": _3, - "transurl": _5, - "diskstation": _3 - }], - "fi": [1, { - "aland": _2, - "dy": _3, - "blogspot": _3, - "xn--hkkinen-5wa": _3, - "häkkinen": _3, - "iki": _3, - "cloudplatform": [0, { - "fi": _3 - }], - "datacenter": [0, { - "demo": _3, - "paas": _3 - }], - "kapsi": _3, - "123kotisivu": _3, - "myspreadshop": _3 - }], - "fj": [1, { - "ac": _2, - "biz": _2, - "com": _2, - "gov": _2, - "info": _2, - "mil": _2, - "name": _2, - "net": _2, - "org": _2, - "pro": _2 - }], - "fk": _8, - "fm": [1, { - "com": _2, - "edu": _2, - "net": _2, - "org": _2, - "radio": _3, - "user": _5 - }], - "fo": _2, - "fr": [1, { - "asso": _2, - "com": _2, - "gouv": _2, - "nom": _2, - "prd": _2, - "tm": _2, - "aeroport": _2, - "avocat": _2, - "avoues": _2, - "cci": _2, - "chambagri": _2, - "chirurgiens-dentistes": _2, - "experts-comptables": _2, - "geometre-expert": _2, - "greta": _2, - "huissier-justice": _2, - "medecin": _2, - "notaires": _2, - "pharmacien": _2, - "port": _2, - "veterinaire": _2, - "en-root": _3, - "fbx-os": _3, - "fbxos": _3, - "freebox-os": _3, - "freeboxos": _3, - "blogspot": _3, - "goupile": _3, - "123siteweb": _3, - "on-web": _3, - "chirurgiens-dentistes-en-france": _3, - "dedibox": _3, - "myspreadshop": _3, - "ynh": _3 - }], - "ga": _2, - "gb": _2, - "gd": [1, { - "edu": _2, - "gov": _2 - }], - "ge": [1, { - "com": _2, - "edu": _2, - "gov": _2, - "org": _2, - "mil": _2, - "net": _2, - "pvt": _2 - }], - "gf": _2, - "gg": [1, { - "co": _2, - "net": _2, - "org": _2, - "kaas": _3, - "cya": _3, - "panel": [2, { - "daemon": _3 - }] - }], - "gh": [1, { - "com": _2, - "edu": _2, - "gov": _2, - "org": _2, - "mil": _2 - }], - "gi": [1, { - "com": _2, - "ltd": _2, - "gov": _2, - "mod": _2, - "edu": _2, - "org": _2 - }], - "gl": [1, { - "co": _2, - "com": _2, - "edu": _2, - "net": _2, - "org": _2, - "biz": _3, - "xx": _3 - }], - "gm": _2, - "gn": [1, { - "ac": _2, - "com": _2, - "edu": _2, - "gov": _2, - "org": _2, - "net": _2 - }], - "gov": _2, - "gp": [1, { - "com": _2, - "net": _2, - "mobi": _2, - "edu": _2, - "org": _2, - "asso": _2, - "app": _3 - }], - "gq": _2, - "gr": [1, { - "com": _2, - "edu": _2, - "net": _2, - "org": _2, - "gov": _2, - "blogspot": _3, - "simplesite": _3 - }], - "gs": _2, - "gt": [1, { - "com": _2, - "edu": _2, - "gob": _2, - "ind": _2, - "mil": _2, - "net": _2, - "org": _2, - "blog": _3, - "de": _3, - "to": _3 - }], - "gu": [1, { - "com": _2, - "edu": _2, - "gov": _2, - "guam": _2, - "info": _2, - "net": _2, - "org": _2, - "web": _2 - }], - "gw": _2, - "gy": [1, { - "co": _2, - "com": _2, - "edu": _2, - "gov": _2, - "net": _2, - "org": _2, - "be": _3 - }], - "hk": [1, { - "com": _2, - "edu": _2, - "gov": _2, - "idv": _2, - "net": _2, - "org": _2, - "xn--55qx5d": _2, - "公司": _2, - "xn--wcvs22d": _2, - "教育": _2, - "xn--lcvr32d": _2, - "敎育": _2, - "xn--mxtq1m": _2, - "政府": _2, - "xn--gmqw5a": _2, - "個人": _2, - "xn--ciqpn": _2, - "个人": _2, - "xn--gmq050i": _2, - "箇人": _2, - "xn--zf0avx": _2, - "網络": _2, - "xn--io0a7i": _2, - "网络": _2, - "xn--mk0axi": _2, - "组織": _2, - "xn--od0alg": _2, - "網絡": _2, - "xn--od0aq3b": _2, - "网絡": _2, - "xn--tn0ag": _2, - "组织": _2, - "xn--uc0atv": _2, - "組織": _2, - "xn--uc0ay4a": _2, - "組织": _2, - "blogspot": _3, - "secaas": _3, - "ltd": _3, - "inc": _3 - }], - "hm": _2, - "hn": [1, { - "com": _2, - "edu": _2, - "org": _2, - "net": _2, - "mil": _2, - "gob": _2, - "cc": _3 - }], - "hr": [1, { - "iz": _2, - "from": _2, - "name": _2, - "com": _2, - "blogspot": _3, - "free": _3 - }], - "ht": [1, { - "com": _2, - "shop": _2, - "firm": _2, - "info": _2, - "adult": _2, - "net": _2, - "pro": _2, - "org": _2, - "med": _2, - "art": _2, - "coop": _2, - "pol": _2, - "asso": _2, - "edu": _2, - "rel": _2, - "gouv": _2, - "perso": _2 - }], - "hu": [1, { - "2000": _2, - "co": _2, - "info": _2, - "org": _2, - "priv": _2, - "sport": _2, - "tm": _2, - "agrar": _2, - "bolt": _2, - "casino": _2, - "city": _2, - "erotica": _2, - "erotika": _2, - "film": _2, - "forum": _2, - "games": _2, - "hotel": _2, - "ingatlan": _2, - "jogasz": _2, - "konyvelo": _2, - "lakas": _2, - "media": _2, - "news": _2, - "reklam": _2, - "sex": _2, - "shop": _2, - "suli": _2, - "szex": _2, - "tozsde": _2, - "utazas": _2, - "video": _2, - "blogspot": _3 - }], - "id": [1, { - "ac": _2, - "biz": _2, - "co": _6, - "desa": _2, - "go": _2, - "mil": _2, - "my": [1, { - "rss": _5 - }], - "net": _2, - "or": _2, - "ponpes": _2, - "sch": _2, - "web": _2, - "flap": _3, - "forte": _3 - }], - "ie": [1, { - "gov": _2, - "blogspot": _3, - "myspreadshop": _3 - }], - "il": [1, { - "ac": _2, - "co": [1, { - "ravpage": _3, - "blogspot": _3, - "tabitorder": _3, - "mytabit": _3 - }], - "gov": _2, - "idf": _2, - "k12": _2, - "muni": _2, - "net": _2, - "org": _2 - }], - "xn--4dbrk0ce": [1, { - "xn--4dbgdty6c": _2, - "xn--5dbhl8d": _2, - "xn--8dbq2a": _2, - "xn--hebda8b": _2 - }], - "ישראל": [1, { - "אקדמיה": _2, - "ישוב": _2, - "צהל": _2, - "ממשל": _2 - }], - "im": [1, { - "ac": _2, - "co": [1, { - "ltd": _2, - "plc": _2 - }], - "com": _2, - "net": _2, - "org": _2, - "tt": _2, - "tv": _2, - "ro": _3 - }], - "in": [1, { - "5g": _2, - "6g": _2, - "ac": _2, - "ai": _2, - "am": _2, - "bihar": _2, - "biz": _2, - "business": _2, - "ca": _2, - "cn": _2, - "co": _2, - "com": _2, - "coop": _2, - "cs": _2, - "delhi": _2, - "dr": _2, - "edu": _2, - "er": _2, - "firm": _2, - "gen": _2, - "gov": _2, - "gujarat": _2, - "ind": _2, - "info": _2, - "int": _2, - "internet": _2, - "io": _2, - "me": _2, - "mil": _2, - "net": _2, - "nic": _2, - "org": _2, - "pg": _2, - "post": _2, - "pro": _2, - "res": _2, - "travel": _2, - "tv": _2, - "uk": _2, - "up": _2, - "us": _2, - "web": _3, - "cloudns": _3, - "blogspot": _3, - "barsy": _3, - "supabase": _3 - }], - "info": [1, { - "cloudns": _3, - "dynamic-dns": _3, - "dyndns": _3, - "barrel-of-knowledge": _3, - "barrell-of-knowledge": _3, - "for-our": _3, - "groks-the": _3, - "groks-this": _3, - "here-for-more": _3, - "knowsitall": _3, - "selfip": _3, - "webhop": _3, - "barsy": _3, - "mayfirst": _3, - "forumz": _3, - "nsupdate": _3, - "dvrcam": _3, - "ilovecollege": _3, - "no-ip": _3, - "dnsupdate": _3, - "v-info": _3 - }], - "int": [1, { - "eu": _2 - }], - "io": [1, { - "2038": _3, - "com": _2, - "on-acorn": _5, - "apigee": _3, - "b-data": _3, - "backplaneapp": _3, - "banzaicloud": [0, { - "app": _3, - "backyards": _5 - }], - "beagleboard": _3, - "bitbucket": _3, - "bluebite": _3, - "boxfuse": _3, - "browsersafetymark": _3, - "bigv": [0, { - "uk0": _3 - }], - "cleverapps": _3, - "dappnode": [0, { - "dyndns": _3 - }], - "dedyn": _3, - "drud": _3, - "definima": _3, - "fh-muenster": _3, - "shw": _3, - "forgerock": [0, { - "id": _3 - }], - "ghost": _3, - "github": _3, - "gitlab": _3, - "lolipop": _3, - "hasura-app": _3, - "hostyhosting": _3, - "moonscale": _5, - "beebyte": _22, - "beebyteapp": [0, { - "sekd1": _3 - }], - "jele": _3, - "unispace": [0, { - "cloud-fr1": _3 - }], - "webthings": _3, - "loginline": _3, - "barsy": _3, - "azurecontainer": _5, - "ngrok": [2, { - "ap": _3, - "au": _3, - "eu": _3, - "in": _3, - "jp": _3, - "sa": _3, - "us": _3 - }], - "nodeart": [0, { - "stage": _3 - }], - "nid": _3, - "pantheonsite": _3, - "dyn53": _3, - "pstmn": [2, { - "mock": _3 - }], - "protonet": _3, - "qoto": _3, - "qcx": [2, { - "sys": _5 - }], - "vaporcloud": _3, - "vbrplsbx": [0, { - "g": _3 - }], - "on-k3s": _5, - "on-rio": _5, - "readthedocs": _3, - "resindevice": _3, - "resinstaging": [0, { - "devices": _3 - }], - "hzc": _3, - "sandcats": _3, - "shiftcrypto": _3, - "shiftedit": _3, - "mo-siemens": _3, - "musician": _3, - "lair": _21, - "stolos": _5, - "spacekit": _3, - "utwente": _3, - "s5y": _5, - "edugit": _3, - "telebit": _3, - "thingdust": [0, { - "dev": _32, - "disrec": _32, - "prod": _33, - "testing": _32 - }], - "tickets": _3, - "upli": _3, - "wedeploy": _3, - "editorx": _3, - "basicserver": _3, - "virtualserver": _3 - }], - "iq": _34, - "ir": [1, { - "ac": _2, - "co": _2, - "gov": _2, - "id": _2, - "net": _2, - "org": _2, - "sch": _2, - "xn--mgba3a4f16a": _2, - "ایران": _2, - "xn--mgba3a4fra": _2, - "ايران": _2 - }], - "is": [1, { - "net": _2, - "com": _2, - "edu": _2, - "gov": _2, - "org": _2, - "int": _2, - "cupcake": _3, - "blogspot": _3 - }], - "it": [1, { - "gov": _2, - "edu": _2, - "abr": _2, - "abruzzo": _2, - "aosta-valley": _2, - "aostavalley": _2, - "bas": _2, - "basilicata": _2, - "cal": _2, - "calabria": _2, - "cam": _2, - "campania": _2, - "emilia-romagna": _2, - "emiliaromagna": _2, - "emr": _2, - "friuli-v-giulia": _2, - "friuli-ve-giulia": _2, - "friuli-vegiulia": _2, - "friuli-venezia-giulia": _2, - "friuli-veneziagiulia": _2, - "friuli-vgiulia": _2, - "friuliv-giulia": _2, - "friulive-giulia": _2, - "friulivegiulia": _2, - "friulivenezia-giulia": _2, - "friuliveneziagiulia": _2, - "friulivgiulia": _2, - "fvg": _2, - "laz": _2, - "lazio": _2, - "lig": _2, - "liguria": _2, - "lom": _2, - "lombardia": _2, - "lombardy": _2, - "lucania": _2, - "mar": _2, - "marche": _2, - "mol": _2, - "molise": _2, - "piedmont": _2, - "piemonte": _2, - "pmn": _2, - "pug": _2, - "puglia": _2, - "sar": _2, - "sardegna": _2, - "sardinia": _2, - "sic": _2, - "sicilia": _2, - "sicily": _2, - "taa": _2, - "tos": _2, - "toscana": _2, - "trentin-sud-tirol": _2, - "xn--trentin-sd-tirol-rzb": _2, - "trentin-süd-tirol": _2, - "trentin-sudtirol": _2, - "xn--trentin-sdtirol-7vb": _2, - "trentin-südtirol": _2, - "trentin-sued-tirol": _2, - "trentin-suedtirol": _2, - "trentino-a-adige": _2, - "trentino-aadige": _2, - "trentino-alto-adige": _2, - "trentino-altoadige": _2, - "trentino-s-tirol": _2, - "trentino-stirol": _2, - "trentino-sud-tirol": _2, - "xn--trentino-sd-tirol-c3b": _2, - "trentino-süd-tirol": _2, - "trentino-sudtirol": _2, - "xn--trentino-sdtirol-szb": _2, - "trentino-südtirol": _2, - "trentino-sued-tirol": _2, - "trentino-suedtirol": _2, - "trentino": _2, - "trentinoa-adige": _2, - "trentinoaadige": _2, - "trentinoalto-adige": _2, - "trentinoaltoadige": _2, - "trentinos-tirol": _2, - "trentinostirol": _2, - "trentinosud-tirol": _2, - "xn--trentinosd-tirol-rzb": _2, - "trentinosüd-tirol": _2, - "trentinosudtirol": _2, - "xn--trentinosdtirol-7vb": _2, - "trentinosüdtirol": _2, - "trentinosued-tirol": _2, - "trentinosuedtirol": _2, - "trentinsud-tirol": _2, - "xn--trentinsd-tirol-6vb": _2, - "trentinsüd-tirol": _2, - "trentinsudtirol": _2, - "xn--trentinsdtirol-nsb": _2, - "trentinsüdtirol": _2, - "trentinsued-tirol": _2, - "trentinsuedtirol": _2, - "tuscany": _2, - "umb": _2, - "umbria": _2, - "val-d-aosta": _2, - "val-daosta": _2, - "vald-aosta": _2, - "valdaosta": _2, - "valle-aosta": _2, - "valle-d-aosta": _2, - "valle-daosta": _2, - "valleaosta": _2, - "valled-aosta": _2, - "valledaosta": _2, - "vallee-aoste": _2, - "xn--valle-aoste-ebb": _2, - "vallée-aoste": _2, - "vallee-d-aoste": _2, - "xn--valle-d-aoste-ehb": _2, - "vallée-d-aoste": _2, - "valleeaoste": _2, - "xn--valleaoste-e7a": _2, - "valléeaoste": _2, - "valleedaoste": _2, - "xn--valledaoste-ebb": _2, - "valléedaoste": _2, - "vao": _2, - "vda": _2, - "ven": _2, - "veneto": _2, - "ag": _2, - "agrigento": _2, - "al": _2, - "alessandria": _2, - "alto-adige": _2, - "altoadige": _2, - "an": _2, - "ancona": _2, - "andria-barletta-trani": _2, - "andria-trani-barletta": _2, - "andriabarlettatrani": _2, - "andriatranibarletta": _2, - "ao": _2, - "aosta": _2, - "aoste": _2, - "ap": _2, - "aq": _2, - "aquila": _2, - "ar": _2, - "arezzo": _2, - "ascoli-piceno": _2, - "ascolipiceno": _2, - "asti": _2, - "at": _2, - "av": _2, - "avellino": _2, - "ba": _2, - "balsan-sudtirol": _2, - "xn--balsan-sdtirol-nsb": _2, - "balsan-südtirol": _2, - "balsan-suedtirol": _2, - "balsan": _2, - "bari": _2, - "barletta-trani-andria": _2, - "barlettatraniandria": _2, - "belluno": _2, - "benevento": _2, - "bergamo": _2, - "bg": _2, - "bi": _2, - "biella": _2, - "bl": _2, - "bn": _2, - "bo": _2, - "bologna": _2, - "bolzano-altoadige": _2, - "bolzano": _2, - "bozen-sudtirol": _2, - "xn--bozen-sdtirol-2ob": _2, - "bozen-südtirol": _2, - "bozen-suedtirol": _2, - "bozen": _2, - "br": _2, - "brescia": _2, - "brindisi": _2, - "bs": _2, - "bt": _2, - "bulsan-sudtirol": _2, - "xn--bulsan-sdtirol-nsb": _2, - "bulsan-südtirol": _2, - "bulsan-suedtirol": _2, - "bulsan": _2, - "bz": _2, - "ca": _2, - "cagliari": _2, - "caltanissetta": _2, - "campidano-medio": _2, - "campidanomedio": _2, - "campobasso": _2, - "carbonia-iglesias": _2, - "carboniaiglesias": _2, - "carrara-massa": _2, - "carraramassa": _2, - "caserta": _2, - "catania": _2, - "catanzaro": _2, - "cb": _2, - "ce": _2, - "cesena-forli": _2, - "xn--cesena-forl-mcb": _2, - "cesena-forlì": _2, - "cesenaforli": _2, - "xn--cesenaforl-i8a": _2, - "cesenaforlì": _2, - "ch": _2, - "chieti": _2, - "ci": _2, - "cl": _2, - "cn": _2, - "co": _2, - "como": _2, - "cosenza": _2, - "cr": _2, - "cremona": _2, - "crotone": _2, - "cs": _2, - "ct": _2, - "cuneo": _2, - "cz": _2, - "dell-ogliastra": _2, - "dellogliastra": _2, - "en": _2, - "enna": _2, - "fc": _2, - "fe": _2, - "fermo": _2, - "ferrara": _2, - "fg": _2, - "fi": _2, - "firenze": _2, - "florence": _2, - "fm": _2, - "foggia": _2, - "forli-cesena": _2, - "xn--forl-cesena-fcb": _2, - "forlì-cesena": _2, - "forlicesena": _2, - "xn--forlcesena-c8a": _2, - "forlìcesena": _2, - "fr": _2, - "frosinone": _2, - "ge": _2, - "genoa": _2, - "genova": _2, - "go": _2, - "gorizia": _2, - "gr": _2, - "grosseto": _2, - "iglesias-carbonia": _2, - "iglesiascarbonia": _2, - "im": _2, - "imperia": _2, - "is": _2, - "isernia": _2, - "kr": _2, - "la-spezia": _2, - "laquila": _2, - "laspezia": _2, - "latina": _2, - "lc": _2, - "le": _2, - "lecce": _2, - "lecco": _2, - "li": _2, - "livorno": _2, - "lo": _2, - "lodi": _2, - "lt": _2, - "lu": _2, - "lucca": _2, - "macerata": _2, - "mantova": _2, - "massa-carrara": _2, - "massacarrara": _2, - "matera": _2, - "mb": _2, - "mc": _2, - "me": _2, - "medio-campidano": _2, - "mediocampidano": _2, - "messina": _2, - "mi": _2, - "milan": _2, - "milano": _2, - "mn": _2, - "mo": _2, - "modena": _2, - "monza-brianza": _2, - "monza-e-della-brianza": _2, - "monza": _2, - "monzabrianza": _2, - "monzaebrianza": _2, - "monzaedellabrianza": _2, - "ms": _2, - "mt": _2, - "na": _2, - "naples": _2, - "napoli": _2, - "no": _2, - "novara": _2, - "nu": _2, - "nuoro": _2, - "og": _2, - "ogliastra": _2, - "olbia-tempio": _2, - "olbiatempio": _2, - "or": _2, - "oristano": _2, - "ot": _2, - "pa": _2, - "padova": _2, - "padua": _2, - "palermo": _2, - "parma": _2, - "pavia": _2, - "pc": _2, - "pd": _2, - "pe": _2, - "perugia": _2, - "pesaro-urbino": _2, - "pesarourbino": _2, - "pescara": _2, - "pg": _2, - "pi": _2, - "piacenza": _2, - "pisa": _2, - "pistoia": _2, - "pn": _2, - "po": _2, - "pordenone": _2, - "potenza": _2, - "pr": _2, - "prato": _2, - "pt": _2, - "pu": _2, - "pv": _2, - "pz": _2, - "ra": _2, - "ragusa": _2, - "ravenna": _2, - "rc": _2, - "re": _2, - "reggio-calabria": _2, - "reggio-emilia": _2, - "reggiocalabria": _2, - "reggioemilia": _2, - "rg": _2, - "ri": _2, - "rieti": _2, - "rimini": _2, - "rm": _2, - "rn": _2, - "ro": _2, - "roma": _2, - "rome": _2, - "rovigo": _2, - "sa": _2, - "salerno": _2, - "sassari": _2, - "savona": _2, - "si": _2, - "siena": _2, - "siracusa": _2, - "so": _2, - "sondrio": _2, - "sp": _2, - "sr": _2, - "ss": _2, - "suedtirol": _2, - "xn--sdtirol-n2a": _2, - "südtirol": _2, - "sv": _2, - "ta": _2, - "taranto": _2, - "te": _2, - "tempio-olbia": _2, - "tempioolbia": _2, - "teramo": _2, - "terni": _2, - "tn": _2, - "to": _2, - "torino": _2, - "tp": _2, - "tr": _2, - "trani-andria-barletta": _2, - "trani-barletta-andria": _2, - "traniandriabarletta": _2, - "tranibarlettaandria": _2, - "trapani": _2, - "trento": _2, - "treviso": _2, - "trieste": _2, - "ts": _2, - "turin": _2, - "tv": _2, - "ud": _2, - "udine": _2, - "urbino-pesaro": _2, - "urbinopesaro": _2, - "va": _2, - "varese": _2, - "vb": _2, - "vc": _2, - "ve": _2, - "venezia": _2, - "venice": _2, - "verbania": _2, - "vercelli": _2, - "verona": _2, - "vi": _2, - "vibo-valentia": _2, - "vibovalentia": _2, - "vicenza": _2, - "viterbo": _2, - "vr": _2, - "vs": _2, - "vt": _2, - "vv": _2, - "blogspot": _3, - "ibxos": _3, - "iliadboxos": _3, - "neen": [0, { - "jc": _3 - }], - "tim": [0, { - "open": [0, { - "jelastic": _9 - }] - }], - "16-b": _3, - "32-b": _3, - "64-b": _3, - "123homepage": _3, - "myspreadshop": _3, - "syncloud": _3 - }], - "je": [1, { - "co": _2, - "net": _2, - "org": _2, - "of": _3 - }], - "jm": _8, - "jo": [1, { - "com": _2, - "org": _2, - "net": _2, - "edu": _2, - "sch": _2, - "gov": _2, - "mil": _2, - "name": _2 - }], - "jobs": _2, - "jp": [1, { - "ac": _2, - "ad": _2, - "co": _2, - "ed": _2, - "go": _2, - "gr": _2, - "lg": _2, - "ne": [1, { - "aseinet": _30, - "gehirn": _3, - "ivory": _3, - "mail-box": _3, - "mints": _3, - "mokuren": _3, - "opal": _3, - "sakura": _3, - "sumomo": _3, - "topaz": _3 - }], - "or": _2, - "aichi": [1, { - "aisai": _2, - "ama": _2, - "anjo": _2, - "asuke": _2, - "chiryu": _2, - "chita": _2, - "fuso": _2, - "gamagori": _2, - "handa": _2, - "hazu": _2, - "hekinan": _2, - "higashiura": _2, - "ichinomiya": _2, - "inazawa": _2, - "inuyama": _2, - "isshiki": _2, - "iwakura": _2, - "kanie": _2, - "kariya": _2, - "kasugai": _2, - "kira": _2, - "kiyosu": _2, - "komaki": _2, - "konan": _2, - "kota": _2, - "mihama": _2, - "miyoshi": _2, - "nishio": _2, - "nisshin": _2, - "obu": _2, - "oguchi": _2, - "oharu": _2, - "okazaki": _2, - "owariasahi": _2, - "seto": _2, - "shikatsu": _2, - "shinshiro": _2, - "shitara": _2, - "tahara": _2, - "takahama": _2, - "tobishima": _2, - "toei": _2, - "togo": _2, - "tokai": _2, - "tokoname": _2, - "toyoake": _2, - "toyohashi": _2, - "toyokawa": _2, - "toyone": _2, - "toyota": _2, - "tsushima": _2, - "yatomi": _2 - }], - "akita": [1, { - "akita": _2, - "daisen": _2, - "fujisato": _2, - "gojome": _2, - "hachirogata": _2, - "happou": _2, - "higashinaruse": _2, - "honjo": _2, - "honjyo": _2, - "ikawa": _2, - "kamikoani": _2, - "kamioka": _2, - "katagami": _2, - "kazuno": _2, - "kitaakita": _2, - "kosaka": _2, - "kyowa": _2, - "misato": _2, - "mitane": _2, - "moriyoshi": _2, - "nikaho": _2, - "noshiro": _2, - "odate": _2, - "oga": _2, - "ogata": _2, - "semboku": _2, - "yokote": _2, - "yurihonjo": _2 - }], - "aomori": [1, { - "aomori": _2, - "gonohe": _2, - "hachinohe": _2, - "hashikami": _2, - "hiranai": _2, - "hirosaki": _2, - "itayanagi": _2, - "kuroishi": _2, - "misawa": _2, - "mutsu": _2, - "nakadomari": _2, - "noheji": _2, - "oirase": _2, - "owani": _2, - "rokunohe": _2, - "sannohe": _2, - "shichinohe": _2, - "shingo": _2, - "takko": _2, - "towada": _2, - "tsugaru": _2, - "tsuruta": _2 - }], - "chiba": [1, { - "abiko": _2, - "asahi": _2, - "chonan": _2, - "chosei": _2, - "choshi": _2, - "chuo": _2, - "funabashi": _2, - "futtsu": _2, - "hanamigawa": _2, - "ichihara": _2, - "ichikawa": _2, - "ichinomiya": _2, - "inzai": _2, - "isumi": _2, - "kamagaya": _2, - "kamogawa": _2, - "kashiwa": _2, - "katori": _2, - "katsuura": _2, - "kimitsu": _2, - "kisarazu": _2, - "kozaki": _2, - "kujukuri": _2, - "kyonan": _2, - "matsudo": _2, - "midori": _2, - "mihama": _2, - "minamiboso": _2, - "mobara": _2, - "mutsuzawa": _2, - "nagara": _2, - "nagareyama": _2, - "narashino": _2, - "narita": _2, - "noda": _2, - "oamishirasato": _2, - "omigawa": _2, - "onjuku": _2, - "otaki": _2, - "sakae": _2, - "sakura": _2, - "shimofusa": _2, - "shirako": _2, - "shiroi": _2, - "shisui": _2, - "sodegaura": _2, - "sosa": _2, - "tako": _2, - "tateyama": _2, - "togane": _2, - "tohnosho": _2, - "tomisato": _2, - "urayasu": _2, - "yachimata": _2, - "yachiyo": _2, - "yokaichiba": _2, - "yokoshibahikari": _2, - "yotsukaido": _2 - }], - "ehime": [1, { - "ainan": _2, - "honai": _2, - "ikata": _2, - "imabari": _2, - "iyo": _2, - "kamijima": _2, - "kihoku": _2, - "kumakogen": _2, - "masaki": _2, - "matsuno": _2, - "matsuyama": _2, - "namikata": _2, - "niihama": _2, - "ozu": _2, - "saijo": _2, - "seiyo": _2, - "shikokuchuo": _2, - "tobe": _2, - "toon": _2, - "uchiko": _2, - "uwajima": _2, - "yawatahama": _2 - }], - "fukui": [1, { - "echizen": _2, - "eiheiji": _2, - "fukui": _2, - "ikeda": _2, - "katsuyama": _2, - "mihama": _2, - "minamiechizen": _2, - "obama": _2, - "ohi": _2, - "ono": _2, - "sabae": _2, - "sakai": _2, - "takahama": _2, - "tsuruga": _2, - "wakasa": _2 - }], - "fukuoka": [1, { - "ashiya": _2, - "buzen": _2, - "chikugo": _2, - "chikuho": _2, - "chikujo": _2, - "chikushino": _2, - "chikuzen": _2, - "chuo": _2, - "dazaifu": _2, - "fukuchi": _2, - "hakata": _2, - "higashi": _2, - "hirokawa": _2, - "hisayama": _2, - "iizuka": _2, - "inatsuki": _2, - "kaho": _2, - "kasuga": _2, - "kasuya": _2, - "kawara": _2, - "keisen": _2, - "koga": _2, - "kurate": _2, - "kurogi": _2, - "kurume": _2, - "minami": _2, - "miyako": _2, - "miyama": _2, - "miyawaka": _2, - "mizumaki": _2, - "munakata": _2, - "nakagawa": _2, - "nakama": _2, - "nishi": _2, - "nogata": _2, - "ogori": _2, - "okagaki": _2, - "okawa": _2, - "oki": _2, - "omuta": _2, - "onga": _2, - "onojo": _2, - "oto": _2, - "saigawa": _2, - "sasaguri": _2, - "shingu": _2, - "shinyoshitomi": _2, - "shonai": _2, - "soeda": _2, - "sue": _2, - "tachiarai": _2, - "tagawa": _2, - "takata": _2, - "toho": _2, - "toyotsu": _2, - "tsuiki": _2, - "ukiha": _2, - "umi": _2, - "usui": _2, - "yamada": _2, - "yame": _2, - "yanagawa": _2, - "yukuhashi": _2 - }], - "fukushima": [1, { - "aizubange": _2, - "aizumisato": _2, - "aizuwakamatsu": _2, - "asakawa": _2, - "bandai": _2, - "date": _2, - "fukushima": _2, - "furudono": _2, - "futaba": _2, - "hanawa": _2, - "higashi": _2, - "hirata": _2, - "hirono": _2, - "iitate": _2, - "inawashiro": _2, - "ishikawa": _2, - "iwaki": _2, - "izumizaki": _2, - "kagamiishi": _2, - "kaneyama": _2, - "kawamata": _2, - "kitakata": _2, - "kitashiobara": _2, - "koori": _2, - "koriyama": _2, - "kunimi": _2, - "miharu": _2, - "mishima": _2, - "namie": _2, - "nango": _2, - "nishiaizu": _2, - "nishigo": _2, - "okuma": _2, - "omotego": _2, - "ono": _2, - "otama": _2, - "samegawa": _2, - "shimogo": _2, - "shirakawa": _2, - "showa": _2, - "soma": _2, - "sukagawa": _2, - "taishin": _2, - "tamakawa": _2, - "tanagura": _2, - "tenei": _2, - "yabuki": _2, - "yamato": _2, - "yamatsuri": _2, - "yanaizu": _2, - "yugawa": _2 - }], - "gifu": [1, { - "anpachi": _2, - "ena": _2, - "gifu": _2, - "ginan": _2, - "godo": _2, - "gujo": _2, - "hashima": _2, - "hichiso": _2, - "hida": _2, - "higashishirakawa": _2, - "ibigawa": _2, - "ikeda": _2, - "kakamigahara": _2, - "kani": _2, - "kasahara": _2, - "kasamatsu": _2, - "kawaue": _2, - "kitagata": _2, - "mino": _2, - "minokamo": _2, - "mitake": _2, - "mizunami": _2, - "motosu": _2, - "nakatsugawa": _2, - "ogaki": _2, - "sakahogi": _2, - "seki": _2, - "sekigahara": _2, - "shirakawa": _2, - "tajimi": _2, - "takayama": _2, - "tarui": _2, - "toki": _2, - "tomika": _2, - "wanouchi": _2, - "yamagata": _2, - "yaotsu": _2, - "yoro": _2 - }], - "gunma": [1, { - "annaka": _2, - "chiyoda": _2, - "fujioka": _2, - "higashiagatsuma": _2, - "isesaki": _2, - "itakura": _2, - "kanna": _2, - "kanra": _2, - "katashina": _2, - "kawaba": _2, - "kiryu": _2, - "kusatsu": _2, - "maebashi": _2, - "meiwa": _2, - "midori": _2, - "minakami": _2, - "naganohara": _2, - "nakanojo": _2, - "nanmoku": _2, - "numata": _2, - "oizumi": _2, - "ora": _2, - "ota": _2, - "shibukawa": _2, - "shimonita": _2, - "shinto": _2, - "showa": _2, - "takasaki": _2, - "takayama": _2, - "tamamura": _2, - "tatebayashi": _2, - "tomioka": _2, - "tsukiyono": _2, - "tsumagoi": _2, - "ueno": _2, - "yoshioka": _2 - }], - "hiroshima": [1, { - "asaminami": _2, - "daiwa": _2, - "etajima": _2, - "fuchu": _2, - "fukuyama": _2, - "hatsukaichi": _2, - "higashihiroshima": _2, - "hongo": _2, - "jinsekikogen": _2, - "kaita": _2, - "kui": _2, - "kumano": _2, - "kure": _2, - "mihara": _2, - "miyoshi": _2, - "naka": _2, - "onomichi": _2, - "osakikamijima": _2, - "otake": _2, - "saka": _2, - "sera": _2, - "seranishi": _2, - "shinichi": _2, - "shobara": _2, - "takehara": _2 - }], - "hokkaido": [1, { - "abashiri": _2, - "abira": _2, - "aibetsu": _2, - "akabira": _2, - "akkeshi": _2, - "asahikawa": _2, - "ashibetsu": _2, - "ashoro": _2, - "assabu": _2, - "atsuma": _2, - "bibai": _2, - "biei": _2, - "bifuka": _2, - "bihoro": _2, - "biratori": _2, - "chippubetsu": _2, - "chitose": _2, - "date": _2, - "ebetsu": _2, - "embetsu": _2, - "eniwa": _2, - "erimo": _2, - "esan": _2, - "esashi": _2, - "fukagawa": _2, - "fukushima": _2, - "furano": _2, - "furubira": _2, - "haboro": _2, - "hakodate": _2, - "hamatonbetsu": _2, - "hidaka": _2, - "higashikagura": _2, - "higashikawa": _2, - "hiroo": _2, - "hokuryu": _2, - "hokuto": _2, - "honbetsu": _2, - "horokanai": _2, - "horonobe": _2, - "ikeda": _2, - "imakane": _2, - "ishikari": _2, - "iwamizawa": _2, - "iwanai": _2, - "kamifurano": _2, - "kamikawa": _2, - "kamishihoro": _2, - "kamisunagawa": _2, - "kamoenai": _2, - "kayabe": _2, - "kembuchi": _2, - "kikonai": _2, - "kimobetsu": _2, - "kitahiroshima": _2, - "kitami": _2, - "kiyosato": _2, - "koshimizu": _2, - "kunneppu": _2, - "kuriyama": _2, - "kuromatsunai": _2, - "kushiro": _2, - "kutchan": _2, - "kyowa": _2, - "mashike": _2, - "matsumae": _2, - "mikasa": _2, - "minamifurano": _2, - "mombetsu": _2, - "moseushi": _2, - "mukawa": _2, - "muroran": _2, - "naie": _2, - "nakagawa": _2, - "nakasatsunai": _2, - "nakatombetsu": _2, - "nanae": _2, - "nanporo": _2, - "nayoro": _2, - "nemuro": _2, - "niikappu": _2, - "niki": _2, - "nishiokoppe": _2, - "noboribetsu": _2, - "numata": _2, - "obihiro": _2, - "obira": _2, - "oketo": _2, - "okoppe": _2, - "otaru": _2, - "otobe": _2, - "otofuke": _2, - "otoineppu": _2, - "oumu": _2, - "ozora": _2, - "pippu": _2, - "rankoshi": _2, - "rebun": _2, - "rikubetsu": _2, - "rishiri": _2, - "rishirifuji": _2, - "saroma": _2, - "sarufutsu": _2, - "shakotan": _2, - "shari": _2, - "shibecha": _2, - "shibetsu": _2, - "shikabe": _2, - "shikaoi": _2, - "shimamaki": _2, - "shimizu": _2, - "shimokawa": _2, - "shinshinotsu": _2, - "shintoku": _2, - "shiranuka": _2, - "shiraoi": _2, - "shiriuchi": _2, - "sobetsu": _2, - "sunagawa": _2, - "taiki": _2, - "takasu": _2, - "takikawa": _2, - "takinoue": _2, - "teshikaga": _2, - "tobetsu": _2, - "tohma": _2, - "tomakomai": _2, - "tomari": _2, - "toya": _2, - "toyako": _2, - "toyotomi": _2, - "toyoura": _2, - "tsubetsu": _2, - "tsukigata": _2, - "urakawa": _2, - "urausu": _2, - "uryu": _2, - "utashinai": _2, - "wakkanai": _2, - "wassamu": _2, - "yakumo": _2, - "yoichi": _2 - }], - "hyogo": [1, { - "aioi": _2, - "akashi": _2, - "ako": _2, - "amagasaki": _2, - "aogaki": _2, - "asago": _2, - "ashiya": _2, - "awaji": _2, - "fukusaki": _2, - "goshiki": _2, - "harima": _2, - "himeji": _2, - "ichikawa": _2, - "inagawa": _2, - "itami": _2, - "kakogawa": _2, - "kamigori": _2, - "kamikawa": _2, - "kasai": _2, - "kasuga": _2, - "kawanishi": _2, - "miki": _2, - "minamiawaji": _2, - "nishinomiya": _2, - "nishiwaki": _2, - "ono": _2, - "sanda": _2, - "sannan": _2, - "sasayama": _2, - "sayo": _2, - "shingu": _2, - "shinonsen": _2, - "shiso": _2, - "sumoto": _2, - "taishi": _2, - "taka": _2, - "takarazuka": _2, - "takasago": _2, - "takino": _2, - "tamba": _2, - "tatsuno": _2, - "toyooka": _2, - "yabu": _2, - "yashiro": _2, - "yoka": _2, - "yokawa": _2 - }], - "ibaraki": [1, { - "ami": _2, - "asahi": _2, - "bando": _2, - "chikusei": _2, - "daigo": _2, - "fujishiro": _2, - "hitachi": _2, - "hitachinaka": _2, - "hitachiomiya": _2, - "hitachiota": _2, - "ibaraki": _2, - "ina": _2, - "inashiki": _2, - "itako": _2, - "iwama": _2, - "joso": _2, - "kamisu": _2, - "kasama": _2, - "kashima": _2, - "kasumigaura": _2, - "koga": _2, - "miho": _2, - "mito": _2, - "moriya": _2, - "naka": _2, - "namegata": _2, - "oarai": _2, - "ogawa": _2, - "omitama": _2, - "ryugasaki": _2, - "sakai": _2, - "sakuragawa": _2, - "shimodate": _2, - "shimotsuma": _2, - "shirosato": _2, - "sowa": _2, - "suifu": _2, - "takahagi": _2, - "tamatsukuri": _2, - "tokai": _2, - "tomobe": _2, - "tone": _2, - "toride": _2, - "tsuchiura": _2, - "tsukuba": _2, - "uchihara": _2, - "ushiku": _2, - "yachiyo": _2, - "yamagata": _2, - "yawara": _2, - "yuki": _2 - }], - "ishikawa": [1, { - "anamizu": _2, - "hakui": _2, - "hakusan": _2, - "kaga": _2, - "kahoku": _2, - "kanazawa": _2, - "kawakita": _2, - "komatsu": _2, - "nakanoto": _2, - "nanao": _2, - "nomi": _2, - "nonoichi": _2, - "noto": _2, - "shika": _2, - "suzu": _2, - "tsubata": _2, - "tsurugi": _2, - "uchinada": _2, - "wajima": _2 - }], - "iwate": [1, { - "fudai": _2, - "fujisawa": _2, - "hanamaki": _2, - "hiraizumi": _2, - "hirono": _2, - "ichinohe": _2, - "ichinoseki": _2, - "iwaizumi": _2, - "iwate": _2, - "joboji": _2, - "kamaishi": _2, - "kanegasaki": _2, - "karumai": _2, - "kawai": _2, - "kitakami": _2, - "kuji": _2, - "kunohe": _2, - "kuzumaki": _2, - "miyako": _2, - "mizusawa": _2, - "morioka": _2, - "ninohe": _2, - "noda": _2, - "ofunato": _2, - "oshu": _2, - "otsuchi": _2, - "rikuzentakata": _2, - "shiwa": _2, - "shizukuishi": _2, - "sumita": _2, - "tanohata": _2, - "tono": _2, - "yahaba": _2, - "yamada": _2 - }], - "kagawa": [1, { - "ayagawa": _2, - "higashikagawa": _2, - "kanonji": _2, - "kotohira": _2, - "manno": _2, - "marugame": _2, - "mitoyo": _2, - "naoshima": _2, - "sanuki": _2, - "tadotsu": _2, - "takamatsu": _2, - "tonosho": _2, - "uchinomi": _2, - "utazu": _2, - "zentsuji": _2 - }], - "kagoshima": [1, { - "akune": _2, - "amami": _2, - "hioki": _2, - "isa": _2, - "isen": _2, - "izumi": _2, - "kagoshima": _2, - "kanoya": _2, - "kawanabe": _2, - "kinko": _2, - "kouyama": _2, - "makurazaki": _2, - "matsumoto": _2, - "minamitane": _2, - "nakatane": _2, - "nishinoomote": _2, - "satsumasendai": _2, - "soo": _2, - "tarumizu": _2, - "yusui": _2 - }], - "kanagawa": [1, { - "aikawa": _2, - "atsugi": _2, - "ayase": _2, - "chigasaki": _2, - "ebina": _2, - "fujisawa": _2, - "hadano": _2, - "hakone": _2, - "hiratsuka": _2, - "isehara": _2, - "kaisei": _2, - "kamakura": _2, - "kiyokawa": _2, - "matsuda": _2, - "minamiashigara": _2, - "miura": _2, - "nakai": _2, - "ninomiya": _2, - "odawara": _2, - "oi": _2, - "oiso": _2, - "sagamihara": _2, - "samukawa": _2, - "tsukui": _2, - "yamakita": _2, - "yamato": _2, - "yokosuka": _2, - "yugawara": _2, - "zama": _2, - "zushi": _2 - }], - "kochi": [1, { - "aki": _2, - "geisei": _2, - "hidaka": _2, - "higashitsuno": _2, - "ino": _2, - "kagami": _2, - "kami": _2, - "kitagawa": _2, - "kochi": _2, - "mihara": _2, - "motoyama": _2, - "muroto": _2, - "nahari": _2, - "nakamura": _2, - "nankoku": _2, - "nishitosa": _2, - "niyodogawa": _2, - "ochi": _2, - "okawa": _2, - "otoyo": _2, - "otsuki": _2, - "sakawa": _2, - "sukumo": _2, - "susaki": _2, - "tosa": _2, - "tosashimizu": _2, - "toyo": _2, - "tsuno": _2, - "umaji": _2, - "yasuda": _2, - "yusuhara": _2 - }], - "kumamoto": [1, { - "amakusa": _2, - "arao": _2, - "aso": _2, - "choyo": _2, - "gyokuto": _2, - "kamiamakusa": _2, - "kikuchi": _2, - "kumamoto": _2, - "mashiki": _2, - "mifune": _2, - "minamata": _2, - "minamioguni": _2, - "nagasu": _2, - "nishihara": _2, - "oguni": _2, - "ozu": _2, - "sumoto": _2, - "takamori": _2, - "uki": _2, - "uto": _2, - "yamaga": _2, - "yamato": _2, - "yatsushiro": _2 - }], - "kyoto": [1, { - "ayabe": _2, - "fukuchiyama": _2, - "higashiyama": _2, - "ide": _2, - "ine": _2, - "joyo": _2, - "kameoka": _2, - "kamo": _2, - "kita": _2, - "kizu": _2, - "kumiyama": _2, - "kyotamba": _2, - "kyotanabe": _2, - "kyotango": _2, - "maizuru": _2, - "minami": _2, - "minamiyamashiro": _2, - "miyazu": _2, - "muko": _2, - "nagaokakyo": _2, - "nakagyo": _2, - "nantan": _2, - "oyamazaki": _2, - "sakyo": _2, - "seika": _2, - "tanabe": _2, - "uji": _2, - "ujitawara": _2, - "wazuka": _2, - "yamashina": _2, - "yawata": _2 - }], - "mie": [1, { - "asahi": _2, - "inabe": _2, - "ise": _2, - "kameyama": _2, - "kawagoe": _2, - "kiho": _2, - "kisosaki": _2, - "kiwa": _2, - "komono": _2, - "kumano": _2, - "kuwana": _2, - "matsusaka": _2, - "meiwa": _2, - "mihama": _2, - "minamiise": _2, - "misugi": _2, - "miyama": _2, - "nabari": _2, - "shima": _2, - "suzuka": _2, - "tado": _2, - "taiki": _2, - "taki": _2, - "tamaki": _2, - "toba": _2, - "tsu": _2, - "udono": _2, - "ureshino": _2, - "watarai": _2, - "yokkaichi": _2 - }], - "miyagi": [1, { - "furukawa": _2, - "higashimatsushima": _2, - "ishinomaki": _2, - "iwanuma": _2, - "kakuda": _2, - "kami": _2, - "kawasaki": _2, - "marumori": _2, - "matsushima": _2, - "minamisanriku": _2, - "misato": _2, - "murata": _2, - "natori": _2, - "ogawara": _2, - "ohira": _2, - "onagawa": _2, - "osaki": _2, - "rifu": _2, - "semine": _2, - "shibata": _2, - "shichikashuku": _2, - "shikama": _2, - "shiogama": _2, - "shiroishi": _2, - "tagajo": _2, - "taiwa": _2, - "tome": _2, - "tomiya": _2, - "wakuya": _2, - "watari": _2, - "yamamoto": _2, - "zao": _2 - }], - "miyazaki": [1, { - "aya": _2, - "ebino": _2, - "gokase": _2, - "hyuga": _2, - "kadogawa": _2, - "kawaminami": _2, - "kijo": _2, - "kitagawa": _2, - "kitakata": _2, - "kitaura": _2, - "kobayashi": _2, - "kunitomi": _2, - "kushima": _2, - "mimata": _2, - "miyakonojo": _2, - "miyazaki": _2, - "morotsuka": _2, - "nichinan": _2, - "nishimera": _2, - "nobeoka": _2, - "saito": _2, - "shiiba": _2, - "shintomi": _2, - "takaharu": _2, - "takanabe": _2, - "takazaki": _2, - "tsuno": _2 - }], - "nagano": [1, { - "achi": _2, - "agematsu": _2, - "anan": _2, - "aoki": _2, - "asahi": _2, - "azumino": _2, - "chikuhoku": _2, - "chikuma": _2, - "chino": _2, - "fujimi": _2, - "hakuba": _2, - "hara": _2, - "hiraya": _2, - "iida": _2, - "iijima": _2, - "iiyama": _2, - "iizuna": _2, - "ikeda": _2, - "ikusaka": _2, - "ina": _2, - "karuizawa": _2, - "kawakami": _2, - "kiso": _2, - "kisofukushima": _2, - "kitaaiki": _2, - "komagane": _2, - "komoro": _2, - "matsukawa": _2, - "matsumoto": _2, - "miasa": _2, - "minamiaiki": _2, - "minamimaki": _2, - "minamiminowa": _2, - "minowa": _2, - "miyada": _2, - "miyota": _2, - "mochizuki": _2, - "nagano": _2, - "nagawa": _2, - "nagiso": _2, - "nakagawa": _2, - "nakano": _2, - "nozawaonsen": _2, - "obuse": _2, - "ogawa": _2, - "okaya": _2, - "omachi": _2, - "omi": _2, - "ookuwa": _2, - "ooshika": _2, - "otaki": _2, - "otari": _2, - "sakae": _2, - "sakaki": _2, - "saku": _2, - "sakuho": _2, - "shimosuwa": _2, - "shinanomachi": _2, - "shiojiri": _2, - "suwa": _2, - "suzaka": _2, - "takagi": _2, - "takamori": _2, - "takayama": _2, - "tateshina": _2, - "tatsuno": _2, - "togakushi": _2, - "togura": _2, - "tomi": _2, - "ueda": _2, - "wada": _2, - "yamagata": _2, - "yamanouchi": _2, - "yasaka": _2, - "yasuoka": _2 - }], - "nagasaki": [1, { - "chijiwa": _2, - "futsu": _2, - "goto": _2, - "hasami": _2, - "hirado": _2, - "iki": _2, - "isahaya": _2, - "kawatana": _2, - "kuchinotsu": _2, - "matsuura": _2, - "nagasaki": _2, - "obama": _2, - "omura": _2, - "oseto": _2, - "saikai": _2, - "sasebo": _2, - "seihi": _2, - "shimabara": _2, - "shinkamigoto": _2, - "togitsu": _2, - "tsushima": _2, - "unzen": _2 - }], - "nara": [1, { - "ando": _2, - "gose": _2, - "heguri": _2, - "higashiyoshino": _2, - "ikaruga": _2, - "ikoma": _2, - "kamikitayama": _2, - "kanmaki": _2, - "kashiba": _2, - "kashihara": _2, - "katsuragi": _2, - "kawai": _2, - "kawakami": _2, - "kawanishi": _2, - "koryo": _2, - "kurotaki": _2, - "mitsue": _2, - "miyake": _2, - "nara": _2, - "nosegawa": _2, - "oji": _2, - "ouda": _2, - "oyodo": _2, - "sakurai": _2, - "sango": _2, - "shimoichi": _2, - "shimokitayama": _2, - "shinjo": _2, - "soni": _2, - "takatori": _2, - "tawaramoto": _2, - "tenkawa": _2, - "tenri": _2, - "uda": _2, - "yamatokoriyama": _2, - "yamatotakada": _2, - "yamazoe": _2, - "yoshino": _2 - }], - "niigata": [1, { - "aga": _2, - "agano": _2, - "gosen": _2, - "itoigawa": _2, - "izumozaki": _2, - "joetsu": _2, - "kamo": _2, - "kariwa": _2, - "kashiwazaki": _2, - "minamiuonuma": _2, - "mitsuke": _2, - "muika": _2, - "murakami": _2, - "myoko": _2, - "nagaoka": _2, - "niigata": _2, - "ojiya": _2, - "omi": _2, - "sado": _2, - "sanjo": _2, - "seiro": _2, - "seirou": _2, - "sekikawa": _2, - "shibata": _2, - "tagami": _2, - "tainai": _2, - "tochio": _2, - "tokamachi": _2, - "tsubame": _2, - "tsunan": _2, - "uonuma": _2, - "yahiko": _2, - "yoita": _2, - "yuzawa": _2 - }], - "oita": [1, { - "beppu": _2, - "bungoono": _2, - "bungotakada": _2, - "hasama": _2, - "hiji": _2, - "himeshima": _2, - "hita": _2, - "kamitsue": _2, - "kokonoe": _2, - "kuju": _2, - "kunisaki": _2, - "kusu": _2, - "oita": _2, - "saiki": _2, - "taketa": _2, - "tsukumi": _2, - "usa": _2, - "usuki": _2, - "yufu": _2 - }], - "okayama": [1, { - "akaiwa": _2, - "asakuchi": _2, - "bizen": _2, - "hayashima": _2, - "ibara": _2, - "kagamino": _2, - "kasaoka": _2, - "kibichuo": _2, - "kumenan": _2, - "kurashiki": _2, - "maniwa": _2, - "misaki": _2, - "nagi": _2, - "niimi": _2, - "nishiawakura": _2, - "okayama": _2, - "satosho": _2, - "setouchi": _2, - "shinjo": _2, - "shoo": _2, - "soja": _2, - "takahashi": _2, - "tamano": _2, - "tsuyama": _2, - "wake": _2, - "yakage": _2 - }], - "okinawa": [1, { - "aguni": _2, - "ginowan": _2, - "ginoza": _2, - "gushikami": _2, - "haebaru": _2, - "higashi": _2, - "hirara": _2, - "iheya": _2, - "ishigaki": _2, - "ishikawa": _2, - "itoman": _2, - "izena": _2, - "kadena": _2, - "kin": _2, - "kitadaito": _2, - "kitanakagusuku": _2, - "kumejima": _2, - "kunigami": _2, - "minamidaito": _2, - "motobu": _2, - "nago": _2, - "naha": _2, - "nakagusuku": _2, - "nakijin": _2, - "nanjo": _2, - "nishihara": _2, - "ogimi": _2, - "okinawa": _2, - "onna": _2, - "shimoji": _2, - "taketomi": _2, - "tarama": _2, - "tokashiki": _2, - "tomigusuku": _2, - "tonaki": _2, - "urasoe": _2, - "uruma": _2, - "yaese": _2, - "yomitan": _2, - "yonabaru": _2, - "yonaguni": _2, - "zamami": _2 - }], - "osaka": [1, { - "abeno": _2, - "chihayaakasaka": _2, - "chuo": _2, - "daito": _2, - "fujiidera": _2, - "habikino": _2, - "hannan": _2, - "higashiosaka": _2, - "higashisumiyoshi": _2, - "higashiyodogawa": _2, - "hirakata": _2, - "ibaraki": _2, - "ikeda": _2, - "izumi": _2, - "izumiotsu": _2, - "izumisano": _2, - "kadoma": _2, - "kaizuka": _2, - "kanan": _2, - "kashiwara": _2, - "katano": _2, - "kawachinagano": _2, - "kishiwada": _2, - "kita": _2, - "kumatori": _2, - "matsubara": _2, - "minato": _2, - "minoh": _2, - "misaki": _2, - "moriguchi": _2, - "neyagawa": _2, - "nishi": _2, - "nose": _2, - "osakasayama": _2, - "sakai": _2, - "sayama": _2, - "sennan": _2, - "settsu": _2, - "shijonawate": _2, - "shimamoto": _2, - "suita": _2, - "tadaoka": _2, - "taishi": _2, - "tajiri": _2, - "takaishi": _2, - "takatsuki": _2, - "tondabayashi": _2, - "toyonaka": _2, - "toyono": _2, - "yao": _2 - }], - "saga": [1, { - "ariake": _2, - "arita": _2, - "fukudomi": _2, - "genkai": _2, - "hamatama": _2, - "hizen": _2, - "imari": _2, - "kamimine": _2, - "kanzaki": _2, - "karatsu": _2, - "kashima": _2, - "kitagata": _2, - "kitahata": _2, - "kiyama": _2, - "kouhoku": _2, - "kyuragi": _2, - "nishiarita": _2, - "ogi": _2, - "omachi": _2, - "ouchi": _2, - "saga": _2, - "shiroishi": _2, - "taku": _2, - "tara": _2, - "tosu": _2, - "yoshinogari": _2 - }], - "saitama": [1, { - "arakawa": _2, - "asaka": _2, - "chichibu": _2, - "fujimi": _2, - "fujimino": _2, - "fukaya": _2, - "hanno": _2, - "hanyu": _2, - "hasuda": _2, - "hatogaya": _2, - "hatoyama": _2, - "hidaka": _2, - "higashichichibu": _2, - "higashimatsuyama": _2, - "honjo": _2, - "ina": _2, - "iruma": _2, - "iwatsuki": _2, - "kamiizumi": _2, - "kamikawa": _2, - "kamisato": _2, - "kasukabe": _2, - "kawagoe": _2, - "kawaguchi": _2, - "kawajima": _2, - "kazo": _2, - "kitamoto": _2, - "koshigaya": _2, - "kounosu": _2, - "kuki": _2, - "kumagaya": _2, - "matsubushi": _2, - "minano": _2, - "misato": _2, - "miyashiro": _2, - "miyoshi": _2, - "moroyama": _2, - "nagatoro": _2, - "namegawa": _2, - "niiza": _2, - "ogano": _2, - "ogawa": _2, - "ogose": _2, - "okegawa": _2, - "omiya": _2, - "otaki": _2, - "ranzan": _2, - "ryokami": _2, - "saitama": _2, - "sakado": _2, - "satte": _2, - "sayama": _2, - "shiki": _2, - "shiraoka": _2, - "soka": _2, - "sugito": _2, - "toda": _2, - "tokigawa": _2, - "tokorozawa": _2, - "tsurugashima": _2, - "urawa": _2, - "warabi": _2, - "yashio": _2, - "yokoze": _2, - "yono": _2, - "yorii": _2, - "yoshida": _2, - "yoshikawa": _2, - "yoshimi": _2 - }], - "shiga": [1, { - "aisho": _2, - "gamo": _2, - "higashiomi": _2, - "hikone": _2, - "koka": _2, - "konan": _2, - "kosei": _2, - "koto": _2, - "kusatsu": _2, - "maibara": _2, - "moriyama": _2, - "nagahama": _2, - "nishiazai": _2, - "notogawa": _2, - "omihachiman": _2, - "otsu": _2, - "ritto": _2, - "ryuoh": _2, - "takashima": _2, - "takatsuki": _2, - "torahime": _2, - "toyosato": _2, - "yasu": _2 - }], - "shimane": [1, { - "akagi": _2, - "ama": _2, - "gotsu": _2, - "hamada": _2, - "higashiizumo": _2, - "hikawa": _2, - "hikimi": _2, - "izumo": _2, - "kakinoki": _2, - "masuda": _2, - "matsue": _2, - "misato": _2, - "nishinoshima": _2, - "ohda": _2, - "okinoshima": _2, - "okuizumo": _2, - "shimane": _2, - "tamayu": _2, - "tsuwano": _2, - "unnan": _2, - "yakumo": _2, - "yasugi": _2, - "yatsuka": _2 - }], - "shizuoka": [1, { - "arai": _2, - "atami": _2, - "fuji": _2, - "fujieda": _2, - "fujikawa": _2, - "fujinomiya": _2, - "fukuroi": _2, - "gotemba": _2, - "haibara": _2, - "hamamatsu": _2, - "higashiizu": _2, - "ito": _2, - "iwata": _2, - "izu": _2, - "izunokuni": _2, - "kakegawa": _2, - "kannami": _2, - "kawanehon": _2, - "kawazu": _2, - "kikugawa": _2, - "kosai": _2, - "makinohara": _2, - "matsuzaki": _2, - "minamiizu": _2, - "mishima": _2, - "morimachi": _2, - "nishiizu": _2, - "numazu": _2, - "omaezaki": _2, - "shimada": _2, - "shimizu": _2, - "shimoda": _2, - "shizuoka": _2, - "susono": _2, - "yaizu": _2, - "yoshida": _2 - }], - "tochigi": [1, { - "ashikaga": _2, - "bato": _2, - "haga": _2, - "ichikai": _2, - "iwafune": _2, - "kaminokawa": _2, - "kanuma": _2, - "karasuyama": _2, - "kuroiso": _2, - "mashiko": _2, - "mibu": _2, - "moka": _2, - "motegi": _2, - "nasu": _2, - "nasushiobara": _2, - "nikko": _2, - "nishikata": _2, - "nogi": _2, - "ohira": _2, - "ohtawara": _2, - "oyama": _2, - "sakura": _2, - "sano": _2, - "shimotsuke": _2, - "shioya": _2, - "takanezawa": _2, - "tochigi": _2, - "tsuga": _2, - "ujiie": _2, - "utsunomiya": _2, - "yaita": _2 - }], - "tokushima": [1, { - "aizumi": _2, - "anan": _2, - "ichiba": _2, - "itano": _2, - "kainan": _2, - "komatsushima": _2, - "matsushige": _2, - "mima": _2, - "minami": _2, - "miyoshi": _2, - "mugi": _2, - "nakagawa": _2, - "naruto": _2, - "sanagochi": _2, - "shishikui": _2, - "tokushima": _2, - "wajiki": _2 - }], - "tokyo": [1, { - "adachi": _2, - "akiruno": _2, - "akishima": _2, - "aogashima": _2, - "arakawa": _2, - "bunkyo": _2, - "chiyoda": _2, - "chofu": _2, - "chuo": _2, - "edogawa": _2, - "fuchu": _2, - "fussa": _2, - "hachijo": _2, - "hachioji": _2, - "hamura": _2, - "higashikurume": _2, - "higashimurayama": _2, - "higashiyamato": _2, - "hino": _2, - "hinode": _2, - "hinohara": _2, - "inagi": _2, - "itabashi": _2, - "katsushika": _2, - "kita": _2, - "kiyose": _2, - "kodaira": _2, - "koganei": _2, - "kokubunji": _2, - "komae": _2, - "koto": _2, - "kouzushima": _2, - "kunitachi": _2, - "machida": _2, - "meguro": _2, - "minato": _2, - "mitaka": _2, - "mizuho": _2, - "musashimurayama": _2, - "musashino": _2, - "nakano": _2, - "nerima": _2, - "ogasawara": _2, - "okutama": _2, - "ome": _2, - "oshima": _2, - "ota": _2, - "setagaya": _2, - "shibuya": _2, - "shinagawa": _2, - "shinjuku": _2, - "suginami": _2, - "sumida": _2, - "tachikawa": _2, - "taito": _2, - "tama": _2, - "toshima": _2 - }], - "tottori": [1, { - "chizu": _2, - "hino": _2, - "kawahara": _2, - "koge": _2, - "kotoura": _2, - "misasa": _2, - "nanbu": _2, - "nichinan": _2, - "sakaiminato": _2, - "tottori": _2, - "wakasa": _2, - "yazu": _2, - "yonago": _2 - }], - "toyama": [1, { - "asahi": _2, - "fuchu": _2, - "fukumitsu": _2, - "funahashi": _2, - "himi": _2, - "imizu": _2, - "inami": _2, - "johana": _2, - "kamiichi": _2, - "kurobe": _2, - "nakaniikawa": _2, - "namerikawa": _2, - "nanto": _2, - "nyuzen": _2, - "oyabe": _2, - "taira": _2, - "takaoka": _2, - "tateyama": _2, - "toga": _2, - "tonami": _2, - "toyama": _2, - "unazuki": _2, - "uozu": _2, - "yamada": _2 - }], - "wakayama": [1, { - "arida": _2, - "aridagawa": _2, - "gobo": _2, - "hashimoto": _2, - "hidaka": _2, - "hirogawa": _2, - "inami": _2, - "iwade": _2, - "kainan": _2, - "kamitonda": _2, - "katsuragi": _2, - "kimino": _2, - "kinokawa": _2, - "kitayama": _2, - "koya": _2, - "koza": _2, - "kozagawa": _2, - "kudoyama": _2, - "kushimoto": _2, - "mihama": _2, - "misato": _2, - "nachikatsuura": _2, - "shingu": _2, - "shirahama": _2, - "taiji": _2, - "tanabe": _2, - "wakayama": _2, - "yuasa": _2, - "yura": _2 - }], - "yamagata": [1, { - "asahi": _2, - "funagata": _2, - "higashine": _2, - "iide": _2, - "kahoku": _2, - "kaminoyama": _2, - "kaneyama": _2, - "kawanishi": _2, - "mamurogawa": _2, - "mikawa": _2, - "murayama": _2, - "nagai": _2, - "nakayama": _2, - "nanyo": _2, - "nishikawa": _2, - "obanazawa": _2, - "oe": _2, - "oguni": _2, - "ohkura": _2, - "oishida": _2, - "sagae": _2, - "sakata": _2, - "sakegawa": _2, - "shinjo": _2, - "shirataka": _2, - "shonai": _2, - "takahata": _2, - "tendo": _2, - "tozawa": _2, - "tsuruoka": _2, - "yamagata": _2, - "yamanobe": _2, - "yonezawa": _2, - "yuza": _2 - }], - "yamaguchi": [1, { - "abu": _2, - "hagi": _2, - "hikari": _2, - "hofu": _2, - "iwakuni": _2, - "kudamatsu": _2, - "mitou": _2, - "nagato": _2, - "oshima": _2, - "shimonoseki": _2, - "shunan": _2, - "tabuse": _2, - "tokuyama": _2, - "toyota": _2, - "ube": _2, - "yuu": _2 - }], - "yamanashi": [1, { - "chuo": _2, - "doshi": _2, - "fuefuki": _2, - "fujikawa": _2, - "fujikawaguchiko": _2, - "fujiyoshida": _2, - "hayakawa": _2, - "hokuto": _2, - "ichikawamisato": _2, - "kai": _2, - "kofu": _2, - "koshu": _2, - "kosuge": _2, - "minami-alps": _2, - "minobu": _2, - "nakamichi": _2, - "nanbu": _2, - "narusawa": _2, - "nirasaki": _2, - "nishikatsura": _2, - "oshino": _2, - "otsuki": _2, - "showa": _2, - "tabayama": _2, - "tsuru": _2, - "uenohara": _2, - "yamanakako": _2, - "yamanashi": _2 - }], - "xn--4pvxs": _2, - "栃木": _2, - "xn--vgu402c": _2, - "愛知": _2, - "xn--c3s14m": _2, - "愛媛": _2, - "xn--f6qx53a": _2, - "兵庫": _2, - "xn--8pvr4u": _2, - "熊本": _2, - "xn--uist22h": _2, - "茨城": _2, - "xn--djrs72d6uy": _2, - "北海道": _2, - "xn--mkru45i": _2, - "千葉": _2, - "xn--0trq7p7nn": _2, - "和歌山": _2, - "xn--8ltr62k": _2, - "長崎": _2, - "xn--2m4a15e": _2, - "長野": _2, - "xn--efvn9s": _2, - "新潟": _2, - "xn--32vp30h": _2, - "青森": _2, - "xn--4it797k": _2, - "静岡": _2, - "xn--1lqs71d": _2, - "東京": _2, - "xn--5rtp49c": _2, - "石川": _2, - "xn--5js045d": _2, - "埼玉": _2, - "xn--ehqz56n": _2, - "三重": _2, - "xn--1lqs03n": _2, - "京都": _2, - "xn--qqqt11m": _2, - "佐賀": _2, - "xn--kbrq7o": _2, - "大分": _2, - "xn--pssu33l": _2, - "大阪": _2, - "xn--ntsq17g": _2, - "奈良": _2, - "xn--uisz3g": _2, - "宮城": _2, - "xn--6btw5a": _2, - "宮崎": _2, - "xn--1ctwo": _2, - "富山": _2, - "xn--6orx2r": _2, - "山口": _2, - "xn--rht61e": _2, - "山形": _2, - "xn--rht27z": _2, - "山梨": _2, - "xn--djty4k": _2, - "岩手": _2, - "xn--nit225k": _2, - "岐阜": _2, - "xn--rht3d": _2, - "岡山": _2, - "xn--klty5x": _2, - "島根": _2, - "xn--kltx9a": _2, - "広島": _2, - "xn--kltp7d": _2, - "徳島": _2, - "xn--uuwu58a": _2, - "沖縄": _2, - "xn--zbx025d": _2, - "滋賀": _2, - "xn--ntso0iqx3a": _2, - "神奈川": _2, - "xn--elqq16h": _2, - "福井": _2, - "xn--4it168d": _2, - "福岡": _2, - "xn--klt787d": _2, - "福島": _2, - "xn--rny31h": _2, - "秋田": _2, - "xn--7t0a264c": _2, - "群馬": _2, - "xn--5rtq34k": _2, - "香川": _2, - "xn--k7yn95e": _2, - "高知": _2, - "xn--tor131o": _2, - "鳥取": _2, - "xn--d5qv7z876c": _2, - "鹿児島": _2, - "kawasaki": _8, - "kitakyushu": _8, - "kobe": _8, - "nagoya": _8, - "sapporo": _8, - "sendai": _8, - "yokohama": _8, - "buyshop": _3, - "fashionstore": _3, - "handcrafted": _3, - "kawaiishop": _3, - "supersale": _3, - "theshop": _3, - "usercontent": _3, - "angry": _3, - "babyblue": _3, - "babymilk": _3, - "backdrop": _3, - "bambina": _3, - "bitter": _3, - "blush": _3, - "boo": _3, - "boy": _3, - "boyfriend": _3, - "but": _3, - "candypop": _3, - "capoo": _3, - "catfood": _3, - "cheap": _3, - "chicappa": _3, - "chillout": _3, - "chips": _3, - "chowder": _3, - "chu": _3, - "ciao": _3, - "cocotte": _3, - "coolblog": _3, - "cranky": _3, - "cutegirl": _3, - "daa": _3, - "deca": _3, - "deci": _3, - "digick": _3, - "egoism": _3, - "fakefur": _3, - "fem": _3, - "flier": _3, - "floppy": _3, - "fool": _3, - "frenchkiss": _3, - "girlfriend": _3, - "girly": _3, - "gloomy": _3, - "gonna": _3, - "greater": _3, - "hacca": _3, - "heavy": _3, - "her": _3, - "hiho": _3, - "hippy": _3, - "holy": _3, - "hungry": _3, - "icurus": _3, - "itigo": _3, - "jellybean": _3, - "kikirara": _3, - "kill": _3, - "kilo": _3, - "kuron": _3, - "littlestar": _3, - "lolipopmc": _3, - "lolitapunk": _3, - "lomo": _3, - "lovepop": _3, - "lovesick": _3, - "main": _3, - "mods": _3, - "mond": _3, - "mongolian": _3, - "moo": _3, - "namaste": _3, - "nikita": _3, - "nobushi": _3, - "noor": _3, - "oops": _3, - "parallel": _3, - "parasite": _3, - "pecori": _3, - "peewee": _3, - "penne": _3, - "pepper": _3, - "perma": _3, - "pigboat": _3, - "pinoko": _3, - "punyu": _3, - "pupu": _3, - "pussycat": _3, - "pya": _3, - "raindrop": _3, - "readymade": _3, - "sadist": _3, - "schoolbus": _3, - "secret": _3, - "staba": _3, - "stripper": _3, - "sub": _3, - "sunnyday": _3, - "thick": _3, - "tonkotsu": _3, - "under": _3, - "upper": _3, - "velvet": _3, - "verse": _3, - "versus": _3, - "vivian": _3, - "watson": _3, - "weblike": _3, - "whitesnow": _3, - "zombie": _3, - "blogspot": _3, - "2-d": _3, - "bona": _3, - "crap": _3, - "daynight": _3, - "eek": _3, - "flop": _3, - "halfmoon": _3, - "jeez": _3, - "matrix": _3, - "mimoza": _3, - "netgamers": _3, - "nyanta": _3, - "o0o0": _3, - "rdy": _3, - "rgr": _3, - "rulez": _3, - "sakurastorage": [0, { - "isk01": _12, - "isk02": _12 - }], - "saloon": _3, - "sblo": _3, - "skr": _3, - "tank": _3, - "uh-oh": _3, - "undo": _3, - "webaccel": [0, { - "rs": _3, - "user": _3 - }], - "websozai": _3, - "xii": _3 - }], - "ke": [1, { - "ac": _2, - "co": _6, - "go": _2, - "info": _2, - "me": _2, - "mobi": _2, - "ne": _2, - "or": _2, - "sc": _2 - }], - "kg": [1, { - "org": _2, - "net": _2, - "com": _2, - "edu": _2, - "gov": _2, - "mil": _2, - "blog": _3, - "io": _3, - "jp": _3, - "tv": _3, - "uk": _3, - "us": _3 - }], - "kh": _8, - "ki": _35, - "km": [1, { - "org": _2, - "nom": _2, - "gov": _2, - "prd": _2, - "tm": _2, - "edu": _2, - "mil": _2, - "ass": _2, - "com": _2, - "coop": _2, - "asso": _2, - "presse": _2, - "medecin": _2, - "notaires": _2, - "pharmaciens": _2, - "veterinaire": _2, - "gouv": _2 - }], - "kn": [1, { - "net": _2, - "org": _2, - "edu": _2, - "gov": _2 - }], - "kp": [1, { - "com": _2, - "edu": _2, - "gov": _2, - "org": _2, - "rep": _2, - "tra": _2 - }], - "kr": [1, { - "ac": _2, - "co": _2, - "es": _2, - "go": _2, - "hs": _2, - "kg": _2, - "mil": _2, - "ms": _2, - "ne": _2, - "or": _2, - "pe": _2, - "re": _2, - "sc": _2, - "busan": _2, - "chungbuk": _2, - "chungnam": _2, - "daegu": _2, - "daejeon": _2, - "gangwon": _2, - "gwangju": _2, - "gyeongbuk": _2, - "gyeonggi": _2, - "gyeongnam": _2, - "incheon": _2, - "jeju": _2, - "jeonbuk": _2, - "jeonnam": _2, - "seoul": _2, - "ulsan": _2, - "blogspot": _3 - }], - "kw": [1, { - "com": _2, - "edu": _2, - "emb": _2, - "gov": _2, - "ind": _2, - "net": _2, - "org": _2 - }], - "ky": _27, - "kz": [1, { - "org": _2, - "edu": _2, - "net": _2, - "gov": _2, - "mil": _2, - "com": _2, - "jcloud": _3, - "kazteleport": [0, { - "upaas": _3 - }] - }], - "la": [1, { - "int": _2, - "net": _2, - "info": _2, - "edu": _2, - "gov": _2, - "per": _2, - "com": _2, - "org": _2, - "bnr": _3, - "c": _3 - }], - "lb": _4, - "lc": [1, { - "com": _2, - "net": _2, - "co": _2, - "org": _2, - "edu": _2, - "gov": _2, - "oy": _3 - }], - "li": [1, { - "blogspot": _3, - "caa": _3 - }], - "lk": [1, { - "gov": _2, - "sch": _2, - "net": _2, - "int": _2, - "com": _2, - "org": _2, - "edu": _2, - "ngo": _2, - "soc": _2, - "web": _2, - "ltd": _2, - "assn": _2, - "grp": _2, - "hotel": _2, - "ac": _2 - }], - "lr": _4, - "ls": [1, { - "ac": _2, - "biz": _2, - "co": _2, - "edu": _2, - "gov": _2, - "info": _2, - "net": _2, - "org": _2, - "sc": _2, - "de": _3 - }], - "lt": _36, - "lu": [1, { - "blogspot": _3, - "123website": _3 - }], - "lv": [1, { - "com": _2, - "edu": _2, - "gov": _2, - "org": _2, - "mil": _2, - "id": _2, - "net": _2, - "asn": _2, - "conf": _2 - }], - "ly": [1, { - "com": _2, - "net": _2, - "gov": _2, - "plc": _2, - "edu": _2, - "sch": _2, - "med": _2, - "org": _2, - "id": _2 - }], - "ma": [1, { - "co": _2, - "net": _2, - "gov": _2, - "org": _2, - "ac": _2, - "press": _2 - }], - "mc": [1, { - "tm": _2, - "asso": _2 - }], - "md": [1, { - "blogspot": _3, - "at": _3, - "de": _3, - "jp": _3, - "to": _3 - }], - "me": [1, { - "co": _2, - "net": _2, - "org": _2, - "edu": _2, - "ac": _2, - "gov": _2, - "its": _2, - "priv": _2, - "c66": _3, - "daplie": [2, { - "localhost": _3 - }], - "edgestack": _3, - "filegear": _3, - "filegear-au": _3, - "filegear-de": _3, - "filegear-gb": _3, - "filegear-ie": _3, - "filegear-jp": _3, - "filegear-sg": _3, - "glitch": _3, - "ravendb": _3, - "lohmus": _3, - "barsy": _3, - "mcpe": _3, - "mcdir": _3, - "soundcast": _3, - "tcp4": _3, - "brasilia": _3, - "ddns": _3, - "dnsfor": _3, - "hopto": _3, - "loginto": _3, - "noip": _3, - "webhop": _3, - "vp4": _3, - "diskstation": _3, - "dscloud": _3, - "i234": _3, - "myds": _3, - "synology": _3, - "transip": _25, - "wedeploy": _3, - "yombo": _3, - "nohost": _3 - }], - "mg": [1, { - "org": _2, - "nom": _2, - "gov": _2, - "prd": _2, - "tm": _2, - "edu": _2, - "mil": _2, - "com": _2, - "co": _2 - }], - "mh": _2, - "mil": _2, - "mk": [1, { - "com": _2, - "org": _2, - "net": _2, - "edu": _2, - "gov": _2, - "inf": _2, - "name": _2, - "blogspot": _3 - }], - "ml": [1, { - "com": _2, - "edu": _2, - "gouv": _2, - "gov": _2, - "net": _2, - "org": _2, - "presse": _2 - }], - "mm": _8, - "mn": [1, { - "gov": _2, - "edu": _2, - "org": _2, - "nyc": _3 - }], - "mo": _4, - "mobi": [1, { - "barsy": _3, - "dscloud": _3 - }], - "mp": [1, { - "ju": _3 - }], - "mq": _2, - "mr": _36, - "ms": [1, { - "com": _2, - "edu": _2, - "gov": _2, - "net": _2, - "org": _2, - "lab": _3, - "minisite": _3 - }], - "mt": [1, { - "com": _6, - "edu": _2, - "net": _2, - "org": _2 - }], - "mu": [1, { - "com": _2, - "net": _2, - "org": _2, - "gov": _2, - "ac": _2, - "co": _2, - "or": _2 - }], - "museum": _2, - "mv": [1, { - "aero": _2, - "biz": _2, - "com": _2, - "coop": _2, - "edu": _2, - "gov": _2, - "info": _2, - "int": _2, - "mil": _2, - "museum": _2, - "name": _2, - "net": _2, - "org": _2, - "pro": _2 - }], - "mw": [1, { - "ac": _2, - "biz": _2, - "co": _2, - "com": _2, - "coop": _2, - "edu": _2, - "gov": _2, - "int": _2, - "museum": _2, - "net": _2, - "org": _2 - }], - "mx": [1, { - "com": _2, - "org": _2, - "gob": _2, - "edu": _2, - "net": _2, - "blogspot": _3 - }], - "my": [1, { - "biz": _2, - "com": _2, - "edu": _2, - "gov": _2, - "mil": _2, - "name": _2, - "net": _2, - "org": _2, - "blogspot": _3 - }], - "mz": [1, { - "ac": _2, - "adv": _2, - "co": _2, - "edu": _2, - "gov": _2, - "mil": _2, - "net": _2, - "org": _2 - }], - "na": [1, { - "info": _2, - "pro": _2, - "name": _2, - "school": _2, - "or": _2, - "dr": _2, - "us": _2, - "mx": _2, - "ca": _2, - "in": _2, - "cc": _2, - "tv": _2, - "ws": _2, - "mobi": _2, - "co": _2, - "com": _2, - "org": _2 - }], - "name": [1, { - "her": _39, - "his": _39 - }], - "nc": [1, { - "asso": _2, - "nom": _2 - }], - "ne": _2, - "net": [1, { - "adobeaemcloud": _3, - "adobeio-static": _3, - "adobeioruntime": _3, - "akadns": _3, - "akamai": _3, - "akamai-staging": _3, - "akamaiedge": _3, - "akamaiedge-staging": _3, - "akamaihd": _3, - "akamaihd-staging": _3, - "akamaiorigin": _3, - "akamaiorigin-staging": _3, - "akamaized": _3, - "akamaized-staging": _3, - "edgekey": _3, - "edgekey-staging": _3, - "edgesuite": _3, - "edgesuite-staging": _3, - "alwaysdata": _3, - "myamaze": _3, - "cloudfront": _3, - "t3l3p0rt": _3, - "appudo": _3, - "atlassian-dev": [0, { - "prod": [0, { - "cdn": _3 - }] - }], - "myfritz": _3, - "onavstack": _3, - "shopselect": _3, - "blackbaudcdn": _3, - "boomla": _3, - "bplaced": _3, - "square7": _3, - "gb": _3, - "hu": _3, - "jp": _3, - "se": _3, - "uk": _3, - "in": _3, - "clickrising": _3, - "cloudaccess": _3, - "cdn77-ssl": _3, - "cdn77": [0, { - "r": _3 - }], - "feste-ip": _3, - "knx-server": _3, - "static-access": _3, - "cryptonomic": _5, - "dattolocal": _3, - "mydatto": _3, - "debian": _3, - "bitbridge": _3, - "at-band-camp": _3, - "blogdns": _3, - "broke-it": _3, - "buyshouses": _3, - "dnsalias": _3, - "dnsdojo": _3, - "does-it": _3, - "dontexist": _3, - "dynalias": _3, - "dynathome": _3, - "endofinternet": _3, - "from-az": _3, - "from-co": _3, - "from-la": _3, - "from-ny": _3, - "gets-it": _3, - "ham-radio-op": _3, - "homeftp": _3, - "homeip": _3, - "homelinux": _3, - "homeunix": _3, - "in-the-band": _3, - "is-a-chef": _3, - "is-a-geek": _3, - "isa-geek": _3, - "kicks-ass": _3, - "office-on-the": _3, - "podzone": _3, - "scrapper-site": _3, - "selfip": _3, - "sells-it": _3, - "servebbs": _3, - "serveftp": _3, - "thruhere": _3, - "webhop": _3, - "definima": _3, - "casacam": _3, - "dynu": _3, - "dynv6": _3, - "twmail": _3, - "ru": _3, - "channelsdvr": [2, { - "u": _3 - }], - "fastlylb": [2, { - "map": _3 - }], - "fastly": [0, { - "freetls": _3, - "map": _3, - "prod": [0, { - "a": _3, - "global": _3 - }], - "ssl": [0, { - "a": _3, - "b": _3, - "global": _3 - }] - }], - "edgeapp": _3, - "flynnhosting": _3, - "cdn-edges": _3, - "heteml": _3, - "cloudfunctions": _3, - "moonscale": _3, - "in-dsl": _3, - "in-vpn": _3, - "ipifony": _3, - "iobb": _3, - "cloudjiffy": [2, { - "fra1-de": _3, - "west1-us": _3 - }], - "elastx": [0, { - "jls-sto1": _3, - "jls-sto2": _3, - "jls-sto3": _3 - }], - "faststacks": _3, - "massivegrid": [0, { - "paas": [0, { - "fr-1": _3, - "lon-1": _3, - "lon-2": _3, - "ny-1": _3, - "ny-2": _3, - "sg-1": _3 - }] - }], - "saveincloud": [0, { - "jelastic": _3, - "nordeste-idc": _3 - }], - "scaleforce": _28, - "tsukaeru": _29, - "kinghost": _3, - "uni5": _3, - "krellian": _3, - "barsy": _3, - "memset": _3, - "azurewebsites": _3, - "azure-mobile": _3, - "cloudapp": _3, - "azurestaticapps": [2, { - "1": _3, - "2": _3, - "3": _3, - "centralus": _3, - "eastasia": _3, - "eastus2": _3, - "westeurope": _3, - "westus2": _3 - }], - "dnsup": _3, - "hicam": _3, - "now-dns": _3, - "ownip": _3, - "vpndns": _3, - "eating-organic": _3, - "mydissent": _3, - "myeffect": _3, - "mymediapc": _3, - "mypsx": _3, - "mysecuritycamera": _3, - "nhlfan": _3, - "no-ip": _3, - "pgafan": _3, - "privatizehealthinsurance": _3, - "bounceme": _3, - "ddns": _3, - "redirectme": _3, - "serveblog": _3, - "serveminecraft": _3, - "sytes": _3, - "cloudycluster": _3, - "ovh": [0, { - "webpaas": _5, - "hosting": _5 - }], - "bar0": _3, - "bar1": _3, - "bar2": _3, - "rackmaze": _3, - "squares": _3, - "schokokeks": _3, - "firewall-gateway": _3, - "seidat": _3, - "senseering": _3, - "siteleaf": _3, - "vps-host": [2, { - "jelastic": [0, { - "atl": _3, - "njs": _3, - "ric": _3 - }] - }], - "myspreadshop": _3, - "srcf": [0, { - "soc": _3, - "user": _3 - }], - "supabase": _3, - "dsmynas": _3, - "familyds": _3, - "tailscale": [0, { - "beta": _3 - }], - "ts": _3, - "torproject": [2, { - "pages": _3 - }], - "reserve-online": _3, - "community-pro": _3, - "meinforum": _3, - "yandexcloud": [2, { - "storage": _3, - "website": _3 - }], - "za": _3 - }], - "nf": [1, { - "com": _2, - "net": _2, - "per": _2, - "rec": _2, - "web": _2, - "arts": _2, - "firm": _2, - "info": _2, - "other": _2, - "store": _2 - }], - "ng": [1, { - "com": _6, - "edu": _2, - "gov": _2, - "i": _2, - "mil": _2, - "mobi": _2, - "name": _2, - "net": _2, - "org": _2, - "sch": _2, - "col": _3, - "firm": _3, - "gen": _3, - "ltd": _3, - "ngo": _3 - }], - "ni": [1, { - "ac": _2, - "biz": _2, - "co": _2, - "com": _2, - "edu": _2, - "gob": _2, - "in": _2, - "info": _2, - "int": _2, - "mil": _2, - "net": _2, - "nom": _2, - "org": _2, - "web": _2 - }], - "nl": [1, { - "co": _3, - "hosting-cluster": _3, - "blogspot": _3, - "gov": _3, - "khplay": _3, - "123website": _3, - "myspreadshop": _3, - "transurl": _5, - "cistron": _3, - "demon": _3 - }], - "no": [1, { - "fhs": _2, - "vgs": _2, - "fylkesbibl": _2, - "folkebibl": _2, - "museum": _2, - "idrett": _2, - "priv": _2, - "mil": _2, - "stat": _2, - "dep": _2, - "kommune": _2, - "herad": _2, - "aa": _40, - "ah": _40, - "bu": _40, - "fm": _40, - "hl": _40, - "hm": _40, - "jan-mayen": _40, - "mr": _40, - "nl": _40, - "nt": _40, - "of": _40, - "ol": _40, - "oslo": _40, - "rl": _40, - "sf": _40, - "st": _40, - "svalbard": _40, - "tm": _40, - "tr": _40, - "va": _40, - "vf": _40, - "akrehamn": _2, - "xn--krehamn-dxa": _2, - "åkrehamn": _2, - "algard": _2, - "xn--lgrd-poac": _2, - "ålgård": _2, - "arna": _2, - "brumunddal": _2, - "bryne": _2, - "bronnoysund": _2, - "xn--brnnysund-m8ac": _2, - "brønnøysund": _2, - "drobak": _2, - "xn--drbak-wua": _2, - "drøbak": _2, - "egersund": _2, - "fetsund": _2, - "floro": _2, - "xn--flor-jra": _2, - "florø": _2, - "fredrikstad": _2, - "hokksund": _2, - "honefoss": _2, - "xn--hnefoss-q1a": _2, - "hønefoss": _2, - "jessheim": _2, - "jorpeland": _2, - "xn--jrpeland-54a": _2, - "jørpeland": _2, - "kirkenes": _2, - "kopervik": _2, - "krokstadelva": _2, - "langevag": _2, - "xn--langevg-jxa": _2, - "langevåg": _2, - "leirvik": _2, - "mjondalen": _2, - "xn--mjndalen-64a": _2, - "mjøndalen": _2, - "mo-i-rana": _2, - "mosjoen": _2, - "xn--mosjen-eya": _2, - "mosjøen": _2, - "nesoddtangen": _2, - "orkanger": _2, - "osoyro": _2, - "xn--osyro-wua": _2, - "osøyro": _2, - "raholt": _2, - "xn--rholt-mra": _2, - "råholt": _2, - "sandnessjoen": _2, - "xn--sandnessjen-ogb": _2, - "sandnessjøen": _2, - "skedsmokorset": _2, - "slattum": _2, - "spjelkavik": _2, - "stathelle": _2, - "stavern": _2, - "stjordalshalsen": _2, - "xn--stjrdalshalsen-sqb": _2, - "stjørdalshalsen": _2, - "tananger": _2, - "tranby": _2, - "vossevangen": _2, - "afjord": _2, - "xn--fjord-lra": _2, - "åfjord": _2, - "agdenes": _2, - "al": _2, - "xn--l-1fa": _2, - "ål": _2, - "alesund": _2, - "xn--lesund-hua": _2, - "ålesund": _2, - "alstahaug": _2, - "alta": _2, - "xn--lt-liac": _2, - "áltá": _2, - "alaheadju": _2, - "xn--laheadju-7ya": _2, - "álaheadju": _2, - "alvdal": _2, - "amli": _2, - "xn--mli-tla": _2, - "åmli": _2, - "amot": _2, - "xn--mot-tla": _2, - "åmot": _2, - "andebu": _2, - "andoy": _2, - "xn--andy-ira": _2, - "andøy": _2, - "andasuolo": _2, - "ardal": _2, - "xn--rdal-poa": _2, - "årdal": _2, - "aremark": _2, - "arendal": _2, - "xn--s-1fa": _2, - "ås": _2, - "aseral": _2, - "xn--seral-lra": _2, - "åseral": _2, - "asker": _2, - "askim": _2, - "askvoll": _2, - "askoy": _2, - "xn--asky-ira": _2, - "askøy": _2, - "asnes": _2, - "xn--snes-poa": _2, - "åsnes": _2, - "audnedaln": _2, - "aukra": _2, - "aure": _2, - "aurland": _2, - "aurskog-holand": _2, - "xn--aurskog-hland-jnb": _2, - "aurskog-høland": _2, - "austevoll": _2, - "austrheim": _2, - "averoy": _2, - "xn--avery-yua": _2, - "averøy": _2, - "balestrand": _2, - "ballangen": _2, - "balat": _2, - "xn--blt-elab": _2, - "bálát": _2, - "balsfjord": _2, - "bahccavuotna": _2, - "xn--bhccavuotna-k7a": _2, - "báhccavuotna": _2, - "bamble": _2, - "bardu": _2, - "beardu": _2, - "beiarn": _2, - "bajddar": _2, - "xn--bjddar-pta": _2, - "bájddar": _2, - "baidar": _2, - "xn--bidr-5nac": _2, - "báidár": _2, - "berg": _2, - "bergen": _2, - "berlevag": _2, - "xn--berlevg-jxa": _2, - "berlevåg": _2, - "bearalvahki": _2, - "xn--bearalvhki-y4a": _2, - "bearalváhki": _2, - "bindal": _2, - "birkenes": _2, - "bjarkoy": _2, - "xn--bjarky-fya": _2, - "bjarkøy": _2, - "bjerkreim": _2, - "bjugn": _2, - "bodo": _2, - "xn--bod-2na": _2, - "bodø": _2, - "badaddja": _2, - "xn--bdddj-mrabd": _2, - "bådåddjå": _2, - "budejju": _2, - "bokn": _2, - "bremanger": _2, - "bronnoy": _2, - "xn--brnny-wuac": _2, - "brønnøy": _2, - "bygland": _2, - "bykle": _2, - "barum": _2, - "xn--brum-voa": _2, - "bærum": _2, - "telemark": [0, { - "bo": _2, - "xn--b-5ga": _2, - "bø": _2 - }], - "nordland": [0, { - "bo": _2, - "xn--b-5ga": _2, - "bø": _2, - "heroy": _2, - "xn--hery-ira": _2, - "herøy": _2 - }], - "bievat": _2, - "xn--bievt-0qa": _2, - "bievát": _2, - "bomlo": _2, - "xn--bmlo-gra": _2, - "bømlo": _2, - "batsfjord": _2, - "xn--btsfjord-9za": _2, - "båtsfjord": _2, - "bahcavuotna": _2, - "xn--bhcavuotna-s4a": _2, - "báhcavuotna": _2, - "dovre": _2, - "drammen": _2, - "drangedal": _2, - "dyroy": _2, - "xn--dyry-ira": _2, - "dyrøy": _2, - "donna": _2, - "xn--dnna-gra": _2, - "dønna": _2, - "eid": _2, - "eidfjord": _2, - "eidsberg": _2, - "eidskog": _2, - "eidsvoll": _2, - "eigersund": _2, - "elverum": _2, - "enebakk": _2, - "engerdal": _2, - "etne": _2, - "etnedal": _2, - "evenes": _2, - "evenassi": _2, - "xn--eveni-0qa01ga": _2, - "evenášši": _2, - "evje-og-hornnes": _2, - "farsund": _2, - "fauske": _2, - "fuossko": _2, - "fuoisku": _2, - "fedje": _2, - "fet": _2, - "finnoy": _2, - "xn--finny-yua": _2, - "finnøy": _2, - "fitjar": _2, - "fjaler": _2, - "fjell": _2, - "flakstad": _2, - "flatanger": _2, - "flekkefjord": _2, - "flesberg": _2, - "flora": _2, - "fla": _2, - "xn--fl-zia": _2, - "flå": _2, - "folldal": _2, - "forsand": _2, - "fosnes": _2, - "frei": _2, - "frogn": _2, - "froland": _2, - "frosta": _2, - "frana": _2, - "xn--frna-woa": _2, - "fræna": _2, - "froya": _2, - "xn--frya-hra": _2, - "frøya": _2, - "fusa": _2, - "fyresdal": _2, - "forde": _2, - "xn--frde-gra": _2, - "førde": _2, - "gamvik": _2, - "gangaviika": _2, - "xn--ggaviika-8ya47h": _2, - "gáŋgaviika": _2, - "gaular": _2, - "gausdal": _2, - "gildeskal": _2, - "xn--gildeskl-g0a": _2, - "gildeskål": _2, - "giske": _2, - "gjemnes": _2, - "gjerdrum": _2, - "gjerstad": _2, - "gjesdal": _2, - "gjovik": _2, - "xn--gjvik-wua": _2, - "gjøvik": _2, - "gloppen": _2, - "gol": _2, - "gran": _2, - "grane": _2, - "granvin": _2, - "gratangen": _2, - "grimstad": _2, - "grong": _2, - "kraanghke": _2, - "xn--kranghke-b0a": _2, - "kråanghke": _2, - "grue": _2, - "gulen": _2, - "hadsel": _2, - "halden": _2, - "halsa": _2, - "hamar": _2, - "hamaroy": _2, - "habmer": _2, - "xn--hbmer-xqa": _2, - "hábmer": _2, - "hapmir": _2, - "xn--hpmir-xqa": _2, - "hápmir": _2, - "hammerfest": _2, - "hammarfeasta": _2, - "xn--hmmrfeasta-s4ac": _2, - "hámmárfeasta": _2, - "haram": _2, - "hareid": _2, - "harstad": _2, - "hasvik": _2, - "aknoluokta": _2, - "xn--koluokta-7ya57h": _2, - "ákŋoluokta": _2, - "hattfjelldal": _2, - "aarborte": _2, - "haugesund": _2, - "hemne": _2, - "hemnes": _2, - "hemsedal": _2, - "more-og-romsdal": [0, { - "heroy": _2, - "sande": _2 - }], - "xn--mre-og-romsdal-qqb": [0, { - "xn--hery-ira": _2, - "sande": _2 - }], - "møre-og-romsdal": [0, { - "herøy": _2, - "sande": _2 - }], - "hitra": _2, - "hjartdal": _2, - "hjelmeland": _2, - "hobol": _2, - "xn--hobl-ira": _2, - "hobøl": _2, - "hof": _2, - "hol": _2, - "hole": _2, - "holmestrand": _2, - "holtalen": _2, - "xn--holtlen-hxa": _2, - "holtålen": _2, - "hornindal": _2, - "horten": _2, - "hurdal": _2, - "hurum": _2, - "hvaler": _2, - "hyllestad": _2, - "hagebostad": _2, - "xn--hgebostad-g3a": _2, - "hægebostad": _2, - "hoyanger": _2, - "xn--hyanger-q1a": _2, - "høyanger": _2, - "hoylandet": _2, - "xn--hylandet-54a": _2, - "høylandet": _2, - "ha": _2, - "xn--h-2fa": _2, - "hå": _2, - "ibestad": _2, - "inderoy": _2, - "xn--indery-fya": _2, - "inderøy": _2, - "iveland": _2, - "jevnaker": _2, - "jondal": _2, - "jolster": _2, - "xn--jlster-bya": _2, - "jølster": _2, - "karasjok": _2, - "karasjohka": _2, - "xn--krjohka-hwab49j": _2, - "kárášjohka": _2, - "karlsoy": _2, - "galsa": _2, - "xn--gls-elac": _2, - "gálsá": _2, - "karmoy": _2, - "xn--karmy-yua": _2, - "karmøy": _2, - "kautokeino": _2, - "guovdageaidnu": _2, - "klepp": _2, - "klabu": _2, - "xn--klbu-woa": _2, - "klæbu": _2, - "kongsberg": _2, - "kongsvinger": _2, - "kragero": _2, - "xn--krager-gya": _2, - "kragerø": _2, - "kristiansand": _2, - "kristiansund": _2, - "krodsherad": _2, - "xn--krdsherad-m8a": _2, - "krødsherad": _2, - "kvalsund": _2, - "rahkkeravju": _2, - "xn--rhkkervju-01af": _2, - "ráhkkerávju": _2, - "kvam": _2, - "kvinesdal": _2, - "kvinnherad": _2, - "kviteseid": _2, - "kvitsoy": _2, - "xn--kvitsy-fya": _2, - "kvitsøy": _2, - "kvafjord": _2, - "xn--kvfjord-nxa": _2, - "kvæfjord": _2, - "giehtavuoatna": _2, - "kvanangen": _2, - "xn--kvnangen-k0a": _2, - "kvænangen": _2, - "navuotna": _2, - "xn--nvuotna-hwa": _2, - "návuotna": _2, - "kafjord": _2, - "xn--kfjord-iua": _2, - "kåfjord": _2, - "gaivuotna": _2, - "xn--givuotna-8ya": _2, - "gáivuotna": _2, - "larvik": _2, - "lavangen": _2, - "lavagis": _2, - "loabat": _2, - "xn--loabt-0qa": _2, - "loabát": _2, - "lebesby": _2, - "davvesiida": _2, - "leikanger": _2, - "leirfjord": _2, - "leka": _2, - "leksvik": _2, - "lenvik": _2, - "leangaviika": _2, - "xn--leagaviika-52b": _2, - "leaŋgaviika": _2, - "lesja": _2, - "levanger": _2, - "lier": _2, - "lierne": _2, - "lillehammer": _2, - "lillesand": _2, - "lindesnes": _2, - "lindas": _2, - "xn--linds-pra": _2, - "lindås": _2, - "lom": _2, - "loppa": _2, - "lahppi": _2, - "xn--lhppi-xqa": _2, - "láhppi": _2, - "lund": _2, - "lunner": _2, - "luroy": _2, - "xn--lury-ira": _2, - "lurøy": _2, - "luster": _2, - "lyngdal": _2, - "lyngen": _2, - "ivgu": _2, - "lardal": _2, - "lerdal": _2, - "xn--lrdal-sra": _2, - "lærdal": _2, - "lodingen": _2, - "xn--ldingen-q1a": _2, - "lødingen": _2, - "lorenskog": _2, - "xn--lrenskog-54a": _2, - "lørenskog": _2, - "loten": _2, - "xn--lten-gra": _2, - "løten": _2, - "malvik": _2, - "masoy": _2, - "xn--msy-ula0h": _2, - "måsøy": _2, - "muosat": _2, - "xn--muost-0qa": _2, - "muosát": _2, - "mandal": _2, - "marker": _2, - "marnardal": _2, - "masfjorden": _2, - "meland": _2, - "meldal": _2, - "melhus": _2, - "meloy": _2, - "xn--mely-ira": _2, - "meløy": _2, - "meraker": _2, - "xn--merker-kua": _2, - "meråker": _2, - "moareke": _2, - "xn--moreke-jua": _2, - "moåreke": _2, - "midsund": _2, - "midtre-gauldal": _2, - "modalen": _2, - "modum": _2, - "molde": _2, - "moskenes": _2, - "moss": _2, - "mosvik": _2, - "malselv": _2, - "xn--mlselv-iua": _2, - "målselv": _2, - "malatvuopmi": _2, - "xn--mlatvuopmi-s4a": _2, - "málatvuopmi": _2, - "namdalseid": _2, - "aejrie": _2, - "namsos": _2, - "namsskogan": _2, - "naamesjevuemie": _2, - "xn--nmesjevuemie-tcba": _2, - "nååmesjevuemie": _2, - "laakesvuemie": _2, - "nannestad": _2, - "narvik": _2, - "narviika": _2, - "naustdal": _2, - "nedre-eiker": _2, - "akershus": _41, - "buskerud": _41, - "nesna": _2, - "nesodden": _2, - "nesseby": _2, - "unjarga": _2, - "xn--unjrga-rta": _2, - "unjárga": _2, - "nesset": _2, - "nissedal": _2, - "nittedal": _2, - "nord-aurdal": _2, - "nord-fron": _2, - "nord-odal": _2, - "norddal": _2, - "nordkapp": _2, - "davvenjarga": _2, - "xn--davvenjrga-y4a": _2, - "davvenjárga": _2, - "nordre-land": _2, - "nordreisa": _2, - "raisa": _2, - "xn--risa-5na": _2, - "ráisa": _2, - "nore-og-uvdal": _2, - "notodden": _2, - "naroy": _2, - "xn--nry-yla5g": _2, - "nærøy": _2, - "notteroy": _2, - "xn--nttery-byae": _2, - "nøtterøy": _2, - "odda": _2, - "oksnes": _2, - "xn--ksnes-uua": _2, - "øksnes": _2, - "oppdal": _2, - "oppegard": _2, - "xn--oppegrd-ixa": _2, - "oppegård": _2, - "orkdal": _2, - "orland": _2, - "xn--rland-uua": _2, - "ørland": _2, - "orskog": _2, - "xn--rskog-uua": _2, - "ørskog": _2, - "orsta": _2, - "xn--rsta-fra": _2, - "ørsta": _2, - "hedmark": [0, { - "os": _2, - "valer": _2, - "xn--vler-qoa": _2, - "våler": _2 - }], - "hordaland": [0, { - "os": _2 - }], - "osen": _2, - "osteroy": _2, - "xn--ostery-fya": _2, - "osterøy": _2, - "ostre-toten": _2, - "xn--stre-toten-zcb": _2, - "østre-toten": _2, - "overhalla": _2, - "ovre-eiker": _2, - "xn--vre-eiker-k8a": _2, - "øvre-eiker": _2, - "oyer": _2, - "xn--yer-zna": _2, - "øyer": _2, - "oygarden": _2, - "xn--ygarden-p1a": _2, - "øygarden": _2, - "oystre-slidre": _2, - "xn--ystre-slidre-ujb": _2, - "øystre-slidre": _2, - "porsanger": _2, - "porsangu": _2, - "xn--porsgu-sta26f": _2, - "porsáŋgu": _2, - "porsgrunn": _2, - "radoy": _2, - "xn--rady-ira": _2, - "radøy": _2, - "rakkestad": _2, - "rana": _2, - "ruovat": _2, - "randaberg": _2, - "rauma": _2, - "rendalen": _2, - "rennebu": _2, - "rennesoy": _2, - "xn--rennesy-v1a": _2, - "rennesøy": _2, - "rindal": _2, - "ringebu": _2, - "ringerike": _2, - "ringsaker": _2, - "rissa": _2, - "risor": _2, - "xn--risr-ira": _2, - "risør": _2, - "roan": _2, - "rollag": _2, - "rygge": _2, - "ralingen": _2, - "xn--rlingen-mxa": _2, - "rælingen": _2, - "rodoy": _2, - "xn--rdy-0nab": _2, - "rødøy": _2, - "romskog": _2, - "xn--rmskog-bya": _2, - "rømskog": _2, - "roros": _2, - "xn--rros-gra": _2, - "røros": _2, - "rost": _2, - "xn--rst-0na": _2, - "røst": _2, - "royken": _2, - "xn--ryken-vua": _2, - "røyken": _2, - "royrvik": _2, - "xn--ryrvik-bya": _2, - "røyrvik": _2, - "rade": _2, - "xn--rde-ula": _2, - "råde": _2, - "salangen": _2, - "siellak": _2, - "saltdal": _2, - "salat": _2, - "xn--slt-elab": _2, - "sálát": _2, - "xn--slat-5na": _2, - "sálat": _2, - "samnanger": _2, - "vestfold": [0, { - "sande": _2 - }], - "sandefjord": _2, - "sandnes": _2, - "sandoy": _2, - "xn--sandy-yua": _2, - "sandøy": _2, - "sarpsborg": _2, - "sauda": _2, - "sauherad": _2, - "sel": _2, - "selbu": _2, - "selje": _2, - "seljord": _2, - "sigdal": _2, - "siljan": _2, - "sirdal": _2, - "skaun": _2, - "skedsmo": _2, - "ski": _2, - "skien": _2, - "skiptvet": _2, - "skjervoy": _2, - "xn--skjervy-v1a": _2, - "skjervøy": _2, - "skierva": _2, - "xn--skierv-uta": _2, - "skiervá": _2, - "skjak": _2, - "xn--skjk-soa": _2, - "skjåk": _2, - "skodje": _2, - "skanland": _2, - "xn--sknland-fxa": _2, - "skånland": _2, - "skanit": _2, - "xn--sknit-yqa": _2, - "skánit": _2, - "smola": _2, - "xn--smla-hra": _2, - "smøla": _2, - "snillfjord": _2, - "snasa": _2, - "xn--snsa-roa": _2, - "snåsa": _2, - "snoasa": _2, - "snaase": _2, - "xn--snase-nra": _2, - "snåase": _2, - "sogndal": _2, - "sokndal": _2, - "sola": _2, - "solund": _2, - "songdalen": _2, - "sortland": _2, - "spydeberg": _2, - "stange": _2, - "stavanger": _2, - "steigen": _2, - "steinkjer": _2, - "stjordal": _2, - "xn--stjrdal-s1a": _2, - "stjørdal": _2, - "stokke": _2, - "stor-elvdal": _2, - "stord": _2, - "stordal": _2, - "storfjord": _2, - "omasvuotna": _2, - "strand": _2, - "stranda": _2, - "stryn": _2, - "sula": _2, - "suldal": _2, - "sund": _2, - "sunndal": _2, - "surnadal": _2, - "sveio": _2, - "svelvik": _2, - "sykkylven": _2, - "sogne": _2, - "xn--sgne-gra": _2, - "søgne": _2, - "somna": _2, - "xn--smna-gra": _2, - "sømna": _2, - "sondre-land": _2, - "xn--sndre-land-0cb": _2, - "søndre-land": _2, - "sor-aurdal": _2, - "xn--sr-aurdal-l8a": _2, - "sør-aurdal": _2, - "sor-fron": _2, - "xn--sr-fron-q1a": _2, - "sør-fron": _2, - "sor-odal": _2, - "xn--sr-odal-q1a": _2, - "sør-odal": _2, - "sor-varanger": _2, - "xn--sr-varanger-ggb": _2, - "sør-varanger": _2, - "matta-varjjat": _2, - "xn--mtta-vrjjat-k7af": _2, - "mátta-várjjat": _2, - "sorfold": _2, - "xn--srfold-bya": _2, - "sørfold": _2, - "sorreisa": _2, - "xn--srreisa-q1a": _2, - "sørreisa": _2, - "sorum": _2, - "xn--srum-gra": _2, - "sørum": _2, - "tana": _2, - "deatnu": _2, - "time": _2, - "tingvoll": _2, - "tinn": _2, - "tjeldsund": _2, - "dielddanuorri": _2, - "tjome": _2, - "xn--tjme-hra": _2, - "tjøme": _2, - "tokke": _2, - "tolga": _2, - "torsken": _2, - "tranoy": _2, - "xn--trany-yua": _2, - "tranøy": _2, - "tromso": _2, - "xn--troms-zua": _2, - "tromsø": _2, - "tromsa": _2, - "romsa": _2, - "trondheim": _2, - "troandin": _2, - "trysil": _2, - "trana": _2, - "xn--trna-woa": _2, - "træna": _2, - "trogstad": _2, - "xn--trgstad-r1a": _2, - "trøgstad": _2, - "tvedestrand": _2, - "tydal": _2, - "tynset": _2, - "tysfjord": _2, - "divtasvuodna": _2, - "divttasvuotna": _2, - "tysnes": _2, - "tysvar": _2, - "xn--tysvr-vra": _2, - "tysvær": _2, - "tonsberg": _2, - "xn--tnsberg-q1a": _2, - "tønsberg": _2, - "ullensaker": _2, - "ullensvang": _2, - "ulvik": _2, - "utsira": _2, - "vadso": _2, - "xn--vads-jra": _2, - "vadsø": _2, - "cahcesuolo": _2, - "xn--hcesuolo-7ya35b": _2, - "čáhcesuolo": _2, - "vaksdal": _2, - "valle": _2, - "vang": _2, - "vanylven": _2, - "vardo": _2, - "xn--vard-jra": _2, - "vardø": _2, - "varggat": _2, - "xn--vrggt-xqad": _2, - "várggát": _2, - "vefsn": _2, - "vaapste": _2, - "vega": _2, - "vegarshei": _2, - "xn--vegrshei-c0a": _2, - "vegårshei": _2, - "vennesla": _2, - "verdal": _2, - "verran": _2, - "vestby": _2, - "vestnes": _2, - "vestre-slidre": _2, - "vestre-toten": _2, - "vestvagoy": _2, - "xn--vestvgy-ixa6o": _2, - "vestvågøy": _2, - "vevelstad": _2, - "vik": _2, - "vikna": _2, - "vindafjord": _2, - "volda": _2, - "voss": _2, - "varoy": _2, - "xn--vry-yla5g": _2, - "værøy": _2, - "vagan": _2, - "xn--vgan-qoa": _2, - "vågan": _2, - "voagat": _2, - "vagsoy": _2, - "xn--vgsy-qoa0j": _2, - "vågsøy": _2, - "vaga": _2, - "xn--vg-yiab": _2, - "vågå": _2, - "ostfold": [0, { - "valer": _2 - }], - "xn--stfold-9xa": [0, { - "xn--vler-qoa": _2 - }], - "østfold": [0, { - "våler": _2 - }], - "co": _3, - "blogspot": _3, - "123hjemmeside": _3, - "myspreadshop": _3 - }], - "np": _8, - "nr": _35, - "nu": [1, { - "merseine": _3, - "mine": _3, - "shacknet": _3, - "enterprisecloud": _3 - }], - "nz": [1, { - "ac": _2, - "co": _6, - "cri": _2, - "geek": _2, - "gen": _2, - "govt": _2, - "health": _2, - "iwi": _2, - "kiwi": _2, - "maori": _2, - "mil": _2, - "xn--mori-qsa": _2, - "māori": _2, - "net": _2, - "org": _2, - "parliament": _2, - "school": _2 - }], - "om": [1, { - "co": _2, - "com": _2, - "edu": _2, - "gov": _2, - "med": _2, - "museum": _2, - "net": _2, - "org": _2, - "pro": _2 - }], - "onion": _2, - "org": [1, { - "altervista": _3, - "amune": [0, { - "tele": _3 - }], - "pimienta": _3, - "poivron": _3, - "potager": _3, - "sweetpepper": _3, - "ae": _3, - "us": _3, - "certmgr": _3, - "cdn77": [0, { - "c": _3, - "rsc": _3 - }], - "cdn77-secure": [0, { - "origin": [0, { - "ssl": _3 - }] - }], - "cloudns": _3, - "duckdns": _3, - "tunk": _3, - "dyndns": [2, { - "go": _3, - "home": _3 - }], - "blogdns": _3, - "blogsite": _3, - "boldlygoingnowhere": _3, - "dnsalias": _3, - "dnsdojo": _3, - "doesntexist": _3, - "dontexist": _3, - "doomdns": _3, - "dvrdns": _3, - "dynalias": _3, - "endofinternet": _3, - "endoftheinternet": _3, - "from-me": _3, - "game-host": _3, - "gotdns": _3, - "hobby-site": _3, - "homedns": _3, - "homeftp": _3, - "homelinux": _3, - "homeunix": _3, - "is-a-bruinsfan": _3, - "is-a-candidate": _3, - "is-a-celticsfan": _3, - "is-a-chef": _3, - "is-a-geek": _3, - "is-a-knight": _3, - "is-a-linux-user": _3, - "is-a-patsfan": _3, - "is-a-soxfan": _3, - "is-found": _3, - "is-lost": _3, - "is-saved": _3, - "is-very-bad": _3, - "is-very-evil": _3, - "is-very-good": _3, - "is-very-nice": _3, - "is-very-sweet": _3, - "isa-geek": _3, - "kicks-ass": _3, - "misconfused": _3, - "podzone": _3, - "readmyblog": _3, - "selfip": _3, - "sellsyourhome": _3, - "servebbs": _3, - "serveftp": _3, - "servegame": _3, - "stuff-4-sale": _3, - "webhop": _3, - "ddnss": _3, - "accesscam": _3, - "camdvr": _3, - "freeddns": _3, - "mywire": _3, - "webredirect": _3, - "eu": [2, { - "al": _3, - "asso": _3, - "at": _3, - "au": _3, - "be": _3, - "bg": _3, - "ca": _3, - "cd": _3, - "ch": _3, - "cn": _3, - "cy": _3, - "cz": _3, - "de": _3, - "dk": _3, - "edu": _3, - "ee": _3, - "es": _3, - "fi": _3, - "fr": _3, - "gr": _3, - "hr": _3, - "hu": _3, - "ie": _3, - "il": _3, - "in": _3, - "int": _3, - "is": _3, - "it": _3, - "jp": _3, - "kr": _3, - "lt": _3, - "lu": _3, - "lv": _3, - "mc": _3, - "me": _3, - "mk": _3, - "mt": _3, - "my": _3, - "net": _3, - "ng": _3, - "nl": _3, - "no": _3, - "nz": _3, - "paris": _3, - "pl": _3, - "pt": _3, - "q-a": _3, - "ro": _3, - "ru": _3, - "se": _3, - "si": _3, - "sk": _3, - "tr": _3, - "uk": _3, - "us": _3 - }], - "twmail": _3, - "fedorainfracloud": _3, - "fedorapeople": _3, - "fedoraproject": [0, { - "cloud": _3, - "os": _23, - "stg": [0, { - "os": _23 - }] - }], - "freedesktop": _3, - "hepforge": _3, - "in-dsl": _3, - "in-vpn": _3, - "js": _3, - "barsy": _3, - "mayfirst": _3, - "mozilla-iot": _3, - "bmoattachments": _3, - "dynserv": _3, - "now-dns": _3, - "cable-modem": _3, - "collegefan": _3, - "couchpotatofries": _3, - "mlbfan": _3, - "mysecuritycamera": _3, - "nflfan": _3, - "read-books": _3, - "ufcfan": _3, - "hopto": _3, - "myftp": _3, - "no-ip": _3, - "zapto": _3, - "httpbin": _3, - "pubtls": _3, - "jpn": _3, - "my-firewall": _3, - "myfirewall": _3, - "spdns": _3, - "small-web": _3, - "dsmynas": _3, - "familyds": _3, - "teckids": _12, - "tuxfamily": _3, - "diskstation": _3, - "hk": _3, - "wmflabs": _3, - "toolforge": _3, - "wmcloud": _3, - "za": _3 - }], - "pa": [1, { - "ac": _2, - "gob": _2, - "com": _2, - "org": _2, - "sld": _2, - "edu": _2, - "net": _2, - "ing": _2, - "abo": _2, - "med": _2, - "nom": _2 - }], - "pe": [1, { - "edu": _2, - "gob": _2, - "nom": _2, - "mil": _2, - "org": _2, - "com": _2, - "net": _2, - "blogspot": _3 - }], - "pf": [1, { - "com": _2, - "org": _2, - "edu": _2 - }], - "pg": _8, - "ph": [1, { - "com": _2, - "net": _2, - "org": _2, - "gov": _2, - "edu": _2, - "ngo": _2, - "mil": _2, - "i": _2 - }], - "pk": [1, { - "com": _2, - "net": _2, - "edu": _2, - "org": _2, - "fam": _2, - "biz": _2, - "web": _2, - "gov": _2, - "gob": _2, - "gok": _2, - "gon": _2, - "gop": _2, - "gos": _2, - "info": _2 - }], - "pl": [1, { - "com": _2, - "net": _2, - "org": _2, - "aid": _2, - "agro": _2, - "atm": _2, - "auto": _2, - "biz": _2, - "edu": _2, - "gmina": _2, - "gsm": _2, - "info": _2, - "mail": _2, - "miasta": _2, - "media": _2, - "mil": _2, - "nieruchomosci": _2, - "nom": _2, - "pc": _2, - "powiat": _2, - "priv": _2, - "realestate": _2, - "rel": _2, - "sex": _2, - "shop": _2, - "sklep": _2, - "sos": _2, - "szkola": _2, - "targi": _2, - "tm": _2, - "tourism": _2, - "travel": _2, - "turystyka": _2, - "gov": [1, { - "ap": _2, - "griw": _2, - "ic": _2, - "is": _2, - "kmpsp": _2, - "konsulat": _2, - "kppsp": _2, - "kwp": _2, - "kwpsp": _2, - "mup": _2, - "mw": _2, - "oia": _2, - "oirm": _2, - "oke": _2, - "oow": _2, - "oschr": _2, - "oum": _2, - "pa": _2, - "pinb": _2, - "piw": _2, - "po": _2, - "pr": _2, - "psp": _2, - "psse": _2, - "pup": _2, - "rzgw": _2, - "sa": _2, - "sdn": _2, - "sko": _2, - "so": _2, - "sr": _2, - "starostwo": _2, - "ug": _2, - "ugim": _2, - "um": _2, - "umig": _2, - "upow": _2, - "uppo": _2, - "us": _2, - "uw": _2, - "uzs": _2, - "wif": _2, - "wiih": _2, - "winb": _2, - "wios": _2, - "witd": _2, - "wiw": _2, - "wkz": _2, - "wsa": _2, - "wskr": _2, - "wsse": _2, - "wuoz": _2, - "wzmiuw": _2, - "zp": _2, - "zpisdn": _2 - }], - "augustow": _2, - "babia-gora": _2, - "bedzin": _2, - "beskidy": _2, - "bialowieza": _2, - "bialystok": _2, - "bielawa": _2, - "bieszczady": _2, - "boleslawiec": _2, - "bydgoszcz": _2, - "bytom": _2, - "cieszyn": _2, - "czeladz": _2, - "czest": _2, - "dlugoleka": _2, - "elblag": _2, - "elk": _2, - "glogow": _2, - "gniezno": _2, - "gorlice": _2, - "grajewo": _2, - "ilawa": _2, - "jaworzno": _2, - "jelenia-gora": _2, - "jgora": _2, - "kalisz": _2, - "kazimierz-dolny": _2, - "karpacz": _2, - "kartuzy": _2, - "kaszuby": _2, - "katowice": _2, - "kepno": _2, - "ketrzyn": _2, - "klodzko": _2, - "kobierzyce": _2, - "kolobrzeg": _2, - "konin": _2, - "konskowola": _2, - "kutno": _2, - "lapy": _2, - "lebork": _2, - "legnica": _2, - "lezajsk": _2, - "limanowa": _2, - "lomza": _2, - "lowicz": _2, - "lubin": _2, - "lukow": _2, - "malbork": _2, - "malopolska": _2, - "mazowsze": _2, - "mazury": _2, - "mielec": _2, - "mielno": _2, - "mragowo": _2, - "naklo": _2, - "nowaruda": _2, - "nysa": _2, - "olawa": _2, - "olecko": _2, - "olkusz": _2, - "olsztyn": _2, - "opoczno": _2, - "opole": _2, - "ostroda": _2, - "ostroleka": _2, - "ostrowiec": _2, - "ostrowwlkp": _2, - "pila": _2, - "pisz": _2, - "podhale": _2, - "podlasie": _2, - "polkowice": _2, - "pomorze": _2, - "pomorskie": _2, - "prochowice": _2, - "pruszkow": _2, - "przeworsk": _2, - "pulawy": _2, - "radom": _2, - "rawa-maz": _2, - "rybnik": _2, - "rzeszow": _2, - "sanok": _2, - "sejny": _2, - "slask": _2, - "slupsk": _2, - "sosnowiec": _2, - "stalowa-wola": _2, - "skoczow": _2, - "starachowice": _2, - "stargard": _2, - "suwalki": _2, - "swidnica": _2, - "swiebodzin": _2, - "swinoujscie": _2, - "szczecin": _2, - "szczytno": _2, - "tarnobrzeg": _2, - "tgory": _2, - "turek": _2, - "tychy": _2, - "ustka": _2, - "walbrzych": _2, - "warmia": _2, - "warszawa": _2, - "waw": _2, - "wegrow": _2, - "wielun": _2, - "wlocl": _2, - "wloclawek": _2, - "wodzislaw": _2, - "wolomin": _2, - "wroclaw": _2, - "zachpomor": _2, - "zagan": _2, - "zarow": _2, - "zgora": _2, - "zgorzelec": _2, - "beep": _3, - "ecommerce-shop": _3, - "shoparena": _3, - "homesklep": _3, - "sdscloud": _3, - "unicloud": _3, - "krasnik": _3, - "leczna": _3, - "lubartow": _3, - "lublin": _3, - "poniatowa": _3, - "swidnik": _3, - "co": _3, - "simplesite": _3, - "art": _3, - "gliwice": _3, - "krakow": _3, - "poznan": _3, - "wroc": _3, - "zakopane": _3, - "myspreadshop": _3, - "gda": _3, - "gdansk": _3, - "gdynia": _3, - "med": _3, - "sopot": _3 - }], - "pm": [1, { - "own": _3, - "name": _3 - }], - "pn": [1, { - "gov": _2, - "co": _2, - "org": _2, - "edu": _2, - "net": _2 - }], - "post": _2, - "pr": [1, { - "com": _2, - "net": _2, - "org": _2, - "gov": _2, - "edu": _2, - "isla": _2, - "pro": _2, - "biz": _2, - "info": _2, - "name": _2, - "est": _2, - "prof": _2, - "ac": _2 - }], - "pro": [1, { - "aaa": _2, - "aca": _2, - "acct": _2, - "avocat": _2, - "bar": _2, - "cpa": _2, - "eng": _2, - "jur": _2, - "law": _2, - "med": _2, - "recht": _2, - "cloudns": _3, - "dnstrace": [0, { - "bci": _3 - }], - "barsy": _3 - }], - "ps": [1, { - "edu": _2, - "gov": _2, - "sec": _2, - "plo": _2, - "com": _2, - "org": _2, - "net": _2 - }], - "pt": [1, { - "net": _2, - "gov": _2, - "org": _2, - "edu": _2, - "int": _2, - "publ": _2, - "com": _2, - "nome": _2, - "blogspot": _3, - "123paginaweb": _3 - }], - "pw": [1, { - "co": _2, - "ne": _2, - "or": _2, - "ed": _2, - "go": _2, - "belau": _2, - "cloudns": _3, - "x443": _3 - }], - "py": [1, { - "com": _2, - "coop": _2, - "edu": _2, - "gov": _2, - "mil": _2, - "net": _2, - "org": _2 - }], - "qa": [1, { - "com": _2, - "edu": _2, - "gov": _2, - "mil": _2, - "name": _2, - "net": _2, - "org": _2, - "sch": _2, - "blogspot": _3 - }], - "re": [1, { - "asso": _2, - "com": _2, - "nom": _2, - "blogspot": _3 - }], - "ro": [1, { - "arts": _2, - "com": _2, - "firm": _2, - "info": _2, - "nom": _2, - "nt": _2, - "org": _2, - "rec": _2, - "store": _2, - "tm": _2, - "www": _2, - "co": _3, - "shop": _3, - "blogspot": _3, - "barsy": _3 - }], - "rs": [1, { - "ac": _2, - "co": _2, - "edu": _2, - "gov": _2, - "in": _2, - "org": _2, - "brendly": [0, { - "shop": _3 - }], - "blogspot": _3, - "ua": _3, - "ox": _3 - }], - "ru": [1, { - "ac": _3, - "edu": _3, - "gov": _3, - "int": _3, - "mil": _3, - "test": _3, - "eurodir": _3, - "adygeya": _3, - "bashkiria": _3, - "bir": _3, - "cbg": _3, - "com": _3, - "dagestan": _3, - "grozny": _3, - "kalmykia": _3, - "kustanai": _3, - "marine": _3, - "mordovia": _3, - "msk": _3, - "mytis": _3, - "nalchik": _3, - "nov": _3, - "pyatigorsk": _3, - "spb": _3, - "vladikavkaz": _3, - "vladimir": _3, - "blogspot": _3, - "na4u": _3, - "mircloud": _3, - "regruhosting": _29, - "myjino": [2, { - "hosting": _5, - "landing": _5, - "spectrum": _5, - "vps": _5 - }], - "cldmail": [0, { - "hb": _3 - }], - "mcdir": [2, { - "vps": _3 - }], - "mcpre": _3, - "net": _3, - "org": _3, - "pp": _3, - "123sait": _3, - "lk3": _3, - "ras": _3 - }], - "rw": [1, { - "ac": _2, - "co": _2, - "coop": _2, - "gov": _2, - "mil": _2, - "net": _2, - "org": _2 - }], - "sa": [1, { - "com": _2, - "net": _2, - "org": _2, - "gov": _2, - "med": _2, - "pub": _2, - "edu": _2, - "sch": _2 - }], - "sb": _4, - "sc": _4, - "sd": [1, { - "com": _2, - "net": _2, - "org": _2, - "edu": _2, - "med": _2, - "tv": _2, - "gov": _2, - "info": _2 - }], - "se": [1, { - "a": _2, - "ac": _2, - "b": _2, - "bd": _2, - "brand": _2, - "c": _2, - "d": _2, - "e": _2, - "f": _2, - "fh": _2, - "fhsk": _2, - "fhv": _2, - "g": _2, - "h": _2, - "i": _2, - "k": _2, - "komforb": _2, - "kommunalforbund": _2, - "komvux": _2, - "l": _2, - "lanbib": _2, - "m": _2, - "n": _2, - "naturbruksgymn": _2, - "o": _2, - "org": _2, - "p": _2, - "parti": _2, - "pp": _2, - "press": _2, - "r": _2, - "s": _2, - "t": _2, - "tm": _2, - "u": _2, - "w": _2, - "x": _2, - "y": _2, - "z": _2, - "com": _3, - "blogspot": _3, - "conf": _3, - "iopsys": _3, - "123minsida": _3, - "itcouldbewor": _3, - "myspreadshop": _3, - "paba": [0, { - "su": _3 - }] - }], - "sg": [1, { - "com": _2, - "net": _2, - "org": _2, - "gov": _2, - "edu": _2, - "per": _2, - "blogspot": _3, - "enscaled": _3 - }], - "sh": [1, { - "com": _2, - "net": _2, - "gov": _2, - "org": _2, - "mil": _2, - "bip": _3, - "hashbang": _3, - "platform": [0, { - "bc": _3, - "ent": _3, - "eu": _3, - "us": _3 - }], - "now": _3, - "vxl": _3, - "wedeploy": _3 - }], - "si": [1, { - "gitapp": _3, - "gitpage": _3, - "blogspot": _3 - }], - "sj": _2, - "sk": _6, - "sl": _4, - "sm": _2, - "sn": [1, { - "art": _2, - "com": _2, - "edu": _2, - "gouv": _2, - "org": _2, - "perso": _2, - "univ": _2, - "blogspot": _3 - }], - "so": [1, { - "com": _2, - "edu": _2, - "gov": _2, - "me": _2, - "net": _2, - "org": _2, - "sch": _3 - }], - "sr": _2, - "ss": [1, { - "biz": _2, - "com": _2, - "edu": _2, - "gov": _2, - "me": _2, - "net": _2, - "org": _2, - "sch": _2 - }], - "st": [1, { - "co": _2, - "com": _2, - "consulado": _2, - "edu": _2, - "embaixada": _2, - "mil": _2, - "net": _2, - "org": _2, - "principe": _2, - "saotome": _2, - "store": _2, - "kirara": _3, - "noho": _3 - }], - "su": [1, { - "abkhazia": _3, - "adygeya": _3, - "aktyubinsk": _3, - "arkhangelsk": _3, - "armenia": _3, - "ashgabad": _3, - "azerbaijan": _3, - "balashov": _3, - "bashkiria": _3, - "bryansk": _3, - "bukhara": _3, - "chimkent": _3, - "dagestan": _3, - "east-kazakhstan": _3, - "exnet": _3, - "georgia": _3, - "grozny": _3, - "ivanovo": _3, - "jambyl": _3, - "kalmykia": _3, - "kaluga": _3, - "karacol": _3, - "karaganda": _3, - "karelia": _3, - "khakassia": _3, - "krasnodar": _3, - "kurgan": _3, - "kustanai": _3, - "lenug": _3, - "mangyshlak": _3, - "mordovia": _3, - "msk": _3, - "murmansk": _3, - "nalchik": _3, - "navoi": _3, - "north-kazakhstan": _3, - "nov": _3, - "obninsk": _3, - "penza": _3, - "pokrovsk": _3, - "sochi": _3, - "spb": _3, - "tashkent": _3, - "termez": _3, - "togliatti": _3, - "troitsk": _3, - "tselinograd": _3, - "tula": _3, - "tuva": _3, - "vladikavkaz": _3, - "vladimir": _3, - "vologda": _3 - }], - "sv": [1, { - "com": _2, - "edu": _2, - "gob": _2, - "org": _2, - "red": _2 - }], - "sx": _7, - "sy": _34, - "sz": [1, { - "co": _2, - "ac": _2, - "org": _2 - }], - "tc": [1, { - "ch": _3, - "me": _3, - "we": _3 - }], - "td": _6, - "tel": _2, - "tf": [1, { - "sch": _3 - }], - "tg": _2, - "th": [1, { - "ac": _2, - "co": _2, - "go": _2, - "in": _2, - "mi": _2, - "net": _2, - "or": _2, - "online": _3, - "shop": _3 - }], - "tj": [1, { - "ac": _2, - "biz": _2, - "co": _2, - "com": _2, - "edu": _2, - "go": _2, - "gov": _2, - "int": _2, - "mil": _2, - "name": _2, - "net": _2, - "nic": _2, - "org": _2, - "test": _2, - "web": _2 - }], - "tk": _2, - "tl": _7, - "tm": [1, { - "com": _2, - "co": _2, - "org": _2, - "net": _2, - "nom": _2, - "gov": _2, - "mil": _2, - "edu": _2 - }], - "tn": [1, { - "com": _2, - "ens": _2, - "fin": _2, - "gov": _2, - "ind": _2, - "info": _2, - "intl": _2, - "mincom": _2, - "nat": _2, - "net": _2, - "org": _2, - "perso": _2, - "tourism": _2, - "orangecloud": _3 - }], - "to": [1, { - "611": _3, - "com": _2, - "gov": _2, - "net": _2, - "org": _2, - "edu": _2, - "mil": _2, - "oya": _3, - "rdv": _3, - "x0": _3, - "vpnplus": _3, - "quickconnect": _13, - "nyan": _3 - }], - "tr": [1, { - "av": _2, - "bbs": _2, - "bel": _2, - "biz": _2, - "com": _6, - "dr": _2, - "edu": _2, - "gen": _2, - "gov": _2, - "info": _2, - "mil": _2, - "k12": _2, - "kep": _2, - "name": _2, - "net": _2, - "org": _2, - "pol": _2, - "tel": _2, - "tsk": _2, - "tv": _2, - "web": _2, - "nc": _7 - }], - "tt": [1, { - "co": _2, - "com": _2, - "org": _2, - "net": _2, - "biz": _2, - "info": _2, - "pro": _2, - "int": _2, - "coop": _2, - "jobs": _2, - "mobi": _2, - "travel": _2, - "museum": _2, - "aero": _2, - "name": _2, - "gov": _2, - "edu": _2 - }], - "tv": [1, { - "dyndns": _3, - "better-than": _3, - "on-the-web": _3, - "worse-than": _3, - "from": _3, - "sakura": _3 - }], - "tw": [1, { - "edu": _2, - "gov": _2, - "mil": _2, - "com": [1, { - "mymailer": _3 - }], - "net": _2, - "org": _2, - "idv": _2, - "game": _2, - "ebiz": _2, - "club": _2, - "xn--zf0ao64a": _2, - "網路": _2, - "xn--uc0atv": _2, - "組織": _2, - "xn--czrw28b": _2, - "商業": _2, - "url": _3, - "blogspot": _3 - }], - "tz": [1, { - "ac": _2, - "co": _2, - "go": _2, - "hotel": _2, - "info": _2, - "me": _2, - "mil": _2, - "mobi": _2, - "ne": _2, - "or": _2, - "sc": _2, - "tv": _2 - }], - "ua": [1, { - "com": _2, - "edu": _2, - "gov": _2, - "in": _2, - "net": _2, - "org": _2, - "cherkassy": _2, - "cherkasy": _2, - "chernigov": _2, - "chernihiv": _2, - "chernivtsi": _2, - "chernovtsy": _2, - "ck": _2, - "cn": _2, - "cr": _2, - "crimea": _2, - "cv": _2, - "dn": _2, - "dnepropetrovsk": _2, - "dnipropetrovsk": _2, - "donetsk": _2, - "dp": _2, - "if": _2, - "ivano-frankivsk": _2, - "kh": _2, - "kharkiv": _2, - "kharkov": _2, - "kherson": _2, - "khmelnitskiy": _2, - "khmelnytskyi": _2, - "kiev": _2, - "kirovograd": _2, - "km": _2, - "kr": _2, - "kropyvnytskyi": _2, - "krym": _2, - "ks": _2, - "kv": _2, - "kyiv": _2, - "lg": _2, - "lt": _2, - "lugansk": _2, - "lutsk": _2, - "lv": _2, - "lviv": _2, - "mk": _2, - "mykolaiv": _2, - "nikolaev": _2, - "od": _2, - "odesa": _2, - "odessa": _2, - "pl": _2, - "poltava": _2, - "rivne": _2, - "rovno": _2, - "rv": _2, - "sb": _2, - "sebastopol": _2, - "sevastopol": _2, - "sm": _2, - "sumy": _2, - "te": _2, - "ternopil": _2, - "uz": _2, - "uzhgorod": _2, - "vinnica": _2, - "vinnytsia": _2, - "vn": _2, - "volyn": _2, - "yalta": _2, - "zaporizhzhe": _2, - "zaporizhzhia": _2, - "zhitomir": _2, - "zhytomyr": _2, - "zp": _2, - "zt": _2, - "cc": _3, - "inf": _3, - "ltd": _3, - "cx": _3, - "ie": _3, - "biz": _3, - "co": _3, - "pp": _3, - "v": _3 - }], - "ug": [1, { - "co": _2, - "or": _2, - "ac": _2, - "sc": _2, - "go": _2, - "ne": _2, - "com": _2, - "org": _2, - "blogspot": _3 - }], - "uk": [1, { - "ac": _2, - "co": [1, { - "bytemark": [0, { - "dh": _3, - "vm": _3 - }], - "blogspot": _3, - "layershift": _28, - "barsy": _3, - "barsyonline": _3, - "retrosnub": _33, - "nh-serv": _3, - "no-ip": _3, - "wellbeingzone": _3, - "adimo": _3, - "myspreadshop": _3 - }], - "gov": [1, { - "campaign": _3, - "service": _3, - "api": _3, - "homeoffice": _3 - }], - "ltd": _2, - "me": _2, - "net": _2, - "nhs": _2, - "org": [1, { - "glug": _3, - "lug": _3, - "lugs": _3, - "affinitylottery": _3, - "raffleentry": _3, - "weeklylottery": _3 - }], - "plc": _2, - "police": _2, - "sch": _8, - "conn": _3, - "copro": _3, - "hosp": _3, - "independent-commission": _3, - "independent-inquest": _3, - "independent-inquiry": _3, - "independent-panel": _3, - "independent-review": _3, - "public-inquiry": _3, - "royal-commission": _3, - "pymnt": _3, - "barsy": _3 - }], - "us": [1, { - "dni": _2, - "fed": _2, - "isa": _2, - "kids": _2, - "nsn": _2, - "ak": _42, - "al": _42, - "ar": _42, - "as": _42, - "az": _42, - "ca": _42, - "co": _42, - "ct": _42, - "dc": _42, - "de": [1, { - "k12": _2, - "cc": _2, - "lib": _3 - }], - "fl": _42, - "ga": _42, - "gu": _42, - "hi": _43, - "ia": _42, - "id": _42, - "il": _42, - "in": _42, - "ks": _42, - "ky": _42, - "la": _42, - "ma": [1, { - "k12": [1, { - "pvt": _2, - "chtr": _2, - "paroch": _2 - }], - "cc": _2, - "lib": _2 - }], - "md": _42, - "me": _42, - "mi": [1, { - "k12": _2, - "cc": _2, - "lib": _2, - "ann-arbor": _2, - "cog": _2, - "dst": _2, - "eaton": _2, - "gen": _2, - "mus": _2, - "tec": _2, - "washtenaw": _2 - }], - "mn": _42, - "mo": _42, - "ms": _42, - "mt": _42, - "nc": _42, - "nd": _43, - "ne": _42, - "nh": _42, - "nj": _42, - "nm": _42, - "nv": _42, - "ny": _42, - "oh": _42, - "ok": _42, - "or": _42, - "pa": _42, - "pr": _42, - "ri": _43, - "sc": _42, - "sd": _43, - "tn": _42, - "tx": _42, - "ut": _42, - "vi": _42, - "vt": _42, - "va": _42, - "wa": _42, - "wi": _42, - "wv": [1, { - "cc": _2 - }], - "wy": _42, - "graphox": _3, - "cloudns": _3, - "drud": _3, - "is-by": _3, - "land-4-sale": _3, - "stuff-4-sale": _3, - "enscaled": [0, { - "phx": _3 - }], - "mircloud": _3, - "freeddns": _3, - "golffan": _3, - "noip": _3, - "pointto": _3, - "platterp": _3 - }], - "uy": [1, { - "com": _6, - "edu": _2, - "gub": _2, - "mil": _2, - "net": _2, - "org": _2 - }], - "uz": [1, { - "co": _2, - "com": _2, - "net": _2, - "org": _2 - }], - "va": _2, - "vc": [1, { - "com": _2, - "net": _2, - "org": _2, - "gov": _2, - "mil": _2, - "edu": _2, - "gv": [2, { - "d": _3 - }], - "0e": _3 - }], - "ve": [1, { - "arts": _2, - "bib": _2, - "co": _2, - "com": _2, - "e12": _2, - "edu": _2, - "firm": _2, - "gob": _2, - "gov": _2, - "info": _2, - "int": _2, - "mil": _2, - "net": _2, - "nom": _2, - "org": _2, - "rar": _2, - "rec": _2, - "store": _2, - "tec": _2, - "web": _2 - }], - "vg": [1, { - "at": _3 - }], - "vi": [1, { - "co": _2, - "com": _2, - "k12": _2, - "net": _2, - "org": _2 - }], - "vn": [1, { - "ac": _2, - "ai": _2, - "biz": _2, - "com": _2, - "edu": _2, - "gov": _2, - "health": _2, - "id": _2, - "info": _2, - "int": _2, - "io": _2, - "name": _2, - "net": _2, - "org": _2, - "pro": _2, - "angiang": _2, - "bacgiang": _2, - "backan": _2, - "baclieu": _2, - "bacninh": _2, - "baria-vungtau": _2, - "bentre": _2, - "binhdinh": _2, - "binhduong": _2, - "binhphuoc": _2, - "binhthuan": _2, - "camau": _2, - "cantho": _2, - "caobang": _2, - "daklak": _2, - "daknong": _2, - "danang": _2, - "dienbien": _2, - "dongnai": _2, - "dongthap": _2, - "gialai": _2, - "hagiang": _2, - "haiduong": _2, - "haiphong": _2, - "hanam": _2, - "hanoi": _2, - "hatinh": _2, - "haugiang": _2, - "hoabinh": _2, - "hungyen": _2, - "khanhhoa": _2, - "kiengiang": _2, - "kontum": _2, - "laichau": _2, - "lamdong": _2, - "langson": _2, - "laocai": _2, - "longan": _2, - "namdinh": _2, - "nghean": _2, - "ninhbinh": _2, - "ninhthuan": _2, - "phutho": _2, - "phuyen": _2, - "quangbinh": _2, - "quangnam": _2, - "quangngai": _2, - "quangninh": _2, - "quangtri": _2, - "soctrang": _2, - "sonla": _2, - "tayninh": _2, - "thaibinh": _2, - "thainguyen": _2, - "thanhhoa": _2, - "thanhphohochiminh": _2, - "thuathienhue": _2, - "tiengiang": _2, - "travinh": _2, - "tuyenquang": _2, - "vinhlong": _2, - "vinhphuc": _2, - "yenbai": _2, - "blogspot": _3 - }], - "vu": [1, { - "com": _2, - "edu": _2, - "net": _2, - "org": _2, - "cn": _3, - "blog": _3, - "dev": _3, - "me": _3 - }], - "wf": [1, { - "biz": _3, - "sch": _3 - }], - "ws": [1, { - "com": _2, - "net": _2, - "org": _2, - "gov": _2, - "edu": _2, - "advisor": _5, - "cloud66": _3, - "dyndns": _3, - "mypets": _3 - }], - "yt": [1, { - "org": _3 - }], - "xn--mgbaam7a8h": _2, - "امارات": _2, - "xn--y9a3aq": _2, - "հայ": _2, - "xn--54b7fta0cc": _2, - "বাংলা": _2, - "xn--90ae": _2, - "бг": _2, - "xn--mgbcpq6gpa1a": _2, - "البحرين": _2, - "xn--90ais": _2, - "бел": _2, - "xn--fiqs8s": _2, - "中国": _2, - "xn--fiqz9s": _2, - "中國": _2, - "xn--lgbbat1ad8j": _2, - "الجزائر": _2, - "xn--wgbh1c": _2, - "مصر": _2, - "xn--e1a4c": _2, - "ею": _2, - "xn--qxa6a": _2, - "ευ": _2, - "xn--mgbah1a3hjkrd": _2, - "موريتانيا": _2, - "xn--node": _2, - "გე": _2, - "xn--qxam": _2, - "ελ": _2, - "xn--j6w193g": [1, { - "xn--55qx5d": _2, - "xn--wcvs22d": _2, - "xn--mxtq1m": _2, - "xn--gmqw5a": _2, - "xn--od0alg": _2, - "xn--uc0atv": _2 - }], - "香港": [1, { - "公司": _2, - "教育": _2, - "政府": _2, - "個人": _2, - "網絡": _2, - "組織": _2 - }], - "xn--2scrj9c": _2, - "ಭಾರತ": _2, - "xn--3hcrj9c": _2, - "ଭାରତ": _2, - "xn--45br5cyl": _2, - "ভাৰত": _2, - "xn--h2breg3eve": _2, - "भारतम्": _2, - "xn--h2brj9c8c": _2, - "भारोत": _2, - "xn--mgbgu82a": _2, - "ڀارت": _2, - "xn--rvc1e0am3e": _2, - "ഭാരതം": _2, - "xn--h2brj9c": _2, - "भारत": _2, - "xn--mgbbh1a": _2, - "بارت": _2, - "xn--mgbbh1a71e": _2, - "بھارت": _2, - "xn--fpcrj9c3d": _2, - "భారత్": _2, - "xn--gecrj9c": _2, - "ભારત": _2, - "xn--s9brj9c": _2, - "ਭਾਰਤ": _2, - "xn--45brj9c": _2, - "ভারত": _2, - "xn--xkc2dl3a5ee0h": _2, - "இந்தியா": _2, - "xn--mgba3a4f16a": _2, - "ایران": _2, - "xn--mgba3a4fra": _2, - "ايران": _2, - "xn--mgbtx2b": _2, - "عراق": _2, - "xn--mgbayh7gpa": _2, - "الاردن": _2, - "xn--3e0b707e": _2, - "한국": _2, - "xn--80ao21a": _2, - "қаз": _2, - "xn--q7ce6a": _2, - "ລາວ": _2, - "xn--fzc2c9e2c": _2, - "ලංකා": _2, - "xn--xkc2al3hye2a": _2, - "இலங்கை": _2, - "xn--mgbc0a9azcg": _2, - "المغرب": _2, - "xn--d1alf": _2, - "мкд": _2, - "xn--l1acc": _2, - "мон": _2, - "xn--mix891f": _2, - "澳門": _2, - "xn--mix082f": _2, - "澳门": _2, - "xn--mgbx4cd0ab": _2, - "مليسيا": _2, - "xn--mgb9awbf": _2, - "عمان": _2, - "xn--mgbai9azgqp6j": _2, - "پاکستان": _2, - "xn--mgbai9a5eva00b": _2, - "پاكستان": _2, - "xn--ygbi2ammx": _2, - "فلسطين": _2, - "xn--90a3ac": [1, { - "xn--o1ac": _2, - "xn--c1avg": _2, - "xn--90azh": _2, - "xn--d1at": _2, - "xn--o1ach": _2, - "xn--80au": _2 - }], - "срб": [1, { - "пр": _2, - "орг": _2, - "обр": _2, - "од": _2, - "упр": _2, - "ак": _2 - }], - "xn--p1ai": _2, - "рф": _2, - "xn--wgbl6a": _2, - "قطر": _2, - "xn--mgberp4a5d4ar": _2, - "السعودية": _2, - "xn--mgberp4a5d4a87g": _2, - "السعودیة": _2, - "xn--mgbqly7c0a67fbc": _2, - "السعودیۃ": _2, - "xn--mgbqly7cvafr": _2, - "السعوديه": _2, - "xn--mgbpl2fh": _2, - "سودان": _2, - "xn--yfro4i67o": _2, - "新加坡": _2, - "xn--clchc0ea0b2g2a9gcd": _2, - "சிங்கப்பூர்": _2, - "xn--ogbpf8fl": _2, - "سورية": _2, - "xn--mgbtf8fl": _2, - "سوريا": _2, - "xn--o3cw4h": [1, { - "xn--12c1fe0br": _2, - "xn--12co0c3b4eva": _2, - "xn--h3cuzk1di": _2, - "xn--o3cyx2a": _2, - "xn--m3ch0j3a": _2, - "xn--12cfi8ixb8l": _2 - }], - "ไทย": [1, { - "ศึกษา": _2, - "ธุรกิจ": _2, - "รัฐบาล": _2, - "ทหาร": _2, - "เน็ต": _2, - "องค์กร": _2 - }], - "xn--pgbs0dh": _2, - "تونس": _2, - "xn--kpry57d": _2, - "台灣": _2, - "xn--kprw13d": _2, - "台湾": _2, - "xn--nnx388a": _2, - "臺灣": _2, - "xn--j1amh": _2, - "укр": _2, - "xn--mgb2ddes": _2, - "اليمن": _2, - "xxx": _2, - "ye": _34, - "za": [0, { - "ac": _2, - "agric": _2, - "alt": _2, - "co": _6, - "edu": _2, - "gov": _2, - "grondar": _2, - "law": _2, - "mil": _2, - "net": _2, - "ngo": _2, - "nic": _2, - "nis": _2, - "nom": _2, - "org": _2, - "school": _2, - "tm": _2, - "web": _2 - }], - "zm": [1, { - "ac": _2, - "biz": _2, - "co": _2, - "com": _2, - "edu": _2, - "gov": _2, - "info": _2, - "mil": _2, - "net": _2, - "org": _2, - "sch": _2 - }], - "zw": [1, { - "ac": _2, - "co": _2, - "gov": _2, - "mil": _2, - "org": _2 - }], - "aaa": _2, - "aarp": _2, - "abb": _2, - "abbott": _2, - "abbvie": _2, - "abc": _2, - "able": _2, - "abogado": _2, - "abudhabi": _2, - "academy": [1, { - "official": _3 - }], - "accenture": _2, - "accountant": _2, - "accountants": _2, - "aco": _2, - "actor": _2, - "ads": _2, - "adult": _2, - "aeg": _2, - "aetna": _2, - "afl": _2, - "africa": _2, - "agakhan": _2, - "agency": _2, - "aig": _2, - "airbus": _2, - "airforce": _2, - "airtel": _2, - "akdn": _2, - "alibaba": _2, - "alipay": _2, - "allfinanz": _2, - "allstate": _2, - "ally": _2, - "alsace": _2, - "alstom": _2, - "amazon": _2, - "americanexpress": _2, - "americanfamily": _2, - "amex": _2, - "amfam": _2, - "amica": _2, - "amsterdam": _2, - "analytics": _2, - "android": _2, - "anquan": _2, - "anz": _2, - "aol": _2, - "apartments": _2, - "app": [1, { - "beget": _5, - "clerk": _3, - "clerkstage": _3, - "wnext": _3, - "platform0": _3, - "deta": _3, - "ondigitalocean": _3, - "easypanel": _3, - "encr": _3, - "edgecompute": _3, - "fireweb": _3, - "onflashdrive": _3, - "framer": _3, - "run": [2, { - "a": _3 - }], - "web": _3, - "hasura": _3, - "loginline": _3, - "messerli": _3, - "netlify": _3, - "ngrok": _3, - "ngrok-free": _3, - "developer": _5, - "noop": _3, - "northflank": _5, - "snowflake": [2, { - "privatelink": _3 - }], - "streamlit": _3, - "storipress": _3, - "telebit": _3, - "typedream": _3, - "vercel": _3, - "bookonline": _3 - }], - "apple": _2, - "aquarelle": _2, - "arab": _2, - "aramco": _2, - "archi": _2, - "army": _2, - "art": _2, - "arte": _2, - "asda": _2, - "associates": _2, - "athleta": _2, - "attorney": _2, - "auction": _2, - "audi": _2, - "audible": _2, - "audio": _2, - "auspost": _2, - "author": _2, - "auto": _2, - "autos": _2, - "avianca": _2, - "aws": _2, - "axa": _2, - "azure": _2, - "baby": _2, - "baidu": _2, - "banamex": _2, - "bananarepublic": _2, - "band": _2, - "bank": _2, - "bar": _2, - "barcelona": _2, - "barclaycard": _2, - "barclays": _2, - "barefoot": _2, - "bargains": _2, - "baseball": _2, - "basketball": [1, { - "aus": _3, - "nz": _3 - }], - "bauhaus": _2, - "bayern": _2, - "bbc": _2, - "bbt": _2, - "bbva": _2, - "bcg": _2, - "bcn": _2, - "beats": _2, - "beauty": _2, - "beer": _2, - "bentley": _2, - "berlin": _2, - "best": _2, - "bestbuy": _2, - "bet": _2, - "bharti": _2, - "bible": _2, - "bid": _2, - "bike": _2, - "bing": _2, - "bingo": _2, - "bio": _2, - "black": _2, - "blackfriday": _2, - "blockbuster": _2, - "blog": _2, - "bloomberg": _2, - "blue": _2, - "bms": _2, - "bmw": _2, - "bnpparibas": _2, - "boats": _2, - "boehringer": _2, - "bofa": _2, - "bom": _2, - "bond": _2, - "boo": _2, - "book": _2, - "booking": _2, - "bosch": _2, - "bostik": _2, - "boston": _2, - "bot": _2, - "boutique": _2, - "box": _2, - "bradesco": _2, - "bridgestone": _2, - "broadway": _2, - "broker": _2, - "brother": _2, - "brussels": _2, - "build": _2, - "builders": [1, { - "cloudsite": _3 - }], - "business": _10, - "buy": _2, - "buzz": _2, - "bzh": _2, - "cab": _2, - "cafe": _2, - "cal": _2, - "call": _2, - "calvinklein": _2, - "cam": _2, - "camera": _2, - "camp": _2, - "canon": _2, - "capetown": _2, - "capital": _2, - "capitalone": _2, - "car": _2, - "caravan": _2, - "cards": _2, - "care": _2, - "career": _2, - "careers": _2, - "cars": _2, - "casa": [1, { - "nabu": [0, { - "ui": _3 - }] - }], - "case": _2, - "cash": _2, - "casino": _2, - "catering": _2, - "catholic": _2, - "cba": _2, - "cbn": _2, - "cbre": _2, - "cbs": _2, - "center": _2, - "ceo": _2, - "cern": _2, - "cfa": _2, - "cfd": _2, - "chanel": _2, - "channel": _2, - "charity": _2, - "chase": _2, - "chat": _2, - "cheap": _2, - "chintai": _2, - "christmas": _2, - "chrome": _2, - "church": _2, - "cipriani": _2, - "circle": _2, - "cisco": _2, - "citadel": _2, - "citi": _2, - "citic": _2, - "city": _2, - "cityeats": _2, - "claims": _2, - "cleaning": _2, - "click": _2, - "clinic": _2, - "clinique": _2, - "clothing": _2, - "cloud": [1, { - "banzai": _5, - "elementor": _3, - "encoway": [0, { - "eu": _3 - }], - "statics": _5, - "ravendb": _3, - "axarnet": [0, { - "es-1": _3 - }], - "diadem": _3, - "jelastic": [0, { - "vip": _3 - }], - "jele": _3, - "jenv-aruba": [0, { - "aruba": [0, { - "eur": [0, { - "it1": _3 - }] - }], - "it1": _3 - }], - "keliweb": [2, { - "cs": _3 - }], - "oxa": [2, { - "tn": _3, - "uk": _3 - }], - "primetel": [2, { - "uk": _3 - }], - "reclaim": [0, { - "ca": _3, - "uk": _3, - "us": _3 - }], - "trendhosting": [0, { - "ch": _3, - "de": _3 - }], - "jotelulu": _3, - "kuleuven": _3, - "linkyard": _3, - "magentosite": _5, - "perspecta": _3, - "vapor": _3, - "on-rancher": _5, - "scw": [0, { - "baremetal": [0, { - "fr-par-1": _3, - "fr-par-2": _3, - "nl-ams-1": _3 - }], - "fr-par": [0, { - "fnc": [2, { - "functions": _3 - }], - "k8s": _11, - "s3": _3, - "s3-website": _3, - "whm": _3 - }], - "instances": [0, { - "priv": _3, - "pub": _3 - }], - "k8s": _3, - "nl-ams": [0, { - "k8s": _11, - "s3": _3, - "s3-website": _3, - "whm": _3 - }], - "pl-waw": [0, { - "k8s": _11, - "s3": _3, - "s3-website": _3 - }], - "scalebook": _3, - "smartlabeling": _3 - }], - "sensiosite": _5, - "trafficplex": _3, - "urown": _3, - "voorloper": _3 - }], - "club": [1, { - "cloudns": _3, - "jele": _3, - "barsy": _3 - }], - "clubmed": _2, - "coach": _2, - "codes": [1, { - "owo": _5 - }], - "coffee": _2, - "college": _2, - "cologne": _2, - "comcast": _2, - "commbank": _2, - "community": [1, { - "nog": _3, - "ravendb": _3, - "myforum": _3 - }], - "company": _2, - "compare": _2, - "computer": _2, - "comsec": _2, - "condos": _2, - "construction": _2, - "consulting": _2, - "contact": _2, - "contractors": _2, - "cooking": _2, - "cool": [1, { - "elementor": _3, - "de": _3 - }], - "corsica": _2, - "country": _2, - "coupon": _2, - "coupons": _2, - "courses": _2, - "cpa": _2, - "credit": _2, - "creditcard": _2, - "creditunion": _2, - "cricket": _2, - "crown": _2, - "crs": _2, - "cruise": _2, - "cruises": _2, - "cuisinella": _2, - "cymru": _2, - "cyou": _2, - "dabur": _2, - "dad": _2, - "dance": _2, - "data": _2, - "date": _2, - "dating": _2, - "datsun": _2, - "day": _2, - "dclk": _2, - "dds": _2, - "deal": _2, - "dealer": _2, - "deals": _2, - "degree": _2, - "delivery": _2, - "dell": _2, - "deloitte": _2, - "delta": _2, - "democrat": _2, - "dental": _2, - "dentist": _2, - "desi": _2, - "design": [1, { - "bss": _3 - }], - "dev": [1, { - "autocode": _3, - "lcl": _5, - "lclstage": _5, - "stg": _5, - "stgstage": _5, - "pages": _3, - "r2": _3, - "workers": _3, - "curv": _3, - "deno": _3, - "deno-staging": _3, - "deta": _3, - "fly": _3, - "githubpreview": _3, - "gateway": _5, - "iserv": _3, - "localcert": [0, { - "user": _5 - }], - "loginline": _3, - "mediatech": _3, - "ngrok": _3, - "ngrok-free": _3, - "platter-app": _3, - "shiftcrypto": _3, - "vercel": _3, - "webhare": _5 - }], - "dhl": _2, - "diamonds": _2, - "diet": _2, - "digital": [1, { - "cloudapps": [2, { - "london": _3 - }] - }], - "direct": _2, - "directory": _2, - "discount": _2, - "discover": _2, - "dish": _2, - "diy": _2, - "dnp": _2, - "docs": _2, - "doctor": _2, - "dog": _2, - "domains": _2, - "dot": _2, - "download": _2, - "drive": _2, - "dtv": _2, - "dubai": _2, - "dunlop": _2, - "dupont": _2, - "durban": _2, - "dvag": _2, - "dvr": _2, - "earth": [1, { - "dapps": [0, { - "*": _3, - "bzz": _5 - }] - }], - "eat": _2, - "eco": _2, - "edeka": _2, - "education": _10, - "email": _2, - "emerck": _2, - "energy": _2, - "engineer": _2, - "engineering": _2, - "enterprises": _2, - "epson": _2, - "equipment": _2, - "ericsson": _2, - "erni": _2, - "esq": _2, - "estate": [1, { - "compute": _5 - }], - "etisalat": _2, - "eurovision": _2, - "eus": [1, { - "party": _30 - }], - "events": [1, { - "koobin": _3, - "co": _3 - }], - "exchange": _2, - "expert": _2, - "exposed": _2, - "express": _2, - "extraspace": _2, - "fage": _2, - "fail": _2, - "fairwinds": _2, - "faith": _31, - "family": _2, - "fan": _2, - "fans": _2, - "farm": [1, { - "storj": _3 - }], - "farmers": _2, - "fashion": _2, - "fast": _2, - "fedex": _2, - "feedback": _2, - "ferrari": _2, - "ferrero": _2, - "fidelity": _2, - "fido": _2, - "film": _2, - "final": _2, - "finance": _2, - "financial": _10, - "fire": _2, - "firestone": _2, - "firmdale": _2, - "fish": _2, - "fishing": _2, - "fit": _2, - "fitness": _2, - "flickr": _2, - "flights": _2, - "flir": _2, - "florist": _2, - "flowers": _2, - "fly": _2, - "foo": _2, - "food": _2, - "football": _2, - "ford": _2, - "forex": _2, - "forsale": _2, - "forum": _2, - "foundation": _2, - "fox": _2, - "free": _2, - "fresenius": _2, - "frl": _2, - "frogans": _2, - "frontdoor": _2, - "frontier": _2, - "ftr": _2, - "fujitsu": _2, - "fun": _2, - "fund": _2, - "furniture": _2, - "futbol": _2, - "fyi": _2, - "gal": _2, - "gallery": _2, - "gallo": _2, - "gallup": _2, - "game": _2, - "games": _2, - "gap": _2, - "garden": _2, - "gay": _2, - "gbiz": _2, - "gdn": [1, { - "cnpy": _3 - }], - "gea": _2, - "gent": _2, - "genting": _2, - "george": _2, - "ggee": _2, - "gift": _2, - "gifts": _2, - "gives": _2, - "giving": _2, - "glass": _2, - "gle": _2, - "global": _2, - "globo": _2, - "gmail": _2, - "gmbh": _2, - "gmo": _2, - "gmx": _2, - "godaddy": _2, - "gold": _2, - "goldpoint": _2, - "golf": _2, - "goo": _2, - "goodyear": _2, - "goog": [1, { - "cloud": _3, - "translate": _3, - "usercontent": _5 - }], - "google": _2, - "gop": _2, - "got": _2, - "grainger": _2, - "graphics": _2, - "gratis": _2, - "green": _2, - "gripe": _2, - "grocery": _2, - "group": [1, { - "discourse": _3 - }], - "guardian": _2, - "gucci": _2, - "guge": _2, - "guide": _2, - "guitars": _2, - "guru": _2, - "hair": _2, - "hamburg": _2, - "hangout": _2, - "haus": _2, - "hbo": _2, - "hdfc": _2, - "hdfcbank": _2, - "health": [1, { - "hra": _3 - }], - "healthcare": _2, - "help": _2, - "helsinki": _2, - "here": _2, - "hermes": _2, - "hiphop": _2, - "hisamitsu": _2, - "hitachi": _2, - "hiv": _2, - "hkt": _2, - "hockey": _2, - "holdings": _2, - "holiday": _2, - "homedepot": _2, - "homegoods": _2, - "homes": _2, - "homesense": _2, - "honda": _2, - "horse": _2, - "hospital": _2, - "host": [1, { - "cloudaccess": _3, - "freesite": _3, - "easypanel": _3, - "fastvps": _3, - "myfast": _3, - "tempurl": _3, - "wpmudev": _3, - "jele": _3, - "mircloud": _3, - "pcloud": _3, - "half": _3 - }], - "hosting": [1, { - "opencraft": _3 - }], - "hot": _2, - "hotels": _2, - "hotmail": _2, - "house": _2, - "how": _2, - "hsbc": _2, - "hughes": _2, - "hyatt": _2, - "hyundai": _2, - "ibm": _2, - "icbc": _2, - "ice": _2, - "icu": _2, - "ieee": _2, - "ifm": _2, - "ikano": _2, - "imamat": _2, - "imdb": _2, - "immo": _2, - "immobilien": _2, - "inc": _2, - "industries": _2, - "infiniti": _2, - "ing": _2, - "ink": _2, - "institute": _2, - "insurance": _2, - "insure": _2, - "international": _2, - "intuit": _2, - "investments": _2, - "ipiranga": _2, - "irish": _2, - "ismaili": _2, - "ist": _2, - "istanbul": _2, - "itau": _2, - "itv": _2, - "jaguar": _2, - "java": _2, - "jcb": _2, - "jeep": _2, - "jetzt": _2, - "jewelry": _2, - "jio": _2, - "jll": _2, - "jmp": _2, - "jnj": _2, - "joburg": _2, - "jot": _2, - "joy": _2, - "jpmorgan": _2, - "jprs": _2, - "juegos": _2, - "juniper": _2, - "kaufen": _2, - "kddi": _2, - "kerryhotels": _2, - "kerrylogistics": _2, - "kerryproperties": _2, - "kfh": _2, - "kia": _2, - "kids": _2, - "kim": _2, - "kinder": _2, - "kindle": _2, - "kitchen": _2, - "kiwi": _2, - "koeln": _2, - "komatsu": _2, - "kosher": _2, - "kpmg": _2, - "kpn": _2, - "krd": [1, { - "co": _3, - "edu": _3 - }], - "kred": _2, - "kuokgroup": _2, - "kyoto": _2, - "lacaixa": _2, - "lamborghini": _2, - "lamer": _2, - "lancaster": _2, - "land": [1, { - "static": [2, { - "dev": _3, - "sites": _3 - }] - }], - "landrover": _2, - "lanxess": _2, - "lasalle": _2, - "lat": _2, - "latino": _2, - "latrobe": _2, - "law": _2, - "lawyer": _2, - "lds": _2, - "lease": _2, - "leclerc": _2, - "lefrak": _2, - "legal": _2, - "lego": _2, - "lexus": _2, - "lgbt": _2, - "lidl": _2, - "life": _2, - "lifeinsurance": _2, - "lifestyle": _2, - "lighting": _2, - "like": _2, - "lilly": _2, - "limited": _2, - "limo": _2, - "lincoln": _2, - "link": [1, { - "cyon": _3, - "mypep": _3, - "dweb": _5 - }], - "lipsy": _2, - "live": [1, { - "hlx": _3 - }], - "living": _2, - "llc": _2, - "llp": _2, - "loan": _2, - "loans": _2, - "locker": _2, - "locus": _2, - "lol": [1, { - "omg": _3 - }], - "london": _2, - "lotte": _2, - "lotto": _2, - "love": _2, - "lpl": _2, - "lplfinancial": _2, - "ltd": _2, - "ltda": _2, - "lundbeck": _2, - "luxe": _2, - "luxury": _2, - "madrid": _2, - "maif": _2, - "maison": _2, - "makeup": _2, - "man": _2, - "management": [1, { - "router": _3 - }], - "mango": _2, - "map": _2, - "market": _2, - "marketing": _2, - "markets": _2, - "marriott": _2, - "marshalls": _2, - "mattel": _2, - "mba": _2, - "mckinsey": _2, - "med": _2, - "media": _37, - "meet": _2, - "melbourne": _2, - "meme": _2, - "memorial": _2, - "men": _2, - "menu": _38, - "merckmsd": _2, - "miami": _2, - "microsoft": _2, - "mini": _2, - "mint": _2, - "mit": _2, - "mitsubishi": _2, - "mlb": _2, - "mls": _2, - "mma": _2, - "mobile": _2, - "moda": _2, - "moe": _2, - "moi": _2, - "mom": _2, - "monash": _2, - "money": _2, - "monster": _2, - "mormon": _2, - "mortgage": _2, - "moscow": _2, - "moto": _2, - "motorcycles": _2, - "mov": _2, - "movie": _2, - "msd": _2, - "mtn": _2, - "mtr": _2, - "music": _2, - "nab": _2, - "nagoya": _2, - "natura": _2, - "navy": _2, - "nba": _2, - "nec": _2, - "netbank": _2, - "netflix": _2, - "network": [1, { - "alces": _5, - "co": _3, - "arvo": _3, - "azimuth": _3, - "tlon": _3 - }], - "neustar": _2, - "new": _2, - "news": [1, { - "noticeable": _3 - }], - "next": _2, - "nextdirect": _2, - "nexus": _2, - "nfl": _2, - "ngo": _2, - "nhk": _2, - "nico": _2, - "nike": _2, - "nikon": _2, - "ninja": _2, - "nissan": _2, - "nissay": _2, - "nokia": _2, - "norton": _2, - "now": _2, - "nowruz": _2, - "nowtv": _2, - "nra": _2, - "nrw": _2, - "ntt": _2, - "nyc": _2, - "obi": _2, - "observer": _2, - "office": _2, - "okinawa": _2, - "olayan": _2, - "olayangroup": _2, - "oldnavy": _2, - "ollo": _2, - "omega": _2, - "one": [1, { - "onred": [2, { - "staging": _3 - }], - "service": _3, - "homelink": _3 - }], - "ong": _2, - "onl": _2, - "online": [1, { - "eero": _3, - "eero-stage": _3, - "barsy": _3 - }], - "ooo": _2, - "open": _2, - "oracle": _2, - "orange": [1, { - "tech": _3 - }], - "organic": _2, - "origins": _2, - "osaka": _2, - "otsuka": _2, - "ott": _2, - "ovh": [1, { - "nerdpol": _3 - }], - "page": [1, { - "hlx": _3, - "hlx3": _3, - "translated": _3, - "codeberg": _3, - "pdns": _3, - "plesk": _3, - "prvcy": _3, - "rocky": _3, - "magnet": _3 - }], - "panasonic": _2, - "paris": _2, - "pars": _2, - "partners": _2, - "parts": _2, - "party": _31, - "pay": _2, - "pccw": _2, - "pet": _2, - "pfizer": _2, - "pharmacy": _2, - "phd": _2, - "philips": _2, - "phone": _2, - "photo": _2, - "photography": _2, - "photos": _37, - "physio": _2, - "pics": _2, - "pictet": _2, - "pictures": [1, { - "1337": _3 - }], - "pid": _2, - "pin": _2, - "ping": _2, - "pink": _2, - "pioneer": _2, - "pizza": [1, { - "ngrok": _3 - }], - "place": _10, - "play": _2, - "playstation": _2, - "plumbing": _2, - "plus": _2, - "pnc": _2, - "pohl": _2, - "poker": _2, - "politie": _2, - "porn": [1, { - "indie": _3 - }], - "pramerica": _2, - "praxi": _2, - "press": _2, - "prime": _2, - "prod": _2, - "productions": _2, - "prof": _2, - "progressive": _2, - "promo": _2, - "properties": _2, - "property": _2, - "protection": _2, - "pru": _2, - "prudential": _2, - "pub": _38, - "pwc": _2, - "qpon": _2, - "quebec": _2, - "quest": _2, - "racing": _2, - "radio": _2, - "read": _2, - "realestate": _2, - "realtor": _2, - "realty": _2, - "recipes": _2, - "red": _2, - "redstone": _2, - "redumbrella": _2, - "rehab": _2, - "reise": _2, - "reisen": _2, - "reit": _2, - "reliance": _2, - "ren": _2, - "rent": _2, - "rentals": _2, - "repair": _2, - "report": _2, - "republican": _2, - "rest": _2, - "restaurant": _2, - "review": _31, - "reviews": _2, - "rexroth": _2, - "rich": _2, - "richardli": _2, - "ricoh": _2, - "ril": _2, - "rio": _2, - "rip": [1, { - "clan": _3 - }], - "rocher": _2, - "rocks": [1, { - "myddns": _3, - "lima-city": _3, - "webspace": _3 - }], - "rodeo": _2, - "rogers": _2, - "room": _2, - "rsvp": _2, - "rugby": _2, - "ruhr": _2, - "run": [1, { - "hs": _3, - "development": _3, - "ravendb": _3, - "servers": _3, - "build": _5, - "code": _5, - "database": _5, - "migration": _5, - "onporter": _3, - "repl": _3 - }], - "rwe": _2, - "ryukyu": _2, - "saarland": _2, - "safe": _2, - "safety": _2, - "sakura": _2, - "sale": _2, - "salon": _2, - "samsclub": _2, - "samsung": _2, - "sandvik": _2, - "sandvikcoromant": _2, - "sanofi": _2, - "sap": _2, - "sarl": _2, - "sas": _2, - "save": _2, - "saxo": _2, - "sbi": _2, - "sbs": _2, - "sca": _2, - "scb": _2, - "schaeffler": _2, - "schmidt": _2, - "scholarships": _2, - "school": _2, - "schule": _2, - "schwarz": _2, - "science": _31, - "scot": [1, { - "edu": _3, - "gov": [2, { - "service": _3 - }] - }], - "search": _2, - "seat": _2, - "secure": _2, - "security": _2, - "seek": _2, - "select": _2, - "sener": _2, - "services": [1, { - "loginline": _3 - }], - "seven": _2, - "sew": _2, - "sex": _2, - "sexy": _2, - "sfr": _2, - "shangrila": _2, - "sharp": _2, - "shaw": _2, - "shell": _2, - "shia": _2, - "shiksha": _2, - "shoes": _2, - "shop": [1, { - "base": _3, - "hoplix": _3, - "barsy": _3 - }], - "shopping": _2, - "shouji": _2, - "show": _2, - "showtime": _2, - "silk": _2, - "sina": _2, - "singles": _2, - "site": [1, { - "cloudera": _5, - "cyon": _3, - "fnwk": _3, - "folionetwork": _3, - "fastvps": _3, - "jele": _3, - "lelux": _3, - "loginline": _3, - "barsy": _3, - "mintere": _3, - "omniwe": _3, - "opensocial": _3, - "platformsh": _5, - "tst": _5, - "byen": _3, - "srht": _3, - "novecore": _3 - }], - "ski": _2, - "skin": _2, - "sky": _2, - "skype": _2, - "sling": _2, - "smart": _2, - "smile": _2, - "sncf": _2, - "soccer": _2, - "social": _2, - "softbank": _2, - "software": _2, - "sohu": _2, - "solar": _2, - "solutions": [1, { - "diher": _5 - }], - "song": _2, - "sony": _2, - "soy": _2, - "spa": _2, - "space": [1, { - "myfast": _3, - "uber": _3, - "xs4all": _3 - }], - "sport": _2, - "spot": _2, - "srl": _2, - "stada": _2, - "staples": _2, - "star": _2, - "statebank": _2, - "statefarm": _2, - "stc": _2, - "stcgroup": _2, - "stockholm": _2, - "storage": _2, - "store": [1, { - "sellfy": _3, - "shopware": _3, - "storebase": _3 - }], - "stream": _2, - "studio": _2, - "study": _2, - "style": _2, - "sucks": _2, - "supplies": _2, - "supply": _2, - "support": _38, - "surf": _2, - "surgery": _2, - "suzuki": _2, - "swatch": _2, - "swiss": _2, - "sydney": _2, - "systems": [1, { - "knightpoint": _3 - }], - "tab": _2, - "taipei": _2, - "talk": _2, - "taobao": _2, - "target": _2, - "tatamotors": _2, - "tatar": _2, - "tattoo": _2, - "tax": _2, - "taxi": _2, - "tci": _2, - "tdk": _2, - "team": [1, { - "discourse": _3, - "jelastic": _3 - }], - "tech": _2, - "technology": _10, - "temasek": _2, - "tennis": _2, - "teva": _2, - "thd": _2, - "theater": _2, - "theatre": _2, - "tiaa": _2, - "tickets": _2, - "tienda": _2, - "tips": _2, - "tires": _2, - "tirol": _2, - "tjmaxx": _2, - "tjx": _2, - "tkmaxx": _2, - "tmall": _2, - "today": [1, { - "prequalifyme": _3 - }], - "tokyo": _2, - "tools": _2, - "top": [1, { - "now-dns": _3, - "ntdll": _3 - }], - "toray": _2, - "toshiba": _2, - "total": _2, - "tours": _2, - "town": _2, - "toyota": _2, - "toys": _2, - "trade": _31, - "trading": _2, - "training": _2, - "travel": _2, - "travelers": _2, - "travelersinsurance": _2, - "trust": _2, - "trv": _2, - "tube": _2, - "tui": _2, - "tunes": _2, - "tushu": _2, - "tvs": _2, - "ubank": _2, - "ubs": _2, - "unicom": _2, - "university": _2, - "uno": _2, - "uol": _2, - "ups": _2, - "vacations": _2, - "vana": _2, - "vanguard": _2, - "vegas": _2, - "ventures": _2, - "verisign": _2, - "versicherung": _2, - "vet": _2, - "viajes": _2, - "video": _2, - "vig": _2, - "viking": _2, - "villas": _2, - "vin": _2, - "vip": _2, - "virgin": _2, - "visa": _2, - "vision": _2, - "viva": _2, - "vivo": _2, - "vlaanderen": _2, - "vodka": _2, - "volkswagen": _2, - "volvo": _2, - "vote": _2, - "voting": _2, - "voto": _2, - "voyage": _2, - "wales": _2, - "walmart": _2, - "walter": _2, - "wang": _2, - "wanggou": _2, - "watch": _2, - "watches": _2, - "weather": _2, - "weatherchannel": _2, - "webcam": _2, - "weber": _2, - "website": _37, - "wedding": _2, - "weibo": _2, - "weir": _2, - "whoswho": _2, - "wien": _2, - "wiki": _37, - "williamhill": _2, - "win": _2, - "windows": _2, - "wine": _2, - "winners": _2, - "wme": _2, - "wolterskluwer": _2, - "woodside": _2, - "work": _2, - "works": _2, - "world": _2, - "wow": _2, - "wtc": _2, - "wtf": _2, - "xbox": _2, - "xerox": _2, - "xfinity": _2, - "xihuan": _2, - "xin": _2, - "xn--11b4c3d": _2, - "कॉम": _2, - "xn--1ck2e1b": _2, - "セール": _2, - "xn--1qqw23a": _2, - "佛山": _2, - "xn--30rr7y": _2, - "慈善": _2, - "xn--3bst00m": _2, - "集团": _2, - "xn--3ds443g": _2, - "在线": _2, - "xn--3pxu8k": _2, - "点看": _2, - "xn--42c2d9a": _2, - "คอม": _2, - "xn--45q11c": _2, - "八卦": _2, - "xn--4gbrim": _2, - "موقع": _2, - "xn--55qw42g": _2, - "公益": _2, - "xn--55qx5d": _2, - "公司": _2, - "xn--5su34j936bgsg": _2, - "香格里拉": _2, - "xn--5tzm5g": _2, - "网站": _2, - "xn--6frz82g": _2, - "移动": _2, - "xn--6qq986b3xl": _2, - "我爱你": _2, - "xn--80adxhks": _2, - "москва": _2, - "xn--80aqecdr1a": _2, - "католик": _2, - "xn--80asehdb": _2, - "онлайн": _2, - "xn--80aswg": _2, - "сайт": _2, - "xn--8y0a063a": _2, - "联通": _2, - "xn--9dbq2a": _2, - "קום": _2, - "xn--9et52u": _2, - "时尚": _2, - "xn--9krt00a": _2, - "微博": _2, - "xn--b4w605ferd": _2, - "淡马锡": _2, - "xn--bck1b9a5dre4c": _2, - "ファッション": _2, - "xn--c1avg": _2, - "орг": _2, - "xn--c2br7g": _2, - "नेट": _2, - "xn--cck2b3b": _2, - "ストア": _2, - "xn--cckwcxetd": _2, - "アマゾン": _2, - "xn--cg4bki": _2, - "삼성": _2, - "xn--czr694b": _2, - "商标": _2, - "xn--czrs0t": _2, - "商店": _2, - "xn--czru2d": _2, - "商城": _2, - "xn--d1acj3b": _2, - "дети": _2, - "xn--eckvdtc9d": _2, - "ポイント": _2, - "xn--efvy88h": _2, - "新闻": _2, - "xn--fct429k": _2, - "家電": _2, - "xn--fhbei": _2, - "كوم": _2, - "xn--fiq228c5hs": _2, - "中文网": _2, - "xn--fiq64b": _2, - "中信": _2, - "xn--fjq720a": _2, - "娱乐": _2, - "xn--flw351e": _2, - "谷歌": _2, - "xn--fzys8d69uvgm": _2, - "電訊盈科": _2, - "xn--g2xx48c": _2, - "购物": _2, - "xn--gckr3f0f": _2, - "クラウド": _2, - "xn--gk3at1e": _2, - "通販": _2, - "xn--hxt814e": _2, - "网店": _2, - "xn--i1b6b1a6a2e": _2, - "संगठन": _2, - "xn--imr513n": _2, - "餐厅": _2, - "xn--io0a7i": _2, - "网络": _2, - "xn--j1aef": _2, - "ком": _2, - "xn--jlq480n2rg": _2, - "亚马逊": _2, - "xn--jvr189m": _2, - "食品": _2, - "xn--kcrx77d1x4a": _2, - "飞利浦": _2, - "xn--kput3i": _2, - "手机": _2, - "xn--mgba3a3ejt": _2, - "ارامكو": _2, - "xn--mgba7c0bbn0a": _2, - "العليان": _2, - "xn--mgbaakc7dvf": _2, - "اتصالات": _2, - "xn--mgbab2bd": _2, - "بازار": _2, - "xn--mgbca7dzdo": _2, - "ابوظبي": _2, - "xn--mgbi4ecexp": _2, - "كاثوليك": _2, - "xn--mgbt3dhd": _2, - "همراه": _2, - "xn--mk1bu44c": _2, - "닷컴": _2, - "xn--mxtq1m": _2, - "政府": _2, - "xn--ngbc5azd": _2, - "شبكة": _2, - "xn--ngbe9e0a": _2, - "بيتك": _2, - "xn--ngbrx": _2, - "عرب": _2, - "xn--nqv7f": _2, - "机构": _2, - "xn--nqv7fs00ema": _2, - "组织机构": _2, - "xn--nyqy26a": _2, - "健康": _2, - "xn--otu796d": _2, - "招聘": _2, - "xn--p1acf": [1, { - "xn--90amc": _3, - "xn--j1aef": _3, - "xn--j1ael8b": _3, - "xn--h1ahn": _3, - "xn--j1adp": _3, - "xn--c1avg": _3, - "xn--80aaa0cvac": _3, - "xn--h1aliz": _3, - "xn--90a1af": _3, - "xn--41a": _3 - }], - "рус": [1, { - "биз": _3, - "ком": _3, - "крым": _3, - "мир": _3, - "мск": _3, - "орг": _3, - "самара": _3, - "сочи": _3, - "спб": _3, - "я": _3 - }], - "xn--pssy2u": _2, - "大拿": _2, - "xn--q9jyb4c": _2, - "みんな": _2, - "xn--qcka1pmc": _2, - "グーグル": _2, - "xn--rhqv96g": _2, - "世界": _2, - "xn--rovu88b": _2, - "書籍": _2, - "xn--ses554g": _2, - "网址": _2, - "xn--t60b56a": _2, - "닷넷": _2, - "xn--tckwe": _2, - "コム": _2, - "xn--tiq49xqyj": _2, - "天主教": _2, - "xn--unup4y": _2, - "游戏": _2, - "xn--vermgensberater-ctb": _2, - "vermögensberater": _2, - "xn--vermgensberatung-pwb": _2, - "vermögensberatung": _2, - "xn--vhquv": _2, - "企业": _2, - "xn--vuq861b": _2, - "信息": _2, - "xn--w4r85el8fhu5dnra": _2, - "嘉里大酒店": _2, - "xn--w4rs40l": _2, - "嘉里": _2, - "xn--xhq521b": _2, - "广东": _2, - "xn--zfr164b": _2, - "政务": _2, - "xyz": [1, { - "blogsite": _3, - "localzone": _3, - "crafting": _3, - "zapto": _3, - "telebit": _5 - }], - "yachts": _2, - "yahoo": _2, - "yamaxun": _2, - "yandex": _2, - "yodobashi": _2, - "yoga": _2, - "yokohama": _2, - "you": _2, - "youtube": _2, - "yun": _2, - "zappos": _2, - "zara": _2, - "zero": _2, - "zip": _2, - "zone": [1, { - "cloud66": _3, - "hs": _3, - "triton": _5, - "lima": _3 - }], - "zuerich": _2 - }]; - return rules; -}(); -;// CONCATENATED MODULE: ../../node_modules/tldts/dist/es6/src/suffix-trie.js - - -/** - * Lookup parts of domain in Trie - */ -function lookupInTrie(parts, trie, index, allowedMask) { - let result = null; - let node = trie; - while (node !== undefined) { - // We have a match! - if ((node[0] & allowedMask) !== 0) { - result = { - index: index + 1, - isIcann: node[0] === 1 /* RULE_TYPE.ICANN */, - isPrivate: node[0] === 2 /* RULE_TYPE.PRIVATE */ - }; - } - // No more `parts` to look for - if (index === -1) { - break; - } - const succ = node[1]; - node = Object.prototype.hasOwnProperty.call(succ, parts[index]) ? succ[parts[index]] : succ['*']; - index -= 1; - } - return result; -} -/** - * Check if `hostname` has a valid public suffix in `trie`. - */ -function suffix_trie_suffixLookup(hostname, options, out) { - var _a; - if (fast_path(hostname, options, out)) { - return; - } - const hostnameParts = hostname.split('.'); - const allowedMask = (options.allowPrivateDomains ? 2 /* RULE_TYPE.PRIVATE */ : 0) | (options.allowIcannDomains ? 1 /* RULE_TYPE.ICANN */ : 0); - // Look for exceptions - const exceptionMatch = lookupInTrie(hostnameParts, exceptions, hostnameParts.length - 1, allowedMask); - if (exceptionMatch !== null) { - out.isIcann = exceptionMatch.isIcann; - out.isPrivate = exceptionMatch.isPrivate; - out.publicSuffix = hostnameParts.slice(exceptionMatch.index + 1).join('.'); - return; - } - // Look for a match in rules - const rulesMatch = lookupInTrie(hostnameParts, rules, hostnameParts.length - 1, allowedMask); - if (rulesMatch !== null) { - out.isIcann = rulesMatch.isIcann; - out.isPrivate = rulesMatch.isPrivate; - out.publicSuffix = hostnameParts.slice(rulesMatch.index).join('.'); - return; - } - // No match found... - // Prevailing rule is '*' so we consider the top-level domain to be the - // public suffix of `hostname` (e.g.: 'example.org' => 'org'). - out.isIcann = false; - out.isPrivate = false; - out.publicSuffix = (_a = hostnameParts[hostnameParts.length - 1]) !== null && _a !== void 0 ? _a : null; -} -;// CONCATENATED MODULE: ../../node_modules/tldts/dist/es6/index.js - - -// For all methods but 'parse', it does not make sense to allocate an object -// every single time to only return the value of a specific attribute. To avoid -// this un-necessary allocation, we use a global object which is re-used. -const RESULT = getEmptyResult(); -function parse(url, options = {}) { - return factory_parseImpl(url, 5 /* FLAG.ALL */, suffix_trie_suffixLookup, options, getEmptyResult()); -} -function getHostname(url, options = {}) { - /*@__INLINE__*/factory_resetResult(RESULT); - return factory_parseImpl(url, 0 /* FLAG.HOSTNAME */, suffix_trie_suffixLookup, options, RESULT).hostname; -} -function getPublicSuffix(url, options = {}) { - /*@__INLINE__*/resetResult(RESULT); - return parseImpl(url, 2 /* FLAG.PUBLIC_SUFFIX */, suffixLookup, options, RESULT).publicSuffix; -} -function es6_getDomain(url, options = {}) { - /*@__INLINE__*/resetResult(RESULT); - return parseImpl(url, 3 /* FLAG.DOMAIN */, suffixLookup, options, RESULT).domain; -} -function es6_getSubdomain(url, options = {}) { - /*@__INLINE__*/resetResult(RESULT); - return parseImpl(url, 4 /* FLAG.SUB_DOMAIN */, suffixLookup, options, RESULT).subdomain; -} -function es6_getDomainWithoutSuffix(url, options = {}) { - /*@__INLINE__*/resetResult(RESULT); - return parseImpl(url, 5 /* FLAG.ALL */, suffixLookup, options, RESULT).domainWithoutSuffix; -} -;// CONCATENATED MODULE: ../../libs/common/src/platform/misc/utils.ts -/* provided dependency */ var utils_process = __webpack_require__(71624); -/* eslint-disable no-useless-escape */ - - - -const nodeURL = typeof window === "undefined" ? __webpack_require__(69573) : null; -class Utils { - static init() { - if (Utils.inited) { - return; - } - Utils.inited = true; - Utils.isNode = - typeof utils_process !== "undefined" && - utils_process.release != null && - utils_process.release.name === "node"; - Utils.isBrowser = typeof window !== "undefined"; - Utils.isMobileBrowser = Utils.isBrowser && this.isMobile(window); - Utils.isAppleMobileBrowser = Utils.isBrowser && this.isAppleMobile(window); - if (Utils.isNode) { - Utils.global = __webpack_require__.g; - } - else if (Utils.isBrowser) { - Utils.global = window; - } - else { - // If it's not browser or node then it must be a service worker - Utils.global = self; - } - } - static fromB64ToArray(str) { - if (str == null) { - return null; - } - if (Utils.isNode) { - return new Uint8Array(Buffer.from(str, "base64")); - } - else { - const binaryString = Utils.global.atob(str); - const bytes = new Uint8Array(binaryString.length); - for (let i = 0; i < binaryString.length; i++) { - bytes[i] = binaryString.charCodeAt(i); - } - return bytes; - } - } - static fromUrlB64ToArray(str) { - return Utils.fromB64ToArray(Utils.fromUrlB64ToB64(str)); - } - static fromHexToArray(str) { - if (Utils.isNode) { - return new Uint8Array(Buffer.from(str, "hex")); - } - else { - const bytes = new Uint8Array(str.length / 2); - for (let i = 0; i < str.length; i += 2) { - bytes[i / 2] = parseInt(str.substr(i, 2), 16); - } - return bytes; - } - } - static fromUtf8ToArray(str) { - if (Utils.isNode) { - return new Uint8Array(Buffer.from(str, "utf8")); - } - else { - const strUtf8 = unescape(encodeURIComponent(str)); - const arr = new Uint8Array(strUtf8.length); - for (let i = 0; i < strUtf8.length; i++) { - arr[i] = strUtf8.charCodeAt(i); - } - return arr; - } - } - static fromByteStringToArray(str) { - if (str == null) { - return null; - } - const arr = new Uint8Array(str.length); - for (let i = 0; i < str.length; i++) { - arr[i] = str.charCodeAt(i); - } - return arr; - } - static fromBufferToB64(buffer) { - if (buffer == null) { - return null; - } - if (Utils.isNode) { - return Buffer.from(buffer).toString("base64"); - } - else { - let binary = ""; - const bytes = new Uint8Array(buffer); - for (let i = 0; i < bytes.byteLength; i++) { - binary += String.fromCharCode(bytes[i]); - } - return Utils.global.btoa(binary); - } - } - static fromBufferToUrlB64(buffer) { - return Utils.fromB64toUrlB64(Utils.fromBufferToB64(buffer)); - } - static fromB64toUrlB64(b64Str) { - return b64Str.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); - } - static fromBufferToUtf8(buffer) { - if (Utils.isNode) { - return Buffer.from(buffer).toString("utf8"); - } - else { - const bytes = new Uint8Array(buffer); - const encodedString = String.fromCharCode.apply(null, bytes); - return decodeURIComponent(escape(encodedString)); - } - } - static fromBufferToByteString(buffer) { - return String.fromCharCode.apply(null, new Uint8Array(buffer)); - } - // ref: https://stackoverflow.com/a/40031979/1090359 - static fromBufferToHex(buffer) { - if (Utils.isNode) { - return Buffer.from(buffer).toString("hex"); - } - else { - const bytes = new Uint8Array(buffer); - return Array.prototype.map - .call(bytes, (x) => ("00" + x.toString(16)).slice(-2)) - .join(""); - } - } - static fromUrlB64ToB64(urlB64Str) { - let output = urlB64Str.replace(/-/g, "+").replace(/_/g, "/"); - switch (output.length % 4) { - case 0: - break; - case 2: - output += "=="; - break; - case 3: - output += "="; - break; - default: - throw new Error("Illegal base64url string!"); - } - return output; - } - static fromUrlB64ToUtf8(urlB64Str) { - return Utils.fromB64ToUtf8(Utils.fromUrlB64ToB64(urlB64Str)); - } - static fromUtf8ToB64(utfStr) { - if (Utils.isNode) { - return Buffer.from(utfStr, "utf8").toString("base64"); - } - else { - return decodeURIComponent(escape(Utils.global.btoa(utfStr))); - } - } - static fromUtf8ToUrlB64(utfStr) { - return Utils.fromBufferToUrlB64(Utils.fromUtf8ToArray(utfStr)); - } - static fromB64ToUtf8(b64Str) { - if (Utils.isNode) { - return Buffer.from(b64Str, "base64").toString("utf8"); - } - else { - return decodeURIComponent(escape(Utils.global.atob(b64Str))); - } - } - // ref: http://stackoverflow.com/a/2117523/1090359 - static newGuid() { - return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => { - const r = (Math.random() * 16) | 0; - const v = c === "x" ? r : (r & 0x3) | 0x8; - return v.toString(16); - }); - } - static isGuid(id) { - return RegExp(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/, "i").test(id); - } - static getHostname(uriString) { - if (Utils.isNullOrWhitespace(uriString)) { - return null; - } - uriString = uriString.trim(); - if (uriString.startsWith("data:")) { - return null; - } - if (uriString.startsWith("about:")) { - return null; - } - if (uriString.startsWith("file:")) { - return null; - } - // Does uriString contain invalid characters - // TODO Needs to possibly be extended, although '!' is a reserved character - if (uriString.indexOf("!") > 0) { - return null; - } - try { - const hostname = getHostname(uriString, { validHosts: this.validHosts }); - if (hostname != null) { - return hostname; - } - } - catch (_a) { - return null; - } - return null; - } - static getHost(uriString) { - const url = Utils.getUrl(uriString); - try { - return url != null && url.host !== "" ? url.host : null; - } - catch (_a) { - return null; - } - } - static getDomain(uriString) { - if (Utils.isNullOrWhitespace(uriString)) { - return null; - } - uriString = uriString.trim(); - if (uriString.startsWith("data:")) { - return null; - } - if (uriString.startsWith("about:")) { - return null; - } - try { - const parseResult = parse(uriString, { validHosts: this.validHosts }); - if (parseResult != null && parseResult.hostname != null) { - if (parseResult.hostname === "localhost" || parseResult.isIp) { - return parseResult.hostname; - } - if (parseResult.domain != null) { - return parseResult.domain; - } - return null; - } - } - catch (_a) { - return null; - } - return null; - } - static getQueryParams(uriString) { - const url = Utils.getUrl(uriString); - if (url == null || url.search == null || url.search === "") { - return null; - } - const map = new Map(); - const pairs = (url.search[0] === "?" ? url.search.substr(1) : url.search).split("&"); - pairs.forEach((pair) => { - const parts = pair.split("="); - if (parts.length < 1) { - return; - } - map.set(decodeURIComponent(parts[0]).toLowerCase(), parts[1] == null ? "" : decodeURIComponent(parts[1])); - }); - return map; - } - static getSortFunction(i18nService, prop) { - return (a, b) => { - if (a[prop] == null && b[prop] != null) { - return -1; - } - if (a[prop] != null && b[prop] == null) { - return 1; - } - if (a[prop] == null && b[prop] == null) { - return 0; - } - // The `as unknown as string` here is unfortunate because typescript doesn't property understand that the return of T[prop] will be a string - return i18nService.collator - ? i18nService.collator.compare(a[prop], b[prop]) - : a[prop].localeCompare(b[prop]); - }; - } - static isNullOrWhitespace(str) { - return str == null || typeof str !== "string" || str.trim() === ""; - } - static isNullOrEmpty(str) { - return str == null || typeof str !== "string" || str == ""; - } - static isPromise(obj) { - return (obj != undefined && typeof obj["then"] === "function" && typeof obj["catch"] === "function"); - } - static nameOf(name) { - return name; - } - static assign(target, source) { - return Object.assign(target, source); - } - static iterateEnum(obj) { - return Object.keys(obj).filter((k) => Number.isNaN(+k)).map((k) => obj[k]); - } - static getUrl(uriString) { - if (this.isNullOrWhitespace(uriString)) { - return null; - } - uriString = uriString.trim(); - return Utils.getUrlObject(uriString); - } - static camelToPascalCase(s) { - return s.charAt(0).toUpperCase() + s.slice(1); - } - /** - * There are a few ways to calculate text color for contrast, this one seems to fit accessibility guidelines best. - * https://stackoverflow.com/a/3943023/6869691 - * - * @param {string} bgColor - * @param {number} [threshold] see stackoverflow link above - * @param {boolean} [svgTextFill] - * Indicates if this method is performed on an SVG 'fill' attribute (e.g. ). - * This check is necessary because the '!important' tag cannot be used in a 'fill' attribute. - */ - static pickTextColorBasedOnBgColor(bgColor, threshold = 186, svgTextFill = false) { - const bgColorHexNums = bgColor.charAt(0) === "#" ? bgColor.substring(1, 7) : bgColor; - const r = parseInt(bgColorHexNums.substring(0, 2), 16); // hexToR - const g = parseInt(bgColorHexNums.substring(2, 4), 16); // hexToG - const b = parseInt(bgColorHexNums.substring(4, 6), 16); // hexToB - const blackColor = svgTextFill ? "black" : "black !important"; - const whiteColor = svgTextFill ? "white" : "white !important"; - return r * 0.299 + g * 0.587 + b * 0.114 > threshold ? blackColor : whiteColor; - } - static stringToColor(str) { - let hash = 0; - for (let i = 0; i < str.length; i++) { - hash = str.charCodeAt(i) + ((hash << 5) - hash); - } - let color = "#"; - for (let i = 0; i < 3; i++) { - const value = (hash >> (i * 8)) & 0xff; - color += ("00" + value.toString(16)).substr(-2); - } - return color; - } - /** - * @throws Will throw an error if the ContainerService has not been attached to the window object - */ - static getContainerService() { - if (this.global.bitwardenContainerService == null) { - throw new Error("global bitwardenContainerService not initialized."); - } - return this.global.bitwardenContainerService; - } - static validateHexColor(color) { - return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(color); - } - /** - * Converts map to a Record with the same data. Inverse of recordToMap - * Useful in toJSON methods, since Maps are not serializable - * @param map - * @returns - */ - static mapToRecord(map) { - if (map == null) { - return null; - } - if (!(map instanceof Map)) { - return map; - } - return Object.fromEntries(map); - } - /** - * Converts record to a Map with the same data. Inverse of mapToRecord - * Useful in fromJSON methods, since Maps are not serializable - * - * Warning: If the record has string keys that are numbers, they will be converted to numbers in the map - * @param record - * @returns - */ - static recordToMap(record) { - if (record == null) { - return null; - } - else if (record instanceof Map) { - return record; - } - const entries = Object.entries(record); - if (entries.length === 0) { - return new Map(); - } - if (isNaN(Number(entries[0][0]))) { - return new Map(entries); - } - else { - return new Map(entries.map((e) => [Number(e[0]), e[1]])); - } - } - /** Applies Object.assign, but converts the type nicely using Type-Fest Merge */ - static merge(destination, source) { - return Object.assign(destination, source); - } - /** - * encodeURIComponent escapes all characters except the following: - * alphabetic, decimal digits, - _ . ! ~ * ' ( ) - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent#encoding_for_rfc3986 - */ - static encodeRFC3986URIComponent(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`); - } - /** - * Normalizes a path for defense against attacks like traversals - * @param denormalizedPath - * @returns - */ - static normalizePath(denormalizedPath) { - return path_browserify.normalize(decodeURIComponent(denormalizedPath)).replace(/^(\.\.(\/|\\|$))+/, ""); - } - static isMobile(win) { - let mobile = false; - ((a) => { - if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || - /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) { - mobile = true; - } - })(win.navigator.userAgent || win.navigator.vendor || win.opera); - return mobile || win.navigator.userAgent.match(/iPad/i) != null; - } - static delay(ms) { - return new Promise((resolve) => setTimeout(resolve, ms)); - } - /** - * Generate an observable from a function that returns a promise. - * Similar to the rxjs function {@link from} with one big exception: - * {@link from} will not re-execute the function when observers resubscribe. - * {@link Util.asyncToObservable} will execute `generator` for every - * subscribe, making it ideal if the value ever needs to be refreshed. - * */ - static asyncToObservable(generator) { - return of(undefined).pipe(switchMap(() => generator())); - } - /** - * Return the number of days remaining before a target date arrives. - * Returns 0 if the day has already passed. - */ - static daysRemaining(targetDate) { - const diffTime = targetDate.getTime() - Date.now(); - const msPerDay = 86400000; - return Math.max(0, Math.floor(diffTime / msPerDay)); - } - static isAppleMobile(win) { - return (win.navigator.userAgent.match(/iPhone/i) != null || - win.navigator.userAgent.match(/iPad/i) != null); - } - static getUrlObject(uriString) { - // All the methods below require a protocol to properly parse a URL string - // Assume http if no other protocol is present - const hasProtocol = uriString.indexOf("://") > -1; - if (!hasProtocol && uriString.indexOf(".") > -1) { - uriString = "http://" + uriString; - } - else if (!hasProtocol) { - return null; - } - try { - if (nodeURL != null) { - return new nodeURL.URL(uriString); - } - return new URL(uriString); - } - catch (e) { - // Ignore error - } - return null; - } -} -Utils.inited = false; -Utils.isNode = false; -Utils.isBrowser = true; -Utils.isMobileBrowser = false; -Utils.isAppleMobileBrowser = false; -Utils.global = null; -// Transpiled version of /\p{Emoji_Presentation}/gu using https://mothereff.in/regexpu. Used for compatability in older browsers. -Utils.regexpEmojiPresentation = /(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])/g; -Utils.validHosts = ["localhost"]; -Utils.originalMinimumPasswordLength = 8; -Utils.minimumPasswordLength = 12; -Utils.DomainMatchBlacklist = new Map([ - ["google.com", new Set(["script.google.com"])], -]); -Utils.init(); - -;// CONCATENATED MODULE: ../../libs/common/src/vault/services/fido2/fido2-utils.ts - -class Fido2Utils { - static bufferToString(bufferSource) { - const buffer = Fido2Utils.bufferSourceToUint8Array(bufferSource); - return Utils.fromBufferToUrlB64(buffer); - } - static stringToBuffer(str) { - return Utils.fromUrlB64ToArray(str); - } - static bufferSourceToUint8Array(bufferSource) { - if (Fido2Utils.isArrayBuffer(bufferSource)) { - return new Uint8Array(bufferSource); - } - else { - return new Uint8Array(bufferSource.buffer); - } - } - /** Utility function to identify type of bufferSource. Necessary because of differences between runtimes */ - static isArrayBuffer(bufferSource) { - return bufferSource instanceof ArrayBuffer || bufferSource.buffer === undefined; - } -} - -;// CONCATENATED MODULE: ./src/vault/fido2/webauthn-utils.ts - -class WebauthnUtils { - static mapCredentialCreationOptions(options, origin, sameOriginWithAncestors, fallbackSupported) { - var _a, _b, _c, _d; - const keyOptions = options.publicKey; - if (keyOptions == undefined) { - throw new Error("Public-key options not found"); - } - return { - origin, - attestation: keyOptions.attestation, - authenticatorSelection: { - requireResidentKey: (_a = keyOptions.authenticatorSelection) === null || _a === void 0 ? void 0 : _a.requireResidentKey, - residentKey: (_b = keyOptions.authenticatorSelection) === null || _b === void 0 ? void 0 : _b.residentKey, - userVerification: (_c = keyOptions.authenticatorSelection) === null || _c === void 0 ? void 0 : _c.userVerification, - }, - challenge: Fido2Utils.bufferToString(keyOptions.challenge), - excludeCredentials: (_d = keyOptions.excludeCredentials) === null || _d === void 0 ? void 0 : _d.map((credential) => ({ - id: Fido2Utils.bufferToString(credential.id), - transports: credential.transports, - type: credential.type, - })), - extensions: undefined, - pubKeyCredParams: keyOptions.pubKeyCredParams.map((params) => ({ - alg: params.alg, - type: params.type, - })), - rp: { - id: keyOptions.rp.id, - name: keyOptions.rp.name, - }, - user: { - id: Fido2Utils.bufferToString(keyOptions.user.id), - displayName: keyOptions.user.displayName, - }, - timeout: keyOptions.timeout, - sameOriginWithAncestors, - fallbackSupported, - }; - } - static mapCredentialRegistrationResult(result) { - const credential = { - id: result.credentialId, - rawId: Fido2Utils.stringToBuffer(result.credentialId), - type: "public-key", - authenticatorAttachment: "cross-platform", - response: { - clientDataJSON: Fido2Utils.stringToBuffer(result.clientDataJSON), - attestationObject: Fido2Utils.stringToBuffer(result.attestationObject), - getAuthenticatorData() { - return Fido2Utils.stringToBuffer(result.authData); - }, - getPublicKey() { - return null; - }, - getPublicKeyAlgorithm() { - return result.publicKeyAlgorithm; - }, - getTransports() { - return result.transports; - }, - }, - getClientExtensionResults: () => ({}), - }; - // Modify prototype chains to fix `instanceof` calls. - // This makes these objects indistinguishable from the native classes. - // Unfortunately PublicKeyCredential does not have a javascript constructor so `extends` does not work here. - Object.setPrototypeOf(credential.response, AuthenticatorAttestationResponse.prototype); - Object.setPrototypeOf(credential, PublicKeyCredential.prototype); - return credential; - } - static mapCredentialRequestOptions(options, origin, sameOriginWithAncestors, fallbackSupported) { - var _a, _b; - const keyOptions = options.publicKey; - if (keyOptions == undefined) { - throw new Error("Public-key options not found"); - } - return { - origin, - allowedCredentialIds: (_b = (_a = keyOptions.allowCredentials) === null || _a === void 0 ? void 0 : _a.map((c) => Fido2Utils.bufferToString(c.id))) !== null && _b !== void 0 ? _b : [], - challenge: Fido2Utils.bufferToString(keyOptions.challenge), - rpId: keyOptions.rpId, - userVerification: keyOptions.userVerification, - timeout: keyOptions.timeout, - sameOriginWithAncestors, - fallbackSupported, - }; - } - static mapCredentialAssertResult(result) { - const credential = { - id: result.credentialId, - rawId: Fido2Utils.stringToBuffer(result.credentialId), - type: "public-key", - response: { - authenticatorData: Fido2Utils.stringToBuffer(result.authenticatorData), - clientDataJSON: Fido2Utils.stringToBuffer(result.clientDataJSON), - signature: Fido2Utils.stringToBuffer(result.signature), - userHandle: Fido2Utils.stringToBuffer(result.userHandle), - }, - getClientExtensionResults: () => ({}), - authenticatorAttachment: "cross-platform", - }; - // Modify prototype chains to fix `instanceof` calls. - // This makes these objects indistinguishable from the native classes. - // Unfortunately PublicKeyCredential does not have a javascript constructor so `extends` does not work here. - Object.setPrototypeOf(credential.response, AuthenticatorAssertionResponse.prototype); - Object.setPrototypeOf(credential, PublicKeyCredential.prototype); - return credential; - } -} - -;// CONCATENATED MODULE: ./src/vault/fido2/content/messaging/message.ts -var MessageType; -(function (MessageType) { - MessageType[MessageType["CredentialCreationRequest"] = 0] = "CredentialCreationRequest"; - MessageType[MessageType["CredentialCreationResponse"] = 1] = "CredentialCreationResponse"; - MessageType[MessageType["CredentialGetRequest"] = 2] = "CredentialGetRequest"; - MessageType[MessageType["CredentialGetResponse"] = 3] = "CredentialGetResponse"; - MessageType[MessageType["AbortRequest"] = 4] = "AbortRequest"; - MessageType[MessageType["AbortResponse"] = 5] = "AbortResponse"; - MessageType[MessageType["ErrorResponse"] = 6] = "ErrorResponse"; -})(MessageType || (MessageType = {})); - -;// CONCATENATED MODULE: ./src/vault/fido2/content/messaging/messenger.ts -var messenger_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -const SENDER = "bitwarden-webauthn"; -/** - * A class that handles communication between the page and content script. It converts - * the browser's broadcasting API into a request/response API with support for seamlessly - * handling aborts and exceptions across separate execution contexts. - */ -class Messenger { - /** - * Creates a messenger that uses the browser's `window.postMessage` API to initiate - * requests in the content script. Every request will then create it's own - * `MessageChannel` through which all subsequent communication will be sent through. - * - * @param window the window object to use for communication - * @returns a `Messenger` instance - */ - static forDOMCommunication(window) { - const windowOrigin = window.location.origin; - return new Messenger({ - postMessage: (message, port) => window.postMessage(message, windowOrigin, [port]), - addEventListener: (listener) => window.addEventListener("message", (event) => { - if (event.origin !== windowOrigin) { - return; - } - listener(event); - }), - }); - } - constructor(broadcastChannel) { - this.broadcastChannel = broadcastChannel; - this.broadcastChannel.addEventListener((event) => messenger_awaiter(this, void 0, void 0, function* () { - var _a; - if (this.handler === undefined) { - return; - } - const message = event.data; - const port = (_a = event.ports) === null || _a === void 0 ? void 0 : _a[0]; - if ((message === null || message === void 0 ? void 0 : message.SENDER) !== SENDER || message == null || port == null) { - return; - } - const abortController = new AbortController(); - port.onmessage = (event) => { - if (event.data.type === MessageType.AbortRequest) { - abortController.abort(); - } - }; - try { - const handlerResponse = yield this.handler(message, abortController); - port.postMessage(Object.assign(Object.assign({}, handlerResponse), { SENDER })); - } - catch (error) { - port.postMessage({ - SENDER, - type: MessageType.ErrorResponse, - error: JSON.stringify(error, Object.getOwnPropertyNames(error)), - }); - } - finally { - port.close(); - } - })); - } - /** - * Sends a request to the content script and returns the response. - * AbortController signals will be forwarded to the content script. - * - * @param request data to send to the content script - * @param abortController the abort controller that might be used to abort the request - * @returns the response from the content script - */ - request(request, abortController) { - return messenger_awaiter(this, void 0, void 0, function* () { - const requestChannel = new MessageChannel(); - const { port1: localPort, port2: remotePort } = requestChannel; - try { - const promise = new Promise((resolve) => { - localPort.onmessage = (event) => resolve(event.data); - }); - const abortListener = () => localPort.postMessage({ - metadata: { SENDER }, - type: MessageType.AbortRequest, - }); - abortController === null || abortController === void 0 ? void 0 : abortController.signal.addEventListener("abort", abortListener); - this.broadcastChannel.postMessage(Object.assign(Object.assign({}, request), { SENDER }), remotePort); - const response = yield promise; - abortController === null || abortController === void 0 ? void 0 : abortController.signal.removeEventListener("abort", abortListener); - if (response.type === MessageType.ErrorResponse) { - const error = new Error(); - Object.assign(error, JSON.parse(response.error)); - throw error; - } - return response; - } - finally { - localPort.close(); - } - }); - } -} - -;// CONCATENATED MODULE: ./src/vault/fido2/content/page-script.ts -var page_script_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - -const BrowserPublicKeyCredential = window.PublicKeyCredential; -const browserNativeWebauthnSupport = window.PublicKeyCredential != undefined; -let browserNativeWebauthnPlatformAuthenticatorSupport = false; -if (!browserNativeWebauthnSupport) { - // Polyfill webauthn support - try { - // credentials is read-only if supported, use type-casting to force assignment - navigator.credentials = { - create() { - return page_script_awaiter(this, void 0, void 0, function* () { - throw new Error("Webauthn not supported in this browser."); - }); - }, - get() { - return page_script_awaiter(this, void 0, void 0, function* () { - throw new Error("Webauthn not supported in this browser."); - }); - }, - }; - window.PublicKeyCredential = class PolyfillPublicKeyCredential { - static isUserVerifyingPlatformAuthenticatorAvailable() { - return Promise.resolve(true); - } - }; - window.AuthenticatorAttestationResponse = - class PolyfillAuthenticatorAttestationResponse { - }; - } - catch (_a) { - /* empty */ - } -} -if (browserNativeWebauthnSupport) { - BrowserPublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable().then((available) => { - browserNativeWebauthnPlatformAuthenticatorSupport = available; - if (!available) { - // Polyfill platform authenticator support - window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable = () => Promise.resolve(true); - } - }); -} -const browserCredentials = { - create: navigator.credentials.create.bind(navigator.credentials), - get: navigator.credentials.get.bind(navigator.credentials), -}; -const messenger = Messenger.forDOMCommunication(window); -function isSameOriginWithAncestors() { - try { - return window.self === window.top; - } - catch (_a) { - return false; - } -} -navigator.credentials.create = (options, abortController) => page_script_awaiter(void 0, void 0, void 0, function* () { - var _b, _c; - const fallbackSupported = (((_b = options === null || options === void 0 ? void 0 : options.publicKey) === null || _b === void 0 ? void 0 : _b.authenticatorSelection.authenticatorAttachment) === "platform" && - browserNativeWebauthnPlatformAuthenticatorSupport) || - (((_c = options === null || options === void 0 ? void 0 : options.publicKey) === null || _c === void 0 ? void 0 : _c.authenticatorSelection.authenticatorAttachment) !== "platform" && - browserNativeWebauthnSupport); - try { - const isNotIframe = isSameOriginWithAncestors(); - const response = yield messenger.request({ - type: MessageType.CredentialCreationRequest, - data: WebauthnUtils.mapCredentialCreationOptions(options, window.location.origin, isNotIframe, fallbackSupported), - }, abortController); - if (response.type !== MessageType.CredentialCreationResponse) { - throw new Error("Something went wrong."); - } - return WebauthnUtils.mapCredentialRegistrationResult(response.result); - } - catch (error) { - if (error && error.fallbackRequested && fallbackSupported) { - yield waitForFocus(); - return yield browserCredentials.create(options); - } - throw error; - } -}); -navigator.credentials.get = (options, abortController) => page_script_awaiter(void 0, void 0, void 0, function* () { - const fallbackSupported = browserNativeWebauthnSupport; - try { - if ((options === null || options === void 0 ? void 0 : options.mediation) && options.mediation !== "optional") { - throw new FallbackRequestedError(); - } - const response = yield messenger.request({ - type: MessageType.CredentialGetRequest, - data: WebauthnUtils.mapCredentialRequestOptions(options, window.location.origin, true, fallbackSupported), - }, abortController); - if (response.type !== MessageType.CredentialGetResponse) { - throw new Error("Something went wrong."); - } - return WebauthnUtils.mapCredentialAssertResult(response.result); - } - catch (error) { - if (error && error.fallbackRequested && fallbackSupported) { - yield waitForFocus(); - return yield browserCredentials.get(options); - } - throw error; - } -}); -/** - * Wait for window to be focused. - * Safari doesn't allow scripts to trigger webauthn when window is not focused. - * - * @param timeout Maximum time to wait for focus in milliseconds. Defaults to 5 minutes. - * @returns Promise that resolves when window is focused, or rejects if timeout is reached. - */ -function waitForFocus(timeout = 5 * 60 * 1000) { - return page_script_awaiter(this, void 0, void 0, function* () { - if (window.top.document.hasFocus()) { - return; - } - let focusListener; - const focusPromise = new Promise((resolve) => { - focusListener = () => resolve(); - window.top.addEventListener("focus", focusListener, { once: true }); - }); - let timeoutId; - const timeoutPromise = new Promise((_, reject) => { - timeoutId = window.setTimeout(() => reject(new DOMException("The operation either timed out or was not allowed.", "AbortError")), timeout); - }); - try { - yield Promise.race([focusPromise, timeoutPromise]); - } - finally { - window.top.removeEventListener("focus", focusListener); - window.clearTimeout(timeoutId); - } - }); -} - -})(); - -/******/ })() -; \ No newline at end of file diff --git a/docs/global.css b/docs/global.css deleted file mode 100644 index a658cc0..0000000 --- a/docs/global.css +++ /dev/null @@ -1,171 +0,0 @@ -@import url(https://cdn.simplecss.org/simple.min.css); -:root{ - --body-max-width: 45rem; - --marked: #fb3779; - --code: #0d47a1; - --accent: #d81b60; -} -@media (prefers-color-scheme:dark) { - :root { - --accent: #f06292; - --code: #62c1f0; - } -} -body { - grid-template-columns: 100%; - grid-template-areas: "header" "sidebar" "content"; -} -@media (min-width:768px) { - body{ - grid-template-rows: auto auto; - grid-template-columns: calc(10 * var(--body-max-width) / 27) auto; - grid-template-areas: - "header header" - "sidebar content" - } -} -body > *{ - grid-column: unset; -} -body > header{ - grid-area: header; - padding: 0; -} -body > nav{ - grid-area: sidebar; - background-color: var(--accent-bg); - display: flex; - flex-flow: column nowrap; -} -body > nav { - font-size: 1rem; - line-height: 2; - padding: 1rem 0 0 0; -} -body > nav ol, -body > nav ul { - align-content: space-around; - align-items: center; - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: center; - list-style-type: none; - margin: 0; - padding: 0; -} -body > nav ol li, -body > nav ul li { - display:inline-block -} -body > nav a, -body > nav a:visited { - margin: 0 .5rem 1rem .5rem; - border: 1px solid currentColor; - border-radius: var(--standard-border-radius); - color: var(--text-light); - display: inline-block; - padding: .1rem 1rem; - text-decoration: none; - cursor: pointer; - transition: all .15s; -} -body > nav a.current, -body > nav a[aria-current=page] { - background-color: var(--bg); - color: var(--text); -} -body > nav a:hover{ - background-color: var(--bg); - color: var(--accent); -} -@media only screen and (max-width:720px) { - body > nav{ - flex-flow: row wrap; - padding-block: .5rem; - } - body > nav a { - border:none; - text-decoration:underline; - margin-block: .1rem; - padding-block:.1rem; - line-height: 1rem; - font-size: .9rem; - } -} -main{ - grid-area: content; - display: grid; - grid-template-columns: - [full-main-start] 1fr - [main-start] min(var(--body-max-width), 90%) [main-end] - 1fr [full-main-end]; -} -main > *{ - grid-column: main; -} -.icon { - vertical-align: sub; - padding-right: .25rem; - display: inline-block; - width: 1em; - height: 1.3em; - margin-right: 0.2rem; - stroke-width: 0; - stroke: currentColor; - fill: currentColor; -} -.note{ - font-size: .9rem; - font-style: italic; -} -.prevNext{ - display: grid; - grid-template-columns: 1fr 2fr 1fr; - margin-top: 1rem; - border-top: 1px solid var(--border); -} -.prevNext [rel=prev]{ - grid-column: 1; -} -.prevNext [rel=next]{ - grid-column: 3; - text-align: right; -} -.code{ - --shiki-color-text: #e9eded; - --shiki-color-background: #212121; - --shiki-token-constant: #82b1ff; - --shiki-token-string: #c3e88d; - --shiki-token-comment: #546e7a; - --shiki-token-keyword: #c792ea; - --shiki-token-parameter: #AA0000; - --shiki-token-function: #80cbae; - --shiki-token-string-expression: #c3e88d; - --shiki-token-punctuation: var(--code); - --shiki-token-link: #EE0000; - white-space: pre; - tab-size: 2; /* TODO: allow custom tab size?! */ - overflow: scroll; -} -.code[data-js=todo]{ - border: 1px solid var(--border); - border-radius: var(--standard-border-radius); - margin-bottom: 1rem; - margin-top: 18.4px; /* to fix shift when → dataJS=done */ - padding: 1rem 1.4rem; -} -.example{ - grid-column: full-main; - width: 100%; - max-width: calc(9/5 * var(--body-max-width)); - height: calc(3/5 * var(--body-max-width)); - margin-inline: auto; -} -.CodeMirror, .CodeMirror-gutters { - background: #212121 !important; - border: 1px solid white; -} -.notice h3{ - margin-top: 0; -} \ No newline at end of file diff --git a/docs_src/global.css.js b/docs/global.css.js similarity index 100% rename from docs_src/global.css.js rename to docs/global.css.js diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index ac682d9..0000000 --- a/docs/index.html +++ /dev/null @@ -1,22 +0,0 @@ -`deka-dom-el` — Introduction

`deka-dom-el` — Introduction

Introducing a library.

The library tries to provide pure JavaScript tool(s) to create reactive interfaces using …

# Event-driven programming (3 parts separation ≡ 3PS)

Let's introduce the basic principle on which the library is built. We'll use the JavaScript listener as a starting point.

// pseudo code! -const onchage= - event=> - console.log("Reacting to the:", event); // A -input.addEventListener("change", onchange); // B -input.dispatchEvent(new Event("change")); // C -

As we can see, in the code at location “A” we define how to react when the function is called with any event as an argument. At that moment, we don't care who/why/how the function was called. Similarly, at point “B”, we reference to a function to be called on the event without caring what the function will do at that time. Finally, at point “C”, we tell the application that a change has occurred, in the input, and we don't care if/how someone is listening for the event.

import { el } from "./esm-with-signals.js"; -import { S } from "./esm-with-signals.js"; -const clicks= S(0); // A -document.body.append( - el().append( - el("p", S(()=> - "Hello World "+"🎉".repeat(clicks()) // B - )), - el("button", { - type: "button", - onclick: ()=> clicks(clicks()+1), // C - textContent: "Fire", - }) - ) -); -

The library introduces a new “type” of variable/constant called signal allowing us to to use introduced 3PS pattern in our applications. As you can see it in the example above.

Also please notice that there is very similar 3PS pattern used for separate creation of UI and business logic.

The 3PS is very simplified definition of the pattern. There are more deep/academic definitions more precisely describe usage in specific situations, see for example MVVM or MVC.

# Organization of the documentation

\ No newline at end of file diff --git a/docs_src/index.html.js b/docs/index.html.js similarity index 100% rename from docs_src/index.html.js rename to docs/index.html.js diff --git a/docs_src/jsconfig.json b/docs/jsconfig.json similarity index 100% rename from docs_src/jsconfig.json rename to docs/jsconfig.json diff --git a/docs_src/layout/head.html.js b/docs/layout/head.html.js similarity index 100% rename from docs_src/layout/head.html.js rename to docs/layout/head.html.js diff --git a/docs_src/layout/simplePage.html.js b/docs/layout/simplePage.html.js similarity index 100% rename from docs_src/layout/simplePage.html.js rename to docs/layout/simplePage.html.js diff --git a/docs/p02-elements.html b/docs/p02-elements.html deleted file mode 100644 index 9b225bc..0000000 --- a/docs/p02-elements.html +++ /dev/null @@ -1,147 +0,0 @@ -`deka-dom-el` — Elements

`deka-dom-el` — Elements

Basic concepts of elements modifications and creations.

Native JavaScript DOM elements creations

Let’s go through all patterns we would like to use and what needs to be improved for better experience.

// use NPM or for example https://cdn.jsdelivr.net/gh/jaandrle/deka-dom-el/dist/esm.js -import { - assign, - el, createElement, - elNS, createElementNS -} from "deka-dom-el"; -el===createElement -elNS===createElementNS -// “internal” utils -import { - assignAttribute, - classListDeclarative, - chainableAppend -} from "deka-dom-el"; -

# Creating element(s) (with custom attributes)

You can create a native DOM element by using the document.createElement(). It is also possible to provide a some attribute(s) declaratively using Object.assign(). More precisely, this way you can sets some IDL also known as a JavaScript property.

document.body.append( - document.createElement("div") -); -console.log( - "Emty div is generated inside <body>:", - document.body.innerHTML.includes("<div></div>") -); - -document.body.append( - Object.assign( - document.createElement("p"), - { textContent: "Element’s text content.", style: "color: coral;" } - ) -); -

To make this easier, you can use the el function. Internally in basic examples, it is wrapper around assign(document.createElement(…), { … }).

import { el, assign } from "./esm-with-signals.js"; -const color= "lightcoral"; -document.body.append( - el("p", { textContent: "Hello (first time)", style: { color } }) -); -document.body.append( - assign( - document.createElement("p"), - { textContent: "Hello (second time)", style: { color } } - ) -); -

The assign function provides improved behaviour of Object.assign(). You can declaratively sets any IDL and attribute of the given element. Function prefers IDL and fallback to the element.setAttribute if there is no writable property in the element prototype.

You can study all JavaScript elements interfaces to the corresponding HTML elements. All HTML elements inherits from HTMLElement. To see all available IDLs for example for paragraphs, see HTMLParagraphElement. Moreover, the assign provides a way to sets declaratively some convenient properties:

  • It is possible to sets data-*/aria-* attributes using object notation.
  • In opposite, it is also possible to sets data-*/aria-* attribute using camelCase notation.
  • You can use string or object as a value for style property.
  • className (IDL – preffered)/class are ways to add CSS classes to the element. You can use string (similarly to class="…" syntax in HTML) or array of strings. This is handy to concat conditional classes.
  • Use classList to toggle specific classes. This will be handy later when the reactivity via signals is beeing introduced.
  • The assign also accepts the undefined as a value for any property to remove it from the element declaratively. Also for some IDL the corresponding attribute is removed as it can be confusing. For example, natievly the element’s id is removed by setting the IDL to an empty string.
  • You can use = or . to force processing given key as attribute/property of the element.

For processing, the assign internally uses assignAttribute and classListDeclarative.

import { assign, assignAttribute, classListDeclarative } from "./esm-with-signals.js"; -const paragraph= document.createElement("p"); - -assignAttribute(paragraph, "textContent", "Hello, world!"); - -assignAttribute(paragraph, "style", "color: red; font-weight: bold;"); -assignAttribute(paragraph, "style", { color: "navy" }); - -assignAttribute(paragraph, "dataTest1", "v1"); -assignAttribute(paragraph, "dataset", { test2: "v2" }); - -assign(paragraph, { //textContent and style see above - ariaLabel: "v1", //data* see above - ariaset: { role: "none" }, // dataset see above - "=onclick": "console.log(event)", - onmouseout: console.info, - ".something": "something", - classList: {} //see below -}); - -classListDeclarative(paragraph, { - classAdd: true, - classRemove: false, - classAdd1: 1, - classRemove1: 0, - classToggle: -1 -}); - -console.log(paragraph.outerHTML); -console.log("paragraph.something=", paragraph.something); -document.body.append( - paragraph -); -

# Native JavaScript templating

By default, the native JS has no good way to define HTML template using DOM API:

document.body.append( - document.createElement("div"), - document.createElement("span"), - document.createElement("main") -); -console.log(document.body.innerHTML.includes("<div></div><span></span><main></main>")); -const template= document.createElement("main").append( - document.createElement("div"), - document.createElement("span"), -); -console.log(typeof template==="undefined"); -

This library therefore overwrites the append method of created elements to always return parent element.

import { el } from "./esm-with-signals.js"; -document.head.append( - el("style").append( - "tr, td{ border: 1px solid red; padding: 1em; }", - "table{ border-collapse: collapse; }" - ) -); -document.body.append( - el("p", "Example of a complex template. Using for example nesting lists:"), - el("ul").append( - el("li", "List item 1"), - el("li").append( - el("ul").append( - el("li", "Nested list item 1"), - ) - ) - ), - el("table").append( - el("tr").append( - el("td", "Row 1 – Col 1"), - el("td", "Row 1 – Col 2") - ) - ) -); - -import { chainableAppend } from "./esm-with-signals.js"; -/** @param {keyof HTMLElementTagNameMap} tag */ -const createElement= tag=> chainableAppend(document.createElement(tag)); -document.body.append( - createElement("p").append( - createElement("em").append( - "You can also use `chainableAppend`!" - ) - ) -); -

# Basic (state-less) components

You can use functions for encapsulation (repeating) logic. The el accepts function as first argument. In that case, the function should return dom elements and the second argument for el is argument for given element.

import { el } from "./esm-with-signals.js"; -document.head.append( - el("style").append( - ".class1{ font-weight: bold; }", - ".class2{ color: purple; }" - ) -); -document.body.append( - el(component, { className: "class2", textContent: "Hello World!" }), - component({ className: "class2", textContent: "Hello World!" }) -); - -function component({ className, textContent }){ - return el("div", { className: [ "class1", className ] }).append( - el("p", textContent) - ); -} -

As you can see, in case of state-less/basic components there is no difference between calling component function directly or using el function.

It is nice to use similar naming convention as native DOM API. This allows us to use the destructuring assignment syntax and keep track of the native API (things are best remembered through regular use).

# Creating non-HTML elements

Similarly to the native DOM API (document.createElementNS) for non-HTML elements we need to tell JavaScript which kind of the element to create. We can use the elNS function:

import { elNS, assign } from "./esm-with-signals.js"; -const elSVG= elNS("http://www.w3.org/2000/svg"); -const elMath= elNS("http://www.w3.org/1998/Math/MathML"); -document.body.append( - elSVG("svg"), // see https://developer.mozilla.org/en-US/docs/Web/SVG and https://developer.mozilla.org/en-US/docs/Web/API/SVGElement - elMath("math") // see https://developer.mozilla.org/en-US/docs/Web/MathML and https://developer.mozilla.org/en-US/docs/Web/MathML/Global_attributes -); - -console.log( - document.body.innerHTML.includes("<svg></svg><math></math>") -) -

# Mnemonic

  • assign(<element>, ...<idl-objects>): <element> — assign properties to the element
  • el(<tag-name>, <primitive>)[.append(...)]: <element-from-tag-name> — simple element containing only text
  • el(<tag-name>, <idl-object>)[.append(...)]: <element-from-tag-name> — element with more properties
  • el(<function>, <function-argument(s)>)[.append(...)]: <element-returned-by-function> — using component represented by function
  • el(<...>, <...>, ...<addons>) — see following page
  • elNS(<namespace>)(<as-el-see-above>)[.append(...)]: <element-based-on-arguments> — typically SVG elements
\ No newline at end of file diff --git a/docs_src/p02-elements.html.js b/docs/p02-elements.html.js similarity index 100% rename from docs_src/p02-elements.html.js rename to docs/p02-elements.html.js diff --git a/docs/p03-events.html b/docs/p03-events.html deleted file mode 100644 index d72dca4..0000000 --- a/docs/p03-events.html +++ /dev/null @@ -1,94 +0,0 @@ -`deka-dom-el` — Events and Addons

`deka-dom-el` — Events and Addons

Using not only events in UI declaratively.

Listenning to the native DOM events and other Addons

We quickly introduce helper to listening to the native DOM events. And library syntax/pattern so-called Addon to incorporate not only this in UI templates declaratively.

// use NPM or for example https://cdn.jsdelivr.net/gh/jaandrle/deka-dom-el/dist/esm.js -import { on, dispatchEvent } from "deka-dom-el"; - -/** @type {ddeElementAddon} */ -

# Events and listenners

In JavaScript you can listen to the native DOM events of the given element by using element.addEventListener(type, listener, options). The library provides an alternative (on) accepting the differen order of the arguments:

import { el, on } from "./esm-with-signals.js"; -const log= mark=> console.log.bind(console, mark); - -const button= el("button", "Test click"); -button.addEventListener("click", log("`addEventListener`"), { once: true }); -on("click", log("`on`"), { once: true })(button); - -document.body.append( - button -); -

…this is actually one of the two differences. The another one is that on accepts only object as the options (but it is still optional).

The other difference is that there is no off function. You can remove listener declaratively using AbortSignal:

import { el, on } from "./esm-with-signals.js"; -const log= mark=> console.log.bind(console, mark); - -const abort_controller= new AbortController(); -const { signal }= abort_controller; - -const button= el("button", "Test click"); -button.addEventListener("click", log("`addEventListener`"), { signal }); -on("click", log("`on`"), { signal })(button); - -document.body.append( - button, " ", el("button", { textContent: "Off", onclick: ()=> abort_controller.abort() }) -); -

So, there are (typically) three ways to handle events. You can use:

  • el("button", { textContent: "click me", "=onclick": "console.log(event)" })
  • el("button", { textContent: "click me", onclick: console.log })
  • el("button", { textContent: "click me" }, on("click", console.log))

In the first example we force to use HTML attribute (it corresponds to <button onclick="console.log(event)">click me</button>). Side note: this can be useful in case of SSR. To study difference, you can read a nice summary here: GIST @WebReflection/web_events.md.

# Addons

From practical point of view, Addons are just functions that accept any HTML element as their first parameter. You can see that the on(…) fullfills this requirement.

You can use Addons as ≥3rd argument of el function. This way is possible to extends your templates by additional (3rd party) functionalities. But for now mainly, you can add events listeners:

import { el, on } from "./esm-with-signals.js"; -const abort_controller= new AbortController(); -const { signal }= abort_controller; -/** @type {ddeElementAddon<HTMLButtonElement>} */ -const onclickOff= on("click", ()=> abort_controller.abort(), { signal }); -/** @type {(ref?: HTMLOutputElement)=> HTMLOutputElement | null} */ -const ref= (store=> ref=> ref ? (store= ref) : store)(null); - -document.body.append( - el("button", "Test `on`", - on("click", console.log, { signal }), - on("click", update, { signal }), - on("mouseup", update, { signal })), - " ", - el("button", "Off", onclickOff), - el("output", { style: { display: "block", whiteSpace: "pre" } }, ref) -); -/** @param {MouseEvent} event @this {HTMLButtonElement} */ -function update(event){ - ref().append( - event.type, - "\n" - ); -} -

As the example shows, you can also provide types in JSDoc+TypeScript by using global type ddeElementAddon. Also notice, you can use Addons to get element reference.

# Life-cycle events

Addons are called immediately when the element is created, even it is not connected to live DOM yet. Therefore, you can understand the Addon to be “oncreate” event.

The library provide three additional live-cycle events corresponding to how they are named in a case of custom elements: on.connected, on.disconnected and on.attributeChanged.

import { el, on } from "./esm-with-signals.js"; -const paragraph= el("p", "See live-cycle events in console.", - el=> log({ type: "dde:created", detail: el }), - on.connected(log), - on.disconnected(log), - on.attributeChanged(log)); - -document.body.append( - paragraph, - el("button", "Update attribute", on("click", ()=> paragraph.setAttribute("test", Math.random().toString()))), - " ", - el("button", "Remove", on("click", ()=> paragraph.remove())) -); - -/** @param {Partial<CustomEvent>} event */ -function log({ type, detail }){ - console.log({ _this: this, type, detail }); -} -

For Custom elements, we will later introduce a way to replace *Callback syntax with dde:* events. The on.* functions then listen to the appropriate Custom Elements events (see Custom element lifecycle callbacks | MDN).

But, in case of regular elemnets the MutationObserver | MDN is internaly used to track these events. Therefore, there are some drawbacks:

  • To proper listener registration, you need to use on.* not `on("dde:*", …)`!
  • Use sparingly! Internally, library must loop of all registered events and fires event properly. It is good practice to use the fact that if an element is removed, its children are also removed! In this spirit, we will introduce later the host syntax to register, clean up procedures when the component is removed from the app.

To provide intuitive behaviour, similar also to how the life-cycle events works in other frameworks/libraries, deka-dom-el library ensures that on.connected and on.disconnected are called only once and only when the element, is (dis)connected to live DOM. The solution is inspired by Vue. For using native behaviour re-(dis)connecting element, use:

  • custom MutationObserver or logic in (dis)connectedCallback or…
  • re-add on.connected or on.disconnected listeners.

# Final notes

The library also provides a method to dispatch the events.

import { el, on, dispatchEvent } from "./esm-with-signals.js"; -document.body.append( - el("p", "Listenning to `test` event.", on("test", console.log)).append( - el("br"), - el("button", "native", on("click", native)), - " ", - el("button", "dde", on("click", dde)), - " ", - el("button", "dde with options", on("click", ddeOptions)) - ) -); -function native(){ - this.dispatchEvent( - new CustomEvent("test", - { bubbles: true, detail: "hi" } - ) - ); -} -function dde(){ - dispatchEvent("test")(this.parentElement, "hi"); -} -function ddeOptions(){ - dispatchEvent("test", { bubbles: true })(this, "hi"); -} -

# Mnemonic

  • on(<event>, <listener>[, <options>])(<element>) — just <element>.addEventListener(<event>, <listener>[, <options>])
  • on.<live-cycle>(<event>, <listener>[, <options>])(<element>) — corresponds to custom elemnets callbacks <live-cycle>Callback(...){...}. To connect to custom element see following page, else it is simulated by MutationObserver.
  • dispatchEvent(<event>[, <options>])(element) — just <element>.dispatchEvent(new Event(<event>[, <options>]))
  • dispatchEvent(<event>[, <options>])(element, detail) — just <element>.dispatchEvent(new CustomEvent(<event>, { detail, ...<options> }))
\ No newline at end of file diff --git a/docs_src/p03-events.html.js b/docs/p03-events.html.js similarity index 100% rename from docs_src/p03-events.html.js rename to docs/p03-events.html.js diff --git a/docs/p04-observables.html b/docs/p04-observables.html deleted file mode 100644 index 47b7a65..0000000 --- a/docs/p04-observables.html +++ /dev/null @@ -1,150 +0,0 @@ -`deka-dom-el` — Observables and reactivity

`deka-dom-el` — Observables and reactivity

Handling reactivity in UI via observables.

Using observables to manage reactivity

How a program responds to variable data or user interactions is one of the fundamental problems of programming. If we desire to solve the issue in a declarative manner, observables may be a viable approach.

// use NPM or for example https://cdn.jsdelivr.net/gh/jaandrle/deka-dom-el/dist/esm-with-observables.js -import { O, observable } from "deka-dom-el/observables"; -O===observable -/** @type {ddeObservable} */ -/** @type {ddeAction} */ -/** @type {ddeActions} */ -

# Introducing observables

Using observables, we split program logic into the three parts. Firstly (α), we create a variable (constant) representing reactive value. Somewhere later, we can register (β) a logic reacting to the observable value changes. Similarly, in a remaining part (γ), we can update the observable value.

import { O } from "./esm-with-observables.js"; -// α — `observable` represents a reactive value -const observable= O(0); -// β — just reacts on observable changes -O.on(observable, console.log); -// γ — just updates the value -const update= ()=> observable(observable()+1); - -update(); -const interval= 5*1000; -setTimeout(clearInterval, 10*interval, - setInterval(update, interval)); -

All this is just an example of Event-driven programming and Publish–subscribe pattern (compare for example with fpubsub library). All three parts can be in some manner independent and still connected to the same reactive entity.

Observables are implemented in the library as functions. To see current value of observable, just call it without any arguments console.log(observable()). To update the observable value, pass any argument observable('a new value'). For listenning the observable value changes, use O.on(observable, console.log).

Similarly to the on function to register DOM events listener. You can use AbortController/AbortSignal to off/stop listenning. In example, you also found the way for representing “live” piece of code computation pattern (derived observable):

import { O } from "./esm-with-observables.js"; -const observable= O(0); -// computation pattern -const double= O(()=> 2*observable()); - -const ac= new AbortController(); -O.on(observable, v=> console.log("observable", v), { signal: ac.signal }); -O.on(double, v=> console.log("double", v), { signal: ac.signal }); - -observable(observable()+1); -const interval= 5 * 1000; -const id= setInterval(()=> observable(observable()+1), interval); -ac.signal.addEventListener("abort", - ()=> setTimeout(()=> clearInterval(id), 2*interval)); - -setTimeout(()=> ac.abort(), 3*interval) -

# Observables and actions

O(/* primitive */) allows you to declare simple reactive variables, typically around immutable primitive types. However, it may also be necessary to use reactive arrays, objects, or other complex reactive structures.

import { O } from "./esm-with-observables.js"; -const observable= O(0, { - increaseOnlyOdd(add){ - console.info(add); - if(add%2 === 0) return this.stopPropagation(); - this.value+= add; - } -}); -O.on(observable, console.log); -const oninterval= ()=> - O.action(observable, "increaseOnlyOdd", Math.floor(Math.random()*100)); - -const interval= 5*1000; -setTimeout( - clearInterval, - 10*interval, - setInterval(oninterval, interval) -); -

…but typical user-case is object/array (maps, sets and other mutable objects):

import { O } from "./esm-with-observables.js"; -const todos= O([], { - push(item){ - this.value.push(O(item)); - }, - pop(){ - const removed= this.value.pop(); - if(removed) O.clear(removed); - }, - [O.symbols.onclear](){ // this covers `O.clear(todos)` - O.clear(...this.value); - } -}); - -import { el, on } from "./esm-with-observables.js"; -/** @type {ddeElementAddon<HTMLFormElement>} */ -const onsubmit= on("submit", function(event){ - event.preventDefault(); - const data= new FormData(this); - switch (data.get("op")){ - case "A"/*dd*/: - O.action(todos, "push", data.get("todo")); - break; - case "E"/*dit*/: { - const last= todos().at(-1); - if(!last) break; - last(data.get("todo")); - break; - } - case "R"/*emove*/: - O.action(todos, "pop"); - break; - } -}); -document.body.append( - el("ul").append( - O.el(todos, todos=> - todos.map(textContent=> el("li", textContent))) - ), - el("form", null, onsubmit).append( - el("input", { type: "text", name: "todo", placeholder: "Todo’s text" }), - el(radio, { textContent: "Add", checked: true }), - el(radio, { textContent: "Edit last" }), - el(radio, { textContent: "Remove" }), - el("button", "Submit") - ) -); -document.head.append( - el("style", "form{ display: flex; flex-flow: column nowrap; }") -); -function radio({ textContent, checked= false }){ - return el("label").append( - el("input", { type: "radio", name: "op", value: textContent[0], checked }), - " ",textContent - ) -} -

In some way, you can compare it with useReducer hook from React. So, the O(<data>, <actions>) pattern creates a store “machine”. We can then invoke (dispatch) registered action by calling O.action(<observable>, <name>, ...<args>) after the action call the observable calls all its listeners. This can be stopped by calling this.stopPropagation() in the method representing the given action. As it can be seen in examples, the “store” value is available also in the function for given action (this.value).

# Reactive DOM attributes and elements

There are on basic level two distinc situation to mirror dynamic value into the DOM/UI

  1. to change some attribute(s) of existing element(s)
  2. to generate elements itself dynamically – this covers conditions and loops
import { O } from "./esm-with-observables.js"; -const count= O(0); - -import { el } from "./esm-with-observables.js"; -document.body.append( - el("p", O(()=> "Currently: "+count())), - el("p", { classList: { red: O(()=> count()%2) }, dataset: { count }, textContent: "Attributes example" }) -); -document.head.append( - el("style", ".red { color: red; }") -); - -const interval= 5 * 1000; -setTimeout(clearInterval, 10*interval, - setInterval(()=> count(count()+1), interval)); -

To derived attribute based on value of observable variable just use the observable as a value of the attribute (assign(element, { attribute: O('value') })). assign/el provides ways to glue reactive attributes/classes more granularly into the DOM. Just use dedicated build-in attributes dataset, ariaset and classList.

For computation, you can use the “derived observable” (see above) like assign(element, { textContent: O(()=> 'Hello '+WorldObservable()) }). This is read-only observable its value is computed based on given function and updated when any observable used in the function changes.

To represent part of the template filled dynamically based on the observable value use O.el(observable, DOMgenerator). This was already used in the todo example above or see:

import { O } from "./esm-with-observables.js"; -const count= O(0, { - add(){ this.value= this.value + Math.round(Math.random()*10); } -}); -const numbers= O([ count() ], { - push(next){ this.value.push(next); } -}); - -import { el } from "./esm-with-observables.js"; -document.body.append( - O.el(count, count=> count%2 - ? el("p", "Last number is odd.") - : el() - ), - el("p", "Lucky numbers:"), - el("ul").append( - O.el(numbers, numbers=> numbers.toReversed() - .map(n=> el("li", n))) - ) -); - -const interval= 5*1000; -setTimeout(clearInterval, 10*interval, setInterval(function(){ - O.action(count, "add"); - O.action(numbers, "push", count()); -}, interval)); -

# Mnemonic

  • O(<value>) — observable: reactive value
  • O(()=> <computation>) — read-only observable: reactive value dependent on calculation using other observables
  • O.on(<observable>, <listener>[, <options>]) — listen to the observable value changes
  • O.clear(...<observables>) — off and clear observables
  • O(<value>, <actions>) — observable: pattern to create complex reactive objects/arrays
  • O.action(<observable>, <action-name>, ...<action-arguments>) — invoke an action for given observable
  • O.el(<observable>, <function-returning-dom>) — render partial dom structure (template) based on the current observable value
\ No newline at end of file diff --git a/docs/p04-signals.html b/docs/p04-signals.html deleted file mode 100644 index 35cf3f3..0000000 --- a/docs/p04-signals.html +++ /dev/null @@ -1,150 +0,0 @@ -`deka-dom-el` — Signals and reactivity

`deka-dom-el` — Signals and reactivity

Handling reactivity in UI via signals.

Using signals to manage reactivity

How a program responds to variable data or user interactions is one of the fundamental problems of programming. If we desire to solve the issue in a declarative manner, signals may be a viable approach.

// use NPM or for example https://cdn.jsdelivr.net/gh/jaandrle/deka-dom-el/dist/esm-with-signals.js -import { S, signal } from "deka-dom-el/signals"; -S===signal -/** @type {ddeSignal} */ -/** @type {ddeAction} */ -/** @type {ddeActions} */ -

# Introducing signals

Let’s re-introduce 3PS principle.

Using signals, we split program logic into the three parts. Firstly (α), we create a variable (constant) representing reactive value. Somewhere later, we can register (β) a logic reacting to the signal value changes. Similarly, in a remaining part (γ), we can update the signal value.

import { S } from "./esm-with-signals.js"; -// α — `signal` represents a reactive value -const signal= S(0); -// β — just reacts on signal changes -S.on(signal, console.log); -// γ — just updates the value -const update= ()=> signal(signal()+1); - -update(); -const interval= 5*1000; -setTimeout(clearInterval, 10*interval, - setInterval(update, interval)); -

All this is just an example of Event-driven programming and Publish–subscribe pattern (compare for example with fpubsub library). All three parts can be in some manner independent and still connected to the same reactive entity.

Signals are implemented in the library as functions. To see current value of signal, just call it without any arguments console.log(signal()). To update the signal value, pass any argument signal('a new value'). For listenning the signal value changes, use S.on(signal, console.log).

Similarly to the on function to register DOM events listener. You can use AbortController/AbortSignal to off/stop listenning. In example, you also found the way for representing “live” piece of code computation pattern (derived signal):

import { S } from "./esm-with-signals.js"; -const signal= S(0); -// computation pattern -const double= S(()=> 2*signal()); - -const ac= new AbortController(); -S.on(signal, v=> console.log("signal", v), { signal: ac.signal }); -S.on(double, v=> console.log("double", v), { signal: ac.signal }); - -signal(signal()+1); -const interval= 5 * 1000; -const id= setInterval(()=> signal(signal()+1), interval); -ac.signal.addEventListener("abort", - ()=> setTimeout(()=> clearInterval(id), 2*interval)); - -setTimeout(()=> ac.abort(), 3*interval) -

# Signals and actions

S(/* primitive */) allows you to declare simple reactive variables, typically, around immutable primitive types. However, it may also be necessary to use reactive arrays, objects, or other complex reactive structures.

import { S } from "./esm-with-signals.js"; -const signal= S(0, { - increaseOnlyOdd(add){ - console.info(add); - if(add%2 === 0) return this.stopPropagation(); - this.value+= add; - } -}); -S.on(signal, console.log); -const oninterval= ()=> - S.action(signal, "increaseOnlyOdd", Math.floor(Math.random()*100)); - -const interval= 5*1000; -setTimeout( - clearInterval, - 10*interval, - setInterval(oninterval, interval) -); -

…but typical user-case is object/array (maps, sets and other mutable objects):

import { S } from "./esm-with-signals.js"; -const todos= S([], { - push(item){ - this.value.push(S(item)); - }, - pop(){ - const removed= this.value.pop(); - if(removed) S.clear(removed); - }, - [S.symbols.onclear](){ // this covers `O.clear(todos)` - S.clear(...this.value); - } -}); - -import { el, on } from "./esm-with-signals.js"; -/** @type {ddeElementAddon<HTMLFormElement>} */ -const onsubmit= on("submit", function(event){ - event.preventDefault(); - const data= new FormData(this); - switch (data.get("op")){ - case "A"/*dd*/: - S.action(todos, "push", data.get("todo")); - break; - case "E"/*dit*/: { - const last= todos().at(-1); - if(!last) break; - last(data.get("todo")); - break; - } - case "R"/*emove*/: - S.action(todos, "pop"); - break; - } -}); -document.body.append( - el("ul").append( - S.el(todos, todos=> - todos.map(textContent=> el("li", textContent))) - ), - el("form", null, onsubmit).append( - el("input", { type: "text", name: "todo", placeholder: "Todo’s text" }), - el(radio, { textContent: "Add", checked: true }), - el(radio, { textContent: "Edit last" }), - el(radio, { textContent: "Remove" }), - el("button", "Submit") - ) -); -document.head.append( - el("style", "form{ display: flex; flex-flow: column nowrap; }") -); -function radio({ textContent, checked= false }){ - return el("label").append( - el("input", { type: "radio", name: "op", value: textContent[0], checked }), - " ",textContent - ) -} -

In some way, you can compare it with useReducer hook from React. So, the S(<data>, <actions>) pattern creates a store “machine”. We can then invoke (dispatch) registered action by calling S.action(<signal>, <name>, ...<args>) after the action call the signal calls all its listeners. This can be stopped by calling this.stopPropagation() in the method representing the given action. As it can be seen in examples, the “store” value is available also in the function for given action (this.value).

# Reactive DOM attributes and elements

There are on basic level two distinc situation to mirror dynamic value into the DOM/UI

  1. to change some attribute(s) of existing element(s)
  2. to generate elements itself dynamically – this covers conditions and loops
import { S } from "./esm-with-signals.js"; -const count= S(0); - -import { el } from "./esm-with-signals.js"; -document.body.append( - el("p", S(()=> "Currently: "+count())), - el("p", { classList: { red: S(()=> count()%2) }, dataset: { count }, textContent: "Attributes example" }) -); -document.head.append( - el("style", ".red { color: red; }") -); - -const interval= 5 * 1000; -setTimeout(clearInterval, 10*interval, - setInterval(()=> count(count()+1), interval)); -

To derived attribute based on value of signal variable just use the signal as a value of the attribute (assign(element, { attribute: S('value') })). assign/el provides ways to glue reactive attributes/classes more granularly into the DOM. Just use dedicated build-in attributes dataset, ariaset and classList.

For computation, you can use the “derived signal” (see above) like assign(element, { textContent: S(()=> 'Hello '+WorldSignal()) }). This is read-only signal its value is computed based on given function and updated when any signal used in the function changes.

To represent part of the template filled dynamically based on the signal value use S.el(signal, DOMgenerator). This was already used in the todo example above or see:

import { S } from "./esm-with-signals.js"; -const count= S(0, { - add(){ this.value= this.value + Math.round(Math.random()*10); } -}); -const numbers= S([ count() ], { - push(next){ this.value.push(next); } -}); - -import { el } from "./esm-with-signals.js"; -document.body.append( - S.el(count, count=> count%2 - ? el("p", "Last number is odd.") - : el() - ), - el("p", "Lucky numbers:"), - el("ul").append( - S.el(numbers, numbers=> numbers.toReversed() - .map(n=> el("li", n))) - ) -); - -const interval= 5*1000; -setTimeout(clearInterval, 10*interval, setInterval(function(){ - S.action(count, "add"); - S.action(numbers, "push", count()); -}, interval)); -

# Mnemonic

  • S(<value>) — signal: reactive value
  • S(()=> <computation>) — read-only signal: reactive value dependent on calculation using other signals
  • S.on(<signal>, <listener>[, <options>]) — listen to the signal value changes
  • S.clear(...<signals>) — off and clear signals
  • S(<value>, <actions>) — signal: pattern to create complex reactive objects/arrays
  • S.action(<signal>, <action-name>, ...<action-arguments>) — invoke an action for given signal
  • S.el(<signal>, <function-returning-dom>) — render partial dom structure (template) based on the current signal value
\ No newline at end of file diff --git a/docs_src/p04-signals.html.js b/docs/p04-signals.html.js similarity index 100% rename from docs_src/p04-signals.html.js rename to docs/p04-signals.html.js diff --git a/docs/p05-scopes.html b/docs/p05-scopes.html deleted file mode 100644 index 8bfb5e0..0000000 --- a/docs/p05-scopes.html +++ /dev/null @@ -1,183 +0,0 @@ -`deka-dom-el` — Scopes and components

`deka-dom-el` — Scopes and components

Organizing UI into components

Using functions as UI components

For state-less components we can use functions as UI components (see “Elements” page). But in real life, we may need to handle the component live-cycle and provide JavaScript the way to properly use the Garbage collection.

// use NPM or for example https://cdn.jsdelivr.net/gh/jaandrle/deka-dom-el/dist/esm-with-signals.js -import { scope, el } from "deka-dom-el"; -/** @type {ddeElementAddon} */ -

The library therefore use scopes to provide these functionalities.

# Scopes and hosts

The host is the name for the element representing the component. This is typically element returned by function. To get reference, you can use scope.host() to applly addons just use scope.host(...<addons>).

import { el, on, scope } from "./esm-with-signals.js"; -const { host }= scope; -host( - element=> console.log( - "This represents Addon/oninit for root", - element.outerHTML - ) -); -console.log( - "This represents the reference to the host element of root", - host().outerHTML -); -document.body.append( - el(component) -); -function component(){ - const { host }= scope; - host( - element=> console.log( - "This represents Addon/oninit for the component", - element.outerHTML - ) - ); - const onclick= on("click", function(ev){ - console.log( - "This represents the reference to the host element of the component", - host().outerHTML - ); - }) - return el("div", null, onclick).append( - el("strong", "Component") - ); -} -

To better understanding we implement function elClass helping to create component as class instances.

import { el } from "./esm-with-signals.js"; -class Test { - constructor(params){ - this._params= params; - } - render(){ - return el("div").append( - this._params.textContent - ); - } -} -document.body.append( - elClass(Test, { textContent: "Hello World" }) -); - -import { chainableAppend, scope } from "./esm-with-signals.js"; -function elClass(_class, attributes, ...addons){ - let element, element_host; - scope.push({ - scope: _class, //just informative purposes - host: (...addons_append)=> addons_append.length - ? ( - !element - ? addons.unshift(...addons_append) - : addons_append.forEach(c=> c(element_host)) - , undefined) - : element_host - }); - const instance= new _class(attributes); - element= instance.render(); - const is_fragment= element instanceof DocumentFragment; - const el_mark= el.mark({ //this creates html comment `<dde:mark …/>` - type: "class-component", - name: _class.name, - host: is_fragment ? "this" : "parentElement", - }); - element.prepend(el_mark); - if(is_fragment) element_host= el_mark; - - chainableAppend(element); - addons.forEach(c=> c(element_host)); - scope.pop(); - return element; -} -

As you can see, the scope.host() is stored temporarily and synchronously. Therefore, at least in the beginning of using library, it is the good practise to store host in the root of your component. As it may be changed, typically when there is asynchronous code in the component.

import { el, scope, on, dispatchEvent } from "deka-dom-el"; -document.body.append( - el(component) -); -function component(){ - const { host }= scope; // good practise! - - host( - console.log, - on("click", function redispatch(){ - // this `host` ↘ still corresponds to the host ↖ of the component - dispatchEvent("redispatch")(host()); - }) - ); - // this `host` ↘ still corresponds to the host ↖ of the component - setTimeout(()=> dispatchEvent("timeout")(host()), 750) - return el("p", "Clickable paragraph!"); -} -

# Scopes, signals and cleaning magic

The host is internally used to register the cleaning procedure, when the component (host element) is removed from the DOM.

import { el, empty, on } from "./esm-with-signals.js"; -document.body.append( - el(component), - el("button", { - textContent: "Remove", - onclick: ()=> empty(document.body), - type: "button" - }) -); -import { S } from "./esm-with-signals.js"; -function component(){ - const textContent= S("Click to change text."); - - const onclickChange= on("click", function redispatch(){ - textContent("Text changed! "+(new Date()).toString()) - }); - return el("p", textContent, onclickChange); -} -

The text content of the paragraph is changing when the value of the signal textContent is changed. Internally, there is association between textContent and the paragraph, similar to using S.on(textContent, /* update the paragraph */).

This listener must be removed when the component is removed from the DOM. To do it, the library assign internally on.disconnected(/* remove the listener */)(host()) to the host element.

The library DOM API and signals works ideally when used declaratively. It means, you split your app logic into three parts as it was itroduced in Signals.

/* PSEUDO-CODE!!! */ -import { el } from "deka-dom-el"; -import { S } from "deka-dom-el/signals"; -function component(){ - /* prepare changeable data */ - const dataA= S("data"); - const dataB= S("data"); - /* define data flow (can be asynchronous) */ - fetchAPI().then(data_new=> dataA(data_new)); - setTimeout(()=> dataB("DATA")); - /* declarative UI */ - return el().append( - el("h1", { - textContent: "Example", - /* declarative attribute(s) */ - classList: { declarative: dataB } - }), - el("ul").append( - /* declarative element(s) */ - S.el(dataA, data=> data.map(d=> el("li", d))) - ), - el("ul").append( - /* declarative component(s) */ - S.el(dataA, data=> data.map(d=> el(subcomponent, d))) - ) - ); -} -function subcomponent({ id }){ - /* prepare changeable data */ - const textContent= S("…"); - /* define data flow (can be asynchronous) */ - fetchAPI(id).then(text=> textContent(text)); - /* declarative UI */ - return el("li", { textContent, dataId: id }); -} -

Strictly speaking, the imperative way of using the library is not prohibited. Just be careful (rather avoid) mixing declarative approach (using signals) and imperative manipulation of elements.

/* PSEUDO-CODE!!! */ -import { el, on, scope } from "deka-dom-el"; -function component(){ - const { host }= scope; - const ul= el("ul"); - const ac= new AbortController(); - fetchAPI({ signal: ac.signal }).then(data=> { - data.forEach(d=> ul.append(el("li", d))); - }); - host( - /* element was remove before data fetched */ - on.disconnected(()=> ac.abort()) - ); - return ul; - /** - * NEVER EVER!! - * let data; - * fetchAPI().then(d=> data= O(d)); - * - * OR NEVER EVER!! - * const ul= el("ul"); - * fetchAPI().then(d=> { - * const data= O("data"); - * ul.append(el("li", data)); - * }); - * - * // THE HOST IS PROBABLY DIFFERENT THAN - * // YOU EXPECT AND OBSERVABLES MAY BE - * // UNEXPECTEDLY REMOVED!!! - * */ -} -

# Mnemonic

  • el(<function>, <function-argument(s)>)[.append(...)]: <element-returned-by-function> — using component represented by function
  • scope.host() — get current component reference
  • scope.host(...<addons>) — use addons to current component
\ No newline at end of file diff --git a/docs_src/p05-scopes.html.js b/docs/p05-scopes.html.js similarity index 100% rename from docs_src/p05-scopes.html.js rename to docs/p05-scopes.html.js diff --git a/docs/p06-customElement.html b/docs/p06-customElement.html deleted file mode 100644 index ed6737e..0000000 --- a/docs/p06-customElement.html +++ /dev/null @@ -1,242 +0,0 @@ -`deka-dom-el` — Web Components

`deka-dom-el` — Web Components

Using custom elements in combinantion with DDE

Using web components in combinantion with DDE

The DDE library allows for use within Web Components for dom-tree generation. However, in order to be able to use signals (possibly mapping to registered observedAttributes) and additional functionality is (unfortunately) required to use helpers provided by the library.

// use NPM or for example https://cdn.jsdelivr.net/gh/jaandrle/deka-dom-el/dist/esm-with-signals.js -import { - customElementRender, - customElementWithDDE, - observedAttributes, -} from "deka-dom-el"; -/** @type {ddePublicElementTagNameMap} */ -import { S } from "deka-dom-el/signals"; -S.observedAttributes; - -// “internal” utils -import { lifecyclesToEvents } from "deka-dom-el"; -

# Custom Elements Introduction

Web Components, specifically Custom Elements, are a set of web platform APIs that allow you to create new HTML tags with custom functionality encapsulated within them. This allows for the creation of reusable components that can be used across web applications.

To start with, let’s see how to use native Custom Elements. As starting point please read Using Custom Elementson MDN. To sum up and for mnemonic see following code overview:

export class HTMLCustomElement extends HTMLElement{ - static tagName= "custom-element"; // just suggestion, we can use `el(HTMLCustomElement.tagName)` - static observedAttributes= [ "custom-attribute" ]; - constructor(){ - super(); - // nice place to prepare custom element - } - connectedCallback(){ - // nice place to render custom element - } - attributeChangedCallback(name, oldValue, newValue){ - // listen to attribute changes (see `observedAttributes`) - } - disconnectedCallback(){ - // nice place to clean up - } - // for example, we can mirror get/set prop to attribute - get customAttribute(){ return this.getAttribute("custom-attribute"); } - set customAttribute(value){ this.setAttribute("custom-attribute", value); } -} -customElements.define(HTMLCustomElement.tagName, HTMLCustomElement); -

For more advanced use of Custom Elements, the summary Handy Custom Elements Patterns may be useful. Especially pay attention to linking HTML attributes and defining setters/getters, this is very helpful to use in combination with the library (el(HTMLCustomElement.tagName, { customAttribute: "new-value" });).

Also see the Life Cycle Events sections, very similarly we would like to use DDE events. To do it, the library provides function customElementWithDDE

import { customElementWithDDE, el, on } from "./esm-with-signals.js"; -export class HTMLCustomElement extends HTMLElement{ - static tagName= "custom-element"; - connectedCallback(){ - this.append( - el("p", "Hello from custom element!") - ); - } -} -customElementWithDDE(HTMLCustomElement); -customElements.define(HTMLCustomElement.tagName, HTMLCustomElement); - -const instance= el(HTMLCustomElement.tagName); -on.connected( // preffered - e=> console.log("Element connected to the DOM (v1):", e) -)(instance); -instance.addEventListener( - "dde:connected", - e=> console.log("Element connected to the DOM (v2):", e) -); -document.body.append( - instance, -); -

Custom Elements with DDE

The customElementWithDDE function is only (small) part of the inregration of the library. More important for coexistence is render component function as a body of the Custom Element. For that, you can use customElementRender with arguments instance reference, target for connection, render function and optional properties (will be passed to the render function) see later…

import { - customElementRender, - customElementWithDDE, -} from "./esm-with-signals.js"; -export class HTMLCustomElement extends HTMLElement{ - static tagName= "custom-element"; - static observedAttributes= [ "attr" ]; - connectedCallback(){ - customElementRender( - this, - this.attachShadow({ mode: "open" }), - ddeComponent - ); - } - set attr(value){ this.setAttribute("attr", value); } - get attr(){ return this.getAttribute("attr"); } -} - -import { el, on, scope } from "./esm-with-signals.js"; -function ddeComponent({ attr }){ - scope.host( - on.connected(e=> console.log(e.target.outerHTML)), - ); - return el().append( - el("p", `Hello from Custom Element with attribute '${attr}'`) - ); -} -customElementWithDDE(HTMLCustomElement); -customElements.define(HTMLCustomElement.tagName, HTMLCustomElement); - -document.body.append( - el(HTMLCustomElement.tagName, { attr: "Attribute" }) -); -

…as you can see, you can use components created based on the documentation previously introduced. To unlock full potential, use with combination customElementWithDDE (allows to use livecycle events) and observedAttributes (converts attributes to render function arguments — default) or S.observedAttributes (converts attributes to signals).

import { - customElementRender, - customElementWithDDE, - observedAttributes, - el, on, scope -} from "./esm-with-signals.js"; -import { S } from "./esm-with-signals.js"; -export class HTMLCustomElement extends HTMLElement{ - static tagName= "custom-element"; - static observedAttributes= [ "attr" ]; - connectedCallback(){ - console.log(observedAttributes(this)); - customElementRender( - this, - this.attachShadow({ mode: "open" }), - ddeComponent, - S.observedAttributes - ); - } - set attr(value){ this.setAttribute("attr", value); } - get attr(){ return this.getAttribute("attr"); } -} - -/** @param {{ attr: ddeSignal<string, {}> }} props */ -function ddeComponent({ attr }){ - scope.host( - on.connected(e=> console.log(e.target.outerHTML)), - ); - return el().append( - el("p", S(()=> `Hello from Custom Element with attribute '${attr()}'`)) - ); -} -customElementWithDDE(HTMLCustomElement); -customElements.define(HTMLCustomElement.tagName, HTMLCustomElement); - -document.body.append( - el(HTMLCustomElement.tagName, { attr: "Attribute" }) -); -setTimeout( - ()=> document.querySelector(HTMLCustomElement.tagName).setAttribute("attr", "New Value"), - 3*750 -); -

# Shadow DOM

Shadow DOM is a web platform feature that allows for the encapsulation of a component’s internal DOM tree from the rest of the document. This means that styles and scripts applied to the document will not affect the component’s internal DOM, and vice versa.

import { - el, - customElementRender, - customElementWithDDE, -} from "./esm-with-signals.js"; -function ddeComponent(){ - return el().append( - el("style", ` - .red{ color: firebrick; } - `), - el("p", { className: "red" }).append( - "Hello from ", el("slot", "Custom Element"), "!" - ) - ); -} - -export class A extends HTMLElement{ - static tagName= "custom-element-without"; - connectedCallback(){ - customElementRender( - this, - this, - ddeComponent - ); - } -} -customElementWithDDE(A); -customElements.define(A.tagName, A); -export class B extends HTMLElement{ - static tagName= "custom-element-open"; - connectedCallback(){ - customElementRender( - this, - this.attachShadow({ mode: "open" }), - ddeComponent - ); - } -} -customElementWithDDE(B); -customElements.define(B.tagName, B); -export class C extends HTMLElement{ - static tagName= "custom-element-closed"; - connectedCallback(){ - customElementRender( - this, - this.attachShadow({ mode: "closed" }), - ddeComponent - ); - } -} -customElementWithDDE(C); -customElements.define(C.tagName, C); - -document.body.append( - el(A.tagName).append("Without shadowRoot"), - el("hr"), - el(B.tagName).append("Open shadowRoot"), - el("hr"), - el(C.tagName).append("Closed shadowRoot"), - el("style", ` - .red{ color: crimson; } - `), -); -console.log(A.tagName, "expect modifications"); -document.body.querySelector(A.tagName).querySelector("p").textContent+= " (editable with JS)"; -console.log(B.tagName, "expect modifications"); -document.body.querySelector(B.tagName).shadowRoot.querySelector("p").textContent+= " (editable with JS)"; -console.log(C.tagName, "expect error ↓"); -document.body.querySelector(C.tagName).querySelector("p").textContent+= " (editable with JS)"; -

Regarding to this.attachShadow({ mode: 'open' }) see quick overview Using Shadow DOM. An another source of information can be Shadow DOM in Depth.

Besides the encapsulation, the Shadow DOM allows for using the <slot>element(s). You can simulate this feature using simulateSlots:

import { - customElementRender, - customElementWithDDE, - el, - simulateSlots -} from "./esm-with-signals.js"; -export class HTMLCustomElement extends HTMLElement{ - static tagName= "custom-slotting"; - connectedCallback(){ - const c= ()=> simulateSlots(this, ddeComponent()); - customElementRender(this, this, c); - } -} -customElementWithDDE(HTMLCustomElement); -customElements.define(HTMLCustomElement.tagName, HTMLCustomElement); - -document.body.append( - el(HTMLCustomElement.tagName), - el(HTMLCustomElement.tagName).append( - "Slot" - ), - el(ddeComponentSlot), - el(ddeComponentSlot).append( - "Slot" - ), -); - -function ddeComponent(){ - return el().append( - el("p").append( - "Hello ", el("slot", "World") - ) - ); -} -function ddeComponentSlot(){ - return simulateSlots(el().append( - el("p").append( - "Hello ", el("slot", "World") - ) - )); -} -

To sum up:

  • The use of shadow DOM to encapsulate the internal structure of the custom element, which affects how the custom element can be styled and modified using JavaScript and CSS.
  • The ability to access and modify the internal structure of the custom element using JavaScript, which is affected by the use of shadow DOM and the mode of the shadow DOM.
  • The use of slots to allow for the insertion of content from the parent document into the custom element, which is affected by the use of shadow DOM and the mode of the shadow DOM.

# Mnemonic

  • customElementRender(<custom-element>, <connect-target>, <render-function>[, <properties>]) — use function to render DOM structure for given <custom-element>
  • customElementWithDDE(<custom-element>) — register <custom-element> to DDE library, see also `lifecyclesToEvents`, can be also used as decorator
  • observedAttributes(<custom-element>) — returns record of observed attributes (keys uses camelCase)
  • S.observedAttributes(<custom-element>) — returns record of observed attributes (keys uses camelCase and values are signals)
  • lifecyclesToEvents(<class-declaration>) — convert lifecycle methods to events, can be also used as decorator
  • simulateSlots(<class-instance>, <body>[, <mapper>]) — simulate slots for Custom Elements without shadow DOM
  • simulateSlots(<dde-component>[, <mapper>]) — simulate slots for “dde”/functional components
\ No newline at end of file diff --git a/docs_src/p06-customElement.html.js b/docs/p06-customElement.html.js similarity index 100% rename from docs_src/p06-customElement.html.js rename to docs/p06-customElement.html.js diff --git a/docs_src/ssr.js b/docs/ssr.js similarity index 97% rename from docs_src/ssr.js rename to docs/ssr.js index bb391bc..12afb0a 100644 --- a/docs_src/ssr.js +++ b/docs/ssr.js @@ -1,7 +1,7 @@ export { t } from "./utils/index.js"; export const path_target= { - root: "docs/", - css: "docs/" + root: "dist/docs/", + css: "dist/docs/" }; /** * This variable will be filled with the list of pages during the build process (see `bs/docs.js`). diff --git a/docs_src/types.d.ts b/docs/types.d.ts similarity index 100% rename from docs_src/types.d.ts rename to docs/types.d.ts diff --git a/docs_src/utils/index.js b/docs/utils/index.js similarity index 100% rename from docs_src/utils/index.js rename to docs/utils/index.js diff --git a/docs_src/components/code.js.js b/docs_src/components/code.js.js deleted file mode 100644 index 074b054..0000000 --- a/docs_src/components/code.js.js +++ /dev/null @@ -1,12 +0,0 @@ -const highlighter= await globalThis.shiki.getHighlighter({ - theme: "css-variables", - langs: ["js", "ts", "css", "html", "shell"], -}); -const codeBlocks= document.querySelectorAll('code[class*="language-"]'); - -codeBlocks.forEach((block)=> { - const lang= block.className.replace("language-", ""); - block.parentElement.dataset.js= "done"; - const html= highlighter.codeToHtml(block.textContent, { lang }); - block.innerHTML= html; -});