@learncard/init 2.0.25 → 2.0.26

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.
@@ -1,5 +1,5 @@
1
1
  "use strict";var _F=Object.create;var Km=Object.defineProperty;var wF=Object.getOwnPropertyDescriptor;var xF=Object.getOwnPropertyNames;var AF=Object.getPrototypeOf,CF=Object.prototype.hasOwnProperty;var s=(e,t)=>Km(e,"name",{value:t,configurable:!0});var EF=(e,t)=>{for(var r in t)Km(e,r,{get:t[r],enumerable:!0})},RA=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of xF(t))!CF.call(e,i)&&i!==r&&Km(e,i,{get:()=>t[i],enumerable:!(n=wF(t,i))||n.enumerable});return e};var j_=(e,t,r)=>(r=e!=null?_F(AF(e)):{},RA(t||!e||!e.__esModule?Km(r,"default",{value:e,enumerable:!0}):r,e)),kF=e=>RA(Km({},"__esModule",{value:!0}),e);var cX={};EF(cX,{customLearnCard:()=>Y_,didWebLearnCardFromSeed:()=>U5,didWebNetworkLearnCardFromSeed:()=>L5,emptyLearnCard:()=>B3,initLearnCard:()=>sX,learnCardFromApiUrl:()=>r8,learnCardFromSeed:()=>l5,networkLearnCardFromSeed:()=>V5});module.exports=kF(cX);var _y=j_(require("abort-controller/dist/abort-controller.js"),1),fC=j_(require("isomorphic-webcrypto"),1);var IF=Object.create,B_=Object.defineProperty,TF=Object.getOwnPropertyDescriptor,DA=Object.getOwnPropertyNames,SF=Object.getPrototypeOf,RF=Object.prototype.hasOwnProperty,Ye=s((e,t)=>B_(e,"name",{value:t,configurable:!0}),"__name"),Me=s((e,t)=>s(function(){return t||(0,e[DA(e)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),PF=s((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of DA(t))!RF.call(e,i)&&i!==r&&B_(e,i,{get:()=>t[i],enumerable:!(n=TF(t,i))||n.enumerable});return e},"__copyProps"),DF=s((e,t,r)=>(r=e!=null?IF(SF(e)):{},PF(t||!e||!e.__esModule?B_(r,"default",{value:e,enumerable:!0}):r,e)),"__toESM"),xi=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/global-this.js"(e,t){"use strict";var r=Ye(function(n){return n&&n.Math===Math&&n},"check");t.exports=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof global=="object"&&global)||r(typeof e=="object"&&e)||function(){return this}()||Function("return this")()}}),co=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/fails.js"(e,t){"use strict";t.exports=function(r){try{return!!r()}catch{return!0}}}}),Gs=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/descriptors.js"(e,t){"use strict";var r=co();t.exports=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}}),cy=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-bind-native.js"(e,t){"use strict";var r=co();t.exports=!r(function(){var n=function(){}.bind();return typeof n!="function"||n.hasOwnProperty("prototype")})}}),ls=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-call.js"(e,t){"use strict";var r=cy(),n=Function.prototype.call;t.exports=r?n.bind(n):function(){return n.apply(n,arguments)}}}),OF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-property-is-enumerable.js"(e){"use strict";var t={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,n=r&&!t.call({1:2},1);e.f=n?Ye(s(function(o){var a=r(this,o);return!!a&&a.enumerable},"propertyIsEnumerable"),"propertyIsEnumerable"):t}}),Ym=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/create-property-descriptor.js"(e,t){"use strict";t.exports=function(r,n){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:n}}}}),La=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-uncurry-this.js"(e,t){"use strict";var r=cy(),n=Function.prototype,i=n.call,o=r&&n.bind.bind(i,i);t.exports=r?o:function(a){return function(){return i.apply(a,arguments)}}}}),ly=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/classof-raw.js"(e,t){"use strict";var r=La(),n=r({}.toString),i=r("".slice);t.exports=function(o){return i(n(o),8,-1)}}}),NF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/indexed-object.js"(e,t){"use strict";var r=La(),n=co(),i=ly(),o=Object,a=r("".split);t.exports=n(function(){return!o("z").propertyIsEnumerable(0)})?function(c){return i(c)==="String"?a(c,""):o(c)}:o}}),dy=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-null-or-undefined.js"(e,t){"use strict";t.exports=function(r){return r==null}}}),uy=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/require-object-coercible.js"(e,t){"use strict";var r=dy(),n=TypeError;t.exports=function(i){if(r(i))throw new n("Can't call method on "+i);return i}}}),Xm=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-indexed-object.js"(e,t){"use strict";var r=NF(),n=uy();t.exports=function(i){return r(n(i))}}}),Ii=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-callable.js"(e,t){"use strict";var r=typeof document=="object"&&document.all;t.exports=typeof r>"u"&&r!==void 0?function(n){return typeof n=="function"||n===r}:function(n){return typeof n=="function"}}}),$s=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-object.js"(e,t){"use strict";var r=Ii();t.exports=function(n){return typeof n=="object"?n!==null:r(n)}}}),$l=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/get-built-in.js"(e,t){"use strict";var r=xi(),n=Ii(),i=Ye(function(o){return n(o)?o:void 0},"aFunction");t.exports=function(o,a){return arguments.length<2?i(r[o]):r[o]&&r[o][a]}}}),fy=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-is-prototype-of.js"(e,t){"use strict";var r=La();t.exports=r({}.isPrototypeOf)}}),eg=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/environment-user-agent.js"(e,t){"use strict";var r=xi(),n=r.navigator,i=n&&n.userAgent;t.exports=i?String(i):""}}),OA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/environment-v8-version.js"(e,t){"use strict";var r=xi(),n=eg(),i=r.process,o=r.Deno,a=i&&i.versions||o&&o.version,c=a&&a.v8,u,p;c&&(u=c.split("."),p=u[0]>0&&u[0]<4?1:+(u[0]+u[1])),!p&&n&&(u=n.match(/Edge\/(\d+)/),(!u||u[1]>=74)&&(u=n.match(/Chrome\/(\d+)/),u&&(p=+u[1]))),t.exports=p}}),NA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/symbol-constructor-detection.js"(e,t){"use strict";var r=OA(),n=co(),i=xi(),o=i.String;t.exports=!!Object.getOwnPropertySymbols&&!n(function(){var a=Symbol("symbol detection");return!o(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&r&&r<41})}}),jA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/use-symbol-as-uid.js"(e,t){"use strict";var r=NA();t.exports=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}}),BA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-symbol.js"(e,t){"use strict";var r=$l(),n=Ii(),i=fy(),o=jA(),a=Object;t.exports=o?function(c){return typeof c=="symbol"}:function(c){var u=r("Symbol");return n(u)&&i(u.prototype,a(c))}}}),hy=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/try-to-string.js"(e,t){"use strict";var r=String;t.exports=function(n){try{return r(n)}catch{return"Object"}}}}),Hs=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/a-callable.js"(e,t){"use strict";var r=Ii(),n=hy(),i=TypeError;t.exports=function(o){if(r(o))return o;throw new i(n(o)+" is not a function")}}}),F_=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/get-method.js"(e,t){"use strict";var r=Hs(),n=dy();t.exports=function(i,o){var a=i[o];return n(a)?void 0:r(a)}}}),jF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/ordinary-to-primitive.js"(e,t){"use strict";var r=ls(),n=Ii(),i=$s(),o=TypeError;t.exports=function(a,c){var u,p;if(c==="string"&&n(u=a.toString)&&!i(p=r(u,a))||n(u=a.valueOf)&&!i(p=r(u,a))||c!=="string"&&n(u=a.toString)&&!i(p=r(u,a)))return p;throw new o("Can't convert object to primitive value")}}}),Hl=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-pure.js"(e,t){"use strict";t.exports=!1}}),M_=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/define-global-property.js"(e,t){"use strict";var r=xi(),n=Object.defineProperty;t.exports=function(i,o){try{n(r,i,{value:o,configurable:!0,writable:!0})}catch{r[i]=o}return o}}}),V_=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/shared-store.js"(e,t){"use strict";var r=Hl(),n=xi(),i=M_(),o="__core-js_shared__",a=t.exports=n[o]||i(o,{});(a.versions||(a.versions=[])).push({version:"3.41.0",mode:r?"pure":"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})}}),FA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/shared.js"(e,t){"use strict";var r=V_();t.exports=function(n,i){return r[n]||(r[n]=i||{})}}}),MA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-object.js"(e,t){"use strict";var r=uy(),n=Object;t.exports=function(i){return n(r(i))}}}),Jc=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/has-own-property.js"(e,t){"use strict";var r=La(),n=MA(),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||Ye(s(function(a,c){return i(n(a),c)},"hasOwn"),"hasOwn")}}),VA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/uid.js"(e,t){"use strict";var r=La(),n=0,i=Math.random(),o=r(1 .toString);t.exports=function(a){return"Symbol("+(a===void 0?"":a)+")_"+o(++n+i,36)}}}),Za=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/well-known-symbol.js"(e,t){"use strict";var r=xi(),n=FA(),i=Jc(),o=VA(),a=NA(),c=jA(),u=r.Symbol,p=n("wks"),_=c?u.for||u:u&&u.withoutSetter||o;t.exports=function(w){return i(p,w)||(p[w]=a&&i(u,w)?u[w]:_("Symbol."+w)),p[w]}}}),BF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-primitive.js"(e,t){"use strict";var r=ls(),n=$s(),i=BA(),o=F_(),a=jF(),c=Za(),u=TypeError,p=c("toPrimitive");t.exports=function(_,w){if(!n(_)||i(_))return _;var R=o(_,p),P;if(R){if(w===void 0&&(w="default"),P=r(R,_,w),!n(P)||i(P))return P;throw new u("Can't convert object to primitive value")}return w===void 0&&(w="number"),a(_,w)}}}),UA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-property-key.js"(e,t){"use strict";var r=BF(),n=BA();t.exports=function(i){var o=r(i,"string");return n(o)?o:o+""}}}),py=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/document-create-element.js"(e,t){"use strict";var r=xi(),n=$s(),i=r.document,o=n(i)&&n(i.createElement);t.exports=function(a){return o?i.createElement(a):{}}}}),LA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/ie8-dom-define.js"(e,t){"use strict";var r=Gs(),n=co(),i=py();t.exports=!r&&!n(function(){return Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a!==7})}}),ZA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-get-own-property-descriptor.js"(e){"use strict";var t=Gs(),r=ls(),n=OF(),i=Ym(),o=Xm(),a=UA(),c=Jc(),u=LA(),p=Object.getOwnPropertyDescriptor;e.f=t?p:Ye(s(function(w,R){if(w=o(w),R=a(R),u)try{return p(w,R)}catch{}if(c(w,R))return i(!r(n.f,w,R),w[R])},"getOwnPropertyDescriptor"),"getOwnPropertyDescriptor")}}),zA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/v8-prototype-define-bug.js"(e,t){"use strict";var r=Gs(),n=co();t.exports=r&&n(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})}}),Kl=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/an-object.js"(e,t){"use strict";var r=$s(),n=String,i=TypeError;t.exports=function(o){if(r(o))return o;throw new i(n(o)+" is not an object")}}}),zd=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-define-property.js"(e){"use strict";var t=Gs(),r=LA(),n=zA(),i=Kl(),o=UA(),a=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p="enumerable",_="configurable",w="writable";e.f=t?n?Ye(s(function(P,$,D){if(i(P),$=o($),i(D),typeof P=="function"&&$==="prototype"&&"value"in D&&w in D&&!D[w]){var L=u(P,$);L&&L[w]&&(P[$]=D.value,D={configurable:_ in D?D[_]:L[_],enumerable:p in D?D[p]:L[p],writable:!1})}return c(P,$,D)},"defineProperty"),"defineProperty"):c:Ye(s(function(P,$,D){if(i(P),$=o($),i(D),r)try{return c(P,$,D)}catch{}if("get"in D||"set"in D)throw new a("Accessors not supported");return"value"in D&&(P[$]=D.value),P},"defineProperty"),"defineProperty")}}),gf=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/create-non-enumerable-property.js"(e,t){"use strict";var r=Gs(),n=zd(),i=Ym();t.exports=r?function(o,a,c){return n.f(o,a,i(1,c))}:function(o,a,c){return o[a]=c,o}}}),WA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-name.js"(e,t){"use strict";var r=Gs(),n=Jc(),i=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,a=n(i,"name"),c=a&&Ye(s(function(){},"something"),"something").name==="something",u=a&&(!r||r&&o(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}}}),U_=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/inspect-source.js"(e,t){"use strict";var r=La(),n=Ii(),i=V_(),o=r(Function.toString);n(i.inspectSource)||(i.inspectSource=function(a){return o(a)}),t.exports=i.inspectSource}}),FF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/weak-map-basic-detection.js"(e,t){"use strict";var r=xi(),n=Ii(),i=r.WeakMap;t.exports=n(i)&&/native code/.test(String(i))}}),L_=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/shared-key.js"(e,t){"use strict";var r=FA(),n=VA(),i=r("keys");t.exports=function(o){return i[o]||(i[o]=n(o))}}}),Z_=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/hidden-keys.js"(e,t){"use strict";t.exports={}}}),my=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/internal-state.js"(e,t){"use strict";var r=FF(),n=xi(),i=$s(),o=gf(),a=Jc(),c=V_(),u=L_(),p=Z_(),_="Object already initialized",w=n.TypeError,R=n.WeakMap,P,$,D,L=Ye(function(le){return D(le)?$(le):P(le,{})},"enforce"),H=Ye(function(le){return function(oe){var fe;if(!i(oe)||(fe=$(oe)).type!==le)throw new w("Incompatible receiver, "+le+" required");return fe}},"getterFor");r||c.state?(re=c.state||(c.state=new R),re.get=re.get,re.has=re.has,re.set=re.set,P=Ye(function(le,oe){if(re.has(le))throw new w(_);return oe.facade=le,re.set(le,oe),oe},"set"),$=Ye(function(le){return re.get(le)||{}},"get"),D=Ye(function(le){return re.has(le)},"has")):(me=u("state"),p[me]=!0,P=Ye(function(le,oe){if(a(le,me))throw new w(_);return oe.facade=le,o(le,me,oe),oe},"set"),$=Ye(function(le){return a(le,me)?le[me]:{}},"get"),D=Ye(function(le){return a(le,me)},"has"));var re,me;t.exports={set:P,get:$,has:D,enforce:L,getterFor:H}}}),qA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/make-built-in.js"(e,t){"use strict";var r=La(),n=co(),i=Ii(),o=Jc(),a=Gs(),c=WA().CONFIGURABLE,u=U_(),p=my(),_=p.enforce,w=p.get,R=String,P=Object.defineProperty,$=r("".slice),D=r("".replace),L=r([].join),H=a&&!n(function(){return P(function(){},"length",{value:8}).length!==8}),re=String(String).split("String"),me=t.exports=function(le,oe,fe){$(R(oe),0,7)==="Symbol("&&(oe="["+D(R(oe),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),fe&&fe.getter&&(oe="get "+oe),fe&&fe.setter&&(oe="set "+oe),(!o(le,"name")||c&&le.name!==oe)&&(a?P(le,"name",{value:oe,configurable:!0}):le.name=oe),H&&fe&&o(fe,"arity")&&le.length!==fe.arity&&P(le,"length",{value:fe.arity});try{fe&&o(fe,"constructor")&&fe.constructor?a&&P(le,"prototype",{writable:!1}):le.prototype&&(le.prototype=void 0)}catch{}var Ee=_(le);return o(Ee,"source")||(Ee.source=L(re,typeof oe=="string"?oe:"")),le};Function.prototype.toString=me(Ye(s(function(){return i(this)&&w(this).source||u(this)},"toString"),"toString"),"toString")}}),yf=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/define-built-in.js"(e,t){"use strict";var r=Ii(),n=zd(),i=qA(),o=M_();t.exports=function(a,c,u,p){p||(p={});var _=p.enumerable,w=p.name!==void 0?p.name:c;if(r(u)&&i(u,w,p),p.global)_?a[c]=u:o(c,u);else{try{p.unsafe?a[c]&&(_=!0):delete a[c]}catch{}_?a[c]=u:n.f(a,c,{value:u,enumerable:!1,configurable:!p.nonConfigurable,writable:!p.nonWritable})}return a}}}),MF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/math-trunc.js"(e,t){"use strict";var r=Math.ceil,n=Math.floor;t.exports=Math.trunc||Ye(s(function(o){var a=+o;return(a>0?n:r)(a)},"trunc"),"trunc")}}),z_=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-integer-or-infinity.js"(e,t){"use strict";var r=MF();t.exports=function(n){var i=+n;return i!==i||i===0?0:r(i)}}}),VF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-absolute-index.js"(e,t){"use strict";var r=z_(),n=Math.max,i=Math.min;t.exports=function(o,a){var c=r(o);return c<0?n(c+a,0):i(c,a)}}}),UF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-length.js"(e,t){"use strict";var r=z_(),n=Math.min;t.exports=function(i){var o=r(i);return o>0?n(o,9007199254740991):0}}}),GA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/length-of-array-like.js"(e,t){"use strict";var r=UF();t.exports=function(n){return r(n.length)}}}),LF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/array-includes.js"(e,t){"use strict";var r=Xm(),n=VF(),i=GA(),o=Ye(function(a){return function(c,u,p){var _=r(c),w=i(_);if(w===0)return!a&&-1;var R=n(p,w),P;if(a&&u!==u){for(;w>R;)if(P=_[R++],P!==P)return!0}else for(;w>R;R++)if((a||R in _)&&_[R]===u)return a||R||0;return!a&&-1}},"createMethod");t.exports={includes:o(!0),indexOf:o(!1)}}}),$A=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-keys-internal.js"(e,t){"use strict";var r=La(),n=Jc(),i=Xm(),o=LF().indexOf,a=Z_(),c=r([].push);t.exports=function(u,p){var _=i(u),w=0,R=[],P;for(P in _)!n(a,P)&&n(_,P)&&c(R,P);for(;p.length>w;)n(_,P=p[w++])&&(~o(R,P)||c(R,P));return R}}}),W_=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/enum-bug-keys.js"(e,t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}}),ZF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-get-own-property-names.js"(e){"use strict";var t=$A(),r=W_(),n=r.concat("length","prototype");e.f=Object.getOwnPropertyNames||Ye(s(function(o){return t(o,n)},"getOwnPropertyNames"),"getOwnPropertyNames")}}),zF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-get-own-property-symbols.js"(e){"use strict";e.f=Object.getOwnPropertySymbols}}),WF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/own-keys.js"(e,t){"use strict";var r=$l(),n=La(),i=ZF(),o=zF(),a=Kl(),c=n([].concat);t.exports=r("Reflect","ownKeys")||Ye(s(function(p){var _=i.f(a(p)),w=o.f;return w?c(_,w(p)):_},"ownKeys"),"ownKeys")}}),HA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/copy-constructor-properties.js"(e,t){"use strict";var r=Jc(),n=WF(),i=ZA(),o=zd();t.exports=function(a,c,u){for(var p=n(c),_=o.f,w=i.f,R=0;R<p.length;R++){var P=p[R];!r(a,P)&&!(u&&r(u,P))&&_(a,P,w(c,P))}}}}),KA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-forced.js"(e,t){"use strict";var r=co(),n=Ii(),i=/#|\.prototype\./,o=Ye(function(_,w){var R=c[a(_)];return R===p?!0:R===u?!1:n(w)?r(w):!!w},"isForced"),a=o.normalize=function(_){return String(_).replace(i,".").toLowerCase()},c=o.data={},u=o.NATIVE="N",p=o.POLYFILL="P";t.exports=o}}),Fo=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/export.js"(e,t){"use strict";var r=xi(),n=ZA().f,i=gf(),o=yf(),a=M_(),c=HA(),u=KA();t.exports=function(p,_){var w=p.target,R=p.global,P=p.stat,$,D,L,H,re,me;if(R?D=r:P?D=r[w]||a(w,{}):D=r[w]&&r[w].prototype,D)for(L in _){if(re=_[L],p.dontCallGetSet?(me=n(D,L),H=me&&me.value):H=D[L],$=u(R?L:w+(P?".":"#")+L,p.forced),!$&&H!==void 0){if(typeof re==typeof H)continue;c(re,H)}(p.sham||H&&H.sham)&&i(re,"sham",!0),o(D,L,re,p)}}}}),qF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/correct-prototype-getter.js"(e,t){"use strict";var r=co();t.exports=!r(function(){function n(){}return s(n,"F"),Ye(n,"F"),n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype})}}),q_=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-get-prototype-of.js"(e,t){"use strict";var r=Jc(),n=Ii(),i=MA(),o=L_(),a=qF(),c=o("IE_PROTO"),u=Object,p=u.prototype;t.exports=a?u.getPrototypeOf:function(_){var w=i(_);if(r(w,c))return w[c];var R=w.constructor;return n(R)&&w instanceof R?R.prototype:w instanceof u?p:null}}}),GF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-uncurry-this-accessor.js"(e,t){"use strict";var r=La(),n=Hs();t.exports=function(i,o,a){try{return r(n(Object.getOwnPropertyDescriptor(i,o)[a]))}catch{}}}}),$F=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-possible-prototype.js"(e,t){"use strict";var r=$s();t.exports=function(n){return r(n)||n===null}}}),HF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/a-possible-prototype.js"(e,t){"use strict";var r=$F(),n=String,i=TypeError;t.exports=function(o){if(r(o))return o;throw new i("Can't set "+n(o)+" as a prototype")}}}),G_=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-set-prototype-of.js"(e,t){"use strict";var r=GF(),n=$s(),i=uy(),o=HF();t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var a=!1,c={},u;try{u=r(Object.prototype,"__proto__","set"),u(c,[]),a=c instanceof Array}catch{}return Ye(s(function(_,w){return i(_),o(w),n(_)&&(a?u(_,w):_.__proto__=w),_},"setPrototypeOf"),"setPrototypeOf")}():void 0)}}),KF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-keys.js"(e,t){"use strict";var r=$A(),n=W_();t.exports=Object.keys||Ye(s(function(o){return r(o,n)},"keys"),"keys")}}),JF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-define-properties.js"(e){"use strict";var t=Gs(),r=zA(),n=zd(),i=Kl(),o=Xm(),a=KF();e.f=t&&!r?Object.defineProperties:Ye(s(function(u,p){i(u);for(var _=o(p),w=a(p),R=w.length,P=0,$;R>P;)n.f(u,$=w[P++],_[$]);return u},"defineProperties"),"defineProperties")}}),JA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/html.js"(e,t){"use strict";var r=$l();t.exports=r("document","documentElement")}}),gy=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-create.js"(e,t){"use strict";var r=Kl(),n=JF(),i=W_(),o=Z_(),a=JA(),c=py(),u=L_(),p=">",_="<",w="prototype",R="script",P=u("IE_PROTO"),$=Ye(function(){},"EmptyConstructor"),D=Ye(function(le){return _+R+p+le+_+"/"+R+p},"scriptTag"),L=Ye(function(le){le.write(D("")),le.close();var oe=le.parentWindow.Object;return le=null,oe},"NullProtoObjectViaActiveX"),H=Ye(function(){var le=c("iframe"),oe="java"+R+":",fe;return le.style.display="none",a.appendChild(le),le.src=String(oe),fe=le.contentWindow.document,fe.open(),fe.write(D("document.F=Object")),fe.close(),fe.F},"NullProtoObjectViaIFrame"),re,me=Ye(function(){try{re=new ActiveXObject("htmlfile")}catch{}me=typeof document<"u"?document.domain&&re?L(re):H():L(re);for(var le=i.length;le--;)delete me[w][i[le]];return me()},"NullProtoObject");o[P]=!0,t.exports=Object.create||Ye(s(function(oe,fe){var Ee;return oe!==null?($[w]=r(oe),Ee=new $,$[w]=null,Ee[P]=oe):Ee=me(),fe===void 0?Ee:n.f(Ee,fe)},"create"),"create")}}),QF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/install-error-cause.js"(e,t){"use strict";var r=$s(),n=gf();t.exports=function(i,o){r(o)&&"cause"in o&&n(i,"cause",o.cause)}}}),YF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/error-stack-clear.js"(e,t){"use strict";var r=La(),n=Error,i=r("".replace),o=function(u){return String(new n(u).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,c=a.test(o);t.exports=function(u,p){if(c&&typeof u=="string"&&!n.prepareStackTrace)for(;p--;)u=i(u,a,"");return u}}}),XF=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/error-stack-installable.js"(e,t){"use strict";var r=co(),n=Ym();t.exports=!r(function(){var i=new Error("a");return"stack"in i?(Object.defineProperty(i,"stack",n(1,7)),i.stack!==7):!0})}}),eM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/error-stack-install.js"(e,t){"use strict";var r=gf(),n=YF(),i=XF(),o=Error.captureStackTrace;t.exports=function(a,c,u,p){i&&(o?o(a,c):r(a,"stack",n(u,p)))}}}),tM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-uncurry-this-clause.js"(e,t){"use strict";var r=ly(),n=La();t.exports=function(i){if(r(i)==="Function")return n(i)}}}),$_=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-bind-context.js"(e,t){"use strict";var r=tM(),n=Hs(),i=cy(),o=r(r.bind);t.exports=function(a,c){return n(a),c===void 0?a:i?o(a,c):function(){return a.apply(c,arguments)}}}}),tg=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/iterators.js"(e,t){"use strict";t.exports={}}}),rM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-array-iterator-method.js"(e,t){"use strict";var r=Za(),n=tg(),i=r("iterator"),o=Array.prototype;t.exports=function(a){return a!==void 0&&(n.Array===a||o[i]===a)}}}),H_=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-string-tag-support.js"(e,t){"use strict";var r=Za(),n=r("toStringTag"),i={};i[n]="z",t.exports=String(i)==="[object z]"}}),yy=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/classof.js"(e,t){"use strict";var r=H_(),n=Ii(),i=ly(),o=Za(),a=o("toStringTag"),c=Object,u=i(function(){return arguments}())==="Arguments",p=Ye(function(_,w){try{return _[w]}catch{}},"tryGet");t.exports=r?i:function(_){var w,R,P;return _===void 0?"Undefined":_===null?"Null":typeof(R=p(w=c(_),a))=="string"?R:u?i(w):(P=i(w))==="Object"&&n(w.callee)?"Arguments":P}}}),QA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/get-iterator-method.js"(e,t){"use strict";var r=yy(),n=F_(),i=dy(),o=tg(),a=Za(),c=a("iterator");t.exports=function(u){if(!i(u))return n(u,c)||n(u,"@@iterator")||o[r(u)]}}}),nM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/get-iterator.js"(e,t){"use strict";var r=ls(),n=Hs(),i=Kl(),o=hy(),a=QA(),c=TypeError;t.exports=function(u,p){var _=arguments.length<2?a(u):p;if(n(_))return i(r(_,u));throw new c(o(u)+" is not iterable")}}}),iM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/iterator-close.js"(e,t){"use strict";var r=ls(),n=Kl(),i=F_();t.exports=function(o,a,c){var u,p;n(o);try{if(u=i(o,"return"),!u){if(a==="throw")throw c;return c}u=r(u,o)}catch(_){p=!0,u=_}if(a==="throw")throw c;if(p)throw u;return n(u),c}}}),rg=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/iterate.js"(e,t){"use strict";var r=$_(),n=ls(),i=Kl(),o=hy(),a=rM(),c=GA(),u=fy(),p=nM(),_=QA(),w=iM(),R=TypeError,P=Ye(function(D,L){this.stopped=D,this.result=L},"Result"),$=P.prototype;t.exports=function(D,L,H){var re=H&&H.that,me=!!(H&&H.AS_ENTRIES),le=!!(H&&H.IS_RECORD),oe=!!(H&&H.IS_ITERATOR),fe=!!(H&&H.INTERRUPTED),Ee=r(L,re),se,Be,ke,Te,et,_e,Ue,Y=Ye(function(O){return se&&w(se,"normal",O),new P(!0,O)},"stop"),b=Ye(function(O){return me?(i(O),fe?Ee(O[0],O[1],Y):Ee(O[0],O[1])):fe?Ee(O,Y):Ee(O)},"callFn");if(le)se=D.iterator;else if(oe)se=D;else{if(Be=_(D),!Be)throw new R(o(D)+" is not iterable");if(a(Be)){for(ke=0,Te=c(D);Te>ke;ke++)if(et=b(D[ke]),et&&u($,et))return et;return new P(!1)}se=p(D,Be)}for(_e=le?D.next:se.next;!(Ue=n(_e,se)).done;){try{et=b(Ue.value)}catch(O){w(se,"throw",O)}if(typeof et=="object"&&et&&u($,et))return et}return new P(!1)}}}),K_=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-string.js"(e,t){"use strict";var r=yy(),n=String;t.exports=function(i){if(r(i)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return n(i)}}}),aM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/normalize-string-argument.js"(e,t){"use strict";var r=K_();t.exports=function(n,i){return n===void 0?arguments.length<2?"":i:r(n)}}}),oM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.aggregate-error.constructor.js"(){"use strict";var e=Fo(),t=fy(),r=q_(),n=G_(),i=HA(),o=gy(),a=gf(),c=Ym(),u=QF(),p=eM(),_=rg(),w=aM(),R=Za(),P=R("toStringTag"),$=Error,D=[].push,L=Ye(s(function(me,le){var oe=t(H,this),fe;n?fe=n(new $,oe?r(this):H):(fe=oe?this:o(H),a(fe,P,"Error")),le!==void 0&&a(fe,"message",w(le)),p(fe,L,fe.stack,1),arguments.length>2&&u(fe,arguments[2]);var Ee=[];return _(me,D,{that:Ee}),a(fe,"errors",Ee),fe},"AggregateError"),"AggregateError");n?n(L,$):i(L,$,{name:!0});var H=L.prototype=o($.prototype,{constructor:c(1,L),message:c(1,""),name:c(1,"AggregateError")});e({global:!0,constructor:!0,arity:2},{AggregateError:L})}}),sM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.aggregate-error.js"(){"use strict";oM()}}),cM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/add-to-unscopables.js"(e,t){"use strict";var r=Za(),n=gy(),i=zd().f,o=r("unscopables"),a=Array.prototype;a[o]===void 0&&i(a,o,{configurable:!0,value:n(null)}),t.exports=function(c){a[o][c]=!0}}}),YA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/iterators-core.js"(e,t){"use strict";var r=co(),n=Ii(),i=$s(),o=gy(),a=q_(),c=yf(),u=Za(),p=Hl(),_=u("iterator"),w=!1,R,P,$;[].keys&&($=[].keys(),"next"in $?(P=a(a($)),P!==Object.prototype&&(R=P)):w=!0);var D=!i(R)||r(function(){var L={};return R[_].call(L)!==L});D?R={}:p&&(R=o(R)),n(R[_])||c(R,_,function(){return this}),t.exports={IteratorPrototype:R,BUGGY_SAFARI_ITERATORS:w}}}),vy=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/set-to-string-tag.js"(e,t){"use strict";var r=zd().f,n=Jc(),i=Za(),o=i("toStringTag");t.exports=function(a,c,u){a&&!u&&(a=a.prototype),a&&!n(a,o)&&r(a,o,{configurable:!0,value:c})}}}),lM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/iterator-create-constructor.js"(e,t){"use strict";var r=YA().IteratorPrototype,n=gy(),i=Ym(),o=vy(),a=tg(),c=Ye(function(){return this},"returnThis");t.exports=function(u,p,_,w){var R=p+" Iterator";return u.prototype=n(r,{next:i(+!w,_)}),o(u,R,!1,!0),a[R]=c,u}}}),XA=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/iterator-define.js"(e,t){"use strict";var r=Fo(),n=ls(),i=Hl(),o=WA(),a=Ii(),c=lM(),u=q_(),p=G_(),_=vy(),w=gf(),R=yf(),P=Za(),$=tg(),D=YA(),L=o.PROPER,H=o.CONFIGURABLE,re=D.IteratorPrototype,me=D.BUGGY_SAFARI_ITERATORS,le=P("iterator"),oe="keys",fe="values",Ee="entries",se=Ye(function(){return this},"returnThis");t.exports=function(Be,ke,Te,et,_e,Ue,Y){c(Te,ke,et);var b=Ye(function(Oe){if(Oe===_e&&q)return q;if(!me&&Oe&&Oe in V)return V[Oe];switch(Oe){case oe:return Ye(s(function(){return new Te(this,Oe)},"keys"),"keys");case fe:return Ye(s(function(){return new Te(this,Oe)},"values"),"values");case Ee:return Ye(s(function(){return new Te(this,Oe)},"entries"),"entries")}return function(){return new Te(this)}},"getIterationMethod"),O=ke+" Iterator",M=!1,V=Be.prototype,W=V[le]||V["@@iterator"]||_e&&V[_e],q=!me&&W||b(_e),X=ke==="Array"&&V.entries||W,Q,A,Z;if(X&&(Q=u(X.call(new Be)),Q!==Object.prototype&&Q.next&&(!i&&u(Q)!==re&&(p?p(Q,re):a(Q[le])||R(Q,le,se)),_(Q,O,!0,!0),i&&($[O]=se))),L&&_e===fe&&W&&W.name!==fe&&(!i&&H?w(V,"name",fe):(M=!0,q=Ye(s(function(){return n(W,this)},"values"),"values"))),_e)if(A={values:b(fe),keys:Ue?q:b(oe),entries:b(Ee)},Y)for(Z in A)(me||M||!(Z in V))&&R(V,Z,A[Z]);else r({target:ke,proto:!0,forced:me||M},A);return(!i||Y)&&V[le]!==q&&R(V,le,q,{name:_e}),$[ke]=q,A}}}),eC=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/create-iter-result-object.js"(e,t){"use strict";t.exports=function(r,n){return{value:r,done:n}}}}),tC=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.array.iterator.js"(e,t){"use strict";var r=Xm(),n=cM(),i=tg(),o=my(),a=zd().f,c=XA(),u=eC(),p=Hl(),_=Gs(),w="Array Iterator",R=o.set,P=o.getterFor(w);t.exports=c(Array,"Array",function(D,L){R(this,{type:w,target:r(D),index:0,kind:L})},function(){var D=P(this),L=D.target,H=D.index++;if(!L||H>=L.length)return D.target=null,u(void 0,!0);switch(D.kind){case"keys":return u(H,!1);case"values":return u(L[H],!1)}return u([H,L[H]],!1)},"values");var $=i.Arguments=i.Array;if(n("keys"),n("values"),n("entries"),!p&&_&&$.name!=="values")try{a($,"name",{value:"values"})}catch{}}}),dM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-to-string.js"(e,t){"use strict";var r=H_(),n=yy();t.exports=r?{}.toString:Ye(s(function(){return"[object "+n(this)+"]"},"toString"),"toString")}}),uM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.object.to-string.js"(){"use strict";var e=H_(),t=yf(),r=dM();e||t(Object.prototype,"toString",r,{unsafe:!0})}}),rC=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/environment.js"(e,t){"use strict";var r=xi(),n=eg(),i=ly(),o=Ye(function(a){return n.slice(0,a.length)===a},"userAgentStartsWith");t.exports=function(){return o("Bun/")?"BUN":o("Cloudflare-Workers")?"CLOUDFLARE":o("Deno/")?"DENO":o("Node.js/")?"NODE":r.Bun&&typeof Bun.version=="string"?"BUN":r.Deno&&typeof Deno.version=="object"?"DENO":i(r.process)==="process"?"NODE":r.window&&r.document?"BROWSER":"REST"}()}}),J_=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/environment-is-node.js"(e,t){"use strict";var r=rC();t.exports=r==="NODE"}}),fM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/define-built-in-accessor.js"(e,t){"use strict";var r=qA(),n=zd();t.exports=function(i,o,a){return a.get&&r(a.get,o,{getter:!0}),a.set&&r(a.set,o,{setter:!0}),n.f(i,o,a)}}}),hM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/set-species.js"(e,t){"use strict";var r=$l(),n=fM(),i=Za(),o=Gs(),a=i("species");t.exports=function(c){var u=r(c);o&&u&&!u[a]&&n(u,a,{configurable:!0,get:function(){return this}})}}}),pM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/an-instance.js"(e,t){"use strict";var r=fy(),n=TypeError;t.exports=function(i,o){if(r(o,i))return i;throw new n("Incorrect invocation")}}}),mM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-constructor.js"(e,t){"use strict";var r=La(),n=co(),i=Ii(),o=yy(),a=$l(),c=U_(),u=Ye(function(){},"noop"),p=a("Reflect","construct"),_=/^\s*(?:class|function)\b/,w=r(_.exec),R=!_.test(u),P=Ye(s(function(L){if(!i(L))return!1;try{return p(u,[],L),!0}catch{return!1}},"isConstructor"),"isConstructor"),$=Ye(s(function(L){if(!i(L))return!1;switch(o(L)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return R||!!w(_,c(L))}catch{return!0}},"isConstructor"),"isConstructor");$.sham=!0,t.exports=!p||n(function(){var D;return P(P.call)||!P(Object)||!P(function(){D=!0})||D})?$:P}}),gM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/a-constructor.js"(e,t){"use strict";var r=mM(),n=hy(),i=TypeError;t.exports=function(o){if(r(o))return o;throw new i(n(o)+" is not a constructor")}}}),nC=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/species-constructor.js"(e,t){"use strict";var r=Kl(),n=gM(),i=dy(),o=Za(),a=o("species");t.exports=function(c,u){var p=r(c).constructor,_;return p===void 0||i(_=r(p)[a])?u:n(_)}}}),iC=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-apply.js"(e,t){"use strict";var r=cy(),n=Function.prototype,i=n.apply,o=n.call;t.exports=typeof Reflect=="object"&&Reflect.apply||(r?o.bind(i):function(){return o.apply(i,arguments)})}}),aC=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/array-slice.js"(e,t){"use strict";var r=La();t.exports=r([].slice)}}),yM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/validate-arguments-length.js"(e,t){"use strict";var r=TypeError;t.exports=function(n,i){if(n<i)throw new r("Not enough arguments");return n}}}),oC=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/environment-is-ios.js"(e,t){"use strict";var r=eg();t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)}}),sC=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/task.js"(e,t){"use strict";var r=xi(),n=iC(),i=$_(),o=Ii(),a=Jc(),c=co(),u=JA(),p=aC(),_=py(),w=yM(),R=oC(),P=J_(),$=r.setImmediate,D=r.clearImmediate,L=r.process,H=r.Dispatch,re=r.Function,me=r.MessageChannel,le=r.String,oe=0,fe={},Ee="onreadystatechange",se,Be,ke,Te;c(function(){se=r.location});var et=Ye(function(b){if(a(fe,b)){var O=fe[b];delete fe[b],O()}},"run"),_e=Ye(function(b){return function(){et(b)}},"runner"),Ue=Ye(function(b){et(b.data)},"eventListener"),Y=Ye(function(b){r.postMessage(le(b),se.protocol+"//"+se.host)},"globalPostMessageDefer");(!$||!D)&&($=Ye(s(function(O){w(arguments.length,1);var M=o(O)?O:re(O),V=p(arguments,1);return fe[++oe]=function(){n(M,void 0,V)},Be(oe),oe},"setImmediate"),"setImmediate"),D=Ye(s(function(O){delete fe[O]},"clearImmediate"),"clearImmediate"),P?Be=Ye(function(b){L.nextTick(_e(b))},"defer"):H&&H.now?Be=Ye(function(b){H.now(_e(b))},"defer"):me&&!R?(ke=new me,Te=ke.port2,ke.port1.onmessage=Ue,Be=i(Te.postMessage,Te)):r.addEventListener&&o(r.postMessage)&&!r.importScripts&&se&&se.protocol!=="file:"&&!c(Y)?(Be=Y,r.addEventListener("message",Ue,!1)):Ee in _("script")?Be=Ye(function(b){u.appendChild(_("script"))[Ee]=function(){u.removeChild(this),et(b)}},"defer"):Be=Ye(function(b){setTimeout(_e(b),0)},"defer")),t.exports={set:$,clear:D}}}),vM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/safe-get-built-in.js"(e,t){"use strict";var r=xi(),n=Gs(),i=Object.getOwnPropertyDescriptor;t.exports=function(o){if(!n)return r[o];var a=i(r,o);return a&&a.value}}}),cC=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/queue.js"(e,t){"use strict";var r=Ye(function(){this.head=null,this.tail=null},"Queue");r.prototype={add:function(n){var i={item:n,next:null},o=this.tail;o?o.next=i:this.head=i,this.tail=i},get:function(){var n=this.head;if(n){var i=this.head=n.next;return i===null&&(this.tail=null),n.item}}},t.exports=r}}),bM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/environment-is-ios-pebble.js"(e,t){"use strict";var r=eg();t.exports=/ipad|iphone|ipod/i.test(r)&&typeof Pebble<"u"}}),_M=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/environment-is-webos-webkit.js"(e,t){"use strict";var r=eg();t.exports=/web0s(?!.*chrome)/i.test(r)}}),wM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/microtask.js"(e,t){"use strict";var r=xi(),n=vM(),i=$_(),o=sC().set,a=cC(),c=oC(),u=bM(),p=_M(),_=J_(),w=r.MutationObserver||r.WebKitMutationObserver,R=r.document,P=r.process,$=r.Promise,D=n("queueMicrotask"),L,H,re,me,le;D||(oe=new a,fe=Ye(function(){var Ee,se;for(_&&(Ee=P.domain)&&Ee.exit();se=oe.get();)try{se()}catch(Be){throw oe.head&&L(),Be}Ee&&Ee.enter()},"flush"),!c&&!_&&!p&&w&&R?(H=!0,re=R.createTextNode(""),new w(fe).observe(re,{characterData:!0}),L=Ye(function(){re.data=H=!H},"notify")):!u&&$&&$.resolve?(me=$.resolve(void 0),me.constructor=$,le=i(me.then,me),L=Ye(function(){le(fe)},"notify")):_?L=Ye(function(){P.nextTick(fe)},"notify"):(o=i(o,r),L=Ye(function(){o(fe)},"notify")),D=Ye(function(Ee){oe.head||L(),oe.add(Ee)},"microtask"));var oe,fe;t.exports=D}}),xM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/host-report-errors.js"(e,t){"use strict";t.exports=function(r,n){try{arguments.length===1?console.error(r):console.error(r,n)}catch{}}}}),Ah=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/perform.js"(e,t){"use strict";t.exports=function(r){try{return{error:!1,value:r()}}catch(n){return{error:!0,value:n}}}}}),Ch=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/promise-native-constructor.js"(e,t){"use strict";var r=xi();t.exports=r.Promise}}),ng=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/promise-constructor-detection.js"(e,t){"use strict";var r=xi(),n=Ch(),i=Ii(),o=KA(),a=U_(),c=Za(),u=rC(),p=Hl(),_=OA(),w=n&&n.prototype,R=c("species"),P=!1,$=i(r.PromiseRejectionEvent),D=o("Promise",function(){var L=a(n),H=L!==String(n);if(!H&&_===66||p&&!(w.catch&&w.finally))return!0;if(!_||_<51||!/native code/.test(L)){var re=new n(function(oe){oe(1)}),me=Ye(function(oe){oe(function(){},function(){})},"FakePromise"),le=re.constructor={};if(le[R]=me,P=re.then(function(){})instanceof me,!P)return!0}return!H&&(u==="BROWSER"||u==="DENO")&&!$});t.exports={CONSTRUCTOR:D,REJECTION_EVENT:$,SUBCLASSING:P}}}),Jl=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/new-promise-capability.js"(e,t){"use strict";var r=Hs(),n=TypeError,i=Ye(function(o){var a,c;this.promise=new o(function(u,p){if(a!==void 0||c!==void 0)throw new n("Bad Promise constructor");a=u,c=p}),this.resolve=r(a),this.reject=r(c)},"PromiseCapability");t.exports.f=function(o){return new i(o)}}}),AM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.constructor.js"(){"use strict";var e=Fo(),t=Hl(),r=J_(),n=xi(),i=ls(),o=yf(),a=G_(),c=vy(),u=hM(),p=Hs(),_=Ii(),w=$s(),R=pM(),P=nC(),$=sC().set,D=wM(),L=xM(),H=Ah(),re=cC(),me=my(),le=Ch(),oe=ng(),fe=Jl(),Ee="Promise",se=oe.CONSTRUCTOR,Be=oe.REJECTION_EVENT,ke=oe.SUBCLASSING,Te=me.getterFor(Ee),et=me.set,_e=le&&le.prototype,Ue=le,Y=_e,b=n.TypeError,O=n.document,M=n.process,V=fe.f,W=V,q=!!(O&&O.createEvent&&n.dispatchEvent),X="unhandledrejection",Q="rejectionhandled",A=0,Z=1,Oe=2,G=1,we=2,pe,De,Pe,lt,Ke=Ye(function(Fe){var tt;return w(Fe)&&_(tt=Fe.then)?tt:!1},"isThenable"),Xe=Ye(function(Fe,tt){var Le=tt.value,qe=tt.state===Z,gt=qe?Fe.ok:Fe.fail,Nt=Fe.resolve,Mt=Fe.reject,sn=Fe.domain,Kt,hr,xn;try{gt?(qe||(tt.rejection===we&&de(tt),tt.rejection=G),gt===!0?Kt=Le:(sn&&sn.enter(),Kt=gt(Le),sn&&(sn.exit(),xn=!0)),Kt===Fe.promise?Mt(new b("Promise-chain cycle")):(hr=Ke(Kt))?i(hr,Kt,Nt,Mt):Nt(Kt)):Mt(Le)}catch(tr){sn&&!xn&&sn.exit(),Mt(tr)}},"callReaction"),ir=Ye(function(Fe,tt){Fe.notified||(Fe.notified=!0,D(function(){for(var Le=Fe.reactions,qe;qe=Le.get();)Xe(qe,Fe);Fe.notified=!1,tt&&!Fe.rejection&&F(Fe)}))},"notify"),ee=Ye(function(Fe,tt,Le){var qe,gt;q?(qe=O.createEvent("Event"),qe.promise=tt,qe.reason=Le,qe.initEvent(Fe,!1,!0),n.dispatchEvent(qe)):qe={promise:tt,reason:Le},!Be&&(gt=n["on"+Fe])?gt(qe):Fe===X&&L("Unhandled promise rejection",Le)},"dispatchEvent"),F=Ye(function(Fe){i($,n,function(){var tt=Fe.facade,Le=Fe.value,qe=z(Fe),gt;if(qe&&(gt=H(function(){r?M.emit("unhandledRejection",Le,tt):ee(X,tt,Le)}),Fe.rejection=r||z(Fe)?we:G,gt.error))throw gt.value})},"onUnhandled"),z=Ye(function(Fe){return Fe.rejection!==G&&!Fe.parent},"isUnhandled"),de=Ye(function(Fe){i($,n,function(){var tt=Fe.facade;r?M.emit("rejectionHandled",tt):ee(Q,tt,Fe.value)})},"onHandleUnhandled"),he=Ye(function(Fe,tt,Le){return function(qe){Fe(tt,qe,Le)}},"bind"),ze=Ye(function(Fe,tt,Le){Fe.done||(Fe.done=!0,Le&&(Fe=Le),Fe.value=tt,Fe.state=Oe,ir(Fe,!0))},"internalReject"),Ze=Ye(function(Fe,tt,Le){if(!Fe.done){Fe.done=!0,Le&&(Fe=Le);try{if(Fe.facade===tt)throw new b("Promise can't be resolved itself");var qe=Ke(tt);qe?D(function(){var gt={done:!1};try{i(qe,tt,he(Ze,gt,Fe),he(ze,gt,Fe))}catch(Nt){ze(gt,Nt,Fe)}}):(Fe.value=tt,Fe.state=Z,ir(Fe,!1))}catch(gt){ze({done:!1},gt,Fe)}}},"internalResolve");if(se&&(Ue=Ye(s(function(tt){R(this,Y),p(tt),i(pe,this);var Le=Te(this);try{tt(he(Ze,Le),he(ze,Le))}catch(qe){ze(Le,qe)}},"Promise2"),"Promise"),Y=Ue.prototype,pe=Ye(s(function(tt){et(this,{type:Ee,done:!1,notified:!1,parent:!1,reactions:new re,rejection:!1,state:A,value:null})},"Promise2"),"Promise"),pe.prototype=o(Y,"then",Ye(s(function(tt,Le){var qe=Te(this),gt=V(P(this,Ue));return qe.parent=!0,gt.ok=_(tt)?tt:!0,gt.fail=_(Le)&&Le,gt.domain=r?M.domain:void 0,qe.state===A?qe.reactions.add(gt):D(function(){Xe(gt,qe)}),gt.promise},"then"),"then")),De=Ye(function(){var Fe=new pe,tt=Te(Fe);this.promise=Fe,this.resolve=he(Ze,tt),this.reject=he(ze,tt)},"OwnPromiseCapability"),fe.f=V=Ye(function(Fe){return Fe===Ue||Fe===Pe?new De(Fe):W(Fe)},"newPromiseCapability"),!t&&_(le)&&_e!==Object.prototype)){lt=_e.then,ke||o(_e,"then",Ye(s(function(tt,Le){var qe=this;return new Ue(function(gt,Nt){i(lt,qe,gt,Nt)}).then(tt,Le)},"then"),"then"),{unsafe:!0});try{delete _e.constructor}catch{}a&&a(_e,Y)}e({global:!0,constructor:!0,wrap:!0,forced:se},{Promise:Ue}),c(Ue,Ee,!1,!0),u(Ee)}}),CM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/check-correctness-of-iteration.js"(e,t){"use strict";var r=Za(),n=r("iterator"),i=!1;try{o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}},a[n]=function(){return this},Array.from(a,function(){throw 2})}catch{}var o,a;t.exports=function(c,u){try{if(!u&&!i)return!1}catch{return!1}var p=!1;try{var _={};_[n]=function(){return{next:function(){return{done:p=!0}}}},c(_)}catch{}return p}}}),by=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/promise-statics-incorrect-iteration.js"(e,t){"use strict";var r=Ch(),n=CM(),i=ng().CONSTRUCTOR;t.exports=i||!n(function(o){r.all(o).then(void 0,function(){})})}}),EM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.all.js"(){"use strict";var e=Fo(),t=ls(),r=Hs(),n=Jl(),i=Ah(),o=rg(),a=by();e({target:"Promise",stat:!0,forced:a},{all:Ye(s(function(u){var p=this,_=n.f(p),w=_.resolve,R=_.reject,P=i(function(){var $=r(p.resolve),D=[],L=0,H=1;o(u,function(re){var me=L++,le=!1;H++,t($,p,re).then(function(oe){le||(le=!0,D[me]=oe,--H||w(D))},R)}),--H||w(D)});return P.error&&R(P.value),_.promise},"all"),"all")})}}),kM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.catch.js"(){"use strict";var e=Fo(),t=Hl(),r=ng().CONSTRUCTOR,n=Ch(),i=$l(),o=Ii(),a=yf(),c=n&&n.prototype;e({target:"Promise",proto:!0,forced:r,real:!0},{catch:function(p){return this.then(void 0,p)}}),!t&&o(n)&&(u=i("Promise").prototype.catch,c.catch!==u&&a(c,"catch",u,{unsafe:!0}));var u}}),IM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.race.js"(){"use strict";var e=Fo(),t=ls(),r=Hs(),n=Jl(),i=Ah(),o=rg(),a=by();e({target:"Promise",stat:!0,forced:a},{race:Ye(s(function(u){var p=this,_=n.f(p),w=_.reject,R=i(function(){var P=r(p.resolve);o(u,function($){t(P,p,$).then(_.resolve,w)})});return R.error&&w(R.value),_.promise},"race"),"race")})}}),TM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.reject.js"(){"use strict";var e=Fo(),t=Jl(),r=ng().CONSTRUCTOR;e({target:"Promise",stat:!0,forced:r},{reject:Ye(s(function(i){var o=t.f(this),a=o.reject;return a(i),o.promise},"reject"),"reject")})}}),lC=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/promise-resolve.js"(e,t){"use strict";var r=Kl(),n=$s(),i=Jl();t.exports=function(o,a){if(r(o),n(a)&&a.constructor===o)return a;var c=i.f(o),u=c.resolve;return u(a),c.promise}}}),SM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.resolve.js"(){"use strict";var e=Fo(),t=$l(),r=Hl(),n=Ch(),i=ng().CONSTRUCTOR,o=lC(),a=t("Promise"),c=r&&!i;e({target:"Promise",stat:!0,forced:r||i},{resolve:Ye(s(function(p){return o(c&&this===a?n:this,p)},"resolve"),"resolve")})}}),RM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.js"(){"use strict";AM(),EM(),kM(),IM(),TM(),SM()}}),PM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.all-settled.js"(){"use strict";var e=Fo(),t=ls(),r=Hs(),n=Jl(),i=Ah(),o=rg(),a=by();e({target:"Promise",stat:!0,forced:a},{allSettled:Ye(s(function(u){var p=this,_=n.f(p),w=_.resolve,R=_.reject,P=i(function(){var $=r(p.resolve),D=[],L=0,H=1;o(u,function(re){var me=L++,le=!1;H++,t($,p,re).then(function(oe){le||(le=!0,D[me]={status:"fulfilled",value:oe},--H||w(D))},function(oe){le||(le=!0,D[me]={status:"rejected",reason:oe},--H||w(D))})}),--H||w(D)});return P.error&&R(P.value),_.promise},"allSettled"),"allSettled")})}}),DM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.any.js"(){"use strict";var e=Fo(),t=ls(),r=Hs(),n=$l(),i=Jl(),o=Ah(),a=rg(),c=by(),u="No one promise resolved";e({target:"Promise",stat:!0,forced:c},{any:Ye(s(function(_){var w=this,R=n("AggregateError"),P=i.f(w),$=P.resolve,D=P.reject,L=o(function(){var H=r(w.resolve),re=[],me=0,le=1,oe=!1;a(_,function(fe){var Ee=me++,se=!1;le++,t(H,w,fe).then(function(Be){se||oe||(oe=!0,$(Be))},function(Be){se||oe||(se=!0,re[Ee]=Be,--le||D(new R(re,u)))})}),--le||D(new R(re,u))});return L.error&&D(L.value),P.promise},"any"),"any")})}}),dC=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.try.js"(){"use strict";var e=Fo(),t=xi(),r=iC(),n=aC(),i=Jl(),o=Hs(),a=Ah(),c=t.Promise,u=!1,p=!c||!c.try||a(function(){c.try(function(_){u=_===8},8)}).error||!u;e({target:"Promise",stat:!0,forced:p},{try:function(_){var w=arguments.length>1?n(arguments,1):[],R=i.f(this),P=a(function(){return r(o(_),void 0,w)});return(P.error?R.reject:R.resolve)(P.value),R.promise}})}}),uC=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.with-resolvers.js"(){"use strict";var e=Fo(),t=Jl();e({target:"Promise",stat:!0},{withResolvers:Ye(s(function(){var n=t.f(this);return{promise:n.promise,resolve:n.resolve,reject:n.reject}},"withResolvers"),"withResolvers")})}}),OM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.finally.js"(){"use strict";var e=Fo(),t=Hl(),r=Ch(),n=co(),i=$l(),o=Ii(),a=nC(),c=lC(),u=yf(),p=r&&r.prototype,_=!!r&&n(function(){p.finally.call({then:function(){}},function(){})});e({target:"Promise",proto:!0,real:!0,forced:_},{finally:function(R){var P=a(this,i("Promise")),$=o(R);return this.then($?function(D){return c(P,R()).then(function(){return D})}:R,$?function(D){return c(P,R()).then(function(){throw D})}:R)}}),!t&&o(r)&&(w=i("Promise").prototype.finally,p.finally!==w&&u(p,"finally",w,{unsafe:!0}));var w}}),NM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/string-multibyte.js"(e,t){"use strict";var r=La(),n=z_(),i=K_(),o=uy(),a=r("".charAt),c=r("".charCodeAt),u=r("".slice),p=Ye(function(_){return function(w,R){var P=i(o(w)),$=n(R),D=P.length,L,H;return $<0||$>=D?_?"":void 0:(L=c(P,$),L<55296||L>56319||$+1===D||(H=c(P,$+1))<56320||H>57343?_?a(P,$):L:_?u(P,$,$+2):(L-55296<<10)+(H-56320)+65536)}},"createMethod");t.exports={codeAt:p(!1),charAt:p(!0)}}}),jM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.string.iterator.js"(){"use strict";var e=NM().charAt,t=K_(),r=my(),n=XA(),i=eC(),o="String Iterator",a=r.set,c=r.getterFor(o);n(String,"String",function(u){a(this,{type:o,string:t(u),index:0})},Ye(s(function(){var p=c(this),_=p.string,w=p.index,R;return w>=_.length?i(void 0,!0):(R=e(_,w),p.index+=R.length,i(R,!1))},"next"),"next"))}}),BM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/path.js"(e,t){"use strict";var r=xi();t.exports=r}}),FM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/es/promise/index.js"(e,t){"use strict";sM(),tC(),uM(),RM(),PM(),DM(),dC(),uC(),OM(),jM();var r=BM();t.exports=r.Promise}}),MM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/dom-iterables.js"(e,t){"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}}),VM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/dom-token-list-prototype.js"(e,t){"use strict";var r=py(),n=r("span").classList,i=n&&n.constructor&&n.constructor.prototype;t.exports=i===Object.prototype?void 0:i}}),UM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/web.dom-collections.iterator.js"(){"use strict";var e=xi(),t=MM(),r=VM(),n=tC(),i=gf(),o=vy(),a=Za(),c=a("iterator"),u=n.values,p=Ye(function(w,R){if(w){if(w[c]!==u)try{i(w,c,u)}catch{w[c]=u}if(o(w,R,!0),t[R]){for(var P in n)if(w[P]!==n[P])try{i(w,P,n[P])}catch{w[P]=n[P]}}}},"handlePrototype");for(_ in t)p(e[_]&&e[_].prototype,_);var _;p(r,"DOMTokenList")}}),LM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/stable/promise/index.js"(e,t){"use strict";var r=FM();UM(),t.exports=r}}),ZM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/esnext.promise.try.js"(){"use strict";dC()}}),zM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/esnext.promise.with-resolvers.js"(){"use strict";uC()}}),WM=Me({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/actual/promise/index.js"(e,t){"use strict";var r=LM();ZM(),zM(),t.exports=r}}),dX=DF(WM(),1),Jm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:void 0;Jm&&(typeof Jm.AbortController>"u"&&(Jm.AbortController=_y.AbortController),typeof Jm.AbortSignal>"u"&&(Jm.AbortSignal=_y.AbortSignal));var PA=Ye((e,t)=>e.reduce((r,n)=>r!==void 0?r:t(n),void 0),"findFirstResult"),Li=Ye((e,t)=>t==="read"?"get"in(e.read??{}):t==="store"?"upload"in(e.store??{}):t==="index"?"get"in(e.index??{}):t==="cache"?"getIndex"in(e.cache??{}):t==="id"?"did"in(e.id??{}):t==="context"?"resolveStaticDocument"in(e.context??{}):!1,"pluginImplementsPlane"),Yn=Ye((e,t)=>t==="read"?"read"in e:t==="store"?"store"in e:t==="index"?"index"in e:t==="cache"?"cache"in e:t==="id"?"id"in e:t==="context"?"context"in e:!1,"learnCardImplementsPlane"),qM=Ye((e,t)=>Object.fromEntries(Object.entries(e).map(([r,n],i)=>[r,t(n,i)])),"mapObject"),Qm=Ye(e=>e.status==="fulfilled"&&!!e.value,"isFulfilledAndNotEmpty"),GM=Ye((e,t)=>[...new Map(e.map(r=>[t instanceof Function?t(r):r[t],r])).values()],"uniqBy"),Eh=Ye((e,t)=>e.reduce((r,n)=>(t in n&&(r[n.name]={name:n.name,displayName:n.displayName,description:n.description}),r),{}),"getPlaneProviders"),Q_=Ye((e,t)=>qM(t,r=>r.bind(e,e)),"bindLearnCardToFunctionsObject"),$M=Ye(async(e,t)=>(e.debug?.("Adding plugin",t.name),za({plugins:[...e.plugins,t],debug:e.debug})),"addPluginToLearnCard"),HM=Ye(e=>({get:async(t,{cache:r="cache-first"}={})=>{if(e.debug?.("learnCard.read.get",t),!t)return;if(r==="cache-only"&&!Yn(e,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(Yn(e,"cache")&&r!=="skip-cache"){let o=await e.cache.getVc(t);if(o)return r==="cache-first"&&Yn(e,"read")&&e.read.get(t,{cache:"skip-cache"}).then(a=>e.cache.setVc(t,a)),o}let i=(await Promise.allSettled(e.plugins.map(async o=>{if(!Li(o,"read"))throw new Error("Plugin is not a Read Plugin");return o.read.get(e,t)}))).find(Qm)?.value;return i&&Yn(e,"cache")&&r!=="skip-cache"&&await e.cache.setVc(t,i),i},providers:Eh(e.plugins,"read")}),"generateReadPlane"),KM=Ye(e=>({upload:async(t,r,{cache:n="cache-first"}={})=>{let i=await e.upload(t,r);return n!=="skip-cache"&&Yn(t,"cache")&&await t.cache.setVc(i,r),i},..."uploadMany"in e?{uploadMany:e.uploadMany}:{},..."uploadEncrypted"in e?{uploadEncrypted:async(t,r,n,{cache:i="cache-first"}={})=>{let o=await e.uploadEncrypted?.(t,r,n);return i!=="skip-cache"&&Yn(t,"cache")&&await t.cache.setVc(o,r),o}}:{}}),"addCachingToStorePlane"),JM=Ye(e=>({...e.plugins.reduce((r,n)=>(Li(n,"store")&&(r[n.name]=Q_(e,KM(n.store))),r),{}),providers:Eh(e.plugins,"store")}),"generateStorePlane"),QM=Ye((e,t)=>({get:async(r,n,{cache:i="cache-first"}={})=>{if(i==="cache-only"&&!Yn(r,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(Yn(r,"cache")&&i!=="skip-cache"){let a=await r.cache.getIndex(t,n??{});if(a)return i==="cache-first"&&e.get(r,n,{cache:"skip-cache"}).then(c=>{r.cache.setIndex(t,n??{},c)}),a}let o=await e.get(r,n);return o&&Yn(r,"cache")&&i!=="skip-cache"&&await r.cache.setIndex(t,n??{},o),o},...e.getPage?{getPage:async(r,n,i,{cache:o="cache-first"}={})=>{if(o==="cache-only"&&!Yn(r,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(Yn(r,"cache")&&o!=="skip-cache"){let c=await r.cache.getIndexPage(t,n??{},i);if(c)return o==="cache-first"&&e.getPage?.(r,n,i,{cache:"skip-cache"}).then(u=>{r.cache.setIndexPage(t,n??{},u,i)}),c}let a=await e.getPage?.(r,n,i);return a&&Yn(r,"cache")&&o!=="skip-cache"&&await r.cache.setIndexPage(t,n??{},a,i),a}}:{},...e.getCount?{getCount:async(r,n,{cache:i="cache-first"}={})=>{if(i==="cache-only"&&!Yn(r,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(Yn(r,"cache")&&i!=="skip-cache"){let a=await r.cache.getIndexCount?.(t,n??{});if(a)return i==="cache-first"&&e.getCount?.(r,n,{cache:"skip-cache"}).then(c=>r.cache.setIndexCount?.(t,n??{},c)),a}let o=await e.getCount?.(r,n);return o&&Yn(r,"cache")&&i!=="skip-cache"&&await r.cache.setIndexCount?.(t,n??{},o),o}}:{},add:async(r,n,{cache:i="cache-first"}={})=>{let o=await e.add(r,n);return i!=="skip-cache"&&Yn(r,"cache")&&await r.cache.flushIndex(),o},...e.addMany?{addMany:async(r,n,{cache:i="cache-first"}={})=>{let o=await e.addMany?.(r,n);return i!=="skip-cache"&&Yn(r,"cache")&&await r.cache.flushIndex(),o}}:{},update:async(r,n,i,{cache:o="cache-first"}={})=>{let a=await e.update(r,n,i);return o!=="skip-cache"&&Yn(r,"cache")&&await r.cache.flushIndex(),a},remove:async(r,n,{cache:i="cache-first"}={})=>{let o=await e.remove(r,n);return i!=="skip-cache"&&Yn(r,"cache")&&await r.cache.flushIndex(),o},...e.removeAll?{removeAll:async(r,{cache:n="cache-first"}={})=>{let i=await e.removeAll?.(r);return n!=="skip-cache"&&Yn(r,"cache")&&await r.cache.flushIndex(),i}}:{}}),"addCachingToIndexPlane"),YM=Ye(e=>({...e.plugins.reduce((n,i)=>(Li(i,"index")&&(n[i.name]=Q_(e,QM(i.index,i.name))),n),{}),all:{get:async(n,{cache:i="cache-first"}={})=>{if(e.debug?.("learnCard.index.all.get"),i==="cache-only"&&!Yn(e,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(Yn(e,"cache")&&i!=="skip-cache"){let c=await e.cache.getIndex("all",n??{});if(c)return i==="cache-first"&&Yn(e,"index")&&e.index.all.get(n,{cache:"skip-cache"}).then(u=>e.cache.setIndex("all",n??{},u)),c}let o=(await Promise.all(e.plugins.map(async c=>Li(c,"index")?c.index.get(e,n):[]))).flat(),a=GM(o,"id");return a&&Yn(e,"cache")&&i!=="skip-cache"&&await e.cache.setIndex("all",n??{},a),a}},providers:Eh(e.plugins,"index")}),"generateIndexPlane"),XM=Ye(e=>({getIndex:async(t,r)=>{e.debug?.("learnCard.cache.getIndex");try{return(await Promise.allSettled(e.plugins.map(async o=>{if(!Li(o,"cache"))throw new Error("Plugin is not a Cache Plugin");return o.cache.getIndex(e,t,r)}))).find(Qm)?.value}catch{return}},setIndex:async(t,r,n)=>(e.debug?.("learnCard.cache.setIndex"),(await Promise.allSettled(e.plugins.map(async o=>{if(!Li(o,"cache"))throw new Error("Plugin is not a Cache Plugin");return o.cache.setIndex(e,t,r,n)}))).some(o=>o.status==="fulfilled")),getIndexPage:async(t,r,n)=>{e.debug?.("learnCard.cache.getIndex");try{return(await Promise.allSettled(e.plugins.map(async a=>{if(!Li(a,"cache"))throw new Error("Plugin is not a Cache Plugin");return a.cache.getIndexPage(e,t,r,n)}))).find(Qm)?.value}catch{return}},setIndexPage:async(t,r,n,i)=>(e.debug?.("learnCard.cache.setIndex"),(await Promise.allSettled(e.plugins.map(async a=>{if(!Li(a,"cache"))throw new Error("Plugin is not a Cache Plugin");return a.cache.setIndexPage(e,t,r,n,i)}))).some(a=>a.status==="fulfilled")),getIndexCount:async(t,r)=>{e.debug?.("learnCard.cache.getIndex");try{return(await Promise.allSettled(e.plugins.map(async o=>{if(!Li(o,"cache"))throw new Error("Plugin is not a Cache Plugin");return o.cache.getIndexCount?.(e,t,r)}))).find(Qm)?.value}catch{return}},setIndexCount:async(t,r,n)=>(e.debug?.("learnCard.cache.setIndex"),(await Promise.allSettled(e.plugins.map(async o=>{if(!Li(o,"cache"))throw new Error("Plugin is not a Cache Plugin");return o.cache.setIndexCount?.(e,t,r,n)}))).some(o=>o.status==="fulfilled")),flushIndex:async()=>(e.debug?.("learnCard.cache.flushIndex"),(await Promise.allSettled(e.plugins.map(async r=>{if(!Li(r,"cache"))throw new Error("Plugin is not a Cache Plugin");return r.cache.flushIndex(e)}))).some(r=>r.status==="fulfilled")),getVc:async t=>{e.debug?.("learnCard.cache.getVc");try{return(await Promise.allSettled(e.plugins.map(async i=>{if(!Li(i,"cache"))throw new Error("Plugin is not a Cache Plugin");return i.cache.getVc(e,t)}))).find(Qm)?.value}catch{return}},setVc:async(t,r)=>(e.debug?.("learnCard.cache.setVc"),(await Promise.allSettled(e.plugins.map(async i=>{if(!Li(i,"cache"))throw new Error("Plugin is not a Cache Plugin");return i.cache.setVc(e,t,r)}))).some(i=>i.status==="fulfilled")),flushVc:async()=>(e.debug?.("learnCard.cache.flushVc"),(await Promise.allSettled(e.plugins.map(async r=>{if(!Li(r,"cache"))throw new Error("Plugin is not a Cache Plugin");return r.cache.flushVc(e)}))).some(r=>r.status==="fulfilled")),providers:Eh(e.plugins,"cache")}),"generateCachePlane"),eV=Ye(e=>({did:t=>{e.debug?.("learnCard.id.did",t);let r=PA([...e.plugins].reverse(),n=>{try{return Li(n,"id")?n.id.did(e,t):void 0}catch{return}});if(!r)throw new Error(`No plugin supports did method ${t}`);return r},keypair:t=>{e.debug?.("learnCard.id.keypair",t);let r=PA(e.plugins,n=>{try{return Li(n,"id")?n.id.keypair(e,t):void 0}catch{return}});if(!r)throw new Error(`No plugin supports keypair type ${t}`);return r},providers:Eh(e.plugins,"id")}),"generateIdPlane"),tV=Ye(e=>({resolveDocument:async(t,r=!1)=>{e.debug?.("learnCard.context.resolveDocument",t);let i=(await Promise.all(e.plugins.map(async a=>{if(!!Li(a,"context"))return a.context.resolveStaticDocument(e,t)}))).find(Boolean);return i||!r?i:(await Promise.all(e.plugins.map(async a=>{if(!!Li(a,"context"))return a.context.resolveRemoteDocument?.(e,t)}))).find(Boolean)},providers:Eh(e.plugins,"context")}),"generateContextPlane"),rV=Ye((e,t)=>Q_(e,t),"bindMethods"),za=Ye(async(e={})=>{let{plugins:t=[]}=e,r=t.reduce((i,o)=>({...i,...o.methods}),{}),n={read:{},store:{},index:{},cache:{},id:{},context:{},plugins:t,invoke:r,addPlugin:function(i){return $M(this,i)},debug:e.debug};return n.read=HM(n),n.store=JM(n),n.index=YM(n),n.cache=XM(n),n.id=eV(n),n.context=tV(n),r&&(n.invoke=rV(n,r)),n},"generateLearnCard");typeof window>"u"&&!globalThis.crypto&&(globalThis.crypto=fC.default);var Y_=s(async({debug:e}={})=>za({debug:e}),"customLearnCard");var Qc={name:"Dynamic Loader",displayName:"Dynamic Loader",description:"Resolve JSON-LD Contexts dynamically via fetch",context:{resolveStaticDocument:async()=>{},resolveRemoteDocument:async(e,t)=>{try{let r=await fetch(t);if(r.status!==200)throw new Error("Status Code not 200!");return await r.json()}catch(r){e.debug?.("Error fetching remote context!",r);return}}},methods:{}};var X_=j_(require("isomorphic-webcrypto"));typeof window>"u"&&!globalThis.crypto&&(globalThis.crypto=X_.default);var nV=X_.default,ds={name:"Crypto",displayName:"Crypto Plugin",description:"Exposes a standardized, isomorphic Crypto object",methods:{crypto:()=>nV}};var hV={};var iV=Object.defineProperty,Tr=s((e,t)=>iV(e,"name",{value:t,configurable:!0}),"__name"),nt,mC=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&mC.decode();var ig=null;function _f(){return(ig===null||ig.byteLength===0)&&(ig=new Uint8Array(nt.memory.buffer)),ig}s(_f,"getUint8ArrayMemory0");Tr(_f,"getUint8ArrayMemory0");function Mo(e,t){return e=e>>>0,mC.decode(_f().subarray(e,e+t))}s(Mo,"getStringFromWasm0");Tr(Mo,"getStringFromWasm0");function bf(e){let t=nt.__externref_table_alloc();return nt.__wbindgen_export_2.set(t,e),t}s(bf,"addToExternrefTable0");Tr(bf,"addToExternrefTable0");function Qi(e,t){try{return e.apply(this,t)}catch(r){let n=bf(r);nt.__wbindgen_exn_store(n)}}s(Qi,"handleError");Tr(Qi,"handleError");function e3(e,t){return e=e>>>0,_f().subarray(e/1,e/1+t)}s(e3,"getArrayU8FromWasm0");Tr(e3,"getArrayU8FromWasm0");function Yc(e){return e==null}s(Yc,"isLikeNone");Tr(Yc,"isLikeNone");var Hr=0,Ay=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},aV=typeof Ay.encodeInto=="function"?function(e,t){return Ay.encodeInto(e,t)}:function(e,t){let r=Ay.encode(e);return t.set(r),{read:e.length,written:r.length}};function kn(e,t,r){if(r===void 0){let c=Ay.encode(e),u=t(c.length,1)>>>0;return _f().subarray(u,u+c.length).set(c),Hr=c.length,u}let n=e.length,i=t(n,1)>>>0,o=_f(),a=0;for(;a<n;a++){let c=e.charCodeAt(a);if(c>127)break;o[i+a]=c}if(a!==n){a!==0&&(e=e.slice(a)),i=r(i,n,n=a+e.length*3,1)>>>0;let c=_f().subarray(i+a,i+n);a+=aV(e,c).written,i=r(i,n,a,1)>>>0}return Hr=a,i}s(kn,"passStringToWasm0");Tr(kn,"passStringToWasm0");var vf=null;function us(){return(vf===null||vf.buffer.detached===!0||vf.buffer.detached===void 0&&vf.buffer!==nt.memory.buffer)&&(vf=new DataView(nt.memory.buffer)),vf}s(us,"getDataViewMemory0");Tr(us,"getDataViewMemory0");var hC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>{nt.__wbindgen_export_5.get(e.dtor)(e.a,e.b)});function gC(e,t,r,n){let i={a:e,b:t,cnt:1,dtor:r},o=Tr((...a)=>{i.cnt++;let c=i.a;i.a=0;try{return n(c,i.b,...a)}finally{--i.cnt===0?(nt.__wbindgen_export_5.get(i.dtor)(c,i.b),hC.unregister(i)):i.a=c}},"real");return o.original=i,hC.register(o,i,i),o}s(gC,"makeMutClosure");Tr(gC,"makeMutClosure");function Cy(e){let t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){let i=e.description;return i==null?"Symbol":`Symbol(${i})`}if(t=="function"){let i=e.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(e)){let i=e.length,o="[";i>0&&(o+=Cy(e[0]));for(let a=1;a<i;a++)o+=", "+Cy(e[a]);return o+="]",o}let r=/\[object ([^\]]+)\]/.exec(toString.call(e)),n;if(r&&r.length>1)n=r[1];else return toString.call(e);if(n=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
2
- ${e.stack}`:n}s(Cy,"debugString");Tr(Cy,"debugString");function yC(){return nt.clearCache()}s(yC,"clearCache");Tr(yC,"clearCache");function vC(e,t){let r=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),n=Hr,i=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),o=Hr;return nt.didResolver(r,n,i,o)}s(vC,"didResolver");Tr(vC,"didResolver");function bC(e,t){let r=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),n=Hr,i=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),o=Hr;return nt.resolveDID(r,n,i,o)}s(bC,"resolveDID");Tr(bC,"resolveDID");function Ey(e){let t=nt.__wbindgen_export_2.get(e);return nt.__externref_table_dealloc(e),t}s(Ey,"takeFromExternrefTable0");Tr(Ey,"takeFromExternrefTable0");function r3(e,t){let r=t(e.length*1,1)>>>0;return _f().set(e,r/1),Hr=e.length,r}s(r3,"passArray8ToWasm0");Tr(r3,"passArray8ToWasm0");function _C(e){let t,r;try{let o=r3(e,nt.__wbindgen_malloc),a=Hr,c=nt.generateEd25519KeyFromBytes(o,a);var n=c[0],i=c[1];if(c[3])throw n=0,i=0,Ey(c[2]);return t=n,r=i,Mo(n,i)}finally{nt.__wbindgen_free(t,r,1)}}s(_C,"generateEd25519KeyFromBytes");Tr(_C,"generateEd25519KeyFromBytes");function wC(e){let t,r;try{let o=r3(e,nt.__wbindgen_malloc),a=Hr,c=nt.generateSecp256k1KeyFromBytes(o,a);var n=c[0],i=c[1];if(c[3])throw n=0,i=0,Ey(c[2]);return t=n,r=i,Mo(n,i)}finally{nt.__wbindgen_free(t,r,1)}}s(wC,"generateSecp256k1KeyFromBytes");Tr(wC,"generateSecp256k1KeyFromBytes");function ag(e,t){let r=t(e.length*4,4)>>>0;for(let n=0;n<e.length;n++){let i=bf(e[n]);us().setUint32(r+4*n,i,!0)}return Hr=e.length,r}s(ag,"passArrayJsValueToWasm0");Tr(ag,"passArrayJsValueToWasm0");function xC(e,t){let r=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),n=Hr,i=ag(t,nt.__wbindgen_malloc),o=Hr;return nt.createJwe(r,n,i,o)}s(xC,"createJwe");Tr(xC,"createJwe");function AC(e,t){let r=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),n=Hr,i=ag(t,nt.__wbindgen_malloc),o=Hr;return nt.decryptJwe(r,n,i,o)}s(AC,"decryptJwe");Tr(AC,"decryptJwe");function CC(e,t){let r=ag(t,nt.__wbindgen_malloc),n=Hr;return nt.createDagJwe(e,r,n)}s(CC,"createDagJwe");Tr(CC,"createDagJwe");function EC(e,t){let r=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),n=Hr,i=ag(t,nt.__wbindgen_malloc),o=Hr;return nt.decryptDagJwe(r,n,i,o)}s(EC,"decryptDagJwe");Tr(EC,"decryptDagJwe");function kC(e,t){let r,n;try{let a=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),c=Hr,u=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),p=Hr,_=nt.keyToDID(a,c,u,p);var i=_[0],o=_[1];if(_[3])throw i=0,o=0,Ey(_[2]);return r=i,n=o,Mo(i,o)}finally{nt.__wbindgen_free(r,n,1)}}s(kC,"keyToDID");Tr(kC,"keyToDID");function IC(e,t){let r=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),n=Hr,i=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),o=Hr;return nt.keyToVerificationMethod(r,n,i,o)}s(IC,"keyToVerificationMethod");Tr(IC,"keyToVerificationMethod");function TC(e){let t=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),r=Hr;return nt.didToVerificationMethod(t,r)}s(TC,"didToVerificationMethod");Tr(TC,"didToVerificationMethod");function SC(e,t,r,n){let i=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),o=Hr,a=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),c=Hr,u=kn(r,nt.__wbindgen_malloc,nt.__wbindgen_realloc),p=Hr,_=kn(n,nt.__wbindgen_malloc,nt.__wbindgen_realloc),w=Hr;return nt.issueCredential(i,o,a,c,u,p,_,w)}s(SC,"issueCredential");Tr(SC,"issueCredential");function RC(e,t,r){let n=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),i=Hr,o=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),a=Hr,c=kn(r,nt.__wbindgen_malloc,nt.__wbindgen_realloc),u=Hr;return nt.verifyCredential(n,i,o,a,c,u)}s(RC,"verifyCredential");Tr(RC,"verifyCredential");function PC(e,t,r,n){let i=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),o=Hr,a=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),c=Hr,u=kn(r,nt.__wbindgen_malloc,nt.__wbindgen_realloc),p=Hr,_=kn(n,nt.__wbindgen_malloc,nt.__wbindgen_realloc),w=Hr;return nt.issuePresentation(i,o,a,c,u,p,_,w)}s(PC,"issuePresentation");Tr(PC,"issuePresentation");function DC(e,t,r){let n=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),i=Hr,o=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),a=Hr,c=kn(r,nt.__wbindgen_malloc,nt.__wbindgen_realloc),u=Hr;return nt.verifyPresentation(n,i,o,a,c,u)}s(DC,"verifyPresentation");Tr(DC,"verifyPresentation");function t3(e){let t=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),r=Hr;return nt.contextLoader(t,r)}s(t3,"contextLoader");Tr(t3,"contextLoader");function OC(e,t,r){nt.closure4177_externref_shim(e,t,r)}s(OC,"__wbg_adapter_52");Tr(OC,"__wbg_adapter_52");function NC(e,t,r,n){nt.closure4579_externref_shim(e,t,r,n)}s(NC,"__wbg_adapter_214");Tr(NC,"__wbg_adapter_214");var oV=["omit","same-origin","include"],sV=["same-origin","no-cors","cors","navigate"];async function jC(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(n){if(e.headers.get("Content-Type")!="application/wasm")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",n);else throw n}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}}s(jC,"__wbg_load");Tr(jC,"__wbg_load");function BC(){let e={};return e.wbg={},e.wbg.__wbg_abort_775ef1d17fc65868=function(t){t.abort()},e.wbg.__wbg_append_8c7dd8d641a5f01b=function(){return Qi(function(t,r,n,i,o){t.append(Mo(r,n),Mo(i,o))},arguments)},e.wbg.__wbg_arrayBuffer_d1b44c4390db422f=function(){return Qi(function(t){return t.arrayBuffer()},arguments)},e.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},e.wbg.__wbg_call_672a4d21634d4a24=function(){return Qi(function(t,r){return t.call(r)},arguments)},e.wbg.__wbg_call_7cccdd69e0791ae2=function(){return Qi(function(t,r,n){return t.call(r,n)},arguments)},e.wbg.__wbg_crypto_038798f665f985e2=function(t){return t.crypto},e.wbg.__wbg_crypto_574e78ad8b13b65f=function(t){return t.crypto},e.wbg.__wbg_done_769e5ede4b31c67b=function(t){return t.done},e.wbg.__wbg_entries_3265d4158b33e5dc=function(t){return Object.entries(t)},e.wbg.__wbg_fetch_509096533071c657=function(t,r){return t.fetch(r)},e.wbg.__wbg_fetch_f1856afdb49415d1=function(t){return fetch(t)},e.wbg.__wbg_from_2a5d3e218e67aa85=function(t){return Array.from(t)},e.wbg.__wbg_getRandomValues_371e7ade8bd92088=function(t,r){t.getRandomValues(r)},e.wbg.__wbg_getRandomValues_3c9c0d586e575a16=function(){return Qi(function(t,r){globalThis.crypto.getRandomValues(e3(t,r))},arguments)},e.wbg.__wbg_getRandomValues_7dfe5bd1b67c9ca1=function(t){return t.getRandomValues},e.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return Qi(function(t,r){t.getRandomValues(r)},arguments)},e.wbg.__wbg_getTime_46267b1c24877e30=function(t){return t.getTime()},e.wbg.__wbg_get_67b2ba62fc30de12=function(){return Qi(function(t,r){return Reflect.get(t,r)},arguments)},e.wbg.__wbg_get_b9b93047fe3cf45b=function(t,r){return t[r>>>0]},e.wbg.__wbg_has_a5ea9117f258a0ec=function(){return Qi(function(t,r){return Reflect.has(t,r)},arguments)},e.wbg.__wbg_headers_9cb51cfd2ac780a4=function(t){return t.headers},e.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(t){let r;try{r=t instanceof ArrayBuffer}catch{r=!1}return r},e.wbg.__wbg_instanceof_Map_f3469ce2244d2430=function(t){let r;try{r=t instanceof Map}catch{r=!1}return r},e.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644=function(t){let r;try{r=t instanceof Response}catch{r=!1}return r},e.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(t){let r;try{r=t instanceof Uint8Array}catch{r=!1}return r},e.wbg.__wbg_isArray_a1eab7e0d067391b=function(t){return Array.isArray(t)},e.wbg.__wbg_isSafeInteger_343e2beeeece1bb0=function(t){return Number.isSafeInteger(t)},e.wbg.__wbg_iterator_9a24c88df860dc65=function(){return Symbol.iterator},e.wbg.__wbg_length_a446193dc22c12f8=function(t){return t.length},e.wbg.__wbg_length_e2d2a49132c1b256=function(t){return t.length},e.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(t){return t.msCrypto},e.wbg.__wbg_msCrypto_ff35fce085fab2a3=function(t){return t.msCrypto},e.wbg.__wbg_new0_f788a2397c7ca929=function(){return new Date},e.wbg.__wbg_new_018dcc2d6c8c2f6a=function(){return Qi(function(){return new Headers},arguments)},e.wbg.__wbg_new_23a2665fac83c611=function(t,r){try{var n={a:t,b:r},i=Tr((a,c)=>{let u=n.a;n.a=0;try{return NC(u,n.b,a,c)}finally{n.a=u}},"cb0");return new Promise(i)}finally{n.a=n.b=0}},e.wbg.__wbg_new_405e22f390576ce2=function(){return new Object},e.wbg.__wbg_new_5e0be73521bc8c17=function(){return new Map},e.wbg.__wbg_new_78feb108b6472713=function(){return new Array},e.wbg.__wbg_new_a12002a7f91c75be=function(t){return new Uint8Array(t)},e.wbg.__wbg_new_e25e5aab09ff45db=function(){return Qi(function(){return new AbortController},arguments)},e.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,r){return new Function(Mo(t,r))},e.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,r,n){return new Uint8Array(t,r>>>0,n>>>0)},e.wbg.__wbg_newwithlength_a381634e90c276d4=function(t){return new Uint8Array(t>>>0)},e.wbg.__wbg_newwithstrandinit_06c535e0a867c635=function(){return Qi(function(t,r,n){return new Request(Mo(t,r),n)},arguments)},e.wbg.__wbg_next_25feadfc0913fea9=function(t){return t.next},e.wbg.__wbg_next_6574e1a8a62d1055=function(){return Qi(function(t){return t.next()},arguments)},e.wbg.__wbg_node_905d3e251edff8a2=function(t){return t.node},e.wbg.__wbg_now_d18023d54d4e5500=function(t){return t.now()},e.wbg.__wbg_process_dc0fbacc7c1c06f7=function(t){return t.process},e.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5=function(t){queueMicrotask(t)},e.wbg.__wbg_queueMicrotask_d3219def82552485=function(t){return t.queueMicrotask},e.wbg.__wbg_randomFillSync_994ac6d9ade7a695=function(t,r,n){t.randomFillSync(e3(r,n))},e.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return Qi(function(t,r){t.randomFillSync(r)},arguments)},e.wbg.__wbg_require_0d6aeaec3c042c88=function(t,r,n){return t.require(Mo(r,n))},e.wbg.__wbg_require_60cc747a6bc5215a=function(){return Qi(function(){return module.require},arguments)},e.wbg.__wbg_resolve_4851785c9c5f573d=function(t){return Promise.resolve(t)},e.wbg.__wbg_self_25aabeb5a7b41685=function(){return Qi(function(){return self.self},arguments)},e.wbg.__wbg_set_37837023f3d740e8=function(t,r,n){t[r>>>0]=n},e.wbg.__wbg_set_3f1d0b984ed272ed=function(t,r,n){t[r]=n},e.wbg.__wbg_set_65595bdd868b3009=function(t,r,n){t.set(r,n>>>0)},e.wbg.__wbg_set_8fc6bf8a5b1071d1=function(t,r,n){return t.set(r,n)},e.wbg.__wbg_setbody_5923b78a95eedf29=function(t,r){t.body=r},e.wbg.__wbg_setcredentials_c3a22f1cd105a2c6=function(t,r){t.credentials=oV[r]},e.wbg.__wbg_setheaders_834c0bdb6a8949ad=function(t,r){t.headers=r},e.wbg.__wbg_setmethod_3c5280fe5d890842=function(t,r,n){t.method=Mo(r,n)},e.wbg.__wbg_setmode_5dc300b865044b65=function(t,r){t.mode=sV[r]},e.wbg.__wbg_setsignal_75b21ef3a81de905=function(t,r){t.signal=r},e.wbg.__wbg_signal_aaf9ad74119f20a4=function(t){return t.signal},e.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){let t=typeof global>"u"?null:global;return Yc(t)?0:bf(t)},e.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){let t=typeof globalThis>"u"?null:globalThis;return Yc(t)?0:bf(t)},e.wbg.__wbg_static_accessor_MODULE_ef3aa2eb251158a5=function(){return module},e.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){let t=typeof self>"u"?null:self;return Yc(t)?0:bf(t)},e.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){let t=typeof window>"u"?null:window;return Yc(t)?0:bf(t)},e.wbg.__wbg_status_f6360336ca686bf0=function(t){return t.status},e.wbg.__wbg_stringify_f7ed6987935b4a24=function(){return Qi(function(t){return JSON.stringify(t)},arguments)},e.wbg.__wbg_subarray_aa9065fa9dc5df96=function(t,r,n){return t.subarray(r>>>0,n>>>0)},e.wbg.__wbg_then_44b73946d2fb3e7d=function(t,r){return t.then(r)},e.wbg.__wbg_then_48b406749878a531=function(t,r,n){return t.then(r,n)},e.wbg.__wbg_url_ae10c34ca209681d=function(t,r){let n=r.url,i=kn(n,nt.__wbindgen_malloc,nt.__wbindgen_realloc),o=Hr;us().setInt32(t+4*1,o,!0),us().setInt32(t+4*0,i,!0)},e.wbg.__wbg_value_cd1ffa7b1ab794f1=function(t){return t.value},e.wbg.__wbg_versions_c01dfd4722a88165=function(t){return t.versions},e.wbg.__wbindgen_bigint_from_i128=function(t,r){return t<<BigInt(64)|BigInt.asUintN(64,r)},e.wbg.__wbindgen_bigint_from_i64=function(t){return t},e.wbg.__wbindgen_bigint_from_u64=function(t){return BigInt.asUintN(64,t)},e.wbg.__wbindgen_bigint_get_as_i64=function(t,r){let n=r,i=typeof n=="bigint"?n:void 0;us().setBigInt64(t+8*1,Yc(i)?BigInt(0):i,!0),us().setInt32(t+4*0,!Yc(i),!0)},e.wbg.__wbindgen_boolean_get=function(t){let r=t;return typeof r=="boolean"?r?1:0:2},e.wbg.__wbindgen_cb_drop=function(t){let r=t.original;return r.cnt--==1?(r.a=0,!0):!1},e.wbg.__wbindgen_closure_wrapper12244=function(t,r,n){return gC(t,r,4178,OC)},e.wbg.__wbindgen_debug_string=function(t,r){let n=Cy(r),i=kn(n,nt.__wbindgen_malloc,nt.__wbindgen_realloc),o=Hr;us().setInt32(t+4*1,o,!0),us().setInt32(t+4*0,i,!0)},e.wbg.__wbindgen_error_new=function(t,r){return new Error(Mo(t,r))},e.wbg.__wbindgen_in=function(t,r){return t in r},e.wbg.__wbindgen_init_externref_table=function(){let t=nt.__wbindgen_export_2,r=t.grow(4);t.set(0,void 0),t.set(r+0,void 0),t.set(r+1,null),t.set(r+2,!0),t.set(r+3,!1)},e.wbg.__wbindgen_is_bigint=function(t){return typeof t=="bigint"},e.wbg.__wbindgen_is_function=function(t){return typeof t=="function"},e.wbg.__wbindgen_is_object=function(t){let r=t;return typeof r=="object"&&r!==null},e.wbg.__wbindgen_is_string=function(t){return typeof t=="string"},e.wbg.__wbindgen_is_undefined=function(t){return t===void 0},e.wbg.__wbindgen_jsval_eq=function(t,r){return t===r},e.wbg.__wbindgen_jsval_loose_eq=function(t,r){return t==r},e.wbg.__wbindgen_memory=function(){return nt.memory},e.wbg.__wbindgen_number_get=function(t,r){let n=r,i=typeof n=="number"?n:void 0;us().setFloat64(t+8*1,Yc(i)?0:i,!0),us().setInt32(t+4*0,!Yc(i),!0)},e.wbg.__wbindgen_number_new=function(t){return t},e.wbg.__wbindgen_string_get=function(t,r){let n=r,i=typeof n=="string"?n:void 0;var o=Yc(i)?0:kn(i,nt.__wbindgen_malloc,nt.__wbindgen_realloc),a=Hr;us().setInt32(t+4*1,a,!0),us().setInt32(t+4*0,o,!0)},e.wbg.__wbindgen_string_new=function(t,r){return Mo(t,r)},e.wbg.__wbindgen_throw=function(t,r){throw new Error(Mo(t,r))},e}s(BC,"__wbg_get_imports");Tr(BC,"__wbg_get_imports");function cV(e,t){}s(cV,"__wbg_init_memory");Tr(cV,"__wbg_init_memory");function FC(e,t){return nt=e.exports,n3.__wbindgen_wasm_module=t,vf=null,ig=null,nt.__wbindgen_start(),nt}s(FC,"__wbg_finalize_init");Tr(FC,"__wbg_finalize_init");async function n3(e){if(nt!==void 0)return nt;typeof e<"u"&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof e>"u"&&(e=new URL("didkit_wasm_bg.wasm",hV.url));let t=BC();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:r,module:n}=await jC(await e,t);return FC(r,n)}s(n3,"__wbg_init");Tr(n3,"__wbg_init");var lV=n3,pC=!1,wy=!1,dV=Tr(async(e="https://cdn.filestackcontent.com/PgdfQggQBqLIAuZWQbKg")=>{for(;wy;)await new Promise(t=>setTimeout(t,250));if(!pC)try{wy=!0,await lV({module_or_path:e}),wy=!1,pC=!0}catch(t){throw wy=!1,t}},"init"),uV=dV,fV=Tr(e=>{let t=[],r=Tr(n=>{typeof n!="object"||n===null||(n["@context"]&&(Array.isArray(n["@context"])?t.push(...n["@context"]):t.push(n["@context"])),Object.keys(n).forEach(i=>{r(n[i])}))},"traverse");return r(e),t},"getContextURIs"),xy=Tr(async(e,t,r=!1)=>{let n=fV(t),i=await Promise.all(n.map(async o=>e.context.resolveDocument(o,r)));return n.reduce((o,a,c)=>{let u=i[c];return u&&(o[a]=JSON.stringify(u)),o},{})},"getDocumentMap"),Xc=Tr(async(e,t=!1)=>{await uV(e);let r={};return{name:"DIDKit",displayName:"DIDKit",description:"Provides an interface to DIDKit, which allows for the generation of key material, as well as signing and verifying credentials and presentations",context:{resolveStaticDocument:async(n,i)=>{try{return JSON.parse(await t3(i)??"")||void 0}catch(o){n.debug?.(o);return}}},methods:{generateEd25519KeyFromBytes:(n,i)=>JSON.parse(_C(i)),generateSecp256k1KeyFromBytes:(n,i)=>JSON.parse(wC(i)),keyToDid:(n,i,o)=>kC(i,JSON.stringify(o)),keyToVerificationMethod:async(n,i,o)=>IC(i,JSON.stringify(o)),didToVerificationMethod:async(n,i)=>TC(i),issueCredential:async(n,i,o,a)=>JSON.parse(await SC(JSON.stringify(i),JSON.stringify(o),JSON.stringify(a),JSON.stringify(await xy(n,i,t)))),verifyCredential:async(n,i,o={})=>JSON.parse(await RC(JSON.stringify(i),JSON.stringify(o),JSON.stringify(await xy(n,i,t)))),issuePresentation:async(n,i,o,a)=>{let c=o.proofFormat==="jwt",u=await PC(JSON.stringify(i),JSON.stringify(o),JSON.stringify(a),JSON.stringify(await xy(n,i,t)));return c?u:JSON.parse(u)},verifyPresentation:async(n,i,o={})=>{let a=typeof i=="string";return JSON.parse(await DC(a?i:JSON.stringify(i),JSON.stringify(o),a?"{}":JSON.stringify(await xy(n,i,t))))},contextLoader:async(n,i)=>{try{return JSON.parse(await t3(i)??"")||void 0}catch(o){n.debug?.(o);return}},resolveDid:async(n,i,o={})=>JSON.parse(await bC(i,JSON.stringify(o))),didResolver:async(n,i,o={})=>JSON.parse(await vC(i,JSON.stringify(o))),createJwe:async(n,i,o)=>JSON.parse(await xC(i,o)),decryptJwe:async(n,i,o)=>AC(JSON.stringify(i),o.map(a=>JSON.stringify(a))),createDagJwe:async(n,i,o)=>JSON.parse(await CC(i,o)),decryptDagJwe:async(n,i,o)=>{let a=Tr(c=>{if(c==null)return c;if(typeof c=="bigint")return Number(c);if(Array.isArray(c))return c.map(a);if(typeof c!="object"||!Object.values(c).some(_=>typeof _=="bigint"||typeof _=="object"&&_!==null))return c;let p={};for(let _ in c)p[_]=a(c[_]);return p},"convertBigIntsToNumbers");return a(await EC(JSON.stringify(i),o.map(c=>JSON.stringify(c))))},clearDidWebCache:async()=>{await yC()}}}},"getDidKitPlugin");var pV=Object.defineProperty,mV=s((e,t)=>pV(e,"name",{value:t,configurable:!0}),"__name"),fs=mV(e=>({name:"Expiration",displayName:"Expiration Extension",description:"Adds a check to make sure credentials aren't expired when verifying them",methods:{verifyCredential:async(t,r,n)=>{let i=await e.invoke.verifyCredential(r,n);return r.expirationDate&&new Date>new Date(r.expirationDate)?i.errors.push("expiration error: Credential is expired"):r.validFrom&&new Date<new Date(r.validFrom)?i.errors.push("expiration error: Credential is not valid yet"):r.validUntil&&new Date>new Date(r.validUntil)?i.errors.push("expiration error: Credential is no longer valid"):i.checks.push("expiration"),i}}}),"expirationPlugin");var gV=Object.defineProperty,yV=s((e,t)=>gV(e,"name",{value:t,configurable:!0}),"__name"),MC={basic:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z"}={},n)=>({"@context":["https://www.w3.org/2018/credentials/v1"],id:`urn:uuid:${n.randomUUID()}`,type:["VerifiableCredential"],issuer:e,issuanceDate:r,credentialSubject:{id:t}}),achievement:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",name:r="Teamwork Badge",achievementName:n="Teamwork",description:i="This badge recognizes the development of the capacity to collaborate within a group environment.",criteriaNarrative:o="Team members are nominated for this badge by their peers and recognized upon review by Example Corp management.",issuanceDate:a="2020-08-19T21:41:50Z"}={},c)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json"],id:`urn:uuid:${c.randomUUID()}`,type:["VerifiableCredential","OpenBadgeCredential"],issuer:{id:e},validFrom:a,name:r,credentialSubject:{id:t,type:["AchievementSubject"],achievement:{id:`urn:uuid:${c.randomUUID()}`,type:["Achievement"],criteria:{narrative:o},description:i,name:n}}}),jff2:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z"}={},n)=>({"@context":["https://www.w3.org/2018/credentials/v1","https://purl.imsglobal.org/spec/ob/v3p0/context.json","https://w3id.org/security/suites/ed25519-2020/v1"],id:`urn:uuid:${n.randomUUID()}`,type:["VerifiableCredential","OpenBadgeCredential"],name:"JFF x vc-edu PlugFest 2 Interoperability",issuer:{type:["Profile"],id:e,name:"Jobs for the Future (JFF)",image:{id:"https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png",type:"Image"}},issuanceDate:r,credentialSubject:{type:["AchievementSubject"],id:t,achievement:{id:`urn:uuid:${n.randomUUID()}`,type:["Achievement"],name:"JFF x vc-edu PlugFest 2 Interoperability",description:"This credential solution supports the use of OBv3 and w3c Verifiable Credentials and is interoperable with at least two other solutions. This was demonstrated successfully during JFF x vc-edu PlugFest 2.",criteria:{narrative:"Solutions providers earned this badge by demonstrating interoperability between multiple providers based on the OBv3 candidate final standard, with some additional required fields. Credential issuers earning this badge successfully issued a credential into at least two wallets. Wallet implementers earning this badge successfully displayed credentials issued by at least two different credential issuers."},image:{id:"https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png",type:"Image"}}}}),boost:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z",expirationDate:n,boostName:i="Example Boost",boostImage:o,achievementId:a,achievementType:c="Influencer",achievementName:u="Awesome Badge",achievementDescription:p="Awesome People Earn Awesome Badge",achievementNarrative:_="Earned by being awesome.",achievementImage:w="",attachments:R,display:P,familyTitles:$,skills:D,groupID:L=""}={},H)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json","https://ctx.learncard.com/boosts/1.0.0.json"],type:["VerifiableCredential","OpenBadgeCredential","BoostCredential"],id:`urn:uuid:${H.randomUUID()}`,issuer:{id:e},validFrom:r,...n&&{validUntil:n},name:i,credentialSubject:{id:t,type:["AchievementSubject"],achievement:{id:a??`urn:uuid:${H.randomUUID()}`,type:["Achievement"],achievementType:c,name:u,description:p,image:w,criteria:{narrative:_}}},display:P,familyTitles:$,image:o,attachments:R,skills:D,groupID:L}),boostID:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z",expirationDate:n,boostName:i="Example Boost",boostImage:o,achievementId:a,achievementType:c="Influencer",achievementName:u="Awesome Badge",achievementDescription:p="Awesome People Earn Awesome Badge",achievementNarrative:_="Earned by being awesome.",achievementImage:w="",address:R,attachments:P,skills:$,display:D,familyTitles:L,boostID:H,groupID:re=""}={},me)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json","https://ctx.learncard.com/boosts/1.0.0.json","https://ctx.learncard.com/boostIDs/1.0.0.json"],type:["VerifiableCredential","OpenBadgeCredential","BoostCredential","BoostID"],id:`urn:uuid:${me.randomUUID()}`,issuer:{id:e},validFrom:r,...n&&{validUntil:n},name:i,credentialSubject:{id:t,type:["AchievementSubject"],achievement:{id:a??`urn:uuid:${me.randomUUID()}`,type:["Achievement"],achievementType:c,name:u,description:p,image:w,criteria:{narrative:_}}},...R?{address:{type:["Address"],...R,...R.geo?{geo:{type:["GeoCoordinates"],...R.geo}}:{}}}:{},display:D,familyTitles:L,image:o,attachments:P,skills:$,boostID:H,groupID:re}),delegate:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r=new Date().toISOString(),access:n=["read"]}={},i)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://ctx.learncard.com/delegates/1.0.0.json"],type:["VerifiableCredential","DelegateCredential"],id:`urn:uuid:${i.randomUUID()}`,issuer:{id:e},validFrom:r,credentialSubject:{id:t},permissions:{statementAccess:n}})},hs=yV(()=>({name:"VC Templates",displayName:"VC Templates",description:"Allows for the easy creation of VCs and VPs based on predefined templates",methods:{newCredential:(e,t={type:"basic"})=>{let r=t.did||e.id.did();if(!r)throw new Error("Could not get issuer did!");let n={did:r,subject:"did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:new Date().toISOString()},{type:i="basic",...o}=t;if(!(i in MC))throw new Error("Invalid Test VC Type!");return MC[i]({...n,...o},e.invoke.crypto())},newPresentation:async(e,t,r={})=>{let n=r?.did||e.id.did();if(!n)throw new Error("Could not get issuer did!");return{"@context":["https://www.w3.org/ns/credentials/v2"],type:["VerifiablePresentation"],holder:n,verifiableCredential:t}}}}),"getVCTemplatesPlugin");var vV=Object.defineProperty,er=s((e,t)=>vV(e,"name",{value:t,configurable:!0}),"__name"),UC={ParseError:{message:"Parse error",code:-32700},InvalidRequest:{message:"Invalid Request",code:-32600},MethodNotFound:{message:"Method not found",code:-32601},InvalidParams:{message:"Invalid params",code:-32602},InternalError:{message:"Internal Error",code:-32603},ServerError:{message:"Server error",code:-32e3}};function og(e,t){if(t===void 0&&(t=window.location.href),typeof URL=="function")return new URL(e,t);if(typeof e!="string")throw new TypeError('"url" must be a string.');e.includes(":")||(t.startsWith("http")&&!e.startsWith("/")?e=t+"/"+e:e=t+e);let r=document.createElement("a");r.href=e;let n=(r.protocol||window.location.protocol)+"//";r.host?r.protocol==="http:"&&r.port==="80"||r.protocol==="https:"&&r.port==="443"?n+=r.hostname:n+=r.host:n+=window.location.host;let i=r.pathname;return i.startsWith("/")||(i="/"+i),{host:r.host||window.location.host,hostname:r.hostname,origin:n,protocol:r.protocol,pathname:i}}s(og,"parseUrl");er(og,"parseUrl");function LC(e,t){for(t=e="";e++<36;t+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return t}s(LC,"uuidv4");er(LC,"uuidv4");function c3(e){return e&&typeof e=="object"&&e.jsonrpc==="2.0"&&e.id&&typeof e.id=="string"}s(c3,"isValidMessage");er(c3,"isValidMessage");function ZC(e){return c3(e)&&Array.isArray(e.params)}s(ZC,"isValidRequest");er(ZC,"isValidRequest");function zC(e){return c3(e)&&!!("result"in e^"error"in e)&&(!("error"in e)||WC(e.error))}s(zC,"isValidResponse");er(zC,"isValidResponse");function WC(e){return e&&typeof e=="object"&&typeof e.code=="number"&&typeof e.message=="string"}s(WC,"isValidError");er(WC,"isValidError");function qC(e){let t={message:e.message};return e.constructor.name!=="Error"&&(t.constructor=e.constructor.name),"name"in e&&(t.name=e.name),"code"in e?t.code=e.code:t.code=UC.ServerError.code,"details"in e&&(t.details=e.details),t}s(qC,"serializeError");er(qC,"serializeError");function GC(e){let t;return e.constructor==="DOMException"?t=new DOMException(e.message,e.name):(t=new Error(e.message),"code"in e&&(t.code=e.code)),e.details&&(t.details=e.details),t}s(GC,"deserializeError");er(GC,"deserializeError");function l3({listener:e,origin:t,handle:r,expectRequest:n}){if(sg(r)){let i=r;r=!1,i.then(o=>r=o)}return i=>{!(i.source===r&&i.origin===t&&(n&&ZC(i.data)||!n&&zC(i.data)))||e(i.data,i)}}s(l3,"createMessageListener");er(l3,"createMessageListener");function $C(e){let[t,...r]=e.split("."),n=r.pop();return t=[t,...r].join("."),{name:t,method:n}}s($C,"destructureMethodName");er($C,"destructureMethodName");function sg(e){try{return typeof e.then=="function"}catch{}return!1}s(sg,"isHandlePromise");er(sg,"isHandlePromise");var bV=3e4,d3=s(class{constructor(){this.origin=null,this._handle=null,this._listener=null,this._pending=new Map}async connect(e,t){if(this._listener)throw new Error("Already connected.");t=t||{};let r=this;r.origin=og(e).origin,r._handle=t.handle||window.opener||window.parent;let n=r._pending;return r._listener=l3({origin:r.origin,handle:r._handle,expectRequest:!1,listener:i=>{if(!n.has(i.id))return;let{resolve:o,reject:a,cancelTimeout:c}=n.get(i.id);if(c(),"result"in i)return o(i.result);a(GC(i.error))}}),window.addEventListener("message",r._listener),new HC(r)}async send(e,t,{timeout:r=bV}){if(!this._listener)throw new Error("RPC client not connected.");let n=this,i={jsonrpc:"2.0",id:LC(),method:e,params:t};return sg(n._handle)?(await n._handle).postMessage(i,n.origin):n._handle.postMessage(i,n.origin),new Promise((o,a)=>{let c=n._pending,u;if(r>0){let p=setTimeout(()=>{c.delete(i.id),a(new Error("RPC call timed out."))},r);u=er(()=>{c.delete(i.id),clearTimeout(p)},"cancelTimeout")}else u=er(()=>{c.delete(i.id)},"cancelTimeout");c.set(i.id,{resolve:o,reject:a,cancelTimeout:u})})}close(){if(this._listener){window.removeEventListener("message",this._listener),this._handle=this.origin=this._listener=null;for(let e of this._pending.values())e.reject(new Error("RPC client closed."));this._pending=new Map}}},"Client");er(d3,"Client");var HC=s(class{constructor(e){this.client=e,this._apis=new Map}define(e,t){if(!(e&&typeof e=="string"))throw new TypeError("`name` must be a non-empty string.");if(!(t&&typeof t=="object"&&Array.isArray(t.functions)))throw new TypeError("`definition.function` must be an array of function names or function definition objects to be defined.");let r=this,n={};return t.functions.forEach(i=>{typeof i=="string"&&(i={name:i,options:{}}),n[i.name]=async function(){return r.client.send(e+"."+i.name,[...arguments],i.options)}}),r._apis[e]=n,n}get(e,t){if(!this._apis[e]){if(t)return this.define(e,t);throw new Error(`API "${e}" has not been defined.`)}return this._apis[e]}},"Injector");er(HC,"Injector");var KC=s(class{constructor({deserialize:e=er(r=>r,"deserialize"),waitUntil:t=er(async()=>{},"waitUntil")}={}){this._listeners=[],this._deserialize=e,this._waitUntil=t}async emit(e){return e=this._deserialize(e),(this._listeners[e.type]||[]).forEach(t=>t(e)),this._waitUntil(e)}addEventListener(e,t){this._listeners[e]?this._listeners[e].push(t):this._listeners[e]=[t]}removeEventListener(e,t){let r=this._listeners[e];if(!r)return;let n=r.indexOf(t);n!==-1&&r.splice(n,1)}},"EventEmitter");er(KC,"EventEmitter");var u3=s(class{constructor(){this.origin=null,this._handle=null,this._apis=new Map}define(e,t){if(!(e&&typeof e=="string"))throw new TypeError("`name` must be a non-empty string.");if(!(t&&t!=="object"))throw new TypeError("`api` must be an object.");if(e in this._apis)throw new Error(`The "${e}" API is already defined.`);this._apis[e]=t}async listen(e,t){if(this._listener)throw new Error("Already listening.");t=t||{};let r=this;r.origin=og(e).origin,r._handle=t.handle||window.opener||window.parent;let n=t.ignoreUnknownApi==="true"||!1;r._listener=l3({origin:r.origin,handle:r._handle,expectRequest:!0,listener:i=>{let{name:o,method:a}=$C(i.method),c=r._apis[o];if(a&&a.startsWith("_"))return a3(r._handle,r.origin,i);if(!c&&n)return;if(!c||typeof c[a]!="function")return a3(r._handle,r.origin,i);let u=c[a];(async()=>{let p={jsonrpc:"2.0",id:i.id};try{p.result=await u.apply(c,i.params)}catch(_){p.error=qC(_)}r._handle&&(sg(r._handle)?r._handle.then(_=>_.postMessage(p,r.origin)):r._handle.postMessage(p,r.origin))})()}}),window.addEventListener("message",r._listener)}close(){this._listener&&(window.removeEventListener("message",this._listener),this._handle=this.origin=this._listener=null)}},"Server");er(u3,"Server");function a3(e,t,r){let n={jsonrpc:"2.0",id:r.id,error:Object.assign({},UC.MethodNotFound)};return sg(e)?e.then(i=>i.postMessage(n,t)):e.postMessage(n,t)}s(a3,"sendMethodNotFound");er(a3,"sendMethodNotFound");var f3=s(class{constructor(e){this.relyingOrigin=og(e).origin,this.client=null,this.injector=null,this.client=new d3,this.server=new u3,this._control=null,this._connected=!1}async connect(){return this.injector=await this.client.connect(this.relyingOrigin),this._connected=!0,this._control=this.injector.define("core.control",{functions:["ready","show","hide"]}),this.server.listen(this.relyingOrigin),this.injector}async ready(){if(!this._connected)throw new Error('WebApp not connected. Did you call ".connect()"?');return await this._control.ready(),this}close(){this._connected&&(this.server.close(),this.client.close(),this._connected=!1)}async show(){if(!this._connected)throw new Error('Cannot "show" yet; not connected. Did you call ".connect()"?');return this._control.show()}async hide(){if(!this._connected)throw new Error('Cannot "hide" yet; not connected. Did you call ".connect()?"');return this._control.hide()}},"WebApp");er(f3,"WebApp");var h3=s(class{constructor(){this._closeEventListeners=new Set}addEventListener(e,t){if(e!=="close")throw new Error(`Unknown event "${e}".`);if(typeof t!="function")throw new TypeError('"listener" must be a function.');this._closeEventListeners.add(t)}removeEventListener(e,t){if(e!=="close")throw new Error(`Unknown event "${e}".`);if(typeof t!="function")throw new TypeError('"listener" must be a function.');this._closeEventListeners.delete(t)}show(){}close(){for(let e of this._closeEventListeners)e({})}destroy(){this._closeEventListeners.clear()}},"WebAppWindowDialog");er(h3,"WebAppWindowDialog");var JC=s(class extends h3{constructor({url:e,handle:t,className:r}){super(),this.url=e,this.handle=t,this.dialog=document.createElement("dialog"),ky(this.dialog,{position:"fixed",top:0,left:0,width:"100%",height:"100%","max-width":"100%","max-height":"100%",display:"none",margin:0,padding:0,border:"none",background:"transparent",color:"black","box-sizing":"border-box",overflow:"hidden","user-select":"none","z-index":1e6}),this.dialog.className="web-app-window",typeof r=="string"&&(this.dialog.className=this.dialog.className+" "+r);let n=document.createElement("style");n.appendChild(document.createTextNode(`dialog.web-app-window::backdrop {
2
+ ${e.stack}`:n}s(Cy,"debugString");Tr(Cy,"debugString");function yC(){return nt.clearCache()}s(yC,"clearCache");Tr(yC,"clearCache");function vC(e,t){let r=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),n=Hr,i=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),o=Hr;return nt.didResolver(r,n,i,o)}s(vC,"didResolver");Tr(vC,"didResolver");function bC(e,t){let r=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),n=Hr,i=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),o=Hr;return nt.resolveDID(r,n,i,o)}s(bC,"resolveDID");Tr(bC,"resolveDID");function Ey(e){let t=nt.__wbindgen_export_2.get(e);return nt.__externref_table_dealloc(e),t}s(Ey,"takeFromExternrefTable0");Tr(Ey,"takeFromExternrefTable0");function r3(e,t){let r=t(e.length*1,1)>>>0;return _f().set(e,r/1),Hr=e.length,r}s(r3,"passArray8ToWasm0");Tr(r3,"passArray8ToWasm0");function _C(e){let t,r;try{let o=r3(e,nt.__wbindgen_malloc),a=Hr,c=nt.generateEd25519KeyFromBytes(o,a);var n=c[0],i=c[1];if(c[3])throw n=0,i=0,Ey(c[2]);return t=n,r=i,Mo(n,i)}finally{nt.__wbindgen_free(t,r,1)}}s(_C,"generateEd25519KeyFromBytes");Tr(_C,"generateEd25519KeyFromBytes");function wC(e){let t,r;try{let o=r3(e,nt.__wbindgen_malloc),a=Hr,c=nt.generateSecp256k1KeyFromBytes(o,a);var n=c[0],i=c[1];if(c[3])throw n=0,i=0,Ey(c[2]);return t=n,r=i,Mo(n,i)}finally{nt.__wbindgen_free(t,r,1)}}s(wC,"generateSecp256k1KeyFromBytes");Tr(wC,"generateSecp256k1KeyFromBytes");function ag(e,t){let r=t(e.length*4,4)>>>0;for(let n=0;n<e.length;n++){let i=bf(e[n]);us().setUint32(r+4*n,i,!0)}return Hr=e.length,r}s(ag,"passArrayJsValueToWasm0");Tr(ag,"passArrayJsValueToWasm0");function xC(e,t){let r=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),n=Hr,i=ag(t,nt.__wbindgen_malloc),o=Hr;return nt.createJwe(r,n,i,o)}s(xC,"createJwe");Tr(xC,"createJwe");function AC(e,t){let r=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),n=Hr,i=ag(t,nt.__wbindgen_malloc),o=Hr;return nt.decryptJwe(r,n,i,o)}s(AC,"decryptJwe");Tr(AC,"decryptJwe");function CC(e,t){let r=ag(t,nt.__wbindgen_malloc),n=Hr;return nt.createDagJwe(e,r,n)}s(CC,"createDagJwe");Tr(CC,"createDagJwe");function EC(e,t){let r=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),n=Hr,i=ag(t,nt.__wbindgen_malloc),o=Hr;return nt.decryptDagJwe(r,n,i,o)}s(EC,"decryptDagJwe");Tr(EC,"decryptDagJwe");function kC(e,t){let r,n;try{let a=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),c=Hr,u=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),p=Hr,_=nt.keyToDID(a,c,u,p);var i=_[0],o=_[1];if(_[3])throw i=0,o=0,Ey(_[2]);return r=i,n=o,Mo(i,o)}finally{nt.__wbindgen_free(r,n,1)}}s(kC,"keyToDID");Tr(kC,"keyToDID");function IC(e,t){let r=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),n=Hr,i=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),o=Hr;return nt.keyToVerificationMethod(r,n,i,o)}s(IC,"keyToVerificationMethod");Tr(IC,"keyToVerificationMethod");function TC(e){let t=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),r=Hr;return nt.didToVerificationMethod(t,r)}s(TC,"didToVerificationMethod");Tr(TC,"didToVerificationMethod");function SC(e,t,r,n){let i=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),o=Hr,a=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),c=Hr,u=kn(r,nt.__wbindgen_malloc,nt.__wbindgen_realloc),p=Hr,_=kn(n,nt.__wbindgen_malloc,nt.__wbindgen_realloc),w=Hr;return nt.issueCredential(i,o,a,c,u,p,_,w)}s(SC,"issueCredential");Tr(SC,"issueCredential");function RC(e,t,r){let n=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),i=Hr,o=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),a=Hr,c=kn(r,nt.__wbindgen_malloc,nt.__wbindgen_realloc),u=Hr;return nt.verifyCredential(n,i,o,a,c,u)}s(RC,"verifyCredential");Tr(RC,"verifyCredential");function PC(e,t,r,n){let i=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),o=Hr,a=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),c=Hr,u=kn(r,nt.__wbindgen_malloc,nt.__wbindgen_realloc),p=Hr,_=kn(n,nt.__wbindgen_malloc,nt.__wbindgen_realloc),w=Hr;return nt.issuePresentation(i,o,a,c,u,p,_,w)}s(PC,"issuePresentation");Tr(PC,"issuePresentation");function DC(e,t,r){let n=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),i=Hr,o=kn(t,nt.__wbindgen_malloc,nt.__wbindgen_realloc),a=Hr,c=kn(r,nt.__wbindgen_malloc,nt.__wbindgen_realloc),u=Hr;return nt.verifyPresentation(n,i,o,a,c,u)}s(DC,"verifyPresentation");Tr(DC,"verifyPresentation");function t3(e){let t=kn(e,nt.__wbindgen_malloc,nt.__wbindgen_realloc),r=Hr;return nt.contextLoader(t,r)}s(t3,"contextLoader");Tr(t3,"contextLoader");function OC(e,t,r){nt.closure4177_externref_shim(e,t,r)}s(OC,"__wbg_adapter_52");Tr(OC,"__wbg_adapter_52");function NC(e,t,r,n){nt.closure4579_externref_shim(e,t,r,n)}s(NC,"__wbg_adapter_214");Tr(NC,"__wbg_adapter_214");var oV=["omit","same-origin","include"],sV=["same-origin","no-cors","cors","navigate"];async function jC(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(n){if(e.headers.get("Content-Type")!="application/wasm")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",n);else throw n}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}}s(jC,"__wbg_load");Tr(jC,"__wbg_load");function BC(){let e={};return e.wbg={},e.wbg.__wbg_abort_775ef1d17fc65868=function(t){t.abort()},e.wbg.__wbg_append_8c7dd8d641a5f01b=function(){return Qi(function(t,r,n,i,o){t.append(Mo(r,n),Mo(i,o))},arguments)},e.wbg.__wbg_arrayBuffer_d1b44c4390db422f=function(){return Qi(function(t){return t.arrayBuffer()},arguments)},e.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},e.wbg.__wbg_call_672a4d21634d4a24=function(){return Qi(function(t,r){return t.call(r)},arguments)},e.wbg.__wbg_call_7cccdd69e0791ae2=function(){return Qi(function(t,r,n){return t.call(r,n)},arguments)},e.wbg.__wbg_crypto_038798f665f985e2=function(t){return t.crypto},e.wbg.__wbg_crypto_574e78ad8b13b65f=function(t){return t.crypto},e.wbg.__wbg_done_769e5ede4b31c67b=function(t){return t.done},e.wbg.__wbg_entries_3265d4158b33e5dc=function(t){return Object.entries(t)},e.wbg.__wbg_fetch_509096533071c657=function(t,r){return t.fetch(r)},e.wbg.__wbg_fetch_f1856afdb49415d1=function(t){return fetch(t)},e.wbg.__wbg_from_2a5d3e218e67aa85=function(t){return Array.from(t)},e.wbg.__wbg_getRandomValues_371e7ade8bd92088=function(t,r){t.getRandomValues(r)},e.wbg.__wbg_getRandomValues_3c9c0d586e575a16=function(){return Qi(function(t,r){globalThis.crypto.getRandomValues(e3(t,r))},arguments)},e.wbg.__wbg_getRandomValues_7dfe5bd1b67c9ca1=function(t){return t.getRandomValues},e.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return Qi(function(t,r){t.getRandomValues(r)},arguments)},e.wbg.__wbg_getTime_46267b1c24877e30=function(t){return t.getTime()},e.wbg.__wbg_get_67b2ba62fc30de12=function(){return Qi(function(t,r){return Reflect.get(t,r)},arguments)},e.wbg.__wbg_get_b9b93047fe3cf45b=function(t,r){return t[r>>>0]},e.wbg.__wbg_has_a5ea9117f258a0ec=function(){return Qi(function(t,r){return Reflect.has(t,r)},arguments)},e.wbg.__wbg_headers_9cb51cfd2ac780a4=function(t){return t.headers},e.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(t){let r;try{r=t instanceof ArrayBuffer}catch{r=!1}return r},e.wbg.__wbg_instanceof_Map_f3469ce2244d2430=function(t){let r;try{r=t instanceof Map}catch{r=!1}return r},e.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644=function(t){let r;try{r=t instanceof Response}catch{r=!1}return r},e.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(t){let r;try{r=t instanceof Uint8Array}catch{r=!1}return r},e.wbg.__wbg_isArray_a1eab7e0d067391b=function(t){return Array.isArray(t)},e.wbg.__wbg_isSafeInteger_343e2beeeece1bb0=function(t){return Number.isSafeInteger(t)},e.wbg.__wbg_iterator_9a24c88df860dc65=function(){return Symbol.iterator},e.wbg.__wbg_length_a446193dc22c12f8=function(t){return t.length},e.wbg.__wbg_length_e2d2a49132c1b256=function(t){return t.length},e.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(t){return t.msCrypto},e.wbg.__wbg_msCrypto_ff35fce085fab2a3=function(t){return t.msCrypto},e.wbg.__wbg_new0_f788a2397c7ca929=function(){return new Date},e.wbg.__wbg_new_018dcc2d6c8c2f6a=function(){return Qi(function(){return new Headers},arguments)},e.wbg.__wbg_new_23a2665fac83c611=function(t,r){try{var n={a:t,b:r},i=Tr((a,c)=>{let u=n.a;n.a=0;try{return NC(u,n.b,a,c)}finally{n.a=u}},"cb0");return new Promise(i)}finally{n.a=n.b=0}},e.wbg.__wbg_new_405e22f390576ce2=function(){return new Object},e.wbg.__wbg_new_5e0be73521bc8c17=function(){return new Map},e.wbg.__wbg_new_78feb108b6472713=function(){return new Array},e.wbg.__wbg_new_a12002a7f91c75be=function(t){return new Uint8Array(t)},e.wbg.__wbg_new_e25e5aab09ff45db=function(){return Qi(function(){return new AbortController},arguments)},e.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,r){return new Function(Mo(t,r))},e.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,r,n){return new Uint8Array(t,r>>>0,n>>>0)},e.wbg.__wbg_newwithlength_a381634e90c276d4=function(t){return new Uint8Array(t>>>0)},e.wbg.__wbg_newwithstrandinit_06c535e0a867c635=function(){return Qi(function(t,r,n){return new Request(Mo(t,r),n)},arguments)},e.wbg.__wbg_next_25feadfc0913fea9=function(t){return t.next},e.wbg.__wbg_next_6574e1a8a62d1055=function(){return Qi(function(t){return t.next()},arguments)},e.wbg.__wbg_node_905d3e251edff8a2=function(t){return t.node},e.wbg.__wbg_now_d18023d54d4e5500=function(t){return t.now()},e.wbg.__wbg_process_dc0fbacc7c1c06f7=function(t){return t.process},e.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5=function(t){queueMicrotask(t)},e.wbg.__wbg_queueMicrotask_d3219def82552485=function(t){return t.queueMicrotask},e.wbg.__wbg_randomFillSync_994ac6d9ade7a695=function(t,r,n){t.randomFillSync(e3(r,n))},e.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return Qi(function(t,r){t.randomFillSync(r)},arguments)},e.wbg.__wbg_require_0d6aeaec3c042c88=function(t,r,n){return t.require(Mo(r,n))},e.wbg.__wbg_require_60cc747a6bc5215a=function(){return Qi(function(){return module.require},arguments)},e.wbg.__wbg_resolve_4851785c9c5f573d=function(t){return Promise.resolve(t)},e.wbg.__wbg_self_25aabeb5a7b41685=function(){return Qi(function(){return self.self},arguments)},e.wbg.__wbg_set_37837023f3d740e8=function(t,r,n){t[r>>>0]=n},e.wbg.__wbg_set_3f1d0b984ed272ed=function(t,r,n){t[r]=n},e.wbg.__wbg_set_65595bdd868b3009=function(t,r,n){t.set(r,n>>>0)},e.wbg.__wbg_set_8fc6bf8a5b1071d1=function(t,r,n){return t.set(r,n)},e.wbg.__wbg_setbody_5923b78a95eedf29=function(t,r){t.body=r},e.wbg.__wbg_setcredentials_c3a22f1cd105a2c6=function(t,r){t.credentials=oV[r]},e.wbg.__wbg_setheaders_834c0bdb6a8949ad=function(t,r){t.headers=r},e.wbg.__wbg_setmethod_3c5280fe5d890842=function(t,r,n){t.method=Mo(r,n)},e.wbg.__wbg_setmode_5dc300b865044b65=function(t,r){t.mode=sV[r]},e.wbg.__wbg_setsignal_75b21ef3a81de905=function(t,r){t.signal=r},e.wbg.__wbg_signal_aaf9ad74119f20a4=function(t){return t.signal},e.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){let t=typeof global>"u"?null:global;return Yc(t)?0:bf(t)},e.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){let t=typeof globalThis>"u"?null:globalThis;return Yc(t)?0:bf(t)},e.wbg.__wbg_static_accessor_MODULE_ef3aa2eb251158a5=function(){return module},e.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){let t=typeof self>"u"?null:self;return Yc(t)?0:bf(t)},e.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){let t=typeof window>"u"?null:window;return Yc(t)?0:bf(t)},e.wbg.__wbg_status_f6360336ca686bf0=function(t){return t.status},e.wbg.__wbg_stringify_f7ed6987935b4a24=function(){return Qi(function(t){return JSON.stringify(t)},arguments)},e.wbg.__wbg_subarray_aa9065fa9dc5df96=function(t,r,n){return t.subarray(r>>>0,n>>>0)},e.wbg.__wbg_then_44b73946d2fb3e7d=function(t,r){return t.then(r)},e.wbg.__wbg_then_48b406749878a531=function(t,r,n){return t.then(r,n)},e.wbg.__wbg_url_ae10c34ca209681d=function(t,r){let n=r.url,i=kn(n,nt.__wbindgen_malloc,nt.__wbindgen_realloc),o=Hr;us().setInt32(t+4*1,o,!0),us().setInt32(t+4*0,i,!0)},e.wbg.__wbg_value_cd1ffa7b1ab794f1=function(t){return t.value},e.wbg.__wbg_versions_c01dfd4722a88165=function(t){return t.versions},e.wbg.__wbindgen_bigint_from_i128=function(t,r){return t<<BigInt(64)|BigInt.asUintN(64,r)},e.wbg.__wbindgen_bigint_from_i64=function(t){return t},e.wbg.__wbindgen_bigint_from_u64=function(t){return BigInt.asUintN(64,t)},e.wbg.__wbindgen_bigint_get_as_i64=function(t,r){let n=r,i=typeof n=="bigint"?n:void 0;us().setBigInt64(t+8*1,Yc(i)?BigInt(0):i,!0),us().setInt32(t+4*0,!Yc(i),!0)},e.wbg.__wbindgen_boolean_get=function(t){let r=t;return typeof r=="boolean"?r?1:0:2},e.wbg.__wbindgen_cb_drop=function(t){let r=t.original;return r.cnt--==1?(r.a=0,!0):!1},e.wbg.__wbindgen_closure_wrapper12246=function(t,r,n){return gC(t,r,4178,OC)},e.wbg.__wbindgen_debug_string=function(t,r){let n=Cy(r),i=kn(n,nt.__wbindgen_malloc,nt.__wbindgen_realloc),o=Hr;us().setInt32(t+4*1,o,!0),us().setInt32(t+4*0,i,!0)},e.wbg.__wbindgen_error_new=function(t,r){return new Error(Mo(t,r))},e.wbg.__wbindgen_in=function(t,r){return t in r},e.wbg.__wbindgen_init_externref_table=function(){let t=nt.__wbindgen_export_2,r=t.grow(4);t.set(0,void 0),t.set(r+0,void 0),t.set(r+1,null),t.set(r+2,!0),t.set(r+3,!1)},e.wbg.__wbindgen_is_bigint=function(t){return typeof t=="bigint"},e.wbg.__wbindgen_is_function=function(t){return typeof t=="function"},e.wbg.__wbindgen_is_object=function(t){let r=t;return typeof r=="object"&&r!==null},e.wbg.__wbindgen_is_string=function(t){return typeof t=="string"},e.wbg.__wbindgen_is_undefined=function(t){return t===void 0},e.wbg.__wbindgen_jsval_eq=function(t,r){return t===r},e.wbg.__wbindgen_jsval_loose_eq=function(t,r){return t==r},e.wbg.__wbindgen_memory=function(){return nt.memory},e.wbg.__wbindgen_number_get=function(t,r){let n=r,i=typeof n=="number"?n:void 0;us().setFloat64(t+8*1,Yc(i)?0:i,!0),us().setInt32(t+4*0,!Yc(i),!0)},e.wbg.__wbindgen_number_new=function(t){return t},e.wbg.__wbindgen_string_get=function(t,r){let n=r,i=typeof n=="string"?n:void 0;var o=Yc(i)?0:kn(i,nt.__wbindgen_malloc,nt.__wbindgen_realloc),a=Hr;us().setInt32(t+4*1,a,!0),us().setInt32(t+4*0,o,!0)},e.wbg.__wbindgen_string_new=function(t,r){return Mo(t,r)},e.wbg.__wbindgen_throw=function(t,r){throw new Error(Mo(t,r))},e}s(BC,"__wbg_get_imports");Tr(BC,"__wbg_get_imports");function cV(e,t){}s(cV,"__wbg_init_memory");Tr(cV,"__wbg_init_memory");function FC(e,t){return nt=e.exports,n3.__wbindgen_wasm_module=t,vf=null,ig=null,nt.__wbindgen_start(),nt}s(FC,"__wbg_finalize_init");Tr(FC,"__wbg_finalize_init");async function n3(e){if(nt!==void 0)return nt;typeof e<"u"&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof e>"u"&&(e=new URL("didkit_wasm_bg.wasm",hV.url));let t=BC();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:r,module:n}=await jC(await e,t);return FC(r,n)}s(n3,"__wbg_init");Tr(n3,"__wbg_init");var lV=n3,pC=!1,wy=!1,dV=Tr(async(e="https://cdn.filestackcontent.com/ivsAQbs6REaprmu9BsRF")=>{for(;wy;)await new Promise(t=>setTimeout(t,250));if(!pC)try{wy=!0,await lV({module_or_path:e}),wy=!1,pC=!0}catch(t){throw wy=!1,t}},"init"),uV=dV,fV=Tr(e=>{let t=[],r=Tr(n=>{typeof n!="object"||n===null||(n["@context"]&&(Array.isArray(n["@context"])?t.push(...n["@context"]):t.push(n["@context"])),Object.keys(n).forEach(i=>{r(n[i])}))},"traverse");return r(e),t},"getContextURIs"),xy=Tr(async(e,t,r=!1)=>{let n=fV(t),i=await Promise.all(n.map(async o=>e.context.resolveDocument(o,r)));return n.reduce((o,a,c)=>{let u=i[c];return u&&(o[a]=JSON.stringify(u)),o},{})},"getDocumentMap"),Xc=Tr(async(e,t=!1)=>{await uV(e);let r={};return{name:"DIDKit",displayName:"DIDKit",description:"Provides an interface to DIDKit, which allows for the generation of key material, as well as signing and verifying credentials and presentations",context:{resolveStaticDocument:async(n,i)=>{try{return JSON.parse(await t3(i)??"")||void 0}catch(o){n.debug?.(o);return}}},methods:{generateEd25519KeyFromBytes:(n,i)=>JSON.parse(_C(i)),generateSecp256k1KeyFromBytes:(n,i)=>JSON.parse(wC(i)),keyToDid:(n,i,o)=>kC(i,JSON.stringify(o)),keyToVerificationMethod:async(n,i,o)=>IC(i,JSON.stringify(o)),didToVerificationMethod:async(n,i)=>TC(i),issueCredential:async(n,i,o,a)=>JSON.parse(await SC(JSON.stringify(i),JSON.stringify(o),JSON.stringify(a),JSON.stringify(await xy(n,i,t)))),verifyCredential:async(n,i,o={})=>JSON.parse(await RC(JSON.stringify(i),JSON.stringify(o),JSON.stringify(await xy(n,i,t)))),issuePresentation:async(n,i,o,a)=>{let c=o.proofFormat==="jwt",u=await PC(JSON.stringify(i),JSON.stringify(o),JSON.stringify(a),JSON.stringify(await xy(n,i,t)));return c?u:JSON.parse(u)},verifyPresentation:async(n,i,o={})=>{let a=typeof i=="string";return JSON.parse(await DC(a?i:JSON.stringify(i),JSON.stringify(o),a?"{}":JSON.stringify(await xy(n,i,t))))},contextLoader:async(n,i)=>{try{return JSON.parse(await t3(i)??"")||void 0}catch(o){n.debug?.(o);return}},resolveDid:async(n,i,o={})=>JSON.parse(await bC(i,JSON.stringify(o))),didResolver:async(n,i,o={})=>JSON.parse(await vC(i,JSON.stringify(o))),createJwe:async(n,i,o)=>JSON.parse(await xC(i,o)),decryptJwe:async(n,i,o)=>AC(JSON.stringify(i),o.map(a=>JSON.stringify(a))),createDagJwe:async(n,i,o)=>JSON.parse(await CC(i,o)),decryptDagJwe:async(n,i,o)=>{let a=Tr(c=>{if(c==null)return c;if(typeof c=="bigint")return Number(c);if(Array.isArray(c))return c.map(a);if(typeof c!="object"||!Object.values(c).some(_=>typeof _=="bigint"||typeof _=="object"&&_!==null))return c;let p={};for(let _ in c)p[_]=a(c[_]);return p},"convertBigIntsToNumbers");return a(await EC(JSON.stringify(i),o.map(c=>JSON.stringify(c))))},clearDidWebCache:async()=>{await yC()}}}},"getDidKitPlugin");var pV=Object.defineProperty,mV=s((e,t)=>pV(e,"name",{value:t,configurable:!0}),"__name"),fs=mV(e=>({name:"Expiration",displayName:"Expiration Extension",description:"Adds a check to make sure credentials aren't expired when verifying them",methods:{verifyCredential:async(t,r,n)=>{let i=await e.invoke.verifyCredential(r,n);return r.expirationDate&&new Date>new Date(r.expirationDate)?i.errors.push("expiration error: Credential is expired"):r.validFrom&&new Date<new Date(r.validFrom)?i.errors.push("expiration error: Credential is not valid yet"):r.validUntil&&new Date>new Date(r.validUntil)?i.errors.push("expiration error: Credential is no longer valid"):i.checks.push("expiration"),i}}}),"expirationPlugin");var gV=Object.defineProperty,yV=s((e,t)=>gV(e,"name",{value:t,configurable:!0}),"__name"),MC={basic:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z"}={},n)=>({"@context":["https://www.w3.org/2018/credentials/v1"],id:`urn:uuid:${n.randomUUID()}`,type:["VerifiableCredential"],issuer:e,issuanceDate:r,credentialSubject:{id:t}}),achievement:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",name:r="Teamwork Badge",achievementName:n="Teamwork",description:i="This badge recognizes the development of the capacity to collaborate within a group environment.",criteriaNarrative:o="Team members are nominated for this badge by their peers and recognized upon review by Example Corp management.",issuanceDate:a="2020-08-19T21:41:50Z"}={},c)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json"],id:`urn:uuid:${c.randomUUID()}`,type:["VerifiableCredential","OpenBadgeCredential"],issuer:{id:e},validFrom:a,name:r,credentialSubject:{id:t,type:["AchievementSubject"],achievement:{id:`urn:uuid:${c.randomUUID()}`,type:["Achievement"],criteria:{narrative:o},description:i,name:n}}}),jff2:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z"}={},n)=>({"@context":["https://www.w3.org/2018/credentials/v1","https://purl.imsglobal.org/spec/ob/v3p0/context.json","https://w3id.org/security/suites/ed25519-2020/v1"],id:`urn:uuid:${n.randomUUID()}`,type:["VerifiableCredential","OpenBadgeCredential"],name:"JFF x vc-edu PlugFest 2 Interoperability",issuer:{type:["Profile"],id:e,name:"Jobs for the Future (JFF)",image:{id:"https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png",type:"Image"}},issuanceDate:r,credentialSubject:{type:["AchievementSubject"],id:t,achievement:{id:`urn:uuid:${n.randomUUID()}`,type:["Achievement"],name:"JFF x vc-edu PlugFest 2 Interoperability",description:"This credential solution supports the use of OBv3 and w3c Verifiable Credentials and is interoperable with at least two other solutions. This was demonstrated successfully during JFF x vc-edu PlugFest 2.",criteria:{narrative:"Solutions providers earned this badge by demonstrating interoperability between multiple providers based on the OBv3 candidate final standard, with some additional required fields. Credential issuers earning this badge successfully issued a credential into at least two wallets. Wallet implementers earning this badge successfully displayed credentials issued by at least two different credential issuers."},image:{id:"https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png",type:"Image"}}}}),boost:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z",expirationDate:n,boostName:i="Example Boost",boostImage:o,achievementId:a,achievementType:c="Influencer",achievementName:u="Awesome Badge",achievementDescription:p="Awesome People Earn Awesome Badge",achievementNarrative:_="Earned by being awesome.",achievementImage:w="",attachments:R,display:P,familyTitles:$,skills:D,groupID:L=""}={},H)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json","https://ctx.learncard.com/boosts/1.0.1.json"],type:["VerifiableCredential","OpenBadgeCredential","BoostCredential"],id:`urn:uuid:${H.randomUUID()}`,issuer:{id:e},validFrom:r,...n&&{validUntil:n},name:i,credentialSubject:{id:t,type:["AchievementSubject"],achievement:{id:a??`urn:uuid:${H.randomUUID()}`,type:["Achievement"],achievementType:c,name:u,description:p,image:w,criteria:{narrative:_}}},display:P,familyTitles:$,image:o,attachments:R,skills:D,groupID:L}),boostID:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z",expirationDate:n,boostName:i="Example Boost",boostImage:o,achievementId:a,achievementType:c="Influencer",achievementName:u="Awesome Badge",achievementDescription:p="Awesome People Earn Awesome Badge",achievementNarrative:_="Earned by being awesome.",achievementImage:w="",address:R,attachments:P,skills:$,display:D,familyTitles:L,boostID:H,groupID:re=""}={},me)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json","https://ctx.learncard.com/boosts/1.0.1.json","https://ctx.learncard.com/boostIDs/1.0.0.json"],type:["VerifiableCredential","OpenBadgeCredential","BoostCredential","BoostID"],id:`urn:uuid:${me.randomUUID()}`,issuer:{id:e},validFrom:r,...n&&{validUntil:n},name:i,credentialSubject:{id:t,type:["AchievementSubject"],achievement:{id:a??`urn:uuid:${me.randomUUID()}`,type:["Achievement"],achievementType:c,name:u,description:p,image:w,criteria:{narrative:_}}},...R?{address:{type:["Address"],...R,...R.geo?{geo:{type:["GeoCoordinates"],...R.geo}}:{}}}:{},display:D,familyTitles:L,image:o,attachments:P,skills:$,boostID:H,groupID:re}),delegate:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r=new Date().toISOString(),access:n=["read"]}={},i)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://ctx.learncard.com/delegates/1.0.0.json"],type:["VerifiableCredential","DelegateCredential"],id:`urn:uuid:${i.randomUUID()}`,issuer:{id:e},validFrom:r,credentialSubject:{id:t},permissions:{statementAccess:n}})},hs=yV(()=>({name:"VC Templates",displayName:"VC Templates",description:"Allows for the easy creation of VCs and VPs based on predefined templates",methods:{newCredential:(e,t={type:"basic"})=>{let r=t.did||e.id.did();if(!r)throw new Error("Could not get issuer did!");let n={did:r,subject:"did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:new Date().toISOString()},{type:i="basic",...o}=t;if(!(i in MC))throw new Error("Invalid Test VC Type!");return MC[i]({...n,...o},e.invoke.crypto())},newPresentation:async(e,t,r={})=>{let n=r?.did||e.id.did();if(!n)throw new Error("Could not get issuer did!");return{"@context":["https://www.w3.org/ns/credentials/v2"],type:["VerifiablePresentation"],holder:n,verifiableCredential:t}}}}),"getVCTemplatesPlugin");var vV=Object.defineProperty,er=s((e,t)=>vV(e,"name",{value:t,configurable:!0}),"__name"),UC={ParseError:{message:"Parse error",code:-32700},InvalidRequest:{message:"Invalid Request",code:-32600},MethodNotFound:{message:"Method not found",code:-32601},InvalidParams:{message:"Invalid params",code:-32602},InternalError:{message:"Internal Error",code:-32603},ServerError:{message:"Server error",code:-32e3}};function og(e,t){if(t===void 0&&(t=window.location.href),typeof URL=="function")return new URL(e,t);if(typeof e!="string")throw new TypeError('"url" must be a string.');e.includes(":")||(t.startsWith("http")&&!e.startsWith("/")?e=t+"/"+e:e=t+e);let r=document.createElement("a");r.href=e;let n=(r.protocol||window.location.protocol)+"//";r.host?r.protocol==="http:"&&r.port==="80"||r.protocol==="https:"&&r.port==="443"?n+=r.hostname:n+=r.host:n+=window.location.host;let i=r.pathname;return i.startsWith("/")||(i="/"+i),{host:r.host||window.location.host,hostname:r.hostname,origin:n,protocol:r.protocol,pathname:i}}s(og,"parseUrl");er(og,"parseUrl");function LC(e,t){for(t=e="";e++<36;t+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return t}s(LC,"uuidv4");er(LC,"uuidv4");function c3(e){return e&&typeof e=="object"&&e.jsonrpc==="2.0"&&e.id&&typeof e.id=="string"}s(c3,"isValidMessage");er(c3,"isValidMessage");function ZC(e){return c3(e)&&Array.isArray(e.params)}s(ZC,"isValidRequest");er(ZC,"isValidRequest");function zC(e){return c3(e)&&!!("result"in e^"error"in e)&&(!("error"in e)||WC(e.error))}s(zC,"isValidResponse");er(zC,"isValidResponse");function WC(e){return e&&typeof e=="object"&&typeof e.code=="number"&&typeof e.message=="string"}s(WC,"isValidError");er(WC,"isValidError");function qC(e){let t={message:e.message};return e.constructor.name!=="Error"&&(t.constructor=e.constructor.name),"name"in e&&(t.name=e.name),"code"in e?t.code=e.code:t.code=UC.ServerError.code,"details"in e&&(t.details=e.details),t}s(qC,"serializeError");er(qC,"serializeError");function GC(e){let t;return e.constructor==="DOMException"?t=new DOMException(e.message,e.name):(t=new Error(e.message),"code"in e&&(t.code=e.code)),e.details&&(t.details=e.details),t}s(GC,"deserializeError");er(GC,"deserializeError");function l3({listener:e,origin:t,handle:r,expectRequest:n}){if(sg(r)){let i=r;r=!1,i.then(o=>r=o)}return i=>{!(i.source===r&&i.origin===t&&(n&&ZC(i.data)||!n&&zC(i.data)))||e(i.data,i)}}s(l3,"createMessageListener");er(l3,"createMessageListener");function $C(e){let[t,...r]=e.split("."),n=r.pop();return t=[t,...r].join("."),{name:t,method:n}}s($C,"destructureMethodName");er($C,"destructureMethodName");function sg(e){try{return typeof e.then=="function"}catch{}return!1}s(sg,"isHandlePromise");er(sg,"isHandlePromise");var bV=3e4,d3=s(class{constructor(){this.origin=null,this._handle=null,this._listener=null,this._pending=new Map}async connect(e,t){if(this._listener)throw new Error("Already connected.");t=t||{};let r=this;r.origin=og(e).origin,r._handle=t.handle||window.opener||window.parent;let n=r._pending;return r._listener=l3({origin:r.origin,handle:r._handle,expectRequest:!1,listener:i=>{if(!n.has(i.id))return;let{resolve:o,reject:a,cancelTimeout:c}=n.get(i.id);if(c(),"result"in i)return o(i.result);a(GC(i.error))}}),window.addEventListener("message",r._listener),new HC(r)}async send(e,t,{timeout:r=bV}){if(!this._listener)throw new Error("RPC client not connected.");let n=this,i={jsonrpc:"2.0",id:LC(),method:e,params:t};return sg(n._handle)?(await n._handle).postMessage(i,n.origin):n._handle.postMessage(i,n.origin),new Promise((o,a)=>{let c=n._pending,u;if(r>0){let p=setTimeout(()=>{c.delete(i.id),a(new Error("RPC call timed out."))},r);u=er(()=>{c.delete(i.id),clearTimeout(p)},"cancelTimeout")}else u=er(()=>{c.delete(i.id)},"cancelTimeout");c.set(i.id,{resolve:o,reject:a,cancelTimeout:u})})}close(){if(this._listener){window.removeEventListener("message",this._listener),this._handle=this.origin=this._listener=null;for(let e of this._pending.values())e.reject(new Error("RPC client closed."));this._pending=new Map}}},"Client");er(d3,"Client");var HC=s(class{constructor(e){this.client=e,this._apis=new Map}define(e,t){if(!(e&&typeof e=="string"))throw new TypeError("`name` must be a non-empty string.");if(!(t&&typeof t=="object"&&Array.isArray(t.functions)))throw new TypeError("`definition.function` must be an array of function names or function definition objects to be defined.");let r=this,n={};return t.functions.forEach(i=>{typeof i=="string"&&(i={name:i,options:{}}),n[i.name]=async function(){return r.client.send(e+"."+i.name,[...arguments],i.options)}}),r._apis[e]=n,n}get(e,t){if(!this._apis[e]){if(t)return this.define(e,t);throw new Error(`API "${e}" has not been defined.`)}return this._apis[e]}},"Injector");er(HC,"Injector");var KC=s(class{constructor({deserialize:e=er(r=>r,"deserialize"),waitUntil:t=er(async()=>{},"waitUntil")}={}){this._listeners=[],this._deserialize=e,this._waitUntil=t}async emit(e){return e=this._deserialize(e),(this._listeners[e.type]||[]).forEach(t=>t(e)),this._waitUntil(e)}addEventListener(e,t){this._listeners[e]?this._listeners[e].push(t):this._listeners[e]=[t]}removeEventListener(e,t){let r=this._listeners[e];if(!r)return;let n=r.indexOf(t);n!==-1&&r.splice(n,1)}},"EventEmitter");er(KC,"EventEmitter");var u3=s(class{constructor(){this.origin=null,this._handle=null,this._apis=new Map}define(e,t){if(!(e&&typeof e=="string"))throw new TypeError("`name` must be a non-empty string.");if(!(t&&t!=="object"))throw new TypeError("`api` must be an object.");if(e in this._apis)throw new Error(`The "${e}" API is already defined.`);this._apis[e]=t}async listen(e,t){if(this._listener)throw new Error("Already listening.");t=t||{};let r=this;r.origin=og(e).origin,r._handle=t.handle||window.opener||window.parent;let n=t.ignoreUnknownApi==="true"||!1;r._listener=l3({origin:r.origin,handle:r._handle,expectRequest:!0,listener:i=>{let{name:o,method:a}=$C(i.method),c=r._apis[o];if(a&&a.startsWith("_"))return a3(r._handle,r.origin,i);if(!c&&n)return;if(!c||typeof c[a]!="function")return a3(r._handle,r.origin,i);let u=c[a];(async()=>{let p={jsonrpc:"2.0",id:i.id};try{p.result=await u.apply(c,i.params)}catch(_){p.error=qC(_)}r._handle&&(sg(r._handle)?r._handle.then(_=>_.postMessage(p,r.origin)):r._handle.postMessage(p,r.origin))})()}}),window.addEventListener("message",r._listener)}close(){this._listener&&(window.removeEventListener("message",this._listener),this._handle=this.origin=this._listener=null)}},"Server");er(u3,"Server");function a3(e,t,r){let n={jsonrpc:"2.0",id:r.id,error:Object.assign({},UC.MethodNotFound)};return sg(e)?e.then(i=>i.postMessage(n,t)):e.postMessage(n,t)}s(a3,"sendMethodNotFound");er(a3,"sendMethodNotFound");var f3=s(class{constructor(e){this.relyingOrigin=og(e).origin,this.client=null,this.injector=null,this.client=new d3,this.server=new u3,this._control=null,this._connected=!1}async connect(){return this.injector=await this.client.connect(this.relyingOrigin),this._connected=!0,this._control=this.injector.define("core.control",{functions:["ready","show","hide"]}),this.server.listen(this.relyingOrigin),this.injector}async ready(){if(!this._connected)throw new Error('WebApp not connected. Did you call ".connect()"?');return await this._control.ready(),this}close(){this._connected&&(this.server.close(),this.client.close(),this._connected=!1)}async show(){if(!this._connected)throw new Error('Cannot "show" yet; not connected. Did you call ".connect()"?');return this._control.show()}async hide(){if(!this._connected)throw new Error('Cannot "hide" yet; not connected. Did you call ".connect()?"');return this._control.hide()}},"WebApp");er(f3,"WebApp");var h3=s(class{constructor(){this._closeEventListeners=new Set}addEventListener(e,t){if(e!=="close")throw new Error(`Unknown event "${e}".`);if(typeof t!="function")throw new TypeError('"listener" must be a function.');this._closeEventListeners.add(t)}removeEventListener(e,t){if(e!=="close")throw new Error(`Unknown event "${e}".`);if(typeof t!="function")throw new TypeError('"listener" must be a function.');this._closeEventListeners.delete(t)}show(){}close(){for(let e of this._closeEventListeners)e({})}destroy(){this._closeEventListeners.clear()}},"WebAppWindowDialog");er(h3,"WebAppWindowDialog");var JC=s(class extends h3{constructor({url:e,handle:t,className:r}){super(),this.url=e,this.handle=t,this.dialog=document.createElement("dialog"),ky(this.dialog,{position:"fixed",top:0,left:0,width:"100%",height:"100%","max-width":"100%","max-height":"100%",display:"none",margin:0,padding:0,border:"none",background:"transparent",color:"black","box-sizing":"border-box",overflow:"hidden","user-select":"none","z-index":1e6}),this.dialog.className="web-app-window",typeof r=="string"&&(this.dialog.className=this.dialog.className+" "+r);let n=document.createElement("style");n.appendChild(document.createTextNode(`dialog.web-app-window::backdrop {
3
3
  background-color: transparent;
4
4
  }`)),this.container=document.createElement("div"),ky(this.container,{position:"relative",width:"100%",height:"100%",margin:0,padding:0,display:"flex","flex-direction":"column"}),this.container.className="web-app-window-backdrop",this.iframe=document.createElement("iframe"),this.iframe.src=e,this.iframe.scrolling="auto",ky(this.iframe,{position:"fixed",top:0,left:0,width:"100%",height:"100%",border:"none",background:"transparent",overflow:"hidden",margin:0,padding:0,"flex-grow":1,"user-select":"none"}),this.dialog.appendChild(n),this.container.appendChild(this.iframe),this.dialog.appendChild(this.container),this.dialog.addEventListener("cancel",i=>{i.preventDefault(),this.hide()}),document.body.appendChild(this.dialog),this.handle=this.iframe.contentWindow}show(){this.dialog.style.display="block",this.dialog.showModal&&this.dialog.showModal();try{this.dialog.style.pointerEvents="none"}catch{}setTimeout(()=>{try{this.dialog.style.pointerEvents=""}catch{}},32)}close(){if(this.dialog.style.display="none",this.dialog.close)try{this.dialog.close()}catch(e){console.error(e)}super.close()}destroy(){this.dialog.parentNode.removeChild(this.dialog),super.destroy()}},"WebAppWindowInlineDialog");er(JC,"WebAppWindowInlineDialog");function ky(e,t){for(let r in t)e.style[r]=t[r]}s(ky,"applyStyle");er(ky,"applyStyle");var QC=s(class extends h3{constructor({url:e,handle:t,bounds:r={width:500,height:400}}){super(),this.url=e,this.handle=t,this._locationChanging=!1,t||this._openWindow({url:e,name:"web-app-window",bounds:r}),this.destroyed=!1,this._removeListeners=()=>{}}show(){}close(){this.destroy()}destroy(){this.handle&&!this.destroyed&&(this.handle.close(),super.close(),this.handle=null,this.destroyed=!0,this._removeListeners(),super.destroy())}isClosed(){return!this.handle||this.handle.closed}_openWindow({url:e,name:t,bounds:r}){let{x:n,y:i}=r,{width:o=500,height:a=400}=r;o=Math.min(o,window.innerWidth),a=Math.min(a,window.innerHeight);let c=Math.floor(n!==void 0?n:window.screenX+(window.innerWidth-o)/2),u=Math.floor(i!==void 0?i:window.screenY+(window.innerHeight-a)/2),p=`popup=yes,menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${o},height=${a},left=${c},top=${u}`;this._locationChanging=!0,this.handle=window.open(e,t,p),this._addListeners()}setLocation(e){this.url=e,this._locationChanging=!0,this.handle.location.replace(e)}_addListeners(){let e=er(()=>this.destroy(),"destroyDialog"),t=er(()=>{this._locationChanging=!1},"loadDialog"),r=er(()=>{this._locationChanging||this.destroy()},"unloadDialog");this.handle.addEventListener("unload",r),this.handle.addEventListener("load",t),window.addEventListener("beforeUnload",e,{once:!0});let n=setInterval(()=>{this.isClosed()&&(this.destroy(),clearInterval(n))},250);this._removeListeners=()=>{clearInterval(n),this.handle.removeListener("unload",r),this.handle.removeListener("load",t),window.removeEventListener("beforeUnload",e)}}},"WebAppWindowPopupDialog");er(QC,"WebAppWindowPopupDialog");var _V=6e4,Ty=s(class{constructor(e,{timeout:t=_V,dialog:r=null,handle:n,popup:i=!1,className:o=null,customize:a=null,bounds:c}={}){if(this.visible=!1,this.dialog=r,this.handle=null,this.popup=i,this.windowControl=null,this._destroyed=!1,this._ready=!1,this._private={},this._timeoutId=null,n&&n._dialog&&(this.dialog=r=n._dialog),this._private._readyPromise=new Promise((u,p)=>{this._timeoutId=setTimeout(()=>p(new DOMException("Loading Web application window timed out.","TimeoutError")),t),this._private._resolveReady=_=>{clearTimeout(this.timeoutId),this._timeoutId=null,u(_)},this._private._rejectReady=_=>{clearTimeout(this.timeoutId),this._timeoutId=null,p(_)}}),this._private.isReady=async()=>this._private._readyPromise,this._private.destroy=()=>{this._timeoutId&&this._private._rejectReady(new DOMException("Web application window closed before ready.","AbortError")),this._destroyed||(this.dialog.destroy(),this.dialog=null,this._destroyed=!0)},a&&!typeof a==="function")throw new TypeError("`options.customize` must be a function.");if(this.dialog||(this.popup?this.dialog=new QC({url:e,handle:n,bounds:c}):this.dialog=new JC({url:e,handle:n,className:o})),this.popup&&c){let{x:u,y:p,width:_=500,height:w=400}=c;_=Math.min(_,window.innerWidth),w=Math.min(w+30,window.innerHeight),u=Math.floor(u!==void 0?u:window.screenX+(window.innerWidth-_)/2),p=Math.floor(p!==void 0?p:window.screenY+(window.innerHeight-w)/2+15),this.dialog.handle.resizeTo(_,w),this.dialog.handle.moveTo(u,p)}if(this.handle=this.dialog.handle,a)try{a({dialog:this.dialog.dialog,container:this.dialog.container,iframe:this.dialog.iframe,webAppWindow:this})}catch(u){console.error(u)}}ready(){this._ready=!0,this._private._resolveReady(!0)}show(){if(!this.visible){this.visible=!0;let e=document.querySelector("body");this._bodyOverflowStyle=e.style.overflow,e.style.overflow="hidden",this._destroyed?this.windowControl.show&&this.windowControl.show():this.dialog.show()}}hide(){if(this.visible){this.visible=!1;let e=document.querySelector("body");this._bodyOverflowStyle?e.style.overflow=this._bodyOverflowStyle:e.style.overflow="",this._destroyed?this.windowControl.hide&&this.windowControl.hide():this.dialog.close()}}},"WebAppWindow");er(Ty,"WebAppWindow");var wV=1e4,p3=s(class{constructor(){this.client=new d3,this.server=new u3,this.injector=null,this.control=null,this.loaded=!1,this.closed=!1}async createWindow(e,{timeout:t=wV,iframe:r,dialog:n=null,popup:i=!1,handle:o,windowControl:a,className:c,customize:u,bounds:p}={}){if(this.loaded)throw new Error("AppContext already loaded.");this.loaded=!0,this.control=new Ty(e,{timeout:t,dialog:n,iframe:r,popup:i,handle:o,windowControl:a,className:c,customize:u,bounds:p}),window.addEventListener("pagehide",()=>this.close(),{once:!0}),this.server.define("core.control",this.control);let _=og(e).origin;return this.server.listen(_,{handle:this.control.handle,ignoreUnknownApi:!0}),await this.control._private.isReady(),this.injector=await this.client.connect(_,{handle:this.control.handle}),this.injector}close(){this.closed||(this.closed=!0,this.control._private.destroy(),this.server.close(),this.client.close())}},"WebAppContext");er(p3,"WebAppContext");var YC=s(class{constructor({credentialHandler:e,credentialRequestOrigin:t,credentialRequestOptions:r,hintKey:n}){this.type="credentialrequest",this._credentialHandler=e,this.credentialRequestOrigin=t,this.credentialRequestOptions=r,this.hintKey=n}async openWindow(e){await this._credentialHandler.show();let t=new Ty(e,{className:"credential-handler"});return t.ready(),t.show(),t.handle._dialog=t.dialog,t.handle}respondWith(e){this._promise=e}},"CredentialRequestEvent");er(YC,"CredentialRequestEvent");var XC=s(class{constructor({credentialHandler:e,credentialRequestOrigin:t,credential:r,hintKey:n}){this.type="credentialstore",this._credentialHandler=e,this.credentialRequestOrigin=t,this.credential=r,this.hintKey=n}async openWindow(e){await this._credentialHandler.show();let t=new Ty(e);return t.ready(),t.show(),t.handle._dialog=t.dialog,t.handle}respondWith(e){this._promise=e}},"CredentialStoreEvent");er(XC,"CredentialStoreEvent");var eE=s(class{constructor(e){this._credentialHandler=e}async request(e){return await this._credentialHandler._emitter.emit(new YC(Object.assign({credentialHandler:this._credentialHandler},e)))}async store(e){return await this._credentialHandler._emitter.emit(new XC(Object.assign({credentialHandler:this._credentialHandler},e)))}},"CredentialHandlerService");er(eE,"CredentialHandlerService");var VC=["credentialrequest","credentialstore"],tE=s(class extends f3{constructor(e,t=!1){if(typeof e!="string")throw new TypeError('"mediatorOrigin" must be a string.');super(e,t),this._emitter=new KC({async waitUntil(r){return r._promise||Promise.reject(new DOMException('No "credentialrequest" event handler found.',"NotFoundError"))}})}async connect(){let e=await super.connect();return this.server.define("credentialHandler",new eE(this)),await this.ready(),e}addEventListener(e,t){if(!VC.includes(e))throw new DOMException(`Unsupported event type "${e}"`,"NotSupportedError");return this._emitter.addEventListener(e,t)}removeEventListener(e,t){if(!VC.includes(e))throw new DOMException(`Unsupported event type "${e}"`,"NotSupportedError");return this._emitter.removeEventListener(e,t)}},"CredentialHandler");er(tE,"CredentialHandler");var rE=s(class{constructor(e,t){let r=t.get("credentialHints",{functions:["delete","get","keys","has","set","clear"]});for(let n in r)if(n!=="set"){let i=r[n].bind(this,e);this[n]=function(...o){return this._deprecateNotice(),i(...o)}}this._remoteSet=r.set.bind(this,e)}async set(e,t){this._deprecateNotice(),t.icons=t.icons||[];let r=t.icons.map(n=>nE(n.src).then(i=>{n.fetchedImage=i}));return await Promise.all(r),this._remoteSet(e,t)}_deprecateNotice(){console.warn("Credential hints are deprecated and no longer used.")}},"CredentialHints");er(rE,"CredentialHints");function nE(e){return new Promise(t=>{let r=new Image;r.crossOrigin="Anonymous",r.onload=()=>{let n=document.createElement("canvas"),i=n.getContext("2d");n.height=r.height,n.width=r.width,i.drawImage(r,0,0);let o=n.toDataURL();t(o),n=null},r.onerror=()=>t(null),r.src=e})}s(nE,"imageToDataUrl");er(nE,"imageToDataUrl");var Iy=s(class{constructor(e,t){if(!(e&&typeof e=="string"))throw new TypeError('"url" must be a non-empty string.');this.hints=new rE(e,t)}static async requestPermission(){return(await navigator.credentialsPolyfill.permissions.request({name:"credentialhandler"})).state}},"CredentialManager");er(Iy,"CredentialManager");var o3=s(class{constructor(e,t){if(!(e&&typeof e=="string"))throw new TypeError('"url" must be a non-empty string.');this.credentialManager=new Iy(e,t)}},"CredentialHandlerRegistration");er(o3,"CredentialHandlerRegistration");var iE=s(class{constructor(e){this._init=(async()=>{this._injector=await e,this._remote=this._injector.get("credentialHandlers",{functions:["register","unregister","getRegistration","hasRegistration"]})})()}async register(e){return this._deprecateNotice(),await this._init,e=await this._remote.register("credential",e),new o3(e,this._injector)}async unregister(e){return this._deprecateNotice(),await this._init,this._remote.unregister("credential",e)}async getRegistration(e){return this._deprecateNotice(),await this._init,e=await this._remote.getRegistration("credential",e),e?new o3(e,this._injector):null}async hasRegistration(e){return this._deprecateNotice(),await this._init,await this._remote.hasRegistration("credential",e)}_deprecateNotice(){console.warn('Credential handler registration APIs are deprecated. The credential handler specified in "manifest.json" is now automatically registered when a user grants permission to install a credential handler via "CredentialManager.requestPermission()".')}},"CredentialHandlers");er(iE,"CredentialHandlers");var kh=s(class{constructor(e,t,{recommendedHandlerOrigins:r=[],protocols:n={}}={}){if(typeof e!="string")throw new TypeError('"dataType" must be a string.');this.type="web",this.dataType=e,this.data=t,this.options={recommendedHandlerOrigins:r,protocols:n}}},"WebCredential2");er(kh,"WebCredential");var xV=0,AV=0,aE=s(class{constructor(e){this._nativeCredentialsContainer={get:navigator.credentials&&navigator.credentials.get&&navigator.credentials.get.bind(navigator.credentials),store:navigator.credentials&&navigator.credentials.store&&navigator.credentials.store.bind(navigator.credentials)},this._init=(async()=>{this._remote=(await e).get("credentialsContainer",{functions:[{name:"get",options:{timeout:xV}},{name:"store",options:{timeout:AV}}]})})()}async get(e={}){if(e.web){await this._init;let t=await this._remote.get(e);return t?new kh(t.dataType,t.data):null}if(this._nativeCredentialsContainer.get)return this._nativeCredentialsContainer.get(e);throw new DOMException("Not implemented.","NotSupportedError")}async store(e){if(e instanceof kh){await this._init;let t=await this._remote.store(e);return t?new kh(t.dataType,t.data):null}if(this._nativeCredentialsContainer.store)return this._nativeCredentialsContainer.store(e);throw new DOMException("Not implemented.","NotSupportedError")}},"CredentialsContainer");er(aE,"CredentialsContainer");var CV=0,oE=s(class{constructor(e){this._init=(async()=>{this._remote=(await e).get("permissionManager",{functions:["query",{name:"request",options:{timeout:CV}},"revoke"]})})()}async query(e){return await this._init,await this._remote.query(e)}async request(e){return await this._init,await this._remote.request(e)}async revoke(e){return await this._init,await this._remote.revoke(e)}},"PermissionManager");er(oE,"PermissionManager");var EV="https://authn.io",i3;async function sE(e){return i3||(i3=!0,cE(e))}s(sE,"loadOnce");er(sE,"loadOnce");async function cE(e={mediatorOrigin:EV}){lE();let t;if(typeof e=="string")t=e;else if(e&&typeof e=="object"&&typeof e.mediatorOrigin=="string")t=`${e.mediatorOrigin}/mediator`;else throw new Error('"options.mediatorOrigin" must be a string expressing the origin of the mediator.');let n=new p3().createWindow(t,{className:"credential-mediator",timeout:3e4}),i=document.createElement("style");i.appendChild(document.createTextNode(`dialog.web-app-window.credential-mediator > .web-app-window-backdrop {
5
5
  background-color: rgba(0, 0, 0, 0.25);