@learncard/core 1.1.5 → 1.4.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/dist/core.cjs.development.js +1467 -1360
- package/dist/core.cjs.development.js.map +3 -3
- package/dist/core.cjs.production.min.js +47 -46
- package/dist/core.cjs.production.min.js.map +3 -3
- package/dist/core.d.ts +1715 -13
- package/dist/core.esm.js +1467 -1360
- package/dist/core.esm.js.map +3 -3
- package/dist/didkit/didkit_wasm.d.ts +11 -0
- package/dist/didkit/didkit_wasm.js +57 -4
- package/dist/didkit/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit/didkit_wasm_bg.wasm.d.ts +2 -0
- package/dist/didkit_wasm.d.ts +11 -0
- package/dist/didkit_wasm.js +57 -4
- package/dist/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit_wasm_bg.wasm.d.ts +2 -0
- package/package.json +8 -6
- package/dist/README.md +0 -89
- package/dist/didkit/README.md +0 -89
- package/dist/didkit/package.json +0 -15
- package/dist/package.json +0 -15
    
        package/dist/core.esm.js
    CHANGED
    
    | @@ -29754,916 +29754,262 @@ var require_src3 = __commonJS({ | |
| 29754 29754 | 
             
            // src/index.ts
         | 
| 29755 29755 | 
             
            import "isomorphic-fetch";
         | 
| 29756 29756 |  | 
| 29757 | 
            -
            // src/ | 
| 29758 | 
            -
             | 
| 29759 | 
            -
             | 
| 29760 | 
            -
             | 
| 29761 | 
            -
             | 
| 29762 | 
            -
             | 
| 29763 | 
            -
             | 
| 29764 | 
            -
             | 
| 29765 | 
            -
             | 
| 29766 | 
            -
               | 
| 29767 | 
            -
            }
         | 
| 29768 | 
            -
            __name( | 
| 29769 | 
            -
             | 
| 29770 | 
            -
             | 
| 29771 | 
            -
             | 
| 29772 | 
            -
             | 
| 29773 | 
            -
             | 
| 29774 | 
            -
             | 
| 29775 | 
            -
             | 
| 29776 | 
            -
             | 
| 29777 | 
            -
             | 
| 29778 | 
            -
             | 
| 29779 | 
            -
              const  | 
| 29780 | 
            -
             | 
| 29781 | 
            -
             | 
| 29782 | 
            -
               | 
| 29783 | 
            -
             | 
| 29784 | 
            -
             | 
| 29785 | 
            -
            function | 
| 29786 | 
            -
             | 
| 29787 | 
            -
            }
         | 
| 29788 | 
            -
             | 
| 29789 | 
            -
             | 
| 29790 | 
            -
             | 
| 29791 | 
            -
                 | 
| 29792 | 
            -
             | 
| 29793 | 
            -
             | 
| 29794 | 
            -
             | 
| 29795 | 
            -
             | 
| 29796 | 
            -
            function takeObject(idx) {
         | 
| 29797 | 
            -
              const ret = getObject(idx);
         | 
| 29798 | 
            -
              dropObject(idx);
         | 
| 29799 | 
            -
              return ret;
         | 
| 29800 | 
            -
            }
         | 
| 29801 | 
            -
            __name(takeObject, "takeObject");
         | 
| 29802 | 
            -
            var WASM_VECTOR_LEN = 0;
         | 
| 29803 | 
            -
            var cachedTextEncoder = new TextEncoder("utf-8");
         | 
| 29804 | 
            -
            var encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) {
         | 
| 29805 | 
            -
              return cachedTextEncoder.encodeInto(arg, view);
         | 
| 29806 | 
            -
            } : function(arg, view) {
         | 
| 29807 | 
            -
              const buf2 = cachedTextEncoder.encode(arg);
         | 
| 29808 | 
            -
              view.set(buf2);
         | 
| 29809 | 
            -
              return {
         | 
| 29810 | 
            -
                read: arg.length,
         | 
| 29811 | 
            -
                written: buf2.length
         | 
| 29812 | 
            -
              };
         | 
| 29813 | 
            -
            };
         | 
| 29814 | 
            -
            function passStringToWasm0(arg, malloc, realloc) {
         | 
| 29815 | 
            -
              if (realloc === void 0) {
         | 
| 29816 | 
            -
                const buf2 = cachedTextEncoder.encode(arg);
         | 
| 29817 | 
            -
                const ptr2 = malloc(buf2.length);
         | 
| 29818 | 
            -
                getUint8Memory0().subarray(ptr2, ptr2 + buf2.length).set(buf2);
         | 
| 29819 | 
            -
                WASM_VECTOR_LEN = buf2.length;
         | 
| 29820 | 
            -
                return ptr2;
         | 
| 29821 | 
            -
              }
         | 
| 29822 | 
            -
              let len = arg.length;
         | 
| 29823 | 
            -
              let ptr = malloc(len);
         | 
| 29824 | 
            -
              const mem = getUint8Memory0();
         | 
| 29825 | 
            -
              let offset = 0;
         | 
| 29826 | 
            -
              for (; offset < len; offset++) {
         | 
| 29827 | 
            -
                const code5 = arg.charCodeAt(offset);
         | 
| 29828 | 
            -
                if (code5 > 127)
         | 
| 29829 | 
            -
                  break;
         | 
| 29830 | 
            -
                mem[ptr + offset] = code5;
         | 
| 29831 | 
            -
              }
         | 
| 29832 | 
            -
              if (offset !== len) {
         | 
| 29833 | 
            -
                if (offset !== 0) {
         | 
| 29834 | 
            -
                  arg = arg.slice(offset);
         | 
| 29757 | 
            +
            // src/wallet/base/crypto.ts
         | 
| 29758 | 
            +
            import crypto2 from "isomorphic-webcrypto";
         | 
| 29759 | 
            +
            if (typeof window === "undefined")
         | 
| 29760 | 
            +
              globalThis.crypto = crypto2;
         | 
| 29761 | 
            +
             | 
| 29762 | 
            +
            // src/wallet/base/wallet.ts
         | 
| 29763 | 
            +
            var addPluginToWallet = /* @__PURE__ */ __name((wallet, plugin) => __async(void 0, null, function* () {
         | 
| 29764 | 
            +
              return generateWallet(wallet.contents, {
         | 
| 29765 | 
            +
                plugins: [...wallet.plugins, plugin]
         | 
| 29766 | 
            +
              });
         | 
| 29767 | 
            +
            }), "addPluginToWallet");
         | 
| 29768 | 
            +
            var addToWallet = /* @__PURE__ */ __name((wallet, content) => __async(void 0, null, function* () {
         | 
| 29769 | 
            +
              return generateWallet([...wallet.contents, content], wallet);
         | 
| 29770 | 
            +
            }), "addToWallet");
         | 
| 29771 | 
            +
            var removeFromWallet = /* @__PURE__ */ __name((wallet, contentId) => __async(void 0, null, function* () {
         | 
| 29772 | 
            +
              const clonedContents = JSON.parse(JSON.stringify(wallet.contents));
         | 
| 29773 | 
            +
              const content = clonedContents.find((c) => c.id === contentId);
         | 
| 29774 | 
            +
              return generateWallet(clonedContents.filter((i) => i.id !== content.id), wallet);
         | 
| 29775 | 
            +
            }), "removeFromWallet");
         | 
| 29776 | 
            +
            var bindMethods = /* @__PURE__ */ __name((wallet, pluginMethods) => Object.fromEntries(Object.entries(pluginMethods).map(([key2, method]) => [key2, method.bind(wallet, wallet)])), "bindMethods");
         | 
| 29777 | 
            +
            var generateWallet = /* @__PURE__ */ __name((..._0) => __async(void 0, [..._0], function* (contents = [], _wallet = {}) {
         | 
| 29778 | 
            +
              const { plugins = [] } = _wallet;
         | 
| 29779 | 
            +
              const pluginMethods = plugins.reduce((cumulativePluginMethods, plugin) => {
         | 
| 29780 | 
            +
                const newPluginMethods = __spreadValues(__spreadValues({}, cumulativePluginMethods), plugin.pluginMethods);
         | 
| 29781 | 
            +
                return newPluginMethods;
         | 
| 29782 | 
            +
              }, {});
         | 
| 29783 | 
            +
              const wallet = {
         | 
| 29784 | 
            +
                contents: [...contents],
         | 
| 29785 | 
            +
                add: function(content) {
         | 
| 29786 | 
            +
                  return addToWallet(this, content);
         | 
| 29787 | 
            +
                },
         | 
| 29788 | 
            +
                remove: function(contentId) {
         | 
| 29789 | 
            +
                  return removeFromWallet(this, contentId);
         | 
| 29790 | 
            +
                },
         | 
| 29791 | 
            +
                status: "UNLOCKED" /* Unlocked */,
         | 
| 29792 | 
            +
                plugins,
         | 
| 29793 | 
            +
                pluginMethods,
         | 
| 29794 | 
            +
                addPlugin: function(plugin) {
         | 
| 29795 | 
            +
                  return addPluginToWallet(this, plugin);
         | 
| 29835 29796 | 
             
                }
         | 
| 29836 | 
            -
             | 
| 29837 | 
            -
             | 
| 29838 | 
            -
                 | 
| 29839 | 
            -
             | 
| 29797 | 
            +
              };
         | 
| 29798 | 
            +
              if (pluginMethods)
         | 
| 29799 | 
            +
                wallet.pluginMethods = bindMethods(wallet, pluginMethods);
         | 
| 29800 | 
            +
              return wallet;
         | 
| 29801 | 
            +
            }), "generateWallet");
         | 
| 29802 | 
            +
             | 
| 29803 | 
            +
            // ../../node_modules/.pnpm/did-resolver@3.2.2/node_modules/did-resolver/lib/resolver.module.js
         | 
| 29804 | 
            +
            function _catch(body, recover) {
         | 
| 29805 | 
            +
              try {
         | 
| 29806 | 
            +
                var result = body();
         | 
| 29807 | 
            +
              } catch (e) {
         | 
| 29808 | 
            +
                return recover(e);
         | 
| 29840 29809 | 
             
              }
         | 
| 29841 | 
            -
               | 
| 29842 | 
            -
             | 
| 29843 | 
            -
            }
         | 
| 29844 | 
            -
            __name(passStringToWasm0, "passStringToWasm0");
         | 
| 29845 | 
            -
            function isLikeNone(x) {
         | 
| 29846 | 
            -
              return x === void 0 || x === null;
         | 
| 29847 | 
            -
            }
         | 
| 29848 | 
            -
            __name(isLikeNone, "isLikeNone");
         | 
| 29849 | 
            -
            var cachegetInt32Memory0 = null;
         | 
| 29850 | 
            -
            function getInt32Memory0() {
         | 
| 29851 | 
            -
              if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
         | 
| 29852 | 
            -
                cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
         | 
| 29810 | 
            +
              if (result && result.then) {
         | 
| 29811 | 
            +
                return result.then(void 0, recover);
         | 
| 29853 29812 | 
             
              }
         | 
| 29854 | 
            -
              return  | 
| 29813 | 
            +
              return result;
         | 
| 29855 29814 | 
             
            }
         | 
| 29856 | 
            -
            __name( | 
| 29857 | 
            -
            function  | 
| 29858 | 
            -
              const  | 
| 29859 | 
            -
               | 
| 29860 | 
            -
                return `${val}`;
         | 
| 29861 | 
            -
              }
         | 
| 29862 | 
            -
              if (type == "string") {
         | 
| 29863 | 
            -
                return `"${val}"`;
         | 
| 29864 | 
            -
              }
         | 
| 29865 | 
            -
              if (type == "symbol") {
         | 
| 29866 | 
            -
                const description = val.description;
         | 
| 29867 | 
            -
                if (description == null) {
         | 
| 29868 | 
            -
                  return "Symbol";
         | 
| 29869 | 
            -
                } else {
         | 
| 29870 | 
            -
                  return `Symbol(${description})`;
         | 
| 29871 | 
            -
                }
         | 
| 29872 | 
            -
              }
         | 
| 29873 | 
            -
              if (type == "function") {
         | 
| 29874 | 
            -
                const name5 = val.name;
         | 
| 29875 | 
            -
                if (typeof name5 == "string" && name5.length > 0) {
         | 
| 29876 | 
            -
                  return `Function(${name5})`;
         | 
| 29877 | 
            -
                } else {
         | 
| 29878 | 
            -
                  return "Function";
         | 
| 29879 | 
            -
                }
         | 
| 29880 | 
            -
              }
         | 
| 29881 | 
            -
              if (Array.isArray(val)) {
         | 
| 29882 | 
            -
                const length2 = val.length;
         | 
| 29883 | 
            -
                let debug = "[";
         | 
| 29884 | 
            -
                if (length2 > 0) {
         | 
| 29885 | 
            -
                  debug += debugString(val[0]);
         | 
| 29886 | 
            -
                }
         | 
| 29887 | 
            -
                for (let i = 1; i < length2; i++) {
         | 
| 29888 | 
            -
                  debug += ", " + debugString(val[i]);
         | 
| 29889 | 
            -
                }
         | 
| 29890 | 
            -
                debug += "]";
         | 
| 29891 | 
            -
                return debug;
         | 
| 29892 | 
            -
              }
         | 
| 29893 | 
            -
              const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
         | 
| 29894 | 
            -
              let className;
         | 
| 29895 | 
            -
              if (builtInMatches.length > 1) {
         | 
| 29896 | 
            -
                className = builtInMatches[1];
         | 
| 29897 | 
            -
              } else {
         | 
| 29898 | 
            -
                return toString.call(val);
         | 
| 29899 | 
            -
              }
         | 
| 29900 | 
            -
              if (className == "Object") {
         | 
| 29815 | 
            +
            __name(_catch, "_catch");
         | 
| 29816 | 
            +
            function inMemoryCache() {
         | 
| 29817 | 
            +
              const cache = /* @__PURE__ */ new Map();
         | 
| 29818 | 
            +
              return function(parsed, resolve) {
         | 
| 29901 29819 | 
             
                try {
         | 
| 29902 | 
            -
                   | 
| 29903 | 
            -
             | 
| 29904 | 
            -
             | 
| 29820 | 
            +
                  let _temp2 = function(_result) {
         | 
| 29821 | 
            +
                    if (_exit)
         | 
| 29822 | 
            +
                      return _result;
         | 
| 29823 | 
            +
                    const cached = cache.get(parsed.didUrl);
         | 
| 29824 | 
            +
                    return cached !== void 0 ? cached : Promise.resolve(resolve()).then(function(result) {
         | 
| 29825 | 
            +
                      var _result$didResolution;
         | 
| 29826 | 
            +
                      if (((_result$didResolution = result.didResolutionMetadata) == null ? void 0 : _result$didResolution.error) !== "notFound") {
         | 
| 29827 | 
            +
                        cache.set(parsed.didUrl, result);
         | 
| 29828 | 
            +
                      }
         | 
| 29829 | 
            +
                      return result;
         | 
| 29830 | 
            +
                    });
         | 
| 29831 | 
            +
                  };
         | 
| 29832 | 
            +
                  __name(_temp2, "_temp2");
         | 
| 29833 | 
            +
                  let _exit;
         | 
| 29834 | 
            +
                  const _temp = function() {
         | 
| 29835 | 
            +
                    if (parsed.params && parsed.params["no-cache"] === "true") {
         | 
| 29836 | 
            +
                      return Promise.resolve(resolve()).then(function(_await$resolve) {
         | 
| 29837 | 
            +
                        _exit = 1;
         | 
| 29838 | 
            +
                        return _await$resolve;
         | 
| 29839 | 
            +
                      });
         | 
| 29840 | 
            +
                    }
         | 
| 29841 | 
            +
                  }();
         | 
| 29842 | 
            +
                  return Promise.resolve(_temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp));
         | 
| 29843 | 
            +
                } catch (e) {
         | 
| 29844 | 
            +
                  return Promise.reject(e);
         | 
| 29905 29845 | 
             
                }
         | 
| 29906 | 
            -
              }
         | 
| 29907 | 
            -
              if (val instanceof Error) {
         | 
| 29908 | 
            -
                return `${val.name}: ${val.message}
         | 
| 29909 | 
            -
            ${val.stack}`;
         | 
| 29910 | 
            -
              }
         | 
| 29911 | 
            -
              return className;
         | 
| 29846 | 
            +
              };
         | 
| 29912 29847 | 
             
            }
         | 
| 29913 | 
            -
            __name( | 
| 29914 | 
            -
            function  | 
| 29915 | 
            -
               | 
| 29916 | 
            -
              const real = /* @__PURE__ */ __name((...args) => {
         | 
| 29917 | 
            -
                state.cnt++;
         | 
| 29918 | 
            -
                const a = state.a;
         | 
| 29919 | 
            -
                state.a = 0;
         | 
| 29920 | 
            -
                try {
         | 
| 29921 | 
            -
                  return f(a, state.b, ...args);
         | 
| 29922 | 
            -
                } finally {
         | 
| 29923 | 
            -
                  if (--state.cnt === 0) {
         | 
| 29924 | 
            -
                    wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
         | 
| 29925 | 
            -
                  } else {
         | 
| 29926 | 
            -
                    state.a = a;
         | 
| 29927 | 
            -
                  }
         | 
| 29928 | 
            -
                }
         | 
| 29929 | 
            -
              }, "real");
         | 
| 29930 | 
            -
              real.original = state;
         | 
| 29931 | 
            -
              return real;
         | 
| 29848 | 
            +
            __name(inMemoryCache, "inMemoryCache");
         | 
| 29849 | 
            +
            function noCache(parsed, resolve) {
         | 
| 29850 | 
            +
              return resolve();
         | 
| 29932 29851 | 
             
            }
         | 
| 29933 | 
            -
            __name( | 
| 29934 | 
            -
             | 
| 29935 | 
            -
             | 
| 29852 | 
            +
            __name(noCache, "noCache");
         | 
| 29853 | 
            +
            var PCT_ENCODED = "(?:%[0-9a-fA-F]{2})";
         | 
| 29854 | 
            +
            var ID_CHAR = `(?:[a-zA-Z0-9._-]|${PCT_ENCODED})`;
         | 
| 29855 | 
            +
            var METHOD = "([a-z0-9]+)";
         | 
| 29856 | 
            +
            var METHOD_ID = `((?:${ID_CHAR}*:)*(${ID_CHAR}+))`;
         | 
| 29857 | 
            +
            var PARAM_CHAR = "[a-zA-Z0-9_.:%-]";
         | 
| 29858 | 
            +
            var PARAM = `;${PARAM_CHAR}+=${PARAM_CHAR}*`;
         | 
| 29859 | 
            +
            var PARAMS = `((${PARAM})*)`;
         | 
| 29860 | 
            +
            var PATH = `(/[^#?]*)?`;
         | 
| 29861 | 
            +
            var QUERY = `([?][^#]*)?`;
         | 
| 29862 | 
            +
            var FRAGMENT = `(#.*)?`;
         | 
| 29863 | 
            +
            var DID_MATCHER = new RegExp(`^did:${METHOD}:${METHOD_ID}${PARAMS}${PATH}${QUERY}${FRAGMENT}$`);
         | 
| 29864 | 
            +
            function parse(didUrl) {
         | 
| 29865 | 
            +
              if (didUrl === "" || !didUrl)
         | 
| 29866 | 
            +
                return null;
         | 
| 29867 | 
            +
              const sections = didUrl.match(DID_MATCHER);
         | 
| 29868 | 
            +
              if (sections) {
         | 
| 29869 | 
            +
                const parts = {
         | 
| 29870 | 
            +
                  did: `did:${sections[1]}:${sections[2]}`,
         | 
| 29871 | 
            +
                  method: sections[1],
         | 
| 29872 | 
            +
                  id: sections[2],
         | 
| 29873 | 
            +
                  didUrl
         | 
| 29874 | 
            +
                };
         | 
| 29875 | 
            +
                if (sections[4]) {
         | 
| 29876 | 
            +
                  const params = sections[4].slice(1).split(";");
         | 
| 29877 | 
            +
                  parts.params = {};
         | 
| 29878 | 
            +
                  for (const p of params) {
         | 
| 29879 | 
            +
                    const kv = p.split("=");
         | 
| 29880 | 
            +
                    parts.params[kv[0]] = kv[1];
         | 
| 29881 | 
            +
                  }
         | 
| 29882 | 
            +
                }
         | 
| 29883 | 
            +
                if (sections[6])
         | 
| 29884 | 
            +
                  parts.path = sections[6];
         | 
| 29885 | 
            +
                if (sections[7])
         | 
| 29886 | 
            +
                  parts.query = sections[7].slice(1);
         | 
| 29887 | 
            +
                if (sections[8])
         | 
| 29888 | 
            +
                  parts.fragment = sections[8].slice(1);
         | 
| 29889 | 
            +
                return parts;
         | 
| 29890 | 
            +
              }
         | 
| 29891 | 
            +
              return null;
         | 
| 29936 29892 | 
             
            }
         | 
| 29937 | 
            -
            __name( | 
| 29938 | 
            -
             | 
| 29939 | 
            -
               | 
| 29940 | 
            -
               | 
| 29941 | 
            -
               | 
| 29942 | 
            -
             | 
| 29893 | 
            +
            __name(parse, "parse");
         | 
| 29894 | 
            +
            var EMPTY_RESULT = {
         | 
| 29895 | 
            +
              didResolutionMetadata: {},
         | 
| 29896 | 
            +
              didDocument: null,
         | 
| 29897 | 
            +
              didDocumentMetadata: {}
         | 
| 29898 | 
            +
            };
         | 
| 29899 | 
            +
            function wrapLegacyResolver(resolve) {
         | 
| 29900 | 
            +
              return function(did, parsed, resolver) {
         | 
| 29901 | 
            +
                try {
         | 
| 29902 | 
            +
                  return Promise.resolve(_catch(function() {
         | 
| 29903 | 
            +
                    return Promise.resolve(resolve(did, parsed, resolver)).then(function(doc) {
         | 
| 29904 | 
            +
                      return __spreadProps(__spreadValues({}, EMPTY_RESULT), {
         | 
| 29905 | 
            +
                        didResolutionMetadata: {
         | 
| 29906 | 
            +
                          contentType: "application/did+ld+json"
         | 
| 29907 | 
            +
                        },
         | 
| 29908 | 
            +
                        didDocument: doc
         | 
| 29909 | 
            +
                      });
         | 
| 29910 | 
            +
                    });
         | 
| 29911 | 
            +
                  }, function(e) {
         | 
| 29912 | 
            +
                    return __spreadProps(__spreadValues({}, EMPTY_RESULT), {
         | 
| 29913 | 
            +
                      didResolutionMetadata: {
         | 
| 29914 | 
            +
                        error: "notFound",
         | 
| 29915 | 
            +
                        message: e.toString()
         | 
| 29916 | 
            +
                      }
         | 
| 29917 | 
            +
                    });
         | 
| 29918 | 
            +
                  }));
         | 
| 29919 | 
            +
                } catch (e) {
         | 
| 29920 | 
            +
                  return Promise.reject(e);
         | 
| 29921 | 
            +
                }
         | 
| 29922 | 
            +
              };
         | 
| 29943 29923 | 
             
            }
         | 
| 29944 | 
            -
            __name( | 
| 29945 | 
            -
             | 
| 29946 | 
            -
               | 
| 29947 | 
            -
                 | 
| 29948 | 
            -
                 | 
| 29949 | 
            -
                 | 
| 29950 | 
            -
                 | 
| 29951 | 
            -
                 | 
| 29952 | 
            -
             | 
| 29953 | 
            -
             | 
| 29954 | 
            -
             | 
| 29955 | 
            -
             | 
| 29956 | 
            -
             | 
| 29957 | 
            -
                if (r3) {
         | 
| 29958 | 
            -
                  ptr1 = 0;
         | 
| 29959 | 
            -
                  len1 = 0;
         | 
| 29960 | 
            -
                  throw takeObject(r2);
         | 
| 29924 | 
            +
            __name(wrapLegacyResolver, "wrapLegacyResolver");
         | 
| 29925 | 
            +
            var Resolver = class {
         | 
| 29926 | 
            +
              constructor(registry2 = {}, options = {}) {
         | 
| 29927 | 
            +
                this.registry = void 0;
         | 
| 29928 | 
            +
                this.cache = void 0;
         | 
| 29929 | 
            +
                this.registry = registry2;
         | 
| 29930 | 
            +
                this.cache = options.cache === true ? inMemoryCache() : options.cache || noCache;
         | 
| 29931 | 
            +
                if (options.legacyResolvers) {
         | 
| 29932 | 
            +
                  Object.keys(options.legacyResolvers).map((methodName) => {
         | 
| 29933 | 
            +
                    if (!this.registry[methodName]) {
         | 
| 29934 | 
            +
                      this.registry[methodName] = wrapLegacyResolver(options.legacyResolvers[methodName]);
         | 
| 29935 | 
            +
                    }
         | 
| 29936 | 
            +
                  });
         | 
| 29961 29937 | 
             
                }
         | 
| 29962 | 
            -
                return getStringFromWasm0(ptr1, len1);
         | 
| 29963 | 
            -
              } finally {
         | 
| 29964 | 
            -
                wasm.__wbindgen_add_to_stack_pointer(16);
         | 
| 29965 | 
            -
                wasm.__wbindgen_free(ptr1, len1);
         | 
| 29966 29938 | 
             
              }
         | 
| 29967 | 
            -
            }
         | 
| 29968 | 
            -
             | 
| 29969 | 
            -
             | 
| 29970 | 
            -
             | 
| 29971 | 
            -
             | 
| 29972 | 
            -
             | 
| 29973 | 
            -
             | 
| 29974 | 
            -
             | 
| 29975 | 
            -
             | 
| 29976 | 
            -
             | 
| 29977 | 
            -
             | 
| 29978 | 
            -
             | 
| 29979 | 
            -
             | 
| 29980 | 
            -
             | 
| 29981 | 
            -
             | 
| 29982 | 
            -
             | 
| 29983 | 
            -
             | 
| 29984 | 
            -
             | 
| 29985 | 
            -
                   | 
| 29986 | 
            -
                   | 
| 29939 | 
            +
              resolve(didUrl, options = {}) {
         | 
| 29940 | 
            +
                try {
         | 
| 29941 | 
            +
                  const _this = this;
         | 
| 29942 | 
            +
                  const parsed = parse(didUrl);
         | 
| 29943 | 
            +
                  if (parsed === null) {
         | 
| 29944 | 
            +
                    return Promise.resolve(__spreadProps(__spreadValues({}, EMPTY_RESULT), {
         | 
| 29945 | 
            +
                      didResolutionMetadata: {
         | 
| 29946 | 
            +
                        error: "invalidDid"
         | 
| 29947 | 
            +
                      }
         | 
| 29948 | 
            +
                    }));
         | 
| 29949 | 
            +
                  }
         | 
| 29950 | 
            +
                  const resolver = _this.registry[parsed.method];
         | 
| 29951 | 
            +
                  if (!resolver) {
         | 
| 29952 | 
            +
                    return Promise.resolve(__spreadProps(__spreadValues({}, EMPTY_RESULT), {
         | 
| 29953 | 
            +
                      didResolutionMetadata: {
         | 
| 29954 | 
            +
                        error: "unsupportedDidMethod"
         | 
| 29955 | 
            +
                      }
         | 
| 29956 | 
            +
                    }));
         | 
| 29957 | 
            +
                  }
         | 
| 29958 | 
            +
                  return Promise.resolve(_this.cache(parsed, () => resolver(parsed.did, parsed, _this, options)));
         | 
| 29959 | 
            +
                } catch (e) {
         | 
| 29960 | 
            +
                  return Promise.reject(e);
         | 
| 29987 29961 | 
             
                }
         | 
| 29988 | 
            -
                return getStringFromWasm0(ptr2, len2);
         | 
| 29989 | 
            -
              } finally {
         | 
| 29990 | 
            -
                wasm.__wbindgen_add_to_stack_pointer(16);
         | 
| 29991 | 
            -
                wasm.__wbindgen_free(ptr2, len2);
         | 
| 29992 29962 | 
             
              }
         | 
| 29963 | 
            +
            };
         | 
| 29964 | 
            +
            __name(Resolver, "Resolver");
         | 
| 29965 | 
            +
             | 
| 29966 | 
            +
            // ../../node_modules/.pnpm/uint8arrays@3.0.0/node_modules/uint8arrays/esm/src/index.js
         | 
| 29967 | 
            +
            init_concat();
         | 
| 29968 | 
            +
            init_from_string();
         | 
| 29969 | 
            +
            init_to_string();
         | 
| 29970 | 
            +
             | 
| 29971 | 
            +
            // ../../node_modules/.pnpm/did-jwt@5.9.0/node_modules/did-jwt/lib/index.module.js
         | 
| 29972 | 
            +
            init_basics();
         | 
| 29973 | 
            +
            var import_sha256 = __toESM(require_sha256());
         | 
| 29974 | 
            +
            var import_js_sha3 = __toESM(require_sha3());
         | 
| 29975 | 
            +
            var import_elliptic = __toESM(require_elliptic());
         | 
| 29976 | 
            +
            var import_ed25519 = __toESM(require_ed25519());
         | 
| 29977 | 
            +
            var import_canonicalize = __toESM(require_canonicalize());
         | 
| 29978 | 
            +
            var import_x25519 = __toESM(require_x25519());
         | 
| 29979 | 
            +
            var import_xchacha20poly1305 = __toESM(require_xchacha20poly1305());
         | 
| 29980 | 
            +
            var import_random = __toESM(require_random());
         | 
| 29981 | 
            +
            function bytesToBase64url(b) {
         | 
| 29982 | 
            +
              return toString3(b, "base64url");
         | 
| 29993 29983 | 
             
            }
         | 
| 29994 | 
            -
            __name( | 
| 29995 | 
            -
            function  | 
| 29996 | 
            -
              const  | 
| 29997 | 
            -
               | 
| 29998 | 
            -
              const ptr1 = passStringToWasm0(jwk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 29999 | 
            -
              const len1 = WASM_VECTOR_LEN;
         | 
| 30000 | 
            -
              const ret = wasm.keyToVerificationMethod(ptr0, len0, ptr1, len1);
         | 
| 30001 | 
            -
              return takeObject(ret);
         | 
| 30002 | 
            -
            }
         | 
| 30003 | 
            -
            __name(keyToVerificationMethod, "keyToVerificationMethod");
         | 
| 30004 | 
            -
            function issueCredential(credential, proof_options, key2) {
         | 
| 30005 | 
            -
              const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 30006 | 
            -
              const len0 = WASM_VECTOR_LEN;
         | 
| 30007 | 
            -
              const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 30008 | 
            -
              const len1 = WASM_VECTOR_LEN;
         | 
| 30009 | 
            -
              const ptr2 = passStringToWasm0(key2, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 30010 | 
            -
              const len2 = WASM_VECTOR_LEN;
         | 
| 30011 | 
            -
              const ret = wasm.issueCredential(ptr0, len0, ptr1, len1, ptr2, len2);
         | 
| 30012 | 
            -
              return takeObject(ret);
         | 
| 29984 | 
            +
            __name(bytesToBase64url, "bytesToBase64url");
         | 
| 29985 | 
            +
            function base64ToBytes(s) {
         | 
| 29986 | 
            +
              const inputBase64Url = s.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
         | 
| 29987 | 
            +
              return fromString2(inputBase64Url, "base64url");
         | 
| 30013 29988 | 
             
            }
         | 
| 30014 | 
            -
            __name( | 
| 30015 | 
            -
            function  | 
| 30016 | 
            -
               | 
| 30017 | 
            -
              const len0 = WASM_VECTOR_LEN;
         | 
| 30018 | 
            -
              const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 30019 | 
            -
              const len1 = WASM_VECTOR_LEN;
         | 
| 30020 | 
            -
              const ret = wasm.verifyCredential(ptr0, len0, ptr1, len1);
         | 
| 30021 | 
            -
              return takeObject(ret);
         | 
| 29989 | 
            +
            __name(base64ToBytes, "base64ToBytes");
         | 
| 29990 | 
            +
            function base58ToBytes(s) {
         | 
| 29991 | 
            +
              return fromString2(s, "base58btc");
         | 
| 30022 29992 | 
             
            }
         | 
| 30023 | 
            -
            __name( | 
| 30024 | 
            -
            function  | 
| 30025 | 
            -
              const  | 
| 30026 | 
            -
               | 
| 30027 | 
            -
              const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 30028 | 
            -
              const len1 = WASM_VECTOR_LEN;
         | 
| 30029 | 
            -
              const ptr2 = passStringToWasm0(key2, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 30030 | 
            -
              const len2 = WASM_VECTOR_LEN;
         | 
| 30031 | 
            -
              const ret = wasm.issuePresentation(ptr0, len0, ptr1, len1, ptr2, len2);
         | 
| 30032 | 
            -
              return takeObject(ret);
         | 
| 29993 | 
            +
            __name(base58ToBytes, "base58ToBytes");
         | 
| 29994 | 
            +
            function hexToBytes(s) {
         | 
| 29995 | 
            +
              const input = s.startsWith("0x") ? s.substring(2) : s;
         | 
| 29996 | 
            +
              return fromString2(input.toLowerCase(), "base16");
         | 
| 30033 29997 | 
             
            }
         | 
| 30034 | 
            -
            __name( | 
| 30035 | 
            -
            function  | 
| 30036 | 
            -
               | 
| 30037 | 
            -
              const len0 = WASM_VECTOR_LEN;
         | 
| 30038 | 
            -
              const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 30039 | 
            -
              const len1 = WASM_VECTOR_LEN;
         | 
| 30040 | 
            -
              const ret = wasm.verifyPresentation(ptr0, len0, ptr1, len1);
         | 
| 30041 | 
            -
              return takeObject(ret);
         | 
| 29998 | 
            +
            __name(hexToBytes, "hexToBytes");
         | 
| 29999 | 
            +
            function encodeBase64url(s) {
         | 
| 30000 | 
            +
              return bytesToBase64url(fromString2(s));
         | 
| 30042 30001 | 
             
            }
         | 
| 30043 | 
            -
            __name( | 
| 30044 | 
            -
            function  | 
| 30045 | 
            -
               | 
| 30046 | 
            -
                return f.apply(this, args);
         | 
| 30047 | 
            -
              } catch (e) {
         | 
| 30048 | 
            -
                wasm.__wbindgen_exn_store(addHeapObject(e));
         | 
| 30049 | 
            -
              }
         | 
| 30002 | 
            +
            __name(encodeBase64url, "encodeBase64url");
         | 
| 30003 | 
            +
            function decodeBase64url(s) {
         | 
| 30004 | 
            +
              return toString3(base64ToBytes(s));
         | 
| 30050 30005 | 
             
            }
         | 
| 30051 | 
            -
            __name( | 
| 30052 | 
            -
            function  | 
| 30053 | 
            -
              return  | 
| 30006 | 
            +
            __name(decodeBase64url, "decodeBase64url");
         | 
| 30007 | 
            +
            function bytesToHex(b) {
         | 
| 30008 | 
            +
              return toString3(b, "base16");
         | 
| 30054 30009 | 
             
            }
         | 
| 30055 | 
            -
            __name( | 
| 30056 | 
            -
            function  | 
| 30057 | 
            -
               | 
| 30058 | 
            -
            }
         | 
| 30059 | 
            -
            __name(__wbg_adapter_108, "__wbg_adapter_108");
         | 
| 30060 | 
            -
            function load(module, imports) {
         | 
| 30061 | 
            -
              return __async(this, null, function* () {
         | 
| 30062 | 
            -
                if (typeof Response === "function" && module instanceof Response) {
         | 
| 30063 | 
            -
                  if (typeof WebAssembly.instantiateStreaming === "function") {
         | 
| 30064 | 
            -
                    try {
         | 
| 30065 | 
            -
                      return yield WebAssembly.instantiateStreaming(module, imports);
         | 
| 30066 | 
            -
                    } catch (e) {
         | 
| 30067 | 
            -
                      if (module.headers.get("Content-Type") != "application/wasm") {
         | 
| 30068 | 
            -
                        console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
         | 
| 30069 | 
            -
                      } else {
         | 
| 30070 | 
            -
                        throw e;
         | 
| 30071 | 
            -
                      }
         | 
| 30072 | 
            -
                    }
         | 
| 30073 | 
            -
                  }
         | 
| 30074 | 
            -
                  const bytes = yield module.arrayBuffer();
         | 
| 30075 | 
            -
                  return yield WebAssembly.instantiate(bytes, imports);
         | 
| 30076 | 
            -
                } else {
         | 
| 30077 | 
            -
                  const instance = yield WebAssembly.instantiate(module, imports);
         | 
| 30078 | 
            -
                  if (instance instanceof WebAssembly.Instance) {
         | 
| 30079 | 
            -
                    return { instance, module };
         | 
| 30080 | 
            -
                  } else {
         | 
| 30081 | 
            -
                    return instance;
         | 
| 30082 | 
            -
                  }
         | 
| 30083 | 
            -
                }
         | 
| 30084 | 
            -
              });
         | 
| 30085 | 
            -
            }
         | 
| 30086 | 
            -
            __name(load, "load");
         | 
| 30087 | 
            -
            function init(input) {
         | 
| 30088 | 
            -
              return __async(this, null, function* () {
         | 
| 30089 | 
            -
                if (typeof input === "undefined") {
         | 
| 30090 | 
            -
                }
         | 
| 30091 | 
            -
                const imports = {};
         | 
| 30092 | 
            -
                imports.wbg = {};
         | 
| 30093 | 
            -
                imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
         | 
| 30094 | 
            -
                  const ret = getStringFromWasm0(arg0, arg1);
         | 
| 30095 | 
            -
                  return addHeapObject(ret);
         | 
| 30096 | 
            -
                };
         | 
| 30097 | 
            -
                imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
         | 
| 30098 | 
            -
                  takeObject(arg0);
         | 
| 30099 | 
            -
                };
         | 
| 30100 | 
            -
                imports.wbg.__wbindgen_cb_drop = function(arg0) {
         | 
| 30101 | 
            -
                  const obj = takeObject(arg0).original;
         | 
| 30102 | 
            -
                  if (obj.cnt-- == 1) {
         | 
| 30103 | 
            -
                    obj.a = 0;
         | 
| 30104 | 
            -
                    return true;
         | 
| 30105 | 
            -
                  }
         | 
| 30106 | 
            -
                  const ret = false;
         | 
| 30107 | 
            -
                  return ret;
         | 
| 30108 | 
            -
                };
         | 
| 30109 | 
            -
                imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
         | 
| 30110 | 
            -
                  const ret = getObject(arg0);
         | 
| 30111 | 
            -
                  return addHeapObject(ret);
         | 
| 30112 | 
            -
                };
         | 
| 30113 | 
            -
                imports.wbg.__wbg_fetch_811d43d6bdcad5b1 = function(arg0) {
         | 
| 30114 | 
            -
                  const ret = fetch(getObject(arg0));
         | 
| 30115 | 
            -
                  return addHeapObject(ret);
         | 
| 30116 | 
            -
                };
         | 
| 30117 | 
            -
                imports.wbg.__wbg_fetch_bf56e2a9f0644e3f = function(arg0, arg1) {
         | 
| 30118 | 
            -
                  const ret = getObject(arg0).fetch(getObject(arg1));
         | 
| 30119 | 
            -
                  return addHeapObject(ret);
         | 
| 30120 | 
            -
                };
         | 
| 30121 | 
            -
                imports.wbg.__wbg_new_89d7f088c1c45353 = function() {
         | 
| 30122 | 
            -
                  return handleError(function() {
         | 
| 30123 | 
            -
                    const ret = new Headers();
         | 
| 30124 | 
            -
                    return addHeapObject(ret);
         | 
| 30125 | 
            -
                  }, arguments);
         | 
| 30126 | 
            -
                };
         | 
| 30127 | 
            -
                imports.wbg.__wbg_append_f4f93bc73c45ee3e = function() {
         | 
| 30128 | 
            -
                  return handleError(function(arg0, arg1, arg2, arg3, arg4) {
         | 
| 30129 | 
            -
                    getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
         | 
| 30130 | 
            -
                  }, arguments);
         | 
| 30131 | 
            -
                };
         | 
| 30132 | 
            -
                imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
         | 
| 30133 | 
            -
                  const obj = getObject(arg1);
         | 
| 30134 | 
            -
                  const ret = typeof obj === "string" ? obj : void 0;
         | 
| 30135 | 
            -
                  var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 30136 | 
            -
                  var len0 = WASM_VECTOR_LEN;
         | 
| 30137 | 
            -
                  getInt32Memory0()[arg0 / 4 + 1] = len0;
         | 
| 30138 | 
            -
                  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
         | 
| 30139 | 
            -
                };
         | 
| 30140 | 
            -
                imports.wbg.__wbg_instanceof_Response_ccfeb62399355bcd = function(arg0) {
         | 
| 30141 | 
            -
                  const ret = getObject(arg0) instanceof Response;
         | 
| 30142 | 
            -
                  return ret;
         | 
| 30143 | 
            -
                };
         | 
| 30144 | 
            -
                imports.wbg.__wbg_url_06c0f822d68d195c = function(arg0, arg1) {
         | 
| 30145 | 
            -
                  const ret = getObject(arg1).url;
         | 
| 30146 | 
            -
                  const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 30147 | 
            -
                  const len0 = WASM_VECTOR_LEN;
         | 
| 30148 | 
            -
                  getInt32Memory0()[arg0 / 4 + 1] = len0;
         | 
| 30149 | 
            -
                  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
         | 
| 30150 | 
            -
                };
         | 
| 30151 | 
            -
                imports.wbg.__wbg_status_600fd8b881393898 = function(arg0) {
         | 
| 30152 | 
            -
                  const ret = getObject(arg0).status;
         | 
| 30153 | 
            -
                  return ret;
         | 
| 30154 | 
            -
                };
         | 
| 30155 | 
            -
                imports.wbg.__wbg_headers_9e7f2c05a9b962ea = function(arg0) {
         | 
| 30156 | 
            -
                  const ret = getObject(arg0).headers;
         | 
| 30157 | 
            -
                  return addHeapObject(ret);
         | 
| 30158 | 
            -
                };
         | 
| 30159 | 
            -
                imports.wbg.__wbg_arrayBuffer_5a99283a3954c850 = function() {
         | 
| 30160 | 
            -
                  return handleError(function(arg0) {
         | 
| 30161 | 
            -
                    const ret = getObject(arg0).arrayBuffer();
         | 
| 30162 | 
            -
                    return addHeapObject(ret);
         | 
| 30163 | 
            -
                  }, arguments);
         | 
| 30164 | 
            -
                };
         | 
| 30165 | 
            -
                imports.wbg.__wbg_newwithstrandinit_fd99688f189f053e = function() {
         | 
| 30166 | 
            -
                  return handleError(function(arg0, arg1, arg2) {
         | 
| 30167 | 
            -
                    const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
         | 
| 30168 | 
            -
                    return addHeapObject(ret);
         | 
| 30169 | 
            -
                  }, arguments);
         | 
| 30170 | 
            -
                };
         | 
| 30171 | 
            -
                imports.wbg.__wbindgen_is_object = function(arg0) {
         | 
| 30172 | 
            -
                  const val = getObject(arg0);
         | 
| 30173 | 
            -
                  const ret = typeof val === "object" && val !== null;
         | 
| 30174 | 
            -
                  return ret;
         | 
| 30175 | 
            -
                };
         | 
| 30176 | 
            -
                imports.wbg.__wbg_self_86b4b13392c7af56 = function() {
         | 
| 30177 | 
            -
                  return handleError(function() {
         | 
| 30178 | 
            -
                    const ret = self.self;
         | 
| 30179 | 
            -
                    return addHeapObject(ret);
         | 
| 30180 | 
            -
                  }, arguments);
         | 
| 30181 | 
            -
                };
         | 
| 30182 | 
            -
                imports.wbg.__wbg_crypto_b8c92eaac23d0d80 = function(arg0) {
         | 
| 30183 | 
            -
                  const ret = getObject(arg0).crypto;
         | 
| 30184 | 
            -
                  return addHeapObject(ret);
         | 
| 30185 | 
            -
                };
         | 
| 30186 | 
            -
                imports.wbg.__wbg_msCrypto_9ad6677321a08dd8 = function(arg0) {
         | 
| 30187 | 
            -
                  const ret = getObject(arg0).msCrypto;
         | 
| 30188 | 
            -
                  return addHeapObject(ret);
         | 
| 30189 | 
            -
                };
         | 
| 30190 | 
            -
                imports.wbg.__wbindgen_is_undefined = function(arg0) {
         | 
| 30191 | 
            -
                  const ret = getObject(arg0) === void 0;
         | 
| 30192 | 
            -
                  return ret;
         | 
| 30193 | 
            -
                };
         | 
| 30194 | 
            -
                imports.wbg.__wbg_static_accessor_MODULE_452b4680e8614c81 = function() {
         | 
| 30195 | 
            -
                  const ret = module;
         | 
| 30196 | 
            -
                  return addHeapObject(ret);
         | 
| 30197 | 
            -
                };
         | 
| 30198 | 
            -
                imports.wbg.__wbg_require_f5521a5b85ad2542 = function(arg0, arg1, arg2) {
         | 
| 30199 | 
            -
                  const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
         | 
| 30200 | 
            -
                  return addHeapObject(ret);
         | 
| 30201 | 
            -
                };
         | 
| 30202 | 
            -
                imports.wbg.__wbg_getRandomValues_dd27e6b0652b3236 = function(arg0) {
         | 
| 30203 | 
            -
                  const ret = getObject(arg0).getRandomValues;
         | 
| 30204 | 
            -
                  return addHeapObject(ret);
         | 
| 30205 | 
            -
                };
         | 
| 30206 | 
            -
                imports.wbg.__wbg_getRandomValues_e57c9b75ddead065 = function(arg0, arg1) {
         | 
| 30207 | 
            -
                  getObject(arg0).getRandomValues(getObject(arg1));
         | 
| 30208 | 
            -
                };
         | 
| 30209 | 
            -
                imports.wbg.__wbg_randomFillSync_d2ba53160aec6aba = function(arg0, arg1, arg2) {
         | 
| 30210 | 
            -
                  getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
         | 
| 30211 | 
            -
                };
         | 
| 30212 | 
            -
                imports.wbg.__wbindgen_is_function = function(arg0) {
         | 
| 30213 | 
            -
                  const ret = typeof getObject(arg0) === "function";
         | 
| 30214 | 
            -
                  return ret;
         | 
| 30215 | 
            -
                };
         | 
| 30216 | 
            -
                imports.wbg.__wbg_newnoargs_e23b458e372830de = function(arg0, arg1) {
         | 
| 30217 | 
            -
                  const ret = new Function(getStringFromWasm0(arg0, arg1));
         | 
| 30218 | 
            -
                  return addHeapObject(ret);
         | 
| 30219 | 
            -
                };
         | 
| 30220 | 
            -
                imports.wbg.__wbg_next_cabb70b365520721 = function(arg0) {
         | 
| 30221 | 
            -
                  const ret = getObject(arg0).next;
         | 
| 30222 | 
            -
                  return addHeapObject(ret);
         | 
| 30223 | 
            -
                };
         | 
| 30224 | 
            -
                imports.wbg.__wbg_next_bf3d83fc18df496e = function() {
         | 
| 30225 | 
            -
                  return handleError(function(arg0) {
         | 
| 30226 | 
            -
                    const ret = getObject(arg0).next();
         | 
| 30227 | 
            -
                    return addHeapObject(ret);
         | 
| 30228 | 
            -
                  }, arguments);
         | 
| 30229 | 
            -
                };
         | 
| 30230 | 
            -
                imports.wbg.__wbg_done_040f966faa9a72b3 = function(arg0) {
         | 
| 30231 | 
            -
                  const ret = getObject(arg0).done;
         | 
| 30232 | 
            -
                  return ret;
         | 
| 30233 | 
            -
                };
         | 
| 30234 | 
            -
                imports.wbg.__wbg_value_419afbd9b9574c4c = function(arg0) {
         | 
| 30235 | 
            -
                  const ret = getObject(arg0).value;
         | 
| 30236 | 
            -
                  return addHeapObject(ret);
         | 
| 30237 | 
            -
                };
         | 
| 30238 | 
            -
                imports.wbg.__wbg_iterator_4832ef1f15b0382b = function() {
         | 
| 30239 | 
            -
                  const ret = Symbol.iterator;
         | 
| 30240 | 
            -
                  return addHeapObject(ret);
         | 
| 30241 | 
            -
                };
         | 
| 30242 | 
            -
                imports.wbg.__wbg_get_a9cab131e3152c49 = function() {
         | 
| 30243 | 
            -
                  return handleError(function(arg0, arg1) {
         | 
| 30244 | 
            -
                    const ret = Reflect.get(getObject(arg0), getObject(arg1));
         | 
| 30245 | 
            -
                    return addHeapObject(ret);
         | 
| 30246 | 
            -
                  }, arguments);
         | 
| 30247 | 
            -
                };
         | 
| 30248 | 
            -
                imports.wbg.__wbg_call_ae78342adc33730a = function() {
         | 
| 30249 | 
            -
                  return handleError(function(arg0, arg1) {
         | 
| 30250 | 
            -
                    const ret = getObject(arg0).call(getObject(arg1));
         | 
| 30251 | 
            -
                    return addHeapObject(ret);
         | 
| 30252 | 
            -
                  }, arguments);
         | 
| 30253 | 
            -
                };
         | 
| 30254 | 
            -
                imports.wbg.__wbg_new_36359baae5a47e27 = function() {
         | 
| 30255 | 
            -
                  const ret = new Object();
         | 
| 30256 | 
            -
                  return addHeapObject(ret);
         | 
| 30257 | 
            -
                };
         | 
| 30258 | 
            -
                imports.wbg.__wbg_call_3ed288a247f13ea5 = function() {
         | 
| 30259 | 
            -
                  return handleError(function(arg0, arg1, arg2) {
         | 
| 30260 | 
            -
                    const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
         | 
| 30261 | 
            -
                    return addHeapObject(ret);
         | 
| 30262 | 
            -
                  }, arguments);
         | 
| 30263 | 
            -
                };
         | 
| 30264 | 
            -
                imports.wbg.__wbg_getTime_bffb1c09df09618b = function(arg0) {
         | 
| 30265 | 
            -
                  const ret = getObject(arg0).getTime();
         | 
| 30266 | 
            -
                  return ret;
         | 
| 30267 | 
            -
                };
         | 
| 30268 | 
            -
                imports.wbg.__wbg_new0_0ff7eb5c1486f3ec = function() {
         | 
| 30269 | 
            -
                  const ret = new Date();
         | 
| 30270 | 
            -
                  return addHeapObject(ret);
         | 
| 30271 | 
            -
                };
         | 
| 30272 | 
            -
                imports.wbg.__wbg_new_37705eed627d5ed9 = function(arg0, arg1) {
         | 
| 30273 | 
            -
                  try {
         | 
| 30274 | 
            -
                    var state0 = { a: arg0, b: arg1 };
         | 
| 30275 | 
            -
                    var cb0 = /* @__PURE__ */ __name((arg02, arg12) => {
         | 
| 30276 | 
            -
                      const a = state0.a;
         | 
| 30277 | 
            -
                      state0.a = 0;
         | 
| 30278 | 
            -
                      try {
         | 
| 30279 | 
            -
                        return __wbg_adapter_108(a, state0.b, arg02, arg12);
         | 
| 30280 | 
            -
                      } finally {
         | 
| 30281 | 
            -
                        state0.a = a;
         | 
| 30282 | 
            -
                      }
         | 
| 30283 | 
            -
                    }, "cb0");
         | 
| 30284 | 
            -
                    const ret = new Promise(cb0);
         | 
| 30285 | 
            -
                    return addHeapObject(ret);
         | 
| 30286 | 
            -
                  } finally {
         | 
| 30287 | 
            -
                    state0.a = state0.b = 0;
         | 
| 30288 | 
            -
                  }
         | 
| 30289 | 
            -
                };
         | 
| 30290 | 
            -
                imports.wbg.__wbg_resolve_a9a87bdd64e9e62c = function(arg0) {
         | 
| 30291 | 
            -
                  const ret = Promise.resolve(getObject(arg0));
         | 
| 30292 | 
            -
                  return addHeapObject(ret);
         | 
| 30293 | 
            -
                };
         | 
| 30294 | 
            -
                imports.wbg.__wbg_then_ce526c837d07b68f = function(arg0, arg1) {
         | 
| 30295 | 
            -
                  const ret = getObject(arg0).then(getObject(arg1));
         | 
| 30296 | 
            -
                  return addHeapObject(ret);
         | 
| 30297 | 
            -
                };
         | 
| 30298 | 
            -
                imports.wbg.__wbg_then_842e65b843962f56 = function(arg0, arg1, arg2) {
         | 
| 30299 | 
            -
                  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
         | 
| 30300 | 
            -
                  return addHeapObject(ret);
         | 
| 30301 | 
            -
                };
         | 
| 30302 | 
            -
                imports.wbg.__wbg_self_99737b4dcdf6f0d8 = function() {
         | 
| 30303 | 
            -
                  return handleError(function() {
         | 
| 30304 | 
            -
                    const ret = self.self;
         | 
| 30305 | 
            -
                    return addHeapObject(ret);
         | 
| 30306 | 
            -
                  }, arguments);
         | 
| 30307 | 
            -
                };
         | 
| 30308 | 
            -
                imports.wbg.__wbg_window_9b61fbbf3564c4fb = function() {
         | 
| 30309 | 
            -
                  return handleError(function() {
         | 
| 30310 | 
            -
                    const ret = window.window;
         | 
| 30311 | 
            -
                    return addHeapObject(ret);
         | 
| 30312 | 
            -
                  }, arguments);
         | 
| 30313 | 
            -
                };
         | 
| 30314 | 
            -
                imports.wbg.__wbg_globalThis_8e275ef40caea3a3 = function() {
         | 
| 30315 | 
            -
                  return handleError(function() {
         | 
| 30316 | 
            -
                    const ret = globalThis.globalThis;
         | 
| 30317 | 
            -
                    return addHeapObject(ret);
         | 
| 30318 | 
            -
                  }, arguments);
         | 
| 30319 | 
            -
                };
         | 
| 30320 | 
            -
                imports.wbg.__wbg_global_5de1e0f82bddcd27 = function() {
         | 
| 30321 | 
            -
                  return handleError(function() {
         | 
| 30322 | 
            -
                    const ret = global.global;
         | 
| 30323 | 
            -
                    return addHeapObject(ret);
         | 
| 30324 | 
            -
                  }, arguments);
         | 
| 30325 | 
            -
                };
         | 
| 30326 | 
            -
                imports.wbg.__wbg_buffer_7af23f65f6c64548 = function(arg0) {
         | 
| 30327 | 
            -
                  const ret = getObject(arg0).buffer;
         | 
| 30328 | 
            -
                  return addHeapObject(ret);
         | 
| 30329 | 
            -
                };
         | 
| 30330 | 
            -
                imports.wbg.__wbg_newwithbyteoffsetandlength_ce1e75f0ce5f7974 = function(arg0, arg1, arg2) {
         | 
| 30331 | 
            -
                  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
         | 
| 30332 | 
            -
                  return addHeapObject(ret);
         | 
| 30333 | 
            -
                };
         | 
| 30334 | 
            -
                imports.wbg.__wbg_new_cc9018bd6f283b6f = function(arg0) {
         | 
| 30335 | 
            -
                  const ret = new Uint8Array(getObject(arg0));
         | 
| 30336 | 
            -
                  return addHeapObject(ret);
         | 
| 30337 | 
            -
                };
         | 
| 30338 | 
            -
                imports.wbg.__wbg_set_f25e869e4565d2a2 = function(arg0, arg1, arg2) {
         | 
| 30339 | 
            -
                  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
         | 
| 30340 | 
            -
                };
         | 
| 30341 | 
            -
                imports.wbg.__wbg_length_0acb1cf9bbaf8519 = function(arg0) {
         | 
| 30342 | 
            -
                  const ret = getObject(arg0).length;
         | 
| 30343 | 
            -
                  return ret;
         | 
| 30344 | 
            -
                };
         | 
| 30345 | 
            -
                imports.wbg.__wbg_newwithlength_8f0657faca9f1422 = function(arg0) {
         | 
| 30346 | 
            -
                  const ret = new Uint8Array(arg0 >>> 0);
         | 
| 30347 | 
            -
                  return addHeapObject(ret);
         | 
| 30348 | 
            -
                };
         | 
| 30349 | 
            -
                imports.wbg.__wbg_subarray_da527dbd24eafb6b = function(arg0, arg1, arg2) {
         | 
| 30350 | 
            -
                  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
         | 
| 30351 | 
            -
                  return addHeapObject(ret);
         | 
| 30352 | 
            -
                };
         | 
| 30353 | 
            -
                imports.wbg.__wbg_has_ce995ec88636803d = function() {
         | 
| 30354 | 
            -
                  return handleError(function(arg0, arg1) {
         | 
| 30355 | 
            -
                    const ret = Reflect.has(getObject(arg0), getObject(arg1));
         | 
| 30356 | 
            -
                    return ret;
         | 
| 30357 | 
            -
                  }, arguments);
         | 
| 30358 | 
            -
                };
         | 
| 30359 | 
            -
                imports.wbg.__wbg_set_93b1c87ee2af852e = function() {
         | 
| 30360 | 
            -
                  return handleError(function(arg0, arg1, arg2) {
         | 
| 30361 | 
            -
                    const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
         | 
| 30362 | 
            -
                    return ret;
         | 
| 30363 | 
            -
                  }, arguments);
         | 
| 30364 | 
            -
                };
         | 
| 30365 | 
            -
                imports.wbg.__wbg_stringify_c760003feffcc1f2 = function() {
         | 
| 30366 | 
            -
                  return handleError(function(arg0) {
         | 
| 30367 | 
            -
                    const ret = JSON.stringify(getObject(arg0));
         | 
| 30368 | 
            -
                    return addHeapObject(ret);
         | 
| 30369 | 
            -
                  }, arguments);
         | 
| 30370 | 
            -
                };
         | 
| 30371 | 
            -
                imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
         | 
| 30372 | 
            -
                  const ret = debugString(getObject(arg1));
         | 
| 30373 | 
            -
                  const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 30374 | 
            -
                  const len0 = WASM_VECTOR_LEN;
         | 
| 30375 | 
            -
                  getInt32Memory0()[arg0 / 4 + 1] = len0;
         | 
| 30376 | 
            -
                  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
         | 
| 30377 | 
            -
                };
         | 
| 30378 | 
            -
                imports.wbg.__wbindgen_throw = function(arg0, arg1) {
         | 
| 30379 | 
            -
                  throw new Error(getStringFromWasm0(arg0, arg1));
         | 
| 30380 | 
            -
                };
         | 
| 30381 | 
            -
                imports.wbg.__wbindgen_memory = function() {
         | 
| 30382 | 
            -
                  const ret = wasm.memory;
         | 
| 30383 | 
            -
                  return addHeapObject(ret);
         | 
| 30384 | 
            -
                };
         | 
| 30385 | 
            -
                imports.wbg.__wbindgen_closure_wrapper10902 = function(arg0, arg1, arg2) {
         | 
| 30386 | 
            -
                  const ret = makeMutClosure(arg0, arg1, 3717, __wbg_adapter_24);
         | 
| 30387 | 
            -
                  return addHeapObject(ret);
         | 
| 30388 | 
            -
                };
         | 
| 30389 | 
            -
                if (typeof input === "string" || typeof Request === "function" && input instanceof Request || typeof URL === "function" && input instanceof URL) {
         | 
| 30390 | 
            -
                  input = fetch(input);
         | 
| 30391 | 
            -
                }
         | 
| 30392 | 
            -
                const { instance, module } = yield load(yield input, imports);
         | 
| 30393 | 
            -
                wasm = instance.exports;
         | 
| 30394 | 
            -
                init.__wbindgen_wasm_module = module;
         | 
| 30395 | 
            -
                return wasm;
         | 
| 30396 | 
            -
              });
         | 
| 30397 | 
            -
            }
         | 
| 30398 | 
            -
            __name(init, "init");
         | 
| 30399 | 
            -
            var didkit_wasm_default = init;
         | 
| 30400 | 
            -
             | 
| 30401 | 
            -
            // src/didkit/index.ts
         | 
| 30402 | 
            -
            var initialized = false;
         | 
| 30403 | 
            -
            var init2 = /* @__PURE__ */ __name((arg = "https://cdn.filestackcontent.com/jXExSjNXSerFVDMIYOgy") => __async(void 0, null, function* () {
         | 
| 30404 | 
            -
              if (initialized)
         | 
| 30405 | 
            -
                return;
         | 
| 30406 | 
            -
              initialized = true;
         | 
| 30407 | 
            -
              return didkit_wasm_default(arg);
         | 
| 30408 | 
            -
            }), "init");
         | 
| 30409 | 
            -
            var didkit_default = init2;
         | 
| 30410 | 
            -
             | 
| 30411 | 
            -
            // src/wallet/base/crypto.ts
         | 
| 30412 | 
            -
            import crypto2 from "isomorphic-webcrypto";
         | 
| 30413 | 
            -
            if (typeof window === "undefined")
         | 
| 30414 | 
            -
              globalThis.crypto = crypto2;
         | 
| 30415 | 
            -
             | 
| 30416 | 
            -
            // src/wallet/base/wallet.ts
         | 
| 30417 | 
            -
            var addPluginToWallet = /* @__PURE__ */ __name((wallet, plugin) => __async(void 0, null, function* () {
         | 
| 30418 | 
            -
              return generateWallet(wallet.contents, {
         | 
| 30419 | 
            -
                plugins: [...wallet.plugins, plugin]
         | 
| 30420 | 
            -
              });
         | 
| 30421 | 
            -
            }), "addPluginToWallet");
         | 
| 30422 | 
            -
            var addToWallet = /* @__PURE__ */ __name((wallet, content) => __async(void 0, null, function* () {
         | 
| 30423 | 
            -
              return generateWallet([...wallet.contents, content], wallet);
         | 
| 30424 | 
            -
            }), "addToWallet");
         | 
| 30425 | 
            -
            var removeFromWallet = /* @__PURE__ */ __name((wallet, contentId) => __async(void 0, null, function* () {
         | 
| 30426 | 
            -
              const clonedContents = JSON.parse(JSON.stringify(wallet.contents));
         | 
| 30427 | 
            -
              const content = clonedContents.find((c) => c.id === contentId);
         | 
| 30428 | 
            -
              return generateWallet(clonedContents.filter((i) => i.id !== content.id), wallet);
         | 
| 30429 | 
            -
            }), "removeFromWallet");
         | 
| 30430 | 
            -
            var bindMethods = /* @__PURE__ */ __name((wallet, pluginMethods) => Object.fromEntries(Object.entries(pluginMethods).map(([key2, method]) => [key2, method.bind(wallet, wallet)])), "bindMethods");
         | 
| 30431 | 
            -
            var generateWallet = /* @__PURE__ */ __name((..._0) => __async(void 0, [..._0], function* (contents = [], _wallet = {}) {
         | 
| 30432 | 
            -
              const { plugins = [] } = _wallet;
         | 
| 30433 | 
            -
              const pluginMethods = plugins.reduce((cumulativePluginMethods, plugin) => {
         | 
| 30434 | 
            -
                const newPluginMethods = __spreadValues(__spreadValues({}, cumulativePluginMethods), plugin.pluginMethods);
         | 
| 30435 | 
            -
                return newPluginMethods;
         | 
| 30436 | 
            -
              }, {});
         | 
| 30437 | 
            -
              const wallet = {
         | 
| 30438 | 
            -
                contents: [...contents],
         | 
| 30439 | 
            -
                add: function(content) {
         | 
| 30440 | 
            -
                  return addToWallet(this, content);
         | 
| 30441 | 
            -
                },
         | 
| 30442 | 
            -
                remove: function(contentId) {
         | 
| 30443 | 
            -
                  return removeFromWallet(this, contentId);
         | 
| 30444 | 
            -
                },
         | 
| 30445 | 
            -
                status: "UNLOCKED" /* Unlocked */,
         | 
| 30446 | 
            -
                plugins,
         | 
| 30447 | 
            -
                pluginMethods,
         | 
| 30448 | 
            -
                addPlugin: function(plugin) {
         | 
| 30449 | 
            -
                  return addPluginToWallet(this, plugin);
         | 
| 30450 | 
            -
                }
         | 
| 30451 | 
            -
              };
         | 
| 30452 | 
            -
              if (pluginMethods)
         | 
| 30453 | 
            -
                wallet.pluginMethods = bindMethods(wallet, pluginMethods);
         | 
| 30454 | 
            -
              return wallet;
         | 
| 30455 | 
            -
            }), "generateWallet");
         | 
| 30456 | 
            -
             | 
| 30457 | 
            -
            // ../../node_modules/.pnpm/did-resolver@3.2.2/node_modules/did-resolver/lib/resolver.module.js
         | 
| 30458 | 
            -
            function _catch(body, recover) {
         | 
| 30459 | 
            -
              try {
         | 
| 30460 | 
            -
                var result = body();
         | 
| 30461 | 
            -
              } catch (e) {
         | 
| 30462 | 
            -
                return recover(e);
         | 
| 30463 | 
            -
              }
         | 
| 30464 | 
            -
              if (result && result.then) {
         | 
| 30465 | 
            -
                return result.then(void 0, recover);
         | 
| 30466 | 
            -
              }
         | 
| 30467 | 
            -
              return result;
         | 
| 30468 | 
            -
            }
         | 
| 30469 | 
            -
            __name(_catch, "_catch");
         | 
| 30470 | 
            -
            function inMemoryCache() {
         | 
| 30471 | 
            -
              const cache = /* @__PURE__ */ new Map();
         | 
| 30472 | 
            -
              return function(parsed, resolve) {
         | 
| 30473 | 
            -
                try {
         | 
| 30474 | 
            -
                  let _temp2 = function(_result) {
         | 
| 30475 | 
            -
                    if (_exit)
         | 
| 30476 | 
            -
                      return _result;
         | 
| 30477 | 
            -
                    const cached = cache.get(parsed.didUrl);
         | 
| 30478 | 
            -
                    return cached !== void 0 ? cached : Promise.resolve(resolve()).then(function(result) {
         | 
| 30479 | 
            -
                      var _result$didResolution;
         | 
| 30480 | 
            -
                      if (((_result$didResolution = result.didResolutionMetadata) == null ? void 0 : _result$didResolution.error) !== "notFound") {
         | 
| 30481 | 
            -
                        cache.set(parsed.didUrl, result);
         | 
| 30482 | 
            -
                      }
         | 
| 30483 | 
            -
                      return result;
         | 
| 30484 | 
            -
                    });
         | 
| 30485 | 
            -
                  };
         | 
| 30486 | 
            -
                  __name(_temp2, "_temp2");
         | 
| 30487 | 
            -
                  let _exit;
         | 
| 30488 | 
            -
                  const _temp = function() {
         | 
| 30489 | 
            -
                    if (parsed.params && parsed.params["no-cache"] === "true") {
         | 
| 30490 | 
            -
                      return Promise.resolve(resolve()).then(function(_await$resolve) {
         | 
| 30491 | 
            -
                        _exit = 1;
         | 
| 30492 | 
            -
                        return _await$resolve;
         | 
| 30493 | 
            -
                      });
         | 
| 30494 | 
            -
                    }
         | 
| 30495 | 
            -
                  }();
         | 
| 30496 | 
            -
                  return Promise.resolve(_temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp));
         | 
| 30497 | 
            -
                } catch (e) {
         | 
| 30498 | 
            -
                  return Promise.reject(e);
         | 
| 30499 | 
            -
                }
         | 
| 30500 | 
            -
              };
         | 
| 30501 | 
            -
            }
         | 
| 30502 | 
            -
            __name(inMemoryCache, "inMemoryCache");
         | 
| 30503 | 
            -
            function noCache(parsed, resolve) {
         | 
| 30504 | 
            -
              return resolve();
         | 
| 30505 | 
            -
            }
         | 
| 30506 | 
            -
            __name(noCache, "noCache");
         | 
| 30507 | 
            -
            var PCT_ENCODED = "(?:%[0-9a-fA-F]{2})";
         | 
| 30508 | 
            -
            var ID_CHAR = `(?:[a-zA-Z0-9._-]|${PCT_ENCODED})`;
         | 
| 30509 | 
            -
            var METHOD = "([a-z0-9]+)";
         | 
| 30510 | 
            -
            var METHOD_ID = `((?:${ID_CHAR}*:)*(${ID_CHAR}+))`;
         | 
| 30511 | 
            -
            var PARAM_CHAR = "[a-zA-Z0-9_.:%-]";
         | 
| 30512 | 
            -
            var PARAM = `;${PARAM_CHAR}+=${PARAM_CHAR}*`;
         | 
| 30513 | 
            -
            var PARAMS = `((${PARAM})*)`;
         | 
| 30514 | 
            -
            var PATH = `(/[^#?]*)?`;
         | 
| 30515 | 
            -
            var QUERY = `([?][^#]*)?`;
         | 
| 30516 | 
            -
            var FRAGMENT = `(#.*)?`;
         | 
| 30517 | 
            -
            var DID_MATCHER = new RegExp(`^did:${METHOD}:${METHOD_ID}${PARAMS}${PATH}${QUERY}${FRAGMENT}$`);
         | 
| 30518 | 
            -
            function parse(didUrl) {
         | 
| 30519 | 
            -
              if (didUrl === "" || !didUrl)
         | 
| 30520 | 
            -
                return null;
         | 
| 30521 | 
            -
              const sections = didUrl.match(DID_MATCHER);
         | 
| 30522 | 
            -
              if (sections) {
         | 
| 30523 | 
            -
                const parts = {
         | 
| 30524 | 
            -
                  did: `did:${sections[1]}:${sections[2]}`,
         | 
| 30525 | 
            -
                  method: sections[1],
         | 
| 30526 | 
            -
                  id: sections[2],
         | 
| 30527 | 
            -
                  didUrl
         | 
| 30528 | 
            -
                };
         | 
| 30529 | 
            -
                if (sections[4]) {
         | 
| 30530 | 
            -
                  const params = sections[4].slice(1).split(";");
         | 
| 30531 | 
            -
                  parts.params = {};
         | 
| 30532 | 
            -
                  for (const p of params) {
         | 
| 30533 | 
            -
                    const kv = p.split("=");
         | 
| 30534 | 
            -
                    parts.params[kv[0]] = kv[1];
         | 
| 30535 | 
            -
                  }
         | 
| 30536 | 
            -
                }
         | 
| 30537 | 
            -
                if (sections[6])
         | 
| 30538 | 
            -
                  parts.path = sections[6];
         | 
| 30539 | 
            -
                if (sections[7])
         | 
| 30540 | 
            -
                  parts.query = sections[7].slice(1);
         | 
| 30541 | 
            -
                if (sections[8])
         | 
| 30542 | 
            -
                  parts.fragment = sections[8].slice(1);
         | 
| 30543 | 
            -
                return parts;
         | 
| 30544 | 
            -
              }
         | 
| 30545 | 
            -
              return null;
         | 
| 30546 | 
            -
            }
         | 
| 30547 | 
            -
            __name(parse, "parse");
         | 
| 30548 | 
            -
            var EMPTY_RESULT = {
         | 
| 30549 | 
            -
              didResolutionMetadata: {},
         | 
| 30550 | 
            -
              didDocument: null,
         | 
| 30551 | 
            -
              didDocumentMetadata: {}
         | 
| 30552 | 
            -
            };
         | 
| 30553 | 
            -
            function wrapLegacyResolver(resolve) {
         | 
| 30554 | 
            -
              return function(did, parsed, resolver) {
         | 
| 30555 | 
            -
                try {
         | 
| 30556 | 
            -
                  return Promise.resolve(_catch(function() {
         | 
| 30557 | 
            -
                    return Promise.resolve(resolve(did, parsed, resolver)).then(function(doc) {
         | 
| 30558 | 
            -
                      return __spreadProps(__spreadValues({}, EMPTY_RESULT), {
         | 
| 30559 | 
            -
                        didResolutionMetadata: {
         | 
| 30560 | 
            -
                          contentType: "application/did+ld+json"
         | 
| 30561 | 
            -
                        },
         | 
| 30562 | 
            -
                        didDocument: doc
         | 
| 30563 | 
            -
                      });
         | 
| 30564 | 
            -
                    });
         | 
| 30565 | 
            -
                  }, function(e) {
         | 
| 30566 | 
            -
                    return __spreadProps(__spreadValues({}, EMPTY_RESULT), {
         | 
| 30567 | 
            -
                      didResolutionMetadata: {
         | 
| 30568 | 
            -
                        error: "notFound",
         | 
| 30569 | 
            -
                        message: e.toString()
         | 
| 30570 | 
            -
                      }
         | 
| 30571 | 
            -
                    });
         | 
| 30572 | 
            -
                  }));
         | 
| 30573 | 
            -
                } catch (e) {
         | 
| 30574 | 
            -
                  return Promise.reject(e);
         | 
| 30575 | 
            -
                }
         | 
| 30576 | 
            -
              };
         | 
| 30577 | 
            -
            }
         | 
| 30578 | 
            -
            __name(wrapLegacyResolver, "wrapLegacyResolver");
         | 
| 30579 | 
            -
            var Resolver = class {
         | 
| 30580 | 
            -
              constructor(registry2 = {}, options = {}) {
         | 
| 30581 | 
            -
                this.registry = void 0;
         | 
| 30582 | 
            -
                this.cache = void 0;
         | 
| 30583 | 
            -
                this.registry = registry2;
         | 
| 30584 | 
            -
                this.cache = options.cache === true ? inMemoryCache() : options.cache || noCache;
         | 
| 30585 | 
            -
                if (options.legacyResolvers) {
         | 
| 30586 | 
            -
                  Object.keys(options.legacyResolvers).map((methodName) => {
         | 
| 30587 | 
            -
                    if (!this.registry[methodName]) {
         | 
| 30588 | 
            -
                      this.registry[methodName] = wrapLegacyResolver(options.legacyResolvers[methodName]);
         | 
| 30589 | 
            -
                    }
         | 
| 30590 | 
            -
                  });
         | 
| 30591 | 
            -
                }
         | 
| 30592 | 
            -
              }
         | 
| 30593 | 
            -
              resolve(didUrl, options = {}) {
         | 
| 30594 | 
            -
                try {
         | 
| 30595 | 
            -
                  const _this = this;
         | 
| 30596 | 
            -
                  const parsed = parse(didUrl);
         | 
| 30597 | 
            -
                  if (parsed === null) {
         | 
| 30598 | 
            -
                    return Promise.resolve(__spreadProps(__spreadValues({}, EMPTY_RESULT), {
         | 
| 30599 | 
            -
                      didResolutionMetadata: {
         | 
| 30600 | 
            -
                        error: "invalidDid"
         | 
| 30601 | 
            -
                      }
         | 
| 30602 | 
            -
                    }));
         | 
| 30603 | 
            -
                  }
         | 
| 30604 | 
            -
                  const resolver = _this.registry[parsed.method];
         | 
| 30605 | 
            -
                  if (!resolver) {
         | 
| 30606 | 
            -
                    return Promise.resolve(__spreadProps(__spreadValues({}, EMPTY_RESULT), {
         | 
| 30607 | 
            -
                      didResolutionMetadata: {
         | 
| 30608 | 
            -
                        error: "unsupportedDidMethod"
         | 
| 30609 | 
            -
                      }
         | 
| 30610 | 
            -
                    }));
         | 
| 30611 | 
            -
                  }
         | 
| 30612 | 
            -
                  return Promise.resolve(_this.cache(parsed, () => resolver(parsed.did, parsed, _this, options)));
         | 
| 30613 | 
            -
                } catch (e) {
         | 
| 30614 | 
            -
                  return Promise.reject(e);
         | 
| 30615 | 
            -
                }
         | 
| 30616 | 
            -
              }
         | 
| 30617 | 
            -
            };
         | 
| 30618 | 
            -
            __name(Resolver, "Resolver");
         | 
| 30619 | 
            -
             | 
| 30620 | 
            -
            // ../../node_modules/.pnpm/uint8arrays@3.0.0/node_modules/uint8arrays/esm/src/index.js
         | 
| 30621 | 
            -
            init_concat();
         | 
| 30622 | 
            -
            init_from_string();
         | 
| 30623 | 
            -
            init_to_string();
         | 
| 30624 | 
            -
             | 
| 30625 | 
            -
            // ../../node_modules/.pnpm/did-jwt@5.9.0/node_modules/did-jwt/lib/index.module.js
         | 
| 30626 | 
            -
            init_basics();
         | 
| 30627 | 
            -
            var import_sha256 = __toESM(require_sha256());
         | 
| 30628 | 
            -
            var import_js_sha3 = __toESM(require_sha3());
         | 
| 30629 | 
            -
            var import_elliptic = __toESM(require_elliptic());
         | 
| 30630 | 
            -
            var import_ed25519 = __toESM(require_ed25519());
         | 
| 30631 | 
            -
            var import_canonicalize = __toESM(require_canonicalize());
         | 
| 30632 | 
            -
            var import_x25519 = __toESM(require_x25519());
         | 
| 30633 | 
            -
            var import_xchacha20poly1305 = __toESM(require_xchacha20poly1305());
         | 
| 30634 | 
            -
            var import_random = __toESM(require_random());
         | 
| 30635 | 
            -
            function bytesToBase64url(b) {
         | 
| 30636 | 
            -
              return toString3(b, "base64url");
         | 
| 30637 | 
            -
            }
         | 
| 30638 | 
            -
            __name(bytesToBase64url, "bytesToBase64url");
         | 
| 30639 | 
            -
            function base64ToBytes(s) {
         | 
| 30640 | 
            -
              const inputBase64Url = s.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
         | 
| 30641 | 
            -
              return fromString2(inputBase64Url, "base64url");
         | 
| 30642 | 
            -
            }
         | 
| 30643 | 
            -
            __name(base64ToBytes, "base64ToBytes");
         | 
| 30644 | 
            -
            function base58ToBytes(s) {
         | 
| 30645 | 
            -
              return fromString2(s, "base58btc");
         | 
| 30646 | 
            -
            }
         | 
| 30647 | 
            -
            __name(base58ToBytes, "base58ToBytes");
         | 
| 30648 | 
            -
            function hexToBytes(s) {
         | 
| 30649 | 
            -
              const input = s.startsWith("0x") ? s.substring(2) : s;
         | 
| 30650 | 
            -
              return fromString2(input.toLowerCase(), "base16");
         | 
| 30651 | 
            -
            }
         | 
| 30652 | 
            -
            __name(hexToBytes, "hexToBytes");
         | 
| 30653 | 
            -
            function encodeBase64url(s) {
         | 
| 30654 | 
            -
              return bytesToBase64url(fromString2(s));
         | 
| 30655 | 
            -
            }
         | 
| 30656 | 
            -
            __name(encodeBase64url, "encodeBase64url");
         | 
| 30657 | 
            -
            function decodeBase64url(s) {
         | 
| 30658 | 
            -
              return toString3(base64ToBytes(s));
         | 
| 30659 | 
            -
            }
         | 
| 30660 | 
            -
            __name(decodeBase64url, "decodeBase64url");
         | 
| 30661 | 
            -
            function bytesToHex(b) {
         | 
| 30662 | 
            -
              return toString3(b, "base16");
         | 
| 30663 | 
            -
            }
         | 
| 30664 | 
            -
            __name(bytesToHex, "bytesToHex");
         | 
| 30665 | 
            -
            function stringToBytes(s) {
         | 
| 30666 | 
            -
              return fromString2(s);
         | 
| 30010 | 
            +
            __name(bytesToHex, "bytesToHex");
         | 
| 30011 | 
            +
            function stringToBytes(s) {
         | 
| 30012 | 
            +
              return fromString2(s);
         | 
| 30667 30013 | 
             
            }
         | 
| 30668 30014 | 
             
            __name(stringToBytes, "stringToBytes");
         | 
| 30669 30015 | 
             
            function toJose({
         | 
| @@ -32446,7 +31792,7 @@ function decodeString64(data, pos, _minor, options) { | |
| 32446 31792 | 
             
              return toToken2(data, pos, 9, l, options);
         | 
| 32447 31793 | 
             
            }
         | 
| 32448 31794 | 
             
            __name(decodeString64, "decodeString64");
         | 
| 32449 | 
            -
            var  | 
| 31795 | 
            +
            var encodeString = encodeBytes;
         | 
| 32450 31796 |  | 
| 32451 31797 | 
             
            // ../../node_modules/.pnpm/cborg@1.9.4/node_modules/cborg/esm/lib/4array.js
         | 
| 32452 31798 | 
             
            function toToken3(_data, _pos, prefix, length2) {
         | 
| @@ -32926,7 +32272,7 @@ function makeCborEncoders() { | |
| 32926 32272 | 
             
              encoders[Type.uint.major] = encodeUint;
         | 
| 32927 32273 | 
             
              encoders[Type.negint.major] = encodeNegint;
         | 
| 32928 32274 | 
             
              encoders[Type.bytes.major] = encodeBytes;
         | 
| 32929 | 
            -
              encoders[Type.string.major] =  | 
| 32275 | 
            +
              encoders[Type.string.major] = encodeString;
         | 
| 32930 32276 | 
             
              encoders[Type.array.major] = encodeArray;
         | 
| 32931 32277 | 
             
              encoders[Type.map.major] = encodeMap;
         | 
| 32932 32278 | 
             
              encoders[Type.tag.major] = encodeTag;
         | 
| @@ -36271,7 +35617,7 @@ function HmacDRBG(options) { | |
| 36271 35617 | 
             
            }
         | 
| 36272 35618 | 
             
            __name(HmacDRBG, "HmacDRBG");
         | 
| 36273 35619 | 
             
            var hmacDrbg = HmacDRBG;
         | 
| 36274 | 
            -
            HmacDRBG.prototype._init = /* @__PURE__ */ __name(function  | 
| 35620 | 
            +
            HmacDRBG.prototype._init = /* @__PURE__ */ __name(function init(entropy, nonce, pers) {
         | 
| 36275 35621 | 
             
              var seed = entropy.concat(nonce).concat(pers);
         | 
| 36276 35622 | 
             
              this.K = new Array(this.outLen / 8);
         | 
| 36277 35623 | 
             
              this.V = new Array(this.outLen / 8);
         | 
| @@ -43224,22 +42570,62 @@ var getIDXPlugin = /* @__PURE__ */ __name((_0, _1) => __async(void 0, [_0, _1], | |
| 43224 42570 | 
             
              };
         | 
| 43225 42571 | 
             
            }), "getIDXPlugin");
         | 
| 43226 42572 |  | 
| 43227 | 
            -
            // src/wallet/plugins/didkey/ | 
| 42573 | 
            +
            // src/wallet/plugins/didkey/helpers.ts
         | 
| 42574 | 
            +
            var ED25519_METHODS = ["key", "tz", "pkh:tz", "pkh:tezos", "pkh:sol", "pkh:solana"];
         | 
| 42575 | 
            +
            var SECP256K1_METHODS = [
         | 
| 42576 | 
            +
              "key",
         | 
| 42577 | 
            +
              "tz",
         | 
| 42578 | 
            +
              "ethr",
         | 
| 42579 | 
            +
              "pkh:tz",
         | 
| 42580 | 
            +
              "pkh:tezos",
         | 
| 42581 | 
            +
              "pkh:eth",
         | 
| 42582 | 
            +
              "pkh:celo",
         | 
| 42583 | 
            +
              "pkh:poly",
         | 
| 42584 | 
            +
              "pkh:btc",
         | 
| 42585 | 
            +
              "pkh:doge",
         | 
| 42586 | 
            +
              "pkh:eip155",
         | 
| 42587 | 
            +
              "pkh:bip122"
         | 
| 42588 | 
            +
            ];
         | 
| 43228 42589 | 
             
            var isHex = /* @__PURE__ */ __name((str) => /^[0-9a-f]+$/i.test(str), "isHex");
         | 
| 43229 | 
            -
            var  | 
| 42590 | 
            +
            var getAlgorithmForDidMethod = /* @__PURE__ */ __name((didMethod) => {
         | 
| 42591 | 
            +
              if (ED25519_METHODS.includes(didMethod))
         | 
| 42592 | 
            +
                return "ed25519";
         | 
| 42593 | 
            +
              if (SECP256K1_METHODS.includes(didMethod) || didMethod.startsWith("pkh:eip155:") || didMethod.startsWith("pkh:bip122:")) {
         | 
| 42594 | 
            +
                return "secp256k1";
         | 
| 42595 | 
            +
              }
         | 
| 42596 | 
            +
              throw new Error("Unspported Did Method");
         | 
| 42597 | 
            +
            }, "getAlgorithmForDidMethod");
         | 
| 42598 | 
            +
             | 
| 42599 | 
            +
            // src/wallet/plugins/didkey/index.ts
         | 
| 42600 | 
            +
            var getDidKeyPlugin = /* @__PURE__ */ __name((wallet, key2) => __async(void 0, null, function* () {
         | 
| 43230 42601 | 
             
              if (key2.length === 0)
         | 
| 43231 42602 | 
             
                throw new Error("Please don't use an empty string for a key!");
         | 
| 43232 42603 | 
             
              if (!isHex(key2))
         | 
| 43233 42604 | 
             
                throw new Error("Key must be a hexadecimal string!");
         | 
| 43234 42605 | 
             
              if (key2.length > 64)
         | 
| 43235 42606 | 
             
                throw new Error("Key must be less than 64 characters");
         | 
| 43236 | 
            -
              const  | 
| 43237 | 
            -
              const  | 
| 42607 | 
            +
              const seed = key2.padStart(64, "0");
         | 
| 42608 | 
            +
              const seedBytes = toUint8Array(seed);
         | 
| 42609 | 
            +
              const memoizedDids = {};
         | 
| 42610 | 
            +
              const keyPairs = {
         | 
| 42611 | 
            +
                ed25519: wallet.pluginMethods.generateEd25519KeyFromBytes(seedBytes),
         | 
| 42612 | 
            +
                secp256k1: wallet.pluginMethods.generateSecp256k1KeyFromBytes(seedBytes)
         | 
| 42613 | 
            +
              };
         | 
| 43238 42614 | 
             
              return {
         | 
| 43239 42615 | 
             
                pluginMethods: {
         | 
| 43240 | 
            -
                  getSubjectDid: () =>  | 
| 43241 | 
            -
             | 
| 43242 | 
            -
             | 
| 42616 | 
            +
                  getSubjectDid: (_wallet, type) => {
         | 
| 42617 | 
            +
                    if (!memoizedDids[type]) {
         | 
| 42618 | 
            +
                      const algorithm = getAlgorithmForDidMethod(type);
         | 
| 42619 | 
            +
                      memoizedDids[type] = wallet.pluginMethods.keyToDid(type, keyPairs[algorithm]);
         | 
| 42620 | 
            +
                    }
         | 
| 42621 | 
            +
                    return memoizedDids[type];
         | 
| 42622 | 
            +
                  },
         | 
| 42623 | 
            +
                  getSubjectKeypair: (_wallet, type = "ed25519") => {
         | 
| 42624 | 
            +
                    if (!keyPairs[type])
         | 
| 42625 | 
            +
                      throw new Error("Unsupported algorithm");
         | 
| 42626 | 
            +
                    return keyPairs[type];
         | 
| 42627 | 
            +
                  },
         | 
| 42628 | 
            +
                  getKey: () => seed
         | 
| 43243 42629 | 
             
                }
         | 
| 43244 42630 | 
             
              };
         | 
| 43245 42631 | 
             
            }), "getDidKeyPlugin");
         | 
| @@ -43259,66 +42645,71 @@ var ExpirationPlugin = /* @__PURE__ */ __name((wallet) => ({ | |
| 43259 42645 | 
             
              }
         | 
| 43260 42646 | 
             
            }), "ExpirationPlugin");
         | 
| 43261 42647 |  | 
| 42648 | 
            +
            // src/wallet/helpers/wallet.helpers.ts
         | 
| 42649 | 
            +
            var recycleDependents = /* @__PURE__ */ __name((_methods) => ({}), "recycleDependents");
         | 
| 42650 | 
            +
             | 
| 43262 42651 | 
             
            // src/wallet/plugins/vc/issueCredential.ts
         | 
| 43263 | 
            -
            var  | 
| 43264 | 
            -
               | 
| 43265 | 
            -
             | 
| 43266 | 
            -
                 | 
| 43267 | 
            -
             | 
| 43268 | 
            -
             | 
| 43269 | 
            -
             | 
| 43270 | 
            -
             | 
| 42652 | 
            +
            var issueCredential = /* @__PURE__ */ __name((initWallet) => {
         | 
| 42653 | 
            +
              return (wallet, credential) => __async(void 0, null, function* () {
         | 
| 42654 | 
            +
                const kp = wallet.pluginMethods.getSubjectKeypair();
         | 
| 42655 | 
            +
                if (!kp)
         | 
| 42656 | 
            +
                  throw new Error("Cannot issue credential: Could not get subject keypair");
         | 
| 42657 | 
            +
                const options = {
         | 
| 42658 | 
            +
                  verificationMethod: yield initWallet.pluginMethods.keyToVerificationMethod("key", kp),
         | 
| 42659 | 
            +
                  proofPurpose: "assertionMethod"
         | 
| 42660 | 
            +
                };
         | 
| 42661 | 
            +
                return initWallet.pluginMethods.issueCredential(credential, options, kp);
         | 
| 43271 42662 | 
             
              });
         | 
| 43272 | 
            -
             | 
| 43273 | 
            -
            }), "issueCredential");
         | 
| 42663 | 
            +
            }, "issueCredential");
         | 
| 43274 42664 |  | 
| 43275 42665 | 
             
            // src/wallet/plugins/vc/verifyCredential.ts
         | 
| 43276 | 
            -
            var  | 
| 43277 | 
            -
              return  | 
| 43278 | 
            -
             | 
| 42666 | 
            +
            var verifyCredential = /* @__PURE__ */ __name((initWallet) => {
         | 
| 42667 | 
            +
              return (_wallet, credential) => __async(void 0, null, function* () {
         | 
| 42668 | 
            +
                return initWallet.pluginMethods.verifyCredential(credential);
         | 
| 42669 | 
            +
              });
         | 
| 42670 | 
            +
            }, "verifyCredential");
         | 
| 43279 42671 |  | 
| 43280 42672 | 
             
            // src/wallet/plugins/vc/issuePresentation.ts
         | 
| 43281 | 
            -
            var  | 
| 43282 | 
            -
               | 
| 43283 | 
            -
             | 
| 43284 | 
            -
                 | 
| 43285 | 
            -
             | 
| 43286 | 
            -
             | 
| 43287 | 
            -
             | 
| 43288 | 
            -
                 | 
| 43289 | 
            -
             | 
| 43290 | 
            -
             | 
| 43291 | 
            -
             | 
| 43292 | 
            -
             | 
| 43293 | 
            -
             | 
| 43294 | 
            -
             | 
| 43295 | 
            -
             | 
| 43296 | 
            -
             | 
| 43297 | 
            -
             | 
| 43298 | 
            -
             | 
| 42673 | 
            +
            var issuePresentation = /* @__PURE__ */ __name((initWallet) => {
         | 
| 42674 | 
            +
              return (wallet, credential) => __async(void 0, null, function* () {
         | 
| 42675 | 
            +
                const did = wallet.pluginMethods.getSubjectDid("key");
         | 
| 42676 | 
            +
                if (!did)
         | 
| 42677 | 
            +
                  throw new Error("Cannot create presentation: No holder key found");
         | 
| 42678 | 
            +
                const holder = did;
         | 
| 42679 | 
            +
                const kp = wallet.pluginMethods.getSubjectKeypair();
         | 
| 42680 | 
            +
                if (!kp)
         | 
| 42681 | 
            +
                  throw new Error("Cannot issue credential: Could not get subject keypair");
         | 
| 42682 | 
            +
                const options = {
         | 
| 42683 | 
            +
                  verificationMethod: yield initWallet.pluginMethods.keyToVerificationMethod("key", kp),
         | 
| 42684 | 
            +
                  proofPurpose: "assertionMethod"
         | 
| 42685 | 
            +
                };
         | 
| 42686 | 
            +
                const presentation = {
         | 
| 42687 | 
            +
                  "@context": ["https://www.w3.org/2018/credentials/v1"],
         | 
| 42688 | 
            +
                  type: ["VerifiablePresentation"],
         | 
| 42689 | 
            +
                  holder,
         | 
| 42690 | 
            +
                  verifiableCredential: credential
         | 
| 42691 | 
            +
                };
         | 
| 42692 | 
            +
                return initWallet.pluginMethods.issuePresentation(presentation, options, kp);
         | 
| 43299 42693 | 
             
              });
         | 
| 43300 | 
            -
             | 
| 43301 | 
            -
            }), "issuePresentation");
         | 
| 42694 | 
            +
            }, "issuePresentation");
         | 
| 43302 42695 |  | 
| 43303 42696 | 
             
            // src/wallet/plugins/vc/verifyPresentation.ts
         | 
| 43304 | 
            -
            var  | 
| 43305 | 
            -
              return  | 
| 43306 | 
            -
             | 
| 42697 | 
            +
            var verifyPresentation = /* @__PURE__ */ __name((initWallet) => {
         | 
| 42698 | 
            +
              return (_wallet, presentation) => __async(void 0, null, function* () {
         | 
| 42699 | 
            +
                return initWallet.pluginMethods.verifyPresentation(presentation);
         | 
| 42700 | 
            +
              });
         | 
| 42701 | 
            +
            }, "verifyPresentation");
         | 
| 43307 42702 |  | 
| 43308 42703 | 
             
            // src/wallet/plugins/vc/vc.ts
         | 
| 43309 42704 | 
             
            var getVCPlugin = /* @__PURE__ */ __name((wallet) => __async(void 0, null, function* () {
         | 
| 43310 42705 | 
             
              return {
         | 
| 43311 | 
            -
                pluginMethods: __spreadProps(__spreadValues({}, wallet.pluginMethods), {
         | 
| 43312 | 
            -
                  issueCredential:  | 
| 43313 | 
            -
                  verifyCredential: ( | 
| 43314 | 
            -
             | 
| 43315 | 
            -
                   | 
| 43316 | 
            -
                  issuePresentation: issuePresentation2,
         | 
| 43317 | 
            -
                  verifyPresentation: (_wallet, presentation) => __async(void 0, null, function* () {
         | 
| 43318 | 
            -
                    return verifyPresentation2(presentation);
         | 
| 43319 | 
            -
                  }),
         | 
| 42706 | 
            +
                pluginMethods: __spreadProps(__spreadValues({}, recycleDependents(wallet.pluginMethods)), {
         | 
| 42707 | 
            +
                  issueCredential: issueCredential(wallet),
         | 
| 42708 | 
            +
                  verifyCredential: verifyCredential(wallet),
         | 
| 42709 | 
            +
                  issuePresentation: issuePresentation(wallet),
         | 
| 42710 | 
            +
                  verifyPresentation: verifyPresentation(wallet),
         | 
| 43320 42711 | 
             
                  getTestVc: (_wallet, subject = "did:example:d23dd687a7dc6787646f2eb98d0") => {
         | 
| 43321 | 
            -
                    const did = _wallet.pluginMethods.getSubjectDid();
         | 
| 42712 | 
            +
                    const did = _wallet.pluginMethods.getSubjectDid("key");
         | 
| 43322 42713 | 
             
                    return {
         | 
| 43323 42714 | 
             
                      "@context": ["https://www.w3.org/2018/credentials/v1"],
         | 
| 43324 42715 | 
             
                      id: "http://example.org/credentials/3731",
         | 
| @@ -46361,6 +45752,11 @@ var UnsignedAchievementCredentialValidator = UnsignedVCValidator.extend({ | |
| 46361 45752 | 
             
            var AchievementCredentialValidator = UnsignedAchievementCredentialValidator.extend({
         | 
| 46362 45753 | 
             
              proof: ProofValidator.or(ProofValidator.array())
         | 
| 46363 45754 | 
             
            });
         | 
| 45755 | 
            +
            var VerificationCheckValidator = mod.object({
         | 
| 45756 | 
            +
              checks: mod.string().array(),
         | 
| 45757 | 
            +
              warnings: mod.string().array(),
         | 
| 45758 | 
            +
              errors: mod.string().array()
         | 
| 45759 | 
            +
            });
         | 
| 46364 45760 | 
             
            var VerificationStatusValidator = mod.enum(["Success", "Failed", "Error"]);
         | 
| 46365 45761 | 
             
            var VerificationStatusEnum = VerificationStatusValidator.enum;
         | 
| 46366 45762 | 
             
            var VerificationItemValidator = mod.object({
         | 
| @@ -47558,449 +46954,1163 @@ var formatters2 = { | |
| 47558 46954 | 
             
                      context: "formatting"
         | 
| 47559 46955 | 
             
                    });
         | 
| 47560 46956 | 
             
                }
         | 
| 47561 | 
            -
              },
         | 
| 47562 | 
            -
              B: function(date, token, localize2) {
         | 
| 47563 | 
            -
                var hours = date.getUTCHours();
         | 
| 47564 | 
            -
                var dayPeriodEnumValue;
         | 
| 47565 | 
            -
                if (hours >= 17) {
         | 
| 47566 | 
            -
                  dayPeriodEnumValue = dayPeriodEnum.evening;
         | 
| 47567 | 
            -
                } else if (hours >= 12) {
         | 
| 47568 | 
            -
                  dayPeriodEnumValue = dayPeriodEnum.afternoon;
         | 
| 47569 | 
            -
                } else if (hours >= 4) {
         | 
| 47570 | 
            -
                  dayPeriodEnumValue = dayPeriodEnum.morning;
         | 
| 47571 | 
            -
                } else {
         | 
| 47572 | 
            -
                  dayPeriodEnumValue = dayPeriodEnum.night;
         | 
| 46957 | 
            +
              },
         | 
| 46958 | 
            +
              B: function(date, token, localize2) {
         | 
| 46959 | 
            +
                var hours = date.getUTCHours();
         | 
| 46960 | 
            +
                var dayPeriodEnumValue;
         | 
| 46961 | 
            +
                if (hours >= 17) {
         | 
| 46962 | 
            +
                  dayPeriodEnumValue = dayPeriodEnum.evening;
         | 
| 46963 | 
            +
                } else if (hours >= 12) {
         | 
| 46964 | 
            +
                  dayPeriodEnumValue = dayPeriodEnum.afternoon;
         | 
| 46965 | 
            +
                } else if (hours >= 4) {
         | 
| 46966 | 
            +
                  dayPeriodEnumValue = dayPeriodEnum.morning;
         | 
| 46967 | 
            +
                } else {
         | 
| 46968 | 
            +
                  dayPeriodEnumValue = dayPeriodEnum.night;
         | 
| 46969 | 
            +
                }
         | 
| 46970 | 
            +
                switch (token) {
         | 
| 46971 | 
            +
                  case "B":
         | 
| 46972 | 
            +
                  case "BB":
         | 
| 46973 | 
            +
                  case "BBB":
         | 
| 46974 | 
            +
                    return localize2.dayPeriod(dayPeriodEnumValue, {
         | 
| 46975 | 
            +
                      width: "abbreviated",
         | 
| 46976 | 
            +
                      context: "formatting"
         | 
| 46977 | 
            +
                    });
         | 
| 46978 | 
            +
                  case "BBBBB":
         | 
| 46979 | 
            +
                    return localize2.dayPeriod(dayPeriodEnumValue, {
         | 
| 46980 | 
            +
                      width: "narrow",
         | 
| 46981 | 
            +
                      context: "formatting"
         | 
| 46982 | 
            +
                    });
         | 
| 46983 | 
            +
                  case "BBBB":
         | 
| 46984 | 
            +
                  default:
         | 
| 46985 | 
            +
                    return localize2.dayPeriod(dayPeriodEnumValue, {
         | 
| 46986 | 
            +
                      width: "wide",
         | 
| 46987 | 
            +
                      context: "formatting"
         | 
| 46988 | 
            +
                    });
         | 
| 46989 | 
            +
                }
         | 
| 46990 | 
            +
              },
         | 
| 46991 | 
            +
              h: function(date, token, localize2) {
         | 
| 46992 | 
            +
                if (token === "ho") {
         | 
| 46993 | 
            +
                  var hours = date.getUTCHours() % 12;
         | 
| 46994 | 
            +
                  if (hours === 0)
         | 
| 46995 | 
            +
                    hours = 12;
         | 
| 46996 | 
            +
                  return localize2.ordinalNumber(hours, {
         | 
| 46997 | 
            +
                    unit: "hour"
         | 
| 46998 | 
            +
                  });
         | 
| 46999 | 
            +
                }
         | 
| 47000 | 
            +
                return lightFormatters_default.h(date, token);
         | 
| 47001 | 
            +
              },
         | 
| 47002 | 
            +
              H: function(date, token, localize2) {
         | 
| 47003 | 
            +
                if (token === "Ho") {
         | 
| 47004 | 
            +
                  return localize2.ordinalNumber(date.getUTCHours(), {
         | 
| 47005 | 
            +
                    unit: "hour"
         | 
| 47006 | 
            +
                  });
         | 
| 47007 | 
            +
                }
         | 
| 47008 | 
            +
                return lightFormatters_default.H(date, token);
         | 
| 47009 | 
            +
              },
         | 
| 47010 | 
            +
              K: function(date, token, localize2) {
         | 
| 47011 | 
            +
                var hours = date.getUTCHours() % 12;
         | 
| 47012 | 
            +
                if (token === "Ko") {
         | 
| 47013 | 
            +
                  return localize2.ordinalNumber(hours, {
         | 
| 47014 | 
            +
                    unit: "hour"
         | 
| 47015 | 
            +
                  });
         | 
| 47016 | 
            +
                }
         | 
| 47017 | 
            +
                return addLeadingZeros(hours, token.length);
         | 
| 47018 | 
            +
              },
         | 
| 47019 | 
            +
              k: function(date, token, localize2) {
         | 
| 47020 | 
            +
                var hours = date.getUTCHours();
         | 
| 47021 | 
            +
                if (hours === 0)
         | 
| 47022 | 
            +
                  hours = 24;
         | 
| 47023 | 
            +
                if (token === "ko") {
         | 
| 47024 | 
            +
                  return localize2.ordinalNumber(hours, {
         | 
| 47025 | 
            +
                    unit: "hour"
         | 
| 47026 | 
            +
                  });
         | 
| 47027 | 
            +
                }
         | 
| 47028 | 
            +
                return addLeadingZeros(hours, token.length);
         | 
| 47029 | 
            +
              },
         | 
| 47030 | 
            +
              m: function(date, token, localize2) {
         | 
| 47031 | 
            +
                if (token === "mo") {
         | 
| 47032 | 
            +
                  return localize2.ordinalNumber(date.getUTCMinutes(), {
         | 
| 47033 | 
            +
                    unit: "minute"
         | 
| 47034 | 
            +
                  });
         | 
| 47035 | 
            +
                }
         | 
| 47036 | 
            +
                return lightFormatters_default.m(date, token);
         | 
| 47037 | 
            +
              },
         | 
| 47038 | 
            +
              s: function(date, token, localize2) {
         | 
| 47039 | 
            +
                if (token === "so") {
         | 
| 47040 | 
            +
                  return localize2.ordinalNumber(date.getUTCSeconds(), {
         | 
| 47041 | 
            +
                    unit: "second"
         | 
| 47042 | 
            +
                  });
         | 
| 47043 | 
            +
                }
         | 
| 47044 | 
            +
                return lightFormatters_default.s(date, token);
         | 
| 47045 | 
            +
              },
         | 
| 47046 | 
            +
              S: function(date, token) {
         | 
| 47047 | 
            +
                return lightFormatters_default.S(date, token);
         | 
| 47048 | 
            +
              },
         | 
| 47049 | 
            +
              X: function(date, token, _localize, options) {
         | 
| 47050 | 
            +
                var originalDate = options._originalDate || date;
         | 
| 47051 | 
            +
                var timezoneOffset = originalDate.getTimezoneOffset();
         | 
| 47052 | 
            +
                if (timezoneOffset === 0) {
         | 
| 47053 | 
            +
                  return "Z";
         | 
| 47054 | 
            +
                }
         | 
| 47055 | 
            +
                switch (token) {
         | 
| 47056 | 
            +
                  case "X":
         | 
| 47057 | 
            +
                    return formatTimezoneWithOptionalMinutes(timezoneOffset);
         | 
| 47058 | 
            +
                  case "XXXX":
         | 
| 47059 | 
            +
                  case "XX":
         | 
| 47060 | 
            +
                    return formatTimezone(timezoneOffset);
         | 
| 47061 | 
            +
                  case "XXXXX":
         | 
| 47062 | 
            +
                  case "XXX":
         | 
| 47063 | 
            +
                  default:
         | 
| 47064 | 
            +
                    return formatTimezone(timezoneOffset, ":");
         | 
| 47065 | 
            +
                }
         | 
| 47066 | 
            +
              },
         | 
| 47067 | 
            +
              x: function(date, token, _localize, options) {
         | 
| 47068 | 
            +
                var originalDate = options._originalDate || date;
         | 
| 47069 | 
            +
                var timezoneOffset = originalDate.getTimezoneOffset();
         | 
| 47070 | 
            +
                switch (token) {
         | 
| 47071 | 
            +
                  case "x":
         | 
| 47072 | 
            +
                    return formatTimezoneWithOptionalMinutes(timezoneOffset);
         | 
| 47073 | 
            +
                  case "xxxx":
         | 
| 47074 | 
            +
                  case "xx":
         | 
| 47075 | 
            +
                    return formatTimezone(timezoneOffset);
         | 
| 47076 | 
            +
                  case "xxxxx":
         | 
| 47077 | 
            +
                  case "xxx":
         | 
| 47078 | 
            +
                  default:
         | 
| 47079 | 
            +
                    return formatTimezone(timezoneOffset, ":");
         | 
| 47080 | 
            +
                }
         | 
| 47081 | 
            +
              },
         | 
| 47082 | 
            +
              O: function(date, token, _localize, options) {
         | 
| 47083 | 
            +
                var originalDate = options._originalDate || date;
         | 
| 47084 | 
            +
                var timezoneOffset = originalDate.getTimezoneOffset();
         | 
| 47085 | 
            +
                switch (token) {
         | 
| 47086 | 
            +
                  case "O":
         | 
| 47087 | 
            +
                  case "OO":
         | 
| 47088 | 
            +
                  case "OOO":
         | 
| 47089 | 
            +
                    return "GMT" + formatTimezoneShort(timezoneOffset, ":");
         | 
| 47090 | 
            +
                  case "OOOO":
         | 
| 47091 | 
            +
                  default:
         | 
| 47092 | 
            +
                    return "GMT" + formatTimezone(timezoneOffset, ":");
         | 
| 47093 | 
            +
                }
         | 
| 47094 | 
            +
              },
         | 
| 47095 | 
            +
              z: function(date, token, _localize, options) {
         | 
| 47096 | 
            +
                var originalDate = options._originalDate || date;
         | 
| 47097 | 
            +
                var timezoneOffset = originalDate.getTimezoneOffset();
         | 
| 47098 | 
            +
                switch (token) {
         | 
| 47099 | 
            +
                  case "z":
         | 
| 47100 | 
            +
                  case "zz":
         | 
| 47101 | 
            +
                  case "zzz":
         | 
| 47102 | 
            +
                    return "GMT" + formatTimezoneShort(timezoneOffset, ":");
         | 
| 47103 | 
            +
                  case "zzzz":
         | 
| 47104 | 
            +
                  default:
         | 
| 47105 | 
            +
                    return "GMT" + formatTimezone(timezoneOffset, ":");
         | 
| 47106 | 
            +
                }
         | 
| 47107 | 
            +
              },
         | 
| 47108 | 
            +
              t: function(date, token, _localize, options) {
         | 
| 47109 | 
            +
                var originalDate = options._originalDate || date;
         | 
| 47110 | 
            +
                var timestamp = Math.floor(originalDate.getTime() / 1e3);
         | 
| 47111 | 
            +
                return addLeadingZeros(timestamp, token.length);
         | 
| 47112 | 
            +
              },
         | 
| 47113 | 
            +
              T: function(date, token, _localize, options) {
         | 
| 47114 | 
            +
                var originalDate = options._originalDate || date;
         | 
| 47115 | 
            +
                var timestamp = originalDate.getTime();
         | 
| 47116 | 
            +
                return addLeadingZeros(timestamp, token.length);
         | 
| 47117 | 
            +
              }
         | 
| 47118 | 
            +
            };
         | 
| 47119 | 
            +
            function formatTimezoneShort(offset, dirtyDelimiter) {
         | 
| 47120 | 
            +
              var sign5 = offset > 0 ? "-" : "+";
         | 
| 47121 | 
            +
              var absOffset = Math.abs(offset);
         | 
| 47122 | 
            +
              var hours = Math.floor(absOffset / 60);
         | 
| 47123 | 
            +
              var minutes = absOffset % 60;
         | 
| 47124 | 
            +
              if (minutes === 0) {
         | 
| 47125 | 
            +
                return sign5 + String(hours);
         | 
| 47126 | 
            +
              }
         | 
| 47127 | 
            +
              var delimiter = dirtyDelimiter || "";
         | 
| 47128 | 
            +
              return sign5 + String(hours) + delimiter + addLeadingZeros(minutes, 2);
         | 
| 47129 | 
            +
            }
         | 
| 47130 | 
            +
            __name(formatTimezoneShort, "formatTimezoneShort");
         | 
| 47131 | 
            +
            function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
         | 
| 47132 | 
            +
              if (offset % 60 === 0) {
         | 
| 47133 | 
            +
                var sign5 = offset > 0 ? "-" : "+";
         | 
| 47134 | 
            +
                return sign5 + addLeadingZeros(Math.abs(offset) / 60, 2);
         | 
| 47135 | 
            +
              }
         | 
| 47136 | 
            +
              return formatTimezone(offset, dirtyDelimiter);
         | 
| 47137 | 
            +
            }
         | 
| 47138 | 
            +
            __name(formatTimezoneWithOptionalMinutes, "formatTimezoneWithOptionalMinutes");
         | 
| 47139 | 
            +
            function formatTimezone(offset, dirtyDelimiter) {
         | 
| 47140 | 
            +
              var delimiter = dirtyDelimiter || "";
         | 
| 47141 | 
            +
              var sign5 = offset > 0 ? "-" : "+";
         | 
| 47142 | 
            +
              var absOffset = Math.abs(offset);
         | 
| 47143 | 
            +
              var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
         | 
| 47144 | 
            +
              var minutes = addLeadingZeros(absOffset % 60, 2);
         | 
| 47145 | 
            +
              return sign5 + hours + delimiter + minutes;
         | 
| 47146 | 
            +
            }
         | 
| 47147 | 
            +
            __name(formatTimezone, "formatTimezone");
         | 
| 47148 | 
            +
            var formatters_default = formatters2;
         | 
| 47149 | 
            +
             | 
| 47150 | 
            +
            // ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/longFormatters/index.js
         | 
| 47151 | 
            +
            function dateLongFormatter(pattern, formatLong2) {
         | 
| 47152 | 
            +
              switch (pattern) {
         | 
| 47153 | 
            +
                case "P":
         | 
| 47154 | 
            +
                  return formatLong2.date({
         | 
| 47155 | 
            +
                    width: "short"
         | 
| 47156 | 
            +
                  });
         | 
| 47157 | 
            +
                case "PP":
         | 
| 47158 | 
            +
                  return formatLong2.date({
         | 
| 47159 | 
            +
                    width: "medium"
         | 
| 47160 | 
            +
                  });
         | 
| 47161 | 
            +
                case "PPP":
         | 
| 47162 | 
            +
                  return formatLong2.date({
         | 
| 47163 | 
            +
                    width: "long"
         | 
| 47164 | 
            +
                  });
         | 
| 47165 | 
            +
                case "PPPP":
         | 
| 47166 | 
            +
                default:
         | 
| 47167 | 
            +
                  return formatLong2.date({
         | 
| 47168 | 
            +
                    width: "full"
         | 
| 47169 | 
            +
                  });
         | 
| 47170 | 
            +
              }
         | 
| 47171 | 
            +
            }
         | 
| 47172 | 
            +
            __name(dateLongFormatter, "dateLongFormatter");
         | 
| 47173 | 
            +
            function timeLongFormatter(pattern, formatLong2) {
         | 
| 47174 | 
            +
              switch (pattern) {
         | 
| 47175 | 
            +
                case "p":
         | 
| 47176 | 
            +
                  return formatLong2.time({
         | 
| 47177 | 
            +
                    width: "short"
         | 
| 47178 | 
            +
                  });
         | 
| 47179 | 
            +
                case "pp":
         | 
| 47180 | 
            +
                  return formatLong2.time({
         | 
| 47181 | 
            +
                    width: "medium"
         | 
| 47182 | 
            +
                  });
         | 
| 47183 | 
            +
                case "ppp":
         | 
| 47184 | 
            +
                  return formatLong2.time({
         | 
| 47185 | 
            +
                    width: "long"
         | 
| 47186 | 
            +
                  });
         | 
| 47187 | 
            +
                case "pppp":
         | 
| 47188 | 
            +
                default:
         | 
| 47189 | 
            +
                  return formatLong2.time({
         | 
| 47190 | 
            +
                    width: "full"
         | 
| 47191 | 
            +
                  });
         | 
| 47192 | 
            +
              }
         | 
| 47193 | 
            +
            }
         | 
| 47194 | 
            +
            __name(timeLongFormatter, "timeLongFormatter");
         | 
| 47195 | 
            +
            function dateTimeLongFormatter(pattern, formatLong2) {
         | 
| 47196 | 
            +
              var matchResult = pattern.match(/(P+)(p+)?/) || [];
         | 
| 47197 | 
            +
              var datePattern = matchResult[1];
         | 
| 47198 | 
            +
              var timePattern = matchResult[2];
         | 
| 47199 | 
            +
              if (!timePattern) {
         | 
| 47200 | 
            +
                return dateLongFormatter(pattern, formatLong2);
         | 
| 47201 | 
            +
              }
         | 
| 47202 | 
            +
              var dateTimeFormat;
         | 
| 47203 | 
            +
              switch (datePattern) {
         | 
| 47204 | 
            +
                case "P":
         | 
| 47205 | 
            +
                  dateTimeFormat = formatLong2.dateTime({
         | 
| 47206 | 
            +
                    width: "short"
         | 
| 47207 | 
            +
                  });
         | 
| 47208 | 
            +
                  break;
         | 
| 47209 | 
            +
                case "PP":
         | 
| 47210 | 
            +
                  dateTimeFormat = formatLong2.dateTime({
         | 
| 47211 | 
            +
                    width: "medium"
         | 
| 47212 | 
            +
                  });
         | 
| 47213 | 
            +
                  break;
         | 
| 47214 | 
            +
                case "PPP":
         | 
| 47215 | 
            +
                  dateTimeFormat = formatLong2.dateTime({
         | 
| 47216 | 
            +
                    width: "long"
         | 
| 47217 | 
            +
                  });
         | 
| 47218 | 
            +
                  break;
         | 
| 47219 | 
            +
                case "PPPP":
         | 
| 47220 | 
            +
                default:
         | 
| 47221 | 
            +
                  dateTimeFormat = formatLong2.dateTime({
         | 
| 47222 | 
            +
                    width: "full"
         | 
| 47223 | 
            +
                  });
         | 
| 47224 | 
            +
                  break;
         | 
| 47225 | 
            +
              }
         | 
| 47226 | 
            +
              return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
         | 
| 47227 | 
            +
            }
         | 
| 47228 | 
            +
            __name(dateTimeLongFormatter, "dateTimeLongFormatter");
         | 
| 47229 | 
            +
            var longFormatters = {
         | 
| 47230 | 
            +
              p: timeLongFormatter,
         | 
| 47231 | 
            +
              P: dateTimeLongFormatter
         | 
| 47232 | 
            +
            };
         | 
| 47233 | 
            +
            var longFormatters_default = longFormatters;
         | 
| 47234 | 
            +
             | 
| 47235 | 
            +
            // ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/protectedTokens/index.js
         | 
| 47236 | 
            +
            var protectedDayOfYearTokens = ["D", "DD"];
         | 
| 47237 | 
            +
            var protectedWeekYearTokens = ["YY", "YYYY"];
         | 
| 47238 | 
            +
            function isProtectedDayOfYearToken(token) {
         | 
| 47239 | 
            +
              return protectedDayOfYearTokens.indexOf(token) !== -1;
         | 
| 47240 | 
            +
            }
         | 
| 47241 | 
            +
            __name(isProtectedDayOfYearToken, "isProtectedDayOfYearToken");
         | 
| 47242 | 
            +
            function isProtectedWeekYearToken(token) {
         | 
| 47243 | 
            +
              return protectedWeekYearTokens.indexOf(token) !== -1;
         | 
| 47244 | 
            +
            }
         | 
| 47245 | 
            +
            __name(isProtectedWeekYearToken, "isProtectedWeekYearToken");
         | 
| 47246 | 
            +
            function throwProtectedError(token, format2, input) {
         | 
| 47247 | 
            +
              if (token === "YYYY") {
         | 
| 47248 | 
            +
                throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
         | 
| 47249 | 
            +
              } else if (token === "YY") {
         | 
| 47250 | 
            +
                throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
         | 
| 47251 | 
            +
              } else if (token === "D") {
         | 
| 47252 | 
            +
                throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
         | 
| 47253 | 
            +
              } else if (token === "DD") {
         | 
| 47254 | 
            +
                throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
         | 
| 47255 | 
            +
              }
         | 
| 47256 | 
            +
            }
         | 
| 47257 | 
            +
            __name(throwProtectedError, "throwProtectedError");
         | 
| 47258 | 
            +
             | 
| 47259 | 
            +
            // ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/format/index.js
         | 
| 47260 | 
            +
            var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
         | 
| 47261 | 
            +
            var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
         | 
| 47262 | 
            +
            var escapedStringRegExp = /^'([^]*?)'?$/;
         | 
| 47263 | 
            +
            var doubleQuoteRegExp = /''/g;
         | 
| 47264 | 
            +
            var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
         | 
| 47265 | 
            +
            function format(dirtyDate, dirtyFormatStr, dirtyOptions) {
         | 
| 47266 | 
            +
              requiredArgs(2, arguments);
         | 
| 47267 | 
            +
              var formatStr = String(dirtyFormatStr);
         | 
| 47268 | 
            +
              var options = dirtyOptions || {};
         | 
| 47269 | 
            +
              var locale2 = options.locale || en_US_default;
         | 
| 47270 | 
            +
              var localeFirstWeekContainsDate = locale2.options && locale2.options.firstWeekContainsDate;
         | 
| 47271 | 
            +
              var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
         | 
| 47272 | 
            +
              var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
         | 
| 47273 | 
            +
              if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
         | 
| 47274 | 
            +
                throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
         | 
| 47275 | 
            +
              }
         | 
| 47276 | 
            +
              var localeWeekStartsOn = locale2.options && locale2.options.weekStartsOn;
         | 
| 47277 | 
            +
              var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
         | 
| 47278 | 
            +
              var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn);
         | 
| 47279 | 
            +
              if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
         | 
| 47280 | 
            +
                throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
         | 
| 47281 | 
            +
              }
         | 
| 47282 | 
            +
              if (!locale2.localize) {
         | 
| 47283 | 
            +
                throw new RangeError("locale must contain localize property");
         | 
| 47284 | 
            +
              }
         | 
| 47285 | 
            +
              if (!locale2.formatLong) {
         | 
| 47286 | 
            +
                throw new RangeError("locale must contain formatLong property");
         | 
| 47287 | 
            +
              }
         | 
| 47288 | 
            +
              var originalDate = toDate(dirtyDate);
         | 
| 47289 | 
            +
              if (!isValid2(originalDate)) {
         | 
| 47290 | 
            +
                throw new RangeError("Invalid time value");
         | 
| 47291 | 
            +
              }
         | 
| 47292 | 
            +
              var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
         | 
| 47293 | 
            +
              var utcDate = subMilliseconds(originalDate, timezoneOffset);
         | 
| 47294 | 
            +
              var formatterOptions = {
         | 
| 47295 | 
            +
                firstWeekContainsDate,
         | 
| 47296 | 
            +
                weekStartsOn,
         | 
| 47297 | 
            +
                locale: locale2,
         | 
| 47298 | 
            +
                _originalDate: originalDate
         | 
| 47299 | 
            +
              };
         | 
| 47300 | 
            +
              var result = formatStr.match(longFormattingTokensRegExp).map(function(substring) {
         | 
| 47301 | 
            +
                var firstCharacter = substring[0];
         | 
| 47302 | 
            +
                if (firstCharacter === "p" || firstCharacter === "P") {
         | 
| 47303 | 
            +
                  var longFormatter = longFormatters_default[firstCharacter];
         | 
| 47304 | 
            +
                  return longFormatter(substring, locale2.formatLong, formatterOptions);
         | 
| 47305 | 
            +
                }
         | 
| 47306 | 
            +
                return substring;
         | 
| 47307 | 
            +
              }).join("").match(formattingTokensRegExp).map(function(substring) {
         | 
| 47308 | 
            +
                if (substring === "''") {
         | 
| 47309 | 
            +
                  return "'";
         | 
| 47573 47310 | 
             
                }
         | 
| 47574 | 
            -
                 | 
| 47575 | 
            -
             | 
| 47576 | 
            -
                   | 
| 47577 | 
            -
                  case "BBB":
         | 
| 47578 | 
            -
                    return localize2.dayPeriod(dayPeriodEnumValue, {
         | 
| 47579 | 
            -
                      width: "abbreviated",
         | 
| 47580 | 
            -
                      context: "formatting"
         | 
| 47581 | 
            -
                    });
         | 
| 47582 | 
            -
                  case "BBBBB":
         | 
| 47583 | 
            -
                    return localize2.dayPeriod(dayPeriodEnumValue, {
         | 
| 47584 | 
            -
                      width: "narrow",
         | 
| 47585 | 
            -
                      context: "formatting"
         | 
| 47586 | 
            -
                    });
         | 
| 47587 | 
            -
                  case "BBBB":
         | 
| 47588 | 
            -
                  default:
         | 
| 47589 | 
            -
                    return localize2.dayPeriod(dayPeriodEnumValue, {
         | 
| 47590 | 
            -
                      width: "wide",
         | 
| 47591 | 
            -
                      context: "formatting"
         | 
| 47592 | 
            -
                    });
         | 
| 47311 | 
            +
                var firstCharacter = substring[0];
         | 
| 47312 | 
            +
                if (firstCharacter === "'") {
         | 
| 47313 | 
            +
                  return cleanEscapedString(substring);
         | 
| 47593 47314 | 
             
                }
         | 
| 47594 | 
            -
             | 
| 47595 | 
            -
             | 
| 47596 | 
            -
             | 
| 47597 | 
            -
             | 
| 47598 | 
            -
                   | 
| 47599 | 
            -
             | 
| 47600 | 
            -
             | 
| 47601 | 
            -
             | 
| 47602 | 
            -
                   | 
| 47315 | 
            +
                var formatter = formatters_default[firstCharacter];
         | 
| 47316 | 
            +
                if (formatter) {
         | 
| 47317 | 
            +
                  if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken(substring)) {
         | 
| 47318 | 
            +
                    throwProtectedError(substring, dirtyFormatStr, dirtyDate);
         | 
| 47319 | 
            +
                  }
         | 
| 47320 | 
            +
                  if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(substring)) {
         | 
| 47321 | 
            +
                    throwProtectedError(substring, dirtyFormatStr, dirtyDate);
         | 
| 47322 | 
            +
                  }
         | 
| 47323 | 
            +
                  return formatter(utcDate, substring, locale2.localize, formatterOptions);
         | 
| 47603 47324 | 
             
                }
         | 
| 47604 | 
            -
                 | 
| 47605 | 
            -
             | 
| 47606 | 
            -
              H: function(date, token, localize2) {
         | 
| 47607 | 
            -
                if (token === "Ho") {
         | 
| 47608 | 
            -
                  return localize2.ordinalNumber(date.getUTCHours(), {
         | 
| 47609 | 
            -
                    unit: "hour"
         | 
| 47610 | 
            -
                  });
         | 
| 47325 | 
            +
                if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
         | 
| 47326 | 
            +
                  throw new RangeError("Format string contains an unescaped latin alphabet character `" + firstCharacter + "`");
         | 
| 47611 47327 | 
             
                }
         | 
| 47612 | 
            -
                return  | 
| 47613 | 
            -
              } | 
| 47614 | 
            -
               | 
| 47615 | 
            -
             | 
| 47616 | 
            -
             | 
| 47617 | 
            -
             | 
| 47618 | 
            -
             | 
| 47328 | 
            +
                return substring;
         | 
| 47329 | 
            +
              }).join("");
         | 
| 47330 | 
            +
              return result;
         | 
| 47331 | 
            +
            }
         | 
| 47332 | 
            +
            __name(format, "format");
         | 
| 47333 | 
            +
            function cleanEscapedString(input) {
         | 
| 47334 | 
            +
              return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
         | 
| 47335 | 
            +
            }
         | 
| 47336 | 
            +
            __name(cleanEscapedString, "cleanEscapedString");
         | 
| 47337 | 
            +
             | 
| 47338 | 
            +
            // src/wallet/verify.ts
         | 
| 47339 | 
            +
            var transformErrorCheck = /* @__PURE__ */ __name((error, _credential) => {
         | 
| 47340 | 
            +
              const prefix = error.split(" error")[0];
         | 
| 47341 | 
            +
              return prefix || error;
         | 
| 47342 | 
            +
            }, "transformErrorCheck");
         | 
| 47343 | 
            +
            var transformErrorMessage = /* @__PURE__ */ __name((error, credential) => {
         | 
| 47344 | 
            +
              if (error.startsWith("expiration")) {
         | 
| 47345 | 
            +
                return credential.expirationDate ? `Invalid \u2022 Expired ${format(new Date(credential.expirationDate), "dd MMM yyyy").toUpperCase()}` : "Invalid \u2022 Expired";
         | 
| 47346 | 
            +
              }
         | 
| 47347 | 
            +
              return error;
         | 
| 47348 | 
            +
            }, "transformErrorMessage");
         | 
| 47349 | 
            +
            var transformCheckMessage = /* @__PURE__ */ __name((check, credential) => {
         | 
| 47350 | 
            +
              return {
         | 
| 47351 | 
            +
                proof: "Valid",
         | 
| 47352 | 
            +
                expiration: credential.expirationDate ? `Valid \u2022 Expires ${format(new Date(credential.expirationDate), "dd MMM yyyy").toUpperCase()}` : "Valid \u2022 Does Not Expire"
         | 
| 47353 | 
            +
              }[check] || check;
         | 
| 47354 | 
            +
            }, "transformCheckMessage");
         | 
| 47355 | 
            +
            var verifyCredential2 = /* @__PURE__ */ __name((wallet) => {
         | 
| 47356 | 
            +
              return (credential) => __async(void 0, null, function* () {
         | 
| 47357 | 
            +
                const rawVerificationCheck = yield wallet.pluginMethods.verifyCredential(credential);
         | 
| 47358 | 
            +
                const verificationItems = [];
         | 
| 47359 | 
            +
                rawVerificationCheck.errors.forEach((error) => {
         | 
| 47360 | 
            +
                  verificationItems.push({
         | 
| 47361 | 
            +
                    status: VerificationStatusEnum.Failed,
         | 
| 47362 | 
            +
                    check: transformErrorCheck(error, credential),
         | 
| 47363 | 
            +
                    details: transformErrorMessage(error, credential)
         | 
| 47619 47364 | 
             
                  });
         | 
| 47620 | 
            -
                }
         | 
| 47621 | 
            -
                 | 
| 47622 | 
            -
             | 
| 47623 | 
            -
             | 
| 47624 | 
            -
             | 
| 47625 | 
            -
             | 
| 47626 | 
            -
                  hours = 24;
         | 
| 47627 | 
            -
                if (token === "ko") {
         | 
| 47628 | 
            -
                  return localize2.ordinalNumber(hours, {
         | 
| 47629 | 
            -
                    unit: "hour"
         | 
| 47365 | 
            +
                });
         | 
| 47366 | 
            +
                rawVerificationCheck.warnings.forEach((warning) => {
         | 
| 47367 | 
            +
                  verificationItems.push({
         | 
| 47368 | 
            +
                    status: VerificationStatusEnum.Error,
         | 
| 47369 | 
            +
                    check: "hmm",
         | 
| 47370 | 
            +
                    message: warning
         | 
| 47630 47371 | 
             
                  });
         | 
| 47631 | 
            -
                }
         | 
| 47632 | 
            -
                 | 
| 47633 | 
            -
             | 
| 47634 | 
            -
             | 
| 47635 | 
            -
             | 
| 47636 | 
            -
             | 
| 47637 | 
            -
                    unit: "minute"
         | 
| 47372 | 
            +
                });
         | 
| 47373 | 
            +
                rawVerificationCheck.checks.forEach((check) => {
         | 
| 47374 | 
            +
                  verificationItems.push({
         | 
| 47375 | 
            +
                    status: VerificationStatusEnum.Success,
         | 
| 47376 | 
            +
                    check,
         | 
| 47377 | 
            +
                    message: transformCheckMessage(check, credential)
         | 
| 47638 47378 | 
             
                  });
         | 
| 47639 | 
            -
                }
         | 
| 47640 | 
            -
                return  | 
| 47379 | 
            +
                });
         | 
| 47380 | 
            +
                return verificationItems;
         | 
| 47381 | 
            +
              });
         | 
| 47382 | 
            +
            }, "verifyCredential");
         | 
| 47383 | 
            +
             | 
| 47384 | 
            +
            // src/wallet/defaults.ts
         | 
| 47385 | 
            +
            var defaultCeramicIDXArgs = {
         | 
| 47386 | 
            +
              modelData: {
         | 
| 47387 | 
            +
                definitions: {
         | 
| 47388 | 
            +
                  MyVerifiableCredentials: "kjzl6cwe1jw14am5tu5hh412s19o4zm8aq3g2lpd6s4paxj2nly2lj4drp3pun2"
         | 
| 47389 | 
            +
                },
         | 
| 47390 | 
            +
                schemas: {
         | 
| 47391 | 
            +
                  AchievementVerifiableCredential: "ceramic://k3y52l7qbv1frylibw2725v8gem3hxs1onoh6pvux0szdduugczh0hddxo6qsd6o0",
         | 
| 47392 | 
            +
                  VerifiableCredentialsList: "ceramic://k3y52l7qbv1frxkcwfpyauky3fyl4n44izridy3blvjjzgftis40sk9w8g3remghs"
         | 
| 47393 | 
            +
                },
         | 
| 47394 | 
            +
                tiles: {}
         | 
| 47641 47395 | 
             
              },
         | 
| 47642 | 
            -
               | 
| 47643 | 
            -
             | 
| 47644 | 
            -
             | 
| 47645 | 
            -
             | 
| 47646 | 
            -
             | 
| 47396 | 
            +
              credentialAlias: "MyVerifiableCredentials",
         | 
| 47397 | 
            +
              ceramicEndpoint: "https://ceramic-node.welibrary.io:7007",
         | 
| 47398 | 
            +
              defaultContentFamily: "SuperSkills"
         | 
| 47399 | 
            +
            };
         | 
| 47400 | 
            +
             | 
| 47401 | 
            +
            // src/didkit/pkg/didkit_wasm.js
         | 
| 47402 | 
            +
            var wasm;
         | 
| 47403 | 
            +
            var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
         | 
| 47404 | 
            +
            cachedTextDecoder.decode();
         | 
| 47405 | 
            +
            var cachegetUint8Memory0 = null;
         | 
| 47406 | 
            +
            function getUint8Memory0() {
         | 
| 47407 | 
            +
              if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
         | 
| 47408 | 
            +
                cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
         | 
| 47409 | 
            +
              }
         | 
| 47410 | 
            +
              return cachegetUint8Memory0;
         | 
| 47411 | 
            +
            }
         | 
| 47412 | 
            +
            __name(getUint8Memory0, "getUint8Memory0");
         | 
| 47413 | 
            +
            function getStringFromWasm0(ptr, len) {
         | 
| 47414 | 
            +
              return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
         | 
| 47415 | 
            +
            }
         | 
| 47416 | 
            +
            __name(getStringFromWasm0, "getStringFromWasm0");
         | 
| 47417 | 
            +
            var heap = new Array(32).fill(void 0);
         | 
| 47418 | 
            +
            heap.push(void 0, null, true, false);
         | 
| 47419 | 
            +
            var heap_next = heap.length;
         | 
| 47420 | 
            +
            function addHeapObject(obj) {
         | 
| 47421 | 
            +
              if (heap_next === heap.length)
         | 
| 47422 | 
            +
                heap.push(heap.length + 1);
         | 
| 47423 | 
            +
              const idx = heap_next;
         | 
| 47424 | 
            +
              heap_next = heap[idx];
         | 
| 47425 | 
            +
              heap[idx] = obj;
         | 
| 47426 | 
            +
              return idx;
         | 
| 47427 | 
            +
            }
         | 
| 47428 | 
            +
            __name(addHeapObject, "addHeapObject");
         | 
| 47429 | 
            +
            function getObject(idx) {
         | 
| 47430 | 
            +
              return heap[idx];
         | 
| 47431 | 
            +
            }
         | 
| 47432 | 
            +
            __name(getObject, "getObject");
         | 
| 47433 | 
            +
            function dropObject(idx) {
         | 
| 47434 | 
            +
              if (idx < 36)
         | 
| 47435 | 
            +
                return;
         | 
| 47436 | 
            +
              heap[idx] = heap_next;
         | 
| 47437 | 
            +
              heap_next = idx;
         | 
| 47438 | 
            +
            }
         | 
| 47439 | 
            +
            __name(dropObject, "dropObject");
         | 
| 47440 | 
            +
            function takeObject(idx) {
         | 
| 47441 | 
            +
              const ret = getObject(idx);
         | 
| 47442 | 
            +
              dropObject(idx);
         | 
| 47443 | 
            +
              return ret;
         | 
| 47444 | 
            +
            }
         | 
| 47445 | 
            +
            __name(takeObject, "takeObject");
         | 
| 47446 | 
            +
            var WASM_VECTOR_LEN = 0;
         | 
| 47447 | 
            +
            var cachedTextEncoder = new TextEncoder("utf-8");
         | 
| 47448 | 
            +
            var encodeString2 = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) {
         | 
| 47449 | 
            +
              return cachedTextEncoder.encodeInto(arg, view);
         | 
| 47450 | 
            +
            } : function(arg, view) {
         | 
| 47451 | 
            +
              const buf2 = cachedTextEncoder.encode(arg);
         | 
| 47452 | 
            +
              view.set(buf2);
         | 
| 47453 | 
            +
              return {
         | 
| 47454 | 
            +
                read: arg.length,
         | 
| 47455 | 
            +
                written: buf2.length
         | 
| 47456 | 
            +
              };
         | 
| 47457 | 
            +
            };
         | 
| 47458 | 
            +
            function passStringToWasm0(arg, malloc, realloc) {
         | 
| 47459 | 
            +
              if (realloc === void 0) {
         | 
| 47460 | 
            +
                const buf2 = cachedTextEncoder.encode(arg);
         | 
| 47461 | 
            +
                const ptr2 = malloc(buf2.length);
         | 
| 47462 | 
            +
                getUint8Memory0().subarray(ptr2, ptr2 + buf2.length).set(buf2);
         | 
| 47463 | 
            +
                WASM_VECTOR_LEN = buf2.length;
         | 
| 47464 | 
            +
                return ptr2;
         | 
| 47465 | 
            +
              }
         | 
| 47466 | 
            +
              let len = arg.length;
         | 
| 47467 | 
            +
              let ptr = malloc(len);
         | 
| 47468 | 
            +
              const mem = getUint8Memory0();
         | 
| 47469 | 
            +
              let offset = 0;
         | 
| 47470 | 
            +
              for (; offset < len; offset++) {
         | 
| 47471 | 
            +
                const code5 = arg.charCodeAt(offset);
         | 
| 47472 | 
            +
                if (code5 > 127)
         | 
| 47473 | 
            +
                  break;
         | 
| 47474 | 
            +
                mem[ptr + offset] = code5;
         | 
| 47475 | 
            +
              }
         | 
| 47476 | 
            +
              if (offset !== len) {
         | 
| 47477 | 
            +
                if (offset !== 0) {
         | 
| 47478 | 
            +
                  arg = arg.slice(offset);
         | 
| 47647 47479 | 
             
                }
         | 
| 47648 | 
            -
                 | 
| 47649 | 
            -
             | 
| 47650 | 
            -
             | 
| 47651 | 
            -
                 | 
| 47652 | 
            -
              } | 
| 47653 | 
            -
               | 
| 47654 | 
            -
             | 
| 47655 | 
            -
             | 
| 47656 | 
            -
             | 
| 47657 | 
            -
             | 
| 47480 | 
            +
                ptr = realloc(ptr, len, len = offset + arg.length * 3);
         | 
| 47481 | 
            +
                const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
         | 
| 47482 | 
            +
                const ret = encodeString2(arg, view);
         | 
| 47483 | 
            +
                offset += ret.written;
         | 
| 47484 | 
            +
              }
         | 
| 47485 | 
            +
              WASM_VECTOR_LEN = offset;
         | 
| 47486 | 
            +
              return ptr;
         | 
| 47487 | 
            +
            }
         | 
| 47488 | 
            +
            __name(passStringToWasm0, "passStringToWasm0");
         | 
| 47489 | 
            +
            function isLikeNone(x) {
         | 
| 47490 | 
            +
              return x === void 0 || x === null;
         | 
| 47491 | 
            +
            }
         | 
| 47492 | 
            +
            __name(isLikeNone, "isLikeNone");
         | 
| 47493 | 
            +
            var cachegetInt32Memory0 = null;
         | 
| 47494 | 
            +
            function getInt32Memory0() {
         | 
| 47495 | 
            +
              if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
         | 
| 47496 | 
            +
                cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
         | 
| 47497 | 
            +
              }
         | 
| 47498 | 
            +
              return cachegetInt32Memory0;
         | 
| 47499 | 
            +
            }
         | 
| 47500 | 
            +
            __name(getInt32Memory0, "getInt32Memory0");
         | 
| 47501 | 
            +
            function debugString(val) {
         | 
| 47502 | 
            +
              const type = typeof val;
         | 
| 47503 | 
            +
              if (type == "number" || type == "boolean" || val == null) {
         | 
| 47504 | 
            +
                return `${val}`;
         | 
| 47505 | 
            +
              }
         | 
| 47506 | 
            +
              if (type == "string") {
         | 
| 47507 | 
            +
                return `"${val}"`;
         | 
| 47508 | 
            +
              }
         | 
| 47509 | 
            +
              if (type == "symbol") {
         | 
| 47510 | 
            +
                const description = val.description;
         | 
| 47511 | 
            +
                if (description == null) {
         | 
| 47512 | 
            +
                  return "Symbol";
         | 
| 47513 | 
            +
                } else {
         | 
| 47514 | 
            +
                  return `Symbol(${description})`;
         | 
| 47658 47515 | 
             
                }
         | 
| 47659 | 
            -
             | 
| 47660 | 
            -
             | 
| 47661 | 
            -
             | 
| 47662 | 
            -
             | 
| 47663 | 
            -
                   | 
| 47664 | 
            -
             | 
| 47665 | 
            -
                   | 
| 47666 | 
            -
                  case "XXX":
         | 
| 47667 | 
            -
                  default:
         | 
| 47668 | 
            -
                    return formatTimezone(timezoneOffset, ":");
         | 
| 47516 | 
            +
              }
         | 
| 47517 | 
            +
              if (type == "function") {
         | 
| 47518 | 
            +
                const name5 = val.name;
         | 
| 47519 | 
            +
                if (typeof name5 == "string" && name5.length > 0) {
         | 
| 47520 | 
            +
                  return `Function(${name5})`;
         | 
| 47521 | 
            +
                } else {
         | 
| 47522 | 
            +
                  return "Function";
         | 
| 47669 47523 | 
             
                }
         | 
| 47670 | 
            -
              } | 
| 47671 | 
            -
               | 
| 47672 | 
            -
                 | 
| 47673 | 
            -
                 | 
| 47674 | 
            -
                 | 
| 47675 | 
            -
                   | 
| 47676 | 
            -
                    return formatTimezoneWithOptionalMinutes(timezoneOffset);
         | 
| 47677 | 
            -
                  case "xxxx":
         | 
| 47678 | 
            -
                  case "xx":
         | 
| 47679 | 
            -
                    return formatTimezone(timezoneOffset);
         | 
| 47680 | 
            -
                  case "xxxxx":
         | 
| 47681 | 
            -
                  case "xxx":
         | 
| 47682 | 
            -
                  default:
         | 
| 47683 | 
            -
                    return formatTimezone(timezoneOffset, ":");
         | 
| 47524 | 
            +
              }
         | 
| 47525 | 
            +
              if (Array.isArray(val)) {
         | 
| 47526 | 
            +
                const length2 = val.length;
         | 
| 47527 | 
            +
                let debug = "[";
         | 
| 47528 | 
            +
                if (length2 > 0) {
         | 
| 47529 | 
            +
                  debug += debugString(val[0]);
         | 
| 47684 47530 | 
             
                }
         | 
| 47685 | 
            -
             | 
| 47686 | 
            -
             | 
| 47687 | 
            -
                var originalDate = options._originalDate || date;
         | 
| 47688 | 
            -
                var timezoneOffset = originalDate.getTimezoneOffset();
         | 
| 47689 | 
            -
                switch (token) {
         | 
| 47690 | 
            -
                  case "O":
         | 
| 47691 | 
            -
                  case "OO":
         | 
| 47692 | 
            -
                  case "OOO":
         | 
| 47693 | 
            -
                    return "GMT" + formatTimezoneShort(timezoneOffset, ":");
         | 
| 47694 | 
            -
                  case "OOOO":
         | 
| 47695 | 
            -
                  default:
         | 
| 47696 | 
            -
                    return "GMT" + formatTimezone(timezoneOffset, ":");
         | 
| 47531 | 
            +
                for (let i = 1; i < length2; i++) {
         | 
| 47532 | 
            +
                  debug += ", " + debugString(val[i]);
         | 
| 47697 47533 | 
             
                }
         | 
| 47698 | 
            -
             | 
| 47699 | 
            -
             | 
| 47700 | 
            -
             | 
| 47701 | 
            -
             | 
| 47702 | 
            -
             | 
| 47703 | 
            -
             | 
| 47704 | 
            -
             | 
| 47705 | 
            -
             | 
| 47706 | 
            -
             | 
| 47707 | 
            -
             | 
| 47708 | 
            -
             | 
| 47709 | 
            -
             | 
| 47534 | 
            +
                debug += "]";
         | 
| 47535 | 
            +
                return debug;
         | 
| 47536 | 
            +
              }
         | 
| 47537 | 
            +
              const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
         | 
| 47538 | 
            +
              let className;
         | 
| 47539 | 
            +
              if (builtInMatches.length > 1) {
         | 
| 47540 | 
            +
                className = builtInMatches[1];
         | 
| 47541 | 
            +
              } else {
         | 
| 47542 | 
            +
                return toString.call(val);
         | 
| 47543 | 
            +
              }
         | 
| 47544 | 
            +
              if (className == "Object") {
         | 
| 47545 | 
            +
                try {
         | 
| 47546 | 
            +
                  return "Object(" + JSON.stringify(val) + ")";
         | 
| 47547 | 
            +
                } catch (_) {
         | 
| 47548 | 
            +
                  return "Object";
         | 
| 47710 47549 | 
             
                }
         | 
| 47711 | 
            -
              },
         | 
| 47712 | 
            -
              t: function(date, token, _localize, options) {
         | 
| 47713 | 
            -
                var originalDate = options._originalDate || date;
         | 
| 47714 | 
            -
                var timestamp = Math.floor(originalDate.getTime() / 1e3);
         | 
| 47715 | 
            -
                return addLeadingZeros(timestamp, token.length);
         | 
| 47716 | 
            -
              },
         | 
| 47717 | 
            -
              T: function(date, token, _localize, options) {
         | 
| 47718 | 
            -
                var originalDate = options._originalDate || date;
         | 
| 47719 | 
            -
                var timestamp = originalDate.getTime();
         | 
| 47720 | 
            -
                return addLeadingZeros(timestamp, token.length);
         | 
| 47721 47550 | 
             
              }
         | 
| 47722 | 
            -
             | 
| 47723 | 
            -
             | 
| 47724 | 
            -
             | 
| 47725 | 
            -
              var absOffset = Math.abs(offset);
         | 
| 47726 | 
            -
              var hours = Math.floor(absOffset / 60);
         | 
| 47727 | 
            -
              var minutes = absOffset % 60;
         | 
| 47728 | 
            -
              if (minutes === 0) {
         | 
| 47729 | 
            -
                return sign5 + String(hours);
         | 
| 47551 | 
            +
              if (val instanceof Error) {
         | 
| 47552 | 
            +
                return `${val.name}: ${val.message}
         | 
| 47553 | 
            +
            ${val.stack}`;
         | 
| 47730 47554 | 
             
              }
         | 
| 47731 | 
            -
               | 
| 47732 | 
            -
              return sign5 + String(hours) + delimiter + addLeadingZeros(minutes, 2);
         | 
| 47555 | 
            +
              return className;
         | 
| 47733 47556 | 
             
            }
         | 
| 47734 | 
            -
            __name( | 
| 47735 | 
            -
            function  | 
| 47736 | 
            -
               | 
| 47737 | 
            -
             | 
| 47738 | 
            -
                 | 
| 47739 | 
            -
             | 
| 47740 | 
            -
             | 
| 47557 | 
            +
            __name(debugString, "debugString");
         | 
| 47558 | 
            +
            function makeMutClosure(arg0, arg1, dtor, f) {
         | 
| 47559 | 
            +
              const state = { a: arg0, b: arg1, cnt: 1, dtor };
         | 
| 47560 | 
            +
              const real = /* @__PURE__ */ __name((...args) => {
         | 
| 47561 | 
            +
                state.cnt++;
         | 
| 47562 | 
            +
                const a = state.a;
         | 
| 47563 | 
            +
                state.a = 0;
         | 
| 47564 | 
            +
                try {
         | 
| 47565 | 
            +
                  return f(a, state.b, ...args);
         | 
| 47566 | 
            +
                } finally {
         | 
| 47567 | 
            +
                  if (--state.cnt === 0) {
         | 
| 47568 | 
            +
                    wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
         | 
| 47569 | 
            +
                  } else {
         | 
| 47570 | 
            +
                    state.a = a;
         | 
| 47571 | 
            +
                  }
         | 
| 47572 | 
            +
                }
         | 
| 47573 | 
            +
              }, "real");
         | 
| 47574 | 
            +
              real.original = state;
         | 
| 47575 | 
            +
              return real;
         | 
| 47741 47576 | 
             
            }
         | 
| 47742 | 
            -
            __name( | 
| 47743 | 
            -
            function  | 
| 47744 | 
            -
               | 
| 47745 | 
            -
              var sign5 = offset > 0 ? "-" : "+";
         | 
| 47746 | 
            -
              var absOffset = Math.abs(offset);
         | 
| 47747 | 
            -
              var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
         | 
| 47748 | 
            -
              var minutes = addLeadingZeros(absOffset % 60, 2);
         | 
| 47749 | 
            -
              return sign5 + hours + delimiter + minutes;
         | 
| 47577 | 
            +
            __name(makeMutClosure, "makeMutClosure");
         | 
| 47578 | 
            +
            function __wbg_adapter_24(arg0, arg1, arg2) {
         | 
| 47579 | 
            +
              wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h91a8814f66f14b17(arg0, arg1, addHeapObject(arg2));
         | 
| 47750 47580 | 
             
            }
         | 
| 47751 | 
            -
            __name( | 
| 47752 | 
            -
             | 
| 47753 | 
            -
             | 
| 47754 | 
            -
             | 
| 47755 | 
            -
             | 
| 47756 | 
            -
               | 
| 47757 | 
            -
                case "P":
         | 
| 47758 | 
            -
                  return formatLong2.date({
         | 
| 47759 | 
            -
                    width: "short"
         | 
| 47760 | 
            -
                  });
         | 
| 47761 | 
            -
                case "PP":
         | 
| 47762 | 
            -
                  return formatLong2.date({
         | 
| 47763 | 
            -
                    width: "medium"
         | 
| 47764 | 
            -
                  });
         | 
| 47765 | 
            -
                case "PPP":
         | 
| 47766 | 
            -
                  return formatLong2.date({
         | 
| 47767 | 
            -
                    width: "long"
         | 
| 47768 | 
            -
                  });
         | 
| 47769 | 
            -
                case "PPPP":
         | 
| 47770 | 
            -
                default:
         | 
| 47771 | 
            -
                  return formatLong2.date({
         | 
| 47772 | 
            -
                    width: "full"
         | 
| 47773 | 
            -
                  });
         | 
| 47774 | 
            -
              }
         | 
| 47581 | 
            +
            __name(__wbg_adapter_24, "__wbg_adapter_24");
         | 
| 47582 | 
            +
            function passArray8ToWasm0(arg, malloc) {
         | 
| 47583 | 
            +
              const ptr = malloc(arg.length * 1);
         | 
| 47584 | 
            +
              getUint8Memory0().set(arg, ptr / 1);
         | 
| 47585 | 
            +
              WASM_VECTOR_LEN = arg.length;
         | 
| 47586 | 
            +
              return ptr;
         | 
| 47775 47587 | 
             
            }
         | 
| 47776 | 
            -
            __name( | 
| 47777 | 
            -
            function  | 
| 47778 | 
            -
               | 
| 47779 | 
            -
                 | 
| 47780 | 
            -
             | 
| 47781 | 
            -
             | 
| 47782 | 
            -
             | 
| 47783 | 
            -
                 | 
| 47784 | 
            -
             | 
| 47785 | 
            -
             | 
| 47786 | 
            -
             | 
| 47787 | 
            -
                 | 
| 47788 | 
            -
             | 
| 47789 | 
            -
             | 
| 47790 | 
            -
                   | 
| 47791 | 
            -
             | 
| 47792 | 
            -
             | 
| 47793 | 
            -
             | 
| 47794 | 
            -
             | 
| 47795 | 
            -
             | 
| 47588 | 
            +
            __name(passArray8ToWasm0, "passArray8ToWasm0");
         | 
| 47589 | 
            +
            function generateEd25519KeyFromBytes(bytes) {
         | 
| 47590 | 
            +
              try {
         | 
| 47591 | 
            +
                const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
         | 
| 47592 | 
            +
                const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
         | 
| 47593 | 
            +
                const len0 = WASM_VECTOR_LEN;
         | 
| 47594 | 
            +
                wasm.generateEd25519KeyFromBytes(retptr, ptr0, len0);
         | 
| 47595 | 
            +
                var r0 = getInt32Memory0()[retptr / 4 + 0];
         | 
| 47596 | 
            +
                var r1 = getInt32Memory0()[retptr / 4 + 1];
         | 
| 47597 | 
            +
                var r2 = getInt32Memory0()[retptr / 4 + 2];
         | 
| 47598 | 
            +
                var r3 = getInt32Memory0()[retptr / 4 + 3];
         | 
| 47599 | 
            +
                var ptr1 = r0;
         | 
| 47600 | 
            +
                var len1 = r1;
         | 
| 47601 | 
            +
                if (r3) {
         | 
| 47602 | 
            +
                  ptr1 = 0;
         | 
| 47603 | 
            +
                  len1 = 0;
         | 
| 47604 | 
            +
                  throw takeObject(r2);
         | 
| 47605 | 
            +
                }
         | 
| 47606 | 
            +
                return getStringFromWasm0(ptr1, len1);
         | 
| 47607 | 
            +
              } finally {
         | 
| 47608 | 
            +
                wasm.__wbindgen_add_to_stack_pointer(16);
         | 
| 47609 | 
            +
                wasm.__wbindgen_free(ptr1, len1);
         | 
| 47796 47610 | 
             
              }
         | 
| 47797 47611 | 
             
            }
         | 
| 47798 | 
            -
            __name( | 
| 47799 | 
            -
            function  | 
| 47800 | 
            -
               | 
| 47801 | 
            -
             | 
| 47802 | 
            -
             | 
| 47803 | 
            -
             | 
| 47804 | 
            -
                 | 
| 47612 | 
            +
            __name(generateEd25519KeyFromBytes, "generateEd25519KeyFromBytes");
         | 
| 47613 | 
            +
            function generateSecp256k1KeyFromBytes(bytes) {
         | 
| 47614 | 
            +
              try {
         | 
| 47615 | 
            +
                const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
         | 
| 47616 | 
            +
                const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
         | 
| 47617 | 
            +
                const len0 = WASM_VECTOR_LEN;
         | 
| 47618 | 
            +
                wasm.generateSecp256k1KeyFromBytes(retptr, ptr0, len0);
         | 
| 47619 | 
            +
                var r0 = getInt32Memory0()[retptr / 4 + 0];
         | 
| 47620 | 
            +
                var r1 = getInt32Memory0()[retptr / 4 + 1];
         | 
| 47621 | 
            +
                var r2 = getInt32Memory0()[retptr / 4 + 2];
         | 
| 47622 | 
            +
                var r3 = getInt32Memory0()[retptr / 4 + 3];
         | 
| 47623 | 
            +
                var ptr1 = r0;
         | 
| 47624 | 
            +
                var len1 = r1;
         | 
| 47625 | 
            +
                if (r3) {
         | 
| 47626 | 
            +
                  ptr1 = 0;
         | 
| 47627 | 
            +
                  len1 = 0;
         | 
| 47628 | 
            +
                  throw takeObject(r2);
         | 
| 47629 | 
            +
                }
         | 
| 47630 | 
            +
                return getStringFromWasm0(ptr1, len1);
         | 
| 47631 | 
            +
              } finally {
         | 
| 47632 | 
            +
                wasm.__wbindgen_add_to_stack_pointer(16);
         | 
| 47633 | 
            +
                wasm.__wbindgen_free(ptr1, len1);
         | 
| 47805 47634 | 
             
              }
         | 
| 47806 | 
            -
             | 
| 47807 | 
            -
             | 
| 47808 | 
            -
             | 
| 47809 | 
            -
             | 
| 47810 | 
            -
             | 
| 47811 | 
            -
             | 
| 47812 | 
            -
             | 
| 47813 | 
            -
                 | 
| 47814 | 
            -
             | 
| 47815 | 
            -
             | 
| 47816 | 
            -
             | 
| 47817 | 
            -
             | 
| 47818 | 
            -
                 | 
| 47819 | 
            -
             | 
| 47820 | 
            -
             | 
| 47821 | 
            -
             | 
| 47822 | 
            -
             | 
| 47823 | 
            -
             | 
| 47824 | 
            -
             | 
| 47825 | 
            -
                   | 
| 47826 | 
            -
             | 
| 47827 | 
            -
             | 
| 47828 | 
            -
             | 
| 47635 | 
            +
            }
         | 
| 47636 | 
            +
            __name(generateSecp256k1KeyFromBytes, "generateSecp256k1KeyFromBytes");
         | 
| 47637 | 
            +
            function keyToDID(method_pattern, jwk) {
         | 
| 47638 | 
            +
              try {
         | 
| 47639 | 
            +
                const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
         | 
| 47640 | 
            +
                const ptr0 = passStringToWasm0(method_pattern, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47641 | 
            +
                const len0 = WASM_VECTOR_LEN;
         | 
| 47642 | 
            +
                const ptr1 = passStringToWasm0(jwk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47643 | 
            +
                const len1 = WASM_VECTOR_LEN;
         | 
| 47644 | 
            +
                wasm.keyToDID(retptr, ptr0, len0, ptr1, len1);
         | 
| 47645 | 
            +
                var r0 = getInt32Memory0()[retptr / 4 + 0];
         | 
| 47646 | 
            +
                var r1 = getInt32Memory0()[retptr / 4 + 1];
         | 
| 47647 | 
            +
                var r2 = getInt32Memory0()[retptr / 4 + 2];
         | 
| 47648 | 
            +
                var r3 = getInt32Memory0()[retptr / 4 + 3];
         | 
| 47649 | 
            +
                var ptr2 = r0;
         | 
| 47650 | 
            +
                var len2 = r1;
         | 
| 47651 | 
            +
                if (r3) {
         | 
| 47652 | 
            +
                  ptr2 = 0;
         | 
| 47653 | 
            +
                  len2 = 0;
         | 
| 47654 | 
            +
                  throw takeObject(r2);
         | 
| 47655 | 
            +
                }
         | 
| 47656 | 
            +
                return getStringFromWasm0(ptr2, len2);
         | 
| 47657 | 
            +
              } finally {
         | 
| 47658 | 
            +
                wasm.__wbindgen_add_to_stack_pointer(16);
         | 
| 47659 | 
            +
                wasm.__wbindgen_free(ptr2, len2);
         | 
| 47829 47660 | 
             
              }
         | 
| 47830 | 
            -
              return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
         | 
| 47831 47661 | 
             
            }
         | 
| 47832 | 
            -
            __name( | 
| 47833 | 
            -
             | 
| 47834 | 
            -
               | 
| 47835 | 
            -
               | 
| 47836 | 
            -
             | 
| 47837 | 
            -
             | 
| 47838 | 
            -
             | 
| 47839 | 
            -
             | 
| 47840 | 
            -
            var protectedDayOfYearTokens = ["D", "DD"];
         | 
| 47841 | 
            -
            var protectedWeekYearTokens = ["YY", "YYYY"];
         | 
| 47842 | 
            -
            function isProtectedDayOfYearToken(token) {
         | 
| 47843 | 
            -
              return protectedDayOfYearTokens.indexOf(token) !== -1;
         | 
| 47662 | 
            +
            __name(keyToDID, "keyToDID");
         | 
| 47663 | 
            +
            function keyToVerificationMethod(method_pattern, jwk) {
         | 
| 47664 | 
            +
              const ptr0 = passStringToWasm0(method_pattern, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47665 | 
            +
              const len0 = WASM_VECTOR_LEN;
         | 
| 47666 | 
            +
              const ptr1 = passStringToWasm0(jwk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47667 | 
            +
              const len1 = WASM_VECTOR_LEN;
         | 
| 47668 | 
            +
              const ret = wasm.keyToVerificationMethod(ptr0, len0, ptr1, len1);
         | 
| 47669 | 
            +
              return takeObject(ret);
         | 
| 47844 47670 | 
             
            }
         | 
| 47845 | 
            -
            __name( | 
| 47846 | 
            -
            function  | 
| 47847 | 
            -
               | 
| 47671 | 
            +
            __name(keyToVerificationMethod, "keyToVerificationMethod");
         | 
| 47672 | 
            +
            function issueCredential2(credential, proof_options, key2) {
         | 
| 47673 | 
            +
              const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47674 | 
            +
              const len0 = WASM_VECTOR_LEN;
         | 
| 47675 | 
            +
              const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47676 | 
            +
              const len1 = WASM_VECTOR_LEN;
         | 
| 47677 | 
            +
              const ptr2 = passStringToWasm0(key2, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47678 | 
            +
              const len2 = WASM_VECTOR_LEN;
         | 
| 47679 | 
            +
              const ret = wasm.issueCredential(ptr0, len0, ptr1, len1, ptr2, len2);
         | 
| 47680 | 
            +
              return takeObject(ret);
         | 
| 47681 | 
            +
            }
         | 
| 47682 | 
            +
            __name(issueCredential2, "issueCredential");
         | 
| 47683 | 
            +
            function verifyCredential3(vc, proof_options) {
         | 
| 47684 | 
            +
              const ptr0 = passStringToWasm0(vc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47685 | 
            +
              const len0 = WASM_VECTOR_LEN;
         | 
| 47686 | 
            +
              const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47687 | 
            +
              const len1 = WASM_VECTOR_LEN;
         | 
| 47688 | 
            +
              const ret = wasm.verifyCredential(ptr0, len0, ptr1, len1);
         | 
| 47689 | 
            +
              return takeObject(ret);
         | 
| 47690 | 
            +
            }
         | 
| 47691 | 
            +
            __name(verifyCredential3, "verifyCredential");
         | 
| 47692 | 
            +
            function issuePresentation2(presentation, proof_options, key2) {
         | 
| 47693 | 
            +
              const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47694 | 
            +
              const len0 = WASM_VECTOR_LEN;
         | 
| 47695 | 
            +
              const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47696 | 
            +
              const len1 = WASM_VECTOR_LEN;
         | 
| 47697 | 
            +
              const ptr2 = passStringToWasm0(key2, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47698 | 
            +
              const len2 = WASM_VECTOR_LEN;
         | 
| 47699 | 
            +
              const ret = wasm.issuePresentation(ptr0, len0, ptr1, len1, ptr2, len2);
         | 
| 47700 | 
            +
              return takeObject(ret);
         | 
| 47848 47701 | 
             
            }
         | 
| 47849 | 
            -
            __name( | 
| 47850 | 
            -
            function  | 
| 47851 | 
            -
               | 
| 47852 | 
            -
             | 
| 47853 | 
            -
               | 
| 47854 | 
            -
             | 
| 47855 | 
            -
               | 
| 47856 | 
            -
             | 
| 47857 | 
            -
              } else if (token === "DD") {
         | 
| 47858 | 
            -
                throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
         | 
| 47859 | 
            -
              }
         | 
| 47702 | 
            +
            __name(issuePresentation2, "issuePresentation");
         | 
| 47703 | 
            +
            function verifyPresentation2(vp, proof_options) {
         | 
| 47704 | 
            +
              const ptr0 = passStringToWasm0(vp, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47705 | 
            +
              const len0 = WASM_VECTOR_LEN;
         | 
| 47706 | 
            +
              const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47707 | 
            +
              const len1 = WASM_VECTOR_LEN;
         | 
| 47708 | 
            +
              const ret = wasm.verifyPresentation(ptr0, len0, ptr1, len1);
         | 
| 47709 | 
            +
              return takeObject(ret);
         | 
| 47860 47710 | 
             
            }
         | 
| 47861 | 
            -
            __name( | 
| 47862 | 
            -
             | 
| 47863 | 
            -
             | 
| 47864 | 
            -
             | 
| 47865 | 
            -
             | 
| 47866 | 
            -
             | 
| 47867 | 
            -
            var doubleQuoteRegExp = /''/g;
         | 
| 47868 | 
            -
            var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
         | 
| 47869 | 
            -
            function format(dirtyDate, dirtyFormatStr, dirtyOptions) {
         | 
| 47870 | 
            -
              requiredArgs(2, arguments);
         | 
| 47871 | 
            -
              var formatStr = String(dirtyFormatStr);
         | 
| 47872 | 
            -
              var options = dirtyOptions || {};
         | 
| 47873 | 
            -
              var locale2 = options.locale || en_US_default;
         | 
| 47874 | 
            -
              var localeFirstWeekContainsDate = locale2.options && locale2.options.firstWeekContainsDate;
         | 
| 47875 | 
            -
              var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
         | 
| 47876 | 
            -
              var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
         | 
| 47877 | 
            -
              if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
         | 
| 47878 | 
            -
                throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
         | 
| 47879 | 
            -
              }
         | 
| 47880 | 
            -
              var localeWeekStartsOn = locale2.options && locale2.options.weekStartsOn;
         | 
| 47881 | 
            -
              var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
         | 
| 47882 | 
            -
              var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn);
         | 
| 47883 | 
            -
              if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
         | 
| 47884 | 
            -
                throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
         | 
| 47885 | 
            -
              }
         | 
| 47886 | 
            -
              if (!locale2.localize) {
         | 
| 47887 | 
            -
                throw new RangeError("locale must contain localize property");
         | 
| 47888 | 
            -
              }
         | 
| 47889 | 
            -
              if (!locale2.formatLong) {
         | 
| 47890 | 
            -
                throw new RangeError("locale must contain formatLong property");
         | 
| 47891 | 
            -
              }
         | 
| 47892 | 
            -
              var originalDate = toDate(dirtyDate);
         | 
| 47893 | 
            -
              if (!isValid2(originalDate)) {
         | 
| 47894 | 
            -
                throw new RangeError("Invalid time value");
         | 
| 47711 | 
            +
            __name(verifyPresentation2, "verifyPresentation");
         | 
| 47712 | 
            +
            function handleError(f, args) {
         | 
| 47713 | 
            +
              try {
         | 
| 47714 | 
            +
                return f.apply(this, args);
         | 
| 47715 | 
            +
              } catch (e) {
         | 
| 47716 | 
            +
                wasm.__wbindgen_exn_store(addHeapObject(e));
         | 
| 47895 47717 | 
             
              }
         | 
| 47896 | 
            -
             | 
| 47897 | 
            -
             | 
| 47898 | 
            -
             | 
| 47899 | 
            -
             | 
| 47900 | 
            -
             | 
| 47901 | 
            -
             | 
| 47902 | 
            -
             | 
| 47903 | 
            -
               | 
| 47904 | 
            -
             | 
| 47905 | 
            -
             | 
| 47906 | 
            -
             | 
| 47907 | 
            -
             | 
| 47908 | 
            -
             | 
| 47909 | 
            -
             | 
| 47910 | 
            -
             | 
| 47911 | 
            -
             | 
| 47912 | 
            -
             | 
| 47913 | 
            -
             | 
| 47718 | 
            +
            }
         | 
| 47719 | 
            +
            __name(handleError, "handleError");
         | 
| 47720 | 
            +
            function getArrayU8FromWasm0(ptr, len) {
         | 
| 47721 | 
            +
              return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
         | 
| 47722 | 
            +
            }
         | 
| 47723 | 
            +
            __name(getArrayU8FromWasm0, "getArrayU8FromWasm0");
         | 
| 47724 | 
            +
            function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
         | 
| 47725 | 
            +
              wasm.wasm_bindgen__convert__closures__invoke2_mut__h3ecfeb7a01c1be81(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
         | 
| 47726 | 
            +
            }
         | 
| 47727 | 
            +
            __name(__wbg_adapter_110, "__wbg_adapter_110");
         | 
| 47728 | 
            +
            function load(module, imports) {
         | 
| 47729 | 
            +
              return __async(this, null, function* () {
         | 
| 47730 | 
            +
                if (typeof Response === "function" && module instanceof Response) {
         | 
| 47731 | 
            +
                  if (typeof WebAssembly.instantiateStreaming === "function") {
         | 
| 47732 | 
            +
                    try {
         | 
| 47733 | 
            +
                      return yield WebAssembly.instantiateStreaming(module, imports);
         | 
| 47734 | 
            +
                    } catch (e) {
         | 
| 47735 | 
            +
                      if (module.headers.get("Content-Type") != "application/wasm") {
         | 
| 47736 | 
            +
                        console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
         | 
| 47737 | 
            +
                      } else {
         | 
| 47738 | 
            +
                        throw e;
         | 
| 47739 | 
            +
                      }
         | 
| 47740 | 
            +
                    }
         | 
| 47741 | 
            +
                  }
         | 
| 47742 | 
            +
                  const bytes = yield module.arrayBuffer();
         | 
| 47743 | 
            +
                  return yield WebAssembly.instantiate(bytes, imports);
         | 
| 47744 | 
            +
                } else {
         | 
| 47745 | 
            +
                  const instance = yield WebAssembly.instantiate(module, imports);
         | 
| 47746 | 
            +
                  if (instance instanceof WebAssembly.Instance) {
         | 
| 47747 | 
            +
                    return { instance, module };
         | 
| 47748 | 
            +
                  } else {
         | 
| 47749 | 
            +
                    return instance;
         | 
| 47750 | 
            +
                  }
         | 
| 47914 47751 | 
             
                }
         | 
| 47915 | 
            -
             | 
| 47916 | 
            -
             | 
| 47917 | 
            -
             | 
| 47752 | 
            +
              });
         | 
| 47753 | 
            +
            }
         | 
| 47754 | 
            +
            __name(load, "load");
         | 
| 47755 | 
            +
            function init2(input) {
         | 
| 47756 | 
            +
              return __async(this, null, function* () {
         | 
| 47757 | 
            +
                if (typeof input === "undefined") {
         | 
| 47918 47758 | 
             
                }
         | 
| 47919 | 
            -
                 | 
| 47920 | 
            -
                 | 
| 47921 | 
            -
             | 
| 47922 | 
            -
             | 
| 47759 | 
            +
                const imports = {};
         | 
| 47760 | 
            +
                imports.wbg = {};
         | 
| 47761 | 
            +
                imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
         | 
| 47762 | 
            +
                  const ret = getStringFromWasm0(arg0, arg1);
         | 
| 47763 | 
            +
                  return addHeapObject(ret);
         | 
| 47764 | 
            +
                };
         | 
| 47765 | 
            +
                imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
         | 
| 47766 | 
            +
                  takeObject(arg0);
         | 
| 47767 | 
            +
                };
         | 
| 47768 | 
            +
                imports.wbg.__wbindgen_cb_drop = function(arg0) {
         | 
| 47769 | 
            +
                  const obj = takeObject(arg0).original;
         | 
| 47770 | 
            +
                  if (obj.cnt-- == 1) {
         | 
| 47771 | 
            +
                    obj.a = 0;
         | 
| 47772 | 
            +
                    return true;
         | 
| 47923 47773 | 
             
                  }
         | 
| 47924 | 
            -
                   | 
| 47925 | 
            -
             | 
| 47774 | 
            +
                  const ret = false;
         | 
| 47775 | 
            +
                  return ret;
         | 
| 47776 | 
            +
                };
         | 
| 47777 | 
            +
                imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
         | 
| 47778 | 
            +
                  const ret = getObject(arg0);
         | 
| 47779 | 
            +
                  return addHeapObject(ret);
         | 
| 47780 | 
            +
                };
         | 
| 47781 | 
            +
                imports.wbg.__wbg_fetch_811d43d6bdcad5b1 = function(arg0) {
         | 
| 47782 | 
            +
                  const ret = fetch(getObject(arg0));
         | 
| 47783 | 
            +
                  return addHeapObject(ret);
         | 
| 47784 | 
            +
                };
         | 
| 47785 | 
            +
                imports.wbg.__wbg_fetch_bf56e2a9f0644e3f = function(arg0, arg1) {
         | 
| 47786 | 
            +
                  const ret = getObject(arg0).fetch(getObject(arg1));
         | 
| 47787 | 
            +
                  return addHeapObject(ret);
         | 
| 47788 | 
            +
                };
         | 
| 47789 | 
            +
                imports.wbg.__wbg_new_89d7f088c1c45353 = function() {
         | 
| 47790 | 
            +
                  return handleError(function() {
         | 
| 47791 | 
            +
                    const ret = new Headers();
         | 
| 47792 | 
            +
                    return addHeapObject(ret);
         | 
| 47793 | 
            +
                  }, arguments);
         | 
| 47794 | 
            +
                };
         | 
| 47795 | 
            +
                imports.wbg.__wbg_append_f4f93bc73c45ee3e = function() {
         | 
| 47796 | 
            +
                  return handleError(function(arg0, arg1, arg2, arg3, arg4) {
         | 
| 47797 | 
            +
                    getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
         | 
| 47798 | 
            +
                  }, arguments);
         | 
| 47799 | 
            +
                };
         | 
| 47800 | 
            +
                imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
         | 
| 47801 | 
            +
                  const obj = getObject(arg1);
         | 
| 47802 | 
            +
                  const ret = typeof obj === "string" ? obj : void 0;
         | 
| 47803 | 
            +
                  var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47804 | 
            +
                  var len0 = WASM_VECTOR_LEN;
         | 
| 47805 | 
            +
                  getInt32Memory0()[arg0 / 4 + 1] = len0;
         | 
| 47806 | 
            +
                  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
         | 
| 47807 | 
            +
                };
         | 
| 47808 | 
            +
                imports.wbg.__wbg_instanceof_Response_ccfeb62399355bcd = function(arg0) {
         | 
| 47809 | 
            +
                  const ret = getObject(arg0) instanceof Response;
         | 
| 47810 | 
            +
                  return ret;
         | 
| 47811 | 
            +
                };
         | 
| 47812 | 
            +
                imports.wbg.__wbg_url_06c0f822d68d195c = function(arg0, arg1) {
         | 
| 47813 | 
            +
                  const ret = getObject(arg1).url;
         | 
| 47814 | 
            +
                  const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 47815 | 
            +
                  const len0 = WASM_VECTOR_LEN;
         | 
| 47816 | 
            +
                  getInt32Memory0()[arg0 / 4 + 1] = len0;
         | 
| 47817 | 
            +
                  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
         | 
| 47818 | 
            +
                };
         | 
| 47819 | 
            +
                imports.wbg.__wbg_status_600fd8b881393898 = function(arg0) {
         | 
| 47820 | 
            +
                  const ret = getObject(arg0).status;
         | 
| 47821 | 
            +
                  return ret;
         | 
| 47822 | 
            +
                };
         | 
| 47823 | 
            +
                imports.wbg.__wbg_headers_9e7f2c05a9b962ea = function(arg0) {
         | 
| 47824 | 
            +
                  const ret = getObject(arg0).headers;
         | 
| 47825 | 
            +
                  return addHeapObject(ret);
         | 
| 47826 | 
            +
                };
         | 
| 47827 | 
            +
                imports.wbg.__wbg_arrayBuffer_5a99283a3954c850 = function() {
         | 
| 47828 | 
            +
                  return handleError(function(arg0) {
         | 
| 47829 | 
            +
                    const ret = getObject(arg0).arrayBuffer();
         | 
| 47830 | 
            +
                    return addHeapObject(ret);
         | 
| 47831 | 
            +
                  }, arguments);
         | 
| 47832 | 
            +
                };
         | 
| 47833 | 
            +
                imports.wbg.__wbg_newwithstrandinit_fd99688f189f053e = function() {
         | 
| 47834 | 
            +
                  return handleError(function(arg0, arg1, arg2) {
         | 
| 47835 | 
            +
                    const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
         | 
| 47836 | 
            +
                    return addHeapObject(ret);
         | 
| 47837 | 
            +
                  }, arguments);
         | 
| 47838 | 
            +
                };
         | 
| 47839 | 
            +
                imports.wbg.__wbindgen_is_object = function(arg0) {
         | 
| 47840 | 
            +
                  const val = getObject(arg0);
         | 
| 47841 | 
            +
                  const ret = typeof val === "object" && val !== null;
         | 
| 47842 | 
            +
                  return ret;
         | 
| 47843 | 
            +
                };
         | 
| 47844 | 
            +
                imports.wbg.__wbg_self_86b4b13392c7af56 = function() {
         | 
| 47845 | 
            +
                  return handleError(function() {
         | 
| 47846 | 
            +
                    const ret = self.self;
         | 
| 47847 | 
            +
                    return addHeapObject(ret);
         | 
| 47848 | 
            +
                  }, arguments);
         | 
| 47849 | 
            +
                };
         | 
| 47850 | 
            +
                imports.wbg.__wbg_crypto_b8c92eaac23d0d80 = function(arg0) {
         | 
| 47851 | 
            +
                  const ret = getObject(arg0).crypto;
         | 
| 47852 | 
            +
                  return addHeapObject(ret);
         | 
| 47853 | 
            +
                };
         | 
| 47854 | 
            +
                imports.wbg.__wbg_msCrypto_9ad6677321a08dd8 = function(arg0) {
         | 
| 47855 | 
            +
                  const ret = getObject(arg0).msCrypto;
         | 
| 47856 | 
            +
                  return addHeapObject(ret);
         | 
| 47857 | 
            +
                };
         | 
| 47858 | 
            +
                imports.wbg.__wbindgen_is_undefined = function(arg0) {
         | 
| 47859 | 
            +
                  const ret = getObject(arg0) === void 0;
         | 
| 47860 | 
            +
                  return ret;
         | 
| 47861 | 
            +
                };
         | 
| 47862 | 
            +
                imports.wbg.__wbg_static_accessor_MODULE_452b4680e8614c81 = function() {
         | 
| 47863 | 
            +
                  const ret = module;
         | 
| 47864 | 
            +
                  return addHeapObject(ret);
         | 
| 47865 | 
            +
                };
         | 
| 47866 | 
            +
                imports.wbg.__wbg_require_f5521a5b85ad2542 = function(arg0, arg1, arg2) {
         | 
| 47867 | 
            +
                  const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
         | 
| 47868 | 
            +
                  return addHeapObject(ret);
         | 
| 47869 | 
            +
                };
         | 
| 47870 | 
            +
                imports.wbg.__wbg_getRandomValues_dd27e6b0652b3236 = function(arg0) {
         | 
| 47871 | 
            +
                  const ret = getObject(arg0).getRandomValues;
         | 
| 47872 | 
            +
                  return addHeapObject(ret);
         | 
| 47873 | 
            +
                };
         | 
| 47874 | 
            +
                imports.wbg.__wbg_getRandomValues_e57c9b75ddead065 = function(arg0, arg1) {
         | 
| 47875 | 
            +
                  getObject(arg0).getRandomValues(getObject(arg1));
         | 
| 47876 | 
            +
                };
         | 
| 47877 | 
            +
                imports.wbg.__wbg_randomFillSync_d2ba53160aec6aba = function(arg0, arg1, arg2) {
         | 
| 47878 | 
            +
                  getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
         | 
| 47879 | 
            +
                };
         | 
| 47880 | 
            +
                imports.wbg.__wbindgen_is_function = function(arg0) {
         | 
| 47881 | 
            +
                  const ret = typeof getObject(arg0) === "function";
         | 
| 47882 | 
            +
                  return ret;
         | 
| 47883 | 
            +
                };
         | 
| 47884 | 
            +
                imports.wbg.__wbg_newnoargs_e23b458e372830de = function(arg0, arg1) {
         | 
| 47885 | 
            +
                  const ret = new Function(getStringFromWasm0(arg0, arg1));
         | 
| 47886 | 
            +
                  return addHeapObject(ret);
         | 
| 47887 | 
            +
                };
         | 
| 47888 | 
            +
                imports.wbg.__wbg_next_cabb70b365520721 = function(arg0) {
         | 
| 47889 | 
            +
                  const ret = getObject(arg0).next;
         | 
| 47890 | 
            +
                  return addHeapObject(ret);
         | 
| 47891 | 
            +
                };
         | 
| 47892 | 
            +
                imports.wbg.__wbg_next_bf3d83fc18df496e = function() {
         | 
| 47893 | 
            +
                  return handleError(function(arg0) {
         | 
| 47894 | 
            +
                    const ret = getObject(arg0).next();
         | 
| 47895 | 
            +
                    return addHeapObject(ret);
         | 
| 47896 | 
            +
                  }, arguments);
         | 
| 47897 | 
            +
                };
         | 
| 47898 | 
            +
                imports.wbg.__wbg_done_040f966faa9a72b3 = function(arg0) {
         | 
| 47899 | 
            +
                  const ret = getObject(arg0).done;
         | 
| 47900 | 
            +
                  return ret;
         | 
| 47901 | 
            +
                };
         | 
| 47902 | 
            +
                imports.wbg.__wbg_value_419afbd9b9574c4c = function(arg0) {
         | 
| 47903 | 
            +
                  const ret = getObject(arg0).value;
         | 
| 47904 | 
            +
                  return addHeapObject(ret);
         | 
| 47905 | 
            +
                };
         | 
| 47906 | 
            +
                imports.wbg.__wbg_iterator_4832ef1f15b0382b = function() {
         | 
| 47907 | 
            +
                  const ret = Symbol.iterator;
         | 
| 47908 | 
            +
                  return addHeapObject(ret);
         | 
| 47909 | 
            +
                };
         | 
| 47910 | 
            +
                imports.wbg.__wbg_get_a9cab131e3152c49 = function() {
         | 
| 47911 | 
            +
                  return handleError(function(arg0, arg1) {
         | 
| 47912 | 
            +
                    const ret = Reflect.get(getObject(arg0), getObject(arg1));
         | 
| 47913 | 
            +
                    return addHeapObject(ret);
         | 
| 47914 | 
            +
                  }, arguments);
         | 
| 47915 | 
            +
                };
         | 
| 47916 | 
            +
                imports.wbg.__wbg_call_ae78342adc33730a = function() {
         | 
| 47917 | 
            +
                  return handleError(function(arg0, arg1) {
         | 
| 47918 | 
            +
                    const ret = getObject(arg0).call(getObject(arg1));
         | 
| 47919 | 
            +
                    return addHeapObject(ret);
         | 
| 47920 | 
            +
                  }, arguments);
         | 
| 47921 | 
            +
                };
         | 
| 47922 | 
            +
                imports.wbg.__wbg_new_36359baae5a47e27 = function() {
         | 
| 47923 | 
            +
                  const ret = new Object();
         | 
| 47924 | 
            +
                  return addHeapObject(ret);
         | 
| 47925 | 
            +
                };
         | 
| 47926 | 
            +
                imports.wbg.__wbg_call_3ed288a247f13ea5 = function() {
         | 
| 47927 | 
            +
                  return handleError(function(arg0, arg1, arg2) {
         | 
| 47928 | 
            +
                    const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
         | 
| 47929 | 
            +
                    return addHeapObject(ret);
         | 
| 47930 | 
            +
                  }, arguments);
         | 
| 47931 | 
            +
                };
         | 
| 47932 | 
            +
                imports.wbg.__wbg_getTime_bffb1c09df09618b = function(arg0) {
         | 
| 47933 | 
            +
                  const ret = getObject(arg0).getTime();
         | 
| 47934 | 
            +
                  return ret;
         | 
| 47935 | 
            +
                };
         | 
| 47936 | 
            +
                imports.wbg.__wbg_new0_0ff7eb5c1486f3ec = function() {
         | 
| 47937 | 
            +
                  const ret = new Date();
         | 
| 47938 | 
            +
                  return addHeapObject(ret);
         | 
| 47939 | 
            +
                };
         | 
| 47940 | 
            +
                imports.wbg.__wbg_new_37705eed627d5ed9 = function(arg0, arg1) {
         | 
| 47941 | 
            +
                  try {
         | 
| 47942 | 
            +
                    var state0 = { a: arg0, b: arg1 };
         | 
| 47943 | 
            +
                    var cb0 = /* @__PURE__ */ __name((arg02, arg12) => {
         | 
| 47944 | 
            +
                      const a = state0.a;
         | 
| 47945 | 
            +
                      state0.a = 0;
         | 
| 47946 | 
            +
                      try {
         | 
| 47947 | 
            +
                        return __wbg_adapter_110(a, state0.b, arg02, arg12);
         | 
| 47948 | 
            +
                      } finally {
         | 
| 47949 | 
            +
                        state0.a = a;
         | 
| 47950 | 
            +
                      }
         | 
| 47951 | 
            +
                    }, "cb0");
         | 
| 47952 | 
            +
                    const ret = new Promise(cb0);
         | 
| 47953 | 
            +
                    return addHeapObject(ret);
         | 
| 47954 | 
            +
                  } finally {
         | 
| 47955 | 
            +
                    state0.a = state0.b = 0;
         | 
| 47926 47956 | 
             
                  }
         | 
| 47927 | 
            -
             | 
| 47928 | 
            -
                 | 
| 47929 | 
            -
             | 
| 47930 | 
            -
                   | 
| 47957 | 
            +
                };
         | 
| 47958 | 
            +
                imports.wbg.__wbg_resolve_a9a87bdd64e9e62c = function(arg0) {
         | 
| 47959 | 
            +
                  const ret = Promise.resolve(getObject(arg0));
         | 
| 47960 | 
            +
                  return addHeapObject(ret);
         | 
| 47961 | 
            +
                };
         | 
| 47962 | 
            +
                imports.wbg.__wbg_then_ce526c837d07b68f = function(arg0, arg1) {
         | 
| 47963 | 
            +
                  const ret = getObject(arg0).then(getObject(arg1));
         | 
| 47964 | 
            +
                  return addHeapObject(ret);
         | 
| 47965 | 
            +
                };
         | 
| 47966 | 
            +
                imports.wbg.__wbg_then_842e65b843962f56 = function(arg0, arg1, arg2) {
         | 
| 47967 | 
            +
                  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
         | 
| 47968 | 
            +
                  return addHeapObject(ret);
         | 
| 47969 | 
            +
                };
         | 
| 47970 | 
            +
                imports.wbg.__wbg_self_99737b4dcdf6f0d8 = function() {
         | 
| 47971 | 
            +
                  return handleError(function() {
         | 
| 47972 | 
            +
                    const ret = self.self;
         | 
| 47973 | 
            +
                    return addHeapObject(ret);
         | 
| 47974 | 
            +
                  }, arguments);
         | 
| 47975 | 
            +
                };
         | 
| 47976 | 
            +
                imports.wbg.__wbg_window_9b61fbbf3564c4fb = function() {
         | 
| 47977 | 
            +
                  return handleError(function() {
         | 
| 47978 | 
            +
                    const ret = window.window;
         | 
| 47979 | 
            +
                    return addHeapObject(ret);
         | 
| 47980 | 
            +
                  }, arguments);
         | 
| 47981 | 
            +
                };
         | 
| 47982 | 
            +
                imports.wbg.__wbg_globalThis_8e275ef40caea3a3 = function() {
         | 
| 47983 | 
            +
                  return handleError(function() {
         | 
| 47984 | 
            +
                    const ret = globalThis.globalThis;
         | 
| 47985 | 
            +
                    return addHeapObject(ret);
         | 
| 47986 | 
            +
                  }, arguments);
         | 
| 47987 | 
            +
                };
         | 
| 47988 | 
            +
                imports.wbg.__wbg_global_5de1e0f82bddcd27 = function() {
         | 
| 47989 | 
            +
                  return handleError(function() {
         | 
| 47990 | 
            +
                    const ret = global.global;
         | 
| 47991 | 
            +
                    return addHeapObject(ret);
         | 
| 47992 | 
            +
                  }, arguments);
         | 
| 47993 | 
            +
                };
         | 
| 47994 | 
            +
                imports.wbg.__wbg_buffer_7af23f65f6c64548 = function(arg0) {
         | 
| 47995 | 
            +
                  const ret = getObject(arg0).buffer;
         | 
| 47996 | 
            +
                  return addHeapObject(ret);
         | 
| 47997 | 
            +
                };
         | 
| 47998 | 
            +
                imports.wbg.__wbg_newwithbyteoffsetandlength_ce1e75f0ce5f7974 = function(arg0, arg1, arg2) {
         | 
| 47999 | 
            +
                  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
         | 
| 48000 | 
            +
                  return addHeapObject(ret);
         | 
| 48001 | 
            +
                };
         | 
| 48002 | 
            +
                imports.wbg.__wbg_new_cc9018bd6f283b6f = function(arg0) {
         | 
| 48003 | 
            +
                  const ret = new Uint8Array(getObject(arg0));
         | 
| 48004 | 
            +
                  return addHeapObject(ret);
         | 
| 48005 | 
            +
                };
         | 
| 48006 | 
            +
                imports.wbg.__wbg_set_f25e869e4565d2a2 = function(arg0, arg1, arg2) {
         | 
| 48007 | 
            +
                  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
         | 
| 48008 | 
            +
                };
         | 
| 48009 | 
            +
                imports.wbg.__wbg_length_0acb1cf9bbaf8519 = function(arg0) {
         | 
| 48010 | 
            +
                  const ret = getObject(arg0).length;
         | 
| 48011 | 
            +
                  return ret;
         | 
| 48012 | 
            +
                };
         | 
| 48013 | 
            +
                imports.wbg.__wbg_newwithlength_8f0657faca9f1422 = function(arg0) {
         | 
| 48014 | 
            +
                  const ret = new Uint8Array(arg0 >>> 0);
         | 
| 48015 | 
            +
                  return addHeapObject(ret);
         | 
| 48016 | 
            +
                };
         | 
| 48017 | 
            +
                imports.wbg.__wbg_subarray_da527dbd24eafb6b = function(arg0, arg1, arg2) {
         | 
| 48018 | 
            +
                  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
         | 
| 48019 | 
            +
                  return addHeapObject(ret);
         | 
| 48020 | 
            +
                };
         | 
| 48021 | 
            +
                imports.wbg.__wbg_has_ce995ec88636803d = function() {
         | 
| 48022 | 
            +
                  return handleError(function(arg0, arg1) {
         | 
| 48023 | 
            +
                    const ret = Reflect.has(getObject(arg0), getObject(arg1));
         | 
| 48024 | 
            +
                    return ret;
         | 
| 48025 | 
            +
                  }, arguments);
         | 
| 48026 | 
            +
                };
         | 
| 48027 | 
            +
                imports.wbg.__wbg_set_93b1c87ee2af852e = function() {
         | 
| 48028 | 
            +
                  return handleError(function(arg0, arg1, arg2) {
         | 
| 48029 | 
            +
                    const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
         | 
| 48030 | 
            +
                    return ret;
         | 
| 48031 | 
            +
                  }, arguments);
         | 
| 48032 | 
            +
                };
         | 
| 48033 | 
            +
                imports.wbg.__wbg_stringify_c760003feffcc1f2 = function() {
         | 
| 48034 | 
            +
                  return handleError(function(arg0) {
         | 
| 48035 | 
            +
                    const ret = JSON.stringify(getObject(arg0));
         | 
| 48036 | 
            +
                    return addHeapObject(ret);
         | 
| 48037 | 
            +
                  }, arguments);
         | 
| 48038 | 
            +
                };
         | 
| 48039 | 
            +
                imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
         | 
| 48040 | 
            +
                  const ret = debugString(getObject(arg1));
         | 
| 48041 | 
            +
                  const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
         | 
| 48042 | 
            +
                  const len0 = WASM_VECTOR_LEN;
         | 
| 48043 | 
            +
                  getInt32Memory0()[arg0 / 4 + 1] = len0;
         | 
| 48044 | 
            +
                  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
         | 
| 48045 | 
            +
                };
         | 
| 48046 | 
            +
                imports.wbg.__wbindgen_throw = function(arg0, arg1) {
         | 
| 48047 | 
            +
                  throw new Error(getStringFromWasm0(arg0, arg1));
         | 
| 48048 | 
            +
                };
         | 
| 48049 | 
            +
                imports.wbg.__wbindgen_memory = function() {
         | 
| 48050 | 
            +
                  const ret = wasm.memory;
         | 
| 48051 | 
            +
                  return addHeapObject(ret);
         | 
| 48052 | 
            +
                };
         | 
| 48053 | 
            +
                imports.wbg.__wbindgen_closure_wrapper10913 = function(arg0, arg1, arg2) {
         | 
| 48054 | 
            +
                  const ret = makeMutClosure(arg0, arg1, 3725, __wbg_adapter_24);
         | 
| 48055 | 
            +
                  return addHeapObject(ret);
         | 
| 48056 | 
            +
                };
         | 
| 48057 | 
            +
                if (typeof input === "string" || typeof Request === "function" && input instanceof Request || typeof URL === "function" && input instanceof URL) {
         | 
| 48058 | 
            +
                  input = fetch(input);
         | 
| 47931 48059 | 
             
                }
         | 
| 47932 | 
            -
                 | 
| 47933 | 
            -
             | 
| 47934 | 
            -
             | 
| 47935 | 
            -
             | 
| 47936 | 
            -
             | 
| 47937 | 
            -
            function cleanEscapedString(input) {
         | 
| 47938 | 
            -
              return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
         | 
| 48060 | 
            +
                const { instance, module } = yield load(yield input, imports);
         | 
| 48061 | 
            +
                wasm = instance.exports;
         | 
| 48062 | 
            +
                init2.__wbindgen_wasm_module = module;
         | 
| 48063 | 
            +
                return wasm;
         | 
| 48064 | 
            +
              });
         | 
| 47939 48065 | 
             
            }
         | 
| 47940 | 
            -
            __name( | 
| 48066 | 
            +
            __name(init2, "init");
         | 
| 48067 | 
            +
            var didkit_wasm_default = init2;
         | 
| 47941 48068 |  | 
| 47942 | 
            -
            // src/ | 
| 47943 | 
            -
            var  | 
| 47944 | 
            -
             | 
| 47945 | 
            -
               | 
| 47946 | 
            -
             | 
| 47947 | 
            -
             | 
| 47948 | 
            -
               | 
| 47949 | 
            -
             | 
| 47950 | 
            -
             | 
| 47951 | 
            -
              return error;
         | 
| 47952 | 
            -
            }, "transformErrorMessage");
         | 
| 47953 | 
            -
            var transformCheckMessage = /* @__PURE__ */ __name((check, credential) => {
         | 
| 47954 | 
            -
              return {
         | 
| 47955 | 
            -
                proof: "Valid",
         | 
| 47956 | 
            -
                expiration: credential.expirationDate ? `Valid \u2022 Expires ${format(new Date(credential.expirationDate), "dd MMM yyyy").toUpperCase()}` : "Valid \u2022 Does Not Expire"
         | 
| 47957 | 
            -
              }[check] || check;
         | 
| 47958 | 
            -
            }, "transformCheckMessage");
         | 
| 47959 | 
            -
            var verifyCredential3 = /* @__PURE__ */ __name((wallet) => {
         | 
| 47960 | 
            -
              return (credential) => __async(void 0, null, function* () {
         | 
| 47961 | 
            -
                const rawVerificationCheck = yield wallet.pluginMethods.verifyCredential(credential);
         | 
| 47962 | 
            -
                const verificationItems = [];
         | 
| 47963 | 
            -
                rawVerificationCheck.errors.forEach((error) => {
         | 
| 47964 | 
            -
                  verificationItems.push({
         | 
| 47965 | 
            -
                    status: VerificationStatusEnum.Failed,
         | 
| 47966 | 
            -
                    check: transformErrorCheck(error, credential),
         | 
| 47967 | 
            -
                    details: transformErrorMessage(error, credential)
         | 
| 47968 | 
            -
                  });
         | 
| 47969 | 
            -
                });
         | 
| 47970 | 
            -
                rawVerificationCheck.warnings.forEach((warning) => {
         | 
| 47971 | 
            -
                  verificationItems.push({
         | 
| 47972 | 
            -
                    status: VerificationStatusEnum.Error,
         | 
| 47973 | 
            -
                    check: "hmm",
         | 
| 47974 | 
            -
                    message: warning
         | 
| 47975 | 
            -
                  });
         | 
| 47976 | 
            -
                });
         | 
| 47977 | 
            -
                rawVerificationCheck.checks.forEach((check) => {
         | 
| 47978 | 
            -
                  verificationItems.push({
         | 
| 47979 | 
            -
                    status: VerificationStatusEnum.Success,
         | 
| 47980 | 
            -
                    check,
         | 
| 47981 | 
            -
                    message: transformCheckMessage(check, credential)
         | 
| 47982 | 
            -
                  });
         | 
| 47983 | 
            -
                });
         | 
| 47984 | 
            -
                return verificationItems;
         | 
| 47985 | 
            -
              });
         | 
| 47986 | 
            -
            }, "verifyCredential");
         | 
| 48069 | 
            +
            // src/didkit/index.ts
         | 
| 48070 | 
            +
            var initialized = false;
         | 
| 48071 | 
            +
            var init3 = /* @__PURE__ */ __name((arg = "https://cdn.filestackcontent.com/dlXanMvQCGDR76JXcBkA") => __async(void 0, null, function* () {
         | 
| 48072 | 
            +
              if (initialized)
         | 
| 48073 | 
            +
                return;
         | 
| 48074 | 
            +
              initialized = true;
         | 
| 48075 | 
            +
              return didkit_wasm_default(arg);
         | 
| 48076 | 
            +
            }), "init");
         | 
| 48077 | 
            +
            var didkit_default = init3;
         | 
| 47987 48078 |  | 
| 47988 | 
            -
            // src/wallet/ | 
| 47989 | 
            -
            var  | 
| 47990 | 
            -
               | 
| 47991 | 
            -
             | 
| 47992 | 
            -
             | 
| 47993 | 
            -
                 | 
| 47994 | 
            -
             | 
| 47995 | 
            -
                   | 
| 47996 | 
            -
                   | 
| 47997 | 
            -
             | 
| 47998 | 
            -
             | 
| 47999 | 
            -
             | 
| 48000 | 
            -
             | 
| 48001 | 
            -
             | 
| 48002 | 
            -
             | 
| 48003 | 
            -
             | 
| 48079 | 
            +
            // src/wallet/plugins/didkit/index.ts
         | 
| 48080 | 
            +
            var getDidKitPlugin = /* @__PURE__ */ __name((input) => __async(void 0, null, function* () {
         | 
| 48081 | 
            +
              yield didkit_default(input);
         | 
| 48082 | 
            +
              const memoizedDids = {};
         | 
| 48083 | 
            +
              return {
         | 
| 48084 | 
            +
                pluginMethods: {
         | 
| 48085 | 
            +
                  generateEd25519KeyFromBytes: (_wallet, bytes) => JSON.parse(generateEd25519KeyFromBytes(bytes)),
         | 
| 48086 | 
            +
                  generateSecp256k1KeyFromBytes: (_wallet, bytes) => JSON.parse(generateSecp256k1KeyFromBytes(bytes)),
         | 
| 48087 | 
            +
                  keyToDid: (_wallet, type, keypair) => {
         | 
| 48088 | 
            +
                    const memoizedDid = memoizedDids[type];
         | 
| 48089 | 
            +
                    if (!memoizedDid) {
         | 
| 48090 | 
            +
                      const did = keyToDID(type, JSON.stringify(keypair));
         | 
| 48091 | 
            +
                      memoizedDids[type] = did;
         | 
| 48092 | 
            +
                      return did;
         | 
| 48093 | 
            +
                    }
         | 
| 48094 | 
            +
                    return memoizedDid;
         | 
| 48095 | 
            +
                  },
         | 
| 48096 | 
            +
                  keyToVerificationMethod: (_wallet, type, keypair) => __async(void 0, null, function* () {
         | 
| 48097 | 
            +
                    return keyToVerificationMethod(type, JSON.stringify(keypair));
         | 
| 48098 | 
            +
                  }),
         | 
| 48099 | 
            +
                  issueCredential: (_wallet, credential, options, keypair) => __async(void 0, null, function* () {
         | 
| 48100 | 
            +
                    return JSON.parse(yield issueCredential2(JSON.stringify(credential), JSON.stringify(options), JSON.stringify(keypair)));
         | 
| 48101 | 
            +
                  }),
         | 
| 48102 | 
            +
                  verifyCredential: (_wallet, credential) => __async(void 0, null, function* () {
         | 
| 48103 | 
            +
                    return JSON.parse(yield verifyCredential3(JSON.stringify(credential), "{}"));
         | 
| 48104 | 
            +
                  }),
         | 
| 48105 | 
            +
                  issuePresentation: (_wallet, presentation, options, keypair) => __async(void 0, null, function* () {
         | 
| 48106 | 
            +
                    return JSON.parse(yield issuePresentation2(JSON.stringify(presentation), JSON.stringify(options), JSON.stringify(keypair)));
         | 
| 48107 | 
            +
                  }),
         | 
| 48108 | 
            +
                  verifyPresentation: (_wallet, presentation) => __async(void 0, null, function* () {
         | 
| 48109 | 
            +
                    return JSON.parse(yield verifyPresentation2(JSON.stringify(presentation), "{}"));
         | 
| 48110 | 
            +
                  })
         | 
| 48111 | 
            +
                }
         | 
| 48112 | 
            +
              };
         | 
| 48113 | 
            +
            }), "getDidKitPlugin");
         | 
| 48004 48114 |  | 
| 48005 48115 | 
             
            // src/wallet/init.ts
         | 
| 48006 48116 | 
             
            var walletFromKey = /* @__PURE__ */ __name((_0, ..._1) => __async(void 0, [_0, ..._1], function* (key2, {
         | 
| @@ -48008,21 +48118,17 @@ var walletFromKey = /* @__PURE__ */ __name((_0, ..._1) => __async(void 0, [_0, . | |
| 48008 48118 | 
             
              didkit,
         | 
| 48009 48119 | 
             
              defaultContents = []
         | 
| 48010 48120 | 
             
            } = {}) {
         | 
| 48011 | 
            -
              yield  | 
| 48012 | 
            -
              const didkeyWallet = yield  | 
| 48121 | 
            +
              const didkitWallet = yield (yield generateWallet(defaultContents)).addPlugin(yield getDidKitPlugin(didkit));
         | 
| 48122 | 
            +
              const didkeyWallet = yield didkitWallet.addPlugin(yield getDidKeyPlugin(didkitWallet, key2));
         | 
| 48013 48123 | 
             
              const didkeyAndVCWallet = yield didkeyWallet.addPlugin(yield getVCPlugin(didkeyWallet));
         | 
| 48014 48124 | 
             
              const idxWallet = yield didkeyAndVCWallet.addPlugin(yield getIDXPlugin(didkeyAndVCWallet, ceramicIdx));
         | 
| 48015 48125 | 
             
              const wallet = yield idxWallet.addPlugin(ExpirationPlugin(idxWallet));
         | 
| 48016 48126 | 
             
              return {
         | 
| 48017 48127 | 
             
                _wallet: wallet,
         | 
| 48018 | 
            -
                 | 
| 48019 | 
            -
             | 
| 48020 | 
            -
                },
         | 
| 48021 | 
            -
                get keypair() {
         | 
| 48022 | 
            -
                  return wallet.pluginMethods.getSubjectKeypair();
         | 
| 48023 | 
            -
                },
         | 
| 48128 | 
            +
                did: (type = "key") => wallet.pluginMethods.getSubjectDid(type),
         | 
| 48129 | 
            +
                keypair: (type = "ed25519") => wallet.pluginMethods.getSubjectKeypair(type),
         | 
| 48024 48130 | 
             
                issueCredential: wallet.pluginMethods.issueCredential,
         | 
| 48025 | 
            -
                verifyCredential:  | 
| 48131 | 
            +
                verifyCredential: verifyCredential2(wallet),
         | 
| 48026 48132 | 
             
                issuePresentation: wallet.pluginMethods.issuePresentation,
         | 
| 48027 48133 | 
             
                verifyPresentation: wallet.pluginMethods.verifyPresentation,
         | 
| 48028 48134 | 
             
                getCredential: wallet.pluginMethods.getVerifiableCredentialFromIndex,
         | 
| @@ -48056,3 +48162,4 @@ export { | |
| 48056 48162 | 
             
             * @copyright Chen, Yi-Cyuan 2015-2018
         | 
| 48057 48163 | 
             
             * @license MIT
         | 
| 48058 48164 | 
             
             */
         | 
| 48165 | 
            +
            //# sourceMappingURL=core.esm.js.map
         |