@shgysk8zer0/importmap 1.8.20 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/importmap.cjs CHANGED
@@ -1,192 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
3
+ var importmap = JSON.parse('{\n "imports": {\n "@node/": "/node_modules/",\n "@shgysk8zer0/kazoo/": "https://unpkg.com/@shgysk8zer0/kazoo@1.0.11/",\n "@shgysk8zer0/konami": "https://unpkg.com/@shgysk8zer0/konami@1.1.2/konami.js",\n "@shgysk8zer0/polyfills": "https://unpkg.com/@shgysk8zer0/polyfills@0.6.3/browser.min.js",\n "@shgysk8zer0/polyfills/": "https://unpkg.com/@shgysk8zer0/polyfills@0.6.3/",\n "@shgysk8zer0/jwk-utils": "https://unpkg.com/@shgysk8zer0/jwk-utils@1.1.5/jwk-utils.min.js",\n "@shgysk8zer0/jwk-utils/": "https://unpkg.com/@shgysk8zer0/jwk-utils@1.1.5/",\n "@shgysk8zer0/jswaggersheets": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/swagger.js",\n "@shgysk8zer0/jswaggersheets/": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/",\n "@shgysk8zer0/jss/": "https://unpkg.com/@shgysk8zer0/jss@1.0.1/",\n "@shgysk8zer0/consts/": "https://unpkg.com/@shgysk8zer0/consts@1.0.8/",\n "@shgysk8zer0/http/": "https://unpkg.com/@shgysk8zer0/http@1.0.5/",\n "@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.4/http-status.js",\n "@shgysk8zer0/aes-gcm": "https://unpkg.com/@shgysk8zer0/aes-gcm@1.0.9/aes-gcm.min.js",\n "@shgysk8zer0/aes-gcm/": "https://unpkg.com/@shgysk8zer0/aes-gcm@1.0.9/",\n "@shgysk8zer0/squish": "https://unpkg.com/@shgysk8zer0/squish@1.0.2/squish.min.js",\n "@shgysk8zer0/squish/": "https://unpkg.com/@shgysk8zer0/squish@1.0.2/",\n "@shgysk8zer0/suid": "https://unpkg.com/@shgysk8zer0/suid@1.0.0/suid.min.js",\n "@shgysk8zer0/suid/": "https://unpkg.com/@shgysk8zer0/suid@1.0.0/",\n "@shgysk8zer0/geoutils": "https://unpkg.com/@shgysk8zer0/geoutils@1.0.6/geoutils.min.js",\n "@shgysk8zer0/geoutils/": "https://unpkg.com/@shgysk8zer0/geoutils@1.0.6/",\n "@shgysk8zer0/core-css/": "https://unpkg.com/@shgysk8zer0/core-css@3.0.0/",\n "@shgysk8zer0/signals": "https://unpkg.com/@shgysk8zer0/signals@0.0.3/signals.min.js",\n "@shgysk8zer0/signals/": "https://unpkg.com/@shgysk8zer0/signals@0.0.3/",\n "@aegisjsproject/trusted-types": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/bundle.min.js",\n "@aegisjsproject/trusted-types/": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/",\n "@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.1.6/bundle.min.js",\n "@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.1.6/",\n "@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.2.4/sanitizer.js",\n "@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.2.4/",\n "@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.34/core.js",\n "@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.34/",\n "@aegisjsproject/styles": "https://unpkg.com/@aegisjsproject/styles@0.3.2/styles.js",\n "@aegisjsproject/styles/": "https://unpkg.com/@aegisjsproject/styles@0.3.2/",\n "@aegisjsproject/component": "https://unpkg.com/@aegisjsproject/component@0.1.8/component.js",\n "@aegisjsproject/component/": "https://unpkg.com/@aegisjsproject/component@0.1.8/",\n "@aegisjsproject/markdown": "https://unpkg.com/@aegisjsproject/markdown@0.1.7/markdown.min.js",\n "@aegisjsproject/markdown/": "https://unpkg.com/@aegisjsproject/markdown@0.1.7/",\n "@aegisjsproject/aegis-md": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.4/aegis-md.js",\n "@aegisjsproject/aegis-md/": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.4/",\n "@aegisjsproject/url": "https://unpkg.com/@aegisjsproject/url@1.0.3/url.min.js",\n "@aegisjsproject/url/": "https://unpkg.com/@aegisjsproject/url@1.0.3/",\n "@aegisjsproject/idb/": "https://unpkg.com/@aegisjsproject/idb@1.0.6/",\n "@aegisjsproject/idb": "https://unpkg.com/@aegisjsproject/idb@1.0.6/idb.min.js",\n "@aegisjsproject/otp/": "https://unpkg.com/@aegisjsproject/otp@1.0.2/",\n "@aegisjsproject/otp": "https://unpkg.com/@aegisjsproject/otp@1.0.2/otp.min.js",\n "@aegisjsproject/md-editor": "https://unpkg.com/@aegisjsproject/md-editor@1.0.0/md-editor.js",\n "@aegisjsproject/md-editor/": "https://unpkg.com/@aegisjsproject/md-editor@1.0.0/",\n "@aegisjsproject/barcodescanner": "https://unpkg.com/@aegisjsproject/barcodescanner@1.2.3/scanner.min.js",\n "@aegisjsproject/barcodescanner/": "https://unpkg.com/@aegisjsproject/barcodescanner@1.2.3/",\n "@shgysk8zer0/components/": "https://unpkg.com/@shgysk8zer0/components@0.3.23/",\n "@aegisjsproject/state": "https://unpkg.com/@aegisjsproject/state@1.0.7/state.mjs",\n "@aegisjsproject/state/": "https://unpkg.com/@aegisjsproject/state@1.0.7/",\n "@aegisjsproject/router": "https://unpkg.com/@aegisjsproject/router@1.1.15/router.mjs",\n "@aegisjsproject/router/": "https://unpkg.com/@aegisjsproject/router@1.1.15/",\n "@aegisjsproject/callback-registry": "https://unpkg.com/@aegisjsproject/callback-registry@2.0.4/callbackRegistry.js",\n "@aegisjsproject/callback-registry/": "https://unpkg.com/@aegisjsproject/callback-registry@2.0.4/",\n "@aegisjsproject/attempt": "https://unpkg.com/@aegisjsproject/attempt@1.0.7/attempt.js",\n "@aegisjsproject/attempt/": "https://unpkg.com/@aegisjsproject/attempt@1.0.7/",\n "@aegisjsproject/secret-store": "https://unpkg.com/@aegisjsproject/secret-store@1.1.1/commands.min.js",\n "@aegisjsproject/commands/": "https://unpkg.com/@aegisjsproject/commands@1.0.2/",\n "@aegisjsproject/commands": "https://unpkg.com/@aegisjsproject/commands@1.0.2/commands.min.js",\n "@aegisjsproject/firebase-account-routes": "https://unpkg.com/@aegisjsproject/firebase-account-routes@0.0.6/main.js",\n "@aegisjsproject/firebase-account-routes/": "https://unpkg.com/@aegisjsproject/firebase-account-routes@0.0.6/",\n "@aegisjsproject/secret-store/": "https://unpkg.com/@aegisjsproject/secret-store@1.1.1/",\n "@aegisjsproject/qr-encoder": "https://unpkg.com/@aegisjsproject/qr-encoder@1.0.1/index.min.js",\n "@aegisjsproject/qr-encoder/": "https://unpkg.com/@aegisjsproject/qr-encoder@1.0.1/",\n "@aegisjsproject/escape": "https://unpkg.com/@aegisjsproject/escape@1.0.4/index.min.js",\n "@aegisjsproject/escape/": "https://unpkg.com/@aegisjsproject/escape@1.0.4/",\n "@aegisjsproject/disposable": "https://unpkg.com/@aegisjsproject/disposable@1.0.3/disposable.min.js",\n "@aegisjsproject/disposable/": "https://unpkg.com/@aegisjsproject/disposable@1.0.3/",\n "@aegisjsproject/iota": "https://unpkg.com/@aegisjsproject/iota@1.0.12/iota.min.js",\n "@aegisjsproject/iota/": "https://unpkg.com/@aegisjsproject/iota@1.0.12/",\n "@aegisjsproject/disposable-registry": "https://unpkg.com/@aegisjsproject/disposable-registry@1.0.2/registry.js",\n "@aegisjsproject/disposable-registry/": "https://unpkg.com/@aegisjsproject/disposable-registry@1.0.2/",\n "@aegisjsproject/hermes": "https://unpkg.com/@aegisjsproject/hermes@1.0.2/hermes.js",\n "@aegisjsproject/hermes/": "https://unpkg.com/@aegisjsproject/hermes@1.0.2/",\n "@kernvalley/components/": "https://unpkg.com/@kernvalley/components@2.0.10/",\n "@webcomponents/custom-elements": "https://unpkg.com/@webcomponents/custom-elements@1.6.0/custom-elements.min.js",\n "leaflet": "https://unpkg.com/leaflet@1.9.4/dist/leaflet-src.esm.js",\n "leaflet/": "https://unpkg.com/leaflet@1.9.4/dist/",\n "urlpattern-polyfill": "https://unpkg.com/urlpattern-polyfill@10.1.0/index.js",\n "highlight.js": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/core.min.js",\n "highlight.js/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/",\n "highlight.js/styles/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/styles/",\n "@highlightjs/cdn-assets": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/core.min.js",\n "@highlightjs/cdn-assets/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/",\n "@highlightjs/cdn-assets/styles/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/styles/",\n "marked": "https://unpkg.com/marked@18.0.0/lib/marked.esm.js",\n "marked-highlight": "https://unpkg.com/marked-highlight@2.2.4/src/index.js",\n "yaml": "https://unpkg.com/yaml@2.8.3/browser/dist/index.js",\n "yaml/": "https://unpkg.com/yaml@2.8.3/browser/dist/",\n "firebase/": "https://www.gstatic.com/firebasejs/10.12.1/",\n "firebase/app": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app.js",\n "firebase/app-check": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app-check.js",\n "firebase/auth": "https://www.gstatic.com/firebasejs/10.12.1/firebase-auth.js",\n "firebase/database": "https://www.gstatic.com/firebasejs/10.12.1/firebase-database.js",\n "firebase/firestore": "https://www.gstatic.com/firebasejs/10.12.1/firebase-firestore.js",\n "firebase/functions": "https://www.gstatic.com/firebasejs/10.12.1/firebase-functions.js",\n "firebase/messaging": "https://www.gstatic.com/firebasejs/10.12.1/firebase-messaging.js",\n "firebase/performance": "https://www.gstatic.com/firebasejs/10.12.1/firebase-performance.js",\n "firebase/remote-config": "https://www.gstatic.com/firebasejs/10.12.1/firebase-remote-config.js",\n "firebase/storage": "https://www.gstatic.com/firebasejs/10.12.1/firebase-storage.js",\n "firebase/analytics": "https://www.gstatic.com/firebasejs/10.12.1/firebase-analytics.js",\n "qr": "https://unpkg.com/qr@0.5.5/index.js",\n "qr/": "https://unpkg.com/qr@0.5.5/",\n "lit": "https://unpkg.com/lit@3.3.2/index.js",\n "lit/": "https://unpkg.com/lit@3.3.2/",\n "lit-html": "https://unpkg.com/lit-html@3.3.2/lit-html.js",\n "lit-html/": "https://unpkg.com/lit-html@3.3.2/",\n "lit-element": "https://unpkg.com/lit-element@4.2.2/lit-element.js",\n "lit-element/": "https://unpkg.com/lit-element@4.2.2/",\n "@lit/reactive-element": "https://unpkg.com/@lit/reactive-element@2.1.2/reactive-element.js",\n "@lit/reactive-element/": "https://unpkg.com/@lit/reactive-element@2.1.2/",\n "@awesome.me/webawesome/": "https://unpkg.com/@awesome.me/webawesome@3.5.0/",\n "normalize.css": "https://unpkg.com/normalize.css@8.0.1/normalize.css"\n },\n "scopes": {}\n}');
4
4
 
5
- var node_path = require('node:path');
6
- var promises = require('node:fs/promises');
7
- require('@shgysk8zer0/polyfills');
8
-
9
- var json = JSON.parse('{\n "imports": {\n "@node/": "/node_modules/",\n "@shgysk8zer0/kazoo/": "https://unpkg.com/@shgysk8zer0/kazoo@1.0.11/",\n "@shgysk8zer0/konami": "https://unpkg.com/@shgysk8zer0/konami@1.1.2/konami.js",\n "@shgysk8zer0/polyfills": "https://unpkg.com/@shgysk8zer0/polyfills@0.6.3/browser.min.js",\n "@shgysk8zer0/polyfills/": "https://unpkg.com/@shgysk8zer0/polyfills@0.6.3/",\n "@shgysk8zer0/jwk-utils": "https://unpkg.com/@shgysk8zer0/jwk-utils@1.1.5/jwk-utils.min.js",\n "@shgysk8zer0/jwk-utils/": "https://unpkg.com/@shgysk8zer0/jwk-utils@1.1.5/",\n "@shgysk8zer0/jswaggersheets": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/swagger.js",\n "@shgysk8zer0/jswaggersheets/": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/",\n "@shgysk8zer0/jss/": "https://unpkg.com/@shgysk8zer0/jss@1.0.1/",\n "@shgysk8zer0/consts/": "https://unpkg.com/@shgysk8zer0/consts@1.0.8/",\n "@shgysk8zer0/http/": "https://unpkg.com/@shgysk8zer0/http@1.0.5/",\n "@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.4/http-status.js",\n "@shgysk8zer0/aes-gcm": "https://unpkg.com/@shgysk8zer0/aes-gcm@1.0.9/aes-gcm.min.js",\n "@shgysk8zer0/aes-gcm/": "https://unpkg.com/@shgysk8zer0/aes-gcm@1.0.9/",\n "@shgysk8zer0/squish": "https://unpkg.com/@shgysk8zer0/squish@1.0.2/squish.min.js",\n "@shgysk8zer0/squish/": "https://unpkg.com/@shgysk8zer0/squish@1.0.2/",\n "@shgysk8zer0/suid": "https://unpkg.com/@shgysk8zer0/suid@1.0.0/suid.min.js",\n "@shgysk8zer0/suid/": "https://unpkg.com/@shgysk8zer0/suid@1.0.0/",\n "@shgysk8zer0/geoutils": "https://unpkg.com/@shgysk8zer0/geoutils@1.0.6/geoutils.min.js",\n "@shgysk8zer0/geoutils/": "https://unpkg.com/@shgysk8zer0/geoutils@1.0.6/",\n "@shgysk8zer0/core-css/": "https://unpkg.com/@shgysk8zer0/core-css@3.0.0/",\n "@shgysk8zer0/signals": "https://unpkg.com/@shgysk8zer0/signals@0.0.3/signals.min.js",\n "@shgysk8zer0/signals/": "https://unpkg.com/@shgysk8zer0/signals@0.0.3/",\n "@aegisjsproject/trusted-types": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/bundle.min.js",\n "@aegisjsproject/trusted-types/": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/",\n "@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.1.6/bundle.min.js",\n "@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.1.6/",\n "@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.2.4/sanitizer.js",\n "@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.2.4/",\n "@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.34/core.js",\n "@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.34/",\n "@aegisjsproject/styles": "https://unpkg.com/@aegisjsproject/styles@0.3.2/styles.js",\n "@aegisjsproject/styles/": "https://unpkg.com/@aegisjsproject/styles@0.3.2/",\n "@aegisjsproject/component": "https://unpkg.com/@aegisjsproject/component@0.1.8/component.js",\n "@aegisjsproject/component/": "https://unpkg.com/@aegisjsproject/component@0.1.8/",\n "@aegisjsproject/markdown": "https://unpkg.com/@aegisjsproject/markdown@0.1.7/markdown.min.js",\n "@aegisjsproject/markdown/": "https://unpkg.com/@aegisjsproject/markdown@0.1.7/",\n "@aegisjsproject/aegis-md": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.4/aegis-md.js",\n "@aegisjsproject/aegis-md/": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.4/",\n "@aegisjsproject/url": "https://unpkg.com/@aegisjsproject/url@1.0.3/url.min.js",\n "@aegisjsproject/url/": "https://unpkg.com/@aegisjsproject/url@1.0.3/",\n "@aegisjsproject/idb/": "https://unpkg.com/@aegisjsproject/idb@1.0.6/",\n "@aegisjsproject/idb": "https://unpkg.com/@aegisjsproject/idb@1.0.6/idb.min.js",\n "@aegisjsproject/otp/": "https://unpkg.com/@aegisjsproject/otp@1.0.2/",\n "@aegisjsproject/otp": "https://unpkg.com/@aegisjsproject/otp@1.0.2/otp.min.js",\n "@aegisjsproject/md-editor": "https://unpkg.com/@aegisjsproject/md-editor@1.0.0/md-editor.js",\n "@aegisjsproject/md-editor/": "https://unpkg.com/@aegisjsproject/md-editor@1.0.0/",\n "@aegisjsproject/barcodescanner": "https://unpkg.com/@aegisjsproject/barcodescanner@1.2.3/scanner.min.js",\n "@aegisjsproject/barcodescanner/": "https://unpkg.com/@aegisjsproject/barcodescanner@1.2.3/",\n "@shgysk8zer0/components/": "https://unpkg.com/@shgysk8zer0/components@0.3.23/",\n "@aegisjsproject/state": "https://unpkg.com/@aegisjsproject/state@1.0.7/state.mjs",\n "@aegisjsproject/state/": "https://unpkg.com/@aegisjsproject/state@1.0.7/",\n "@aegisjsproject/router": "https://unpkg.com/@aegisjsproject/router@1.1.15/router.mjs",\n "@aegisjsproject/router/": "https://unpkg.com/@aegisjsproject/router@1.1.15/",\n "@aegisjsproject/callback-registry": "https://unpkg.com/@aegisjsproject/callback-registry@2.0.4/callbackRegistry.js",\n "@aegisjsproject/callback-registry/": "https://unpkg.com/@aegisjsproject/callback-registry@2.0.4/",\n "@aegisjsproject/attempt": "https://unpkg.com/@aegisjsproject/attempt@1.0.7/attempt.js",\n "@aegisjsproject/attempt/": "https://unpkg.com/@aegisjsproject/attempt@1.0.7/",\n "@aegisjsproject/secret-store": "https://unpkg.com/@aegisjsproject/secret-store@1.1.1/commands.min.js",\n "@aegisjsproject/commands/": "https://unpkg.com/@aegisjsproject/commands@1.0.2/",\n "@aegisjsproject/commands": "https://unpkg.com/@aegisjsproject/commands@1.0.2/commands.min.js",\n "@aegisjsproject/firebase-account-routes": "https://unpkg.com/@aegisjsproject/firebase-account-routes@0.0.6/main.js",\n "@aegisjsproject/firebase-account-routes/": "https://unpkg.com/@aegisjsproject/firebase-account-routes@0.0.6/",\n "@aegisjsproject/secret-store/": "https://unpkg.com/@aegisjsproject/secret-store@1.1.1/",\n "@aegisjsproject/qr-encoder": "https://unpkg.com/@aegisjsproject/qr-encoder@1.0.1/index.min.js",\n "@aegisjsproject/qr-encoder/": "https://unpkg.com/@aegisjsproject/qr-encoder@1.0.1/",\n "@aegisjsproject/escape": "https://unpkg.com/@aegisjsproject/escape@1.0.4/index.min.js",\n "@aegisjsproject/escape/": "https://unpkg.com/@aegisjsproject/escape@1.0.4/",\n "@aegisjsproject/disposable": "https://unpkg.com/@aegisjsproject/disposable@1.0.3/disposable.min.js",\n "@aegisjsproject/disposable/": "https://unpkg.com/@aegisjsproject/disposable@1.0.3/",\n "@aegisjsproject/iota": "https://unpkg.com/@aegisjsproject/iota@1.0.12/iota.min.js",\n "@aegisjsproject/iota/": "https://unpkg.com/@aegisjsproject/iota@1.0.12/",\n "@aegisjsproject/disposable-registry": "https://unpkg.com/@aegisjsproject/disposable-registry@1.0.2/registry.js",\n "@aegisjsproject/disposable-registry/": "https://unpkg.com/@aegisjsproject/disposable-registry@1.0.2/",\n "@aegisjsproject/hermes": "https://unpkg.com/@aegisjsproject/hermes@1.0.2/hermes.js",\n "@aegisjsproject/hermes/": "https://unpkg.com/@aegisjsproject/hermes@1.0.2/",\n "@kernvalley/components/": "https://unpkg.com/@kernvalley/components@2.0.10/",\n "@webcomponents/custom-elements": "https://unpkg.com/@webcomponents/custom-elements@1.6.0/custom-elements.min.js",\n "leaflet": "https://unpkg.com/leaflet@1.9.4/dist/leaflet-src.esm.js",\n "leaflet/": "https://unpkg.com/leaflet@1.9.4/dist/",\n "urlpattern-polyfill": "https://unpkg.com/urlpattern-polyfill@10.1.0/index.js",\n "highlight.js": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/core.min.js",\n "highlight.js/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/",\n "highlight.js/styles/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/styles/",\n "@highlightjs/cdn-assets": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/core.min.js",\n "@highlightjs/cdn-assets/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/",\n "@highlightjs/cdn-assets/styles/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/styles/",\n "marked": "https://unpkg.com/marked@18.0.0/lib/marked.esm.js",\n "marked-highlight": "https://unpkg.com/marked-highlight@2.2.4/src/index.js",\n "yaml": "https://unpkg.com/yaml@2.8.3/browser/dist/index.js",\n "yaml/": "https://unpkg.com/yaml@2.8.3/browser/dist/",\n "firebase/": "https://www.gstatic.com/firebasejs/10.12.1/",\n "firebase/app": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app.js",\n "firebase/app-check": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app-check.js",\n "firebase/auth": "https://www.gstatic.com/firebasejs/10.12.1/firebase-auth.js",\n "firebase/database": "https://www.gstatic.com/firebasejs/10.12.1/firebase-database.js",\n "firebase/firestore": "https://www.gstatic.com/firebasejs/10.12.1/firebase-firestore.js",\n "firebase/functions": "https://www.gstatic.com/firebasejs/10.12.1/firebase-functions.js",\n "firebase/messaging": "https://www.gstatic.com/firebasejs/10.12.1/firebase-messaging.js",\n "firebase/performance": "https://www.gstatic.com/firebasejs/10.12.1/firebase-performance.js",\n "firebase/remote-config": "https://www.gstatic.com/firebasejs/10.12.1/firebase-remote-config.js",\n "firebase/storage": "https://www.gstatic.com/firebasejs/10.12.1/firebase-storage.js",\n "firebase/analytics": "https://www.gstatic.com/firebasejs/10.12.1/firebase-analytics.js",\n "qr": "https://unpkg.com/qr@0.5.5/index.js",\n "qr/": "https://unpkg.com/qr@0.5.5/",\n "lit": "https://unpkg.com/lit@3.3.2/index.js",\n "lit/": "https://unpkg.com/lit@3.3.2/",\n "lit-html": "https://unpkg.com/lit-html@3.3.2/lit-html.js",\n "lit-html/": "https://unpkg.com/lit-html@3.3.2/",\n "lit-element": "https://unpkg.com/lit-element@4.2.2/lit-element.js",\n "lit-element/": "https://unpkg.com/lit-element@4.2.2/",\n "@lit/reactive-element": "https://unpkg.com/@lit/reactive-element@2.1.2/reactive-element.js",\n "@lit/reactive-element/": "https://unpkg.com/@lit/reactive-element@2.1.2/",\n "@awesome.me/webawesome/": "https://unpkg.com/@awesome.me/webawesome@3.5.0/",\n "normalize.css": "https://unpkg.com/normalize.css@8.0.1/normalize.css"\n },\n "scopes": {}\n}');
10
-
11
- const SHA256 = 'SHA-256';
12
- const SHA384 = 'SHA-384';
13
- const SHA512 = 'SHA-512';
14
- const DEFAULT_ALGO = SHA384;
15
-
16
- const BASE64 = 'base64';
17
-
18
- const { imports, scopes } = json;
19
-
20
- class Importmap {
21
- #imports = {};
22
- #scopes = {};
23
- #base;
24
-
25
- constructor({ imports: i = imports, scopes: s = scopes } = {}) {
26
- this.#imports = i;
27
- this.#scopes = s;
28
- }
29
-
30
- get imports() {
31
- return structuredClone(this.#imports);
32
- }
33
-
34
- get scopes() {
35
- return structuredClone(this.#scopes);
36
- }
37
-
38
- delete(key) {
39
- return Reflect.deleteProperty(this.#imports, key);
40
- }
41
-
42
- get(key) {
43
- return Reflect.get(this.#imports, key);
44
- }
45
-
46
- has(key) {
47
- return Reflect.has(this.#imports, key);
48
- }
49
-
50
- set(key, newValue) {
51
- return Reflect.set(this.#imports, key, newValue);
52
- }
53
-
54
- toJSON() {
55
- return { imports: this.#imports, scopes: this.#scopes };
56
- }
57
-
58
- toString() {
59
- return JSON.stringify(this);
60
- }
61
-
62
- get baseUrl() {
63
- return this.#base;
64
- }
65
-
66
- set baseUrl(val) {
67
- if (typeof val === 'string' && URL.canParse(val)) {
68
- this.#base = val;
69
- }
70
- }
71
-
72
- resolve(specifier, base = this.baseUrl) {
73
- if (specifier instanceof URL) {
74
- return specifier.href;
75
- } else if (typeof specifier !== 'string') {
76
- return null;
77
- } else if (this.has(specifier)) {
78
- return URL.parse(this.get(specifier), this.baseUrl)?.href ?? null;
79
- } else if (URL.canParse(specifier)) {
80
- return specifier;
81
- } else if (! specifier.startsWith('.')) {
82
- // Find the longest match
83
- const matches = Object.keys(this.imports)
84
- .filter(key => key.endsWith('/') && specifier.startsWith(key))
85
- .sort((a, b) => b.length - a.length);
86
-
87
- if (matches.length === 0) {
88
- return null;
89
- } else {
90
- const match = matches[0];
91
- const target = imports[match];
92
- const subpath = specifier.slice(match.length);
93
- // Resolve the mapping target against the map's base, then the subpath against that
94
- const resolvedTarget = new URL(target, this.baseUrl);
95
- return new URL(subpath, resolvedTarget).href;
96
- }
97
- } else if (typeof base === 'string') {
98
- return URL.parse(specifier, base)?.href ?? null;
99
- } else {
100
- return null;
101
- }
102
- }
103
-
104
- async importLocalPackage(name = 'package.json', { signal } = {}) {
105
- const path = node_path.join(process.cwd(), name);
106
- const pkg = await promises.readFile(path, { encoding: 'utf8', signal });
107
-
108
- return this.setLocalPackage(JSON.parse(pkg));
109
- }
110
-
111
- setLocalPackage({ name, module, exports = {} }) {
112
- if (typeof name !== 'string') {
113
- return false;
114
- } else if (typeof exports === 'string' ) {
115
- this.set(name, exports);
116
- return true;
117
- } else if (typeof exports === 'object') {
118
- Object.entries(exports).forEach(([key, value]) => {
119
- if (key.startsWith('.')) {
120
- const importKey = key === '.' ? name : `${name}${key.substring(1)}`;
121
- const resolved = typeof value === 'string' ? value : value.import ?? value.default;
122
-
123
- if (typeof resolved === 'string' && resolved.startsWith('./')) {
124
- if (importKey.includes('*') && resolved.includes('*')) {
125
- const [prefix, suffix] = importKey.split('*');
126
-
127
- if (resolved.endsWith('*' + suffix)) {
128
- this.set(prefix, resolved.substring(1).replace('*' + suffix, ''));
129
- }
130
- } else {
131
- this.set(importKey, resolved.substring(1));
132
- }
133
- }
134
- }
135
- });
136
-
137
- return true;
138
- } else if (typeof module === 'string') {
139
- this.set(name, module);
140
- return true;
141
- } else {
142
- this.set(name, '/');
143
- return true;
144
- }
145
- }
146
-
147
- async getScript({ algo = DEFAULT_ALGO, alphabet = BASE64, signal } = {}) {
148
- const integrity = await this.getIntegrity({ algo, alphabet, signal });
149
-
150
- return `<script type="importmap" integrity="${integrity}">${JSON.stringify(this)}</script>`;
151
- }
152
-
153
- async getIntegrity({ algo = DEFAULT_ALGO, alphabet = BASE64, signal } = {}) {
154
- if (signal instanceof AbortSignal && signal.aborted) {
155
- throw signal.reason;
156
- } else {
157
- const prefix = algo.toLowerCase().replace('-', '') + '-';
158
- const encoded = new TextEncoder().encode(this);
159
- const hash = await crypto.subtle.digest(algo, encoded);
160
-
161
- return prefix + new Uint8Array(hash).toBase64({ alphabet });
162
- }
163
- }
164
-
165
- static get SHA256() {
166
- return SHA256;
167
- }
168
-
169
- static get SHA384() {
170
- return SHA384;
171
- }
172
-
173
- static get SHA512() {
174
- return SHA512;
175
- }
176
-
177
- static async importFromFile(path = 'importmap.json', { signal } = {}) {
178
- const fullPath = node_path.join(process.cwd(), path);
179
- const importmap = await promises.readFile(fullPath, { encoding: 'utf8', signal });
180
-
181
- return new Importmap(JSON.parse(importmap));
182
- }
183
- }
184
-
185
- const importmap = new Importmap({ imports, scopes });
186
- var importmap$1 = { imports, scopes };
187
-
188
- exports.Importmap = Importmap;
189
- exports.default = importmap$1;
190
- exports.importmap = importmap;
191
- exports.imports = imports;
192
- exports.scopes = scopes;
5
+ module.exports = importmap;
package/importmap.js CHANGED
@@ -1,184 +1,3 @@
1
- import { join } from 'node:path';
2
- import { readFile } from 'node:fs/promises';
3
- import '@shgysk8zer0/polyfills';
1
+ var importmap = JSON.parse('{\n "imports": {\n "@node/": "/node_modules/",\n "@shgysk8zer0/kazoo/": "https://unpkg.com/@shgysk8zer0/kazoo@1.0.11/",\n "@shgysk8zer0/konami": "https://unpkg.com/@shgysk8zer0/konami@1.1.2/konami.js",\n "@shgysk8zer0/polyfills": "https://unpkg.com/@shgysk8zer0/polyfills@0.6.3/browser.min.js",\n "@shgysk8zer0/polyfills/": "https://unpkg.com/@shgysk8zer0/polyfills@0.6.3/",\n "@shgysk8zer0/jwk-utils": "https://unpkg.com/@shgysk8zer0/jwk-utils@1.1.5/jwk-utils.min.js",\n "@shgysk8zer0/jwk-utils/": "https://unpkg.com/@shgysk8zer0/jwk-utils@1.1.5/",\n "@shgysk8zer0/jswaggersheets": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/swagger.js",\n "@shgysk8zer0/jswaggersheets/": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/",\n "@shgysk8zer0/jss/": "https://unpkg.com/@shgysk8zer0/jss@1.0.1/",\n "@shgysk8zer0/consts/": "https://unpkg.com/@shgysk8zer0/consts@1.0.8/",\n "@shgysk8zer0/http/": "https://unpkg.com/@shgysk8zer0/http@1.0.5/",\n "@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.4/http-status.js",\n "@shgysk8zer0/aes-gcm": "https://unpkg.com/@shgysk8zer0/aes-gcm@1.0.9/aes-gcm.min.js",\n "@shgysk8zer0/aes-gcm/": "https://unpkg.com/@shgysk8zer0/aes-gcm@1.0.9/",\n "@shgysk8zer0/squish": "https://unpkg.com/@shgysk8zer0/squish@1.0.2/squish.min.js",\n "@shgysk8zer0/squish/": "https://unpkg.com/@shgysk8zer0/squish@1.0.2/",\n "@shgysk8zer0/suid": "https://unpkg.com/@shgysk8zer0/suid@1.0.0/suid.min.js",\n "@shgysk8zer0/suid/": "https://unpkg.com/@shgysk8zer0/suid@1.0.0/",\n "@shgysk8zer0/geoutils": "https://unpkg.com/@shgysk8zer0/geoutils@1.0.6/geoutils.min.js",\n "@shgysk8zer0/geoutils/": "https://unpkg.com/@shgysk8zer0/geoutils@1.0.6/",\n "@shgysk8zer0/core-css/": "https://unpkg.com/@shgysk8zer0/core-css@3.0.0/",\n "@shgysk8zer0/signals": "https://unpkg.com/@shgysk8zer0/signals@0.0.3/signals.min.js",\n "@shgysk8zer0/signals/": "https://unpkg.com/@shgysk8zer0/signals@0.0.3/",\n "@aegisjsproject/trusted-types": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/bundle.min.js",\n "@aegisjsproject/trusted-types/": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/",\n "@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.1.6/bundle.min.js",\n "@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.1.6/",\n "@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.2.4/sanitizer.js",\n "@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.2.4/",\n "@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.34/core.js",\n "@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.34/",\n "@aegisjsproject/styles": "https://unpkg.com/@aegisjsproject/styles@0.3.2/styles.js",\n "@aegisjsproject/styles/": "https://unpkg.com/@aegisjsproject/styles@0.3.2/",\n "@aegisjsproject/component": "https://unpkg.com/@aegisjsproject/component@0.1.8/component.js",\n "@aegisjsproject/component/": "https://unpkg.com/@aegisjsproject/component@0.1.8/",\n "@aegisjsproject/markdown": "https://unpkg.com/@aegisjsproject/markdown@0.1.7/markdown.min.js",\n "@aegisjsproject/markdown/": "https://unpkg.com/@aegisjsproject/markdown@0.1.7/",\n "@aegisjsproject/aegis-md": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.4/aegis-md.js",\n "@aegisjsproject/aegis-md/": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.4/",\n "@aegisjsproject/url": "https://unpkg.com/@aegisjsproject/url@1.0.3/url.min.js",\n "@aegisjsproject/url/": "https://unpkg.com/@aegisjsproject/url@1.0.3/",\n "@aegisjsproject/idb/": "https://unpkg.com/@aegisjsproject/idb@1.0.6/",\n "@aegisjsproject/idb": "https://unpkg.com/@aegisjsproject/idb@1.0.6/idb.min.js",\n "@aegisjsproject/otp/": "https://unpkg.com/@aegisjsproject/otp@1.0.2/",\n "@aegisjsproject/otp": "https://unpkg.com/@aegisjsproject/otp@1.0.2/otp.min.js",\n "@aegisjsproject/md-editor": "https://unpkg.com/@aegisjsproject/md-editor@1.0.0/md-editor.js",\n "@aegisjsproject/md-editor/": "https://unpkg.com/@aegisjsproject/md-editor@1.0.0/",\n "@aegisjsproject/barcodescanner": "https://unpkg.com/@aegisjsproject/barcodescanner@1.2.3/scanner.min.js",\n "@aegisjsproject/barcodescanner/": "https://unpkg.com/@aegisjsproject/barcodescanner@1.2.3/",\n "@shgysk8zer0/components/": "https://unpkg.com/@shgysk8zer0/components@0.3.23/",\n "@aegisjsproject/state": "https://unpkg.com/@aegisjsproject/state@1.0.7/state.mjs",\n "@aegisjsproject/state/": "https://unpkg.com/@aegisjsproject/state@1.0.7/",\n "@aegisjsproject/router": "https://unpkg.com/@aegisjsproject/router@1.1.15/router.mjs",\n "@aegisjsproject/router/": "https://unpkg.com/@aegisjsproject/router@1.1.15/",\n "@aegisjsproject/callback-registry": "https://unpkg.com/@aegisjsproject/callback-registry@2.0.4/callbackRegistry.js",\n "@aegisjsproject/callback-registry/": "https://unpkg.com/@aegisjsproject/callback-registry@2.0.4/",\n "@aegisjsproject/attempt": "https://unpkg.com/@aegisjsproject/attempt@1.0.7/attempt.js",\n "@aegisjsproject/attempt/": "https://unpkg.com/@aegisjsproject/attempt@1.0.7/",\n "@aegisjsproject/secret-store": "https://unpkg.com/@aegisjsproject/secret-store@1.1.1/commands.min.js",\n "@aegisjsproject/commands/": "https://unpkg.com/@aegisjsproject/commands@1.0.2/",\n "@aegisjsproject/commands": "https://unpkg.com/@aegisjsproject/commands@1.0.2/commands.min.js",\n "@aegisjsproject/firebase-account-routes": "https://unpkg.com/@aegisjsproject/firebase-account-routes@0.0.6/main.js",\n "@aegisjsproject/firebase-account-routes/": "https://unpkg.com/@aegisjsproject/firebase-account-routes@0.0.6/",\n "@aegisjsproject/secret-store/": "https://unpkg.com/@aegisjsproject/secret-store@1.1.1/",\n "@aegisjsproject/qr-encoder": "https://unpkg.com/@aegisjsproject/qr-encoder@1.0.1/index.min.js",\n "@aegisjsproject/qr-encoder/": "https://unpkg.com/@aegisjsproject/qr-encoder@1.0.1/",\n "@aegisjsproject/escape": "https://unpkg.com/@aegisjsproject/escape@1.0.4/index.min.js",\n "@aegisjsproject/escape/": "https://unpkg.com/@aegisjsproject/escape@1.0.4/",\n "@aegisjsproject/disposable": "https://unpkg.com/@aegisjsproject/disposable@1.0.3/disposable.min.js",\n "@aegisjsproject/disposable/": "https://unpkg.com/@aegisjsproject/disposable@1.0.3/",\n "@aegisjsproject/iota": "https://unpkg.com/@aegisjsproject/iota@1.0.12/iota.min.js",\n "@aegisjsproject/iota/": "https://unpkg.com/@aegisjsproject/iota@1.0.12/",\n "@aegisjsproject/disposable-registry": "https://unpkg.com/@aegisjsproject/disposable-registry@1.0.2/registry.js",\n "@aegisjsproject/disposable-registry/": "https://unpkg.com/@aegisjsproject/disposable-registry@1.0.2/",\n "@aegisjsproject/hermes": "https://unpkg.com/@aegisjsproject/hermes@1.0.2/hermes.js",\n "@aegisjsproject/hermes/": "https://unpkg.com/@aegisjsproject/hermes@1.0.2/",\n "@kernvalley/components/": "https://unpkg.com/@kernvalley/components@2.0.10/",\n "@webcomponents/custom-elements": "https://unpkg.com/@webcomponents/custom-elements@1.6.0/custom-elements.min.js",\n "leaflet": "https://unpkg.com/leaflet@1.9.4/dist/leaflet-src.esm.js",\n "leaflet/": "https://unpkg.com/leaflet@1.9.4/dist/",\n "urlpattern-polyfill": "https://unpkg.com/urlpattern-polyfill@10.1.0/index.js",\n "highlight.js": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/core.min.js",\n "highlight.js/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/",\n "highlight.js/styles/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/styles/",\n "@highlightjs/cdn-assets": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/core.min.js",\n "@highlightjs/cdn-assets/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/",\n "@highlightjs/cdn-assets/styles/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/styles/",\n "marked": "https://unpkg.com/marked@18.0.0/lib/marked.esm.js",\n "marked-highlight": "https://unpkg.com/marked-highlight@2.2.4/src/index.js",\n "yaml": "https://unpkg.com/yaml@2.8.3/browser/dist/index.js",\n "yaml/": "https://unpkg.com/yaml@2.8.3/browser/dist/",\n "firebase/": "https://www.gstatic.com/firebasejs/10.12.1/",\n "firebase/app": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app.js",\n "firebase/app-check": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app-check.js",\n "firebase/auth": "https://www.gstatic.com/firebasejs/10.12.1/firebase-auth.js",\n "firebase/database": "https://www.gstatic.com/firebasejs/10.12.1/firebase-database.js",\n "firebase/firestore": "https://www.gstatic.com/firebasejs/10.12.1/firebase-firestore.js",\n "firebase/functions": "https://www.gstatic.com/firebasejs/10.12.1/firebase-functions.js",\n "firebase/messaging": "https://www.gstatic.com/firebasejs/10.12.1/firebase-messaging.js",\n "firebase/performance": "https://www.gstatic.com/firebasejs/10.12.1/firebase-performance.js",\n "firebase/remote-config": "https://www.gstatic.com/firebasejs/10.12.1/firebase-remote-config.js",\n "firebase/storage": "https://www.gstatic.com/firebasejs/10.12.1/firebase-storage.js",\n "firebase/analytics": "https://www.gstatic.com/firebasejs/10.12.1/firebase-analytics.js",\n "qr": "https://unpkg.com/qr@0.5.5/index.js",\n "qr/": "https://unpkg.com/qr@0.5.5/",\n "lit": "https://unpkg.com/lit@3.3.2/index.js",\n "lit/": "https://unpkg.com/lit@3.3.2/",\n "lit-html": "https://unpkg.com/lit-html@3.3.2/lit-html.js",\n "lit-html/": "https://unpkg.com/lit-html@3.3.2/",\n "lit-element": "https://unpkg.com/lit-element@4.2.2/lit-element.js",\n "lit-element/": "https://unpkg.com/lit-element@4.2.2/",\n "@lit/reactive-element": "https://unpkg.com/@lit/reactive-element@2.1.2/reactive-element.js",\n "@lit/reactive-element/": "https://unpkg.com/@lit/reactive-element@2.1.2/",\n "@awesome.me/webawesome/": "https://unpkg.com/@awesome.me/webawesome@3.5.0/",\n "normalize.css": "https://unpkg.com/normalize.css@8.0.1/normalize.css"\n },\n "scopes": {}\n}');
4
2
 
5
- var json = JSON.parse('{\n "imports": {\n "@node/": "/node_modules/",\n "@shgysk8zer0/kazoo/": "https://unpkg.com/@shgysk8zer0/kazoo@1.0.11/",\n "@shgysk8zer0/konami": "https://unpkg.com/@shgysk8zer0/konami@1.1.2/konami.js",\n "@shgysk8zer0/polyfills": "https://unpkg.com/@shgysk8zer0/polyfills@0.6.3/browser.min.js",\n "@shgysk8zer0/polyfills/": "https://unpkg.com/@shgysk8zer0/polyfills@0.6.3/",\n "@shgysk8zer0/jwk-utils": "https://unpkg.com/@shgysk8zer0/jwk-utils@1.1.5/jwk-utils.min.js",\n "@shgysk8zer0/jwk-utils/": "https://unpkg.com/@shgysk8zer0/jwk-utils@1.1.5/",\n "@shgysk8zer0/jswaggersheets": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/swagger.js",\n "@shgysk8zer0/jswaggersheets/": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/",\n "@shgysk8zer0/jss/": "https://unpkg.com/@shgysk8zer0/jss@1.0.1/",\n "@shgysk8zer0/consts/": "https://unpkg.com/@shgysk8zer0/consts@1.0.8/",\n "@shgysk8zer0/http/": "https://unpkg.com/@shgysk8zer0/http@1.0.5/",\n "@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.4/http-status.js",\n "@shgysk8zer0/aes-gcm": "https://unpkg.com/@shgysk8zer0/aes-gcm@1.0.9/aes-gcm.min.js",\n "@shgysk8zer0/aes-gcm/": "https://unpkg.com/@shgysk8zer0/aes-gcm@1.0.9/",\n "@shgysk8zer0/squish": "https://unpkg.com/@shgysk8zer0/squish@1.0.2/squish.min.js",\n "@shgysk8zer0/squish/": "https://unpkg.com/@shgysk8zer0/squish@1.0.2/",\n "@shgysk8zer0/suid": "https://unpkg.com/@shgysk8zer0/suid@1.0.0/suid.min.js",\n "@shgysk8zer0/suid/": "https://unpkg.com/@shgysk8zer0/suid@1.0.0/",\n "@shgysk8zer0/geoutils": "https://unpkg.com/@shgysk8zer0/geoutils@1.0.6/geoutils.min.js",\n "@shgysk8zer0/geoutils/": "https://unpkg.com/@shgysk8zer0/geoutils@1.0.6/",\n "@shgysk8zer0/core-css/": "https://unpkg.com/@shgysk8zer0/core-css@3.0.0/",\n "@shgysk8zer0/signals": "https://unpkg.com/@shgysk8zer0/signals@0.0.3/signals.min.js",\n "@shgysk8zer0/signals/": "https://unpkg.com/@shgysk8zer0/signals@0.0.3/",\n "@aegisjsproject/trusted-types": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/bundle.min.js",\n "@aegisjsproject/trusted-types/": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/",\n "@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.1.6/bundle.min.js",\n "@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.1.6/",\n "@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.2.4/sanitizer.js",\n "@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.2.4/",\n "@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.34/core.js",\n "@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.34/",\n "@aegisjsproject/styles": "https://unpkg.com/@aegisjsproject/styles@0.3.2/styles.js",\n "@aegisjsproject/styles/": "https://unpkg.com/@aegisjsproject/styles@0.3.2/",\n "@aegisjsproject/component": "https://unpkg.com/@aegisjsproject/component@0.1.8/component.js",\n "@aegisjsproject/component/": "https://unpkg.com/@aegisjsproject/component@0.1.8/",\n "@aegisjsproject/markdown": "https://unpkg.com/@aegisjsproject/markdown@0.1.7/markdown.min.js",\n "@aegisjsproject/markdown/": "https://unpkg.com/@aegisjsproject/markdown@0.1.7/",\n "@aegisjsproject/aegis-md": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.4/aegis-md.js",\n "@aegisjsproject/aegis-md/": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.4/",\n "@aegisjsproject/url": "https://unpkg.com/@aegisjsproject/url@1.0.3/url.min.js",\n "@aegisjsproject/url/": "https://unpkg.com/@aegisjsproject/url@1.0.3/",\n "@aegisjsproject/idb/": "https://unpkg.com/@aegisjsproject/idb@1.0.6/",\n "@aegisjsproject/idb": "https://unpkg.com/@aegisjsproject/idb@1.0.6/idb.min.js",\n "@aegisjsproject/otp/": "https://unpkg.com/@aegisjsproject/otp@1.0.2/",\n "@aegisjsproject/otp": "https://unpkg.com/@aegisjsproject/otp@1.0.2/otp.min.js",\n "@aegisjsproject/md-editor": "https://unpkg.com/@aegisjsproject/md-editor@1.0.0/md-editor.js",\n "@aegisjsproject/md-editor/": "https://unpkg.com/@aegisjsproject/md-editor@1.0.0/",\n "@aegisjsproject/barcodescanner": "https://unpkg.com/@aegisjsproject/barcodescanner@1.2.3/scanner.min.js",\n "@aegisjsproject/barcodescanner/": "https://unpkg.com/@aegisjsproject/barcodescanner@1.2.3/",\n "@shgysk8zer0/components/": "https://unpkg.com/@shgysk8zer0/components@0.3.23/",\n "@aegisjsproject/state": "https://unpkg.com/@aegisjsproject/state@1.0.7/state.mjs",\n "@aegisjsproject/state/": "https://unpkg.com/@aegisjsproject/state@1.0.7/",\n "@aegisjsproject/router": "https://unpkg.com/@aegisjsproject/router@1.1.15/router.mjs",\n "@aegisjsproject/router/": "https://unpkg.com/@aegisjsproject/router@1.1.15/",\n "@aegisjsproject/callback-registry": "https://unpkg.com/@aegisjsproject/callback-registry@2.0.4/callbackRegistry.js",\n "@aegisjsproject/callback-registry/": "https://unpkg.com/@aegisjsproject/callback-registry@2.0.4/",\n "@aegisjsproject/attempt": "https://unpkg.com/@aegisjsproject/attempt@1.0.7/attempt.js",\n "@aegisjsproject/attempt/": "https://unpkg.com/@aegisjsproject/attempt@1.0.7/",\n "@aegisjsproject/secret-store": "https://unpkg.com/@aegisjsproject/secret-store@1.1.1/commands.min.js",\n "@aegisjsproject/commands/": "https://unpkg.com/@aegisjsproject/commands@1.0.2/",\n "@aegisjsproject/commands": "https://unpkg.com/@aegisjsproject/commands@1.0.2/commands.min.js",\n "@aegisjsproject/firebase-account-routes": "https://unpkg.com/@aegisjsproject/firebase-account-routes@0.0.6/main.js",\n "@aegisjsproject/firebase-account-routes/": "https://unpkg.com/@aegisjsproject/firebase-account-routes@0.0.6/",\n "@aegisjsproject/secret-store/": "https://unpkg.com/@aegisjsproject/secret-store@1.1.1/",\n "@aegisjsproject/qr-encoder": "https://unpkg.com/@aegisjsproject/qr-encoder@1.0.1/index.min.js",\n "@aegisjsproject/qr-encoder/": "https://unpkg.com/@aegisjsproject/qr-encoder@1.0.1/",\n "@aegisjsproject/escape": "https://unpkg.com/@aegisjsproject/escape@1.0.4/index.min.js",\n "@aegisjsproject/escape/": "https://unpkg.com/@aegisjsproject/escape@1.0.4/",\n "@aegisjsproject/disposable": "https://unpkg.com/@aegisjsproject/disposable@1.0.3/disposable.min.js",\n "@aegisjsproject/disposable/": "https://unpkg.com/@aegisjsproject/disposable@1.0.3/",\n "@aegisjsproject/iota": "https://unpkg.com/@aegisjsproject/iota@1.0.12/iota.min.js",\n "@aegisjsproject/iota/": "https://unpkg.com/@aegisjsproject/iota@1.0.12/",\n "@aegisjsproject/disposable-registry": "https://unpkg.com/@aegisjsproject/disposable-registry@1.0.2/registry.js",\n "@aegisjsproject/disposable-registry/": "https://unpkg.com/@aegisjsproject/disposable-registry@1.0.2/",\n "@aegisjsproject/hermes": "https://unpkg.com/@aegisjsproject/hermes@1.0.2/hermes.js",\n "@aegisjsproject/hermes/": "https://unpkg.com/@aegisjsproject/hermes@1.0.2/",\n "@kernvalley/components/": "https://unpkg.com/@kernvalley/components@2.0.10/",\n "@webcomponents/custom-elements": "https://unpkg.com/@webcomponents/custom-elements@1.6.0/custom-elements.min.js",\n "leaflet": "https://unpkg.com/leaflet@1.9.4/dist/leaflet-src.esm.js",\n "leaflet/": "https://unpkg.com/leaflet@1.9.4/dist/",\n "urlpattern-polyfill": "https://unpkg.com/urlpattern-polyfill@10.1.0/index.js",\n "highlight.js": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/core.min.js",\n "highlight.js/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/",\n "highlight.js/styles/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/styles/",\n "@highlightjs/cdn-assets": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/core.min.js",\n "@highlightjs/cdn-assets/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/",\n "@highlightjs/cdn-assets/styles/": "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/styles/",\n "marked": "https://unpkg.com/marked@18.0.0/lib/marked.esm.js",\n "marked-highlight": "https://unpkg.com/marked-highlight@2.2.4/src/index.js",\n "yaml": "https://unpkg.com/yaml@2.8.3/browser/dist/index.js",\n "yaml/": "https://unpkg.com/yaml@2.8.3/browser/dist/",\n "firebase/": "https://www.gstatic.com/firebasejs/10.12.1/",\n "firebase/app": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app.js",\n "firebase/app-check": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app-check.js",\n "firebase/auth": "https://www.gstatic.com/firebasejs/10.12.1/firebase-auth.js",\n "firebase/database": "https://www.gstatic.com/firebasejs/10.12.1/firebase-database.js",\n "firebase/firestore": "https://www.gstatic.com/firebasejs/10.12.1/firebase-firestore.js",\n "firebase/functions": "https://www.gstatic.com/firebasejs/10.12.1/firebase-functions.js",\n "firebase/messaging": "https://www.gstatic.com/firebasejs/10.12.1/firebase-messaging.js",\n "firebase/performance": "https://www.gstatic.com/firebasejs/10.12.1/firebase-performance.js",\n "firebase/remote-config": "https://www.gstatic.com/firebasejs/10.12.1/firebase-remote-config.js",\n "firebase/storage": "https://www.gstatic.com/firebasejs/10.12.1/firebase-storage.js",\n "firebase/analytics": "https://www.gstatic.com/firebasejs/10.12.1/firebase-analytics.js",\n "qr": "https://unpkg.com/qr@0.5.5/index.js",\n "qr/": "https://unpkg.com/qr@0.5.5/",\n "lit": "https://unpkg.com/lit@3.3.2/index.js",\n "lit/": "https://unpkg.com/lit@3.3.2/",\n "lit-html": "https://unpkg.com/lit-html@3.3.2/lit-html.js",\n "lit-html/": "https://unpkg.com/lit-html@3.3.2/",\n "lit-element": "https://unpkg.com/lit-element@4.2.2/lit-element.js",\n "lit-element/": "https://unpkg.com/lit-element@4.2.2/",\n "@lit/reactive-element": "https://unpkg.com/@lit/reactive-element@2.1.2/reactive-element.js",\n "@lit/reactive-element/": "https://unpkg.com/@lit/reactive-element@2.1.2/",\n "@awesome.me/webawesome/": "https://unpkg.com/@awesome.me/webawesome@3.5.0/",\n "normalize.css": "https://unpkg.com/normalize.css@8.0.1/normalize.css"\n },\n "scopes": {}\n}');
6
-
7
- const SHA256 = 'SHA-256';
8
- const SHA384 = 'SHA-384';
9
- const SHA512 = 'SHA-512';
10
- const DEFAULT_ALGO = SHA384;
11
-
12
- const BASE64 = 'base64';
13
-
14
- const { imports, scopes } = json;
15
-
16
- class Importmap {
17
- #imports = {};
18
- #scopes = {};
19
- #base;
20
-
21
- constructor({ imports: i = imports, scopes: s = scopes } = {}) {
22
- this.#imports = i;
23
- this.#scopes = s;
24
- }
25
-
26
- get imports() {
27
- return structuredClone(this.#imports);
28
- }
29
-
30
- get scopes() {
31
- return structuredClone(this.#scopes);
32
- }
33
-
34
- delete(key) {
35
- return Reflect.deleteProperty(this.#imports, key);
36
- }
37
-
38
- get(key) {
39
- return Reflect.get(this.#imports, key);
40
- }
41
-
42
- has(key) {
43
- return Reflect.has(this.#imports, key);
44
- }
45
-
46
- set(key, newValue) {
47
- return Reflect.set(this.#imports, key, newValue);
48
- }
49
-
50
- toJSON() {
51
- return { imports: this.#imports, scopes: this.#scopes };
52
- }
53
-
54
- toString() {
55
- return JSON.stringify(this);
56
- }
57
-
58
- get baseUrl() {
59
- return this.#base;
60
- }
61
-
62
- set baseUrl(val) {
63
- if (typeof val === 'string' && URL.canParse(val)) {
64
- this.#base = val;
65
- }
66
- }
67
-
68
- resolve(specifier, base = this.baseUrl) {
69
- if (specifier instanceof URL) {
70
- return specifier.href;
71
- } else if (typeof specifier !== 'string') {
72
- return null;
73
- } else if (this.has(specifier)) {
74
- return URL.parse(this.get(specifier), this.baseUrl)?.href ?? null;
75
- } else if (URL.canParse(specifier)) {
76
- return specifier;
77
- } else if (! specifier.startsWith('.')) {
78
- // Find the longest match
79
- const matches = Object.keys(this.imports)
80
- .filter(key => key.endsWith('/') && specifier.startsWith(key))
81
- .sort((a, b) => b.length - a.length);
82
-
83
- if (matches.length === 0) {
84
- return null;
85
- } else {
86
- const match = matches[0];
87
- const target = imports[match];
88
- const subpath = specifier.slice(match.length);
89
- // Resolve the mapping target against the map's base, then the subpath against that
90
- const resolvedTarget = new URL(target, this.baseUrl);
91
- return new URL(subpath, resolvedTarget).href;
92
- }
93
- } else if (typeof base === 'string') {
94
- return URL.parse(specifier, base)?.href ?? null;
95
- } else {
96
- return null;
97
- }
98
- }
99
-
100
- async importLocalPackage(name = 'package.json', { signal } = {}) {
101
- const path = join(process.cwd(), name);
102
- const pkg = await readFile(path, { encoding: 'utf8', signal });
103
-
104
- return this.setLocalPackage(JSON.parse(pkg));
105
- }
106
-
107
- setLocalPackage({ name, module, exports = {} }) {
108
- if (typeof name !== 'string') {
109
- return false;
110
- } else if (typeof exports === 'string' ) {
111
- this.set(name, exports);
112
- return true;
113
- } else if (typeof exports === 'object') {
114
- Object.entries(exports).forEach(([key, value]) => {
115
- if (key.startsWith('.')) {
116
- const importKey = key === '.' ? name : `${name}${key.substring(1)}`;
117
- const resolved = typeof value === 'string' ? value : value.import ?? value.default;
118
-
119
- if (typeof resolved === 'string' && resolved.startsWith('./')) {
120
- if (importKey.includes('*') && resolved.includes('*')) {
121
- const [prefix, suffix] = importKey.split('*');
122
-
123
- if (resolved.endsWith('*' + suffix)) {
124
- this.set(prefix, resolved.substring(1).replace('*' + suffix, ''));
125
- }
126
- } else {
127
- this.set(importKey, resolved.substring(1));
128
- }
129
- }
130
- }
131
- });
132
-
133
- return true;
134
- } else if (typeof module === 'string') {
135
- this.set(name, module);
136
- return true;
137
- } else {
138
- this.set(name, '/');
139
- return true;
140
- }
141
- }
142
-
143
- async getScript({ algo = DEFAULT_ALGO, alphabet = BASE64, signal } = {}) {
144
- const integrity = await this.getIntegrity({ algo, alphabet, signal });
145
-
146
- return `<script type="importmap" integrity="${integrity}">${JSON.stringify(this)}</script>`;
147
- }
148
-
149
- async getIntegrity({ algo = DEFAULT_ALGO, alphabet = BASE64, signal } = {}) {
150
- if (signal instanceof AbortSignal && signal.aborted) {
151
- throw signal.reason;
152
- } else {
153
- const prefix = algo.toLowerCase().replace('-', '') + '-';
154
- const encoded = new TextEncoder().encode(this);
155
- const hash = await crypto.subtle.digest(algo, encoded);
156
-
157
- return prefix + new Uint8Array(hash).toBase64({ alphabet });
158
- }
159
- }
160
-
161
- static get SHA256() {
162
- return SHA256;
163
- }
164
-
165
- static get SHA384() {
166
- return SHA384;
167
- }
168
-
169
- static get SHA512() {
170
- return SHA512;
171
- }
172
-
173
- static async importFromFile(path = 'importmap.json', { signal } = {}) {
174
- const fullPath = join(process.cwd(), path);
175
- const importmap = await readFile(fullPath, { encoding: 'utf8', signal });
176
-
177
- return new Importmap(JSON.parse(importmap));
178
- }
179
- }
180
-
181
- const importmap = new Importmap({ imports, scopes });
182
- var importmap$1 = { imports, scopes };
183
-
184
- export { Importmap, importmap$1 as default, importmap, imports, scopes };
3
+ export { importmap as default };