cocoda-sdk 3.4.13 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,15 +5,15 @@
5
5
  *
6
6
  * For dependency license information, please see ./dist/cocoda-sdk.js.LICENSES.txt.
7
7
  */
8
- var CDK=(()=>{var um=Object.create;var Ar=Object.defineProperty,cm=Object.defineProperties,fm=Object.getOwnPropertyDescriptor,lm=Object.getOwnPropertyDescriptors,hm=Object.getOwnPropertyNames,yn=Object.getOwnPropertySymbols,pm=Object.getPrototypeOf,Si=Object.prototype.hasOwnProperty,Ss=Object.prototype.propertyIsEnumerable;var Yt=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),dm=t=>{throw TypeError(t)};var xi=(t,e,r)=>e in t?Ar(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,R=(t,e)=>{for(var r in e||(e={}))Si.call(e,r)&&xi(t,r,e[r]);if(yn)for(var r of yn(e))Ss.call(e,r)&&xi(t,r,e[r]);return t},z=(t,e)=>cm(t,lm(e));var Or=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Z=(t,e)=>{var r={};for(var n in t)Si.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&yn)for(var n of yn(t))e.indexOf(n)<0&&Ss.call(t,n)&&(r[n]=t[n]);return r};var x=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Nt=(t,e)=>{for(var r in e)Ar(t,r,{get:e[r],enumerable:!0})},Es=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of hm(e))!Si.call(t,i)&&i!==r&&Ar(t,i,{get:()=>e[i],enumerable:!(n=fm(e,i))||n.enumerable});return t};var Le=(t,e,r)=>(r=t!=null?um(pm(t)):{},Es(e||!t||!t.__esModule?Ar(r,"default",{value:t,enumerable:!0}):r,t)),mm=t=>Es(Ar({},"__esModule",{value:!0}),t);var Oe=(t,e,r)=>xi(t,typeof e!="symbol"?e+"":e,r);var P=(t,e,r)=>new Promise((n,i)=>{var o=a=>{try{u(r.next(a))}catch(c){i(c)}},s=a=>{try{u(r.throw(a))}catch(c){i(c)}},u=a=>a.done?n(a.value):Promise.resolve(a.value).then(o,s);u((r=r.apply(t,e)).next())}),jt=function(t,e){this[0]=t,this[1]=e},Ei=(t,e,r)=>{var n=(s,u,a,c)=>{try{var l=r[s](u),v=(u=l.value)instanceof jt,y=l.done;Promise.resolve(v?u[0]:u).then(_=>v?n(s==="return"?s:"next",u[1]?{done:_.done,value:_.value}:_,a,c):a({value:_,done:y})).catch(_=>n("throw",_,a,c))}catch(_){c(_)}},i=s=>o[s]=u=>new Promise((a,c)=>n(s,u,a,c)),o={};return r=r.apply(t,e),o[Yt("asyncIterator")]=()=>o,i("next"),i("throw"),i("return"),o},Ai=t=>{var e=t[Yt("asyncIterator")],r=!1,n,i={};return e==null?(e=t[Yt("iterator")](),n=o=>i[o]=s=>e[o](s)):(e=e.call(t),n=o=>i[o]=s=>{if(r){if(r=!1,o==="throw")throw s;return s}return r=!0,{done:!1,value:new jt(new Promise(u=>{var a=e[o](s);a instanceof Object||dm("Object expected"),u(a)}),1)}}),i[Yt("iterator")]=()=>i,n("next"),"throw"in e?n("throw"):i.throw=o=>{throw o},"return"in e&&n("return"),i},As=(t,e,r)=>(e=t[Yt("asyncIterator")])?e.call(t):(t=t[Yt("iterator")](),e={},r=(n,i)=>(i=t[n])&&(e[n]=o=>new Promise((s,u,a)=>(o=i.call(t,o),a=o.done,Promise.resolve(o.value).then(c=>s({value:c,done:a}),u)))),r("next"),r("return"),e);var He=x((mI,la)=>{var Pg=Array.isArray;la.exports=Pg});var Xi=x((gI,ha)=>{var qg=typeof global=="object"&&global&&global.Object===Object&&global;ha.exports=qg});var Qe=x((yI,pa)=>{var Rg=Xi(),Dg=typeof self=="object"&&self&&self.Object===Object&&self,Lg=Rg||Dg||Function("return this")();pa.exports=Lg});var Ut=x((vI,da)=>{var Mg=Qe(),Fg=Mg.Symbol;da.exports=Fg});var va=x((wI,ya)=>{var ma=Ut(),ga=Object.prototype,Ng=ga.hasOwnProperty,jg=ga.toString,$r=ma?ma.toStringTag:void 0;function Bg(t){var e=Ng.call(t,$r),r=t[$r];try{t[$r]=void 0;var n=!0}catch(o){}var i=jg.call(t);return n&&(e?t[$r]=r:delete t[$r]),i}ya.exports=Bg});var _a=x((_I,wa)=>{var Ug=Object.prototype,kg=Ug.toString;function $g(t){return kg.call(t)}wa.exports=$g});var Tt=x((bI,Sa)=>{var ba=Ut(),zg=va(),Hg=_a(),Wg="[object Null]",Kg="[object Undefined]",xa=ba?ba.toStringTag:void 0;function Gg(t){return t==null?t===void 0?Kg:Wg:xa&&xa in Object(t)?zg(t):Hg(t)}Sa.exports=Gg});var et=x((xI,Ea)=>{function Vg(t){return t!=null&&typeof t=="object"}Ea.exports=Vg});var Ln=x((SI,Aa)=>{var Jg=Tt(),Yg=et(),Xg="[object Symbol]";function Zg(t){return typeof t=="symbol"||Yg(t)&&Jg(t)==Xg}Aa.exports=Zg});var Ca=x((EI,Oa)=>{var Qg=He(),e0=Ln(),t0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r0=/^\w*$/;function n0(t,e){if(Qg(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||e0(t)?!0:r0.test(t)||!t0.test(t)||e!=null&&t in Object(e)}Oa.exports=n0});var tt=x((AI,Ta)=>{function i0(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}Ta.exports=i0});var Mn=x((OI,Ia)=>{var o0=Tt(),s0=tt(),a0="[object AsyncFunction]",u0="[object Function]",c0="[object GeneratorFunction]",f0="[object Proxy]";function l0(t){if(!s0(t))return!1;var e=o0(t);return e==u0||e==c0||e==a0||e==f0}Ia.exports=l0});var qa=x((CI,Pa)=>{var h0=Qe(),p0=h0["__core-js_shared__"];Pa.exports=p0});var La=x((TI,Da)=>{var Zi=qa(),Ra=function(){var t=/[^.]+$/.exec(Zi&&Zi.keys&&Zi.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function d0(t){return!!Ra&&Ra in t}Da.exports=d0});var Qi=x((II,Ma)=>{var m0=Function.prototype,g0=m0.toString;function y0(t){if(t!=null){try{return g0.call(t)}catch(e){}try{return t+""}catch(e){}}return""}Ma.exports=y0});var Na=x((PI,Fa)=>{var v0=Mn(),w0=La(),_0=tt(),b0=Qi(),x0=/[\\^$.*+?()[\]{}|]/g,S0=/^\[object .+?Constructor\]$/,E0=Function.prototype,A0=Object.prototype,O0=E0.toString,C0=A0.hasOwnProperty,T0=RegExp("^"+O0.call(C0).replace(x0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function I0(t){if(!_0(t)||w0(t))return!1;var e=v0(t)?T0:S0;return e.test(b0(t))}Fa.exports=I0});var Ba=x((qI,ja)=>{function P0(t,e){return t==null?void 0:t[e]}ja.exports=P0});var It=x((RI,Ua)=>{var q0=Na(),R0=Ba();function D0(t,e){var r=R0(t,e);return q0(r)?r:void 0}Ua.exports=D0});var zr=x((DI,ka)=>{var L0=It(),M0=L0(Object,"create");ka.exports=M0});var Ha=x((LI,za)=>{var $a=zr();function F0(){this.__data__=$a?$a(null):{},this.size=0}za.exports=F0});var Ka=x((MI,Wa)=>{function N0(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}Wa.exports=N0});var Va=x((FI,Ga)=>{var j0=zr(),B0="__lodash_hash_undefined__",U0=Object.prototype,k0=U0.hasOwnProperty;function $0(t){var e=this.__data__;if(j0){var r=e[t];return r===B0?void 0:r}return k0.call(e,t)?e[t]:void 0}Ga.exports=$0});var Ya=x((NI,Ja)=>{var z0=zr(),H0=Object.prototype,W0=H0.hasOwnProperty;function K0(t){var e=this.__data__;return z0?e[t]!==void 0:W0.call(e,t)}Ja.exports=K0});var Za=x((jI,Xa)=>{var G0=zr(),V0="__lodash_hash_undefined__";function J0(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=G0&&e===void 0?V0:e,this}Xa.exports=J0});var eu=x((BI,Qa)=>{var Y0=Ha(),X0=Ka(),Z0=Va(),Q0=Ya(),ey=Za();function ir(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ir.prototype.clear=Y0;ir.prototype.delete=X0;ir.prototype.get=Z0;ir.prototype.has=Q0;ir.prototype.set=ey;Qa.exports=ir});var ru=x((UI,tu)=>{function ty(){this.__data__=[],this.size=0}tu.exports=ty});var or=x((kI,nu)=>{function ry(t,e){return t===e||t!==t&&e!==e}nu.exports=ry});var Hr=x(($I,iu)=>{var ny=or();function iy(t,e){for(var r=t.length;r--;)if(ny(t[r][0],e))return r;return-1}iu.exports=iy});var su=x((zI,ou)=>{var oy=Hr(),sy=Array.prototype,ay=sy.splice;function uy(t){var e=this.__data__,r=oy(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():ay.call(e,r,1),--this.size,!0}ou.exports=uy});var uu=x((HI,au)=>{var cy=Hr();function fy(t){var e=this.__data__,r=cy(e,t);return r<0?void 0:e[r][1]}au.exports=fy});var fu=x((WI,cu)=>{var ly=Hr();function hy(t){return ly(this.__data__,t)>-1}cu.exports=hy});var hu=x((KI,lu)=>{var py=Hr();function dy(t,e){var r=this.__data__,n=py(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}lu.exports=dy});var Wr=x((GI,pu)=>{var my=ru(),gy=su(),yy=uu(),vy=fu(),wy=hu();function sr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}sr.prototype.clear=my;sr.prototype.delete=gy;sr.prototype.get=yy;sr.prototype.has=vy;sr.prototype.set=wy;pu.exports=sr});var Fn=x((VI,du)=>{var _y=It(),by=Qe(),xy=_y(by,"Map");du.exports=xy});var yu=x((JI,gu)=>{var mu=eu(),Sy=Wr(),Ey=Fn();function Ay(){this.size=0,this.__data__={hash:new mu,map:new(Ey||Sy),string:new mu}}gu.exports=Ay});var wu=x((YI,vu)=>{function Oy(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}vu.exports=Oy});var Kr=x((XI,_u)=>{var Cy=wu();function Ty(t,e){var r=t.__data__;return Cy(e)?r[typeof e=="string"?"string":"hash"]:r.map}_u.exports=Ty});var xu=x((ZI,bu)=>{var Iy=Kr();function Py(t){var e=Iy(this,t).delete(t);return this.size-=e?1:0,e}bu.exports=Py});var Eu=x((QI,Su)=>{var qy=Kr();function Ry(t){return qy(this,t).get(t)}Su.exports=Ry});var Ou=x((eP,Au)=>{var Dy=Kr();function Ly(t){return Dy(this,t).has(t)}Au.exports=Ly});var Tu=x((tP,Cu)=>{var My=Kr();function Fy(t,e){var r=My(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}Cu.exports=Fy});var Nn=x((rP,Iu)=>{var Ny=yu(),jy=xu(),By=Eu(),Uy=Ou(),ky=Tu();function ar(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ar.prototype.clear=Ny;ar.prototype.delete=jy;ar.prototype.get=By;ar.prototype.has=Uy;ar.prototype.set=ky;Iu.exports=ar});var Ru=x((nP,qu)=>{var Pu=Nn(),$y="Expected a function";function eo(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError($y);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(eo.Cache||Pu),r}eo.Cache=Pu;qu.exports=eo});var Lu=x((iP,Du)=>{var zy=Ru(),Hy=500;function Wy(t){var e=zy(t,function(n){return r.size===Hy&&r.clear(),n}),r=e.cache;return e}Du.exports=Wy});var Fu=x((oP,Mu)=>{var Ky=Lu(),Gy=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vy=/\\(\\)?/g,Jy=Ky(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Gy,function(r,n,i,o){e.push(i?o.replace(Vy,"$1"):n||r)}),e});Mu.exports=Jy});var Gr=x((sP,Nu)=>{function Yy(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}Nu.exports=Yy});var zu=x((aP,$u)=>{var ju=Ut(),Xy=Gr(),Zy=He(),Qy=Ln(),ev=1/0,Bu=ju?ju.prototype:void 0,Uu=Bu?Bu.toString:void 0;function ku(t){if(typeof t=="string")return t;if(Zy(t))return Xy(t,ku)+"";if(Qy(t))return Uu?Uu.call(t):"";var e=t+"";return e=="0"&&1/t==-ev?"-0":e}$u.exports=ku});var Wu=x((uP,Hu)=>{var tv=zu();function rv(t){return t==null?"":tv(t)}Hu.exports=rv});var Vr=x((cP,Ku)=>{var nv=He(),iv=Ca(),ov=Fu(),sv=Wu();function av(t,e){return nv(t)?t:iv(t,e)?[t]:ov(sv(t))}Ku.exports=av});var jn=x((fP,Gu)=>{var uv=Ln(),cv=1/0;function fv(t){if(typeof t=="string"||uv(t))return t;var e=t+"";return e=="0"&&1/t==-cv?"-0":e}Gu.exports=fv});var to=x((lP,Vu)=>{var lv=Vr(),hv=jn();function pv(t,e){e=lv(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[hv(e[r++])];return r&&r==n?t:void 0}Vu.exports=pv});var Yu=x((hP,Ju)=>{var dv=to();function mv(t,e,r){var n=t==null?void 0:dv(t,e);return n===void 0?r:n}Ju.exports=mv});var ro=x((pP,Xu)=>{var gv=It(),yv=function(){try{var t=gv(Object,"defineProperty");return t({},"",{}),t}catch(e){}}();Xu.exports=yv});var Bn=x((dP,Qu)=>{var Zu=ro();function vv(t,e,r){e=="__proto__"&&Zu?Zu(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}Qu.exports=vv});var Un=x((mP,ec)=>{var wv=Bn(),_v=or(),bv=Object.prototype,xv=bv.hasOwnProperty;function Sv(t,e,r){var n=t[e];(!(xv.call(t,e)&&_v(n,r))||r===void 0&&!(e in t))&&wv(t,e,r)}ec.exports=Sv});var kn=x((gP,tc)=>{var Ev=9007199254740991,Av=/^(?:0|[1-9]\d*)$/;function Ov(t,e){var r=typeof t;return e=e==null?Ev:e,!!e&&(r=="number"||r!="symbol"&&Av.test(t))&&t>-1&&t%1==0&&t<e}tc.exports=Ov});var ic=x((yP,nc)=>{var Cv=Un(),Tv=Vr(),Iv=kn(),rc=tt(),Pv=jn();function qv(t,e,r,n){if(!rc(t))return t;e=Tv(e,t);for(var i=-1,o=e.length,s=o-1,u=t;u!=null&&++i<o;){var a=Pv(e[i]),c=r;if(a==="__proto__"||a==="constructor"||a==="prototype")return t;if(i!=s){var l=u[a];c=n?n(l,a,u):void 0,c===void 0&&(c=rc(l)?l:Iv(e[i+1])?[]:{})}Cv(u,a,c),u=u[a]}return t}nc.exports=qv});var sc=x((vP,oc)=>{var Rv=ic();function Dv(t,e,r){return t==null?t:Rv(t,e,r)}oc.exports=Dv});var uc=x((wP,ac)=>{var Lv="__lodash_hash_undefined__";function Mv(t){return this.__data__.set(t,Lv),this}ac.exports=Mv});var fc=x((_P,cc)=>{function Fv(t){return this.__data__.has(t)}cc.exports=Fv});var zn=x((bP,lc)=>{var Nv=Nn(),jv=uc(),Bv=fc();function $n(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Nv;++e<r;)this.add(t[e])}$n.prototype.add=$n.prototype.push=jv;$n.prototype.has=Bv;lc.exports=$n});var pc=x((xP,hc)=>{function Uv(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}hc.exports=Uv});var mc=x((SP,dc)=>{function kv(t){return t!==t}dc.exports=kv});var yc=x((EP,gc)=>{function $v(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}gc.exports=$v});var wc=x((AP,vc)=>{var zv=pc(),Hv=mc(),Wv=yc();function Kv(t,e,r){return e===e?Wv(t,e,r):zv(t,Hv,r)}vc.exports=Kv});var no=x((OP,_c)=>{var Gv=wc();function Vv(t,e){var r=t==null?0:t.length;return!!r&&Gv(t,e,0)>-1}_c.exports=Vv});var io=x((CP,bc)=>{function Jv(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}bc.exports=Jv});var Hn=x((TP,xc)=>{function Yv(t,e){return t.has(e)}xc.exports=Yv});var oo=x((IP,Sc)=>{var Xv=It(),Zv=Qe(),Qv=Xv(Zv,"Set");Sc.exports=Qv});var Ac=x((PP,Ec)=>{function ew(){}Ec.exports=ew});var Wn=x((qP,Oc)=>{function tw(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}Oc.exports=tw});var Tc=x((RP,Cc)=>{var so=oo(),rw=Ac(),nw=Wn(),iw=1/0,ow=so&&1/nw(new so([,-0]))[1]==iw?function(t){return new so(t)}:rw;Cc.exports=ow});var ao=x((DP,Ic)=>{var sw=zn(),aw=no(),uw=io(),cw=Hn(),fw=Tc(),lw=Wn(),hw=200;function pw(t,e,r){var n=-1,i=aw,o=t.length,s=!0,u=[],a=u;if(r)s=!1,i=uw;else if(o>=hw){var c=e?null:fw(t);if(c)return lw(c);s=!1,i=cw,a=new sw}else a=e?[]:u;e:for(;++n<o;){var l=t[n],v=e?e(l):l;if(l=r||l!==0?l:0,s&&v===v){for(var y=a.length;y--;)if(a[y]===v)continue e;e&&a.push(v),u.push(l)}else i(a,v,r)||(a!==u&&a.push(v),u.push(l))}return u}Ic.exports=pw});var qc=x((LP,Pc)=>{var dw=ao();function mw(t){return t&&t.length?dw(t):[]}Pc.exports=mw});var Jr=x((MP,Rc)=>{function gw(t){return function(e){return t(e)}}Rc.exports=gw});var Mc=x((FP,Lc)=>{var yw=zn(),vw=no(),ww=io(),_w=Gr(),bw=Jr(),Dc=Hn(),xw=Math.min;function Sw(t,e,r){for(var n=r?ww:vw,i=t[0].length,o=t.length,s=o,u=Array(o),a=1/0,c=[];s--;){var l=t[s];s&&e&&(l=_w(l,bw(e))),a=xw(l.length,a),u[s]=!r&&(e||i>=120&&l.length>=120)?new yw(s&&l):void 0}l=t[0];var v=-1,y=u[0];e:for(;++v<i&&c.length<a;){var _=l[v],d=e?e(_):_;if(_=r||_!==0?_:0,!(y?Dc(y,d):n(c,d,r))){for(s=o;--s;){var C=u[s];if(!(C?Dc(C,d):n(t[s],d,r)))continue e}y&&y.push(d),c.push(_)}}return c}Lc.exports=Sw});var Kn=x((NP,Fc)=>{function Ew(t){return t}Fc.exports=Ew});var jc=x((jP,Nc)=>{function Aw(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}Nc.exports=Aw});var uo=x((BP,Uc)=>{var Ow=jc(),Bc=Math.max;function Cw(t,e,r){return e=Bc(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Bc(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var u=Array(e+1);++i<e;)u[i]=n[i];return u[e]=r(s),Ow(t,this,u)}}Uc.exports=Cw});var $c=x((UP,kc)=>{function Tw(t){return function(){return t}}kc.exports=Tw});var Wc=x((kP,Hc)=>{var Iw=$c(),zc=ro(),Pw=Kn(),qw=zc?function(t,e){return zc(t,"toString",{configurable:!0,enumerable:!1,value:Iw(e),writable:!0})}:Pw;Hc.exports=qw});var Gc=x(($P,Kc)=>{var Rw=800,Dw=16,Lw=Date.now;function Mw(t){var e=0,r=0;return function(){var n=Lw(),i=Dw-(n-r);if(r=n,i>0){if(++e>=Rw)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}Kc.exports=Mw});var co=x((zP,Vc)=>{var Fw=Wc(),Nw=Gc(),jw=Nw(Fw);Vc.exports=jw});var Gn=x((HP,Jc)=>{var Bw=Kn(),Uw=uo(),kw=co();function $w(t,e){return kw(Uw(t,e,Bw),t+"")}Jc.exports=$w});var fo=x((WP,Yc)=>{var zw=9007199254740991;function Hw(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=zw}Yc.exports=Hw});var ur=x((KP,Xc)=>{var Ww=Mn(),Kw=fo();function Gw(t){return t!=null&&Kw(t.length)&&!Ww(t)}Xc.exports=Gw});var Vn=x((GP,Zc)=>{var Vw=ur(),Jw=et();function Yw(t){return Jw(t)&&Vw(t)}Zc.exports=Yw});var ef=x((VP,Qc)=>{var Xw=Vn();function Zw(t){return Xw(t)?t:[]}Qc.exports=Zw});var rf=x((JP,tf)=>{var Qw=Gr(),e_=Mc(),t_=Gn(),r_=ef(),n_=t_(function(t){var e=Qw(t,r_);return e.length&&e[0]===t[0]?e_(e):[]});tf.exports=n_});var Yr=x((YP,nf)=>{function i_(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}nf.exports=i_});var sf=x((XP,of)=>{var o_=Tt(),s_=et(),a_="[object Arguments]";function u_(t){return s_(t)&&o_(t)==a_}of.exports=u_});var Xr=x((ZP,cf)=>{var af=sf(),c_=et(),uf=Object.prototype,f_=uf.hasOwnProperty,l_=uf.propertyIsEnumerable,h_=af(function(){return arguments}())?af:function(t){return c_(t)&&f_.call(t,"callee")&&!l_.call(t,"callee")};cf.exports=h_});var pf=x((QP,hf)=>{var ff=Ut(),p_=Xr(),d_=He(),lf=ff?ff.isConcatSpreadable:void 0;function m_(t){return d_(t)||p_(t)||!!(lf&&t&&t[lf])}hf.exports=m_});var Jn=x((eq,mf)=>{var g_=Yr(),y_=pf();function df(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=y_),i||(i=[]);++o<s;){var u=t[o];e>0&&r(u)?e>1?df(u,e-1,r,n,i):g_(i,u):n||(i[i.length]=u)}return i}mf.exports=df});var yf=x((tq,gf)=>{var v_=Jn(),w_=Gn(),__=ao(),b_=Vn(),x_=w_(function(t){return __(v_(t,1,b_,!0))});gf.exports=x_});var wf=x((rq,vf)=>{function S_(t){return function(e,r,n){for(var i=-1,o=Object(e),s=n(e),u=s.length;u--;){var a=s[t?u:++i];if(r(o[a],a,o)===!1)break}return e}}vf.exports=S_});var lo=x((nq,_f)=>{var E_=wf(),A_=E_();_f.exports=A_});var xf=x((iq,bf)=>{function O_(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}bf.exports=O_});var Ef=x((oq,Sf)=>{function C_(){return!1}Sf.exports=C_});var fr=x((Zr,cr)=>{var T_=Qe(),I_=Ef(),Cf=typeof Zr=="object"&&Zr&&!Zr.nodeType&&Zr,Af=Cf&&typeof cr=="object"&&cr&&!cr.nodeType&&cr,P_=Af&&Af.exports===Cf,Of=P_?T_.Buffer:void 0,q_=Of?Of.isBuffer:void 0,R_=q_||I_;cr.exports=R_});var If=x((sq,Tf)=>{var D_=Tt(),L_=fo(),M_=et(),F_="[object Arguments]",N_="[object Array]",j_="[object Boolean]",B_="[object Date]",U_="[object Error]",k_="[object Function]",$_="[object Map]",z_="[object Number]",H_="[object Object]",W_="[object RegExp]",K_="[object Set]",G_="[object String]",V_="[object WeakMap]",J_="[object ArrayBuffer]",Y_="[object DataView]",X_="[object Float32Array]",Z_="[object Float64Array]",Q_="[object Int8Array]",eb="[object Int16Array]",tb="[object Int32Array]",rb="[object Uint8Array]",nb="[object Uint8ClampedArray]",ib="[object Uint16Array]",ob="[object Uint32Array]",xe={};xe[X_]=xe[Z_]=xe[Q_]=xe[eb]=xe[tb]=xe[rb]=xe[nb]=xe[ib]=xe[ob]=!0;xe[F_]=xe[N_]=xe[J_]=xe[j_]=xe[Y_]=xe[B_]=xe[U_]=xe[k_]=xe[$_]=xe[z_]=xe[H_]=xe[W_]=xe[K_]=xe[G_]=xe[V_]=!1;function sb(t){return M_(t)&&L_(t.length)&&!!xe[D_(t)]}Tf.exports=sb});var Yn=x((Qr,lr)=>{var ab=Xi(),Pf=typeof Qr=="object"&&Qr&&!Qr.nodeType&&Qr,en=Pf&&typeof lr=="object"&&lr&&!lr.nodeType&&lr,ub=en&&en.exports===Pf,ho=ub&&ab.process,cb=function(){try{var t=en&&en.require&&en.require("util").types;return t||ho&&ho.binding&&ho.binding("util")}catch(e){}}();lr.exports=cb});var tn=x((aq,Df)=>{var fb=If(),lb=Jr(),qf=Yn(),Rf=qf&&qf.isTypedArray,hb=Rf?lb(Rf):fb;Df.exports=hb});var po=x((uq,Lf)=>{var pb=xf(),db=Xr(),mb=He(),gb=fr(),yb=kn(),vb=tn(),wb=Object.prototype,_b=wb.hasOwnProperty;function bb(t,e){var r=mb(t),n=!r&&db(t),i=!r&&!n&&gb(t),o=!r&&!n&&!i&&vb(t),s=r||n||i||o,u=s?pb(t.length,String):[],a=u.length;for(var c in t)(e||_b.call(t,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||yb(c,a)))&&u.push(c);return u}Lf.exports=bb});var rn=x((cq,Mf)=>{var xb=Object.prototype;function Sb(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||xb;return t===r}Mf.exports=Sb});var mo=x((fq,Ff)=>{function Eb(t,e){return function(r){return t(e(r))}}Ff.exports=Eb});var jf=x((lq,Nf)=>{var Ab=mo(),Ob=Ab(Object.keys,Object);Nf.exports=Ob});var go=x((hq,Bf)=>{var Cb=rn(),Tb=jf(),Ib=Object.prototype,Pb=Ib.hasOwnProperty;function qb(t){if(!Cb(t))return Tb(t);var e=[];for(var r in Object(t))Pb.call(t,r)&&r!="constructor"&&e.push(r);return e}Bf.exports=qb});var nn=x((pq,Uf)=>{var Rb=po(),Db=go(),Lb=ur();function Mb(t){return Lb(t)?Rb(t):Db(t)}Uf.exports=Mb});var $f=x((dq,kf)=>{var Fb=lo(),Nb=nn();function jb(t,e){return t&&Fb(t,e,Nb)}kf.exports=jb});var Hf=x((mq,zf)=>{var Bb=Kn();function Ub(t){return typeof t=="function"?t:Bb}zf.exports=Ub});var Kf=x((gq,Wf)=>{var kb=$f(),$b=Hf();function zb(t,e){return t&&kb(t,$b(e))}Wf.exports=zb});var Vf=x((yq,Gf)=>{var Hb=Tt(),Wb=He(),Kb=et(),Gb="[object String]";function Vb(t){return typeof t=="string"||!Wb(t)&&Kb(t)&&Hb(t)==Gb}Gf.exports=Vb});var Yf=x((vq,Jf)=>{var Jb=It(),Yb=Qe(),Xb=Jb(Yb,"DataView");Jf.exports=Xb});var Zf=x((wq,Xf)=>{var Zb=It(),Qb=Qe(),e4=Zb(Qb,"Promise");Xf.exports=e4});var el=x((_q,Qf)=>{var t4=It(),r4=Qe(),n4=t4(r4,"WeakMap");Qf.exports=n4});var pr=x((bq,al)=>{var yo=Yf(),vo=Fn(),wo=Zf(),_o=oo(),bo=el(),sl=Tt(),hr=Qi(),tl="[object Map]",i4="[object Object]",rl="[object Promise]",nl="[object Set]",il="[object WeakMap]",ol="[object DataView]",o4=hr(yo),s4=hr(vo),a4=hr(wo),u4=hr(_o),c4=hr(bo),kt=sl;(yo&&kt(new yo(new ArrayBuffer(1)))!=ol||vo&&kt(new vo)!=tl||wo&&kt(wo.resolve())!=rl||_o&&kt(new _o)!=nl||bo&&kt(new bo)!=il)&&(kt=function(t){var e=sl(t),r=e==i4?t.constructor:void 0,n=r?hr(r):"";if(n)switch(n){case o4:return ol;case s4:return tl;case a4:return rl;case u4:return nl;case c4:return il}return e});al.exports=kt});var cl=x((xq,ul)=>{var f4=go(),l4=pr(),h4=Xr(),p4=He(),d4=ur(),m4=fr(),g4=rn(),y4=tn(),v4="[object Map]",w4="[object Set]",_4=Object.prototype,b4=_4.hasOwnProperty;function x4(t){if(t==null)return!0;if(d4(t)&&(p4(t)||typeof t=="string"||typeof t.splice=="function"||m4(t)||y4(t)||h4(t)))return!t.length;var e=l4(t);if(e==v4||e==w4)return!t.size;if(g4(t))return!f4(t).length;for(var r in t)if(b4.call(t,r))return!1;return!0}ul.exports=x4});var ll=x((Sq,fl)=>{var S4=Wr();function E4(){this.__data__=new S4,this.size=0}fl.exports=E4});var pl=x((Eq,hl)=>{function A4(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}hl.exports=A4});var ml=x((Aq,dl)=>{function O4(t){return this.__data__.get(t)}dl.exports=O4});var yl=x((Oq,gl)=>{function C4(t){return this.__data__.has(t)}gl.exports=C4});var wl=x((Cq,vl)=>{var T4=Wr(),I4=Fn(),P4=Nn(),q4=200;function R4(t,e){var r=this.__data__;if(r instanceof T4){var n=r.__data__;if(!I4||n.length<q4-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new P4(n)}return r.set(t,e),this.size=r.size,this}vl.exports=R4});var Xn=x((Tq,_l)=>{var D4=Wr(),L4=ll(),M4=pl(),F4=ml(),N4=yl(),j4=wl();function dr(t){var e=this.__data__=new D4(t);this.size=e.size}dr.prototype.clear=L4;dr.prototype.delete=M4;dr.prototype.get=F4;dr.prototype.has=N4;dr.prototype.set=j4;_l.exports=dr});var xl=x((Iq,bl)=>{function B4(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}bl.exports=B4});var xo=x((Pq,Sl)=>{var U4=zn(),k4=xl(),$4=Hn(),z4=1,H4=2;function W4(t,e,r,n,i,o){var s=r&z4,u=t.length,a=e.length;if(u!=a&&!(s&&a>u))return!1;var c=o.get(t),l=o.get(e);if(c&&l)return c==e&&l==t;var v=-1,y=!0,_=r&H4?new U4:void 0;for(o.set(t,e),o.set(e,t);++v<u;){var d=t[v],C=e[v];if(n)var q=s?n(C,d,v,e,t,o):n(d,C,v,t,e,o);if(q!==void 0){if(q)continue;y=!1;break}if(_){if(!k4(e,function(H,X){if(!$4(_,X)&&(d===H||i(d,H,r,n,o)))return _.push(X)})){y=!1;break}}else if(!(d===C||i(d,C,r,n,o))){y=!1;break}}return o.delete(t),o.delete(e),y}Sl.exports=W4});var So=x((qq,El)=>{var K4=Qe(),G4=K4.Uint8Array;El.exports=G4});var Ol=x((Rq,Al)=>{function V4(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}Al.exports=V4});var ql=x((Dq,Pl)=>{var Cl=Ut(),Tl=So(),J4=or(),Y4=xo(),X4=Ol(),Z4=Wn(),Q4=1,ex=2,tx="[object Boolean]",rx="[object Date]",nx="[object Error]",ix="[object Map]",ox="[object Number]",sx="[object RegExp]",ax="[object Set]",ux="[object String]",cx="[object Symbol]",fx="[object ArrayBuffer]",lx="[object DataView]",Il=Cl?Cl.prototype:void 0,Eo=Il?Il.valueOf:void 0;function hx(t,e,r,n,i,o,s){switch(r){case lx:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case fx:return!(t.byteLength!=e.byteLength||!o(new Tl(t),new Tl(e)));case tx:case rx:case ox:return J4(+t,+e);case nx:return t.name==e.name&&t.message==e.message;case sx:case ux:return t==e+"";case ix:var u=X4;case ax:var a=n&Q4;if(u||(u=Z4),t.size!=e.size&&!a)return!1;var c=s.get(t);if(c)return c==e;n|=ex,s.set(t,e);var l=Y4(u(t),u(e),n,i,o,s);return s.delete(t),l;case cx:if(Eo)return Eo.call(t)==Eo.call(e)}return!1}Pl.exports=hx});var Ao=x((Lq,Rl)=>{var px=Yr(),dx=He();function mx(t,e,r){var n=e(t);return dx(t)?n:px(n,r(t))}Rl.exports=mx});var Ll=x((Mq,Dl)=>{function gx(t,e){for(var r=-1,n=t==null?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}Dl.exports=gx});var Oo=x((Fq,Ml)=>{function yx(){return[]}Ml.exports=yx});var Zn=x((Nq,Nl)=>{var vx=Ll(),wx=Oo(),_x=Object.prototype,bx=_x.propertyIsEnumerable,Fl=Object.getOwnPropertySymbols,xx=Fl?function(t){return t==null?[]:(t=Object(t),vx(Fl(t),function(e){return bx.call(t,e)}))}:wx;Nl.exports=xx});var Co=x((jq,jl)=>{var Sx=Ao(),Ex=Zn(),Ax=nn();function Ox(t){return Sx(t,Ax,Ex)}jl.exports=Ox});var kl=x((Bq,Ul)=>{var Bl=Co(),Cx=1,Tx=Object.prototype,Ix=Tx.hasOwnProperty;function Px(t,e,r,n,i,o){var s=r&Cx,u=Bl(t),a=u.length,c=Bl(e),l=c.length;if(a!=l&&!s)return!1;for(var v=a;v--;){var y=u[v];if(!(s?y in e:Ix.call(e,y)))return!1}var _=o.get(t),d=o.get(e);if(_&&d)return _==e&&d==t;var C=!0;o.set(t,e),o.set(e,t);for(var q=s;++v<a;){y=u[v];var H=t[y],X=e[y];if(n)var j=s?n(X,H,y,e,t,o):n(H,X,y,t,e,o);if(!(j===void 0?H===X||i(H,X,r,n,o):j)){C=!1;break}q||(q=y=="constructor")}if(C&&!q){var te=t.constructor,J=e.constructor;te!=J&&"constructor"in t&&"constructor"in e&&!(typeof te=="function"&&te instanceof te&&typeof J=="function"&&J instanceof J)&&(C=!1)}return o.delete(t),o.delete(e),C}Ul.exports=Px});var Jl=x((Uq,Vl)=>{var To=Xn(),qx=xo(),Rx=ql(),Dx=kl(),$l=pr(),zl=He(),Hl=fr(),Lx=tn(),Mx=1,Wl="[object Arguments]",Kl="[object Array]",Qn="[object Object]",Fx=Object.prototype,Gl=Fx.hasOwnProperty;function Nx(t,e,r,n,i,o){var s=zl(t),u=zl(e),a=s?Kl:$l(t),c=u?Kl:$l(e);a=a==Wl?Qn:a,c=c==Wl?Qn:c;var l=a==Qn,v=c==Qn,y=a==c;if(y&&Hl(t)){if(!Hl(e))return!1;s=!0,l=!1}if(y&&!l)return o||(o=new To),s||Lx(t)?qx(t,e,r,n,i,o):Rx(t,e,a,r,n,i,o);if(!(r&Mx)){var _=l&&Gl.call(t,"__wrapped__"),d=v&&Gl.call(e,"__wrapped__");if(_||d){var C=_?t.value():t,q=d?e.value():e;return o||(o=new To),i(C,q,r,n,o)}}return y?(o||(o=new To),Dx(t,e,r,n,i,o)):!1}Vl.exports=Nx});var Ql=x((kq,Zl)=>{var jx=Jl(),Yl=et();function Xl(t,e,r,n,i){return t===e?!0:t==null||e==null||!Yl(t)&&!Yl(e)?t!==t&&e!==e:jx(t,e,r,n,Xl,i)}Zl.exports=Xl});var th=x(($q,eh)=>{var Bx=Ql();function Ux(t,e){return Bx(t,e)}eh.exports=Ux});var Io=x((zq,rh)=>{var kx=Bn(),$x=or();function zx(t,e,r){(r!==void 0&&!$x(t[e],r)||r===void 0&&!(e in t))&&kx(t,e,r)}rh.exports=zx});var Po=x((on,mr)=>{var Hx=Qe(),sh=typeof on=="object"&&on&&!on.nodeType&&on,nh=sh&&typeof mr=="object"&&mr&&!mr.nodeType&&mr,Wx=nh&&nh.exports===sh,ih=Wx?Hx.Buffer:void 0,oh=ih?ih.allocUnsafe:void 0;function Kx(t,e){if(e)return t.slice();var r=t.length,n=oh?oh(r):new t.constructor(r);return t.copy(n),n}mr.exports=Kx});var ei=x((Hq,uh)=>{var ah=So();function Gx(t){var e=new t.constructor(t.byteLength);return new ah(e).set(new ah(t)),e}uh.exports=Gx});var qo=x((Wq,ch)=>{var Vx=ei();function Jx(t,e){var r=e?Vx(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}ch.exports=Jx});var ti=x((Kq,fh)=>{function Yx(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}fh.exports=Yx});var ph=x((Gq,hh)=>{var Xx=tt(),lh=Object.create,Zx=function(){function t(){}return function(e){if(!Xx(e))return{};if(lh)return lh(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();hh.exports=Zx});var ri=x((Vq,dh)=>{var Qx=mo(),eS=Qx(Object.getPrototypeOf,Object);dh.exports=eS});var Ro=x((Jq,mh)=>{var tS=ph(),rS=ri(),nS=rn();function iS(t){return typeof t.constructor=="function"&&!nS(t)?tS(rS(t)):{}}mh.exports=iS});var Do=x((Yq,yh)=>{var oS=Tt(),sS=ri(),aS=et(),uS="[object Object]",cS=Function.prototype,fS=Object.prototype,gh=cS.toString,lS=fS.hasOwnProperty,hS=gh.call(Object);function pS(t){if(!aS(t)||oS(t)!=uS)return!1;var e=sS(t);if(e===null)return!0;var r=lS.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&gh.call(r)==hS}yh.exports=pS});var Lo=x((Xq,vh)=>{function dS(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}vh.exports=dS});var $t=x((Zq,wh)=>{var mS=Un(),gS=Bn();function yS(t,e,r,n){var i=!r;r||(r={});for(var o=-1,s=e.length;++o<s;){var u=e[o],a=n?n(r[u],t[u],u,r,t):void 0;a===void 0&&(a=t[u]),i?gS(r,u,a):mS(r,u,a)}return r}wh.exports=yS});var bh=x((Qq,_h)=>{function vS(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}_h.exports=vS});var Sh=x((eR,xh)=>{var wS=tt(),_S=rn(),bS=bh(),xS=Object.prototype,SS=xS.hasOwnProperty;function ES(t){if(!wS(t))return bS(t);var e=_S(t),r=[];for(var n in t)n=="constructor"&&(e||!SS.call(t,n))||r.push(n);return r}xh.exports=ES});var gr=x((tR,Eh)=>{var AS=po(),OS=Sh(),CS=ur();function TS(t){return CS(t)?AS(t,!0):OS(t)}Eh.exports=TS});var Oh=x((rR,Ah)=>{var IS=$t(),PS=gr();function qS(t){return IS(t,PS(t))}Ah.exports=qS});var Rh=x((nR,qh)=>{var Ch=Io(),RS=Po(),DS=qo(),LS=ti(),MS=Ro(),Th=Xr(),Ih=He(),FS=Vn(),NS=fr(),jS=Mn(),BS=tt(),US=Do(),kS=tn(),Ph=Lo(),$S=Oh();function zS(t,e,r,n,i,o,s){var u=Ph(t,r),a=Ph(e,r),c=s.get(a);if(c){Ch(t,r,c);return}var l=o?o(u,a,r+"",t,e,s):void 0,v=l===void 0;if(v){var y=Ih(a),_=!y&&NS(a),d=!y&&!_&&kS(a);l=a,y||_||d?Ih(u)?l=u:FS(u)?l=LS(u):_?(v=!1,l=RS(a,!0)):d?(v=!1,l=DS(a,!0)):l=[]:US(a)||Th(a)?(l=u,Th(u)?l=$S(u):(!BS(u)||jS(u))&&(l=MS(a))):v=!1}v&&(s.set(a,l),i(l,a,n,o,s),s.delete(a)),Ch(t,r,l)}qh.exports=zS});var Mh=x((iR,Lh)=>{var HS=Xn(),WS=Io(),KS=lo(),GS=Rh(),VS=tt(),JS=gr(),YS=Lo();function Dh(t,e,r,n,i){t!==e&&KS(e,function(o,s){if(i||(i=new HS),VS(o))GS(t,e,s,r,Dh,n,i);else{var u=n?n(YS(t,s),o,s+"",t,e,i):void 0;u===void 0&&(u=o),WS(t,s,u)}},JS)}Lh.exports=Dh});var Nh=x((oR,Fh)=>{var XS=or(),ZS=ur(),QS=kn(),eE=tt();function tE(t,e,r){if(!eE(r))return!1;var n=typeof e;return(n=="number"?ZS(r)&&QS(e,r.length):n=="string"&&e in r)?XS(r[e],t):!1}Fh.exports=tE});var Bh=x((sR,jh)=>{var rE=Gn(),nE=Nh();function iE(t){return rE(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,s&&nE(r[0],r[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var u=r[n];u&&t(e,u,n,o)}return e})}jh.exports=iE});var kh=x((aR,Uh)=>{var oE=Mh(),sE=Bh(),aE=sE(function(t,e,r){oE(t,e,r)});Uh.exports=aE});var Mo=x((uR,$h)=>{function uE(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}$h.exports=uE});var Hh=x((cR,zh)=>{function cE(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}zh.exports=cE});var Kh=x((fR,Wh)=>{var fE=$t(),lE=nn();function hE(t,e){return t&&fE(e,lE(e),t)}Wh.exports=hE});var Vh=x((lR,Gh)=>{var pE=$t(),dE=gr();function mE(t,e){return t&&pE(e,dE(e),t)}Gh.exports=mE});var Yh=x((hR,Jh)=>{var gE=$t(),yE=Zn();function vE(t,e){return gE(t,yE(t),e)}Jh.exports=vE});var Fo=x((pR,Xh)=>{var wE=Yr(),_E=ri(),bE=Zn(),xE=Oo(),SE=Object.getOwnPropertySymbols,EE=SE?function(t){for(var e=[];t;)wE(e,bE(t)),t=_E(t);return e}:xE;Xh.exports=EE});var Qh=x((dR,Zh)=>{var AE=$t(),OE=Fo();function CE(t,e){return AE(t,OE(t),e)}Zh.exports=CE});var No=x((mR,ep)=>{var TE=Ao(),IE=Fo(),PE=gr();function qE(t){return TE(t,PE,IE)}ep.exports=qE});var rp=x((gR,tp)=>{var RE=Object.prototype,DE=RE.hasOwnProperty;function LE(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&DE.call(t,"index")&&(r.index=t.index,r.input=t.input),r}tp.exports=LE});var ip=x((yR,np)=>{var ME=ei();function FE(t,e){var r=e?ME(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}np.exports=FE});var sp=x((vR,op)=>{var NE=/\w*$/;function jE(t){var e=new t.constructor(t.source,NE.exec(t));return e.lastIndex=t.lastIndex,e}op.exports=jE});var lp=x((wR,fp)=>{var ap=Ut(),up=ap?ap.prototype:void 0,cp=up?up.valueOf:void 0;function BE(t){return cp?Object(cp.call(t)):{}}fp.exports=BE});var pp=x((_R,hp)=>{var UE=ei(),kE=ip(),$E=sp(),zE=lp(),HE=qo(),WE="[object Boolean]",KE="[object Date]",GE="[object Map]",VE="[object Number]",JE="[object RegExp]",YE="[object Set]",XE="[object String]",ZE="[object Symbol]",QE="[object ArrayBuffer]",eA="[object DataView]",tA="[object Float32Array]",rA="[object Float64Array]",nA="[object Int8Array]",iA="[object Int16Array]",oA="[object Int32Array]",sA="[object Uint8Array]",aA="[object Uint8ClampedArray]",uA="[object Uint16Array]",cA="[object Uint32Array]";function fA(t,e,r){var n=t.constructor;switch(e){case QE:return UE(t);case WE:case KE:return new n(+t);case eA:return kE(t,r);case tA:case rA:case nA:case iA:case oA:case sA:case aA:case uA:case cA:return HE(t,r);case GE:return new n;case VE:case XE:return new n(t);case JE:return $E(t);case YE:return new n;case ZE:return zE(t)}}hp.exports=fA});var mp=x((bR,dp)=>{var lA=pr(),hA=et(),pA="[object Map]";function dA(t){return hA(t)&&lA(t)==pA}dp.exports=dA});var wp=x((xR,vp)=>{var mA=mp(),gA=Jr(),gp=Yn(),yp=gp&&gp.isMap,yA=yp?gA(yp):mA;vp.exports=yA});var bp=x((SR,_p)=>{var vA=pr(),wA=et(),_A="[object Set]";function bA(t){return wA(t)&&vA(t)==_A}_p.exports=bA});var Ap=x((ER,Ep)=>{var xA=bp(),SA=Jr(),xp=Yn(),Sp=xp&&xp.isSet,EA=Sp?SA(Sp):xA;Ep.exports=EA});var Pp=x((AR,Ip)=>{var AA=Xn(),OA=Hh(),CA=Un(),TA=Kh(),IA=Vh(),PA=Po(),qA=ti(),RA=Yh(),DA=Qh(),LA=Co(),MA=No(),FA=pr(),NA=rp(),jA=pp(),BA=Ro(),UA=He(),kA=fr(),$A=wp(),zA=tt(),HA=Ap(),WA=nn(),KA=gr(),GA=1,VA=2,JA=4,Op="[object Arguments]",YA="[object Array]",XA="[object Boolean]",ZA="[object Date]",QA="[object Error]",Cp="[object Function]",e1="[object GeneratorFunction]",t1="[object Map]",r1="[object Number]",Tp="[object Object]",n1="[object RegExp]",i1="[object Set]",o1="[object String]",s1="[object Symbol]",a1="[object WeakMap]",u1="[object ArrayBuffer]",c1="[object DataView]",f1="[object Float32Array]",l1="[object Float64Array]",h1="[object Int8Array]",p1="[object Int16Array]",d1="[object Int32Array]",m1="[object Uint8Array]",g1="[object Uint8ClampedArray]",y1="[object Uint16Array]",v1="[object Uint32Array]",be={};be[Op]=be[YA]=be[u1]=be[c1]=be[XA]=be[ZA]=be[f1]=be[l1]=be[h1]=be[p1]=be[d1]=be[t1]=be[r1]=be[Tp]=be[n1]=be[i1]=be[o1]=be[s1]=be[m1]=be[g1]=be[y1]=be[v1]=!0;be[QA]=be[Cp]=be[a1]=!1;function ni(t,e,r,n,i,o){var s,u=e&GA,a=e&VA,c=e&JA;if(r&&(s=i?r(t,n,i,o):r(t)),s!==void 0)return s;if(!zA(t))return t;var l=UA(t);if(l){if(s=NA(t),!u)return qA(t,s)}else{var v=FA(t),y=v==Cp||v==e1;if(kA(t))return PA(t,u);if(v==Tp||v==Op||y&&!i){if(s=a||y?{}:BA(t),!u)return a?DA(t,IA(s,t)):RA(t,TA(s,t))}else{if(!be[v])return i?t:{};s=jA(t,v,u)}}o||(o=new AA);var _=o.get(t);if(_)return _;o.set(t,s),HA(t)?t.forEach(function(q){s.add(ni(q,e,r,q,t,o))}):$A(t)&&t.forEach(function(q,H){s.set(H,ni(q,e,r,H,t,o))});var d=c?a?MA:LA:a?KA:WA,C=l?void 0:d(t);return OA(C||t,function(q,H){C&&(H=q,q=t[H]),CA(s,H,ni(q,e,r,H,t,o))}),s}Ip.exports=ni});var Rp=x((OR,qp)=>{function w1(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o}qp.exports=w1});var Lp=x((CR,Dp)=>{var _1=to(),b1=Rp();function x1(t,e){return e.length<2?t:_1(t,b1(e,0,-1))}Dp.exports=x1});var Fp=x((TR,Mp)=>{var S1=Vr(),E1=Mo(),A1=Lp(),O1=jn();function C1(t,e){return e=S1(e,t),t=A1(t,e),t==null||delete t[O1(E1(e))]}Mp.exports=C1});var jp=x((IR,Np)=>{var T1=Do();function I1(t){return T1(t)?void 0:t}Np.exports=I1});var Up=x((PR,Bp)=>{var P1=Jn();function q1(t){var e=t==null?0:t.length;return e?P1(t,1):[]}Bp.exports=q1});var $p=x((qR,kp)=>{var R1=Up(),D1=uo(),L1=co();function M1(t){return L1(D1(t,void 0,R1),t+"")}kp.exports=M1});var Hp=x((RR,zp)=>{var F1=Gr(),N1=Pp(),j1=Fp(),B1=Vr(),U1=$t(),k1=jp(),$1=$p(),z1=No(),H1=1,W1=2,K1=4,G1=$1(function(t,e){var r={};if(t==null)return r;var n=!1;e=F1(e,function(o){return o=B1(o,t),n||(n=o.length>1),o}),U1(t,z1(t),r),n&&(r=N1(r,H1|W1|K1,k1));for(var i=e.length;i--;)j1(r,e[i]);return r});zp.exports=G1});var Kp=x((DR,Wp)=>{var V1=Yr(),J1=Jn(),Y1=ti(),X1=He();function Z1(){var t=arguments.length;if(!t)return[];for(var e=Array(t-1),r=arguments[0],n=t;n--;)e[n-1]=arguments[n];return V1(X1(r)?Y1(r):[r],J1(e,1))}Wp.exports=Z1});var pd=x((hd,ts)=>{(function(t){if(typeof hd=="object"&&typeof ts!="undefined")ts.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window!="undefined"?e=window:typeof global!="undefined"?e=global:typeof self!="undefined"?e=self:e=this,e.localforage=t()}})(function(){var t,e,r;return function n(i,o,s){function u(l,v){if(!o[l]){if(!i[l]){var y=typeof Or=="function"&&Or;if(!v&&y)return y(l,!0);if(a)return a(l,!0);var _=new Error("Cannot find module '"+l+"'");throw _.code="MODULE_NOT_FOUND",_}var d=o[l]={exports:{}};i[l][0].call(d.exports,function(C){var q=i[l][1][C];return u(q||C)},d,d.exports,n,i,o,s)}return o[l].exports}for(var a=typeof Or=="function"&&Or,c=0;c<s.length;c++)u(s[c]);return u}({1:[function(n,i,o){(function(s){"use strict";var u=s.MutationObserver||s.WebKitMutationObserver,a;if(u){var c=0,l=new u(C),v=s.document.createTextNode("");l.observe(v,{characterData:!0}),a=function(){v.data=c=++c%2}}else if(!s.setImmediate&&typeof s.MessageChannel!="undefined"){var y=new s.MessageChannel;y.port1.onmessage=C,a=function(){y.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?a=function(){var H=s.document.createElement("script");H.onreadystatechange=function(){C(),H.onreadystatechange=null,H.parentNode.removeChild(H),H=null},s.document.documentElement.appendChild(H)}:a=function(){setTimeout(C,0)};var _,d=[];function C(){_=!0;for(var H,X,j=d.length;j;){for(X=d,d=[],H=-1;++H<j;)X[H]();j=d.length}_=!1}i.exports=q;function q(H){d.push(H)===1&&!_&&a()}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(n,i,o){"use strict";var s=n(1);function u(){}var a={},c=["REJECTED"],l=["FULFILLED"],v=["PENDING"];i.exports=y;function y(O){if(typeof O!="function")throw new TypeError("resolver must be a function");this.state=v,this.queue=[],this.outcome=void 0,O!==u&&q(this,O)}y.prototype.catch=function(O){return this.then(null,O)},y.prototype.then=function(O,re){if(typeof O!="function"&&this.state===l||typeof re!="function"&&this.state===c)return this;var Y=new this.constructor(u);if(this.state!==v){var he=this.state===l?O:re;d(Y,he,this.outcome)}else this.queue.push(new _(Y,O,re));return Y};function _(O,re,Y){this.promise=O,typeof re=="function"&&(this.onFulfilled=re,this.callFulfilled=this.otherCallFulfilled),typeof Y=="function"&&(this.onRejected=Y,this.callRejected=this.otherCallRejected)}_.prototype.callFulfilled=function(O){a.resolve(this.promise,O)},_.prototype.otherCallFulfilled=function(O){d(this.promise,this.onFulfilled,O)},_.prototype.callRejected=function(O){a.reject(this.promise,O)},_.prototype.otherCallRejected=function(O){d(this.promise,this.onRejected,O)};function d(O,re,Y){s(function(){var he;try{he=re(Y)}catch(qe){return a.reject(O,qe)}he===O?a.reject(O,new TypeError("Cannot resolve promise with itself")):a.resolve(O,he)})}a.resolve=function(O,re){var Y=H(C,re);if(Y.status==="error")return a.reject(O,Y.value);var he=Y.value;if(he)q(O,he);else{O.state=l,O.outcome=re;for(var qe=-1,we=O.queue.length;++qe<we;)O.queue[qe].callFulfilled(re)}return O},a.reject=function(O,re){O.state=c,O.outcome=re;for(var Y=-1,he=O.queue.length;++Y<he;)O.queue[Y].callRejected(re);return O};function C(O){var re=O&&O.then;if(O&&(typeof O=="object"||typeof O=="function")&&typeof re=="function")return function(){re.apply(O,arguments)}}function q(O,re){var Y=!1;function he(Ne){Y||(Y=!0,a.reject(O,Ne))}function qe(Ne){Y||(Y=!0,a.resolve(O,Ne))}function we(){re(qe,he)}var ke=H(we);ke.status==="error"&&he(ke.value)}function H(O,re){var Y={};try{Y.value=O(re),Y.status="success"}catch(he){Y.status="error",Y.value=he}return Y}y.resolve=X;function X(O){return O instanceof this?O:a.resolve(new this(u),O)}y.reject=j;function j(O){var re=new this(u);return a.reject(re,O)}y.all=te;function te(O){var re=this;if(Object.prototype.toString.call(O)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Y=O.length,he=!1;if(!Y)return this.resolve([]);for(var qe=new Array(Y),we=0,ke=-1,Ne=new this(u);++ke<Y;)Je(O[ke],ke);return Ne;function Je(Et,Dt){re.resolve(Et).then(Ke,function(At){he||(he=!0,a.reject(Ne,At))});function Ke(At){qe[Dt]=At,++we===Y&&!he&&(he=!0,a.resolve(Ne,qe))}}}y.race=J;function J(O){var re=this;if(Object.prototype.toString.call(O)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Y=O.length,he=!1;if(!Y)return this.resolve([]);for(var qe=-1,we=new this(u);++qe<Y;)ke(O[qe]);return we;function ke(Ne){re.resolve(Ne).then(function(Je){he||(he=!0,a.resolve(we,Je))},function(Je){he||(he=!0,a.reject(we,Je))})}}},{1:1}],3:[function(n,i,o){(function(s){"use strict";typeof s.Promise!="function"&&(s.Promise=n(2))}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{2:2}],4:[function(n,i,o){"use strict";var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};function u(f,w){if(!(f instanceof w))throw new TypeError("Cannot call a class as a function")}function a(){try{if(typeof indexedDB!="undefined")return indexedDB;if(typeof webkitIndexedDB!="undefined")return webkitIndexedDB;if(typeof mozIndexedDB!="undefined")return mozIndexedDB;if(typeof OIndexedDB!="undefined")return OIndexedDB;if(typeof msIndexedDB!="undefined")return msIndexedDB}catch(f){return}}var c=a();function l(){try{if(!c||!c.open)return!1;var f=typeof openDatabase!="undefined"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),w=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!f||w)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch(h){return!1}}function v(f,w){f=f||[],w=w||{};try{return new Blob(f,w)}catch(b){if(b.name!=="TypeError")throw b;for(var h=typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder,S=new h,E=0;E<f.length;E+=1)S.append(f[E]);return S.getBlob(w.type)}}typeof Promise=="undefined"&&n(3);var y=Promise;function _(f,w){w&&f.then(function(h){w(null,h)},function(h){w(h)})}function d(f,w,h){typeof w=="function"&&f.then(w),typeof h=="function"&&f.catch(h)}function C(f){return typeof f!="string"&&(console.warn(f+" used as a key, but it is not a string."),f=String(f)),f}function q(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var H="local-forage-detect-blob-support",X=void 0,j={},te=Object.prototype.toString,J="readonly",O="readwrite";function re(f){for(var w=f.length,h=new ArrayBuffer(w),S=new Uint8Array(h),E=0;E<w;E++)S[E]=f.charCodeAt(E);return h}function Y(f){return new y(function(w){var h=f.transaction(H,O),S=v([""]);h.objectStore(H).put(S,"key"),h.onabort=function(E){E.preventDefault(),E.stopPropagation(),w(!1)},h.oncomplete=function(){var E=navigator.userAgent.match(/Chrome\/(\d+)/),b=navigator.userAgent.match(/Edge\//);w(b||!E||parseInt(E[1],10)>=43)}}).catch(function(){return!1})}function he(f){return typeof X=="boolean"?y.resolve(X):Y(f).then(function(w){return X=w,X})}function qe(f){var w=j[f.name],h={};h.promise=new y(function(S,E){h.resolve=S,h.reject=E}),w.deferredOperations.push(h),w.dbReady?w.dbReady=w.dbReady.then(function(){return h.promise}):w.dbReady=h.promise}function we(f){var w=j[f.name],h=w.deferredOperations.pop();if(h)return h.resolve(),h.promise}function ke(f,w){var h=j[f.name],S=h.deferredOperations.pop();if(S)return S.reject(w),S.promise}function Ne(f,w){return new y(function(h,S){if(j[f.name]=j[f.name]||g(),f.db)if(w)qe(f),f.db.close();else return h(f.db);var E=[f.name];w&&E.push(f.version);var b=c.open.apply(c,E);w&&(b.onupgradeneeded=function(D){var B=b.result;try{B.createObjectStore(f.storeName),D.oldVersion<=1&&B.createObjectStore(H)}catch(k){if(k.name==="ConstraintError")console.warn('The database "'+f.name+'" has been upgraded from version '+D.oldVersion+" to version "+D.newVersion+', but the storage "'+f.storeName+'" already exists.');else throw k}}),b.onerror=function(D){D.preventDefault(),S(b.error)},b.onsuccess=function(){var D=b.result;D.onversionchange=function(B){B.target.close()},h(D),we(f)}})}function Je(f){return Ne(f,!1)}function Et(f){return Ne(f,!0)}function Dt(f,w){if(!f.db)return!0;var h=!f.db.objectStoreNames.contains(f.storeName),S=f.version<f.db.version,E=f.version>f.db.version;if(S&&(f.version!==w&&console.warn('The database "'+f.name+`" can't be downgraded from version `+f.db.version+" to version "+f.version+"."),f.version=f.db.version),E||h){if(h){var b=f.db.version+1;b>f.version&&(f.version=b)}return!0}return!1}function Ke(f){return new y(function(w,h){var S=new FileReader;S.onerror=h,S.onloadend=function(E){var b=btoa(E.target.result||"");w({__local_forage_encoded_blob:!0,data:b,type:f.type})},S.readAsBinaryString(f)})}function At(f){var w=re(atob(f.data));return v([w],{type:f.type})}function lt(f){return f&&f.__local_forage_encoded_blob}function mi(f){var w=this,h=w._initReady().then(function(){var S=j[w._dbInfo.name];if(S&&S.dbReady)return S.dbReady});return d(h,f,f),h}function p(f){qe(f);for(var w=j[f.name],h=w.forages,S=0;S<h.length;S++){var E=h[S];E._dbInfo.db&&(E._dbInfo.db.close(),E._dbInfo.db=null)}return f.db=null,Je(f).then(function(b){return f.db=b,Dt(f)?Et(f):b}).then(function(b){f.db=w.db=b;for(var D=0;D<h.length;D++)h[D]._dbInfo.db=b}).catch(function(b){throw ke(f,b),b})}function m(f,w,h,S){S===void 0&&(S=1);try{var E=f.db.transaction(f.storeName,w);h(null,E)}catch(b){if(S>0&&(!f.db||b.name==="InvalidStateError"||b.name==="NotFoundError"))return y.resolve().then(function(){if(!f.db||b.name==="NotFoundError"&&!f.db.objectStoreNames.contains(f.storeName)&&f.version<=f.db.version)return f.db&&(f.version=f.db.version+1),Et(f)}).then(function(){return p(f).then(function(){m(f,w,h,S-1)})}).catch(h);h(b)}}function g(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function A(f){var w=this,h={db:null};if(f)for(var S in f)h[S]=f[S];var E=j[h.name];E||(E=g(),j[h.name]=E),E.forages.push(w),w._initReady||(w._initReady=w.ready,w.ready=mi);var b=[];function D(){return y.resolve()}for(var B=0;B<E.forages.length;B++){var k=E.forages[B];k!==w&&b.push(k._initReady().catch(D))}var $=E.forages.slice(0);return y.all(b).then(function(){return h.db=E.db,Je(h)}).then(function(G){return h.db=G,Dt(h,w._defaultConfig.version)?Et(h):G}).then(function(G){h.db=E.db=G,w._dbInfo=h;for(var ne=0;ne<$.length;ne++){var fe=$[ne];fe!==w&&(fe._dbInfo.db=h.db,fe._dbInfo.version=h.version)}})}function I(f,w){var h=this;f=C(f);var S=new y(function(E,b){h.ready().then(function(){m(h._dbInfo,J,function(D,B){if(D)return b(D);try{var k=B.objectStore(h._dbInfo.storeName),$=k.get(f);$.onsuccess=function(){var G=$.result;G===void 0&&(G=null),lt(G)&&(G=At(G)),E(G)},$.onerror=function(){b($.error)}}catch(G){b(G)}})}).catch(b)});return _(S,w),S}function L(f,w){var h=this,S=new y(function(E,b){h.ready().then(function(){m(h._dbInfo,J,function(D,B){if(D)return b(D);try{var k=B.objectStore(h._dbInfo.storeName),$=k.openCursor(),G=1;$.onsuccess=function(){var ne=$.result;if(ne){var fe=ne.value;lt(fe)&&(fe=At(fe));var ge=f(fe,ne.key,G++);ge!==void 0?E(ge):ne.continue()}else E()},$.onerror=function(){b($.error)}}catch(ne){b(ne)}})}).catch(b)});return _(S,w),S}function N(f,w,h){var S=this;f=C(f);var E=new y(function(b,D){var B;S.ready().then(function(){return B=S._dbInfo,te.call(w)==="[object Blob]"?he(B.db).then(function(k){return k?w:Ke(w)}):w}).then(function(k){m(S._dbInfo,O,function($,G){if($)return D($);try{var ne=G.objectStore(S._dbInfo.storeName);k===null&&(k=void 0);var fe=ne.put(k,f);G.oncomplete=function(){k===void 0&&(k=null),b(k)},G.onabort=G.onerror=function(){var ge=fe.error?fe.error:fe.transaction.error;D(ge)}}catch(ge){D(ge)}})}).catch(D)});return _(E,h),E}function F(f,w){var h=this;f=C(f);var S=new y(function(E,b){h.ready().then(function(){m(h._dbInfo,O,function(D,B){if(D)return b(D);try{var k=B.objectStore(h._dbInfo.storeName),$=k.delete(f);B.oncomplete=function(){E()},B.onerror=function(){b($.error)},B.onabort=function(){var G=$.error?$.error:$.transaction.error;b(G)}}catch(G){b(G)}})}).catch(b)});return _(S,w),S}function U(f){var w=this,h=new y(function(S,E){w.ready().then(function(){m(w._dbInfo,O,function(b,D){if(b)return E(b);try{var B=D.objectStore(w._dbInfo.storeName),k=B.clear();D.oncomplete=function(){S()},D.onabort=D.onerror=function(){var $=k.error?k.error:k.transaction.error;E($)}}catch($){E($)}})}).catch(E)});return _(h,f),h}function K(f){var w=this,h=new y(function(S,E){w.ready().then(function(){m(w._dbInfo,J,function(b,D){if(b)return E(b);try{var B=D.objectStore(w._dbInfo.storeName),k=B.count();k.onsuccess=function(){S(k.result)},k.onerror=function(){E(k.error)}}catch($){E($)}})}).catch(E)});return _(h,f),h}function ee(f,w){var h=this,S=new y(function(E,b){if(f<0){E(null);return}h.ready().then(function(){m(h._dbInfo,J,function(D,B){if(D)return b(D);try{var k=B.objectStore(h._dbInfo.storeName),$=!1,G=k.openKeyCursor();G.onsuccess=function(){var ne=G.result;if(!ne){E(null);return}f===0||$?E(ne.key):($=!0,ne.advance(f))},G.onerror=function(){b(G.error)}}catch(ne){b(ne)}})}).catch(b)});return _(S,w),S}function Q(f){var w=this,h=new y(function(S,E){w.ready().then(function(){m(w._dbInfo,J,function(b,D){if(b)return E(b);try{var B=D.objectStore(w._dbInfo.storeName),k=B.openKeyCursor(),$=[];k.onsuccess=function(){var G=k.result;if(!G){S($);return}$.push(G.key),G.continue()},k.onerror=function(){E(k.error)}}catch(G){E(G)}})}).catch(E)});return _(h,f),h}function V(f,w){w=q.apply(this,arguments);var h=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||h.name,f.storeName=f.storeName||h.storeName);var S=this,E;if(!f.name)E=y.reject("Invalid arguments");else{var b=f.name===h.name&&S._dbInfo.db,D=b?y.resolve(S._dbInfo.db):Je(f).then(function(B){var k=j[f.name],$=k.forages;k.db=B;for(var G=0;G<$.length;G++)$[G]._dbInfo.db=B;return B});f.storeName?E=D.then(function(B){if(B.objectStoreNames.contains(f.storeName)){var k=B.version+1;qe(f);var $=j[f.name],G=$.forages;B.close();for(var ne=0;ne<G.length;ne++){var fe=G[ne];fe._dbInfo.db=null,fe._dbInfo.version=k}var ge=new y(function(ye,Te){var Ce=c.open(f.name,k);Ce.onerror=function(Ve){var Er=Ce.result;Er.close(),Te(Ve)},Ce.onupgradeneeded=function(){var Ve=Ce.result;Ve.deleteObjectStore(f.storeName)},Ce.onsuccess=function(){var Ve=Ce.result;Ve.close(),ye(Ve)}});return ge.then(function(ye){$.db=ye;for(var Te=0;Te<G.length;Te++){var Ce=G[Te];Ce._dbInfo.db=ye,we(Ce._dbInfo)}}).catch(function(ye){throw(ke(f,ye)||y.resolve()).catch(function(){}),ye})}}):E=D.then(function(B){qe(f);var k=j[f.name],$=k.forages;B.close();for(var G=0;G<$.length;G++){var ne=$[G];ne._dbInfo.db=null}var fe=new y(function(ge,ye){var Te=c.deleteDatabase(f.name);Te.onerror=function(){var Ce=Te.result;Ce&&Ce.close(),ye(Te.error)},Te.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},Te.onsuccess=function(){var Ce=Te.result;Ce&&Ce.close(),ge(Ce)}});return fe.then(function(ge){k.db=ge;for(var ye=0;ye<$.length;ye++){var Te=$[ye];we(Te._dbInfo)}}).catch(function(ge){throw(ke(f,ge)||y.resolve()).catch(function(){}),ge})})}return _(E,w),E}var ue={_driver:"asyncStorage",_initStorage:A,_support:l(),iterate:L,getItem:I,setItem:N,removeItem:F,clear:U,length:K,key:ee,keys:Q,dropInstance:V};function se(){return typeof openDatabase=="function"}var pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_e="~~local_forage_type~",ve=/^~~local_forage_type~([^~]+)~/,oe="__lfsc__:",ce=oe.length,me="arbf",$e="blob",De="si08",je="ui08",Ye="uic8",Gt="si16",Lt="si32",Vt="ur16",Mt="ui32",mn="fl32",Ft="fl64",ds=ce+me.length,ms=Object.prototype.toString;function gs(f){var w=f.length*.75,h=f.length,S,E=0,b,D,B,k;f[f.length-1]==="="&&(w--,f[f.length-2]==="="&&w--);var $=new ArrayBuffer(w),G=new Uint8Array($);for(S=0;S<h;S+=4)b=pe.indexOf(f[S]),D=pe.indexOf(f[S+1]),B=pe.indexOf(f[S+2]),k=pe.indexOf(f[S+3]),G[E++]=b<<2|D>>4,G[E++]=(D&15)<<4|B>>2,G[E++]=(B&3)<<6|k&63;return $}function gi(f){var w=new Uint8Array(f),h="",S;for(S=0;S<w.length;S+=3)h+=pe[w[S]>>2],h+=pe[(w[S]&3)<<4|w[S+1]>>4],h+=pe[(w[S+1]&15)<<2|w[S+2]>>6],h+=pe[w[S+2]&63];return w.length%3===2?h=h.substring(0,h.length-1)+"=":w.length%3===1&&(h=h.substring(0,h.length-2)+"=="),h}function Ed(f,w){var h="";if(f&&(h=ms.call(f)),f&&(h==="[object ArrayBuffer]"||f.buffer&&ms.call(f.buffer)==="[object ArrayBuffer]")){var S,E=oe;f instanceof ArrayBuffer?(S=f,E+=me):(S=f.buffer,h==="[object Int8Array]"?E+=De:h==="[object Uint8Array]"?E+=je:h==="[object Uint8ClampedArray]"?E+=Ye:h==="[object Int16Array]"?E+=Gt:h==="[object Uint16Array]"?E+=Vt:h==="[object Int32Array]"?E+=Lt:h==="[object Uint32Array]"?E+=Mt:h==="[object Float32Array]"?E+=mn:h==="[object Float64Array]"?E+=Ft:w(new Error("Failed to get type for BinaryArray"))),w(E+gi(S))}else if(h==="[object Blob]"){var b=new FileReader;b.onload=function(){var D=_e+f.type+"~"+gi(this.result);w(oe+$e+D)},b.readAsArrayBuffer(f)}else try{w(JSON.stringify(f))}catch(D){console.error("Couldn't convert value into a JSON string: ",f),w(null,D)}}function Ad(f){if(f.substring(0,ce)!==oe)return JSON.parse(f);var w=f.substring(ds),h=f.substring(ce,ds),S;if(h===$e&&ve.test(w)){var E=w.match(ve);S=E[1],w=w.substring(E[0].length)}var b=gs(w);switch(h){case me:return b;case $e:return v([b],{type:S});case De:return new Int8Array(b);case je:return new Uint8Array(b);case Ye:return new Uint8ClampedArray(b);case Gt:return new Int16Array(b);case Vt:return new Uint16Array(b);case Lt:return new Int32Array(b);case Mt:return new Uint32Array(b);case mn:return new Float32Array(b);case Ft:return new Float64Array(b);default:throw new Error("Unkown type: "+h)}}var yi={serialize:Ed,deserialize:Ad,stringToBuffer:gs,bufferToString:gi};function ys(f,w,h,S){f.executeSql("CREATE TABLE IF NOT EXISTS "+w.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],h,S)}function Od(f){var w=this,h={db:null};if(f)for(var S in f)h[S]=typeof f[S]!="string"?f[S].toString():f[S];var E=new y(function(b,D){try{h.db=openDatabase(h.name,String(h.version),h.description,h.size)}catch(B){return D(B)}h.db.transaction(function(B){ys(B,h,function(){w._dbInfo=h,b()},function(k,$){D($)})},D)});return h.serializer=yi,E}function Ot(f,w,h,S,E,b){f.executeSql(h,S,E,function(D,B){B.code===B.SYNTAX_ERR?D.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[w.storeName],function(k,$){$.rows.length?b(k,B):ys(k,w,function(){k.executeSql(h,S,E,b)},b)},b):b(D,B)},b)}function Cd(f,w){var h=this;f=C(f);var S=new y(function(E,b){h.ready().then(function(){var D=h._dbInfo;D.db.transaction(function(B){Ot(B,D,"SELECT * FROM "+D.storeName+" WHERE key = ? LIMIT 1",[f],function(k,$){var G=$.rows.length?$.rows.item(0).value:null;G&&(G=D.serializer.deserialize(G)),E(G)},function(k,$){b($)})})}).catch(b)});return _(S,w),S}function Td(f,w){var h=this,S=new y(function(E,b){h.ready().then(function(){var D=h._dbInfo;D.db.transaction(function(B){Ot(B,D,"SELECT * FROM "+D.storeName,[],function(k,$){for(var G=$.rows,ne=G.length,fe=0;fe<ne;fe++){var ge=G.item(fe),ye=ge.value;if(ye&&(ye=D.serializer.deserialize(ye)),ye=f(ye,ge.key,fe+1),ye!==void 0){E(ye);return}}E()},function(k,$){b($)})})}).catch(b)});return _(S,w),S}function vs(f,w,h,S){var E=this;f=C(f);var b=new y(function(D,B){E.ready().then(function(){w===void 0&&(w=null);var k=w,$=E._dbInfo;$.serializer.serialize(w,function(G,ne){ne?B(ne):$.db.transaction(function(fe){Ot(fe,$,"INSERT OR REPLACE INTO "+$.storeName+" (key, value) VALUES (?, ?)",[f,G],function(){D(k)},function(ge,ye){B(ye)})},function(fe){if(fe.code===fe.QUOTA_ERR){if(S>0){D(vs.apply(E,[f,k,h,S-1]));return}B(fe)}})})}).catch(B)});return _(b,h),b}function Id(f,w,h){return vs.apply(this,[f,w,h,1])}function Pd(f,w){var h=this;f=C(f);var S=new y(function(E,b){h.ready().then(function(){var D=h._dbInfo;D.db.transaction(function(B){Ot(B,D,"DELETE FROM "+D.storeName+" WHERE key = ?",[f],function(){E()},function(k,$){b($)})})}).catch(b)});return _(S,w),S}function qd(f){var w=this,h=new y(function(S,E){w.ready().then(function(){var b=w._dbInfo;b.db.transaction(function(D){Ot(D,b,"DELETE FROM "+b.storeName,[],function(){S()},function(B,k){E(k)})})}).catch(E)});return _(h,f),h}function Rd(f){var w=this,h=new y(function(S,E){w.ready().then(function(){var b=w._dbInfo;b.db.transaction(function(D){Ot(D,b,"SELECT COUNT(key) as c FROM "+b.storeName,[],function(B,k){var $=k.rows.item(0).c;S($)},function(B,k){E(k)})})}).catch(E)});return _(h,f),h}function Dd(f,w){var h=this,S=new y(function(E,b){h.ready().then(function(){var D=h._dbInfo;D.db.transaction(function(B){Ot(B,D,"SELECT key FROM "+D.storeName+" WHERE id = ? LIMIT 1",[f+1],function(k,$){var G=$.rows.length?$.rows.item(0).key:null;E(G)},function(k,$){b($)})})}).catch(b)});return _(S,w),S}function Ld(f){var w=this,h=new y(function(S,E){w.ready().then(function(){var b=w._dbInfo;b.db.transaction(function(D){Ot(D,b,"SELECT key FROM "+b.storeName,[],function(B,k){for(var $=[],G=0;G<k.rows.length;G++)$.push(k.rows.item(G).key);S($)},function(B,k){E(k)})})}).catch(E)});return _(h,f),h}function Md(f){return new y(function(w,h){f.transaction(function(S){S.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(E,b){for(var D=[],B=0;B<b.rows.length;B++)D.push(b.rows.item(B).name);w({db:f,storeNames:D})},function(E,b){h(b)})},function(S){h(S)})})}function Fd(f,w){w=q.apply(this,arguments);var h=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||h.name,f.storeName=f.storeName||h.storeName);var S=this,E;return f.name?E=new y(function(b){var D;f.name===h.name?D=S._dbInfo.db:D=openDatabase(f.name,"","",0),f.storeName?b({db:D,storeNames:[f.storeName]}):b(Md(D))}).then(function(b){return new y(function(D,B){b.db.transaction(function(k){function $(ge){return new y(function(ye,Te){k.executeSql("DROP TABLE IF EXISTS "+ge,[],function(){ye()},function(Ce,Ve){Te(Ve)})})}for(var G=[],ne=0,fe=b.storeNames.length;ne<fe;ne++)G.push($(b.storeNames[ne]));y.all(G).then(function(){D()}).catch(function(ge){B(ge)})},function(k){B(k)})})}):E=y.reject("Invalid arguments"),_(E,w),E}var Nd={_driver:"webSQLStorage",_initStorage:Od,_support:se(),iterate:Td,getItem:Cd,setItem:Id,removeItem:Pd,clear:qd,length:Rd,key:Dd,keys:Ld,dropInstance:Fd};function jd(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch(f){return!1}}function ws(f,w){var h=f.name+"/";return f.storeName!==w.storeName&&(h+=f.storeName+"/"),h}function Bd(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch(w){return!0}}function Ud(){return!Bd()||localStorage.length>0}function kd(f){var w=this,h={};if(f)for(var S in f)h[S]=f[S];return h.keyPrefix=ws(f,w._defaultConfig),Ud()?(w._dbInfo=h,h.serializer=yi,y.resolve()):y.reject()}function $d(f){var w=this,h=w.ready().then(function(){for(var S=w._dbInfo.keyPrefix,E=localStorage.length-1;E>=0;E--){var b=localStorage.key(E);b.indexOf(S)===0&&localStorage.removeItem(b)}});return _(h,f),h}function zd(f,w){var h=this;f=C(f);var S=h.ready().then(function(){var E=h._dbInfo,b=localStorage.getItem(E.keyPrefix+f);return b&&(b=E.serializer.deserialize(b)),b});return _(S,w),S}function Hd(f,w){var h=this,S=h.ready().then(function(){for(var E=h._dbInfo,b=E.keyPrefix,D=b.length,B=localStorage.length,k=1,$=0;$<B;$++){var G=localStorage.key($);if(G.indexOf(b)===0){var ne=localStorage.getItem(G);if(ne&&(ne=E.serializer.deserialize(ne)),ne=f(ne,G.substring(D),k++),ne!==void 0)return ne}}});return _(S,w),S}function Wd(f,w){var h=this,S=h.ready().then(function(){var E=h._dbInfo,b;try{b=localStorage.key(f)}catch(D){b=null}return b&&(b=b.substring(E.keyPrefix.length)),b});return _(S,w),S}function Kd(f){var w=this,h=w.ready().then(function(){for(var S=w._dbInfo,E=localStorage.length,b=[],D=0;D<E;D++){var B=localStorage.key(D);B.indexOf(S.keyPrefix)===0&&b.push(B.substring(S.keyPrefix.length))}return b});return _(h,f),h}function Gd(f){var w=this,h=w.keys().then(function(S){return S.length});return _(h,f),h}function Vd(f,w){var h=this;f=C(f);var S=h.ready().then(function(){var E=h._dbInfo;localStorage.removeItem(E.keyPrefix+f)});return _(S,w),S}function Jd(f,w,h){var S=this;f=C(f);var E=S.ready().then(function(){w===void 0&&(w=null);var b=w;return new y(function(D,B){var k=S._dbInfo;k.serializer.serialize(w,function($,G){if(G)B(G);else try{localStorage.setItem(k.keyPrefix+f,$),D(b)}catch(ne){(ne.name==="QuotaExceededError"||ne.name==="NS_ERROR_DOM_QUOTA_REACHED")&&B(ne),B(ne)}})})});return _(E,h),E}function Yd(f,w){if(w=q.apply(this,arguments),f=typeof f!="function"&&f||{},!f.name){var h=this.config();f.name=f.name||h.name,f.storeName=f.storeName||h.storeName}var S=this,E;return f.name?E=new y(function(b){f.storeName?b(ws(f,S._defaultConfig)):b(f.name+"/")}).then(function(b){for(var D=localStorage.length-1;D>=0;D--){var B=localStorage.key(D);B.indexOf(b)===0&&localStorage.removeItem(B)}}):E=y.reject("Invalid arguments"),_(E,w),E}var Xd={_driver:"localStorageWrapper",_initStorage:kd,_support:jd(),iterate:Hd,getItem:zd,setItem:Jd,removeItem:Vd,clear:$d,length:Gd,key:Wd,keys:Kd,dropInstance:Yd},Zd=function(w,h){return w===h||typeof w=="number"&&typeof h=="number"&&isNaN(w)&&isNaN(h)},Qd=function(w,h){for(var S=w.length,E=0;E<S;){if(Zd(w[E],h))return!0;E++}return!1},_s=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},Sr={},bs={},Jt={INDEXEDDB:ue,WEBSQL:Nd,LOCALSTORAGE:Xd},em=[Jt.INDEXEDDB._driver,Jt.WEBSQL._driver,Jt.LOCALSTORAGE._driver],gn=["dropInstance"],vi=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(gn),tm={description:"",driver:em.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function rm(f,w){f[w]=function(){var h=arguments;return f.ready().then(function(){return f[w].apply(f,h)})}}function wi(){for(var f=1;f<arguments.length;f++){var w=arguments[f];if(w)for(var h in w)w.hasOwnProperty(h)&&(_s(w[h])?arguments[0][h]=w[h].slice():arguments[0][h]=w[h])}return arguments[0]}var nm=function(){function f(w){u(this,f);for(var h in Jt)if(Jt.hasOwnProperty(h)){var S=Jt[h],E=S._driver;this[h]=E,Sr[E]||this.defineDriver(S)}this._defaultConfig=wi({},tm),this._config=wi({},this._defaultConfig,w),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return f.prototype.config=function(h){if((typeof h=="undefined"?"undefined":s(h))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var S in h){if(S==="storeName"&&(h[S]=h[S].replace(/\W/g,"_")),S==="version"&&typeof h[S]!="number")return new Error("Database version must be a number.");this._config[S]=h[S]}return"driver"in h&&h.driver?this.setDriver(this._config.driver):!0}else return typeof h=="string"?this._config[h]:this._config},f.prototype.defineDriver=function(h,S,E){var b=new y(function(D,B){try{var k=h._driver,$=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!h._driver){B($);return}for(var G=vi.concat("_initStorage"),ne=0,fe=G.length;ne<fe;ne++){var ge=G[ne],ye=!Qd(gn,ge);if((ye||h[ge])&&typeof h[ge]!="function"){B($);return}}var Te=function(){for(var Er=function(sm){return function(){var am=new Error("Method "+sm+" is not implemented by the current driver"),xs=y.reject(am);return _(xs,arguments[arguments.length-1]),xs}},_i=0,om=gn.length;_i<om;_i++){var bi=gn[_i];h[bi]||(h[bi]=Er(bi))}};Te();var Ce=function(Er){Sr[k]&&console.info("Redefining LocalForage driver: "+k),Sr[k]=h,bs[k]=Er,D()};"_support"in h?h._support&&typeof h._support=="function"?h._support().then(Ce,B):Ce(!!h._support):Ce(!0)}catch(Ve){B(Ve)}});return d(b,S,E),b},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(h,S,E){var b=Sr[h]?y.resolve(Sr[h]):y.reject(new Error("Driver not found."));return d(b,S,E),b},f.prototype.getSerializer=function(h){var S=y.resolve(yi);return d(S,h),S},f.prototype.ready=function(h){var S=this,E=S._driverSet.then(function(){return S._ready===null&&(S._ready=S._initDriver()),S._ready});return d(E,h,h),E},f.prototype.setDriver=function(h,S,E){var b=this;_s(h)||(h=[h]);var D=this._getSupportedDrivers(h);function B(){b._config.driver=b.driver()}function k(ne){return b._extend(ne),B(),b._ready=b._initStorage(b._config),b._ready}function $(ne){return function(){var fe=0;function ge(){for(;fe<ne.length;){var ye=ne[fe];return fe++,b._dbInfo=null,b._ready=null,b.getDriver(ye).then(k).catch(ge)}B();var Te=new Error("No available storage method found.");return b._driverSet=y.reject(Te),b._driverSet}return ge()}}var G=this._driverSet!==null?this._driverSet.catch(function(){return y.resolve()}):y.resolve();return this._driverSet=G.then(function(){var ne=D[0];return b._dbInfo=null,b._ready=null,b.getDriver(ne).then(function(fe){b._driver=fe._driver,B(),b._wrapLibraryMethodsWithReady(),b._initDriver=$(D)})}).catch(function(){B();var ne=new Error("No available storage method found.");return b._driverSet=y.reject(ne),b._driverSet}),d(this._driverSet,S,E),this._driverSet},f.prototype.supports=function(h){return!!bs[h]},f.prototype._extend=function(h){wi(this,h)},f.prototype._getSupportedDrivers=function(h){for(var S=[],E=0,b=h.length;E<b;E++){var D=h[E];this.supports(D)&&S.push(D)}return S},f.prototype._wrapLibraryMethodsWithReady=function(){for(var h=0,S=vi.length;h<S;h++)rm(this,vi[h])},f.prototype.createInstance=function(h){return new f(h)},f}(),im=new nm;i.exports=im},{3:3}]},{},[4])(4)})});var cs=x((us,yd)=>{"use strict";(function(t,e,r){let n;(n=r.define)&&n.amd?n([],function(){return e}):(n=r.modules)?n[t.toLowerCase()]=e:typeof us=="object"?yd.exports=e:r[t]=e})("FlexSearch",function t(e){function r(p,m){let g=m?m.id:p&&p.id;this.id=g||g===0?g:Je++,this.init(p,m),u(this,"index",function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].c):Object.keys(this.c)}),u(this,"length",function(){return this.index.length})}function n(p,m,g,A){return this.u!==this.g&&(this.o=this.o.concat(g),this.u++,A&&this.o.length>=A&&(this.u=this.g),this.u===this.g&&(this.cache&&this.j.set(m,this.o),this.F&&this.F(this.o))),this}function i(p){let m=Y();for(let g in p)if(p.hasOwnProperty(g)){let A=p[g];j(A)?m[g]=A.slice(0):J(A)?m[g]=i(A):m[g]=A}return m}function o(p,m){let g=p.length,A=te(m),I=[];for(let L=0,N=0;L<g;L++){let F=p[L];(A&&m(F)||!A&&!m[F])&&(I[N++]=F)}return I}function s(p,m,g,A,I,L,N,F,U,K){g=H(g,N?0:I,F,L,m,U,K);let ee;if(F&&(F=g.page,ee=g.next,g=g.result),N)m=this.where(N,null,I,g);else{for(m=g,g=this.l,I=m.length,L=Array(I),N=0;N<I;N++)L[N]=g[m[N]];m=L}return g=m,A&&(te(A)||(Ke=A.split(":"),1<Ke.length?A=C:(Ke=Ke[0],A=d)),g.sort(A)),g=q(F,ee,g),this.cache&&this.j.set(p,g),g}function u(p,m,g){Object.defineProperty(p,m,{get:g})}function a(p){return new RegExp(p,"g")}function c(p,m){for(let g=0;g<m.length;g+=2)p=p.replace(m[g],m[g+1]);return p}function l(p,m,g,A,I,L,N,F){return m[g]?m[g]:(I=I?(F-(N||F/1.5))*L+(N||F/1.5)*I:L,m[g]=I,I>=N&&(p=p[F-(I+.5>>0)],p=p[g]||(p[g]=[]),p[p.length]=A),I)}function v(p,m){if(p){let g=Object.keys(p);for(let A=0,I=g.length;A<I;A++){let L=g[A],N=p[L];if(N)for(let F=0,U=N.length;F<U;F++)if(N[F]===m){U===1?delete p[L]:N.splice(F,1);break}else J(N[F])&&v(N[F],m)}}}function y(p){let m="",g="";var A="";for(let I=0;I<p.length;I++){let L=p[I];L!==g&&(I&&L==="h"?(A=A==="a"||A==="e"||A==="i"||A==="o"||A==="u"||A==="y",((g==="a"||g==="e"||g==="i"||g==="o"||g==="u"||g==="y")&&A||g===" ")&&(m+=L)):m+=L),A=I===p.length-1?"":p[I+1],g=L}return m}function _(p,m){return p=p.length-m.length,0>p?1:p?-1:0}function d(p,m){return p=p[Ke],m=m[Ke],p<m?-1:p>m?1:0}function C(p,m){let g=Ke.length;for(let A=0;A<g;A++)p=p[Ke[A]],m=m[Ke[A]];return p<m?-1:p>m?1:0}function q(p,m,g){return p?{page:p,next:m?""+m:null,result:g}:g}function H(p,m,g,A,I,L,N){let F,U=[];if(g===!0){g="0";var K=""}else K=g&&g.split(":");let ee=p.length;if(1<ee){let ve=Y(),oe=[],ce,me;var Q=0,V;let $e;var ue=!0;let De,je=0,Ye,Gt,Lt,Vt;if(K&&(K.length===2?(Lt=K,K=!1):K=Vt=parseInt(K[0],10)),N){for(ce=Y();Q<ee;Q++)if(I[Q]==="not")for(me=p[Q],$e=me.length,V=0;V<$e;V++)ce["@"+me[V]]=1;else Gt=Q+1;if(O(Gt))return q(g,F,U);Q=0}else Ye=X(I)&&I;let Mt;for(;Q<ee;Q++){let mn=Q===(Gt||ee)-1;if(!Ye||!Q)if((V=Ye||I&&I[Q])&&V!=="and")if(V==="or")Mt=!1;else continue;else Mt=L=!0;if(me=p[Q],$e=me.length){if(ue)if(De){var se=De.length;for(V=0;V<se;V++){ue=De[V];var pe="@"+ue;N&&ce[pe]||(ve[pe]=1,L||(U[je++]=ue))}De=null,ue=!1}else{De=me;continue}for(pe=!1,V=0;V<$e;V++){se=me[V];var _e="@"+se;let Ft=L?ve[_e]||0:Q;if(!(!Ft&&!A||N&&ce[_e]||!L&&ve[_e]))if(Ft===Q){if(mn){if((!Vt||--Vt<je)&&(U[je++]=se,m&&je===m))return q(g,je+(K||0),U)}else ve[_e]=Q+1;pe=!0}else A&&(_e=oe[Ft]||(oe[Ft]=[]),_e[_e.length]=se)}if(Mt&&!pe&&!A)break}else if(Mt&&!A)return q(g,F,me)}if(De)if(Q=De.length,N)for(V=K?parseInt(K,10):0;V<Q;V++)p=De[V],ce["@"+p]||(U[je++]=p);else U=De;if(A){for(je=U.length,Lt?(Q=parseInt(Lt[0],10)+1,V=parseInt(Lt[1],10)+1):(Q=oe.length,V=0);Q--;)if(se=oe[Q]){for($e=se.length;V<$e;V++)if(A=se[V],(!N||!ce["@"+A])&&(U[je++]=A,m&&je===m))return q(g,Q+":"+V,U);V=0}}}else!ee||I&&I[0]==="not"||(U=p[0],K&&(K=parseInt(K[0],10)));return m&&(N=U.length,K&&K>N&&(K=0),K=K||0,F=K+m,F<N?U=U.slice(K,F):(F=0,K&&(U=U.slice(K)))),q(g,F,U)}function X(p){return typeof p=="string"}function j(p){return p.constructor===Array}function te(p){return typeof p=="function"}function J(p){return typeof p=="object"}function O(p){return typeof p=="undefined"}function re(p){let m=Array(p);for(let g=0;g<p;g++)m[g]=Y();return m}function Y(){return Object.create(null)}function he(){let p,m;self.onmessage=function(g){if(g=g.data)if(g.search){let A=m.search(g.content,g.threshold?{limit:g.limit,threshold:g.threshold,where:g.where}:g.limit);self.postMessage({id:p,content:g.content,limit:g.limit,result:A})}else g.add?m.add(g.id,g.content):g.update?m.update(g.id,g.content):g.remove?m.remove(g.id):g.clear?m.clear():g.info?(g=m.info(),g.worker=p,console.log(g)):g.register&&(p=g.id,g.options.cache=!1,g.options.async=!1,g.options.worker=!1,m=new Function(g.register.substring(g.register.indexOf("{")+1,g.register.lastIndexOf("}")))(),m=new m(g.options))}}function qe(p,m,g,A){p=e("flexsearch","id"+p,he,function(L){(L=L.data)&&L.result&&A(L.id,L.content,L.result,L.limit,L.where,L.cursor,L.suggest)},m);let I=t.toString();return g.id=m,p.postMessage({register:I,options:g,id:m}),p}let we={encode:"icase",f:"forward",split:/\W+/,cache:!1,async:!1,g:!1,D:!1,a:!1,b:9,threshold:0,depth:0},ke={memory:{encode:"extra",f:"strict",threshold:0,b:1},speed:{encode:"icase",f:"strict",threshold:1,b:3,depth:2},match:{encode:"extra",f:"full",threshold:1,b:3},score:{encode:"extra",f:"strict",threshold:1,b:9,depth:4},balance:{encode:"balance",f:"strict",threshold:0,b:3,depth:3},fast:{encode:"icase",f:"strict",threshold:8,b:9,depth:1}},Ne=[],Je=0,Et={},Dt={};r.create=function(p,m){return new r(p,m)},r.registerMatcher=function(p){for(let m in p)p.hasOwnProperty(m)&&Ne.push(a(m),p[m]);return this},r.registerEncoder=function(p,m){return lt[p]=m.bind(lt),this},r.registerLanguage=function(p,m){return Et[p]=m.filter,Dt[p]=m.stemmer,this},r.encode=function(p,m){return lt[p](m)},r.prototype.init=function(p,m){if(this.v=[],m){var g=m.preset;p=m}else p||(p=we),g=p.preset;if(m={},X(p)?(m=ke[p],p={}):g&&(m=ke[g]),g=p.worker)if(typeof Worker=="undefined")p.worker=!1,this.m=null;else{var A=parseInt(g,10)||4;this.C=-1,this.u=0,this.o=[],this.F=null,this.m=Array(A);for(var I=0;I<A;I++)this.m[I]=qe(this.id,I,p,n.bind(this))}if(this.f=p.tokenize||m.f||this.f||we.f,this.split=O(g=p.split)?this.split||we.split:X(g)?a(g):g,this.D=p.rtl||this.D||we.D,this.async=typeof Promise=="undefined"||O(g=p.async)?this.async||we.async:g,this.g=O(g=p.worker)?this.g||we.g:g,this.threshold=O(g=p.threshold)?m.threshold||this.threshold||we.threshold:g,this.b=O(g=p.resolution)?g=m.b||this.b||we.b:g,g<=this.threshold&&(this.b=this.threshold+1),this.depth=this.f!=="strict"||O(g=p.depth)?m.depth||this.depth||we.depth:g,this.w=(g=O(g=p.encode)?m.encode||we.encode:g)&&lt[g]&&lt[g].bind(lt)||(te(g)?g:this.w||!1),(g=p.matcher)&&this.addMatcher(g),g=(m=p.lang)||p.filter){if(X(g)&&(g=Et[g]),j(g)){A=this.w,I=Y();for(var L=0;L<g.length;L++){var N=A?A(g[L]):g[L];I[N]=1}g=I}this.filter=g}if(g=m||p.stemmer){var F;m=X(g)?Dt[g]:g,A=this.w,I=[];for(F in m)m.hasOwnProperty(F)&&(L=A?A(F):F,I.push(a(L+"($|\\W)"),A?A(m[F]):m[F]));this.stemmer=F=I}if(this.a=I=(g=p.doc)?i(g):this.a||we.a,this.i=re(this.b-(this.threshold||0)),this.h=Y(),this.c=Y(),I){if(this.l=Y(),p.doc=null,F=I.index={},m=I.keys=[],A=I.field,L=I.tag,N=I.store,j(I.id)||(I.id=I.id.split(":")),N){var U=Y();if(X(N))U[N]=1;else if(j(N))for(let K=0;K<N.length;K++)U[N[K]]=1;else J(N)&&(U=N);I.store=U}if(L){if(this.G=Y(),N=Y(),A)if(X(A))N[A]=p;else if(j(A))for(U=0;U<A.length;U++)N[A[U]]=p;else J(A)&&(N=A);for(j(L)||(I.tag=L=[L]),A=0;A<L.length;A++)this.G[L[A]]=Y();this.I=L,A=N}if(A){let K;for(j(A)||(J(A)?(K=A,I.field=A=Object.keys(A)):I.field=A=[A]),I=0;I<A.length;I++)L=A[I],j(L)||(K&&(p=K[L]),m[I]=L,A[I]=L.split(":")),F[L]=new r(p)}p.doc=g}return this.B=!0,this.j=(this.cache=g=O(g=p.cache)?this.cache||we.cache:g)?new mi(g):!1,this},r.prototype.encode=function(p){return p&&(Ne.length&&(p=c(p,Ne)),this.v.length&&(p=c(p,this.v)),this.w&&(p=this.w(p)),this.stemmer&&(p=c(p,this.stemmer))),p},r.prototype.addMatcher=function(p){let m=this.v;for(let g in p)p.hasOwnProperty(g)&&m.push(a(g),p[g]);return this},r.prototype.add=function(p,m,g,A,I){if(this.a&&J(p))return this.A("add",p,m);if(m&&X(m)&&(p||p===0)){var L="@"+p;if(this.c[L]&&!A)return this.update(p,m);if(this.g)return++this.C>=this.m.length&&(this.C=0),this.m[this.C].postMessage({add:!0,id:p,content:m}),this.c[L]=""+this.C,g&&g(),this;if(!I){if(this.async&&typeof importScripts!="function"){let oe=this;if(L=new Promise(function(ce){setTimeout(function(){oe.add(p,m,null,A,!0),oe=null,ce()})}),g)L.then(g);else return L;return this}if(g)return this.add(p,m,null,A,!0),g(),this}if(m=this.encode(m),!m.length)return this;g=this.f,I=te(g)?g(m):m.split(this.split),this.filter&&(I=o(I,this.filter));let Q=Y();Q._ctx=Y();let V=I.length,ue=this.threshold,se=this.depth,pe=this.b,_e=this.i,ve=this.D;for(let oe=0;oe<V;oe++){var N=I[oe];if(N){var F=N.length,U=(ve?oe+1:V-oe)/V,K="";switch(g){case"reverse":case"both":for(var ee=F;--ee;)K=N[ee]+K,l(_e,Q,K,p,ve?1:(F-ee)/F,U,ue,pe-1);K="";case"forward":for(ee=0;ee<F;ee++)K+=N[ee],l(_e,Q,K,p,ve?(ee+1)/F:1,U,ue,pe-1);break;case"full":for(ee=0;ee<F;ee++){let ce=(ve?ee+1:F-ee)/F;for(let me=F;me>ee;me--)K=N.substring(ee,me),l(_e,Q,K,p,ce,U,ue,pe-1)}break;default:if(F=l(_e,Q,N,p,1,U,ue,pe-1),se&&1<V&&F>=ue)for(F=Q._ctx[N]||(Q._ctx[N]=Y()),N=this.h[N]||(this.h[N]=re(pe-(ue||0))),U=oe-se,K=oe+se+1,0>U&&(U=0),K>V&&(K=V);U<K;U++)U!==oe&&l(N,F,I[U],p,0,pe-(U<oe?oe-U:U-oe),ue,pe-1)}}}this.c[L]=1,this.B=!1}return this},r.prototype.A=function(p,m,g){if(j(m)){var A=m.length;if(A--){for(var I=0;I<A;I++)this.A(p,m[I]);return this.A(p,m[A],g)}}else{var L=this.a.index,N=this.a.keys,F=this.a.tag;I=this.a.store;var U,K=this.a.id;A=m;for(var ee=0;ee<K.length;ee++)A=A[K[ee]];if(p==="remove"&&(delete this.l[A],K=N.length,K--)){for(m=0;m<K;m++)L[N[m]].remove(A);return L[N[K]].remove(A,g)}if(F){for(U=0;U<F.length;U++){var Q=F[U],V=m;for(K=Q.split(":"),ee=0;ee<K.length;ee++)V=V[K[ee]];V="@"+V}U=this.G[Q],U=U[V]||(U[V]=[])}K=this.a.field;for(let ue=0,se=K.length;ue<se;ue++){for(Q=K[ue],F=m,V=0;V<Q.length;V++)F=F[Q[V]];Q=L[N[ue]],V=p==="add"?Q.add:Q.update,ue===se-1?V.call(Q,A,F,g):V.call(Q,A,F)}if(I){for(g=Object.keys(I),p=Y(),L=0;L<g.length;L++)if(N=g[L],I[N]){N=N.split(":");let ue,se;for(K=0;K<N.length;K++)F=N[K],ue=(ue||m)[F],se=(se||p)[F]=ue}m=p}U&&(U[U.length]=m),this.l[A]=m}return this},r.prototype.update=function(p,m,g){return this.a&&J(p)?this.A("update",p,m):(this.c["@"+p]&&X(m)&&(this.remove(p),this.add(p,m,g,!0)),this)},r.prototype.remove=function(p,m,g){if(this.a&&J(p))return this.A("remove",p,m);var A="@"+p;if(this.c[A]){if(this.g)return this.m[this.c[A]].postMessage({remove:!0,id:p}),delete this.c[A],m&&m(),this;if(!g){if(this.async&&typeof importScripts!="function"){let I=this;if(A=new Promise(function(L){setTimeout(function(){I.remove(p,null,!0),I=null,L()})}),m)A.then(m);else return A;return this}if(m)return this.remove(p,null,!0),m(),this}for(m=0;m<this.b-(this.threshold||0);m++)v(this.i[m],p);this.depth&&v(this.h,p),delete this.c[A],this.B=!1}return this};let Ke;r.prototype.search=function(p,m,g,A){if(J(m)){if(j(m))for(var I=0;I<m.length;I++)m[I].query=p;else m.query=p;p=m,m=1e3}else m&&te(m)?(g=m,m=1e3):m||m===0||(m=1e3);if(this.g){this.F=g,this.u=0,this.o=[];for(var L=0;L<this.g;L++)this.m[L].postMessage({search:!0,limit:m,content:p})}else{var N=[],F=p;if(J(p)&&!j(p)){g||(g=p.callback)&&(F.callback=null);var U=p.sort,K=p.page;m=p.limit,L=p.threshold;var ee=p.suggest;p=p.query}if(this.a){L=this.a.index;let ve=F.where;var Q=F.bool||"or",V=F.field;let oe=Q,ce,me;if(V)j(V)||(V=[V]);else if(j(F)){var ue=F;V=[],oe=[];for(var se=0;se<F.length;se++)A=F[se],I=A.bool||Q,V[se]=A.field,oe[se]=I,I==="not"?ce=!0:I==="and"&&(me=!0)}else V=this.a.keys;for(Q=V.length,se=0;se<Q;se++)ue&&(F=ue[se]),K&&!X(F)&&(F.page=null,F.limit=0),N[se]=L[V[se]].search(F,0);if(g)return g(s.call(this,p,oe,N,U,m,ee,ve,K,me,ce));if(this.async){let $e=this;return new Promise(function(De){Promise.all(N).then(function(je){De(s.call($e,p,oe,je,U,m,ee,ve,K,me,ce))})})}return s.call(this,p,oe,N,U,m,ee,ve,K,me,ce)}if(L||(L=this.threshold||0),!A){if(this.async&&typeof importScripts!="function"){let ve=this;if(L=new Promise(function(oe){setTimeout(function(){oe(ve.search(F,m,null,!0)),ve=null})}),g)L.then(g);else return L;return this}if(g)return g(this.search(F,m,null,!0)),this}if(!p||!X(p))return N;if(F=p,this.cache)if(this.B){if(g=this.j.get(p))return g}else this.j.clear(),this.B=!0;if(F=this.encode(F),!F.length)return N;g=this.f,g=te(g)?g(F):F.split(this.split),this.filter&&(g=o(g,this.filter)),ue=g.length,A=!0,I=[];var pe=Y(),_e=0;if(1<ue&&(this.depth&&this.f==="strict"?Q=!0:g.sort(_)),!Q||(se=this.h)){let ve=this.b;for(;_e<ue;_e++){let oe=g[_e];if(oe){if(Q){if(!V){if(se[oe])V=oe,pe[oe]=1;else if(!ee)return N}if(ee&&_e===ue-1&&!I.length)Q=!1,oe=V||oe,pe[oe]=0;else if(!V)continue}if(!pe[oe]){let ce=[],me=!1,$e=0,De=Q?se[V]:this.i;if(De){let je;for(let Ye=0;Ye<ve-L;Ye++)(je=De[Ye]&&De[Ye][oe])&&(ce[$e++]=je,me=!0)}if(me)V=oe,I[I.length]=1<$e?ce.concat.apply([],ce):ce[0];else if(!ee){A=!1;break}pe[oe]=1}}}}else A=!1;return A&&(N=H(I,m,K,ee)),this.cache&&this.j.set(p,N),N}},r.prototype.find=function(p,m){return this.where(p,m,1)[0]||null},r.prototype.where=function(p,m,g,A){let I=this.l,L=[],N=0,F;var U;let K;if(J(p)){g||(g=m);var ee=Object.keys(p),Q=ee.length;if(F=!1,Q===1&&ee[0]==="id")return[I[p.id]];if((U=this.I)&&!A)for(var V=0;V<U.length;V++){var ue=U[V],se=p[ue];if(!O(se)){if(K=this.G[ue]["@"+se],--Q===0)return K;ee.splice(ee.indexOf(ue),1),delete p[ue];break}}for(U=Array(Q),V=0;V<Q;V++)U[V]=ee[V].split(":")}else{if(te(p)){for(m=A||Object.keys(I),g=m.length,ee=0;ee<g;ee++)Q=I[m[ee]],p(Q)&&(L[N++]=Q);return L}if(O(m))return[I[p]];if(p==="id")return[I[m]];ee=[p],Q=1,U=[p.split(":")],F=!0}for(A=K||A||Object.keys(I),V=A.length,ue=0;ue<V;ue++){se=K?A[ue]:I[A[ue]];let pe=!0;for(let _e=0;_e<Q;_e++){F||(m=p[ee[_e]]);let ve=U[_e],oe=ve.length,ce=se;if(1<oe)for(let me=0;me<oe;me++)ce=ce[ve[me]];else ce=ce[ve[0]];if(ce!==m){pe=!1;break}}if(pe&&(L[N++]=se,g&&N===g))break}return L},r.prototype.info=function(){if(this.g)for(let p=0;p<this.g;p++)this.m[p].postMessage({info:!0,id:this.id});else return{id:this.id,items:this.length,cache:this.cache&&this.cache.s?this.cache.s.length:!1,matcher:Ne.length+(this.v?this.v.length:0),worker:this.g,threshold:this.threshold,depth:this.depth,resolution:this.b,contextual:this.depth&&this.f==="strict"}},r.prototype.clear=function(){return this.destroy().init()},r.prototype.destroy=function(){if(this.cache&&(this.j.clear(),this.j=null),this.i=this.h=this.c=null,this.a){let p=this.a.keys;for(let m=0;m<p.length;m++)this.a.index[p[m]].destroy();this.a=this.l=null}return this},r.prototype.export=function(p){let m=!p||O(p.serialize)||p.serialize;if(this.a){let A=!p||O(p.doc)||p.doc;var g=!p||O(p.index)||p.index;p=[];let I=0;if(g)for(g=this.a.keys;I<g.length;I++){let L=this.a.index[g[I]];p[I]=[L.i,L.h,Object.keys(L.c)]}A&&(p[I]=this.l)}else p=[this.i,this.h,Object.keys(this.c)];return m&&(p=JSON.stringify(p)),p},r.prototype.import=function(p,m){(!m||O(m.serialize)||m.serialize)&&(p=JSON.parse(p));let g=Y();if(this.a){var A=!m||O(m.doc)||m.doc,I=0;if(!m||O(m.index)||m.index){m=this.a.keys;let N=m.length;for(var L=p[0][2];I<L.length;I++)g[L[I]]=1;for(I=0;I<N;I++){L=this.a.index[m[I]];let F=p[I];F&&(L.i=F[0],L.h=F[1],L.c=g)}}A&&(this.l=J(A)?A:p[I])}else{for(A=p[2],I=0;I<A.length;I++)g[A[I]]=1;this.i=p[0],this.h=p[1],this.c=g}};let At=function(){let p=a("\\s+"),m=a("[^a-z0-9 ]"),g=[a("[-/]")," ",m,"",p," "];return function(A){return y(c(A.toLowerCase(),g))}}(),lt={icase:function(p){return p.toLowerCase()},simple:function(){let p=a("\\s+"),m=a("[^a-z0-9 ]"),g=a("[-/]"),A=a("[\xE0\xE1\xE2\xE3\xE4\xE5]"),I=a("[\xE8\xE9\xEA\xEB]"),L=a("[\xEC\xED\xEE\xEF]"),N=a("[\xF2\xF3\xF4\xF5\xF6\u0151]"),F=a("[\xF9\xFA\xFB\xFC\u0171]"),U=a("[\xFD\u0177\xFF]"),K=a("\xF1"),ee=a("[\xE7c]"),Q=a("\xDF"),V=a(" & "),ue=[A,"a",I,"e",L,"i",N,"o",F,"u",U,"y",K,"n",ee,"k",Q,"s",V," and ",g," ",m,"",p," "];return function(se){return se=c(se.toLowerCase(),ue),se===" "?"":se}}(),advanced:function(){let p=a("ae"),m=a("ai"),g=a("ay"),A=a("ey"),I=a("oe"),L=a("ue"),N=a("ie"),F=a("sz"),U=a("zs"),K=a("ck"),ee=a("cc"),Q=a("sh"),V=a("th"),ue=a("dt"),se=a("ph"),pe=a("pf"),_e=a("ou"),ve=a("uo"),oe=[p,"a",m,"ei",g,"ei",A,"ei",I,"o",L,"u",N,"i",F,"s",U,"s",Q,"s",K,"k",ee,"k",V,"t",ue,"t",se,"f",pe,"f",_e,"o",ve,"u"];return function(ce,me){return ce&&(ce=this.simple(ce),2<ce.length&&(ce=c(ce,oe)),me||1<ce.length&&(ce=y(ce)),ce)}}(),extra:function(){let p=a("p"),m=a("z"),g=a("[cgq]"),A=a("n"),I=a("d"),L=a("[vw]"),N=a("[aeiouy]"),F=[p,"b",m,"s",g,"k",A,"m",I,"t",L,"f",N,""];return function(U){if(!U)return U;if(U=this.advanced(U,!0),1<U.length){U=U.split(" ");for(let K=0;K<U.length;K++){let ee=U[K];1<ee.length&&(U[K]=ee[0]+c(ee.substring(1),F))}U=U.join(" "),U=y(U)}return U}}(),balance:At},mi=function(){function p(m){this.clear(),this.H=m!==!0&&m}return p.prototype.clear=function(){this.cache=Y(),this.count=Y(),this.index=Y(),this.s=[]},p.prototype.set=function(m,g){if(this.H&&O(this.cache[m])){let A=this.s.length;if(A===this.H){A--;let I=this.s[A];delete this.cache[I],delete this.count[I],delete this.index[I]}this.index[m]=A,this.s[A]=m,this.count[m]=-1,this.cache[m]=g,this.get(m)}else this.cache[m]=g},p.prototype.get=function(m){let g=this.cache[m];if(this.H&&g){var A=++this.count[m];let L=this.index,N=L[m];if(0<N){let F=this.s;for(var I=N;this.count[F[--N]]<=A&&N!==-1;);if(N++,N!==I){for(A=I;A>N;A--)I=F[A-1],F[A]=I,L[I]=A;F[N]=m,L[m]=N}}}return g},p}();return r}(function(){let t={},e=typeof Blob!="undefined"&&typeof URL!="undefined"&&URL.createObjectURL;return function(r,n,i,o,s){return i=e?URL.createObjectURL(new Blob(["("+i.toString()+")()"],{type:"text/javascript"})):r+".min.js",r+="-"+n,t[r]||(t[r]=[]),t[r][s]=new Worker(i),t[r][s].onmessage=o,t[r][s]}}()),us)});var $O={};Nt($O,{BaseProvider:()=>le,CocodaSDK:()=>xr,ConceptApiProvider:()=>it,LabelSearchSuggestionProvider:()=>gt,LobidApiProvider:()=>bt,LocApiProvider:()=>vt,LocalMappingsProvider:()=>Rt,MappingsApiProvider:()=>nt,MyCoReProvider:()=>xt,NoTApiProvider:()=>St,OccurrencesApiProvider:()=>mt,ReconciliationApiProvider:()=>ct,SkohubProvider:()=>wt,SkosmosApiProvider:()=>yt,addAllProviders:()=>kO,cdk:()=>Sd,errors:()=>Be,utils:()=>Wt});var Be={};Nt(Be,{BackendError:()=>Tr,BackendUnavailableError:()=>Ir,CDKError:()=>Me,InvalidOrMissingParameterError:()=>W,InvalidProviderError:()=>Xt,InvalidRequestError:()=>ot,MethodNotImplementedError:()=>Cr,MissingApiUrlError:()=>ze,NetworkError:()=>Pr});var Me=class extends Error{constructor({message:e="",relatedError:r=null,code:n=null}={}){!e&&r&&r.message&&(e=r.message),super(e),this.name=this.constructor.name,this.relatedError=r,this.code=n}},Cr=class extends Me{constructor(i){var o=i,{method:e,message:r=""}=o,n=Z(o,["method","message"]);n.message=`Method not implemented: ${e} (${r})`,super(n)}},W=class extends Me{constructor(i){var o=i,{parameter:e,message:r=""}=o,n=Z(o,["parameter","message"]);n.message=`Invalid or missing parameter: ${e} (${r})`,super(n)}},ot=class extends Me{},Tr=class extends Me{},Ir=class extends Me{},Pr=class extends Me{},ze=class extends Me{},Xt=class extends Me{};function qr(t,e){return function(){return t.apply(e,arguments)}}var{toString:gm}=Object.prototype,{getPrototypeOf:Ti}=Object,wn=(t=>e=>{let r=gm.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Xe=t=>(t=t.toLowerCase(),e=>wn(e)===t),_n=t=>e=>typeof e===t,{isArray:Zt}=Array,Rr=_n("undefined");function ym(t){return t!==null&&!Rr(t)&&t.constructor!==null&&!Rr(t.constructor)&&Ge(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var Ts=Xe("ArrayBuffer");function vm(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ts(t.buffer),e}var wm=_n("string"),Ge=_n("function"),Is=_n("number"),bn=t=>t!==null&&typeof t=="object",_m=t=>t===!0||t===!1,vn=t=>{if(wn(t)!=="object")return!1;let e=Ti(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},bm=Xe("Date"),xm=Xe("File"),Sm=Xe("Blob"),Em=Xe("FileList"),Am=t=>bn(t)&&Ge(t.pipe),Om=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ge(t.append)&&((e=wn(t))==="formdata"||e==="object"&&Ge(t.toString)&&t.toString()==="[object FormData]"))},Cm=Xe("URLSearchParams"),[Tm,Im,Pm,qm]=["ReadableStream","Request","Response","Headers"].map(Xe),Rm=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Dr(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t=="undefined")return;let n,i;if(typeof t!="object"&&(t=[t]),Zt(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{let o=r?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length,u;for(n=0;n<s;n++)u=o[n],e.call(null,t[u],u,t)}}function Ps(t,e){e=e.toLowerCase();let r=Object.keys(t),n=r.length,i;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}var Bt=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,qs=t=>!Rr(t)&&t!==Bt;function Ci(){let{caseless:t}=qs(this)&&this||{},e={},r=(n,i)=>{let o=t&&Ps(e,i)||i;vn(e[o])&&vn(n)?e[o]=Ci(e[o],n):vn(n)?e[o]=Ci({},n):Zt(n)?e[o]=n.slice():e[o]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Dr(arguments[n],r);return e}var Dm=(t,e,r,{allOwnKeys:n}={})=>(Dr(e,(i,o)=>{r&&Ge(i)?t[o]=qr(i,r):t[o]=i},{allOwnKeys:n}),t),Lm=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Mm=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},Fm=(t,e,r,n)=>{let i,o,s,u={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!n||n(s,t,e))&&!u[s]&&(e[s]=t[s],u[s]=!0);t=r!==!1&&Ti(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Nm=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let n=t.indexOf(e,r);return n!==-1&&n===r},jm=t=>{if(!t)return null;if(Zt(t))return t;let e=t.length;if(!Is(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Bm=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&Ti(Uint8Array)),Um=(t,e)=>{let n=(t&&t[Symbol.iterator]).call(t),i;for(;(i=n.next())&&!i.done;){let o=i.value;e.call(t,o[0],o[1])}},km=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},$m=Xe("HTMLFormElement"),zm=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),Os=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Hm=Xe("RegExp"),Rs=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};Dr(r,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(n[o]=s||i)}),Object.defineProperties(t,n)},Wm=t=>{Rs(t,(e,r)=>{if(Ge(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=t[r];if(Ge(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Km=(t,e)=>{let r={},n=i=>{i.forEach(o=>{r[o]=!0})};return Zt(t)?n(t):n(String(t).split(e)),r},Gm=()=>{},Vm=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Oi="abcdefghijklmnopqrstuvwxyz",Cs="0123456789",Ds={DIGIT:Cs,ALPHA:Oi,ALPHA_DIGIT:Oi+Oi.toUpperCase()+Cs},Jm=(t=16,e=Ds.ALPHA_DIGIT)=>{let r="",{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r};function Ym(t){return!!(t&&Ge(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}var Xm=t=>{let e=new Array(10),r=(n,i)=>{if(bn(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;let o=Zt(n)?[]:{};return Dr(n,(s,u)=>{let a=r(s,i+1);!Rr(a)&&(o[u]=a)}),e[i]=void 0,o}}return n};return r(t,0)},Zm=Xe("AsyncFunction"),Qm=t=>t&&(bn(t)||Ge(t))&&Ge(t.then)&&Ge(t.catch),Ls=((t,e)=>t?setImmediate:e?((r,n)=>(Bt.addEventListener("message",({source:i,data:o})=>{i===Bt&&o===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Bt.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ge(Bt.postMessage)),eg=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Bt):typeof process!="undefined"&&process.nextTick||Ls,T={isArray:Zt,isArrayBuffer:Ts,isBuffer:ym,isFormData:Om,isArrayBufferView:vm,isString:wm,isNumber:Is,isBoolean:_m,isObject:bn,isPlainObject:vn,isReadableStream:Tm,isRequest:Im,isResponse:Pm,isHeaders:qm,isUndefined:Rr,isDate:bm,isFile:xm,isBlob:Sm,isRegExp:Hm,isFunction:Ge,isStream:Am,isURLSearchParams:Cm,isTypedArray:Bm,isFileList:Em,forEach:Dr,merge:Ci,extend:Dm,trim:Rm,stripBOM:Lm,inherits:Mm,toFlatObject:Fm,kindOf:wn,kindOfTest:Xe,endsWith:Nm,toArray:jm,forEachEntry:Um,matchAll:km,isHTMLForm:$m,hasOwnProperty:Os,hasOwnProp:Os,reduceDescriptors:Rs,freezeMethods:Wm,toObjectSet:Km,toCamelCase:zm,noop:Gm,toFiniteNumber:Vm,findKey:Ps,global:Bt,isContextDefined:qs,ALPHABET:Ds,generateString:Jm,isSpecCompliantForm:Ym,toJSONObject:Xm,isAsyncFn:Zm,isThenable:Qm,setImmediate:Ls,asap:eg};function Qt(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}T.inherits(Qt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:T.toJSONObject(this.config),code:this.code,status:this.status}}});var Ms=Qt.prototype,Fs={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Fs[t]={value:t}});Object.defineProperties(Qt,Fs);Object.defineProperty(Ms,"isAxiosError",{value:!0});Qt.from=(t,e,r,n,i,o)=>{let s=Object.create(Ms);return T.toFlatObject(t,s,function(a){return a!==Error.prototype},u=>u!=="isAxiosError"),Qt.call(s,t.message,e,r,n,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};var ae=Qt;var xn=null;function Ii(t){return T.isPlainObject(t)||T.isArray(t)}function js(t){return T.endsWith(t,"[]")?t.slice(0,-2):t}function Ns(t,e,r){return t?t.concat(e).map(function(i,o){return i=js(i),!r&&o?"["+i+"]":i}).join(r?".":""):e}function tg(t){return T.isArray(t)&&!t.some(Ii)}var rg=T.toFlatObject(T,{},null,function(e){return/^is[A-Z]/.test(e)});function ng(t,e,r){if(!T.isObject(t))throw new TypeError("target must be an object");e=e||new(xn||FormData),r=T.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,q){return!T.isUndefined(q[C])});let n=r.metaTokens,i=r.visitor||l,o=r.dots,s=r.indexes,a=(r.Blob||typeof Blob!="undefined"&&Blob)&&T.isSpecCompliantForm(e);if(!T.isFunction(i))throw new TypeError("visitor must be a function");function c(d){if(d===null)return"";if(T.isDate(d))return d.toISOString();if(!a&&T.isBlob(d))throw new ae("Blob is not supported. Use a Buffer instead.");return T.isArrayBuffer(d)||T.isTypedArray(d)?a&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function l(d,C,q){let H=d;if(d&&!q&&typeof d=="object"){if(T.endsWith(C,"{}"))C=n?C:C.slice(0,-2),d=JSON.stringify(d);else if(T.isArray(d)&&tg(d)||(T.isFileList(d)||T.endsWith(C,"[]"))&&(H=T.toArray(d)))return C=js(C),H.forEach(function(j,te){!(T.isUndefined(j)||j===null)&&e.append(s===!0?Ns([C],te,o):s===null?C:C+"[]",c(j))}),!1}return Ii(d)?!0:(e.append(Ns(q,C,o),c(d)),!1)}let v=[],y=Object.assign(rg,{defaultVisitor:l,convertValue:c,isVisitable:Ii});function _(d,C){if(!T.isUndefined(d)){if(v.indexOf(d)!==-1)throw Error("Circular reference detected in "+C.join("."));v.push(d),T.forEach(d,function(H,X){(!(T.isUndefined(H)||H===null)&&i.call(e,H,T.isString(X)?X.trim():X,C,y))===!0&&_(H,C?C.concat(X):[X])}),v.pop()}}if(!T.isObject(t))throw new TypeError("data must be an object");return _(t),e}var Ct=ng;function Bs(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Us(t,e){this._pairs=[],t&&Ct(t,this,e)}var ks=Us.prototype;ks.append=function(e,r){this._pairs.push([e,r])};ks.toString=function(e){let r=e?function(n){return e.call(this,n,Bs)}:Bs;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};var Sn=Us;function ig(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Lr(t,e,r){if(!e)return t;let n=r&&r.encode||ig;T.isFunction(r)&&(r={serialize:r});let i=r&&r.serialize,o;if(i?o=i(e,r):o=T.isURLSearchParams(e)?e.toString():new Sn(e,r).toString(n),o){let s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}var Pi=class{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){T.forEach(this.handlers,function(n){n!==null&&e(n)})}},qi=Pi;var En={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var $s=typeof URLSearchParams!="undefined"?URLSearchParams:Sn;var zs=typeof FormData!="undefined"?FormData:null;var Hs=typeof Blob!="undefined"?Blob:null;var Ws={isBrowser:!0,classes:{URLSearchParams:$s,FormData:zs,Blob:Hs},protocols:["http","https","file","blob","url","data"]};var Li={};Nt(Li,{hasBrowserEnv:()=>Di,hasStandardBrowserEnv:()=>og,hasStandardBrowserWebWorkerEnv:()=>sg,navigator:()=>Ri,origin:()=>ag});var Di=typeof window!="undefined"&&typeof document!="undefined",Ri=typeof navigator=="object"&&navigator||void 0,og=Di&&(!Ri||["ReactNative","NativeScript","NS"].indexOf(Ri.product)<0),sg=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ag=Di&&window.location.href||"http://localhost";var Ee=R(R({},Li),Ws);function Mi(t,e){return Ct(t,new Ee.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,o){return Ee.isNode&&T.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function ug(t){return T.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function cg(t){let e={},r=Object.keys(t),n,i=r.length,o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}function fg(t){function e(r,n,i,o){let s=r[o++];if(s==="__proto__")return!0;let u=Number.isFinite(+s),a=o>=r.length;return s=!s&&T.isArray(i)?i.length:s,a?(T.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!u):((!i[s]||!T.isObject(i[s]))&&(i[s]=[]),e(r,n,i[s],o)&&T.isArray(i[s])&&(i[s]=cg(i[s])),!u)}if(T.isFormData(t)&&T.isFunction(t.entries)){let r={};return T.forEachEntry(t,(n,i)=>{e(ug(n),i,r,0)}),r}return null}var An=fg;function lg(t,e,r){if(T.isString(t))try{return(e||JSON.parse)(t),T.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Fi={transitional:En,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=T.isObject(e);if(o&&T.isHTMLForm(e)&&(e=new FormData(e)),T.isFormData(e))return i?JSON.stringify(An(e)):e;if(T.isArrayBuffer(e)||T.isBuffer(e)||T.isStream(e)||T.isFile(e)||T.isBlob(e)||T.isReadableStream(e))return e;if(T.isArrayBufferView(e))return e.buffer;if(T.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Mi(e,this.formSerializer).toString();if((u=T.isFileList(e))||n.indexOf("multipart/form-data")>-1){let a=this.env&&this.env.FormData;return Ct(u?{"files[]":e}:e,a&&new a,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),lg(e)):e}],transformResponse:[function(e){let r=this.transitional||Fi.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(T.isResponse(e)||T.isReadableStream(e))return e;if(e&&T.isString(e)&&(n&&!this.responseType||i)){let s=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(u){if(s)throw u.name==="SyntaxError"?ae.from(u,ae.ERR_BAD_RESPONSE,this,null,this.response):u}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ee.classes.FormData,Blob:Ee.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};T.forEach(["delete","get","head","post","put","patch"],t=>{Fi.headers[t]={}});var er=Fi;var hg=T.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ks=t=>{let e={},r,n,i;return t&&t.split(`
9
- `).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||e[r]&&hg[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e};var Gs=Symbol("internals");function Mr(t){return t&&String(t).trim().toLowerCase()}function On(t){return t===!1||t==null?t:T.isArray(t)?t.map(On):String(t)}function pg(t){let e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}var dg=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ni(t,e,r,n,i){if(T.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!T.isString(e)){if(T.isString(n))return e.indexOf(n)!==-1;if(T.isRegExp(n))return n.test(e)}}function mg(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function gg(t,e){let r=T.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,o,s){return this[n].call(this,e,i,o,s)},configurable:!0})})}var tr=class{constructor(e){e&&this.set(e)}set(e,r,n){let i=this;function o(u,a,c){let l=Mr(a);if(!l)throw new Error("header name must be a non-empty string");let v=T.findKey(i,l);(!v||i[v]===void 0||c===!0||c===void 0&&i[v]!==!1)&&(i[v||a]=On(u))}let s=(u,a)=>T.forEach(u,(c,l)=>o(c,l,a));if(T.isPlainObject(e)||e instanceof this.constructor)s(e,r);else if(T.isString(e)&&(e=e.trim())&&!dg(e))s(Ks(e),r);else if(T.isHeaders(e))for(let[u,a]of e.entries())o(a,u,n);else e!=null&&o(r,e,n);return this}get(e,r){if(e=Mr(e),e){let n=T.findKey(this,e);if(n){let i=this[n];if(!r)return i;if(r===!0)return pg(i);if(T.isFunction(r))return r.call(this,i,n);if(T.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Mr(e),e){let n=T.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Ni(this,this[n],n,r)))}return!1}delete(e,r){let n=this,i=!1;function o(s){if(s=Mr(s),s){let u=T.findKey(n,s);u&&(!r||Ni(n,n[u],u,r))&&(delete n[u],i=!0)}}return T.isArray(e)?e.forEach(o):o(e),i}clear(e){let r=Object.keys(this),n=r.length,i=!1;for(;n--;){let o=r[n];(!e||Ni(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){let r=this,n={};return T.forEach(this,(i,o)=>{let s=T.findKey(n,o);if(s){r[s]=On(i),delete r[o];return}let u=e?mg(o):String(o).trim();u!==o&&delete r[o],r[u]=On(i),n[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let r=Object.create(null);return T.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&T.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
10
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){let n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){let n=(this[Gs]=this[Gs]={accessors:{}}).accessors,i=this.prototype;function o(s){let u=Mr(s);n[u]||(gg(i,s),n[u]=!0)}return T.isArray(e)?e.forEach(o):o(e),this}};tr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);T.reduceDescriptors(tr.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});T.freezeMethods(tr);var Re=tr;function Fr(t,e){let r=this||er,n=e||r,i=Re.from(n.headers),o=n.data;return T.forEach(t,function(u){o=u.call(r,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Nr(t){return!!(t&&t.__CANCEL__)}function Vs(t,e,r){ae.call(this,t==null?"canceled":t,ae.ERR_CANCELED,e,r),this.name="CanceledError"}T.inherits(Vs,ae,{__CANCEL__:!0});var st=Vs;function jr(t,e,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new ae("Request failed with status code "+r.status,[ae.ERR_BAD_REQUEST,ae.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function ji(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function yg(t,e){t=t||10;let r=new Array(t),n=new Array(t),i=0,o=0,s;return e=e!==void 0?e:1e3,function(a){let c=Date.now(),l=n[o];s||(s=c),r[i]=a,n[i]=c;let v=o,y=0;for(;v!==i;)y+=r[v++],v=v%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),c-s<e)return;let _=l&&c-l;return _?Math.round(y*1e3/_):void 0}}var Js=yg;function vg(t,e){let r=0,n=1e3/e,i,o,s=(c,l=Date.now())=>{r=l,i=null,o&&(clearTimeout(o),o=null),t.apply(null,c)};return[(...c)=>{let l=Date.now(),v=l-r;v>=n?s(c,l):(i=c,o||(o=setTimeout(()=>{o=null,s(i)},n-v)))},()=>i&&s(i)]}var Ys=vg;var rr=(t,e,r=3)=>{let n=0,i=Js(50,250);return Ys(o=>{let s=o.loaded,u=o.lengthComputable?o.total:void 0,a=s-n,c=i(a),l=s<=u;n=s;let v={loaded:s,total:u,progress:u?s/u:void 0,bytes:a,rate:c||void 0,estimated:c&&u&&l?(u-s)/c:void 0,event:o,lengthComputable:u!=null,[e?"download":"upload"]:!0};t(v)},r)},Bi=(t,e)=>{let r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Ui=t=>(...e)=>T.asap(()=>t(...e));var Xs=Ee.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,Ee.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(Ee.origin),Ee.navigator&&/(msie|trident)/i.test(Ee.navigator.userAgent)):()=>!0;var Zs=Ee.hasStandardBrowserEnv?{write(t,e,r,n,i,o){let s=[t+"="+encodeURIComponent(e)];T.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),T.isString(n)&&s.push("path="+n),T.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){let e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ki(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function $i(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Br(t,e){return t&&!ki(e)?$i(t,e):e}var Qs=t=>t instanceof Re?R({},t):t;function Ze(t,e){e=e||{};let r={};function n(c,l,v,y){return T.isPlainObject(c)&&T.isPlainObject(l)?T.merge.call({caseless:y},c,l):T.isPlainObject(l)?T.merge({},l):T.isArray(l)?l.slice():l}function i(c,l,v,y){if(T.isUndefined(l)){if(!T.isUndefined(c))return n(void 0,c,v,y)}else return n(c,l,v,y)}function o(c,l){if(!T.isUndefined(l))return n(void 0,l)}function s(c,l){if(T.isUndefined(l)){if(!T.isUndefined(c))return n(void 0,c)}else return n(void 0,l)}function u(c,l,v){if(v in e)return n(c,l);if(v in t)return n(void 0,c)}let a={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(c,l,v)=>i(Qs(c),Qs(l),v,!0)};return T.forEach(Object.keys(Object.assign({},t,e)),function(l){let v=a[l]||i,y=v(t[l],e[l],l);T.isUndefined(y)&&v!==u||(r[l]=y)}),r}var Cn=t=>{let e=Ze({},t),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:u}=e;e.headers=s=Re.from(s),e.url=Lr(Br(e.baseURL,e.url),t.params,t.paramsSerializer),u&&s.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let a;if(T.isFormData(r)){if(Ee.hasStandardBrowserEnv||Ee.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((a=s.getContentType())!==!1){let[c,...l]=a?a.split(";").map(v=>v.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...l].join("; "))}}if(Ee.hasStandardBrowserEnv&&(n&&T.isFunction(n)&&(n=n(e)),n||n!==!1&&Xs(e.url))){let c=i&&o&&Zs.read(o);c&&s.set(i,c)}return e};var wg=typeof XMLHttpRequest!="undefined",ea=wg&&function(t){return new Promise(function(r,n){let i=Cn(t),o=i.data,s=Re.from(i.headers).normalize(),{responseType:u,onUploadProgress:a,onDownloadProgress:c}=i,l,v,y,_,d;function C(){_&&_(),d&&d(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let q=new XMLHttpRequest;q.open(i.method.toUpperCase(),i.url,!0),q.timeout=i.timeout;function H(){if(!q)return;let j=Re.from("getAllResponseHeaders"in q&&q.getAllResponseHeaders()),J={data:!u||u==="text"||u==="json"?q.responseText:q.response,status:q.status,statusText:q.statusText,headers:j,config:t,request:q};jr(function(re){r(re),C()},function(re){n(re),C()},J),q=null}"onloadend"in q?q.onloadend=H:q.onreadystatechange=function(){!q||q.readyState!==4||q.status===0&&!(q.responseURL&&q.responseURL.indexOf("file:")===0)||setTimeout(H)},q.onabort=function(){q&&(n(new ae("Request aborted",ae.ECONNABORTED,t,q)),q=null)},q.onerror=function(){n(new ae("Network Error",ae.ERR_NETWORK,t,q)),q=null},q.ontimeout=function(){let te=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",J=i.transitional||En;i.timeoutErrorMessage&&(te=i.timeoutErrorMessage),n(new ae(te,J.clarifyTimeoutError?ae.ETIMEDOUT:ae.ECONNABORTED,t,q)),q=null},o===void 0&&s.setContentType(null),"setRequestHeader"in q&&T.forEach(s.toJSON(),function(te,J){q.setRequestHeader(J,te)}),T.isUndefined(i.withCredentials)||(q.withCredentials=!!i.withCredentials),u&&u!=="json"&&(q.responseType=i.responseType),c&&([y,d]=rr(c,!0),q.addEventListener("progress",y)),a&&q.upload&&([v,_]=rr(a),q.upload.addEventListener("progress",v),q.upload.addEventListener("loadend",_)),(i.cancelToken||i.signal)&&(l=j=>{q&&(n(!j||j.type?new st(null,t,q):j),q.abort(),q=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));let X=ji(i.url);if(X&&Ee.protocols.indexOf(X)===-1){n(new ae("Unsupported protocol "+X+":",ae.ERR_BAD_REQUEST,t));return}q.send(o||null)})};var _g=(t,e)=>{let{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i,o=function(c){if(!i){i=!0,u();let l=c instanceof Error?c:this.reason;n.abort(l instanceof ae?l:new st(l instanceof Error?l.message:l))}},s=e&&setTimeout(()=>{s=null,o(new ae(`timeout ${e} of ms exceeded`,ae.ETIMEDOUT))},e),u=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),t=null)};t.forEach(c=>c.addEventListener("abort",o));let{signal:a}=n;return a.unsubscribe=()=>T.asap(u),a}},ta=_g;var bg=function*(t,e){let r=t.byteLength;if(!e||r<e){yield t;return}let n=0,i;for(;n<r;)i=n+e,yield t.slice(n,i),n=i},xg=function(t,e){return Ei(this,null,function*(){try{for(var r=As(Sg(t)),n,i,o;n=!(i=yield new jt(r.next())).done;n=!1){let s=i.value;yield*Ai(bg(s,e))}}catch(i){o=[i]}finally{try{n&&(i=r.return)&&(yield new jt(i.call(r)))}finally{if(o)throw o[0]}}})},Sg=function(t){return Ei(this,null,function*(){if(t[Symbol.asyncIterator]){yield*Ai(t);return}let e=t.getReader();try{for(;;){let{done:r,value:n}=yield new jt(e.read());if(r)break;yield n}}finally{yield new jt(e.cancel())}})},zi=(t,e,r,n)=>{let i=xg(t,e),o=0,s,u=c=>{s||(s=!0,n&&n(c))};return new ReadableStream({pull(c){return P(this,null,function*(){try{let{done:l,value:v}=yield i.next();if(l){u(),c.close();return}let y=v.byteLength;if(r){let _=o+=y;r(_)}c.enqueue(new Uint8Array(v))}catch(l){throw u(l),l}})},cancel(c){return u(c),i.return()}},{highWaterMark:2})};var In=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",na=In&&typeof ReadableStream=="function",Eg=In&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):t=>P(void 0,null,function*(){return new Uint8Array(yield new Response(t).arrayBuffer())})),ia=(t,...e)=>{try{return!!t(...e)}catch(r){return!1}},Ag=na&&ia(()=>{let t=!1,e=new Request(Ee.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),ra=64*1024,Hi=na&&ia(()=>T.isReadableStream(new Response("").body)),Tn={stream:Hi&&(t=>t.body)};In&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Tn[e]&&(Tn[e]=T.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new ae(`Response type '${e}' is not supported`,ae.ERR_NOT_SUPPORT,n)})})})(new Response);var Og=t=>P(void 0,null,function*(){if(t==null)return 0;if(T.isBlob(t))return t.size;if(T.isSpecCompliantForm(t))return(yield new Request(Ee.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(T.isArrayBufferView(t)||T.isArrayBuffer(t))return t.byteLength;if(T.isURLSearchParams(t)&&(t=t+""),T.isString(t))return(yield Eg(t)).byteLength}),Cg=(t,e)=>P(void 0,null,function*(){let r=T.toFiniteNumber(t.getContentLength());return r==null?Og(e):r}),oa=In&&(t=>P(void 0,null,function*(){let{url:e,method:r,data:n,signal:i,cancelToken:o,timeout:s,onDownloadProgress:u,onUploadProgress:a,responseType:c,headers:l,withCredentials:v="same-origin",fetchOptions:y}=Cn(t);c=c?(c+"").toLowerCase():"text";let _=ta([i,o&&o.toAbortSignal()],s),d,C=_&&_.unsubscribe&&(()=>{_.unsubscribe()}),q;try{if(a&&Ag&&r!=="get"&&r!=="head"&&(q=yield Cg(l,n))!==0){let J=new Request(e,{method:"POST",body:n,duplex:"half"}),O;if(T.isFormData(n)&&(O=J.headers.get("content-type"))&&l.setContentType(O),J.body){let[re,Y]=Bi(q,rr(Ui(a)));n=zi(J.body,ra,re,Y)}}T.isString(v)||(v=v?"include":"omit");let H="credentials"in Request.prototype;d=new Request(e,z(R({},y),{signal:_,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:H?v:void 0}));let X=yield fetch(d),j=Hi&&(c==="stream"||c==="response");if(Hi&&(u||j&&C)){let J={};["status","statusText","headers"].forEach(he=>{J[he]=X[he]});let O=T.toFiniteNumber(X.headers.get("content-length")),[re,Y]=u&&Bi(O,rr(Ui(u),!0))||[];X=new Response(zi(X.body,ra,re,()=>{Y&&Y(),C&&C()}),J)}c=c||"text";let te=yield Tn[T.findKey(Tn,c)||"text"](X,t);return!j&&C&&C(),yield new Promise((J,O)=>{jr(J,O,{data:te,headers:Re.from(X.headers),status:X.status,statusText:X.statusText,config:t,request:d})})}catch(H){throw C&&C(),H&&H.name==="TypeError"&&/fetch/i.test(H.message)?Object.assign(new ae("Network Error",ae.ERR_NETWORK,t,d),{cause:H.cause||H}):ae.from(H,H&&H.code,t,d)}}));var Wi={http:xn,xhr:ea,fetch:oa};T.forEach(Wi,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(r){}Object.defineProperty(t,"adapterName",{value:e})}});var sa=t=>`- ${t}`,Tg=t=>T.isFunction(t)||t===null||t===!1,Pn={getAdapter:t=>{t=T.isArray(t)?t:[t];let{length:e}=t,r,n,i={};for(let o=0;o<e;o++){r=t[o];let s;if(n=r,!Tg(r)&&(n=Wi[(s=String(r)).toLowerCase()],n===void 0))throw new ae(`Unknown adapter '${s}'`);if(n)break;i[s||"#"+o]=n}if(!n){let o=Object.entries(i).map(([u,a])=>`adapter ${u} `+(a===!1?"is not supported by the environment":"is not available in the build")),s=e?o.length>1?`since :
11
- `+o.map(sa).join(`
12
- `):" "+sa(o[0]):"as no adapter specified";throw new ae("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:Wi};function Ki(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new st(null,t)}function qn(t){return Ki(t),t.headers=Re.from(t.headers),t.data=Fr.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Pn.getAdapter(t.adapter||er.adapter)(t).then(function(n){return Ki(t),n.data=Fr.call(t,t.transformResponse,n),n.headers=Re.from(n.headers),n},function(n){return Nr(n)||(Ki(t),n&&n.response&&(n.response.data=Fr.call(t,t.transformResponse,n.response),n.response.headers=Re.from(n.response.headers))),Promise.reject(n)})}var Rn="1.7.9";var Dn={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Dn[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var aa={};Dn.transitional=function(e,r,n){function i(o,s){return"[Axios v"+Rn+"] Transitional option '"+o+"'"+s+(n?". "+n:"")}return(o,s,u)=>{if(e===!1)throw new ae(i(s," has been removed"+(r?" in "+r:"")),ae.ERR_DEPRECATED);return r&&!aa[s]&&(aa[s]=!0,console.warn(i(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,s,u):!0}};Dn.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Ig(t,e,r){if(typeof t!="object")throw new ae("options must be an object",ae.ERR_BAD_OPTION_VALUE);let n=Object.keys(t),i=n.length;for(;i-- >0;){let o=n[i],s=e[o];if(s){let u=t[o],a=u===void 0||s(u,o,t);if(a!==!0)throw new ae("option "+o+" must be "+a,ae.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ae("Unknown option "+o,ae.ERR_BAD_OPTION)}}var Ur={assertOptions:Ig,validators:Dn};var at=Ur.validators,nr=class{constructor(e){this.defaults=e,this.interceptors={request:new qi,response:new qi}}request(e,r){return P(this,null,function*(){try{return yield this._request(e,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;let o=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
13
- `+o):n.stack=o}catch(s){}}throw n}})}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Ze(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&Ur.assertOptions(n,{silentJSONParsing:at.transitional(at.boolean),forcedJSONParsing:at.transitional(at.boolean),clarifyTimeoutError:at.transitional(at.boolean)},!1),i!=null&&(T.isFunction(i)?r.paramsSerializer={serialize:i}:Ur.assertOptions(i,{encode:at.function,serialize:at.function},!0)),Ur.assertOptions(r,{baseUrl:at.spelling("baseURL"),withXsrfToken:at.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=o&&T.merge(o.common,o[r.method]);o&&T.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),r.headers=Re.concat(s,o);let u=[],a=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(r)===!1||(a=a&&C.synchronous,u.unshift(C.fulfilled,C.rejected))});let c=[];this.interceptors.response.forEach(function(C){c.push(C.fulfilled,C.rejected)});let l,v=0,y;if(!a){let d=[qn.bind(this),void 0];for(d.unshift.apply(d,u),d.push.apply(d,c),y=d.length,l=Promise.resolve(r);v<y;)l=l.then(d[v++],d[v++]);return l}y=u.length;let _=r;for(v=0;v<y;){let d=u[v++],C=u[v++];try{_=d(_)}catch(q){C.call(this,q);break}}try{l=qn.call(this,_)}catch(d){return Promise.reject(d)}for(v=0,y=c.length;v<y;)l=l.then(c[v++],c[v++]);return l}getUri(e){e=Ze(this.defaults,e);let r=Br(e.baseURL,e.url);return Lr(r,e.params,e.paramsSerializer)}};T.forEach(["delete","get","head","options"],function(e){nr.prototype[e]=function(r,n){return this.request(Ze(n||{},{method:e,url:r,data:(n||{}).data}))}});T.forEach(["post","put","patch"],function(e){function r(n){return function(o,s,u){return this.request(Ze(u||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}nr.prototype[e]=r(),nr.prototype[e+"Form"]=r(!0)});var kr=nr;var Gi=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});let n=this;this.promise.then(i=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o,s=new Promise(u=>{n.subscribe(u),o=u}).then(i);return s.cancel=function(){n.unsubscribe(o)},s},e(function(o,s,u){n.reason||(n.reason=new st(o,s,u),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new t(function(i){e=i}),cancel:e}}},ua=Gi;function Vi(t){return function(r){return t.apply(null,r)}}function Ji(t){return T.isObject(t)&&t.isAxiosError===!0}var Yi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Yi).forEach(([t,e])=>{Yi[e]=t});var ca=Yi;function fa(t){let e=new kr(t),r=qr(kr.prototype.request,e);return T.extend(r,kr.prototype,e,{allOwnKeys:!0}),T.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return fa(Ze(t,i))},r}var Ie=fa(er);Ie.Axios=kr;Ie.CanceledError=st;Ie.CancelToken=ua;Ie.isCancel=Nr;Ie.VERSION=Rn;Ie.toFormData=Ct;Ie.AxiosError=ae;Ie.Cancel=Ie.CanceledError;Ie.all=function(e){return Promise.all(e)};Ie.spread=Vi;Ie.isAxiosError=Ji;Ie.mergeConfig=Ze;Ie.AxiosHeaders=Re;Ie.formToJSON=t=>An(T.isHTMLForm(t)?new FormData(t):t);Ie.getAdapter=Pn.getAdapter;Ie.HttpStatusCode=ca;Ie.default=Ie;var Pe=Ie;var{Axios:ZT,AxiosError:QT,CanceledError:eI,isCancel:tI,CancelToken:rI,VERSION:nI,all:iI,Cancel:oI,isAxiosError:sI,spread:aI,toFormData:uI,AxiosHeaders:cI,HttpStatusCode:fI,formToJSON:lI,getAdapter:hI,mergeConfig:pI}=Pe;var ie=Le(Yu(),1),Ae=Le(sc(),1),Pt=Le(qc(),1),sn=Le(rf(),1),jo=Le(yf(),1),Bo=Le(Kf(),1),Fe=Le(He(),1),an=Le(tt(),1),Se=Le(Vf(),1),Uo=Le(cl(),1),ut=Le(th(),1),Q1=Le(kh(),1),ko=Le(Mo(),1),ht=Le(Hp(),1),$o=Le(Kp(),1);var Ko={};Nt(Ko,{addMappingIdentifiers:()=>Ho,compareMappingContent:()=>eO,compareMappingMembers:()=>tO,compareMappings:()=>ed,mappingContent:()=>Jp,mappingContentIdentifier:()=>Xp,mappingMembers:()=>Yp,mappingMembersIdentifier:()=>Zp});function zo(t){var e=function(te,J){var O=te<<J|te>>>32-J;return O},r=function(te){var J="",O,re;for(O=7;O>=0;O--)re=te>>>O*4&15,J+=re.toString(16);return J},n,i,o,s=new Array(80),u=1732584193,a=4023233417,c=2562383102,l=271733878,v=3285377520,y,_,d,C,q,H;t=unescape(encodeURIComponent(t));var X=t.length,j=[];for(i=0;i<X-3;i+=4)o=t.charCodeAt(i)<<24|t.charCodeAt(i+1)<<16|t.charCodeAt(i+2)<<8|t.charCodeAt(i+3),j.push(o);switch(X%4){case 0:i=2147483648;break;case 1:i=t.charCodeAt(X-1)<<24|8388608;break;case 2:i=t.charCodeAt(X-2)<<24|t.charCodeAt(X-1)<<16|32768;break;case 3:i=t.charCodeAt(X-3)<<24|t.charCodeAt(X-2)<<16|t.charCodeAt(X-1)<<8|128;break}for(j.push(i);j.length%16!==14;)j.push(0);for(j.push(X>>>29),j.push(X<<3&4294967295),n=0;n<j.length;n+=16){for(i=0;i<16;i++)s[i]=j[n+i];for(i=16;i<=79;i++)s[i]=e(s[i-3]^s[i-8]^s[i-14]^s[i-16],1);for(y=u,_=a,d=c,C=l,q=v,i=0;i<=19;i++)H=e(y,5)+(_&d|~_&C)+q+s[i]+1518500249&4294967295,q=C,C=d,d=e(_,30),_=y,y=H;for(i=20;i<=39;i++)H=e(y,5)+(_^d^C)+q+s[i]+1859775393&4294967295,q=C,C=d,d=e(_,30),_=y,y=H;for(i=40;i<=59;i++)H=e(y,5)+(_&d|_&C|d&C)+q+s[i]+2400959708&4294967295,q=C,C=d,d=e(_,30),_=y,y=H;for(i=60;i<=79;i++)H=e(y,5)+(_^d^C)+q+s[i]+3395469782&4294967295,q=C,C=d,d=e(_,30),_=y,y=H;u=u+y&4294967295,a=a+_&4294967295,c=c+d&4294967295,l=l+C&4294967295,v=v+q&4294967295}return H=r(u)+r(a)+r(c)+r(l)+r(v),H.toLowerCase()}function Vp(t){return t.map(e=>e&&e.uri).filter(Boolean)}function Wo(t){return["memberSet","memberList","memberChoice"].find(e=>t[e])}function Gp(t){let e=Wo(t),r=t[e]?Vp(t[e]):[];return{[r.length>1?e:"memberSet"]:r.map(n=>({uri:n}))}}function Jp(t){let{from:e,to:r,type:n}=t,i={from:Gp(e||{}),to:Gp(r||{}),type:[n&&n[0]||"http://www.w3.org/2004/02/skos/core#mappingRelation"]};for(let o of["from","to"])if((i[o][Wo(i[o])]||[]).length==0){let s=t[o+"Scheme"];s&&s.uri&&(i[o+"Scheme"]={uri:s.uri})}return i}function Yp(t){let{from:e,to:r}=t,n=[e,r].filter(Boolean).map(i=>Vp(i[Wo(i)]||[]));return[].concat(...n).sort()}function Xp(t){let e=JSON.stringify(Jp(t),["from","fromScheme","to","toScheme","type","memberSet","memberList","memberChoice","uri"]);return"urn:jskos:mapping:content:"+zo(e+`
14
- `)}function Zp(t){let e=JSON.stringify(Yp(t));return"urn:jskos:mapping:members:"+zo(e+`
15
- `)}function Ho(t){let e=(t.identifier||[]).filter(r=>r&&!r.startsWith("urn:jskos:mapping:")).concat([Zp(t),Xp(t)]).sort();return Object.assign({},t,{identifier:e})}function Qp(t,e,r){t=t&&Ho(t),e=e&&Ho(e);let n=t&&t.identifier?t.identifier.find(o=>o.startsWith(r)):null,i=e&&e.identifier?e.identifier.find(o=>o.startsWith(r)):null;return n==i}function ed(t,e){return Qp(t,e,"urn:jskos:mapping:content:")}var eO=ed;function tO(t,e){return Qp(t,e,"urn:jskos:mapping:members:")}var Zo={};Nt(Zo,{addContext:()=>aO,annotationCreatorMatches:()=>RO,annotationCreatorName:()=>qO,annotationCreatorUri:()=>PO,clean:()=>Yo,cleanJSKOS:()=>uO,compare:()=>qt,compareConcepts:()=>hO,compareFunctions:()=>AO,compareMappingsDeep:()=>xO,compareObjects:()=>fO,compareSchemes:()=>lO,conceptsOfMapping:()=>zt,copyDeep:()=>ci,deepCopy:()=>cO,defaultMappingType:()=>ud,definition:()=>TO,flattenMapping:()=>wO,getAllUris:()=>Vo,guessObjectType:()=>oi,guessSchemeFromNotation:()=>DO,isConcept:()=>pO,isContainedIn:()=>ad,isScheme:()=>sd,isSchemeInList:()=>dO,isValidUri:()=>EO,languageMapContent:()=>Xo,mappingCSV:()=>bO,mappingRegistryIsStored:()=>IO,mappingTypeByType:()=>vO,mappingTypeByUri:()=>hn,mappingTypes:()=>fn,matchObjectTypes:()=>SO,merge:()=>ld,mergeUris:()=>fd,minifyMapping:()=>yO,normalize:()=>Jo,notation:()=>CO,objectTypes:()=>ln,prefLabel:()=>br,sortConcepts:()=>mO,sortSchemes:()=>gO,userOwnsMapping:()=>OO});function yr(t,e,r){let n=Array.prototype.slice,i=typeof Object.keys=="function"?Object.keys:function(c){let l=[];for(let v in c)l.push(v);return l},o=function(c,l){return c===l?!0:c instanceof Date&&l instanceof Date?c.getTime()===l.getTime():typeof c!="object"&&typeof l!="object"?c==l:a(c,l)};function s(c){return c==null}function u(c){return Object.prototype.toString.call(c)=="[object Arguments]"}function a(c,l){if(s(c)||s(l)||c.prototype!==l.prototype)return!1;if(u(c))return u(l)?(c=n.call(c),l=n.call(l),o(c,l)):!1;let v,y,_,d;try{v=i(c),y=i(l)}catch(C){return!1}if(v.length!=y.length)return!1;for(v.sort(),y.sort(),d=v.length-1;d>=0;d--)if(v[d]!=y[d])return!1;for(d=v.length-1;d>=0;d--)if(_=v[d],r){let C=r(c[_],l[_],_);if(C===void 0&&(C=yr(c[_],l[_])),!C)return!1}else if(!o(c[_],l[_]))return!1;return!0}return o(t,e)}function de(t,e,r=void 0){let n=o=>String.prototype.split.call(e,o).filter(Boolean).reduce((s,u)=>s!=null?s[u]:s,t),i=n(/[,[\]]+?/)||n(/[,[\].]+?/);return i===void 0||i===t?r:i}function vr(t,e){return e.reduce((r,n)=>(t&&t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}function un(t,e){for(let r in t)t.hasOwnProperty(r)&&e(t[r],r)}function wr(t){return typeof t=="object"&&t!==null}function cn(t){return!!(t&&typeof t.valueOf()=="string")}function td(t,e){return[...new Set([...t,...e])]}function rd(t,e,r){return[...t,...e].reduce((n,i)=>(n.findIndex(o=>r(o,i))!==-1||n.push(i),n),[])}function nd(t,e){for(let r of e){typeof r=="string"&&(r=r.split("."));for(let n=0;n<r.length-1;n++)t=t[r[n]];delete t[r.pop()]}}var fn=[{RELEVANCE:"very high",broader:[{uri:"http://www.w3.org/2004/02/skos/core#closeMatch"}],definition:{de:["gleiche Bedeutung"],en:["same meaning"]},notation:["="],prefLabel:{ar:"\u062A\u0637\u0627\u0628\u0642 \u062A\u0627\u0645",be:"\u0434\u0430\u043A\u043B\u0430\u0434\u043D\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u0446\u044C","be-tarask":"\u0434\u0430\u043A\u043B\u0430\u0434\u043D\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",bn:"\u09B9\u09C1\u09AC\u09C1\u09B9\u09C1 \u09AE\u09BF\u09B2",bs:"ta\u010Dno podudaranje",ca:"equival\xE8ncia exacta",cs:"p\u0159esn\xE1 shoda",da:"exact match",de:"exakte \xDCbereinstimmung",el:"\u03B1\u03BA\u03C1\u03B9\u03B2\u03AE\u03C2 \u03B1\u03BD\u03C4\u03B9\u03C3\u03C4\u03BF\u03B9\u03C7\u03AF\u03B1",en:"exact match",eo:"ekzakta ekvivalento",es:"equivalencia exacta",et:"t\xE4pne vaste",fi:"vastaava k\xE4site",fr:"\xE9quivalence exacte",ga:"meaitse\xE1il chruinn",gl:"correspondencia exacta",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05DE\u05D3\u05D5\u05D9\u05E7\u05EA",hu:"pontos egyez\xE9s",id:"sama persis",it:"corrispondenza esatta",ja:"\u5B8C\u5168\u4E00\u81F4",lv:"tie\u0161a sakrit\u012Bba",mk:"\u0442\u043E\u0447\u043D\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",ms:"padanan tepat","ms-arab":"\u06A4\u0627\u062F\u0646\u0646 \u062A\u06A4\u062A",nb:"eksakt samsvar",nl:"exacte match",nn:"eksakt samsvar",pl:"dok\u0142adne dopasowanie",pt:"correspond\xEAncia exata",ro:"echivalentul exact",ru:"\u0442\u043E\u0447\u043D\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sl:"natan\u010Dno ujemanje",sq:"p\xEBrputhje e p\xEBrpikt\xEB",sr:"\u0442\u0430\u0447\u043D\u043E \u043F\u043E\u0434\u0443\u0434\u0430\u0440\u0430\u045A\u0435",sv:"exakt tr\xE4ff",tr:"tam e\u015Fle\u015Fme",uk:"\u0442\u043E\u0447\u043D\u0430 \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u043D\u0456\u0441\u0442\u044C",ur:"\u0628\u0627\u0644\u06A9\u0644 \u062F\u0631\u0633\u062A \u062C\u0648\u0691",zh:"\u7CBE\u78BA\u5339\u914D","zh-cn":"\u7CBE\u786E\u5339\u914D","zh-hans":"\u7CBE\u786E\u5339\u914D","zh-hant":"\u7CBE\u78BA\u5339\u914D"},SHORT:"exact",uri:"http://www.w3.org/2004/02/skos/core#exactMatch"},{RELEVANCE:"high",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{de:["in etwa gleiche Bedeutung"],en:["same general idea but not fully identical meaning"]},notation:["\u2248"],prefLabel:{ar:"\u062A\u0637\u0627\u0628\u0642 \u0642\u0631\u064A\u0628","be-tarask":"\u0431\u043B\u0456\u0437\u043A\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"equival\xE8ncia inexacta",de:"hohe \xDCbereinstimmung",el:"\u03C3\u03C4\u03B5\u03BD\u03AE \u03B1\u03BD\u03C4\u03B9\u03C3\u03C4\u03BF\u03B9\u03C7\u03AF\u03B1",en:"close match",eo:"proksima kongrua\u0135o",es:"equivalencia inexacta",fi:"l\xE4hes vastaava k\xE4site",fr:"quasi-\xE9quivalence",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E7\u05E8\u05D5\u05D1\u05D4",hu:"kv\xE1zi-egyen\xE9rt\xE9k\u0171s\xE9g",it:"corrispondenza parziale",ja:"\u985E\u4F3C\u4E00\u81F4",mk:"\u0431\u043B\u0438\u0441\u043A\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",ms:"padanan dekat","ms-arab":"\u06A4\u0627\u062F\u0646\u0646 \u062F\u06A9\u062A",nb:"n\xE6rt samsvar",nl:"nabije match",nn:"n\xE6rt samsvar",pl:"cz\u0119\u015Bciowe dopasowanie",pt:"correspond\xEAncia pr\xF3xima",ru:"\u0431\u043B\u0438\u0437\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sl:"visoko ujemanje",sr:"\u0431\u043B\u0438\u0441\u043A\u043E \u043F\u043E\u043A\u043B\u0430\u043F\u0430\u045A\u0435",sv:"n\xE4ra matchning",tr:"yak\u0131n e\u015Fle\u015Fme","zh-hans":"\u9AD8\u5EA6\u5339\u914D"},SHORT:"close",uri:"http://www.w3.org/2004/02/skos/core#closeMatch"},{RELEVANCE:"medium",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{de:["umfassendere Bedeutung"],en:["broader meaning"]},notation:[">"],prefLabel:{"be-tarask":"\u0448\u044B\u0440\u043E\u043A\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"relaci\xF3 llunyana",cs:"\u0161ir\u0161\xED koncept",de:"allgemeinere Bedeutung",en:"broad match",eo:"malstrikta kongruo",et:"laiem vaste",fi:"vastaava laajempi k\xE4site",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E8\u05D7\u05D1\u05D4",hu:"t\xE1gabb jelent\xE9s",it:"corrispondenza con termine pi\xF9 generico",ja:"\u5E83\u7FA9\u4E00\u81F4",mk:"\u043F\u043E\u0448\u0438\u0440\u043E\u043A\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",nb:"bredere samsvar",nl:"brede match",nn:"breitt samsvar",pl:"dopasowanie poj\u0119cia o szerszym znaczeniu","pt-br":"correspond\xEAncia gen\xE9rica",ru:"\u0431\u043E\u043B\u0435\u0435 \u0448\u0438\u0440\u043E\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sl:"splo\u0161ni pomen",sr:"\u0443 \u0448\u0438\u0440\u0435\u043C \u0441\u043C\u0438\u0441\u043B\u0443",sv:"bred tr\xE4ff",uk:"\u0448\u0438\u0440\u0448\u0430 \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u043D\u0456\u0441\u0442\u044C",vi:"\u0111\u1ED1i s\xE1nh r\u1ED9ng","zh-hans":"\u5E7F\u6CDB\u5339\u914D"},related:[{uri:"http://www.w3.org/2004/02/skos/core#narrowMatch"}],SHORT:"broad",uri:"http://www.w3.org/2004/02/skos/core#broadMatch"},{RELEVANCE:"medium",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{en:["more specific meaning"]},notation:["<"],prefLabel:{"be-tarask":"\u0432\u0443\u0437\u043A\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"relaci\xF3 estreta",de:"spezifischere Bedeutung",en:"narrow match",eo:"strikta kongruo",et:"kitsam vaste",fi:"vastaava suppeampi k\xE4site",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E6\u05E8\u05D4",hu:"sz\u0171kebb jelent\xE9s",it:"corrispondenza con termine pi\xF9 specifico",ja:"\u72ED\u7FA9\u4E00\u81F4",mk:"\u043F\u043E\u0442\u0435\u0441\u043D\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",nb:"smalere samsvar",nl:"nauwe match",nn:"snevert samsvar",pl:"dopasowanie poj\u0119cia o w\u0119\u017Cszym znaczeniu","pt-br":"correspond\xEAncia aproximada",ru:"\u0431\u043E\u043B\u0435\u0435 \u0443\u0437\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sl:"ozki pomen",sr:"\u0443 \u0443\u0436\u0435\u043C \u0441\u043C\u0438\u0441\u043B\u0443",sv:"smal tr\xE4ff",ur:"\u0646\u06CC\u0631\u0648 \u0645\u06CC\u0686",vi:"\u0111\u1ED1i s\xE1nh h\u1EB9p","zh-hans":"\u6709\u9650\u5339\u914D"},related:[{uri:"http://www.w3.org/2004/02/skos/core#broadMatch"}],SHORT:"narrow",uri:"http://www.w3.org/2004/02/skos/core#narrowMatch"},{RELEVANCE:"low",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{de:["assoziative Verkn\xFCpfung unterschiedlicher Bedeutungen"],en:["associative link between meanings"]},notation:["~"],prefLabel:{"be-tarask":"\u0437\u044C\u0432\u044F\u0437\u0430\u043D\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"parella relacionada",de:"verwandte Bedeutung",en:"related match",eo:"rilata kongruo",fi:"liittyv\xE4 k\xE4site",fr:"association",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E7\u05E9\u05D5\u05E8\u05D4",hu:"rokon jelent\xE9s",it:"corrispondenza correlata",ja:"\u95A2\u9023\u4E00\u81F4",lv:"saist\u012Bta sakrit\u012Bba",mk:"\u043F\u043E\u0432\u0440\u0437\u0430\u043D\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",ms:"padanan berkaitan","ms-arab":"\u06A4\u0627\u062F\u0646\u0646 \u0628\u0631\u06A9\u0627\u0621\u064A\u062A\u0646",nb:"relatert samsvar",nl:"gerelateerde match",pl:"dopasowanie poj\u0119cia o powi\u0105zanym znaczeniu",ru:"\u0430\u0441\u0441\u043E\u0446\u0438\u0430\u0442\u0438\u0432\u043D\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sl:"povezano ujemanje",tr:"ili\u015Fkili benze\u015Fme",uk:"\u043F\u043E\u0432\u2019\u044F\u0437\u044C",ur:"\u0645\u062A\u0639\u0644\u0642\u06C1 \u0645\u06CC\u0686",vec:"parente\u0142a re\u0142asionada","zh-hans":"\u5173\u8054\u5339\u914D"},SHORT:"related",uri:"http://www.w3.org/2004/02/skos/core#relatedMatch"},{RELEVANCE:"generic",definition:{de:["unbekannter Bedeutungszusammenhang"],en:["unknown type of link between meanings"]},notation:["\u2192"],prefLabel:{ar:"\u0646\u0648\u0639 \u0639\u0644\u0627\u0642\u0629 \u0627\u0644\u062A\u0637\u0628\u064A\u0642",be:"\u0445\u0430\u0440\u0430\u043A\u0442\u044D\u0440\u043D\u0430\u044F \u0430\u0434\u043D\u043E\u0441\u0456\u043D\u0430 \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u043D\u043D\u044F","be-tarask":"\u0445\u0430\u0440\u0430\u043A\u0442\u044D\u0440\u043D\u0430\u044F \u0430\u0434\u043D\u043E\u0441\u0456\u043D\u0430 \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u043D\u044C\u043D\u044F",ca:"relaci\xF3 de mapatge",de:"allgemeine Mapping-Relation",en:"SKOS generic mapping relation",fi:"SKOS-kartoitussuhde",fr:"lien de correspondance SKOS",he:"\u05D9\u05D7\u05E1 \u05DE\u05D9\u05E4\u05D5\u05D9 \u05DB\u05DC\u05DC\u05D9",id:"relasi pemetaan",ja:"SKOS\u4E00\u822C\u30DE\u30C3\u30D4\u30F3\u30B0\u95A2\u4FC2",mk:"\u043F\u0440\u0435\u0441\u043B\u0438\u043A\u0443\u0432\u0430\u0447\u043A\u0438 \u043E\u0434\u043D\u043E\u0441",nb:"SKOS generisk mappingrelasjon","pt-br":"rela\xE7\xE3o gen\xE9rica de mapeamento",sl:"splo\u0161na relacija kartiranja SKOS",sr:"\u0440\u0435\u043B\u0430\u0446\u0438\u0458\u0430 \u043C\u0430\u043F\u0438\u0440\u0430\u045A\u0430",sv:"mappnings relation",zh:"\u6620\u5C04\u95DC\u4FC2","zh-hant":"\u6620\u5C04\u95DC\u4FC2"},SHORT:"",uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}];var ln={Concept:{type:["http://www.w3.org/2004/02/skos/core#Concept"]},ConceptScheme:{type:["http://www.w3.org/2004/02/skos/core#ConceptScheme"]},ConceptMapping:{type:fn.map(t=>t.uri)},ConceptOccurrence:{type:["http://purl.org/cld/cdtype/CatalogueOrIndex"]},Registry:{type:["http://www.w3.org/ns/dcat#Catalog"]},Distribution:{type:["http://www.w3.org/ns/dcat#Distribution"]},Concordance:{type:["http://rdfs.org/ns/void#Linkset","http://rdf-vocabulary.ddialliance.org/xkos#Correspondence"]},Resource:{},Item:{},ConceptBundle:{},Annotation:{type:["Annotation","http://www.w3.org/ns/oa#Annotation"]}},ii=Object.keys(ln).reduce((t,e)=>{for(let r of ln[e].type||[])t[r]=e;return t},{});function oi(t,e=!1){let r;if(typeof t=="string"&&t)t in ii?r=ii[t]:(t=t.toLowerCase().replace(/s$/,""),r=Object.keys(ln).find(n=>{let i=n.toLowerCase();if(i===t||i==="concept"+t)return!0}));else if(typeof t=="object"&&t.type){let n=Array.isArray(t.type)?t.type:[t.type];for(let i of n)if(i in ii){r=ii[i];break}}return e&&r?r.toLowerCase().replace(/^concept(.+)/,"$1"):r}var rO=/[\\^$.*+?()[\]{}|]/g,nO=t=>t.replace(rO,"\\$&"),iO=/[%ÄÖÜäöü ]/g,Go=class{constructor(e={}){if(Object.assign(this,e),this.notationPattern||(this.notationPattern=".+"),!this.uriPattern&&this.namespace){this.uriPattern="^"+nO(this.namespace);let r=this.notationPattern.replace(iO,encodeURI);this.uriPattern+="("+r+")$"}this.NOTATION_REGEX=RegExp("^("+this.notationPattern+")$"),this.uriPattern&&(this.URI_REGEX=RegExp(this.uriPattern))}isValidNotation(e){return this.NOTATION_REGEX.exec(e)}notationFromUri(e){if(this.URI_REGEX){let r=this.URI_REGEX.exec(e);if(r)return decodeURI(r[1])}}uriFromNotation(e){if(this.uriPattern)return e=encodeURIComponent(e),this.uriPattern.replace(/^\^|\$$/g,"").replace(/\\/g,"").replace(/\(.*\)/,e)}conceptFromUri(e,r={}){let n=this.notationFromUri(e);if(n===void 0)return;let i={uri:e,notation:[n]};return r.inScheme&&(i.inScheme=[{uri:this.uri}]),r.topConcept&&(i.topConceptOf=[{uri:this.uri}]),i}conceptFromNotation(e,r){if(this.isValidNotation(e))return this.conceptFromUri(this.uriFromNotation(e),r)}},si=Go;var ai={store:null,path:"",defaults:["en"],getLanguages:od,selectLanguage:oO};function od(){return de(ai.store,ai.path)||ai.defaults}function oO(t){if(!t)return null;for(let e of od())if(t[e])return e;for(let e of Object.keys(t))if(e!="-")return e;return null}var ui=ai;var sO=t=>/^[A-Z]*$/.test(t),_r=(t,e)=>e.split(".").reduce((r,n)=>r&&r[n]?r[n]:null,t),aO=t=>((t instanceof Array?t:[t]).forEach(r=>{r["@context"]="https://gbv.github.io/jskos/context.json"}),t),Yo=t=>(Object.keys(t).forEach(e=>{sO(e)||e.startsWith("_")?delete t[e]:t[e]!=null&&typeof t[e]=="object"&&(t[e]=Yo(t[e]))}),t),uO=Yo,ci=(t,e=[],r=!0)=>{e=e.concat(["ancestors","narrower","broader","mappings","memberList","TOPCONCEPTS","MAPPINGS","PROVIDER"]);let n=Array.isArray(t)?[]:{};for(let i in t)if(!(r&&i[0]=="_")){if(e.includes(i))if(t[i]&&Array.isArray(t[i])){t[i].length>0?n[i]=[null]:n[i]=[];continue}else{n[i]=null;continue}if(i=="inScheme"){let o=[];for(let s of t.inScheme){let u={uri:s.uri};s.notation&&(u.notation=s.notation),s.prefLabel&&(u.prefLabel=s.prefLabel),o.push(u)}n.inScheme=o;continue}t[i]!=null&&typeof t[i]=="object"?n[i]=ci(t[i]):n[i]=t[i]}return n},cO=ci,Vo=t=>t?(t.uri?[t.uri]:[]).concat(t.identifier||[]).filter(Boolean):[],qt=(t,e)=>{if(t==null&&e==null)return!0;let r=i=>i.replace("https://","http://"),n=Vo(t).map(r);for(let i of Vo(e).map(r))if(n.indexOf(i)!==-1)return!0;return!1},fO=qt,lO=qt,hO=qt,pO=t=>{var e;return((e=de(t,"type",[]))==null?void 0:e.includes("http://www.w3.org/2004/02/skos/core#Concept"))||de(t,"inScheme")!=null||de(t,"topConceptOf")!=null},sd=t=>{var e;return(e=de(t,"type",[]))==null?void 0:e.includes("http://www.w3.org/2004/02/skos/core#ConceptScheme")},ad=(t,e)=>{if(!t||!e)return!1;for(let r of e)if(qt(t,r))return!0;return!1},dO=ad,mO=(t,e=!1)=>t.sort((r,n)=>{let i=de(r,"notation[0]"),o=de(n,"notation[0]");if(i&&o&&(i=i.toLowerCase(),o=o.toLowerCase()),e&&i&&o){let s,u;if(s=parseFloat(i),u=parseFloat(o),!s&&!u){let a=`${i}`.split(/[^\w\d]/),c=`${o}`.split(/[^\w\d]/);for(let l=0;l<Math.min(a.length,c.length);l+=1)if(a[l]!==c[l]){s=parseFloat(a[l])||a[l],u=parseFloat(c[l])||c[l];break}!s&&!u&&(s=i,u=o)}i=s,o=u}if((!i||!o||i==o)&&(i=r.uri,o=n.uri),i&&o){if(i>o)return 1;if(i<o)return-1}return 0}),gO=t=>{let e=["notation[0]",["prefLabel.de","prefLabel.en"],"uri"];return t.sort((r,n)=>{for(let i of e){let o,s;if(Array.isArray(i))for(let u of i)o=o||de(r,u),s=s||de(n,u);else o=de(r,i),s=de(n,i);if(o!=null&&s!=null){if(o=o.toLowerCase(),s=s.toLowerCase(),o>s)return 1;if(o<s)return-1}}return 0})},yO=t=>{let e=vr(ci(t),["from","to","fromScheme","toScheme","creator","contributor","type","created","modified","note","identifier","uri","partOf","mappingRelevance"]);for(let r of[e.from,e.to])un(r,(n,i)=>{let o=[];for(let s of n)o.push(vr(s,["uri","notation"]));r[i]=o});return e.fromScheme&&(e.fromScheme=vr(e.fromScheme,["uri","notation"])),e.toScheme&&(e.toScheme=vr(e.toScheme,["uri","notation"])),e.partOf&&(e.partOf=e.partOf.map(r=>vr(r,["uri"]))),e},hn=function(t){for(let e of fn)if(t==e.uri)return e;return null},ud=hn("http://www.w3.org/2004/02/skos/core#mappingRelation"),vO=function(t,e=ud){let r;return Array.isArray(t)&&t.length>0?r=t[0]:r=t,hn(r)||e},wO=(t,e={})=>{let{language:r}=e,n=_r(t,"from.memberSet.0.notation.0"),i=_r(t,"to.memberSet.0.notation.0");n=n!==null?n:"",i=i!==null?i:"";let o=hn(_r(t,"type.0"));o=o?o.SHORT:"";let s=br(_r(t,"from.memberSet.0"),{language:r,fallbackToUri:!1})||"",u=br(_r(t,"to.memberSet.0"),{language:r,fallbackToUri:!1})||"",a=br(_r(t,"creator.0"),{language:r,fallbackToUri:!1})||"";return{fromNotation:n,toNotation:i,fromLabel:s,toLabel:u,type:o,creator:a}},_O=(t={})=>{let e=t.delimiter||",",r=t.quoteChar||'"',n=t.lineTerminator||`
16
- `,i=r+r,o=s=>r+(s==null?"":s.split(r).join(i))+r;return s=>s.map(o).join(e)+n},zt=(t,e)=>{let r=[];for(let n of["from","to"])(e==null||n===e)&&(r=r.concat(de(t,`${n}.memberSet`)||de(t,`${n}.memberChoice`)||de(t,`${n}.memberList`)||[]));return r.filter(n=>n!=null)},bO=(t={})=>{let e=_O(t),r=t.language||"en";t.type==null&&(t.type=!0);let n=s=>{s=s||[];let u=[];for(let a of["from","to"]){t.schemes&&u.push(`${a}Scheme`);let c=Math.max(...s.map(l=>zt(l,a).length),1);for(let l=0;l<c;l+=1)u.push(`${a}Notation${l?l+1:""}`),t.labels&&u.push(`${a}Label${l?l+1:""}`)}return t.type&&u.push("type"),t.creator&&u.push("creator"),e(u)},i=(s,u={})=>{let a=[];for(let c of["from","to"]){t.schemes&&a.push(de(s,`${c}Scheme.notation[0]`,""));let l=zt(s,c),v=u[`${c}Count`];v==null&&(v=l.length),v=Math.max(v,1);for(let y=0;y<v;y+=1)a.push(de(l[y],"notation[0]","")),t.labels&&a.push(br(l[y],{language:r,fallbackToUri:!1}))}return t.type&&a.push(de(hn(de(s,"type[0]")),"SHORT","")),t.creator&&a.push(br(de(s,"creator[0]"),{language:r,fallbackToUri:!1})),e(a)};return{header:n,fromMapping:i,fromMappings:(s,u={header:!0})=>{let a="";u.header&&(a+=n(s));let c={fromCount:Math.max(...s.map(l=>zt(l,"from").length)),toCount:Math.max(...s.map(l=>zt(l,"to").length))};for(let l of s)a+=i(l,c);return a}}};function xO(t,e){return yr(t,e,(r,n,i)=>{let o={[i]:r},s={[i]:n};if(i=="from"||i=="to")return yr(Object.getOwnPropertyNames(de(r,i,{})),Object.getOwnPropertyNames(de(n,i,{})))?yr(zt(o,i),zt(s,i),(u,a,c)=>{if(c!=null)return qt(u,a)}):!1;if(i=="fromScheme"||i=="toScheme")return qt(r,n)})}var SO=(t,e)=>{let r=oi(t),n=oi(e);return!(r&&n&&r!=n)},cd=t=>{Array.isArray(t)&&t.sort((e,r)=>e===null?1:r===null?-1:0)},fd=(t,e)=>(!t||!e||((Array.isArray(t.identifier)||Array.isArray(e.identifier))&&(t.identifier=td(t.identifier||[],e.identifier||[])),!t.uri&&e.uri&&(t.uri=e.uri),t.uri&&e.uri&&t.uri!=e.uri&&!(t.identifier||[]).includes(e.uri)&&(t.identifier=(t.identifier||[]).concat([e.uri])),Array.isArray(t.identifier)&&t.uri&&(t.identifier=t.identifier.filter(r=>r!==t.uri)),(t.identifier||[]).length==0&&delete t.identifier,cd(t.identifier)),t),ld=(t,e,r)=>{if(!t||!e)return t||e;r=r||{};let n=r._path||"",i=r.detectMismatch||[],o=r.skipPaths||[],s={};return un(t,(u,a)=>{if(!o.includes(n+a))if(Array.isArray(u)&&Array.isArray(e[a]))s[a]=rd(u,e[a],(c,l)=>wr(c)&&wr(l)?qt(c,l):c===l),cd(s[a]);else if(wr(u)&&wr(e[a]))s[a]=ld(u,e[a],Object.assign({_path:`${n}${a}.`},r));else{if(u&&e[a]&&i.includes(n+a)&&!yr(u,e[a]))throw new Error("Property mismatch in "+n+a);s[a]=u}}),un(e,(u,a)=>{t[a]||(s[a]=u)}),n==""&&nd(s,o),r.mergeUris&&fd(s,e),s},Jo=t=>Array.isArray(t)?t.map(e=>Jo(e)):wr(t)?(un(t,(e,r)=>{t[r]=Jo(e)}),t):cn(t)?t.normalize():t,EO=t=>{let e=/^[A-Za-z][A-Za-z0-9+\-.]*:(?:\/\/(?:(?:[A-Za-z0-9\-._~!$&'()*+,;=:]|%[0-9A-Fa-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::)(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)|[Vv][0-9A-Fa-f]+\.[A-Za-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:[A-Za-z0-9\-._~!$&'()*+,;=]|%[0-9A-Fa-f]{2})*)(?::[0-9]*)?(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|\/(?:(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)?|(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|)(?:\?(?:[A-Za-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?(?:#(?:[A-Za-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?$/;return t.match(e)!==null},AO={mappingsByConcepts:(t,e,r)=>{let n=["memberSet","memberList","memberChoice"],i,o;for(let s of n)i=i||de(t,r+"."+s+"[0].notation[0]"),o=o||de(e,r+"."+s+"[0].notation[0]");return i==null||i<o?-1:o==null||i>o?1:0}},OO=(t,e)=>!t||!e?!1:[t.uri].concat(Object.values(t.identities||{}).map(r=>r.uri)).filter(r=>r!=null).includes(de(e,"creator[0].uri"));function CO(t,e){let r;if(t&&t.notation&&t.notation.length)r=t.notation[0],(sd(t)||e=="scheme")&&(r=r.toUpperCase());else if(t&&t.inScheme&&t.inScheme[0]&&t.uri)try{r=new si(t&&t.inScheme&&t.inScheme[0]).notationFromUri(t.uri)}catch(n){}return r||""}function Xo(t,e,{language:r}={}){let n=t&&e?t[e]:t;return n&&(n[r]||(r=ui.selectLanguage(n),r))?n[r]:null}function br(t,e={}){e=e||{};let r=e.fallbackToUri==null?!0:e.fallbackToUri;return de(t,`prefLabel.${e.language}`)||Xo(t,"prefLabel",e)||(r&&t&&t.uri?t.uri:"")}function TO(t,e={}){e=e||{};let r=de(t,`definition.${e.language}`)||Xo(t,"definition",e)||[];return cn(r)&&(r=[r]),r}function IO(t){return de(t,"stored",de(t,"constructor.stored",de(t,"provider.constructor.stored",!1)))}function PO(t){return cn(t.creator)?t.creator:t.creator&&t.creator.id}function qO(t){return de(t,"creator.name")||""}function RO(t,e){return!!(t&&cn(t.creator)?e&&e.includes(t.creator):e&&t.creator&&e.includes(t.creator.id))}function DO(t,e){return e.filter(({notationPattern:r})=>(r||".+")===".+"?!1:RegExp("^("+r+")$").test(t))}var M=z(R(R({},Ko),Zo),{ConceptScheme:si,languagePreference:ui});var dn={};Nt(dn,{BaseProvider:()=>le,ConceptApiProvider:()=>it,LabelSearchSuggestionProvider:()=>gt,LobidApiProvider:()=>bt,LocApiProvider:()=>vt,LocalMappingsProvider:()=>Rt,MappingsApiProvider:()=>nt,MyCoReProvider:()=>xt,NoTApiProvider:()=>St,OccurrencesApiProvider:()=>mt,ReconciliationApiProvider:()=>ct,SkohubProvider:()=>wt,SkosmosApiProvider:()=>yt});var Wt={};Nt(Wt,{concatUrl:()=>pt,listOfCapabilities:()=>es,requestMethods:()=>Qo,withCustomProps:()=>Ht});var Qo=[{method:"getRegistries",fallback:[],type:"Registries"},{method:"getSchemes",fallback:[],type:"Schemes"},{method:"vocSearch",fallback:[],type:"Schemes"},{method:"getTypes",fallback:[],type:"Types"},{method:"suggest",fallback:["",[],[],[]]},{method:"vocSuggest",fallback:["",[],[],[]]},{method:"getConcordances",fallback:[],type:"Concordances"},{method:"getOccurrences",fallback:[],type:"Occurrences"},{method:"getTop",fallback:[],type:"Concepts"},{method:"getConcepts",fallback:[],type:"Concepts"},{method:"getNarrower",fallback:[],type:"Concepts"},{method:"getAncestors",fallback:[],type:"Concepts"},{method:"search",fallback:[],type:"Concepts"},{method:"getMapping",fallback:null,type:"Mapping"},{method:"getMappings",fallback:[],type:"Mappings"},{method:"postMapping",fallback:null,type:"Mapping"},{method:"postMappings",fallback:[],type:"Mapping"},{method:"putMapping",fallback:null,type:"Mapping"},{method:"patchMapping",fallback:null,type:"Mapping"},{method:"deleteMapping",fallback:!1},{method:"deleteMappings",fallback:[]},{method:"getAnnotations",fallback:[],type:"Annotations"},{method:"postAnnotation",fallback:null,type:"Annotation"},{method:"putAnnotation",fallback:null,type:"Annotation"},{method:"patchAnnotation",fallback:null,type:"Annotation"},{method:"deleteAnnotation",fallback:!1}];function pt(...t){let[e,...r]=t;for(let n of r)e.endsWith("/")||(e+="/"),n.startsWith("/")&&(n=n.slice(1)),e+=n;return e}function Ht(t,e){return t._totalCount=e._totalCount,t._url=e._url,t}var es=["schemes","top","data","concepts","narrower","ancestors","types","suggest","search","auth","mappings","concordances","annotations","occurrences"];var le=class{constructor(e={}){var n,i;this._jskos=e,this.axios=Pe.create({timeout:2e4}),this._path=typeof window!="undefined"&&window.location.pathname,this.has={},(n=this.constructor)!=null&&n.supports&&(this.has=Object.assign({},(i=this.constructor)==null?void 0:i.supports)),es.filter(o=>!this.has[o]).forEach(o=>{this.has[o]=!1}),this._defaultLanguages="en,de,fr,es,nl,it,fi,pl,ru,cs,jp".split(","),this.languages=[],this._auth={key:null,bearerToken:null},this._repeating=[],this._api={status:e.status,schemes:Array.isArray(e.schemes)?void 0:e.schemes,top:e.top,data:e.data,concepts:e.concepts,narrower:e.narrower,ancestors:e.ancestors,types:e.types,suggest:e.suggest,search:e.search,"voc-suggest":e["voc-suggest"],"voc-search":e["voc-search"],mappings:e.mappings,concordances:e.concordances,annotations:e.annotations,occurrences:e.occurrences,reconcile:e.reconcile,api:e.api},this._config={},this.setRetryConfig(),this.axios.interceptors.request.use((o={})=>{var s;if(!o._skipAdditionalParameters){let u=Pt.default([].concat(ie.default(o,"params.language","").split(","),this.languages,this._defaultLanguages).filter(a=>a!="")).join(",");Ae.default(o,"params.language",u),this.has.auth&&this._auth.bearerToken&&!ie.default(o,"headers.Authorization")&&Ae.default(o,"headers.Authorization",`Bearer ${this._auth.bearerToken}`)}if((s=o.url)!=null&&s.startsWith("http:")&&typeof window!="undefined"&&window.location.protocol=="https:")throw new Pe.Cancel("Can't call http API from https.");return o}),this.axios.interceptors.response.use(({data:o,headers:s={},config:u={}})=>{o=M.normalize(o);let a=u.url;if(a.endsWith("?")||(a+="?"),Bo.default(u.params||{},(c,l)=>{a+=`${l}=${encodeURIComponent(c)}&`}),Fe.default(o)||an.default(o)){let c=parseInt(s["x-total-count"]);isNaN(c)||(o._totalCount=c),o._url=a}return o},o=>{let s=ie.default(o,"config._retryCount",0),u=ie.default(o,"config.method"),a=ie.default(o,"response.status");return this._retryConfig.methods.includes(u)&&this._retryConfig.statusCodes.includes(a)&&s<this._retryConfig.count?(o.config._retryCount=s+1,o.config.data&&(o.config.data=JSON.parse(o.config.data)),new Promise((c,l)=>{setTimeout(()=>{this.axios(o.config).then(c).catch(l)},(()=>{let v=this._retryConfig.delay;return typeof v=="function"?v(s):v})())})):Promise.reject(o)});let r=[];for(let{method:o,type:s}of Qo){let u=this[o]&&this[o].bind(this);if(!u){this[o]=()=>{throw new Cr({method:o})};continue}this[o]=(a={})=>{if(a._raw)return delete a._raw,u(a);let c=r.find(_=>_.method==o&&ut.default(_.options,a));if(c)return c.promise;let l;a.cancelToken||(l=this.getCancelTokenSource(),a.cancelToken=l.token);let v=this.init().then(()=>u(a)).then(_=>(Fe.default(_)&&_._totalCount===void 0?_._totalCount=_.length:an.default(_)&&_._totalCount===void 0&&(_._totalCount=1),_&&s&&this[`adjust${s}`]&&(_=this[`adjust${s}`](_)),_)).catch(_=>{throw _ instanceof Me?_:_.response?_.response.status.toString().startsWith(4)?new ot({relatedError:_,code:_.response.status}):new Tr({relatedError:_,code:_.response.status}):_.request?typeof navigator!="undefined"&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection)?new Ir({relatedError:_}):new Pr({relatedError:_}):new Me({relatedError:_})});l&&(v.cancel=(..._)=>l.cancel(..._));let y={method:o,options:ht.default(a,["cancelToken"]),promise:v};return r.push(y),v.catch(()=>{}).then(()=>r.splice(r.indexOf(y),1)),v}}}get uri(){return this._jskos.uri}get notation(){return this._jskos.notation}get prefLabel(){return this._jskos.prefLabel}get definition(){return this._jskos.definition}get schemes(){return this._jskos.schemes}get excludedSchemes(){return this._jskos.excludedSchemes}get stored(){return this._jskos.stored!==void 0?this._jskos.stored:this.constructor.stored}init(){return P(this,null,function*(){return this._init?this._init:(this._init=P(this,null,function*(){this._prepare();let e;if(Se.default(this._api.status))try{e=yield this.axios({method:"get",url:this._api.status})}catch(r){ie.default(r,"response.status")===404&&(this._api.status=null)}else e=this._api.status;if(an.default(e)&&!Uo.default(e)){this._config=e.config||{};for(let r of Object.keys(this._api))this._api[r]===void 0&&(this._api[r]=e[r]||null)}this._setup()}),this._init)})}_prepare(){}_setup(){}getCancelTokenSource(){return Pe.CancelToken.source()}setAuth({key:e=this._auth.key,bearerToken:r=this._auth.bearerToken}){this._auth.key=e,this._auth.bearerToken=r}setRetryConfig(e={}){this._retryConfig=Object.assign({methods:["get","head","options"],statusCodes:[401,403],count:3,delay:r=>300*r},e)}isAuthorizedFor({type:e,action:r,user:n,crossUser:i}){if(r=="read"&&this.has[e]===!0)return!0;if(!this.has[e])return!1;let o=ie.default(this._config,`${e}.${r}`);if(!o)return!!this.has[e][r];if(o.auth&&(!n||!this._auth.key)||o.auth&&this._auth.key!=ie.default(this._config,"auth.key"))return!1;let s=[n==null?void 0:n.uri].concat(Object.values((n==null?void 0:n.identities)||{}).map(u=>u.uri)).filter(Boolean);if(o.auth&&o.identities&&sn.default(s,o.identities).length==0)return!1;if(o.auth&&o.identityProviders){let u=Object.keys((n==null?void 0:n.identities)||{});if(sn.default(u,o.identityProviders).length==0)return!1}return i?o.crossUser===!0||sn.default(o.crossUser||[],s).length>0:!!this.has[e][r]}supportsScheme(e){if(!e)return!1;let r=Fe.default(this.schemes)?this.schemes:null;return r==null&&!M.isContainedIn(e,this.excludedSchemes||[])?!0:M.isContainedIn(e,r)}adjustConcept(e){if(!e||e.__SAVED__)return e;e._getNarrower=r=>this.getNarrower(z(R({},r),{concept:e})),e._getAncestors=r=>this.getAncestors(z(R({},r),{concept:e})),e._getDetails=r=>P(this,null,function*(){return(yield this.getConcepts(z(R({},r),{concepts:[e]})))[0]});for(let r of["broader","narrower","ancestors"])Array.isArray(e[r])&&e[r].length&&!e[r].includes(null)&&(e[r]=this.adjustConcepts(e[r]));return e._registry=this,e}adjustConcepts(e){return Ht(e.map(r=>this.adjustConcept(r)),e)}adjustRegistries(e){return e}adjustScheme(e){if(!e||e.__SAVED__)return e;let r=e._registry;return e._registry=this.cdk&&this.cdk.registryForScheme(e),!e._registry||r===e._registry||e._registry._api.api===this._api.api?e._registry=r||this:["concepts","topConcepts"].forEach(n=>{Array.isArray(e[n])&&(e[n].length===0||e[n][0]===null)&&delete e[n]}),e._registry&&(e._getTop=n=>e._registry.getTop(z(R({},n),{scheme:e})),e._getTypes=n=>e._registry.getTypes(z(R({},n),{scheme:e})),e._suggest=o=>{var s=o,{search:n}=s,i=Z(s,["search"]);return e._registry.suggest(z(R({},i),{search:n,scheme:e}))}),e}adjustSchemes(e){return Ht(e.map(r=>this.adjustScheme(r)),e)}adjustConcordances(e){for(let r of e)r._registry=this;return e}adjustMapping(e){for(let r of["from","to"]){let n=`${r}Scheme`;e[n]||(e[n]=ie.default(M.conceptsOfMapping(e,r),"[0].inScheme[0]",null))}if(e._registry=this,!e.identifier){let r=ie.default(M.addMappingIdentifiers(e),"identifier");r&&(e.identifier=r)}return e}adjustMappings(e){return Ht(e.map(r=>this.adjustMapping(r)),e)}postMappings(){return P(this,arguments,function*(n={}){var i=n,{mappings:e}=i,r=Z(i,["mappings"]);if(!e||!e.length)throw new W({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"postMapping",items:e,itemProperty:"mapping",config:r})})}deleteMappings(){return P(this,arguments,function*(n={}){var i=n,{mappings:e}=i,r=Z(i,["mappings"]);if(!e||!e.length)throw new W({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"deleteMapping",items:e,itemProperty:"mapping",config:r})})}_callHelperForArrayWrappers(o){return P(this,arguments,function*({method:e,items:r,itemProperty:n,config:i}){let s=[],u=yield Promise.all(r.map(a=>P(this,null,function*(){try{return yield this[e](z(R({[n]:a},i),{_raw:!0}))}catch(c){return s[r.indexOf(a)]=c,null}})));return u._errors=s,u})}};le.providerName="Base";var dt=Le(pd(),1);var Ue=[];for(let t=0;t<256;++t)Ue.push((t+256).toString(16).slice(1));function dd(t,e=0){return(Ue[t[e+0]]+Ue[t[e+1]]+Ue[t[e+2]]+Ue[t[e+3]]+"-"+Ue[t[e+4]]+Ue[t[e+5]]+"-"+Ue[t[e+6]]+Ue[t[e+7]]+"-"+Ue[t[e+8]]+Ue[t[e+9]]+"-"+Ue[t[e+10]]+Ue[t[e+11]]+Ue[t[e+12]]+Ue[t[e+13]]+Ue[t[e+14]]+Ue[t[e+15]]).toLowerCase()}var rs,LO=new Uint8Array(16);function ns(){if(!rs){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");rs=crypto.getRandomValues.bind(crypto)}return rs(LO)}var MO=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),is={randomUUID:MO};function FO(t,e,r){if(is.randomUUID&&!e&&!t)return is.randomUUID();t=t||{};let n=t.random||(t.rng||ns)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return dd(n)}var fi=FO;var li="urn:uuid:",Rt=class extends le{static get supports(){return{mappings:{read:!0,create:!0,update:!0,delete:!0}}}_setup(){this.queue=[],this.localStorageKey="cocoda-mappings--"+this._path;let e="mappings",r=()=>dt.default.getItem(this.localStorageKey).then(n=>{n=n||[];let i=0;for(let o of n.filter(s=>!s.uri||!s.uri.startsWith(li)))o.uri&&(o.identifier||(o.identifier=[]),o.identifier.push(o.uri)),o.uri=`${li}${fi()}`,i+=1;return i&&console.warn(`URIs added to ${i} local mappings.`),dt.default.setItem(this.localStorageKey,n)});dt.default.getItem(e).then(n=>{n&&console.warn(`Warning: There is old data in local storage (or IndexedDB, depending on the ) with the key "${e}". This data will not be used anymore. A manual export is necessary to get this data back.`)}),this.queue.push(r().catch(n=>{console.warn("Error when adding URIs to local mappings:",n)}))}isAuthorizedFor({type:e,action:r}){return e=="mappings"&&r!="anonymous"}_getMappingsQueue(){let e=ko.default(this.queue)||Promise.resolve();return new Promise(r=>{function n(){let s,u,a=new Promise((c,l)=>{s=c,u=l});return a.resolve=s,a.reject=u,a}let i=n(),o=()=>{i.resolve()};this.queue.push(i),e.then(()=>dt.default.getItem(this.localStorageKey)).then(s=>{r({mappings:s,done:o})})})}getMapping(n){return P(this,null,function*(){var i=n,{mapping:e}=i,r=Z(i,["mapping"]);if(r._raw=!0,!e||!e.uri)throw new W({parameter:"mapping"});return(yield this.getMappings(z(R({},r),{uri:e.uri})))[0]})}getMappings(){return P(this,arguments,function*({from:e,fromScheme:r,to:n,toScheme:i,creator:o,type:s,partOf:u,offset:a,limit:c,direction:l,mode:v,identifier:y,uri:_}={}){let d={};return e&&(d.from=Se.default(e)?e:e.uri),r&&(d.fromScheme=Se.default(r)?{uri:r}:r),n&&(d.to=Se.default(n)?n:n.uri),i&&(d.toScheme=Se.default(i)?{uri:i}:i),o&&(d.creator=Se.default(o)?o:M.prefLabel(o)),s&&(d.type=Se.default(s)?s:s.uri),u&&(d.partOf=Se.default(u)?u:u.uri),a&&(d.offset=a),c&&(d.limit=c),l&&(d.direction=l),v&&(d.mode=v),y&&(d.identifier=y),_&&(d.uri=_),this._getMappingsQueue().catch(C=>{throw new Me({message:"Could not get mappings from local storage",relatedError:C})}).then(({mappings:C,done:q})=>{q();let H=(j,te)=>j.uri==te||te&&j.notation&&j.notation[0].toLowerCase()==te.toLowerCase();if((d.from||d.to)&&(C=C.filter(j=>{let te=M.conceptsOfMapping(j,"from").find(Y=>H(Y,d.from))!=null,J=M.conceptsOfMapping(j,"to").find(Y=>H(Y,d.from))!=null,O=M.conceptsOfMapping(j,"from").find(Y=>H(Y,d.to))!=null,re=M.conceptsOfMapping(j,"to").find(Y=>H(Y,d.to))!=null;return d.direction=="backward"?d.mode=="or"?d.from&&J||d.to&&O:(!d.from||J)&&(!d.to||O):d.direction=="both"?d.mode=="or"?d.from&&(te||J)||d.to&&(O||re):(!d.from||te)&&(!d.to||re)||(!d.from||J)&&(!d.to||O):d.mode=="or"?d.from&&te||d.to&&re:(!d.from||te)&&(!d.to||re)})),(d.fromScheme||d.toScheme)&&(C=C.filter(j=>{let te=M.compare(j.fromScheme,d.fromScheme),J=M.compare(j.toScheme,d.fromScheme),O=M.compare(j.fromScheme,d.toScheme),re=M.compare(j.toScheme,d.toScheme);return d.direction=="backward"?d.mode=="or"?d.fromScheme&&J||d.toScheme&&O:(!d.fromScheme||J)&&(!d.toScheme||O):d.direction=="both"?d.mode=="or"?d.fromScheme&&(te||J)||d.toScheme&&(O||re):(!d.fromScheme||te)&&(!d.toScheme||re)||(!d.fromScheme||J)&&(!d.toScheme||O):d.mode=="or"?d.fromScheme&&te||d.toScheme&&re:(!d.fromScheme||te)&&(!d.toScheme||re)})),d.creator){let j=d.creator.split("|");C=C.filter(te=>(te.creator&&te.creator.find(J=>j.includes(M.prefLabel(J))||j.includes(J.uri)))!=null)}d.type&&(C=C.filter(j=>(j.type||[M.defaultMappingType.uri]).includes(d.type))),d.partOf&&(C=C.filter(j=>j.partOf!=null&&j.partOf.find(te=>M.compare(te,{uri:d.partOf}))!=null)),d.identifier&&(C=C.filter(j=>d.identifier.split("|").map(te=>(j.identifier||[]).includes(te)||j.uri==te).reduce((te,J)=>te||J))),d.uri&&(C=C.filter(j=>j.uri==d.uri));let X=C.length;return C=C.sort((j,te)=>{let J=j.modified||j.created,O=te.modified||te.created;return O==null?-1:J==null?1:J>O?-1:1}),C=C.slice(d.offset||0),C=C.slice(0,d.limit),C._totalCount=X,C})})}postMapping(r){return P(this,arguments,function*({mapping:e}){if(!e)throw new W({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue();if((!e.uri||!e.uri.startsWith(li))&&(e.uri&&(e.identifier||(e.identifier=[]),e.identifier.push(e.uri)),e.uri=`${li}${fi()}`),n.find(o=>o.uri==e.uri))throw i(),new W({parameter:"mapping",message:"Duplicate URI"});e.created||(e.created=new Date().toISOString()),e.modified||(e.modified=e.created),delete e.partOf,n.push(e),n=n.map(o=>M.minifyMapping(o));try{return yield dt.default.setItem(this.localStorageKey,n),i(),e}catch(o){throw i(),o}})}putMapping(r){return P(this,arguments,function*({mapping:e}){if(!e)throw new W({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue(),o=n.findIndex(s=>s.uri==e.uri);if(o==-1)throw i(),new W({parameter:"mapping",message:"Mapping not found"});e.created||(e.created=n[o].created),e.modified=new Date().toISOString(),delete e.partOf,n[o]=e,n=n.map(s=>M.minifyMapping(s));try{return yield dt.default.setItem(this.localStorageKey,n),i(),e}catch(s){throw i(),s}})}patchMapping(r){return P(this,arguments,function*({mapping:e}){if(!e)throw new W({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue(),o=n.findIndex(s=>s.uri==e.uri);if(o==-1)throw i(),new W({parameter:"mapping",message:"Mapping not found"});e.created||(e.created=n[o].created),e.modified=new Date().toISOString(),delete e.partOf,n[o]=Object.assign(n[o],e),n=n.map(s=>M.minifyMapping(s));try{return yield dt.default.setItem(this.localStorageKey,n),i(),e}catch(s){throw i(),s}})}deleteMapping(r){return P(this,arguments,function*({mapping:e}){if(!e)throw new W({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue();try{return n=n.filter(o=>o.uri!=e.uri),n=n.map(o=>M.minifyMapping(o)),yield dt.default.setItem(this.localStorageKey,n),i(),!0}catch(o){throw i(),o}})}};Rt.providerName="LocalMappings";Rt.stored=!0;var nt=class extends le{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=pt(this._api.api,"/status"))}_setup(){if(this._api.api){let e={mappings:"/mappings",concordances:"/concordances",annotations:"/annotations"};for(let r of Object.keys(e))this._api[r]===void 0&&(this._api[r]=pt(this._api.api,e[r]))}this.has.mappings=this._api.mappings?{}:!1,this.has.mappings&&(this.has.mappings.read=!!ie.default(this._config,"mappings.read",!0),this.has.mappings.create=!!ie.default(this._config,"mappings.create"),this.has.mappings.update=!!ie.default(this._config,"mappings.update"),this.has.mappings.delete=!!ie.default(this._config,"mappings.delete"),this.has.mappings.anonymous=!!ie.default(this._config,"mappings.anonymous")),this.has.concordances=this._api.concordances?{}:!1,this.has.concordances&&(this.has.concordances.read=!!ie.default(this._config,"concordances.read"),this.has.concordances.create=!!ie.default(this._config,"concordances.create"),this.has.concordances.update=!!ie.default(this._config,"concordances.update"),this.has.concordances.delete=!!ie.default(this._config,"concordances.delete")),this.has.annotations=this._api.annotations?{}:!1,this.has.annotations&&(this.has.annotations.read=!!ie.default(this._config,"annotations.read"),this.has.annotations.create=!!ie.default(this._config,"annotations.create"),this.has.annotations.update=!!ie.default(this._config,"annotations.update"),this.has.annotations.delete=!!ie.default(this._config,"annotations.delete")),this.has.auth=ie.default(this._config,"auth.key")!=null,this._defaultParams={properties:"annotations"}}getMapping(n){return P(this,null,function*(){var i=n,{mapping:e}=i,r=Z(i,["mapping"]);if(!e)throw new W({parameter:"mapping"});if(!e.uri||!e.uri.startsWith(this._api.mappings))throw new W({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});try{return yield this.axios(z(R({},r),{url:e.uri,params:R(R({},this._defaultParams),r.params||{})}))}catch(o){if(ie.default(o,"response.status")==404)return null;throw o}})}getMappings(te){return P(this,null,function*(){var J=te,{from:e,fromScheme:r,to:n,toScheme:i,creator:o,type:s,partOf:u,offset:a,limit:c,direction:l,mode:v,identifier:y,cardinality:_,annotatedBy:d,annotatedFor:C,annotatedWith:q,sort:H,order:X}=J,j=Z(J,["from","fromScheme","to","toScheme","creator","type","partOf","offset","limit","direction","mode","identifier","cardinality","annotatedBy","annotatedFor","annotatedWith","sort","order"]);let O={},re=this._api.mappings;return e&&(O.from=Se.default(e)?e:e.uri),r&&(O.fromScheme=Se.default(r)?r:r.uri),n&&(O.to=Se.default(n)?n:n.uri),i&&(O.toScheme=Se.default(i)?i:i.uri),o&&(O.creator=Se.default(o)?o:M.prefLabel(o)),s&&(O.type=Se.default(s)?s:s.uri),u&&(O.partOf=Se.default(u)?u:u.uri),a&&(O.offset=a),c&&(O.limit=c),l&&(O.direction=l),_&&(O.cardinality=_),d&&(O.annotatedBy=d),C&&(O.annotatedFor=C),q&&(O.annotatedWith=q),v&&(O.mode=v),y&&(O.identifier=y),H&&(O.sort=H),X&&(O.order=X),this.axios(z(R({},j),{method:"get",url:re,params:R(R(R({},this._defaultParams),j.params||{}),O)}))})}postMapping(n){return P(this,null,function*(){var i=n,{mapping:e}=i,r=Z(i,["mapping"]);if(!e)throw new W({parameter:"mapping"});return e=M.minifyMapping(e),e=M.addMappingIdentifiers(e),this.axios(z(R({},r),{method:"post",url:this._api.mappings,data:e,params:R(R({},this._defaultParams),r.params||{})}))})}putMapping(n){return P(this,null,function*(){var i=n,{mapping:e}=i,r=Z(i,["mapping"]);if(!e)throw new W({parameter:"mapping"});e=M.minifyMapping(e),e=M.addMappingIdentifiers(e);let o=e.uri;if(!o||!o.startsWith(this._api.mappings))throw new W({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return this.axios(z(R({},r),{method:"put",url:o,data:e,params:R(R({},this._defaultParams),r.params||{})}))})}patchMapping(n){return P(this,null,function*(){var i=n,{mapping:e}=i,r=Z(i,["mapping"]);if(!e)throw new W({parameter:"mapping"});let o=e.uri;if(!o||!o.startsWith(this._api.mappings))throw new W({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return this.axios(z(R({},r),{method:"patch",url:o,data:ht.default(e,"uri"),params:R(R({},this._defaultParams),r.params||{})}))})}deleteMapping(n){return P(this,null,function*(){var i=n,{mapping:e}=i,r=Z(i,["mapping"]);if(!e)throw new W({parameter:"mapping"});let o=e.uri;if(!o||!o.startsWith(this._api.mappings))throw new W({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return yield this.axios(z(R({},r),{method:"delete",url:o})),!0})}getAnnotations(n){return P(this,null,function*(){var i=n,{target:e}=i,r=Z(i,["target"]);return e&&Ae.default(r,"params.target",e),this.axios(z(R({},r),{method:"get",url:this._api.annotations}))})}postAnnotation(n){return P(this,null,function*(){var i=n,{annotation:e}=i,r=Z(i,["annotation"]);return this.axios(z(R({},r),{method:"post",url:this._api.annotations,data:e}))})}putAnnotation(n){return P(this,null,function*(){var i=n,{annotation:e}=i,r=Z(i,["annotation"]);let o=e.id;if(!o||!o.startsWith(this._api.annotations))throw new W({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return this.axios(z(R({},r),{method:"put",url:o,data:e}))})}patchAnnotation(n){return P(this,null,function*(){var i=n,{annotation:e}=i,r=Z(i,["annotation"]);let o=e.id;if(!o||!o.startsWith(this._api.annotations))throw new W({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return this.axios(z(R({},r),{method:"patch",url:o,data:e}))})}deleteAnnotation(n){return P(this,null,function*(){var i=n,{annotation:e}=i,r=Z(i,["annotation"]);let o=e.id;if(!o||!o.startsWith(this._api.annotations))throw new W({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return yield this.axios(z(R({},r),{method:"delete",url:o})),!0})}getConcordances(e){return P(this,null,function*(){return this.axios(z(R({},e),{method:"get",url:this._api.concordances}))})}postConcordance(n){return P(this,null,function*(){var i=n,{concordance:e}=i,r=Z(i,["concordance"]);if(!e)throw new W({parameter:"concordance"});return this.axios(z(R({},r),{method:"post",url:this._api.concordances,data:e,params:R(R({},this._defaultParams),r.params||{})}))})}putConcordance(n){return P(this,null,function*(){var i=n,{concordance:e}=i,r=Z(i,["concordance"]);if(!e)throw new W({parameter:"concordance"});let o=e.uri;if(!o||!o.startsWith(this._api.concordances))throw new W({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return this.axios(z(R({},r),{method:"put",url:o,data:e,params:R(R({},this._defaultParams),r.params||{})}))})}patchConcordance(n){return P(this,null,function*(){var i=n,{concordance:e}=i,r=Z(i,["concordance"]);if(!e)throw new W({parameter:"concordance"});let o=e.uri;if(!o||!o.startsWith(this._api.concordances))throw new W({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return this.axios(z(R({},r),{method:"patch",url:o,data:ht.default(e,"uri"),params:R(R({},this._defaultParams),r.params||{})}))})}deleteConcordance(n){return P(this,null,function*(){var i=n,{concordance:e}=i,r=Z(i,["concordance"]);if(!e)throw new W({parameter:"concordance"});let o=e.uri;if(!o||!o.startsWith(this._api.concordances))throw new W({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return yield this.axios(z(R({},r),{method:"delete",url:o})),!0})}};Oe(nt,"supports",{mappings:!0,concordances:!0,annotations:!0});nt.providerName="MappingsApi";nt.stored=!0;var os={},mt=class extends le{get _cache(){return os[this.uri]}_prepare(){os[this.uri]=[],this._occurrencesSupportedSchemes=[]}_occurrencesIsSupported(e){return P(this,null,function*(){if(!(this._occurrencesSupportedSchemes&&this._occurrencesSupportedSchemes.length))try{let n=pt(this._api.api,"voc"),i=yield this.axios({method:"get",url:n});this._occurrencesSupportedSchemes=i||[]}catch(n){}let r=!1;for(let n of this._occurrencesSupportedSchemes)M.compare(e,n)&&(r=!0);return r})}getMappings(e){return P(this,null,function*(){let r=yield this.getOccurrences(e),n=e.from,i=ie.default(n,"inScheme[0]")||e.fromScheme,o=e.to,s=ie.default(o,"inScheme[0]")||e.toScheme,u=[];for(let a of r){if(!a)continue;let c={};c.from=ie.default(a,"memberSet[0]"),c.from?c.from={memberSet:[c.from]}:c.from=null,c.fromScheme=ie.default(a,"memberSet[0].inScheme[0]"),c.to=ie.default(a,"memberSet[1]"),c.to?c.to={memberSet:[c.to]}:c.to={memberSet:[]},c.toScheme=ie.default(a,"memberSet[1].inScheme[0]"),(n&&M.compare(n,ie.default(c,"to.memberSet[0]"))||o&&M.compare(o,ie.default(c,"from.memberSet[0]")))&&([c.from,c.fromScheme,c.to,c.toScheme]=[c.to,c.toScheme,c.from,c.fromScheme]),!c.fromScheme&&i&&(c.fromScheme=i),!c.toScheme&&s&&(c.toScheme=s),c.type=[M.defaultMappingType.uri],c._occurrence=a,c=M.addMappingIdentifiers(c),u.push(c)}return u._url=r._url,u})}getOccurrences(s){return P(this,null,function*(){var u=s,{from:e,to:r,concepts:n,threshold:i=0}=u,o=Z(u,["from","to","concepts","threshold"]);let a=[];n=(n||[]).concat([e,r]).filter(d=>!!d);for(let d of n)a.push(this._occurrencesIsSupported(ie.default(d,"inScheme[0]")).then(C=>C&&d.uri?d.uri:null));let c=yield Promise.all(a);if(c=c.filter(d=>d!=null),c.length==0)throw new W({parameter:"concepts"});a=[];for(let d of c)a.push(this._getOccurrences(z(R({},o),{params:{member:d,scheme:"*",threshold:i}})));let l=yield Promise.all(a),v=$o.default([],...l),y=[],_=[];for(let d=0;d<v.length;d+=1){let C=v[d];if(!C)continue;let q=C.memberSet.reduce((H,X)=>H.concat(X.uri),[]).sort().join(" ");y.includes(q)?_.push(d):y.push(q)}return _.forEach(d=>{delete v[d]}),v=v.filter(d=>d!=null),v=v.sort((d,C)=>parseInt(C.count||0)-parseInt(d.count||0)),v._url=l.map(d=>d._url),v})}_getOccurrences(e){return P(this,null,function*(){let r=this._cache.find(i=>ut.default(i.config.params,e.params));if(r)return r.data;let n=yield this.axios(z(R({},e),{method:"get",url:this._api.api}));return this._cache.push({config:e,data:n}),this._cache.length>20&&(os[this.uri]=this._cache.slice(this._cache.length-20)),n})}};Oe(mt,"supports",{occurrences:!0,mappings:!0});mt.providerName="OccurrencesApi";mt.stored=!1;var it=class extends le{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=pt(this._api.api,"/status"))}_setup(){if(this._api.api){let e={schemes:"/voc",top:"/voc/top",concepts:"/voc/concepts",data:"/data",narrower:"/narrower",ancestors:"/ancestors",types:"/types",suggest:"/suggest",search:"/search"};for(let r of Object.keys(e))this._api[r]===void 0&&(this._api[r]=pt(this._api.api,e[r]))}this.has.schemes=!!this._api.schemes,!this.has.schemes&&Array.isArray(this.schemes)&&(this.has.schemes=!0),this.has.top=!!this._api.top,this.has.data=!!this._api.data,this.has.concepts=!!this._api.concepts||this.has.data,this.has.narrower=!!this._api.narrower,this.has.ancestors=!!this._api.ancestors,this.has.types=!!this._api.types,this.has.suggest=!!this._api.suggest,this.has.search=!!this._api.search,this.has.auth=ie.default(this._config,"auth.key")!=null,this._defaultParams={properties:"+created,issued,modified,editorialNote,scopeNote,note,definition,mappings,location"}}static _registryConfigForBartocApiConfig({url:e,scheme:r}={}){return!e||!r?null:{api:e,schemes:[r]}}_getSchemeUri(e){return P(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let r=this._approvedSchemes.find(o=>M.compare(e,o));if(r)return r.uri;if(this._rejectedSchemes.find(o=>M.compare(e,o)))return null;let i=(yield this.getSchemes({params:{uri:M.getAllUris(e).join("|")}})).find(o=>M.compare(o,e));return i?(this._approvedSchemes.push({uri:i.uri,identifier:M.getAllUris(e)}),i.uri):(this._rejectedSchemes.push({uri:e.uri,identifier:e.identifier}),null)})}getSchemes(){return P(this,arguments,function*(e={}){if(!this._api.schemes){if(Array.isArray(this.schemes))return this.schemes;throw new ze}let r=yield this.axios(z(R({},e),{method:"get",url:this._api.schemes,params:R(z(R({},this._defaultParams),{limit:500}),e.params||{})}));return Array.isArray(this.schemes)?Ht(r.filter(n=>M.isContainedIn(n,this.schemes)),r):r})}getTop(n){return P(this,null,function*(){var i=n,{scheme:e}=i,r=Z(i,["scheme"]);if(!this._api.top)throw new ze;if(!e)throw new W({parameter:"scheme"});let o=yield this._getSchemeUri(e);if(!o)throw new W({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return Array.isArray(this._api.top)?this._api.top:this.axios(z(R({},r),{method:"get",url:this._api.top,params:z(R(z(R({},this._defaultParams),{limit:1e4}),r.params||{}),{uri:o})}))})}getConcepts(n){return P(this,null,function*(){var i=n,{concepts:e}=i,r=Z(i,["concepts"]);if(this.has.data===!1)throw new ze;if(!e)throw new W({parameter:"concepts"});Array.isArray(e)||(e=[e]);let o=e.map(s=>s.uri).filter(s=>s!=null);return this.axios(z(R({},r),{method:"get",url:this._api.data,params:z(R(z(R({},this._defaultParams),{limit:500}),r.params||{}),{uri:o.join("|")})}))})}getNarrower(n){return P(this,null,function*(){var i=n,{concept:e}=i,r=Z(i,["concept"]);if(!this._api.narrower)throw new ze;if(!e||!e.uri)throw new W({parameter:"concept"});return this.axios(z(R({},r),{method:"get",url:this._api.narrower,params:z(R(z(R({},this._defaultParams),{limit:1e4}),r.params||{}),{uri:e.uri})}))})}getAncestors(n){return P(this,null,function*(){var i=n,{concept:e}=i,r=Z(i,["concept"]);if(!this._api.ancestors)throw new ze;if(!e||!e.uri)throw new W({parameter:"concept"});return this.axios(z(R({},r),{method:"get",url:this._api.ancestors,params:z(R(z(R({},this._defaultParams),{limit:1e4}),r.params||{}),{uri:e.uri})}))})}suggest(s){return P(this,null,function*(){var u=s,{use:e="notation,label",types:r=[],sort:n="score",params:i={}}=u,o=Z(u,["use","types","sort","params"]);return this._search(z(R({},o),{endpoint:"suggest",params:z(R({},i),{type:r.join("|"),use:e,sort:n})}))})}search(i){return P(this,null,function*(){var o=i,{types:e=[],params:r={}}=o,n=Z(o,["types","params"]);return this._search(z(R({},n),{endpoint:"search",params:z(R({},r),{type:e.join("|")})}))})}vocSuggest(o){return P(this,null,function*(){var s=o,{use:e="notation,label",sort:r="score",params:n={}}=s,i=Z(s,["use","sort","params"]);return this._search(z(R({},i),{endpoint:"voc-suggest",params:z(R({},n),{use:e,sort:r})}))})}vocSearch(e){return P(this,null,function*(){return this._search(z(R({},e),{endpoint:"voc-search"}))})}_search(c){return P(this,null,function*(){var l=c,{endpoint:e,scheme:r,search:n,limit:i,offset:o,params:s,url:u}=l,a=Z(l,["endpoint","scheme","search","limit","offset","params","url"]);if(u=u!=null?u:this._api[e],!u)throw new ze;if(!n)throw new W({parameter:"search"});i=i||this._jskos.suggestResultLimit||100,o=o||0;let v=r&&(yield this._getSchemeUri(r));return u=u.replace("{searchTerms}",n),this.axios(z(R({},a),{params:z(R(R({},this._defaultParams),s),{limit:i,count:i,offset:o,search:n,query:n,voc:v}),method:"get",url:u}))})}getTypes(n){return P(this,null,function*(){var i=n,{scheme:e}=i,r=Z(i,["scheme"]);if(!this._api.types)throw new ze;if(Array.isArray(this._api.types))return this._api.types;let o=e&&(yield this._getSchemeUri(e));o&&Ae.default(r,"params.uri",o);let s=yield this.axios(z(R({},r),{method:"get",url:this._api.types}));return o&&(s=s.filter(u=>!u.inScheme||M.isContainedIn(e,u.inScheme))),s})}};Oe(it,"supports",{schemes:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,types:!0,suggest:!0,search:!0,auth:!0});it.providerName="ConceptApi";it.providerType="http://bartoc.org/api-type/jskos";var ss={},ct=class extends le{get _cache(){return ss[this.uri]}_prepare(){ss[this.uri]=[]}getMappings(o){return P(this,null,function*(){var s=o,{from:e,to:r,mode:n}=s,i=Z(s,["from","to","mode"]);let u=[];Fe.default(this.schemes)&&(u=this.schemes);let a,c,l=ie.default(e,"inScheme[0]"),v=ie.default(r,"inScheme[0]"),y,_;if(!e||M.isContainedIn(l,u)?(a=!0,c=r,y=v,_=u.find(O=>M.compare(O,l))||u[0]):(a=!1,c=e,y=l,_=u.find(O=>M.compare(O,v))||u[0]),n!="or")return[];if(!this._api.api)throw new ze;if(!c)throw new W({parameter:a?"to":"from"});let d=M.languagePreference.selectLanguage(c.prefLabel);if(!d)throw new W({parameter:a?"to":"from",message:"Missing language"});let C=ie.default(c,`altLabel.${d}`,[]);Se.default(C)&&(C=[C]);let q=ie.default(c,`prefLabel.${d}`),H=C.concat([q]);H=[q];let{url:X,data:j}=yield this._getReconciliationResults(z(R({},i),{labels:H,language:d}));j=[].concat(...Object.values(j).map(O=>O.result)).filter(O=>O),j=j.sort((O,re)=>O.score!=re.score?re.score-O.score:O.match!=re.match?O.match?-1:1:O.id.length-re.id.length);let te=ie.default(_,"namespace",""),J=j.map(O=>({fromScheme:y,from:{memberSet:[c]},toScheme:_,to:{memberSet:[{uri:te+O.id}]},type:[O.match?"http://www.w3.org/2004/02/skos/core#exactMatch":O.score>=80?"http://www.w3.org/2004/02/skos/core#closeMatch":"http://www.w3.org/2004/02/skos/core#mappingRelation"]}));return a&&(J=J.map(O=>Object.assign(O,{fromScheme:O.toScheme,from:O.to,toScheme:O.fromScheme,to:O.from}))),J._url=X,J})}_getReconciliationResults(i){return P(this,null,function*(){var o=i,{labels:e,language:r}=o,n=Z(o,["labels","language"]);e=e.sort();let s=this._cache.find(_=>ut.default(_.labels,e)&&_.language==r);if(s)return s;let u={},a=0;for(let _ of e)u[`q${a}`]={query:_},a+=1;let c=this._api.api;r&&(c=c.replace("{language}",r));let l=`queries=${encodeURIComponent(JSON.stringify(u))}`;Ae.default(n,["headers","Content-Type"],"application/x-www-form-urlencoded");let v=yield this.axios(z(R({},n),{method:"post",url:c,data:l}));v=v||{};let y={labels:e,language:r,data:v,url:`${c}${c.includes("?")?"&":"?"}${l}`};return this._cache.push(y),this._cache.length>20&&(ss[this.uri]=this._cache.slice(this._cache.length-20)),y})}};Oe(ct,"supports",{mappings:!0});ct.providerName="ReconciliationApi";ct.providerType="http://bartoc.org/api-type/reconciliation";ct.stored=!1;var gt=class extends le{_prepare(){this._cache=[]}supportsScheme(e){return super.supportsScheme(e)&&ie.default(e,"_registry.has.search",!1)}getMappings(u){return P(this,null,function*(){var a=u,{from:e,to:r,mode:n,selected:i,limit:o=10}=a,s=Z(a,["from","to","mode","selected","limit"]);if(n!="or")return[];if(!i)throw new W({parameter:"selected"});let c=[];e&&this.supportsScheme(i.scheme[!1])?c.push(this._getMappings(z(R({},s),{concept:e,sourceScheme:i.scheme[!0],targetScheme:i.scheme[!1],limit:o}))):c.push(Promise.resolve([])),r&&this.supportsScheme(i.scheme[!0])?c.push(this._getMappings(z(R({},s),{concept:r,sourceScheme:i.scheme[!1],targetScheme:i.scheme[!0],limit:o,swap:!0}))):c.push(Promise.resolve([]));let[l,v]=yield Promise.all(c);for(v=v.filter(y=>!l.find(_=>M.compareMappingMembers(y,_)));l.length+v.length>o;)v.length>=l.length?v=v.slice(0,-1):l=l.slice(0,-1);return jo.default(l,v)})}_getMappings(u){return P(this,null,function*(){var a=u,{concept:e,sourceScheme:r,targetScheme:n,limit:i,swap:o=!1}=a,s=Z(a,["concept","sourceScheme","targetScheme","limit","swap"]);var d;if(!e||!r||!n)return[];if(M.compare(r,n))return[];let c=M.languagePreference.selectLanguage(e.prefLabel)||this._defaultLanguages[0],l=M.prefLabel(e,{fallbackToUri:!1,language:c});if(!l)return[];let v=/^[\s\wäüöÄÜÖß]*\w/.exec(l);l=v?v[0]:l;let y=yield this._getResults(z(R({},s),{label:l,targetScheme:n,limit:i}));if(!y.length&&((d=e.broader)!=null&&d.length))for(let C of e.broader){let q=M.prefLabel(C,{fallbackToUri:!1,language:c});if(q&&(y=yield this._getResults(z(R({},s),{label:q,targetScheme:n,limit:i})),y.length))break}let _=y.map(C=>({fromScheme:r,from:{memberSet:[e]},toScheme:n,to:{memberSet:[C]},type:["http://www.w3.org/2004/02/skos/core#mappingRelation"]}));return o&&(_=_.map(C=>Object.assign(C,{fromScheme:C.toScheme,from:C.to,toScheme:C.fromScheme,to:C.from}))),_})}_getResults(o){return P(this,null,function*(){var s=o,{label:e,targetScheme:r,limit:n}=s,i=Z(s,["label","targetScheme","limit"]);var v;let u=(this._cache[r.uri]||{})[e];if(u&&u._limit>=n)return u;let a=ie.default(r,"_registry");if(!a||a.has.search===!1)return[];let c=(v=(this._jskos.overrides||[]).find(y=>M.compare(y,r)))==null?void 0:v.search,l=yield a.search(z(R({},i),{url:c,search:e,scheme:r,limit:n}));return this._cache[r.uri]||(this._cache[r.uri]={}),this._cache[r.uri][e]=l,this._cache[r.uri][e]._limit=n,l})}};Oe(gt,"supports",{mappings:!0});gt.providerName="LabelSearchSuggestion";gt.stored=!1;var yt=class extends le{static _registryConfigForBartocApiConfig({url:e,scheme:r}={}){if(!e||!r)return null;let n={},i=e.match(/(.+\/)([^/]+)\/$/);return i?(n.api=i[1]+"rest/v1/",r.VOCID=i[2],n.schemes=[r],n):null}get _language(){return this.languages[0]||this._defaultLanguages[0]||"en"}_getApiUrl(e,r,n){let i=e&&e.VOCID||ie.default(this.schemes.find(s=>M.compare(s,e)),"VOCID");if(!i)throw new W({parameter:"scheme",message:"Missing scheme or VOCID property on scheme"});r=r||"",n=n||{},n.lang||(n.lang=this._language);let o=Object.keys(n).map(s=>`${s}=${encodeURIComponent(n[s])}`).join("&");return`${this._api.api}${i}${r}${o?"?"+o:""}`}_getDataUrl(e,{addFormatParameter:r=!0}={}){let n=ie.default(e,"inScheme[0]");if(!e||!e.uri)throw new W({parameter:"concept",message:"Missing concept URI"});return this._getApiUrl(n,"/data",r?{format:"application/json"}:{})}_getSchemeUri(e){return P(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let r=this._approvedSchemes.find(s=>M.compare(e,s));if(r)return r.uri;if(this._rejectedSchemes.find(s=>M.compare(e,s)))return null;let n=this._getApiUrl(e,"/"),o=(yield this.axios({method:"get",url:n})).conceptschemes.find(s=>M.compare(s,e));return o?(this._approvedSchemes.push({uri:o.uri,identifier:M.getAllUris(e)}),o.uri):(this._rejectedSchemes.push({uri:e.uri,identifier:e.identifier}),null)})}_toJskosConcept(e,{concept:r,scheme:n,result:i,language:o}={}){if(!e)return null;r=M.deepCopy(r||{}),o=o||e.lang||"en",r.uri=e.uri,n&&(r.inScheme=[n]);let s=e.matchedPrefLabel||e.prefLabel||e.label;if(Se.default(s))Ae.default(r,`prefLabel.${o}`,s);else{s&&!Fe.default(s)&&(s=[s]);for(let c of s||[])Ae.default(r,`prefLabel.${c.lang}`,c.value)}let u=e.altLabel;if(Se.default(u))Ae.default(r,`altLabel.${o}`,[u]);else{u&&!Fe.default(u)&&(u=[u]);for(let c of u||[])ie.default(r,`altLabel.${c.lang}`)?(r.altLabel[c.lang].push(c.value),r.altLabel[c.lang]=Pt.default(r.altLabel[c.lang])):Ae.default(r,`altLabel.${c.lang}`,[c.value])}let a=e.notation||e["skos:notation"]||M.notation(r);a&&(r.notation=[a.value||a]),e.broader&&(Fe.default(e.broader)||(e.broader=[e.broader]),r.broader=e.broader.map(c=>Se.default(c)?{uri:c}:c)),e.hasChildren===!0?r.narrower=[null]:e.hasChildren===!1&&(r.narrower=[]),e.type&&!Fe.default(e.type)&&(e.type=[e.type]),r.type=r.type||[];for(let c of e.type||[]){if(!M.isValidUri(c))continue;let l=c.slice(0,c.indexOf(":"));i&&i["@context"]&&i["@context"][l]&&(c=c.replace(l+":",i["@context"][l])),r.type.push(c)}return r.type=Pt.default(r.type),r.type.length||(r.type=["http://www.w3.org/2004/02/skos/core#Concept"]),r}getSchemes(){return P(this,arguments,function*(r={}){var e=Z(r,[]);let n=[];for(let i of this.schemes||[]){let o=this._getApiUrl(i,"/"),u=(yield this.axios(z(R({},e),{method:"get",url:o}))).conceptschemes.find(c=>M.compare(c,i)),a=u&&(u.prefLabel||u.label||u.title);a&&Ae.default(i,`prefLabel.${this._language}`,a),n.push(i),this._approvedSchemes=this._approvedSchemes||[],this._approvedSchemes.find(c=>M.compare(i,c))||this._approvedSchemes.push({uri:u.uri,identifier:M.getAllUris(i)})}return n})}getTop(n){return P(this,null,function*(){var i=n,{scheme:e}=i,r=Z(i,["scheme"]);let o=this._getApiUrl(e,"/topConcepts"),s=yield this._getSchemeUri(e);if(!s)throw new W({parameter:"scheme",message:"Missing or unsupported scheme or VOCID property on scheme"});Ae.default(r,"params.scheme",s);let u=yield this.axios(z(R({},r),{method:"get",url:o})),a=[];for(let c of u.topconcepts||[]){let l=this._toJskosConcept(c,{scheme:e,language:this._language});l.topConceptOf=[e],a.push(l)}return a})}getConcepts(n){return P(this,null,function*(){var i=n,{concepts:e}=i,r=Z(i,["concepts"]);Fe.default(e)||(e=[e]),e=e.map(s=>({uri:s.uri,inScheme:s.inScheme}));let o=[];for(let s of e){let u=this._getDataUrl(s,{addFormatParameter:!1});if(!u)continue;let a=yield this.axios(z(R({},r),{method:"get",url:u,params:{uri:s.uri,format:"application/json"}})),c=a&&a.graph&&a.graph.find(l=>M.compare(l,s));if(c){let l=this._toJskosConcept(c,{concept:s,result:a});for(let v of["broader","narrower"]){let y=c[v]||l[v];y&&!Fe.default(y)&&(y=[y]),y||(y=[]),l[v]=y.map(_=>this._toJskosConcept(a.graph.find(d=>M.compare(d,_)),{scheme:s.inScheme[0],result:a}))}l.ancestors=[],o.push(l)}}return o})}getNarrower(n){return P(this,null,function*(){var i=n,{concept:e}=i,r=Z(i,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});let o=e.inScheme[0],s=this._getApiUrl(o,"/children");return Ae.default(r,"params.uri",e.uri),((yield this.axios(z(R({},r),{method:"get",url:s}))).narrower||[]).map(c=>this._toJskosConcept(c,{scheme:o}))})}getAncestors(n){return P(this,null,function*(){var i=n,{concept:e}=i,r=Z(i,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});let o=e.inScheme[0],s=this._getApiUrl(o,"/broaderTransitive");Ae.default(r,"params.uri",e.uri);let u=yield this.axios(z(R({},r),{method:"get",url:s})),a=[],c=e.uri;for(;c;){if(c!=e.uri){let v=ie.default(u,`broaderTransitive["${c}"]`);a=a.concat([v])}c=ie.default(u,`broaderTransitive["${c}"].broader[0]`)}return a.map(v=>this._toJskosConcept(v,{scheme:o})).filter(v=>v.uri!=e.uri)})}suggest(e){return P(this,null,function*(){e._raw=!0;let r=yield this.search(e),n=[e.search,[],[],[]];for(let i of r){let o=M.notation(i),s=M.prefLabel(i);n[1].push((o?o+" ":"")+s),n[2].push(""),n[3].push(i.uri)}return r._totalCount!=null?n._totalCount=r._totalCount:n._totalCount=r.length,n})}search(s){return P(this,null,function*(){var u=s,{search:e,scheme:r,limit:n,types:i=[]}=u,o=Z(u,["search","scheme","limit","types"]);let a=this._getApiUrl(r,"/search");return Ae.default(o,"params.query",`${e}*`),Ae.default(o,"params.unique",1),Ae.default(o,"params.maxhits",n||100),Ae.default(o,"params.type",i.join(" ")),((yield this.axios(z(R({},o),{method:"get",url:a}))).results||[]).map(v=>this._toJskosConcept(v,{scheme:r}))})}getTypes(n){return P(this,null,function*(){var i=n,{scheme:e}=i,r=Z(i,["scheme"]);let o=this._getApiUrl(e,"/types"),s=[],u=yield this.axios(z(R({},r),{method:"get",url:o}));for(let a of u&&u.types||[])a.uri!="http://www.w3.org/2004/02/skos/core#Concept"&&(a.label&&(a.prefLabel={[u["@context"]["@language"]]:a.label},delete a.label),s.push(a));return s._url=o,s})}};Oe(yt,"supports",{scheme:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,types:!0,suggest:!0,search:!0});yt.providerName="SkosmosApi";yt.providerType="http://bartoc.org/api-type/skosmos";var pi="http://id.loc.gov/authorities/",hi=[{uri:`${pi}subjects`,identifier:["http://bartoc.org/en/node/454"],notation:["LCSH"],concepts:[null],topConcepts:[]},{uri:`${pi}names`,identifier:["http://bartoc.org/en/node/18536"],notation:["LCNAF"],concepts:[null],topConcepts:[]}],md=`${pi}classification`;function gd(t){let e={};e.uri=t["@id"],e.notation=(t["http://www.loc.gov/mads/rdf/v1#code"]||[]).map(i=>i["@value"]);let r=t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]||t["http://www.w3.org/2000/01/rdf-schema#label"]||[];r.length&&(e.prefLabel={},e.prefLabel[r[0]["@language"]||"en"]=r[0]["@value"]);let n=t["http://www.w3.org/2004/02/skos/core#altLabel"]||[];n.length&&(e.altLabel={en:n.map(i=>i["@value"])});for(let i of t["http://www.w3.org/2000/01/rdf-schema#comment"]||[])e.definition=e.definition||{},e.definition.en=e.definition.en||[],e.definition.en.push(i["@value"]);return e}function NO(t){let e=gd(t);return e.namespace=e.uri+"/",e.type=["http://www.w3.org/2004/02/skos/core#ConceptScheme"],e}var as=t=>e=>!e||!t||!t.namespace?!0:e.uri.startsWith(t.namespace);function jO(t,{scheme:e}){let r=gd(t);r.type=["http://www.w3.org/2004/02/skos/core#Concept"],r.inScheme=e?[e]:(t["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSScheme"]||[]).map(o=>hi.find(s=>s.uri===o["@id"])),(!r.inScheme.length||!r.inScheme[0])&&delete r.inScheme;let n=t["http://www.loc.gov/mads/rdf/v1#hasNarrowerAuthority"]||M.compare(r.inScheme[0],{uri:md})&&t["http://www.loc.gov/mads/rdf/v1#hasMADSCollectionMember"]||[];r.narrower=n.map(o=>({uri:o["@id"]})).filter(as(r.inScheme&&r.inScheme[0]));let i=t["http://www.loc.gov/mads/rdf/v1#hasBroaderAuthority"]||M.compare(r.inScheme[0],{uri:md})&&t["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSCollection"]||[];return r.broader=i.map(o=>({uri:o["@id"]})).filter(as(r.inScheme&&r.inScheme[0])),r}var vt=class extends le{static _registryConfigForBartocApiConfig({scheme:e}={}){return!e||!hi.find(r=>M.compare(r,e))?null:{schemes:[e]}}getSchemes(){return P(this,null,function*(){let e=[];for(let r of yield Promise.all(hi.filter(n=>!this.schemes||!this.schemes.length||this.schemes.find(i=>M.compare(n,i))).map(n=>Pe({method:"get",url:`${n.uri.replace("http:","https:")}.json`}).then(({status:i,data:o})=>{if(i===200){let s=o.find(u=>n.uri===u["@id"]);if(s)return s=M.merge(NO(s),n),s.topConcepts=(s.topConcepts||[]).filter(u=>u),s}return null}))))r&&e.push(r);return e})}getConcepts(r){return P(this,arguments,function*({concepts:e}){Array.isArray(e)||(e=[e]);let n=[];for(let i of yield Promise.all(e.map(o=>Pe({method:"get",url:`${o.uri.replace("http:","https:")}.json`}).then(({status:s,data:u})=>{if(s===200){let a=u.find(c=>o.uri===c["@id"]);return a?jO(a,{scheme:o.inScheme&&o.inScheme[0]}):null}}))))i&&n.push(i);return n})}suggest(e){return P(this,null,function*(){let r=yield this.search(e);return[e.search,r.map(n=>M.prefLabel(n,{fallbackToUri:!0})),[],r.map(n=>n.uri)]})}search(o){return P(this,arguments,function*({search:e,scheme:r,limit:n,offset:i}){let s=M.getAllUris(r).find(a=>a.startsWith(pi));if(!s||!hi.find(a=>M.compare(a,{uri:s})))throw new W({parameter:"scheme",message:"provided scheme is not supported (yet)"});if(!e)throw new W({parameter:"search",message:"parameter is empty or missing"});n=n||this._jskos.suggestResultLimit||100,i=i||0;let{data:u}=yield Pe({method:"get",url:`${s}/suggest2`.replace("http:","https:"),params:{q:e,count:n||100,offset:i,searchtype:"keyword"}});return(u.hits||[]).map(a=>({uri:a.uri,notation:[a.token],prefLabel:{en:a.aLabel},inScheme:[r]})).filter(as(r))})}};Oe(vt,"supports",{schemes:!0,top:!1,data:!0,concepts:!0,narrower:!1,ancestors:!1,suggest:!0,search:!0});vt.providerName="LocApi";vt.providerType="http://bartoc.org/api-type/loc";var vd=Le(cs(),1);function di(t){return t.replace(/\\u[\dA-F]{4}/gi,function(e){return String.fromCharCode(parseInt(e.replace(/\\u/g,""),16))})}var Kt={},wt=class extends le{_prepare(){Kt[this.uri]={index:{},conceptCache:{},schemeCache:{}}}get _index(){return Kt[this.uri]&&Kt[this.uri].index}get _conceptCache(){return Kt[this.uri]&&Kt[this.uri].conceptCache}get _schemeCache(){return Kt[this.uri]&&Kt[this.uri].schemeCache}static _registryConfigForBartocApiConfig({url:e,scheme:r}={}){return!e||!r?null:{schemes:[{uri:e,identifier:M.getAllUris(r).filter(i=>i!==e)}]}}_loadScheme(n){return P(this,null,function*(){var i=n,{scheme:e}=i,r=Z(i,["scheme"]);let o=M.getAllUris(e);for(let d of o)if(this._schemeCache[d])return this._schemeCache[d];let s=this.schemes.find(d=>M.compare(d,e));if(!s||!s.uri)throw new ot({message:`Tried to load unsupported scheme (${e&&e.uri})`});let u=s.uri;o=Pt.default(o.concat(M.getAllUris(s)));let a=".json";u.endsWith("/")&&(a="index.json");let c=yield this.axios(z(R({},r),{url:`${u}${a}`,_skipAdditionalParameters:!0}));if(c.id!==u)throw new ot({message:"Skohub URL did not return expected concept scheme"});let{title:l,preferredNamespaceUri:v,hasTopConcept:y,description:_}=c;e={uri:u,identifier:o.filter(d=>d!==u)},e.prefLabel=l,Object.keys(e.prefLabel||{}).forEach(d=>{e.prefLabel[d]=di(e.prefLabel[d])}),e.namespace=v,e.topConcepts=(y||[]).map(d=>this._toJskosConcept(d)),e.concepts=[null],_&&(e.definition=_,Object.keys(e.definition).forEach(d=>{e.definition[d]=[di(e.definition[d])]}));for(let d of Object.keys(e).filter(C=>!e[C]))delete e[d];for(let d of o)this._schemeCache[d]=e;return e})}_loadConcept(n){return P(this,null,function*(){var i=n,{uri:e}=i,r=Z(i,["uri"]);if(this._conceptCache[e])return this._conceptCache[e];try{let o=yield this.axios(z(R({},r),{url:`${e}.json`,_skipAdditionalParameters:!0}));if(o.id!==e)throw new ot({message:"Skohub URL did not return expected concept URI"});let s=this._toJskosConcept(o);return this._conceptCache[e]=s,s}catch(o){return null}})}_toJskosConcept(e){let r={uri:e.id};return r.prefLabel=e.prefLabel,Object.keys(r.prefLabel||{}).forEach(n=>{r.prefLabel[n]=di(r.prefLabel[n])}),r.narrower=(e.narrower||[]).map(n=>this._toJskosConcept(n)),r.notation=e.notation||[],e.broader&&e.broader.id&&(r.broader=[{uri:e.broader.id}]),e.inScheme&&e.inScheme.id&&(r.inScheme=[{uri:e.inScheme.id}]),e.scopeNote&&(r.scopeNote=e.scopeNote,Object.keys(r.scopeNote).forEach(n=>{r.scopeNote[n]=[di(r.scopeNote[n])]})),r}getSchemes(){return P(this,arguments,function*(r={}){var e=Z(r,[]);return Promise.all(this.schemes.map(n=>this._loadScheme(z(R({},e),{scheme:n}))))})}getTop(n){return P(this,null,function*(){var i=n,{scheme:e}=i,r=Z(i,["scheme"]);if(!e||!e.uri)throw new W({parameter:"scheme",message:"Missing scheme URI"});return e=yield this._loadScheme(R({scheme:e},r)),e.topConcepts||[]})}getConcepts(n){return P(this,null,function*(){var i=n,{concepts:e}=i,r=Z(i,["concepts"]);return Fe.default(e)||(e=[e]),(yield Promise.all(e.map(({uri:o})=>this._loadConcept(z(R({},r),{uri:o}))))).filter(Boolean)})}getAncestors(n){return P(this,null,function*(){var i=n,{concept:e}=i,r=Z(i,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});if(e.ancestors&&e.ancestors[0]!==null)return e.ancestors;if(e=yield this._loadConcept(z(R({},r),{uri:e.uri})),!e||!e.broader||!e.broader.length)return[];let o=e.broader[0];return[o].concat(yield this.getAncestors(R({concept:o},r))).map(s=>({uri:s.uri}))})}getNarrower(n){return P(this,null,function*(){var i=n,{concept:e}=i,r=Z(i,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});return e.narrower&&e.narrower[0]!==null||(e=yield this._loadConcept(z(R({},r),{uri:e.uri}))),e.narrower})}search(i){return P(this,arguments,function*({search:e,scheme:r,limit:n=100}){if(r=yield this._loadScheme({scheme:r}),!r||!r.uri)throw new W({parameter:"scheme"});if(!e)throw new W({parameter:"search"});let o;this._index[r.uri]||(this._index[r.uri]={});for(let a of[""].concat(this.languages)){if(this._index[r.uri][a]){o=this._index[r.uri][a];break}if(this._index[r.uri][a]!==null)try{let c=a?`.${a}.index`:".index";r.uri.endsWith("/")&&(c=`index${c}`);let l=yield this.axios({url:`${r.uri}${c}`,_skipAdditionalParameters:!0});if(l.length<100){this._index[r.uri][a]=null;continue}o=vd.default.create(),o.import(l),this._index[r.uri][a]=o;break}catch(c){this._index[r.uri][a]=null}}if(!o)throw new ot({message:"Could not find search index for any of the available languages "+this.languages.join(",")});let s=o.search(e);return(yield this.getConcepts({concepts:s.map(a=>({uri:a}))})).slice(0,n)})}suggest(e){return P(this,null,function*(){e._raw=!0;let r=yield this.search(e),n=[e.search,[],[],[]];for(let i of r){let o=M.notation(i),s=M.prefLabel(i);n[1].push((o?o+" ":"")+s),n[2].push(""),n[3].push(i.uri)}return r._totalCount!=null?n._totalCount=r._totalCount:n._totalCount=r.length,n})}};Oe(wt,"supports",{schemes:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,suggest:!0,search:!0});wt.providerName="Skohub";wt.providerType="http://bartoc.org/api-type/skohub";var wd="https://lobid.org/gnd/",_t={uri:"http://bartoc.org/en/node/430",concepts:[null],topConcepts:[],type:["http://www.w3.org/2004/02/skos/core#ConceptScheme"],DISPLAY:{hideNotation:!0},identifier:["http://www.wikidata.org/entity/Q36578"],license:[{uri:"http://creativecommons.org/publicdomain/zero/1.0/"}],namespace:"https://d-nb.info/gnd/",notation:["GND"],notationPattern:"[0-9X-]+",prefLabel:{de:"Gemeinsame Normdatei",en:"Integrated Authority File"},types:[{uri:"https://d-nb.info/standards/elementset/gnd#DifferentiatedPerson",prefLabel:{de:"Person",en:"Person"}},{uri:"https://d-nb.info/standards/elementset/gnd#PlaceOrGeographicName",prefLabel:{de:"Geografikum",en:"Place"}},{uri:"https://d-nb.info/standards/elementset/gnd#CorporateBody",prefLabel:{de:"Organisation",en:"Organization"}},{uri:"https://d-nb.info/standards/elementset/gnd#SubjectHeading",prefLabel:{de:"Sachbegriff",en:"Subject"}},{uri:"https://d-nb.info/standards/elementset/gnd#Work",prefLabel:{de:"Werk",en:"Work"}},{uri:"https://d-nb.info/standards/elementset/gnd#ConferenceOrEvent",prefLabel:{de:"Konferenz oder Veranstaltung",en:"ConferenceOrEvent"}}]},hs=new M.ConceptScheme({uri:"https://d-nb.info/standards/elementset/gnd",namespace:"https://d-nb.info/standards/elementset/gnd#"});_t.types.forEach(t=>{t.notation=[hs.notationFromUri(t.uri)]});var BO=new M.ConceptScheme(_t),bd=["broaderTerm","broaderTermGeneral","broaderTermGeneric","broaderTermInstantial","broaderTermPartitive"],_d={sameAs:"http://www.w3.org/2004/02/skos/core#exactMatch",exactMatch:"http://www.w3.org/2004/02/skos/core#exactMatch",closeMatch:"http://www.w3.org/2004/02/skos/core#closeMatch",relatedDdcWithDegreeOfDeterminacy1:"http://www.w3.org/2004/02/skos/core#narrowMatch",relatedDdcWithDegreeOfDeterminacy2:"http://www.w3.org/2004/02/skos/core#narrowMatch",relatedDdcWithDegreeOfDeterminacy3:"http://www.w3.org/2004/02/skos/core#closeMatch",relatedDdcWithDegreeOfDeterminacy4:"http://www.w3.org/2004/02/skos/core#exactMatch"},UO=[{uri:"http://bartoc.org/en/node/241",uriPattern:"http://dewey.info/class/(.+)/"},{uri:"http://bartoc.org/en/node/18",namespace:"https://data.bnf.fr/ark:/12148/"},{uri:"http://bartoc.org/en/node/20450",namespace:"https://datos.bne.es/resource/"},{uri:"http://bartoc.org/en/node/1940",namespace:"http://www.wikidata.org/entity/"},{uri:"http://bartoc.org/en/node/294",namespace:"http://lod.gesis.org/thesoz/"},{uri:"http://bartoc.org/en/node/20425",namespace:"http://uri.gbv.de/terminology/tpro/"},{uri:"http://bartoc.org/en/node/2053",namespace:"http://viaf.org/viaf/"},{uri:"http://bartoc.org/en/node/305",uriPattern:"http?://aims.fao.org/aos/agrovoc/(.+)"},{uri:"http://bartoc.org/en/node/391",uriPattern:"http?://id.nlm.nih.gov/mesh/(.+)"},{uri:"http://bartoc.org/en/node/313",uriPattern:"http?://zbw.eu/stw/descriptor/(.+)"},{uri:"http://bartoc.org/en/node/443",uriPattern:"https?://purl.org/bncf/tid/(.+)"},{uri:"http://bartoc.org/en/node/454",uriPattern:"http?://id.loc.gov/authorities/subjects/(.+)"},{uri:"http://bartoc.org/en/node/18536",uriPattern:"http?://id.loc.gov/authorities/names/(.+)"}].map(t=>new M.ConceptScheme(t));function fs(t){var n,i;let e={uri:t.id,notation:[t.gndIdentifier],prefLabel:{de:t.preferredName},inScheme:[{uri:_t.uri}]};t.variantName&&(e.altLabel={de:t.variantName}),(n=t.usingInstructions)!=null&&n.length&&(e.scopeNote={de:t.usingInstructions}),e.type=t.type.map(o=>hs.uriFromNotation(o)).filter(Boolean),e.broader=[],bd.forEach(o=>{e.broader=e.broader.concat(t[o]||[])}),e.broader=e.broader.map(o=>({uri:o.id})),e.uri&&(e.identifier=[e.uri.replace("https://","http://")]);let r=[];for(let o of Object.keys(_d)){let s=_d[o];(i=t[o])!=null&&i.length&&(r=r.concat(t[o].map(u=>{let a=UO.find(l=>l.notationFromUri(u.id)),c=a==null?void 0:a.conceptFromUri(u.id);return!a||!c?null:(a.uri==="http://bartoc.org/en/node/241"&&(c.uri+="e23/"),{from:{memberSet:[{uri:e.uri,notation:e.notation}]},fromScheme:{uri:_t.uri},to:{memberSet:[c]},toScheme:{uri:a.uri},type:[s]})}).filter(Boolean)))}return r.length&&(e.mappings=r),e}function ls(t){return t&&t.startsWith("http://")?t.replace("http://","https://"):t}var bt=class extends le{_setup(){this._api.api||(this._api.api=wd)}static _registryConfigForBartocApiConfig({url:e,scheme:r}={}){return!e||!r||!M.compare(r,_t)||e!=="https://lobid.org/gnd/api"?null:{api:wd,schemes:[_t]}}getSchemes(){return P(this,null,function*(){return[_t]})}getTop(){return P(this,null,function*(){return[]})}getConcepts(r){return P(this,arguments,function*({concepts:e}){if(!e)throw new i.InvalidOrMissingParameterError({parameter:"concepts"});Array.isArray(e)||(e=[e]);let n=e.map(s=>{var u,a;return(u=s==null?void 0:s.notation)!=null&&u[0]?(a=s==null?void 0:s.notation)==null?void 0:a[0]:BO.notationFromUri(ls(s==null?void 0:s.uri))}).filter(Boolean),i=[],o=yield Promise.all(n.map(s=>P(this,null,function*(){try{let u=yield Pe.get(`${this._api.api}${s}.json`);return fs(u.data)}catch(u){i.push(u)}})));if(i.length===e.length)throw i[0];return o.filter(Boolean)})}getNarrower(i){return P(this,arguments,function*({concept:e,limit:r=200,offset:n=0}){if(!e||!e.uri)throw new W({parameter:"concept"});let o=ls(e.uri),s=bd.map(a=>`${a}.id:"${o}"`).join(" OR ");return(yield Pe.get(`${this._api.api}search`,{params:{q:s,format:"json",size:r,from:n}})).data.member.map(a=>fs(a))})}suggest(e){return P(this,null,function*(){let r=yield this._search(z(R({},e),{format:"json:suggest"}));return[e.search,r.map(n=>n.label),[],r.map(n=>n.id)]})}search(e){return P(this,null,function*(){return(yield this._search(e)).member.map(n=>fs(n))})}_search(s){return P(this,arguments,function*({search:e,types:r,limit:n=100,offset:i=0,format:o="json"}){if(!e)throw new W({parameter:"search"});let u="";return r=(r==null?void 0:r.map(c=>hs.notationFromUri(ls(c))).filter(Boolean))||[],r.length&&(u=r.map(c=>`type:${c}`).join(" OR ")),(yield Pe.get(`${this._api.api}search`,{params:{q:e,filter:u,format:o,size:n,from:i}})).data})}getTypes(r){return P(this,arguments,function*({scheme:e}){if(!e||!M.compare(e,_t))throw new W({parameter:"search",message:e!=null&&e.uri?`scheme ${e==null?void 0:e.uri} not supported`:""});return _t.types})}};Oe(bt,"supports",{schemes:!0,data:!0,concepts:!0,narrower:!0,suggest:!0,search:!0,types:!0});bt.providerName="LobidApi";bt.providerType="http://bartoc.org/api-type/lobid-gnd";var xd=Le(cs(),1);var We={},xt=class extends le{_setup(){this._scheme=null}static _registryConfigForBartocApiConfig({url:e,scheme:r}={}){return!e||!r?null:{api:e}}_schemeInfoToJSKOS(e){let r=e.labels.find(o=>o.lang==="x-uri").text,n={};e.labels.filter(o=>!o.lang.startsWith("x-")).forEach(o=>{n[o.lang]=o.text});let i={uri:r,prefLabel:n};return e.categories&&e.categories.length&&(i.topConcepts=[null]),e.category&&e.category.length&&(i.concepts=[null]),i}_categoryToJSKOS(e,{scheme:r,broader:n=[]}){if(!e||!r)return null;let i=e.ID,o=`${r.uri}/${i}`;if(We[r.uri].concepts[o])return We[r.uri].concepts[o];let s={};e.labels.filter(a=>!a.lang.startsWith("x-")&&a.text).forEach(a=>{s[a.lang]=a.text.replace(`${i} `,""),We[r.uri].searchIndex.add(o,s[a.lang])});let u={};return e.labels.filter(a=>!a.lang.startsWith("x-")&&a.description).forEach(a=>{u[a.lang]||(u[a.lang]=[]),u[a.lang].push(a.description)}),We[r.uri].concepts[o]={uri:o,notation:[i],prefLabel:s,scopeNote:u,inScheme:[{uri:r.uri}],narrower:(e.categories||[]).map(a=>({uri:`${r.uri}/${a.ID}`})),broader:n},We[r.uri].concepts[o]}_removeNarrower(e){return e&&Object.assign({},e,{narrower:e.narrower&&e.narrower.length?[null]:[]})}_loadSchemeData(e){return P(this,null,function*(){let r=yield this.axios(z(R({},e),{method:"get",url:this._api.api,_skipAdditionalParameters:!0}));this._scheme=this._schemeInfoToJSKOS(r);let n=this._scheme.uri;We[n]={schemeInfo:r,searchIndex:xd.default.create({tokenize:"full"}),concepts:{}};let i=(o,{broader:s=[]}={})=>{let u=this._categoryToJSKOS(o,{scheme:this._scheme,broader:s});(o.categories||[]).forEach(a=>i(a,{broader:[{uri:u.uri}]}))};r.categories.forEach(o=>i(o)),We[n].topConcepts=r.categories.map(o=>this._categoryToJSKOS(o,{scheme:this._scheme}))})}getSchemes(){return P(this,arguments,function*(e={}){if(!this._api.api)throw new ze;return this._scheme||(this._loadSchemeDataPromise||(this._loadSchemeDataPromise=this._loadSchemeData(e)),yield this._loadSchemeDataPromise),[this._scheme]})}getTop(n){return P(this,null,function*(){var i=n,{scheme:e}=i,r=Z(i,["scheme"]);if(!e||!e.uri)throw new W({parameter:"scheme",message:"Missing scheme URI"});if(this._scheme||(yield this.getSchemes(r)),!M.compare(e,this._scheme))throw new W({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return We[this._scheme.uri].topConcepts.map(this._removeNarrower)})}getConcepts(n){return P(this,null,function*(){var i=n,{concepts:e}=i,r=Z(i,["concepts"]);return Fe.default(e)||(e=[e]),this._scheme||(yield this.getSchemes(r)),e.map(o=>We[this._scheme.uri].concepts[o.uri]).map(this._removeNarrower)})}getAncestors(n){return P(this,null,function*(){var i=n,{concept:e}=i,r=Z(i,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});if(e.ancestors&&e.ancestors[0]!==null)return e.ancestors;this._scheme||(yield this.getSchemes(r)),e=We[this._scheme.uri].concepts[e.uri];let o=e&&e.broader&&e.broader[0];return o?[o].concat(yield this.getAncestors(R({concept:o},r))):[]})}getNarrower(n){return P(this,null,function*(){var i=n,{concept:e}=i,r=Z(i,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});return e.narrower&&e.narrower[0]!==null?e.narrower:(this._scheme||(yield this.getSchemes(r)),e=We[this._scheme.uri].concepts[e.uri],(e&&e.narrower||[]).map(o=>We[this._scheme.uri].concepts[o.uri]).map(this._removeNarrower))})}search(i){return P(this,arguments,function*({search:e,scheme:r,limit:n=100}){if(!r||!r.uri)throw new W({parameter:"scheme"});if(!e)throw new W({parameter:"search"});if(!r||!r.uri)throw new W({parameter:"scheme",message:"Missing scheme URI"});if(this._scheme||(yield this.getSchemes()),!M.compare(r,this._scheme))throw new W({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return(yield We[this._scheme.uri].searchIndex.search(e)).map(s=>We[this._scheme.uri].concepts[s]).map(this._removeNarrower).slice(0,n)})}suggest(e){return P(this,null,function*(){e._raw=!0;let r=yield this.search(e),n=[e.search,[],[],[]];for(let i of r){let o=M.notation(i),s=M.prefLabel(i);n[1].push((o?o+" ":"")+s),n[2].push(""),n[3].push(i.uri)}return r._totalCount!=null?n._totalCount=r._totalCount:n._totalCount=r.length,n})}};Oe(xt,"supports",{schemes:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,suggest:!0,search:!0});xt.providerName="MyCoRe";xt.providerType="http://bartoc.org/api-type/mycore";var pn={schemes:[]},St=class extends le{static _registryConfigForBartocApiConfig({url:e}={}){return e?{api:e}:null}getSchemes(){return P(this,null,function*(){var e,r;if(!pn.schemes.length){let n=yield Pe.post(this._api.api,{query:"query sources { sources { name uri description alternateName } }",operationName:"sources"}),i=((r=(e=n==null?void 0:n.data)==null?void 0:e.data)==null?void 0:r.sources)||[];if(i.length)pn.schemes=i.map(o=>{let s={uri:o.uri,prefLabel:{und:o.name}};return o.desciption&&(s.description={und:[o.description]}),o.alternateName&&(s.notation=[o.alternateName]),s});else return[]}return pn.schemes})}getConcepts(r){return P(this,arguments,function*({concepts:e}){var i,o;if(!e)throw new W({parameter:"concepts"});return Array.isArray(e)||(e=[e]),(((o=(i=(yield Pe.post(this._api.api,{query:`query { lookup( uris: [${e.map(s=>`"${s.uri}"`)}], ) { uri source { ... on Source { uri } } result { ... on Term { uri prefLabel scopeNote altLabel broader { uri } narrower { uri } } } } }`})).data)==null?void 0:i.data)==null?void 0:o.lookup)||[]).map(s=>{var a,c,l,v,y,_,d,C,q,H;let u={uri:s.uri,inScheme:[pn.schemes.find(X=>M.compare(X,{uri:s.source.uri}))]};return(c=(a=s.result)==null?void 0:a.prefLabel)!=null&&c[0]&&(u.prefLabel={und:s.result.prefLabel[0]}),(v=(l=s.result)==null?void 0:l.altLabel)!=null&&v[0]&&(u.altLabel={und:s.result.altLabel}),(_=(y=s.result)==null?void 0:y.scopeNote)!=null&&_[0]&&(u.scopeNote={und:s.result.scopeNote}),(C=(d=s.result)==null?void 0:d.broader)!=null&&C.length&&(u.broader=s.result.broader),(H=(q=s.result)==null?void 0:q.narrower)!=null&&H.length&&(u.narrower=s.result.narrower),u})})}suggest(e){return P(this,null,function*(){let r=e.search,n=yield this.search(e);return[r,n.map(i=>M.prefLabel(i,{fallbackToUri:!1})),[],n.map(i=>i.uri)]})}search(n){return P(this,arguments,function*({scheme:e,search:r}){var o,s,u,a,c;if(!r)throw new W({parameter:"search"});if(!e||!M.isContainedIn(e,pn.schemes))throw new W({parameter:"scheme"});return(((c=(a=(u=(s=(o=(yield Pe.post(this._api.api,{query:`query { terms( sources: ["${e.uri}"] query: "${r}" ) { source { uri } result { ... on Terms { terms { uri prefLabel scopeNote } } } }}`})).data)==null?void 0:o.data)==null?void 0:s.terms)==null?void 0:u[0])==null?void 0:a.result)==null?void 0:c.terms)||[]).map(l=>{var y,_,d;let v={uri:l.uri,inScheme:[e]};return(y=l.prefLabel)!=null&&y[0]&&(v.prefLabel={und:l.prefLabel[0]}),(_=l.altLabel)!=null&&_[0]&&(v.altLabel={und:l.altLabel}),(d=l.scopeNote)!=null&&d[0]&&(v.scopeNote={und:l.scopeNote[0]}),v})})}};Oe(St,"supports",{schemes:!0,top:!1,data:!0,concepts:!0,narrower:!1,ancestors:!1,suggest:!0,search:!0});St.providerName="NoTApi";St.providerType="http://bartoc.org/api-type/noterms";var ft={[le.providerName]:le,init(t){if(this[t.provider])return new this[t.provider](t);throw new Xt},addProvider(t){if(t.prototype instanceof le||t===le)this[t.providerName]=t;else throw new Xt}};ft.addProvider(it);ft.addProvider(nt);Object.values(dn).forEach(t=>{ft.addProvider(t)});var ps={},xr=class t{constructor(e){this.config=e,this.axios=Pe.create()}setConfig(e){this.config=e}get config(){return this._config}set config(e){e=e||{},e.registries=e.registries||[],e.registries=e.registries.map(r=>ft.init(r)).filter(r=>r),e.registries.forEach(r=>{r.cdk=this}),this._config=e}get providers(){return ft}createInstance(e){return new t(e)}loadConfig(e){return P(this,null,function*(){let r=yield this.axios.get(e);this.config=r.data})}loadBuildInfo(s){var u=s,{url:e,buildInfo:r=null,interval:n=6e4,callback:i}=u,o=Z(u,["url","buildInfo","interval","callback"]);if(!e&&!this.config.cocodaBaseUrl)throw new Me({message:"Could not determine URL to load build config."});return e||(e=`${this.config.cocodaBaseUrl}build-info.json`),this.repeat(z(R({},o),{function:()=>P(this,null,function*(){return(yield this.axios.get(e,{headers:{"Cache-Control":"no-cache"}})).data}),interval:n,callback:(a,c,l)=>{a?i(a):(l||!l&&r&&!ut.default(c,r))&&i(null,c,l||r)}}))}getRegistryForUri(e){return this.config.registries.find(r=>r.uri==e)}initializeRegistry(e){return e=ft.init(e),e.cdk=this,e}addProvider(e){ft.addProvider(e)}static addProvider(e){ft.addProvider(e)}repeat({function:e,interval:r=15e3,callback:n,callImmediately:i=!0}={}){if(!e)throw new W({parameter:"function"});if(typeof e!="function")throw new W({parameter:"function",message:"function needs to be a function"});let o=()=>P(this,null,function*(){return e()});if(r=parseInt(r),isNaN(r))throw new W({parameter:"interval"});if(!n)throw new W({parameter:"callback"});if(typeof n!="function")throw new W({parameter:"callback",message:"callback needs to be a function"});let s={timer:null,result:null,error:null,isPaused:!1,interval:r},u=y=>{let _=s.result;ut.default(_,y)||(s.result=y,s.error=null,n(null,y,_))},a=y=>{s.error=y,n(y)},c=y=>{s.isPaused||(s.timer=setTimeout(()=>{y()},s.interval))},l=()=>o().then(u).catch(a).then(()=>c(l)),v=(y=i)=>{y?l():c(l)};return v(),{start:(...y)=>{s.isPaused=!1,v(...y)},stop:()=>{s.isPaused=!0,s.timer?clearTimeout(s.timer):setTimeout(()=>{s.timer&&clearTimeout(s.timer)},s.interval)},get isPaused(){return s.isPaused},get lastResult(){return s.result},get hasErrored(){return!!s.error},get interval(){return s.interval},set interval(y){s.interval=y}}}getSchemes(){return P(this,arguments,function*(e={}){let r=[],n=[];for(let i of this.config.registries)if(i.has.schemes!==!1){let o=i.getSchemes(e).then(s=>{for(let u of s){u._registry=i,u.__DETAILSLOADED__=1,u.type=u.type||["http://www.w3.org/2004/02/skos/core#ConceptScheme"];let a=r.find(y=>M.compare(y,u)),c,l,v=!1;if(a){c=this.config.registries.indexOf(i),c!=-1&&(c=this.config.registries.length-c),l=this.config.registries.indexOf(ie.default(a,"_registry")),l!=-1&&(l=this.config.registries.length-l);let y=u.concepts?u.concepts.length==0?-1:1:0,_=a.concepts?a.concepts.length==0?-1:1:0;y>_?v=!0:y<_?v=!1:v=l<c}if(!a||v){if(v){let y=r.findIndex(_=>M.compare(_,a));y!=-1&&r.splice(y,1),u=M.merge(u,ht.default(a,["concepts","topConcepts"]),{mergeUris:!0,skipPaths:["_registry"]})}u._registry=i,r.push(u)}else{let y=r.findIndex(_=>M.compare(_,u));if(y!=-1){let _=r[y]._registry;r[y]=M.merge(r[y],ht.default(u,["concepts","topConcepts"]),{mergeUris:!0,skipPaths:["_registry"]}),r[y]._registry=_}}}}).catch(s=>{console.warn("Couldn't load schemes for registry",i.uri,s)});n.push(o)}return yield Promise.all(n),r.forEach(i=>{let o=i._registry;delete i._registry;let s=this.registryForScheme(i);!s||s._api.api===o._api.api?i._registry=o:i._registry=s}),M.sortSchemes(r.filter(Boolean))})}registryForScheme(e,r="concepts"){var i;let n=e._registry;if(n)return n;for(let o of e.API||[]){let s=o,{type:u}=s,a=Z(s,["type"]);let c=a.url,l=`${u}-${c}`;if(ps[l]){let v=ps[l];return Array.isArray(v._jskos.schemes)&&!M.isContainedIn(e,v._jskos.schemes)&&v._jskos.schemes.push(e),v}else{a.scheme=e;for(let v of Object.values(ft)){if((v==null?void 0:v.providerType)!==u||!v._registryConfigForBartocApiConfig||r&&!((i=v==null?void 0:v.supports)!=null&&i[r]))continue;let y=v.providerName,_=ft[y]._registryConfigForBartocApiConfig(a);if(_){_.provider=y;try{if(n=this.initializeRegistry(_),n)return ps[l]=n,n}catch(d){continue}}}}}return null}};var Sd=new xr;function kO(t){Object.values(dn).forEach(e=>(t||Sd).addProvider(e))}return mm($O);})();
8
+ var CDK=(()=>{var Sg=Object.create;var Tr=Object.defineProperty,Ag=Object.defineProperties,Eg=Object.getOwnPropertyDescriptor,Cg=Object.getOwnPropertyDescriptors,Og=Object.getOwnPropertyNames,En=Object.getOwnPropertySymbols,Tg=Object.getPrototypeOf,Hi=Object.prototype.hasOwnProperty,ha=Object.prototype.propertyIsEnumerable;var Kt=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Ig=e=>{throw TypeError(e)},bt=Math.pow,zi=(e,t,r)=>t in e?Tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t)=>{for(var r in t||(t={}))Hi.call(t,r)&&zi(e,r,t[r]);if(En)for(var r of En(t))ha.call(t,r)&&zi(e,r,t[r]);return e},B=(e,t)=>Ag(e,Cg(t));var Ir=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var H=(e,t)=>{var r={};for(var n in e)Hi.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&En)for(var n of En(e))t.indexOf(n)<0&&ha.call(e,n)&&(r[n]=e[n]);return r};var _=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pt=(e,t)=>{for(var r in t)Tr(e,r,{get:t[r],enumerable:!0})},pa=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Og(t))!Hi.call(e,i)&&i!==r&&Tr(e,i,{get:()=>t[i],enumerable:!(n=Eg(t,i))||n.enumerable});return e};var Ce=(e,t,r)=>(r=e!=null?Sg(Tg(e)):{},pa(t||!e||!e.__esModule?Tr(r,"default",{value:e,enumerable:!0}):r,e)),Pg=e=>pa(Tr({},"__esModule",{value:!0}),e);var ge=(e,t,r)=>zi(e,typeof t!="symbol"?t+"":t,r);var P=(e,t,r)=>new Promise((n,i)=>{var s=u=>{try{a(r.next(u))}catch(l){i(l)}},o=u=>{try{a(r.throw(u))}catch(l){i(l)}},a=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,o);a((r=r.apply(e,t)).next())}),Rt=function(e,t){this[0]=e,this[1]=t},Wi=(e,t,r)=>{var n=(o,a,u,l)=>{try{var c=r[o](a),h=(a=c.value)instanceof Rt,d=c.done;Promise.resolve(h?a[0]:a).then(m=>h?n(o==="return"?o:"next",a[1]?{done:m.done,value:m.value}:m,u,l):u({value:m,done:d})).catch(m=>n("throw",m,u,l))}catch(m){l(m)}},i=o=>s[o]=a=>new Promise((u,l)=>n(o,a,u,l)),s={};return r=r.apply(e,t),s[Kt("asyncIterator")]=()=>s,i("next"),i("throw"),i("return"),s},Ki=e=>{var t=e[Kt("asyncIterator")],r=!1,n,i={};return t==null?(t=e[Kt("iterator")](),n=s=>i[s]=o=>t[s](o)):(t=t.call(e),n=s=>i[s]=o=>{if(r){if(r=!1,s==="throw")throw o;return o}return r=!0,{done:!1,value:new Rt(new Promise(a=>{var u=t[s](o);u instanceof Object||Ig("Object expected"),a(u)}),1)}}),i[Kt("iterator")]=()=>i,n("next"),"throw"in t?n("throw"):i.throw=s=>{throw s},"return"in t&&n("return"),i},da=(e,t,r)=>(t=e[Kt("asyncIterator")])?t.call(e):(e=e[Kt("iterator")](),t={},r=(n,i)=>(i=e[n])&&(t[n]=s=>new Promise((o,a,u)=>(s=i.call(e,s),u=s.done,Promise.resolve(s.value).then(l=>o({value:l,done:u}),a)))),r("next"),r("return"),t);var Me=_((YP,Ya)=>{var K0=Array.isArray;Ya.exports=K0});var ws=_((XP,Xa)=>{var V0=typeof global=="object"&&global&&global.Object===Object&&global;Xa.exports=V0});var Be=_((ZP,Za)=>{var G0=ws(),J0=typeof self=="object"&&self&&self.Object===Object&&self,Y0=G0||J0||Function("return this")();Za.exports=Y0});var Mt=_((QP,Qa)=>{var X0=Be(),Z0=X0.Symbol;Qa.exports=Z0});var nu=_((eR,ru)=>{var eu=Mt(),tu=Object.prototype,Q0=tu.hasOwnProperty,ey=tu.toString,Kr=eu?eu.toStringTag:void 0;function ty(e){var t=Q0.call(e,Kr),r=e[Kr];try{e[Kr]=void 0;var n=!0}catch(s){}var i=ey.call(e);return n&&(t?e[Kr]=r:delete e[Kr]),i}ru.exports=ty});var su=_((tR,iu)=>{var ry=Object.prototype,ny=ry.toString;function iy(e){return ny.call(e)}iu.exports=iy});var xt=_((rR,uu)=>{var ou=Mt(),sy=nu(),oy=su(),ay="[object Null]",uy="[object Undefined]",au=ou?ou.toStringTag:void 0;function ly(e){return e==null?e===void 0?uy:ay:au&&au in Object(e)?sy(e):oy(e)}uu.exports=ly});var Ue=_((nR,lu)=>{function cy(e){return e!=null&&typeof e=="object"}lu.exports=cy});var Un=_((iR,cu)=>{var fy=xt(),hy=Ue(),py="[object Symbol]";function dy(e){return typeof e=="symbol"||hy(e)&&fy(e)==py}cu.exports=dy});var hu=_((sR,fu)=>{var my=Me(),gy=Un(),yy=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wy=/^\w*$/;function vy(e,t){if(my(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||gy(e)?!0:wy.test(e)||!yy.test(e)||t!=null&&e in Object(t)}fu.exports=vy});var $e=_((oR,pu)=>{function by(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}pu.exports=by});var $n=_((aR,du)=>{var _y=xt(),xy=$e(),Sy="[object AsyncFunction]",Ay="[object Function]",Ey="[object GeneratorFunction]",Cy="[object Proxy]";function Oy(e){if(!xy(e))return!1;var t=_y(e);return t==Ay||t==Ey||t==Sy||t==Cy}du.exports=Oy});var gu=_((uR,mu)=>{var Ty=Be(),Iy=Ty["__core-js_shared__"];mu.exports=Iy});var vu=_((lR,wu)=>{var vs=gu(),yu=(function(){var e=/[^.]+$/.exec(vs&&vs.keys&&vs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Py(e){return!!yu&&yu in e}wu.exports=Py});var bs=_((cR,bu)=>{var Ry=Function.prototype,qy=Ry.toString;function My(e){if(e!=null){try{return qy.call(e)}catch(t){}try{return e+""}catch(t){}}return""}bu.exports=My});var xu=_((fR,_u)=>{var Dy=$n(),ky=vu(),Ly=$e(),Ny=bs(),jy=/[\\^$.*+?()[\]{}|]/g,Fy=/^\[object .+?Constructor\]$/,By=Function.prototype,Uy=Object.prototype,$y=By.toString,zy=Uy.hasOwnProperty,Hy=RegExp("^"+$y.call(zy).replace(jy,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Wy(e){if(!Ly(e)||ky(e))return!1;var t=Dy(e)?Hy:Fy;return t.test(Ny(e))}_u.exports=Wy});var Au=_((hR,Su)=>{function Ky(e,t){return e==null?void 0:e[t]}Su.exports=Ky});var St=_((pR,Eu)=>{var Vy=xu(),Gy=Au();function Jy(e,t){var r=Gy(e,t);return Vy(r)?r:void 0}Eu.exports=Jy});var Vr=_((dR,Cu)=>{var Yy=St(),Xy=Yy(Object,"create");Cu.exports=Xy});var Iu=_((mR,Tu)=>{var Ou=Vr();function Zy(){this.__data__=Ou?Ou(null):{},this.size=0}Tu.exports=Zy});var Ru=_((gR,Pu)=>{function Qy(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}Pu.exports=Qy});var Mu=_((yR,qu)=>{var ew=Vr(),tw="__lodash_hash_undefined__",rw=Object.prototype,nw=rw.hasOwnProperty;function iw(e){var t=this.__data__;if(ew){var r=t[e];return r===tw?void 0:r}return nw.call(t,e)?t[e]:void 0}qu.exports=iw});var ku=_((wR,Du)=>{var sw=Vr(),ow=Object.prototype,aw=ow.hasOwnProperty;function uw(e){var t=this.__data__;return sw?t[e]!==void 0:aw.call(t,e)}Du.exports=uw});var Nu=_((vR,Lu)=>{var lw=Vr(),cw="__lodash_hash_undefined__";function fw(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=lw&&t===void 0?cw:t,this}Lu.exports=fw});var Fu=_((bR,ju)=>{var hw=Iu(),pw=Ru(),dw=Mu(),mw=ku(),gw=Nu();function er(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}er.prototype.clear=hw;er.prototype.delete=pw;er.prototype.get=dw;er.prototype.has=mw;er.prototype.set=gw;ju.exports=er});var Uu=_((_R,Bu)=>{function yw(){this.__data__=[],this.size=0}Bu.exports=yw});var tr=_((xR,$u)=>{function ww(e,t){return e===t||e!==e&&t!==t}$u.exports=ww});var Gr=_((SR,zu)=>{var vw=tr();function bw(e,t){for(var r=e.length;r--;)if(vw(e[r][0],t))return r;return-1}zu.exports=bw});var Wu=_((AR,Hu)=>{var _w=Gr(),xw=Array.prototype,Sw=xw.splice;function Aw(e){var t=this.__data__,r=_w(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Sw.call(t,r,1),--this.size,!0}Hu.exports=Aw});var Vu=_((ER,Ku)=>{var Ew=Gr();function Cw(e){var t=this.__data__,r=Ew(t,e);return r<0?void 0:t[r][1]}Ku.exports=Cw});var Ju=_((CR,Gu)=>{var Ow=Gr();function Tw(e){return Ow(this.__data__,e)>-1}Gu.exports=Tw});var Xu=_((OR,Yu)=>{var Iw=Gr();function Pw(e,t){var r=this.__data__,n=Iw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}Yu.exports=Pw});var Jr=_((TR,Zu)=>{var Rw=Uu(),qw=Wu(),Mw=Vu(),Dw=Ju(),kw=Xu();function rr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}rr.prototype.clear=Rw;rr.prototype.delete=qw;rr.prototype.get=Mw;rr.prototype.has=Dw;rr.prototype.set=kw;Zu.exports=rr});var zn=_((IR,Qu)=>{var Lw=St(),Nw=Be(),jw=Lw(Nw,"Map");Qu.exports=jw});var rl=_((PR,tl)=>{var el=Fu(),Fw=Jr(),Bw=zn();function Uw(){this.size=0,this.__data__={hash:new el,map:new(Bw||Fw),string:new el}}tl.exports=Uw});var il=_((RR,nl)=>{function $w(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}nl.exports=$w});var Yr=_((qR,sl)=>{var zw=il();function Hw(e,t){var r=e.__data__;return zw(t)?r[typeof t=="string"?"string":"hash"]:r.map}sl.exports=Hw});var al=_((MR,ol)=>{var Ww=Yr();function Kw(e){var t=Ww(this,e).delete(e);return this.size-=t?1:0,t}ol.exports=Kw});var ll=_((DR,ul)=>{var Vw=Yr();function Gw(e){return Vw(this,e).get(e)}ul.exports=Gw});var fl=_((kR,cl)=>{var Jw=Yr();function Yw(e){return Jw(this,e).has(e)}cl.exports=Yw});var pl=_((LR,hl)=>{var Xw=Yr();function Zw(e,t){var r=Xw(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}hl.exports=Zw});var Hn=_((NR,dl)=>{var Qw=rl(),ev=al(),tv=ll(),rv=fl(),nv=pl();function nr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}nr.prototype.clear=Qw;nr.prototype.delete=ev;nr.prototype.get=tv;nr.prototype.has=rv;nr.prototype.set=nv;dl.exports=nr});var yl=_((jR,gl)=>{var ml=Hn(),iv="Expected a function";function _s(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(iv);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(_s.Cache||ml),r}_s.Cache=ml;gl.exports=_s});var vl=_((FR,wl)=>{var sv=yl(),ov=500;function av(e){var t=sv(e,function(n){return r.size===ov&&r.clear(),n}),r=t.cache;return t}wl.exports=av});var _l=_((BR,bl)=>{var uv=vl(),lv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cv=/\\(\\)?/g,fv=uv(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(lv,function(r,n,i,s){t.push(i?s.replace(cv,"$1"):n||r)}),t});bl.exports=fv});var Xr=_((UR,xl)=>{function hv(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}xl.exports=hv});var Tl=_(($R,Ol)=>{var Sl=Mt(),pv=Xr(),dv=Me(),mv=Un(),gv=1/0,Al=Sl?Sl.prototype:void 0,El=Al?Al.toString:void 0;function Cl(e){if(typeof e=="string")return e;if(dv(e))return pv(e,Cl)+"";if(mv(e))return El?El.call(e):"";var t=e+"";return t=="0"&&1/e==-gv?"-0":t}Ol.exports=Cl});var Pl=_((zR,Il)=>{var yv=Tl();function wv(e){return e==null?"":yv(e)}Il.exports=wv});var Zr=_((HR,Rl)=>{var vv=Me(),bv=hu(),_v=_l(),xv=Pl();function Sv(e,t){return vv(e)?e:bv(e,t)?[e]:_v(xv(e))}Rl.exports=Sv});var Wn=_((WR,ql)=>{var Av=Un(),Ev=1/0;function Cv(e){if(typeof e=="string"||Av(e))return e;var t=e+"";return t=="0"&&1/e==-Ev?"-0":t}ql.exports=Cv});var xs=_((KR,Ml)=>{var Ov=Zr(),Tv=Wn();function Iv(e,t){t=Ov(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Tv(t[r++])];return r&&r==n?e:void 0}Ml.exports=Iv});var kl=_((VR,Dl)=>{var Pv=xs();function Rv(e,t,r){var n=e==null?void 0:Pv(e,t);return n===void 0?r:n}Dl.exports=Rv});var Ss=_((GR,Ll)=>{var qv=St(),Mv=(function(){try{var e=qv(Object,"defineProperty");return e({},"",{}),e}catch(t){}})();Ll.exports=Mv});var Kn=_((JR,jl)=>{var Nl=Ss();function Dv(e,t,r){t=="__proto__"&&Nl?Nl(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}jl.exports=Dv});var Vn=_((YR,Fl)=>{var kv=Kn(),Lv=tr(),Nv=Object.prototype,jv=Nv.hasOwnProperty;function Fv(e,t,r){var n=e[t];(!(jv.call(e,t)&&Lv(n,r))||r===void 0&&!(t in e))&&kv(e,t,r)}Fl.exports=Fv});var Gn=_((XR,Bl)=>{var Bv=9007199254740991,Uv=/^(?:0|[1-9]\d*)$/;function $v(e,t){var r=typeof e;return t=t==null?Bv:t,!!t&&(r=="number"||r!="symbol"&&Uv.test(e))&&e>-1&&e%1==0&&e<t}Bl.exports=$v});var zl=_((ZR,$l)=>{var zv=Vn(),Hv=Zr(),Wv=Gn(),Ul=$e(),Kv=Wn();function Vv(e,t,r,n){if(!Ul(e))return e;t=Hv(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var u=Kv(t[i]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=o){var c=a[u];l=n?n(c,u,a):void 0,l===void 0&&(l=Ul(c)?c:Wv(t[i+1])?[]:{})}zv(a,u,l),a=a[u]}return e}$l.exports=Vv});var Wl=_((QR,Hl)=>{var Gv=zl();function Jv(e,t,r){return e==null?e:Gv(e,t,r)}Hl.exports=Jv});var Vl=_((e2,Kl)=>{var Yv="__lodash_hash_undefined__";function Xv(e){return this.__data__.set(e,Yv),this}Kl.exports=Xv});var Jl=_((t2,Gl)=>{function Zv(e){return this.__data__.has(e)}Gl.exports=Zv});var Yn=_((r2,Yl)=>{var Qv=Hn(),eb=Vl(),tb=Jl();function Jn(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Qv;++t<r;)this.add(e[t])}Jn.prototype.add=Jn.prototype.push=eb;Jn.prototype.has=tb;Yl.exports=Jn});var Zl=_((n2,Xl)=>{function rb(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return-1}Xl.exports=rb});var ec=_((i2,Ql)=>{function nb(e){return e!==e}Ql.exports=nb});var rc=_((s2,tc)=>{function ib(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}tc.exports=ib});var ic=_((o2,nc)=>{var sb=Zl(),ob=ec(),ab=rc();function ub(e,t,r){return t===t?ab(e,t,r):sb(e,ob,r)}nc.exports=ub});var As=_((a2,sc)=>{var lb=ic();function cb(e,t){var r=e==null?0:e.length;return!!r&&lb(e,t,0)>-1}sc.exports=cb});var Es=_((u2,oc)=>{function fb(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}oc.exports=fb});var Xn=_((l2,ac)=>{function hb(e,t){return e.has(t)}ac.exports=hb});var Cs=_((c2,uc)=>{var pb=St(),db=Be(),mb=pb(db,"Set");uc.exports=mb});var cc=_((f2,lc)=>{function gb(){}lc.exports=gb});var Zn=_((h2,fc)=>{function yb(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}fc.exports=yb});var pc=_((p2,hc)=>{var Os=Cs(),wb=cc(),vb=Zn(),bb=1/0,_b=Os&&1/vb(new Os([,-0]))[1]==bb?function(e){return new Os(e)}:wb;hc.exports=_b});var Ts=_((d2,dc)=>{var xb=Yn(),Sb=As(),Ab=Es(),Eb=Xn(),Cb=pc(),Ob=Zn(),Tb=200;function Ib(e,t,r){var n=-1,i=Sb,s=e.length,o=!0,a=[],u=a;if(r)o=!1,i=Ab;else if(s>=Tb){var l=t?null:Cb(e);if(l)return Ob(l);o=!1,i=Eb,u=new xb}else u=t?[]:a;e:for(;++n<s;){var c=e[n],h=t?t(c):c;if(c=r||c!==0?c:0,o&&h===h){for(var d=u.length;d--;)if(u[d]===h)continue e;t&&u.push(h),a.push(c)}else i(u,h,r)||(u!==a&&u.push(h),a.push(c))}return a}dc.exports=Ib});var gc=_((m2,mc)=>{var Pb=Ts();function Rb(e){return e&&e.length?Pb(e):[]}mc.exports=Rb});var Qr=_((g2,yc)=>{function qb(e){return function(t){return e(t)}}yc.exports=qb});var bc=_((y2,vc)=>{var Mb=Yn(),Db=As(),kb=Es(),Lb=Xr(),Nb=Qr(),wc=Xn(),jb=Math.min;function Fb(e,t,r){for(var n=r?kb:Db,i=e[0].length,s=e.length,o=s,a=Array(s),u=1/0,l=[];o--;){var c=e[o];o&&t&&(c=Lb(c,Nb(t))),u=jb(c.length,u),a[o]=!r&&(t||i>=120&&c.length>=120)?new Mb(o&&c):void 0}c=e[0];var h=-1,d=a[0];e:for(;++h<i&&l.length<u;){var m=c[h],f=t?t(m):m;if(m=r||m!==0?m:0,!(d?wc(d,f):n(l,f,r))){for(o=s;--o;){var g=a[o];if(!(g?wc(g,f):n(e[o],f,r)))continue e}d&&d.push(f),l.push(m)}}return l}vc.exports=Fb});var Qn=_((w2,_c)=>{function Bb(e){return e}_c.exports=Bb});var Sc=_((v2,xc)=>{function Ub(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}xc.exports=Ub});var Is=_((b2,Ec)=>{var $b=Sc(),Ac=Math.max;function zb(e,t,r){return t=Ac(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=Ac(n.length-t,0),o=Array(s);++i<s;)o[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=r(o),$b(e,this,a)}}Ec.exports=zb});var Oc=_((_2,Cc)=>{function Hb(e){return function(){return e}}Cc.exports=Hb});var Pc=_((x2,Ic)=>{var Wb=Oc(),Tc=Ss(),Kb=Qn(),Vb=Tc?function(e,t){return Tc(e,"toString",{configurable:!0,enumerable:!1,value:Wb(t),writable:!0})}:Kb;Ic.exports=Vb});var qc=_((S2,Rc)=>{var Gb=800,Jb=16,Yb=Date.now;function Xb(e){var t=0,r=0;return function(){var n=Yb(),i=Jb-(n-r);if(r=n,i>0){if(++t>=Gb)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}Rc.exports=Xb});var Ps=_((A2,Mc)=>{var Zb=Pc(),Qb=qc(),e_=Qb(Zb);Mc.exports=e_});var ei=_((E2,Dc)=>{var t_=Qn(),r_=Is(),n_=Ps();function i_(e,t){return n_(r_(e,t,t_),e+"")}Dc.exports=i_});var Rs=_((C2,kc)=>{var s_=9007199254740991;function o_(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=s_}kc.exports=o_});var ir=_((O2,Lc)=>{var a_=$n(),u_=Rs();function l_(e){return e!=null&&u_(e.length)&&!a_(e)}Lc.exports=l_});var ti=_((T2,Nc)=>{var c_=ir(),f_=Ue();function h_(e){return f_(e)&&c_(e)}Nc.exports=h_});var Fc=_((I2,jc)=>{var p_=ti();function d_(e){return p_(e)?e:[]}jc.exports=d_});var Uc=_((P2,Bc)=>{var m_=Xr(),g_=bc(),y_=ei(),w_=Fc(),v_=y_(function(e){var t=m_(e,w_);return t.length&&t[0]===e[0]?g_(t):[]});Bc.exports=v_});var en=_((R2,$c)=>{function b_(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}$c.exports=b_});var Hc=_((q2,zc)=>{var __=xt(),x_=Ue(),S_="[object Arguments]";function A_(e){return x_(e)&&__(e)==S_}zc.exports=A_});var tn=_((M2,Vc)=>{var Wc=Hc(),E_=Ue(),Kc=Object.prototype,C_=Kc.hasOwnProperty,O_=Kc.propertyIsEnumerable,T_=Wc((function(){return arguments})())?Wc:function(e){return E_(e)&&C_.call(e,"callee")&&!O_.call(e,"callee")};Vc.exports=T_});var Xc=_((D2,Yc)=>{var Gc=Mt(),I_=tn(),P_=Me(),Jc=Gc?Gc.isConcatSpreadable:void 0;function R_(e){return P_(e)||I_(e)||!!(Jc&&e&&e[Jc])}Yc.exports=R_});var ri=_((k2,Qc)=>{var q_=en(),M_=Xc();function Zc(e,t,r,n,i){var s=-1,o=e.length;for(r||(r=M_),i||(i=[]);++s<o;){var a=e[s];t>0&&r(a)?t>1?Zc(a,t-1,r,n,i):q_(i,a):n||(i[i.length]=a)}return i}Qc.exports=Zc});var tf=_((L2,ef)=>{var D_=ri(),k_=ei(),L_=Ts(),N_=ti(),j_=k_(function(e){return L_(D_(e,1,N_,!0))});ef.exports=j_});var nf=_((N2,rf)=>{function F_(e){return function(t,r,n){for(var i=-1,s=Object(t),o=n(t),a=o.length;a--;){var u=o[e?a:++i];if(r(s[u],u,s)===!1)break}return t}}rf.exports=F_});var qs=_((j2,sf)=>{var B_=nf(),U_=B_();sf.exports=U_});var af=_((F2,of)=>{function $_(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}of.exports=$_});var lf=_((B2,uf)=>{function z_(){return!1}uf.exports=z_});var or=_((rn,sr)=>{var H_=Be(),W_=lf(),hf=typeof rn=="object"&&rn&&!rn.nodeType&&rn,cf=hf&&typeof sr=="object"&&sr&&!sr.nodeType&&sr,K_=cf&&cf.exports===hf,ff=K_?H_.Buffer:void 0,V_=ff?ff.isBuffer:void 0,G_=V_||W_;sr.exports=G_});var df=_((U2,pf)=>{var J_=xt(),Y_=Rs(),X_=Ue(),Z_="[object Arguments]",Q_="[object Array]",e4="[object Boolean]",t4="[object Date]",r4="[object Error]",n4="[object Function]",i4="[object Map]",s4="[object Number]",o4="[object Object]",a4="[object RegExp]",u4="[object Set]",l4="[object String]",c4="[object WeakMap]",f4="[object ArrayBuffer]",h4="[object DataView]",p4="[object Float32Array]",d4="[object Float64Array]",m4="[object Int8Array]",g4="[object Int16Array]",y4="[object Int32Array]",w4="[object Uint8Array]",v4="[object Uint8ClampedArray]",b4="[object Uint16Array]",_4="[object Uint32Array]",fe={};fe[p4]=fe[d4]=fe[m4]=fe[g4]=fe[y4]=fe[w4]=fe[v4]=fe[b4]=fe[_4]=!0;fe[Z_]=fe[Q_]=fe[f4]=fe[e4]=fe[h4]=fe[t4]=fe[r4]=fe[n4]=fe[i4]=fe[s4]=fe[o4]=fe[a4]=fe[u4]=fe[l4]=fe[c4]=!1;function x4(e){return X_(e)&&Y_(e.length)&&!!fe[J_(e)]}pf.exports=x4});var ni=_((nn,ar)=>{var S4=ws(),mf=typeof nn=="object"&&nn&&!nn.nodeType&&nn,sn=mf&&typeof ar=="object"&&ar&&!ar.nodeType&&ar,A4=sn&&sn.exports===mf,Ms=A4&&S4.process,E4=(function(){try{var e=sn&&sn.require&&sn.require("util").types;return e||Ms&&Ms.binding&&Ms.binding("util")}catch(t){}})();ar.exports=E4});var on=_(($2,wf)=>{var C4=df(),O4=Qr(),gf=ni(),yf=gf&&gf.isTypedArray,T4=yf?O4(yf):C4;wf.exports=T4});var Ds=_((z2,vf)=>{var I4=af(),P4=tn(),R4=Me(),q4=or(),M4=Gn(),D4=on(),k4=Object.prototype,L4=k4.hasOwnProperty;function N4(e,t){var r=R4(e),n=!r&&P4(e),i=!r&&!n&&q4(e),s=!r&&!n&&!i&&D4(e),o=r||n||i||s,a=o?I4(e.length,String):[],u=a.length;for(var l in e)(t||L4.call(e,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||s&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||M4(l,u)))&&a.push(l);return a}vf.exports=N4});var an=_((H2,bf)=>{var j4=Object.prototype;function F4(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||j4;return e===r}bf.exports=F4});var ks=_((W2,_f)=>{function B4(e,t){return function(r){return e(t(r))}}_f.exports=B4});var Sf=_((K2,xf)=>{var U4=ks(),$4=U4(Object.keys,Object);xf.exports=$4});var Ls=_((V2,Af)=>{var z4=an(),H4=Sf(),W4=Object.prototype,K4=W4.hasOwnProperty;function V4(e){if(!z4(e))return H4(e);var t=[];for(var r in Object(e))K4.call(e,r)&&r!="constructor"&&t.push(r);return t}Af.exports=V4});var un=_((G2,Ef)=>{var G4=Ds(),J4=Ls(),Y4=ir();function X4(e){return Y4(e)?G4(e):J4(e)}Ef.exports=X4});var Of=_((J2,Cf)=>{var Z4=qs(),Q4=un();function ex(e,t){return e&&Z4(e,t,Q4)}Cf.exports=ex});var If=_((Y2,Tf)=>{var tx=Qn();function rx(e){return typeof e=="function"?e:tx}Tf.exports=rx});var Rf=_((X2,Pf)=>{var nx=Of(),ix=If();function sx(e,t){return e&&nx(e,ix(t))}Pf.exports=sx});var Mf=_((Z2,qf)=>{var ox=xt(),ax=Me(),ux=Ue(),lx="[object String]";function cx(e){return typeof e=="string"||!ax(e)&&ux(e)&&ox(e)==lx}qf.exports=cx});var kf=_((Q2,Df)=>{var fx=St(),hx=Be(),px=fx(hx,"DataView");Df.exports=px});var Nf=_((eq,Lf)=>{var dx=St(),mx=Be(),gx=dx(mx,"Promise");Lf.exports=gx});var Ff=_((tq,jf)=>{var yx=St(),wx=Be(),vx=yx(wx,"WeakMap");jf.exports=vx});var lr=_((rq,Kf)=>{var Ns=kf(),js=zn(),Fs=Nf(),Bs=Cs(),Us=Ff(),Wf=xt(),ur=bs(),Bf="[object Map]",bx="[object Object]",Uf="[object Promise]",$f="[object Set]",zf="[object WeakMap]",Hf="[object DataView]",_x=ur(Ns),xx=ur(js),Sx=ur(Fs),Ax=ur(Bs),Ex=ur(Us),Dt=Wf;(Ns&&Dt(new Ns(new ArrayBuffer(1)))!=Hf||js&&Dt(new js)!=Bf||Fs&&Dt(Fs.resolve())!=Uf||Bs&&Dt(new Bs)!=$f||Us&&Dt(new Us)!=zf)&&(Dt=function(e){var t=Wf(e),r=t==bx?e.constructor:void 0,n=r?ur(r):"";if(n)switch(n){case _x:return Hf;case xx:return Bf;case Sx:return Uf;case Ax:return $f;case Ex:return zf}return t});Kf.exports=Dt});var Gf=_((nq,Vf)=>{var Cx=Ls(),Ox=lr(),Tx=tn(),Ix=Me(),Px=ir(),Rx=or(),qx=an(),Mx=on(),Dx="[object Map]",kx="[object Set]",Lx=Object.prototype,Nx=Lx.hasOwnProperty;function jx(e){if(e==null)return!0;if(Px(e)&&(Ix(e)||typeof e=="string"||typeof e.splice=="function"||Rx(e)||Mx(e)||Tx(e)))return!e.length;var t=Ox(e);if(t==Dx||t==kx)return!e.size;if(qx(e))return!Cx(e).length;for(var r in e)if(Nx.call(e,r))return!1;return!0}Vf.exports=jx});var Yf=_((iq,Jf)=>{var Fx=Jr();function Bx(){this.__data__=new Fx,this.size=0}Jf.exports=Bx});var Zf=_((sq,Xf)=>{function Ux(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}Xf.exports=Ux});var eh=_((oq,Qf)=>{function $x(e){return this.__data__.get(e)}Qf.exports=$x});var rh=_((aq,th)=>{function zx(e){return this.__data__.has(e)}th.exports=zx});var ih=_((uq,nh)=>{var Hx=Jr(),Wx=zn(),Kx=Hn(),Vx=200;function Gx(e,t){var r=this.__data__;if(r instanceof Hx){var n=r.__data__;if(!Wx||n.length<Vx-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Kx(n)}return r.set(e,t),this.size=r.size,this}nh.exports=Gx});var ii=_((lq,sh)=>{var Jx=Jr(),Yx=Yf(),Xx=Zf(),Zx=eh(),Qx=rh(),eS=ih();function cr(e){var t=this.__data__=new Jx(e);this.size=t.size}cr.prototype.clear=Yx;cr.prototype.delete=Xx;cr.prototype.get=Zx;cr.prototype.has=Qx;cr.prototype.set=eS;sh.exports=cr});var ah=_((cq,oh)=>{function tS(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}oh.exports=tS});var $s=_((fq,uh)=>{var rS=Yn(),nS=ah(),iS=Xn(),sS=1,oS=2;function aS(e,t,r,n,i,s){var o=r&sS,a=e.length,u=t.length;if(a!=u&&!(o&&u>a))return!1;var l=s.get(e),c=s.get(t);if(l&&c)return l==t&&c==e;var h=-1,d=!0,m=r&oS?new rS:void 0;for(s.set(e,t),s.set(t,e);++h<a;){var f=e[h],g=t[h];if(n)var w=o?n(g,f,h,t,e,s):n(f,g,h,e,t,s);if(w!==void 0){if(w)continue;d=!1;break}if(m){if(!nS(t,function(C,I){if(!iS(m,I)&&(f===C||i(f,C,r,n,s)))return m.push(I)})){d=!1;break}}else if(!(f===g||i(f,g,r,n,s))){d=!1;break}}return s.delete(e),s.delete(t),d}uh.exports=aS});var zs=_((hq,lh)=>{var uS=Be(),lS=uS.Uint8Array;lh.exports=lS});var fh=_((pq,ch)=>{function cS(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}ch.exports=cS});var gh=_((dq,mh)=>{var hh=Mt(),ph=zs(),fS=tr(),hS=$s(),pS=fh(),dS=Zn(),mS=1,gS=2,yS="[object Boolean]",wS="[object Date]",vS="[object Error]",bS="[object Map]",_S="[object Number]",xS="[object RegExp]",SS="[object Set]",AS="[object String]",ES="[object Symbol]",CS="[object ArrayBuffer]",OS="[object DataView]",dh=hh?hh.prototype:void 0,Hs=dh?dh.valueOf:void 0;function TS(e,t,r,n,i,s,o){switch(r){case OS:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case CS:return!(e.byteLength!=t.byteLength||!s(new ph(e),new ph(t)));case yS:case wS:case _S:return fS(+e,+t);case vS:return e.name==t.name&&e.message==t.message;case xS:case AS:return e==t+"";case bS:var a=pS;case SS:var u=n&mS;if(a||(a=dS),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;n|=gS,o.set(e,t);var c=hS(a(e),a(t),n,i,s,o);return o.delete(e),c;case ES:if(Hs)return Hs.call(e)==Hs.call(t)}return!1}mh.exports=TS});var Ws=_((mq,yh)=>{var IS=en(),PS=Me();function RS(e,t,r){var n=t(e);return PS(e)?n:IS(n,r(e))}yh.exports=RS});var vh=_((gq,wh)=>{function qS(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[i++]=o)}return s}wh.exports=qS});var Ks=_((yq,bh)=>{function MS(){return[]}bh.exports=MS});var si=_((wq,xh)=>{var DS=vh(),kS=Ks(),LS=Object.prototype,NS=LS.propertyIsEnumerable,_h=Object.getOwnPropertySymbols,jS=_h?function(e){return e==null?[]:(e=Object(e),DS(_h(e),function(t){return NS.call(e,t)}))}:kS;xh.exports=jS});var Vs=_((vq,Sh)=>{var FS=Ws(),BS=si(),US=un();function $S(e){return FS(e,US,BS)}Sh.exports=$S});var Ch=_((bq,Eh)=>{var Ah=Vs(),zS=1,HS=Object.prototype,WS=HS.hasOwnProperty;function KS(e,t,r,n,i,s){var o=r&zS,a=Ah(e),u=a.length,l=Ah(t),c=l.length;if(u!=c&&!o)return!1;for(var h=u;h--;){var d=a[h];if(!(o?d in t:WS.call(t,d)))return!1}var m=s.get(e),f=s.get(t);if(m&&f)return m==t&&f==e;var g=!0;s.set(e,t),s.set(t,e);for(var w=o;++h<u;){d=a[h];var C=e[d],I=t[d];if(n)var O=o?n(I,C,d,t,e,s):n(C,I,d,e,t,s);if(!(O===void 0?C===I||i(C,I,r,n,s):O)){g=!1;break}w||(w=d=="constructor")}if(g&&!w){var L=e.constructor,N=t.constructor;L!=N&&"constructor"in e&&"constructor"in t&&!(typeof L=="function"&&L instanceof L&&typeof N=="function"&&N instanceof N)&&(g=!1)}return s.delete(e),s.delete(t),g}Eh.exports=KS});var Dh=_((_q,Mh)=>{var Gs=ii(),VS=$s(),GS=gh(),JS=Ch(),Oh=lr(),Th=Me(),Ih=or(),YS=on(),XS=1,Ph="[object Arguments]",Rh="[object Array]",oi="[object Object]",ZS=Object.prototype,qh=ZS.hasOwnProperty;function QS(e,t,r,n,i,s){var o=Th(e),a=Th(t),u=o?Rh:Oh(e),l=a?Rh:Oh(t);u=u==Ph?oi:u,l=l==Ph?oi:l;var c=u==oi,h=l==oi,d=u==l;if(d&&Ih(e)){if(!Ih(t))return!1;o=!0,c=!1}if(d&&!c)return s||(s=new Gs),o||YS(e)?VS(e,t,r,n,i,s):GS(e,t,u,r,n,i,s);if(!(r&XS)){var m=c&&qh.call(e,"__wrapped__"),f=h&&qh.call(t,"__wrapped__");if(m||f){var g=m?e.value():e,w=f?t.value():t;return s||(s=new Gs),i(g,w,r,n,s)}}return d?(s||(s=new Gs),JS(e,t,r,n,i,s)):!1}Mh.exports=QS});var jh=_((xq,Nh)=>{var e1=Dh(),kh=Ue();function Lh(e,t,r,n,i){return e===t?!0:e==null||t==null||!kh(e)&&!kh(t)?e!==e&&t!==t:e1(e,t,r,n,Lh,i)}Nh.exports=Lh});var Bh=_((Sq,Fh)=>{var t1=jh();function r1(e,t){return t1(e,t)}Fh.exports=r1});var Js=_((Aq,Uh)=>{var n1=Kn(),i1=tr();function s1(e,t,r){(r!==void 0&&!i1(e[t],r)||r===void 0&&!(t in e))&&n1(e,t,r)}Uh.exports=s1});var Ys=_((ln,fr)=>{var o1=Be(),Wh=typeof ln=="object"&&ln&&!ln.nodeType&&ln,$h=Wh&&typeof fr=="object"&&fr&&!fr.nodeType&&fr,a1=$h&&$h.exports===Wh,zh=a1?o1.Buffer:void 0,Hh=zh?zh.allocUnsafe:void 0;function u1(e,t){if(t)return e.slice();var r=e.length,n=Hh?Hh(r):new e.constructor(r);return e.copy(n),n}fr.exports=u1});var ai=_((Eq,Vh)=>{var Kh=zs();function l1(e){var t=new e.constructor(e.byteLength);return new Kh(t).set(new Kh(e)),t}Vh.exports=l1});var Xs=_((Cq,Gh)=>{var c1=ai();function f1(e,t){var r=t?c1(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}Gh.exports=f1});var ui=_((Oq,Jh)=>{function h1(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}Jh.exports=h1});var Zh=_((Tq,Xh)=>{var p1=$e(),Yh=Object.create,d1=(function(){function e(){}return function(t){if(!p1(t))return{};if(Yh)return Yh(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();Xh.exports=d1});var li=_((Iq,Qh)=>{var m1=ks(),g1=m1(Object.getPrototypeOf,Object);Qh.exports=g1});var Zs=_((Pq,ep)=>{var y1=Zh(),w1=li(),v1=an();function b1(e){return typeof e.constructor=="function"&&!v1(e)?y1(w1(e)):{}}ep.exports=b1});var Qs=_((Rq,rp)=>{var _1=xt(),x1=li(),S1=Ue(),A1="[object Object]",E1=Function.prototype,C1=Object.prototype,tp=E1.toString,O1=C1.hasOwnProperty,T1=tp.call(Object);function I1(e){if(!S1(e)||_1(e)!=A1)return!1;var t=x1(e);if(t===null)return!0;var r=O1.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&tp.call(r)==T1}rp.exports=I1});var eo=_((qq,np)=>{function P1(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}np.exports=P1});var kt=_((Mq,ip)=>{var R1=Vn(),q1=Kn();function M1(e,t,r,n){var i=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var a=t[s],u=n?n(r[a],e[a],a,r,e):void 0;u===void 0&&(u=e[a]),i?q1(r,a,u):R1(r,a,u)}return r}ip.exports=M1});var op=_((Dq,sp)=>{function D1(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}sp.exports=D1});var up=_((kq,ap)=>{var k1=$e(),L1=an(),N1=op(),j1=Object.prototype,F1=j1.hasOwnProperty;function B1(e){if(!k1(e))return N1(e);var t=L1(e),r=[];for(var n in e)n=="constructor"&&(t||!F1.call(e,n))||r.push(n);return r}ap.exports=B1});var hr=_((Lq,lp)=>{var U1=Ds(),$1=up(),z1=ir();function H1(e){return z1(e)?U1(e,!0):$1(e)}lp.exports=H1});var fp=_((Nq,cp)=>{var W1=kt(),K1=hr();function V1(e){return W1(e,K1(e))}cp.exports=V1});var yp=_((jq,gp)=>{var hp=Js(),G1=Ys(),J1=Xs(),Y1=ui(),X1=Zs(),pp=tn(),dp=Me(),Z1=ti(),Q1=or(),eA=$n(),tA=$e(),rA=Qs(),nA=on(),mp=eo(),iA=fp();function sA(e,t,r,n,i,s,o){var a=mp(e,r),u=mp(t,r),l=o.get(u);if(l){hp(e,r,l);return}var c=s?s(a,u,r+"",e,t,o):void 0,h=c===void 0;if(h){var d=dp(u),m=!d&&Q1(u),f=!d&&!m&&nA(u);c=u,d||m||f?dp(a)?c=a:Z1(a)?c=Y1(a):m?(h=!1,c=G1(u,!0)):f?(h=!1,c=J1(u,!0)):c=[]:rA(u)||pp(u)?(c=a,pp(a)?c=iA(a):(!tA(a)||eA(a))&&(c=X1(u))):h=!1}h&&(o.set(u,c),i(c,u,n,s,o),o.delete(u)),hp(e,r,c)}gp.exports=sA});var bp=_((Fq,vp)=>{var oA=ii(),aA=Js(),uA=qs(),lA=yp(),cA=$e(),fA=hr(),hA=eo();function wp(e,t,r,n,i){e!==t&&uA(t,function(s,o){if(i||(i=new oA),cA(s))lA(e,t,o,r,wp,n,i);else{var a=n?n(hA(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),aA(e,o,a)}},fA)}vp.exports=wp});var xp=_((Bq,_p)=>{var pA=tr(),dA=ir(),mA=Gn(),gA=$e();function yA(e,t,r){if(!gA(r))return!1;var n=typeof t;return(n=="number"?dA(r)&&mA(t,r.length):n=="string"&&t in r)?pA(r[t],e):!1}_p.exports=yA});var Ap=_((Uq,Sp)=>{var wA=ei(),vA=xp();function bA(e){return wA(function(t,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&vA(r[0],r[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++n<i;){var a=r[n];a&&e(t,a,n,s)}return t})}Sp.exports=bA});var Cp=_(($q,Ep)=>{var _A=bp(),xA=Ap(),SA=xA(function(e,t,r){_A(e,t,r)});Ep.exports=SA});var to=_((zq,Op)=>{function AA(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}Op.exports=AA});var Ip=_((Hq,Tp)=>{function EA(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}Tp.exports=EA});var Rp=_((Wq,Pp)=>{var CA=kt(),OA=un();function TA(e,t){return e&&CA(t,OA(t),e)}Pp.exports=TA});var Mp=_((Kq,qp)=>{var IA=kt(),PA=hr();function RA(e,t){return e&&IA(t,PA(t),e)}qp.exports=RA});var kp=_((Vq,Dp)=>{var qA=kt(),MA=si();function DA(e,t){return qA(e,MA(e),t)}Dp.exports=DA});var ro=_((Gq,Lp)=>{var kA=en(),LA=li(),NA=si(),jA=Ks(),FA=Object.getOwnPropertySymbols,BA=FA?function(e){for(var t=[];e;)kA(t,NA(e)),e=LA(e);return t}:jA;Lp.exports=BA});var jp=_((Jq,Np)=>{var UA=kt(),$A=ro();function zA(e,t){return UA(e,$A(e),t)}Np.exports=zA});var no=_((Yq,Fp)=>{var HA=Ws(),WA=ro(),KA=hr();function VA(e){return HA(e,KA,WA)}Fp.exports=VA});var Up=_((Xq,Bp)=>{var GA=Object.prototype,JA=GA.hasOwnProperty;function YA(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&JA.call(e,"index")&&(r.index=e.index,r.input=e.input),r}Bp.exports=YA});var zp=_((Zq,$p)=>{var XA=ai();function ZA(e,t){var r=t?XA(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}$p.exports=ZA});var Wp=_((Qq,Hp)=>{var QA=/\w*$/;function eE(e){var t=new e.constructor(e.source,QA.exec(e));return t.lastIndex=e.lastIndex,t}Hp.exports=eE});var Yp=_((eM,Jp)=>{var Kp=Mt(),Vp=Kp?Kp.prototype:void 0,Gp=Vp?Vp.valueOf:void 0;function tE(e){return Gp?Object(Gp.call(e)):{}}Jp.exports=tE});var Zp=_((tM,Xp)=>{var rE=ai(),nE=zp(),iE=Wp(),sE=Yp(),oE=Xs(),aE="[object Boolean]",uE="[object Date]",lE="[object Map]",cE="[object Number]",fE="[object RegExp]",hE="[object Set]",pE="[object String]",dE="[object Symbol]",mE="[object ArrayBuffer]",gE="[object DataView]",yE="[object Float32Array]",wE="[object Float64Array]",vE="[object Int8Array]",bE="[object Int16Array]",_E="[object Int32Array]",xE="[object Uint8Array]",SE="[object Uint8ClampedArray]",AE="[object Uint16Array]",EE="[object Uint32Array]";function CE(e,t,r){var n=e.constructor;switch(t){case mE:return rE(e);case aE:case uE:return new n(+e);case gE:return nE(e,r);case yE:case wE:case vE:case bE:case _E:case xE:case SE:case AE:case EE:return oE(e,r);case lE:return new n;case cE:case pE:return new n(e);case fE:return iE(e);case hE:return new n;case dE:return sE(e)}}Xp.exports=CE});var ed=_((rM,Qp)=>{var OE=lr(),TE=Ue(),IE="[object Map]";function PE(e){return TE(e)&&OE(e)==IE}Qp.exports=PE});var id=_((nM,nd)=>{var RE=ed(),qE=Qr(),td=ni(),rd=td&&td.isMap,ME=rd?qE(rd):RE;nd.exports=ME});var od=_((iM,sd)=>{var DE=lr(),kE=Ue(),LE="[object Set]";function NE(e){return kE(e)&&DE(e)==LE}sd.exports=NE});var cd=_((sM,ld)=>{var jE=od(),FE=Qr(),ad=ni(),ud=ad&&ad.isSet,BE=ud?FE(ud):jE;ld.exports=BE});var md=_((oM,dd)=>{var UE=ii(),$E=Ip(),zE=Vn(),HE=Rp(),WE=Mp(),KE=Ys(),VE=ui(),GE=kp(),JE=jp(),YE=Vs(),XE=no(),ZE=lr(),QE=Up(),eC=Zp(),tC=Zs(),rC=Me(),nC=or(),iC=id(),sC=$e(),oC=cd(),aC=un(),uC=hr(),lC=1,cC=2,fC=4,fd="[object Arguments]",hC="[object Array]",pC="[object Boolean]",dC="[object Date]",mC="[object Error]",hd="[object Function]",gC="[object GeneratorFunction]",yC="[object Map]",wC="[object Number]",pd="[object Object]",vC="[object RegExp]",bC="[object Set]",_C="[object String]",xC="[object Symbol]",SC="[object WeakMap]",AC="[object ArrayBuffer]",EC="[object DataView]",CC="[object Float32Array]",OC="[object Float64Array]",TC="[object Int8Array]",IC="[object Int16Array]",PC="[object Int32Array]",RC="[object Uint8Array]",qC="[object Uint8ClampedArray]",MC="[object Uint16Array]",DC="[object Uint32Array]",le={};le[fd]=le[hC]=le[AC]=le[EC]=le[pC]=le[dC]=le[CC]=le[OC]=le[TC]=le[IC]=le[PC]=le[yC]=le[wC]=le[pd]=le[vC]=le[bC]=le[_C]=le[xC]=le[RC]=le[qC]=le[MC]=le[DC]=!0;le[mC]=le[hd]=le[SC]=!1;function ci(e,t,r,n,i,s){var o,a=t&lC,u=t&cC,l=t&fC;if(r&&(o=i?r(e,n,i,s):r(e)),o!==void 0)return o;if(!sC(e))return e;var c=rC(e);if(c){if(o=QE(e),!a)return VE(e,o)}else{var h=ZE(e),d=h==hd||h==gC;if(nC(e))return KE(e,a);if(h==pd||h==fd||d&&!i){if(o=u||d?{}:tC(e),!a)return u?JE(e,WE(o,e)):GE(e,HE(o,e))}else{if(!le[h])return i?e:{};o=eC(e,h,a)}}s||(s=new UE);var m=s.get(e);if(m)return m;s.set(e,o),oC(e)?e.forEach(function(w){o.add(ci(w,t,r,w,e,s))}):iC(e)&&e.forEach(function(w,C){o.set(C,ci(w,t,r,C,e,s))});var f=l?u?XE:YE:u?uC:aC,g=c?void 0:f(e);return $E(g||e,function(w,C){g&&(C=w,w=e[C]),zE(o,C,ci(w,t,r,C,e,s))}),o}dd.exports=ci});var yd=_((aM,gd)=>{function kC(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(i);++n<i;)s[n]=e[n+t];return s}gd.exports=kC});var vd=_((uM,wd)=>{var LC=xs(),NC=yd();function jC(e,t){return t.length<2?e:LC(e,NC(t,0,-1))}wd.exports=jC});var _d=_((lM,bd)=>{var FC=Zr(),BC=to(),UC=vd(),$C=Wn(),zC=Object.prototype,HC=zC.hasOwnProperty;function WC(e,t){t=FC(t,e);var r=-1,n=t.length;if(!n)return!0;for(var i=e==null||typeof e!="object"&&typeof e!="function";++r<n;){var s=t[r];if(typeof s=="string"){if(s==="__proto__"&&!HC.call(e,"__proto__"))return!1;if(s==="constructor"&&r+1<n&&typeof t[r+1]=="string"&&t[r+1]==="prototype"){if(i&&r===0)continue;return!1}}}var o=UC(e,t);return o==null||delete o[$C(BC(t))]}bd.exports=WC});var Sd=_((cM,xd)=>{var KC=Qs();function VC(e){return KC(e)?void 0:e}xd.exports=VC});var Ed=_((fM,Ad)=>{var GC=ri();function JC(e){var t=e==null?0:e.length;return t?GC(e,1):[]}Ad.exports=JC});var Od=_((hM,Cd)=>{var YC=Ed(),XC=Is(),ZC=Ps();function QC(e){return ZC(XC(e,void 0,YC),e+"")}Cd.exports=QC});var Id=_((pM,Td)=>{var eO=Xr(),tO=md(),rO=_d(),nO=Zr(),iO=kt(),sO=Sd(),oO=Od(),aO=no(),uO=1,lO=2,cO=4,fO=oO(function(e,t){var r={};if(e==null)return r;var n=!1;t=eO(t,function(s){return s=nO(s,e),n||(n=s.length>1),s}),iO(e,aO(e),r),n&&(r=tO(r,uO|lO|cO,sO));for(var i=t.length;i--;)rO(r,t[i]);return r});Td.exports=fO});var Rd=_((dM,Pd)=>{var hO=en(),pO=ri(),dO=ui(),mO=Me();function gO(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return hO(mO(r)?dO(r):[r],pO(t,1))}Pd.exports=gO});var Qd=_((Zd,xo)=>{(function(e){if(typeof Zd=="object"&&typeof xo!="undefined")xo.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var t;typeof window!="undefined"?t=window:typeof global!="undefined"?t=global:typeof self!="undefined"?t=self:t=this,t.localforage=e()}})(function(){var e,t,r;return(function n(i,s,o){function a(c,h){if(!s[c]){if(!i[c]){var d=typeof Ir=="function"&&Ir;if(!h&&d)return d(c,!0);if(u)return u(c,!0);var m=new Error("Cannot find module '"+c+"'");throw m.code="MODULE_NOT_FOUND",m}var f=s[c]={exports:{}};i[c][0].call(f.exports,function(g){var w=i[c][1][g];return a(w||g)},f,f.exports,n,i,s,o)}return s[c].exports}for(var u=typeof Ir=="function"&&Ir,l=0;l<o.length;l++)a(o[l]);return a})({1:[function(n,i,s){(function(o){"use strict";var a=o.MutationObserver||o.WebKitMutationObserver,u;if(a){var l=0,c=new a(g),h=o.document.createTextNode("");c.observe(h,{characterData:!0}),u=function(){h.data=l=++l%2}}else if(!o.setImmediate&&typeof o.MessageChannel!="undefined"){var d=new o.MessageChannel;d.port1.onmessage=g,u=function(){d.port2.postMessage(0)}}else"document"in o&&"onreadystatechange"in o.document.createElement("script")?u=function(){var C=o.document.createElement("script");C.onreadystatechange=function(){g(),C.onreadystatechange=null,C.parentNode.removeChild(C),C=null},o.document.documentElement.appendChild(C)}:u=function(){setTimeout(g,0)};var m,f=[];function g(){m=!0;for(var C,I,O=f.length;O;){for(I=f,f=[],C=-1;++C<O;)I[C]();O=f.length}m=!1}i.exports=w;function w(C){f.push(C)===1&&!m&&u()}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(n,i,s){"use strict";var o=n(1);function a(){}var u={},l=["REJECTED"],c=["FULFILLED"],h=["PENDING"];i.exports=d;function d(S){if(typeof S!="function")throw new TypeError("resolver must be a function");this.state=h,this.queue=[],this.outcome=void 0,S!==a&&w(this,S)}d.prototype.catch=function(S){return this.then(null,S)},d.prototype.then=function(S,M){if(typeof S!="function"&&this.state===c||typeof M!="function"&&this.state===l)return this;var D=new this.constructor(a);if(this.state!==h){var z=this.state===c?S:M;f(D,z,this.outcome)}else this.queue.push(new m(D,S,M));return D};function m(S,M,D){this.promise=S,typeof M=="function"&&(this.onFulfilled=M,this.callFulfilled=this.otherCallFulfilled),typeof D=="function"&&(this.onRejected=D,this.callRejected=this.otherCallRejected)}m.prototype.callFulfilled=function(S){u.resolve(this.promise,S)},m.prototype.otherCallFulfilled=function(S){f(this.promise,this.onFulfilled,S)},m.prototype.callRejected=function(S){u.reject(this.promise,S)},m.prototype.otherCallRejected=function(S){f(this.promise,this.onRejected,S)};function f(S,M,D){o(function(){var z;try{z=M(D)}catch(X){return u.reject(S,X)}z===S?u.reject(S,new TypeError("Cannot resolve promise with itself")):u.resolve(S,z)})}u.resolve=function(S,M){var D=C(g,M);if(D.status==="error")return u.reject(S,D.value);var z=D.value;if(z)w(S,z);else{S.state=c,S.outcome=M;for(var X=-1,J=S.queue.length;++X<J;)S.queue[X].callFulfilled(M)}return S},u.reject=function(S,M){S.state=l,S.outcome=M;for(var D=-1,z=S.queue.length;++D<z;)S.queue[D].callRejected(M);return S};function g(S){var M=S&&S.then;if(S&&(typeof S=="object"||typeof S=="function")&&typeof M=="function")return function(){M.apply(S,arguments)}}function w(S,M){var D=!1;function z(te){D||(D=!0,u.reject(S,te))}function X(te){D||(D=!0,u.resolve(S,te))}function J(){M(X,z)}var ee=C(J);ee.status==="error"&&z(ee.value)}function C(S,M){var D={};try{D.value=S(M),D.status="success"}catch(z){D.status="error",D.value=z}return D}d.resolve=I;function I(S){return S instanceof this?S:u.resolve(new this(a),S)}d.reject=O;function O(S){var M=new this(a);return u.reject(M,S)}d.all=L;function L(S){var M=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var D=S.length,z=!1;if(!D)return this.resolve([]);for(var X=new Array(D),J=0,ee=-1,te=new this(a);++ee<D;)ne(S[ee],ee);return te;function ne(se,ae){M.resolve(se).then(Ye,function(pe){z||(z=!0,u.reject(te,pe))});function Ye(pe){X[ae]=pe,++J===D&&!z&&(z=!0,u.resolve(te,X))}}}d.race=N;function N(S){var M=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var D=S.length,z=!1;if(!D)return this.resolve([]);for(var X=-1,J=new this(a);++X<D;)ee(S[X]);return J;function ee(te){M.resolve(te).then(function(ne){z||(z=!0,u.resolve(J,ne))},function(ne){z||(z=!0,u.reject(J,ne))})}}},{1:1}],3:[function(n,i,s){(function(o){"use strict";typeof o.Promise!="function"&&(o.Promise=n(2))}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{2:2}],4:[function(n,i,s){"use strict";var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p};function a(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function u(){try{if(typeof indexedDB!="undefined")return indexedDB;if(typeof webkitIndexedDB!="undefined")return webkitIndexedDB;if(typeof mozIndexedDB!="undefined")return mozIndexedDB;if(typeof OIndexedDB!="undefined")return OIndexedDB;if(typeof msIndexedDB!="undefined")return msIndexedDB}catch(p){return}}var l=u();function c(){try{if(!l||!l.open)return!1;var p=typeof openDatabase!="undefined"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),v=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!p||v)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch(y){return!1}}function h(p,v){p=p||[],v=v||{};try{return new Blob(p,v)}catch(b){if(b.name!=="TypeError")throw b;for(var y=typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder,x=new y,A=0;A<p.length;A+=1)x.append(p[A]);return x.getBlob(v.type)}}typeof Promise=="undefined"&&n(3);var d=Promise;function m(p,v){v&&p.then(function(y){v(null,y)},function(y){v(y)})}function f(p,v,y){typeof v=="function"&&p.then(v),typeof y=="function"&&p.catch(y)}function g(p){return typeof p!="string"&&(console.warn(p+" used as a key, but it is not a string."),p=String(p)),p}function w(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var C="local-forage-detect-blob-support",I=void 0,O={},L=Object.prototype.toString,N="readonly",S="readwrite";function M(p){for(var v=p.length,y=new ArrayBuffer(v),x=new Uint8Array(y),A=0;A<v;A++)x[A]=p.charCodeAt(A);return y}function D(p){return new d(function(v){var y=p.transaction(C,S),x=h([""]);y.objectStore(C).put(x,"key"),y.onabort=function(A){A.preventDefault(),A.stopPropagation(),v(!1)},y.oncomplete=function(){var A=navigator.userAgent.match(/Chrome\/(\d+)/),b=navigator.userAgent.match(/Edge\//);v(b||!A||parseInt(A[1],10)>=43)}}).catch(function(){return!1})}function z(p){return typeof I=="boolean"?d.resolve(I):D(p).then(function(v){return I=v,I})}function X(p){var v=O[p.name],y={};y.promise=new d(function(x,A){y.resolve=x,y.reject=A}),v.deferredOperations.push(y),v.dbReady?v.dbReady=v.dbReady.then(function(){return y.promise}):v.dbReady=y.promise}function J(p){var v=O[p.name],y=v.deferredOperations.pop();if(y)return y.resolve(),y.promise}function ee(p,v){var y=O[p.name],x=y.deferredOperations.pop();if(x)return x.reject(v),x.promise}function te(p,v){return new d(function(y,x){if(O[p.name]=O[p.name]||Ne(),p.db)if(v)X(p),p.db.close();else return y(p.db);var A=[p.name];v&&A.push(p.version);var b=l.open.apply(l,A);v&&(b.onupgradeneeded=function(R){var k=b.result;try{k.createObjectStore(p.storeName),R.oldVersion<=1&&k.createObjectStore(C)}catch(j){if(j.name==="ConstraintError")console.warn('The database "'+p.name+'" has been upgraded from version '+R.oldVersion+" to version "+R.newVersion+', but the storage "'+p.storeName+'" already exists.');else throw j}}),b.onerror=function(R){R.preventDefault(),x(b.error)},b.onsuccess=function(){var R=b.result;R.onversionchange=function(k){k.target.close()},y(R),J(p)}})}function ne(p){return te(p,!1)}function se(p){return te(p,!0)}function ae(p,v){if(!p.db)return!0;var y=!p.db.objectStoreNames.contains(p.storeName),x=p.version<p.db.version,A=p.version>p.db.version;if(x&&(p.version!==v&&console.warn('The database "'+p.name+`" can't be downgraded from version `+p.db.version+" to version "+p.version+"."),p.version=p.db.version),A||y){if(y){var b=p.db.version+1;b>p.version&&(p.version=b)}return!0}return!1}function Ye(p){return new d(function(v,y){var x=new FileReader;x.onerror=y,x.onloadend=function(A){var b=btoa(A.target.result||"");v({__local_forage_encoded_blob:!0,data:b,type:p.type})},x.readAsBinaryString(p)})}function pe(p){var v=M(atob(p.data));return h([v],{type:p.type})}function yt(p){return p&&p.__local_forage_encoded_blob}function nt(p){var v=this,y=v._initReady().then(function(){var x=O[v._dbInfo.name];if(x&&x.dbReady)return x.dbReady});return f(y,p,p),y}function Pe(p){X(p);for(var v=O[p.name],y=v.forages,x=0;x<y.length;x++){var A=y[x];A._dbInfo.db&&(A._dbInfo.db.close(),A._dbInfo.db=null)}return p.db=null,ne(p).then(function(b){return p.db=b,ae(p)?se(p):b}).then(function(b){p.db=v.db=b;for(var R=0;R<y.length;R++)y[R]._dbInfo.db=b}).catch(function(b){throw ee(p,b),b})}function we(p,v,y,x){x===void 0&&(x=1);try{var A=p.db.transaction(p.storeName,v);y(null,A)}catch(b){if(x>0&&(!p.db||b.name==="InvalidStateError"||b.name==="NotFoundError"))return d.resolve().then(function(){if(!p.db||b.name==="NotFoundError"&&!p.db.objectStoreNames.contains(p.storeName)&&p.version<=p.db.version)return p.db&&(p.version=p.db.version+1),se(p)}).then(function(){return Pe(p).then(function(){we(p,v,y,x-1)})}).catch(y);y(b)}}function Ne(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function V(p){var v=this,y={db:null};if(p)for(var x in p)y[x]=p[x];var A=O[y.name];A||(A=Ne(),O[y.name]=A),A.forages.push(v),v._initReady||(v._initReady=v.ready,v.ready=nt);var b=[];function R(){return d.resolve()}for(var k=0;k<A.forages.length;k++){var j=A.forages[k];j!==v&&b.push(j._initReady().catch(R))}var F=A.forages.slice(0);return d.all(b).then(function(){return y.db=A.db,ne(y)}).then(function($){return y.db=$,ae(y,v._defaultConfig.version)?se(y):$}).then(function($){y.db=A.db=$,v._dbInfo=y;for(var K=0;K<F.length;K++){var Z=F[K];Z!==v&&(Z._dbInfo.db=y.db,Z._dbInfo.version=y.version)}})}function ue(p,v){var y=this;p=g(p);var x=new d(function(A,b){y.ready().then(function(){we(y._dbInfo,N,function(R,k){if(R)return b(R);try{var j=k.objectStore(y._dbInfo.storeName),F=j.get(p);F.onsuccess=function(){var $=F.result;$===void 0&&($=null),yt($)&&($=pe($)),A($)},F.onerror=function(){b(F.error)}}catch($){b($)}})}).catch(b)});return m(x,v),x}function Er(p,v){var y=this,x=new d(function(A,b){y.ready().then(function(){we(y._dbInfo,N,function(R,k){if(R)return b(R);try{var j=k.objectStore(y._dbInfo.storeName),F=j.openCursor(),$=1;F.onsuccess=function(){var K=F.result;if(K){var Z=K.value;yt(Z)&&(Z=pe(Z));var ie=p(Z,K.key,$++);ie!==void 0?A(ie):K.continue()}else A()},F.onerror=function(){b(F.error)}}catch(K){b(K)}})}).catch(b)});return m(x,v),x}function Im(p,v,y){var x=this;p=g(p);var A=new d(function(b,R){var k;x.ready().then(function(){return k=x._dbInfo,L.call(v)==="[object Blob]"?z(k.db).then(function(j){return j?v:Ye(v)}):v}).then(function(j){we(x._dbInfo,S,function(F,$){if(F)return R(F);try{var K=$.objectStore(x._dbInfo.storeName);j===null&&(j=void 0);var Z=K.put(j,p);$.oncomplete=function(){j===void 0&&(j=null),b(j)},$.onabort=$.onerror=function(){var ie=Z.error?Z.error:Z.transaction.error;R(ie)}}catch(ie){R(ie)}})}).catch(R)});return m(A,y),A}function Pm(p,v){var y=this;p=g(p);var x=new d(function(A,b){y.ready().then(function(){we(y._dbInfo,S,function(R,k){if(R)return b(R);try{var j=k.objectStore(y._dbInfo.storeName),F=j.delete(p);k.oncomplete=function(){A()},k.onerror=function(){b(F.error)},k.onabort=function(){var $=F.error?F.error:F.transaction.error;b($)}}catch($){b($)}})}).catch(b)});return m(x,v),x}function Rm(p){var v=this,y=new d(function(x,A){v.ready().then(function(){we(v._dbInfo,S,function(b,R){if(b)return A(b);try{var k=R.objectStore(v._dbInfo.storeName),j=k.clear();R.oncomplete=function(){x()},R.onabort=R.onerror=function(){var F=j.error?j.error:j.transaction.error;A(F)}}catch(F){A(F)}})}).catch(A)});return m(y,p),y}function qm(p){var v=this,y=new d(function(x,A){v.ready().then(function(){we(v._dbInfo,N,function(b,R){if(b)return A(b);try{var k=R.objectStore(v._dbInfo.storeName),j=k.count();j.onsuccess=function(){x(j.result)},j.onerror=function(){A(j.error)}}catch(F){A(F)}})}).catch(A)});return m(y,p),y}function Mm(p,v){var y=this,x=new d(function(A,b){if(p<0){A(null);return}y.ready().then(function(){we(y._dbInfo,N,function(R,k){if(R)return b(R);try{var j=k.objectStore(y._dbInfo.storeName),F=!1,$=j.openKeyCursor();$.onsuccess=function(){var K=$.result;if(!K){A(null);return}p===0||F?A(K.key):(F=!0,K.advance(p))},$.onerror=function(){b($.error)}}catch(K){b(K)}})}).catch(b)});return m(x,v),x}function Dm(p){var v=this,y=new d(function(x,A){v.ready().then(function(){we(v._dbInfo,N,function(b,R){if(b)return A(b);try{var k=R.objectStore(v._dbInfo.storeName),j=k.openKeyCursor(),F=[];j.onsuccess=function(){var $=j.result;if(!$){x(F);return}F.push($.key),$.continue()},j.onerror=function(){A(j.error)}}catch($){A($)}})}).catch(A)});return m(y,p),y}function km(p,v){v=w.apply(this,arguments);var y=this.config();p=typeof p!="function"&&p||{},p.name||(p.name=p.name||y.name,p.storeName=p.storeName||y.storeName);var x=this,A;if(!p.name)A=d.reject("Invalid arguments");else{var b=p.name===y.name&&x._dbInfo.db,R=b?d.resolve(x._dbInfo.db):ne(p).then(function(k){var j=O[p.name],F=j.forages;j.db=k;for(var $=0;$<F.length;$++)F[$]._dbInfo.db=k;return k});p.storeName?A=R.then(function(k){if(k.objectStoreNames.contains(p.storeName)){var j=k.version+1;X(p);var F=O[p.name],$=F.forages;k.close();for(var K=0;K<$.length;K++){var Z=$[K];Z._dbInfo.db=null,Z._dbInfo.version=j}var ie=new d(function(oe,be){var ve=l.open(p.name,j);ve.onerror=function(Le){var Or=ve.result;Or.close(),be(Le)},ve.onupgradeneeded=function(){var Le=ve.result;Le.deleteObjectStore(p.storeName)},ve.onsuccess=function(){var Le=ve.result;Le.close(),oe(Le)}});return ie.then(function(oe){F.db=oe;for(var be=0;be<$.length;be++){var ve=$[be];ve._dbInfo.db=oe,J(ve._dbInfo)}}).catch(function(oe){throw(ee(p,oe)||d.resolve()).catch(function(){}),oe})}}):A=R.then(function(k){X(p);var j=O[p.name],F=j.forages;k.close();for(var $=0;$<F.length;$++){var K=F[$];K._dbInfo.db=null}var Z=new d(function(ie,oe){var be=l.deleteDatabase(p.name);be.onerror=function(){var ve=be.result;ve&&ve.close(),oe(be.error)},be.onblocked=function(){console.warn('dropInstance blocked for database "'+p.name+'" until all open connections are closed')},be.onsuccess=function(){var ve=be.result;ve&&ve.close(),ie(ve)}});return Z.then(function(ie){j.db=ie;for(var oe=0;oe<F.length;oe++){var be=F[oe];J(be._dbInfo)}}).catch(function(ie){throw(ee(p,ie)||d.resolve()).catch(function(){}),ie})})}return m(A,v),A}var Lm={_driver:"asyncStorage",_initStorage:V,_support:c(),iterate:Er,getItem:ue,setItem:Im,removeItem:Pm,clear:Rm,length:qm,key:Mm,keys:Dm,dropInstance:km};function Nm(){return typeof openDatabase=="function"}var wt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jm="~~local_forage_type~",Vo=/^~~local_forage_type~([^~]+)~/,Sn="__lfsc__:",Di=Sn.length,ki="arbf",Li="blob",Go="si08",Jo="ui08",Yo="uic8",Xo="si16",Zo="si32",Qo="ur16",ea="ui32",ta="fl32",ra="fl64",na=Di+ki.length,ia=Object.prototype.toString;function sa(p){var v=p.length*.75,y=p.length,x,A=0,b,R,k,j;p[p.length-1]==="="&&(v--,p[p.length-2]==="="&&v--);var F=new ArrayBuffer(v),$=new Uint8Array(F);for(x=0;x<y;x+=4)b=wt.indexOf(p[x]),R=wt.indexOf(p[x+1]),k=wt.indexOf(p[x+2]),j=wt.indexOf(p[x+3]),$[A++]=b<<2|R>>4,$[A++]=(R&15)<<4|k>>2,$[A++]=(k&3)<<6|j&63;return F}function Ni(p){var v=new Uint8Array(p),y="",x;for(x=0;x<v.length;x+=3)y+=wt[v[x]>>2],y+=wt[(v[x]&3)<<4|v[x+1]>>4],y+=wt[(v[x+1]&15)<<2|v[x+2]>>6],y+=wt[v[x+2]&63];return v.length%3===2?y=y.substring(0,y.length-1)+"=":v.length%3===1&&(y=y.substring(0,y.length-2)+"=="),y}function Fm(p,v){var y="";if(p&&(y=ia.call(p)),p&&(y==="[object ArrayBuffer]"||p.buffer&&ia.call(p.buffer)==="[object ArrayBuffer]")){var x,A=Sn;p instanceof ArrayBuffer?(x=p,A+=ki):(x=p.buffer,y==="[object Int8Array]"?A+=Go:y==="[object Uint8Array]"?A+=Jo:y==="[object Uint8ClampedArray]"?A+=Yo:y==="[object Int16Array]"?A+=Xo:y==="[object Uint16Array]"?A+=Qo:y==="[object Int32Array]"?A+=Zo:y==="[object Uint32Array]"?A+=ea:y==="[object Float32Array]"?A+=ta:y==="[object Float64Array]"?A+=ra:v(new Error("Failed to get type for BinaryArray"))),v(A+Ni(x))}else if(y==="[object Blob]"){var b=new FileReader;b.onload=function(){var R=jm+p.type+"~"+Ni(this.result);v(Sn+Li+R)},b.readAsArrayBuffer(p)}else try{v(JSON.stringify(p))}catch(R){console.error("Couldn't convert value into a JSON string: ",p),v(null,R)}}function Bm(p){if(p.substring(0,Di)!==Sn)return JSON.parse(p);var v=p.substring(na),y=p.substring(Di,na),x;if(y===Li&&Vo.test(v)){var A=v.match(Vo);x=A[1],v=v.substring(A[0].length)}var b=sa(v);switch(y){case ki:return b;case Li:return h([b],{type:x});case Go:return new Int8Array(b);case Jo:return new Uint8Array(b);case Yo:return new Uint8ClampedArray(b);case Xo:return new Int16Array(b);case Qo:return new Uint16Array(b);case Zo:return new Int32Array(b);case ea:return new Uint32Array(b);case ta:return new Float32Array(b);case ra:return new Float64Array(b);default:throw new Error("Unkown type: "+y)}}var ji={serialize:Fm,deserialize:Bm,stringToBuffer:sa,bufferToString:Ni};function oa(p,v,y,x){p.executeSql("CREATE TABLE IF NOT EXISTS "+v.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],y,x)}function Um(p){var v=this,y={db:null};if(p)for(var x in p)y[x]=typeof p[x]!="string"?p[x].toString():p[x];var A=new d(function(b,R){try{y.db=openDatabase(y.name,String(y.version),y.description,y.size)}catch(k){return R(k)}y.db.transaction(function(k){oa(k,y,function(){v._dbInfo=y,b()},function(j,F){R(F)})},R)});return y.serializer=ji,A}function vt(p,v,y,x,A,b){p.executeSql(y,x,A,function(R,k){k.code===k.SYNTAX_ERR?R.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[v.storeName],function(j,F){F.rows.length?b(j,k):oa(j,v,function(){j.executeSql(y,x,A,b)},b)},b):b(R,k)},b)}function $m(p,v){var y=this;p=g(p);var x=new d(function(A,b){y.ready().then(function(){var R=y._dbInfo;R.db.transaction(function(k){vt(k,R,"SELECT * FROM "+R.storeName+" WHERE key = ? LIMIT 1",[p],function(j,F){var $=F.rows.length?F.rows.item(0).value:null;$&&($=R.serializer.deserialize($)),A($)},function(j,F){b(F)})})}).catch(b)});return m(x,v),x}function zm(p,v){var y=this,x=new d(function(A,b){y.ready().then(function(){var R=y._dbInfo;R.db.transaction(function(k){vt(k,R,"SELECT * FROM "+R.storeName,[],function(j,F){for(var $=F.rows,K=$.length,Z=0;Z<K;Z++){var ie=$.item(Z),oe=ie.value;if(oe&&(oe=R.serializer.deserialize(oe)),oe=p(oe,ie.key,Z+1),oe!==void 0){A(oe);return}}A()},function(j,F){b(F)})})}).catch(b)});return m(x,v),x}function aa(p,v,y,x){var A=this;p=g(p);var b=new d(function(R,k){A.ready().then(function(){v===void 0&&(v=null);var j=v,F=A._dbInfo;F.serializer.serialize(v,function($,K){K?k(K):F.db.transaction(function(Z){vt(Z,F,"INSERT OR REPLACE INTO "+F.storeName+" (key, value) VALUES (?, ?)",[p,$],function(){R(j)},function(ie,oe){k(oe)})},function(Z){if(Z.code===Z.QUOTA_ERR){if(x>0){R(aa.apply(A,[p,j,y,x-1]));return}k(Z)}})})}).catch(k)});return m(b,y),b}function Hm(p,v,y){return aa.apply(this,[p,v,y,1])}function Wm(p,v){var y=this;p=g(p);var x=new d(function(A,b){y.ready().then(function(){var R=y._dbInfo;R.db.transaction(function(k){vt(k,R,"DELETE FROM "+R.storeName+" WHERE key = ?",[p],function(){A()},function(j,F){b(F)})})}).catch(b)});return m(x,v),x}function Km(p){var v=this,y=new d(function(x,A){v.ready().then(function(){var b=v._dbInfo;b.db.transaction(function(R){vt(R,b,"DELETE FROM "+b.storeName,[],function(){x()},function(k,j){A(j)})})}).catch(A)});return m(y,p),y}function Vm(p){var v=this,y=new d(function(x,A){v.ready().then(function(){var b=v._dbInfo;b.db.transaction(function(R){vt(R,b,"SELECT COUNT(key) as c FROM "+b.storeName,[],function(k,j){var F=j.rows.item(0).c;x(F)},function(k,j){A(j)})})}).catch(A)});return m(y,p),y}function Gm(p,v){var y=this,x=new d(function(A,b){y.ready().then(function(){var R=y._dbInfo;R.db.transaction(function(k){vt(k,R,"SELECT key FROM "+R.storeName+" WHERE id = ? LIMIT 1",[p+1],function(j,F){var $=F.rows.length?F.rows.item(0).key:null;A($)},function(j,F){b(F)})})}).catch(b)});return m(x,v),x}function Jm(p){var v=this,y=new d(function(x,A){v.ready().then(function(){var b=v._dbInfo;b.db.transaction(function(R){vt(R,b,"SELECT key FROM "+b.storeName,[],function(k,j){for(var F=[],$=0;$<j.rows.length;$++)F.push(j.rows.item($).key);x(F)},function(k,j){A(j)})})}).catch(A)});return m(y,p),y}function Ym(p){return new d(function(v,y){p.transaction(function(x){x.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(A,b){for(var R=[],k=0;k<b.rows.length;k++)R.push(b.rows.item(k).name);v({db:p,storeNames:R})},function(A,b){y(b)})},function(x){y(x)})})}function Xm(p,v){v=w.apply(this,arguments);var y=this.config();p=typeof p!="function"&&p||{},p.name||(p.name=p.name||y.name,p.storeName=p.storeName||y.storeName);var x=this,A;return p.name?A=new d(function(b){var R;p.name===y.name?R=x._dbInfo.db:R=openDatabase(p.name,"","",0),p.storeName?b({db:R,storeNames:[p.storeName]}):b(Ym(R))}).then(function(b){return new d(function(R,k){b.db.transaction(function(j){function F(ie){return new d(function(oe,be){j.executeSql("DROP TABLE IF EXISTS "+ie,[],function(){oe()},function(ve,Le){be(Le)})})}for(var $=[],K=0,Z=b.storeNames.length;K<Z;K++)$.push(F(b.storeNames[K]));d.all($).then(function(){R()}).catch(function(ie){k(ie)})},function(j){k(j)})})}):A=d.reject("Invalid arguments"),m(A,v),A}var Zm={_driver:"webSQLStorage",_initStorage:Um,_support:Nm(),iterate:zm,getItem:$m,setItem:Hm,removeItem:Wm,clear:Km,length:Vm,key:Gm,keys:Jm,dropInstance:Xm};function Qm(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch(p){return!1}}function ua(p,v){var y=p.name+"/";return p.storeName!==v.storeName&&(y+=p.storeName+"/"),y}function eg(){var p="_localforage_support_test";try{return localStorage.setItem(p,!0),localStorage.removeItem(p),!1}catch(v){return!0}}function tg(){return!eg()||localStorage.length>0}function rg(p){var v=this,y={};if(p)for(var x in p)y[x]=p[x];return y.keyPrefix=ua(p,v._defaultConfig),tg()?(v._dbInfo=y,y.serializer=ji,d.resolve()):d.reject()}function ng(p){var v=this,y=v.ready().then(function(){for(var x=v._dbInfo.keyPrefix,A=localStorage.length-1;A>=0;A--){var b=localStorage.key(A);b.indexOf(x)===0&&localStorage.removeItem(b)}});return m(y,p),y}function ig(p,v){var y=this;p=g(p);var x=y.ready().then(function(){var A=y._dbInfo,b=localStorage.getItem(A.keyPrefix+p);return b&&(b=A.serializer.deserialize(b)),b});return m(x,v),x}function sg(p,v){var y=this,x=y.ready().then(function(){for(var A=y._dbInfo,b=A.keyPrefix,R=b.length,k=localStorage.length,j=1,F=0;F<k;F++){var $=localStorage.key(F);if($.indexOf(b)===0){var K=localStorage.getItem($);if(K&&(K=A.serializer.deserialize(K)),K=p(K,$.substring(R),j++),K!==void 0)return K}}});return m(x,v),x}function og(p,v){var y=this,x=y.ready().then(function(){var A=y._dbInfo,b;try{b=localStorage.key(p)}catch(R){b=null}return b&&(b=b.substring(A.keyPrefix.length)),b});return m(x,v),x}function ag(p){var v=this,y=v.ready().then(function(){for(var x=v._dbInfo,A=localStorage.length,b=[],R=0;R<A;R++){var k=localStorage.key(R);k.indexOf(x.keyPrefix)===0&&b.push(k.substring(x.keyPrefix.length))}return b});return m(y,p),y}function ug(p){var v=this,y=v.keys().then(function(x){return x.length});return m(y,p),y}function lg(p,v){var y=this;p=g(p);var x=y.ready().then(function(){var A=y._dbInfo;localStorage.removeItem(A.keyPrefix+p)});return m(x,v),x}function cg(p,v,y){var x=this;p=g(p);var A=x.ready().then(function(){v===void 0&&(v=null);var b=v;return new d(function(R,k){var j=x._dbInfo;j.serializer.serialize(v,function(F,$){if($)k($);else try{localStorage.setItem(j.keyPrefix+p,F),R(b)}catch(K){(K.name==="QuotaExceededError"||K.name==="NS_ERROR_DOM_QUOTA_REACHED")&&k(K),k(K)}})})});return m(A,y),A}function fg(p,v){if(v=w.apply(this,arguments),p=typeof p!="function"&&p||{},!p.name){var y=this.config();p.name=p.name||y.name,p.storeName=p.storeName||y.storeName}var x=this,A;return p.name?A=new d(function(b){p.storeName?b(ua(p,x._defaultConfig)):b(p.name+"/")}).then(function(b){for(var R=localStorage.length-1;R>=0;R--){var k=localStorage.key(R);k.indexOf(b)===0&&localStorage.removeItem(k)}}):A=d.reject("Invalid arguments"),m(A,v),A}var hg={_driver:"localStorageWrapper",_initStorage:rg,_support:Qm(),iterate:sg,getItem:ig,setItem:cg,removeItem:lg,clear:ng,length:ug,key:og,keys:ag,dropInstance:fg},pg=function(v,y){return v===y||typeof v=="number"&&typeof y=="number"&&isNaN(v)&&isNaN(y)},dg=function(v,y){for(var x=v.length,A=0;A<x;){if(pg(v[A],y))return!0;A++}return!1},la=Array.isArray||function(p){return Object.prototype.toString.call(p)==="[object Array]"},Cr={},ca={},Wt={INDEXEDDB:Lm,WEBSQL:Zm,LOCALSTORAGE:hg},mg=[Wt.INDEXEDDB._driver,Wt.WEBSQL._driver,Wt.LOCALSTORAGE._driver],An=["dropInstance"],Fi=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(An),gg={description:"",driver:mg.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function yg(p,v){p[v]=function(){var y=arguments;return p.ready().then(function(){return p[v].apply(p,y)})}}function Bi(){for(var p=1;p<arguments.length;p++){var v=arguments[p];if(v)for(var y in v)v.hasOwnProperty(y)&&(la(v[y])?arguments[0][y]=v[y].slice():arguments[0][y]=v[y])}return arguments[0]}var wg=(function(){function p(v){a(this,p);for(var y in Wt)if(Wt.hasOwnProperty(y)){var x=Wt[y],A=x._driver;this[y]=A,Cr[A]||this.defineDriver(x)}this._defaultConfig=Bi({},gg),this._config=Bi({},this._defaultConfig,v),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return p.prototype.config=function(y){if((typeof y=="undefined"?"undefined":o(y))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var x in y){if(x==="storeName"&&(y[x]=y[x].replace(/\W/g,"_")),x==="version"&&typeof y[x]!="number")return new Error("Database version must be a number.");this._config[x]=y[x]}return"driver"in y&&y.driver?this.setDriver(this._config.driver):!0}else return typeof y=="string"?this._config[y]:this._config},p.prototype.defineDriver=function(y,x,A){var b=new d(function(R,k){try{var j=y._driver,F=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!y._driver){k(F);return}for(var $=Fi.concat("_initStorage"),K=0,Z=$.length;K<Z;K++){var ie=$[K],oe=!dg(An,ie);if((oe||y[ie])&&typeof y[ie]!="function"){k(F);return}}var be=function(){for(var Or=function(_g){return function(){var xg=new Error("Method "+_g+" is not implemented by the current driver"),fa=d.reject(xg);return m(fa,arguments[arguments.length-1]),fa}},Ui=0,bg=An.length;Ui<bg;Ui++){var $i=An[Ui];y[$i]||(y[$i]=Or($i))}};be();var ve=function(Or){Cr[j]&&console.info("Redefining LocalForage driver: "+j),Cr[j]=y,ca[j]=Or,R()};"_support"in y?y._support&&typeof y._support=="function"?y._support().then(ve,k):ve(!!y._support):ve(!0)}catch(Le){k(Le)}});return f(b,x,A),b},p.prototype.driver=function(){return this._driver||null},p.prototype.getDriver=function(y,x,A){var b=Cr[y]?d.resolve(Cr[y]):d.reject(new Error("Driver not found."));return f(b,x,A),b},p.prototype.getSerializer=function(y){var x=d.resolve(ji);return f(x,y),x},p.prototype.ready=function(y){var x=this,A=x._driverSet.then(function(){return x._ready===null&&(x._ready=x._initDriver()),x._ready});return f(A,y,y),A},p.prototype.setDriver=function(y,x,A){var b=this;la(y)||(y=[y]);var R=this._getSupportedDrivers(y);function k(){b._config.driver=b.driver()}function j(K){return b._extend(K),k(),b._ready=b._initStorage(b._config),b._ready}function F(K){return function(){var Z=0;function ie(){for(;Z<K.length;){var oe=K[Z];return Z++,b._dbInfo=null,b._ready=null,b.getDriver(oe).then(j).catch(ie)}k();var be=new Error("No available storage method found.");return b._driverSet=d.reject(be),b._driverSet}return ie()}}var $=this._driverSet!==null?this._driverSet.catch(function(){return d.resolve()}):d.resolve();return this._driverSet=$.then(function(){var K=R[0];return b._dbInfo=null,b._ready=null,b.getDriver(K).then(function(Z){b._driver=Z._driver,k(),b._wrapLibraryMethodsWithReady(),b._initDriver=F(R)})}).catch(function(){k();var K=new Error("No available storage method found.");return b._driverSet=d.reject(K),b._driverSet}),f(this._driverSet,x,A),this._driverSet},p.prototype.supports=function(y){return!!ca[y]},p.prototype._extend=function(y){Bi(this,y)},p.prototype._getSupportedDrivers=function(y){for(var x=[],A=0,b=y.length;A<b;A++){var R=y[A];this.supports(R)&&x.push(R)}return x},p.prototype._wrapLibraryMethodsWithReady=function(){for(var y=0,x=Fi.length;y<x;y++)yg(this,Fi[y])},p.prototype.createInstance=function(y){return new p(y)},p})(),vg=new wg;i.exports=vg},{3:3}]},{},[4])(4)})});var Io=_(()=>{});var A3={};Pt(A3,{BaseProvider:()=>Q,CocodaSDK:()=>Ar,ConceptApiProvider:()=>We,LabelSearchSuggestionProvider:()=>ut,LobidApiProvider:()=>dt,LocApiProvider:()=>ct,LocalMappingsProvider:()=>Ct,MappingsApiProvider:()=>He,MyCoReProvider:()=>mt,NoTApiProvider:()=>gt,OccurrencesApiProvider:()=>at,ReconciliationApiProvider:()=>tt,SkohubProvider:()=>ht,SkosmosApiProvider:()=>lt,addAllProviders:()=>S3,cdk:()=>Tm,errors:()=>Oe,utils:()=>jt});var Oe={};Pt(Oe,{BackendError:()=>Rr,BackendUnavailableError:()=>qr,CDKError:()=>Ae,InvalidOrMissingParameterError:()=>U,InvalidProviderError:()=>Vt,InvalidRequestError:()=>Xe,MethodNotImplementedError:()=>Pr,MissingApiUrlError:()=>ke,NetworkError:()=>Mr});var Ae=class extends Error{constructor({message:t="",relatedError:r=null,code:n=null}={}){!t&&r&&r.message&&(t=r.message),super(t),this.name=this.constructor.name,this.relatedError=r,this.code=n}},Pr=class extends Ae{constructor(i){var s=i,{method:t,message:r=""}=s,n=H(s,["method","message"]);n.message=`Method not implemented: ${t} (${r})`,super(n)}},U=class extends Ae{constructor(i){var s=i,{parameter:t,message:r=""}=s,n=H(s,["parameter","message"]);n.message=`Invalid or missing parameter: ${t} (${r})`,super(n)}},Xe=class extends Ae{},Rr=class extends Ae{},qr=class extends Ae{},Mr=class extends Ae{},ke=class extends Ae{},Vt=class extends Ae{};function Dr(e,t){return function(){return e.apply(t,arguments)}}var{toString:Rg}=Object.prototype,{getPrototypeOf:Gi}=Object,{iterator:On,toStringTag:ga}=Symbol,Tn=(e=>t=>{let r=Rg.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),je=e=>(e=e.toLowerCase(),t=>Tn(t)===e),In=e=>t=>typeof t===e,{isArray:Jt}=Array,Gt=In("undefined");function kr(e){return e!==null&&!Gt(e)&&e.constructor!==null&&!Gt(e.constructor)&&qe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var ya=je("ArrayBuffer");function qg(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ya(e.buffer),t}var Mg=In("string"),qe=In("function"),wa=In("number"),Lr=e=>e!==null&&typeof e=="object",Dg=e=>e===!0||e===!1,Cn=e=>{if(Tn(e)!=="object")return!1;let t=Gi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ga in e)&&!(On in e)},kg=e=>{if(!Lr(e)||kr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},Lg=je("Date"),Ng=je("File"),jg=je("Blob"),Fg=je("FileList"),Bg=e=>Lr(e)&&qe(e.pipe),Ug=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||qe(e.append)&&((t=Tn(e))==="formdata"||t==="object"&&qe(e.toString)&&e.toString()==="[object FormData]"))},$g=je("URLSearchParams"),[zg,Hg,Wg,Kg]=["ReadableStream","Request","Response","Headers"].map(je),Vg=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Nr(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e=="undefined")return;let n,i;if(typeof e!="object"&&(e=[e]),Jt(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(kr(e))return;let s=r?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length,a;for(n=0;n<o;n++)a=s[n],t.call(null,e[a],a,e)}}function va(e,t){if(kr(e))return null;t=t.toLowerCase();let r=Object.keys(e),n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}var qt=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,ba=e=>!Gt(e)&&e!==qt;function Vi(){let{caseless:e,skipUndefined:t}=ba(this)&&this||{},r={},n=(i,s)=>{let o=e&&va(r,s)||s;Cn(r[o])&&Cn(i)?r[o]=Vi(r[o],i):Cn(i)?r[o]=Vi({},i):Jt(i)?r[o]=i.slice():(!t||!Gt(i))&&(r[o]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&Nr(arguments[i],n);return r}var Gg=(e,t,r,{allOwnKeys:n}={})=>(Nr(t,(i,s)=>{r&&qe(i)?Object.defineProperty(e,s,{value:Dr(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),Jg=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Yg=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Xg=(e,t,r,n)=>{let i,s,o,a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!n||n(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=r!==!1&&Gi(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Zg=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return n!==-1&&n===r},Qg=e=>{if(!e)return null;if(Jt(e))return e;let t=e.length;if(!wa(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},e0=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Gi(Uint8Array)),t0=(e,t)=>{let n=(e&&e[On]).call(e),i;for(;(i=n.next())&&!i.done;){let s=i.value;t.call(e,s[0],s[1])}},r0=(e,t)=>{let r,n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},n0=je("HTMLFormElement"),i0=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),ma=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),s0=je("RegExp"),_a=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};Nr(r,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(n[s]=o||i)}),Object.defineProperties(e,n)},o0=e=>{_a(e,(t,r)=>{if(qe(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=e[r];if(qe(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},a0=(e,t)=>{let r={},n=i=>{i.forEach(s=>{r[s]=!0})};return Jt(e)?n(e):n(String(e).split(t)),r},u0=()=>{},l0=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function c0(e){return!!(e&&qe(e.append)&&e[ga]==="FormData"&&e[On])}var f0=e=>{let t=new Array(10),r=(n,i)=>{if(Lr(n)){if(t.indexOf(n)>=0)return;if(kr(n))return n;if(!("toJSON"in n)){t[i]=n;let s=Jt(n)?[]:{};return Nr(n,(o,a)=>{let u=r(o,i+1);!Gt(u)&&(s[a]=u)}),t[i]=void 0,s}}return n};return r(e,0)},h0=je("AsyncFunction"),p0=e=>e&&(Lr(e)||qe(e))&&qe(e.then)&&qe(e.catch),xa=((e,t)=>e?setImmediate:t?((r,n)=>(qt.addEventListener("message",({source:i,data:s})=>{i===qt&&s===r&&n.length&&n.shift()()},!1),i=>{n.push(i),qt.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",qe(qt.postMessage)),d0=typeof queueMicrotask!="undefined"?queueMicrotask.bind(qt):typeof process!="undefined"&&process.nextTick||xa,m0=e=>e!=null&&qe(e[On]),E={isArray:Jt,isArrayBuffer:ya,isBuffer:kr,isFormData:Ug,isArrayBufferView:qg,isString:Mg,isNumber:wa,isBoolean:Dg,isObject:Lr,isPlainObject:Cn,isEmptyObject:kg,isReadableStream:zg,isRequest:Hg,isResponse:Wg,isHeaders:Kg,isUndefined:Gt,isDate:Lg,isFile:Ng,isBlob:jg,isRegExp:s0,isFunction:qe,isStream:Bg,isURLSearchParams:$g,isTypedArray:e0,isFileList:Fg,forEach:Nr,merge:Vi,extend:Gg,trim:Vg,stripBOM:Jg,inherits:Yg,toFlatObject:Xg,kindOf:Tn,kindOfTest:je,endsWith:Zg,toArray:Qg,forEachEntry:t0,matchAll:r0,isHTMLForm:n0,hasOwnProperty:ma,hasOwnProp:ma,reduceDescriptors:_a,freezeMethods:o0,toObjectSet:a0,toCamelCase:i0,noop:u0,toFiniteNumber:l0,findKey:va,global:qt,isContextDefined:ba,isSpecCompliantForm:c0,toJSONObject:f0,isAsyncFn:h0,isThenable:p0,setImmediate:xa,asap:d0,isIterable:m0};var Re=class e extends Error{static from(t,r,n,i,s,o){let a=new e(t.message,r||t.code,n,i,s);return a.cause=t,a.name=t.name,o&&Object.assign(a,o),a}constructor(t,r,n,i,s){super(t),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s,this.status=s.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:E.toJSONObject(this.config),code:this.code,status:this.status}}};Re.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Re.ERR_BAD_OPTION="ERR_BAD_OPTION";Re.ECONNABORTED="ECONNABORTED";Re.ETIMEDOUT="ETIMEDOUT";Re.ERR_NETWORK="ERR_NETWORK";Re.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Re.ERR_DEPRECATED="ERR_DEPRECATED";Re.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Re.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Re.ERR_CANCELED="ERR_CANCELED";Re.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Re.ERR_INVALID_URL="ERR_INVALID_URL";var Y=Re;var Pn=null;function Ji(e){return E.isPlainObject(e)||E.isArray(e)}function Aa(e){return E.endsWith(e,"[]")?e.slice(0,-2):e}function Sa(e,t,r){return e?e.concat(t).map(function(i,s){return i=Aa(i),!r&&s?"["+i+"]":i}).join(r?".":""):t}function g0(e){return E.isArray(e)&&!e.some(Ji)}var y0=E.toFlatObject(E,{},null,function(t){return/^is[A-Z]/.test(t)});function w0(e,t,r){if(!E.isObject(e))throw new TypeError("target must be an object");t=t||new(Pn||FormData),r=E.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,w){return!E.isUndefined(w[g])});let n=r.metaTokens,i=r.visitor||c,s=r.dots,o=r.indexes,u=(r.Blob||typeof Blob!="undefined"&&Blob)&&E.isSpecCompliantForm(t);if(!E.isFunction(i))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(E.isDate(f))return f.toISOString();if(E.isBoolean(f))return f.toString();if(!u&&E.isBlob(f))throw new Y("Blob is not supported. Use a Buffer instead.");return E.isArrayBuffer(f)||E.isTypedArray(f)?u&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function c(f,g,w){let C=f;if(f&&!w&&typeof f=="object"){if(E.endsWith(g,"{}"))g=n?g:g.slice(0,-2),f=JSON.stringify(f);else if(E.isArray(f)&&g0(f)||(E.isFileList(f)||E.endsWith(g,"[]"))&&(C=E.toArray(f)))return g=Aa(g),C.forEach(function(O,L){!(E.isUndefined(O)||O===null)&&t.append(o===!0?Sa([g],L,s):o===null?g:g+"[]",l(O))}),!1}return Ji(f)?!0:(t.append(Sa(w,g,s),l(f)),!1)}let h=[],d=Object.assign(y0,{defaultVisitor:c,convertValue:l,isVisitable:Ji});function m(f,g){if(!E.isUndefined(f)){if(h.indexOf(f)!==-1)throw Error("Circular reference detected in "+g.join("."));h.push(f),E.forEach(f,function(C,I){(!(E.isUndefined(C)||C===null)&&i.call(t,C,E.isString(I)?I.trim():I,g,d))===!0&&m(C,g?g.concat(I):[I])}),h.pop()}}if(!E.isObject(e))throw new TypeError("data must be an object");return m(e),t}var _t=w0;function Ea(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ca(e,t){this._pairs=[],e&&_t(e,this,t)}var Oa=Ca.prototype;Oa.append=function(t,r){this._pairs.push([t,r])};Oa.toString=function(t){let r=t?function(n){return t.call(this,n,Ea)}:Ea;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};var Rn=Ca;function v0(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function jr(e,t,r){if(!t)return e;let n=r&&r.encode||v0,i=E.isFunction(r)?{serialize:r}:r,s=i&&i.serialize,o;if(s?o=s(t,i):o=E.isURLSearchParams(t)?t.toString():new Rn(t,i).toString(n),o){let a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Yi=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){E.forEach(this.handlers,function(n){n!==null&&t(n)})}},Xi=Yi;var qn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Ta=typeof URLSearchParams!="undefined"?URLSearchParams:Rn;var Ia=typeof FormData!="undefined"?FormData:null;var Pa=typeof Blob!="undefined"?Blob:null;var Ra={isBrowser:!0,classes:{URLSearchParams:Ta,FormData:Ia,Blob:Pa},protocols:["http","https","file","blob","url","data"]};var es={};Pt(es,{hasBrowserEnv:()=>Qi,hasStandardBrowserEnv:()=>b0,hasStandardBrowserWebWorkerEnv:()=>_0,navigator:()=>Zi,origin:()=>x0});var Qi=typeof window!="undefined"&&typeof document!="undefined",Zi=typeof navigator=="object"&&navigator||void 0,b0=Qi&&(!Zi||["ReactNative","NativeScript","NS"].indexOf(Zi.product)<0),_0=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",x0=Qi&&window.location.href||"http://localhost";var de=T(T({},es),Ra);function ts(e,t){return _t(e,new de.classes.URLSearchParams,T({visitor:function(r,n,i,s){return de.isNode&&E.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function S0(e){return E.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function A0(e){let t={},r=Object.keys(e),n,i=r.length,s;for(n=0;n<i;n++)s=r[n],t[s]=e[s];return t}function E0(e){function t(r,n,i,s){let o=r[s++];if(o==="__proto__")return!0;let a=Number.isFinite(+o),u=s>=r.length;return o=!o&&E.isArray(i)?i.length:o,u?(E.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a):((!i[o]||!E.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],s)&&E.isArray(i[o])&&(i[o]=A0(i[o])),!a)}if(E.isFormData(e)&&E.isFunction(e.entries)){let r={};return E.forEachEntry(e,(n,i)=>{t(S0(n),i,r,0)}),r}return null}var Mn=E0;function C0(e,t,r){if(E.isString(e))try{return(t||JSON.parse)(e),E.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var rs={transitional:qn,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let n=r.getContentType()||"",i=n.indexOf("application/json")>-1,s=E.isObject(t);if(s&&E.isHTMLForm(t)&&(t=new FormData(t)),E.isFormData(t))return i?JSON.stringify(Mn(t)):t;if(E.isArrayBuffer(t)||E.isBuffer(t)||E.isStream(t)||E.isFile(t)||E.isBlob(t)||E.isReadableStream(t))return t;if(E.isArrayBufferView(t))return t.buffer;if(E.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ts(t,this.formSerializer).toString();if((a=E.isFileList(t))||n.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return _t(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return s||i?(r.setContentType("application/json",!1),C0(t)):t}],transformResponse:[function(t){let r=this.transitional||rs.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(E.isResponse(t)||E.isReadableStream(t))return t;if(t&&E.isString(t)&&(n&&!this.responseType||i)){let o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?Y.from(a,Y.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:de.classes.FormData,Blob:de.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};E.forEach(["delete","get","head","post","put","patch"],e=>{rs.headers[e]={}});var Yt=rs;var O0=E.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),qa=e=>{let t={},r,n,i;return e&&e.split(`
9
+ `).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&O0[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t};var Ma=Symbol("internals");function Fr(e){return e&&String(e).trim().toLowerCase()}function Dn(e){return e===!1||e==null?e:E.isArray(e)?e.map(Dn):String(e)}function T0(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}var I0=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ns(e,t,r,n,i){if(E.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!E.isString(t)){if(E.isString(n))return t.indexOf(n)!==-1;if(E.isRegExp(n))return n.test(t)}}function P0(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function R0(e,t){let r=E.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,s,o){return this[n].call(this,t,i,s,o)},configurable:!0})})}var Xt=class{constructor(t){t&&this.set(t)}set(t,r,n){let i=this;function s(a,u,l){let c=Fr(u);if(!c)throw new Error("header name must be a non-empty string");let h=E.findKey(i,c);(!h||i[h]===void 0||l===!0||l===void 0&&i[h]!==!1)&&(i[h||u]=Dn(a))}let o=(a,u)=>E.forEach(a,(l,c)=>s(l,c,u));if(E.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(E.isString(t)&&(t=t.trim())&&!I0(t))o(qa(t),r);else if(E.isObject(t)&&E.isIterable(t)){let a={},u,l;for(let c of t){if(!E.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[l=c[0]]=(u=a[l])?E.isArray(u)?[...u,c[1]]:[u,c[1]]:c[1]}o(a,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=Fr(t),t){let n=E.findKey(this,t);if(n){let i=this[n];if(!r)return i;if(r===!0)return T0(i);if(E.isFunction(r))return r.call(this,i,n);if(E.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Fr(t),t){let n=E.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||ns(this,this[n],n,r)))}return!1}delete(t,r){let n=this,i=!1;function s(o){if(o=Fr(o),o){let a=E.findKey(n,o);a&&(!r||ns(n,n[a],a,r))&&(delete n[a],i=!0)}}return E.isArray(t)?t.forEach(s):s(t),i}clear(t){let r=Object.keys(this),n=r.length,i=!1;for(;n--;){let s=r[n];(!t||ns(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){let r=this,n={};return E.forEach(this,(i,s)=>{let o=E.findKey(n,s);if(o){r[o]=Dn(i),delete r[s];return}let a=t?P0(s):String(s).trim();a!==s&&delete r[s],r[a]=Dn(i),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return E.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&E.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
10
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){let n=(this[Ma]=this[Ma]={accessors:{}}).accessors,i=this.prototype;function s(o){let a=Fr(o);n[a]||(R0(i,o),n[a]=!0)}return E.isArray(t)?t.forEach(s):s(t),this}};Xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);E.reduceDescriptors(Xt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});E.freezeMethods(Xt);var Se=Xt;function Br(e,t){let r=this||Yt,n=t||r,i=Se.from(n.headers),s=n.data;return E.forEach(e,function(a){s=a.call(r,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Ur(e){return!!(e&&e.__CANCEL__)}var is=class extends Y{constructor(t,r,n){super(t==null?"canceled":t,Y.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}},Ze=is;function $r(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Y("Request failed with status code "+r.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function ss(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function q0(e,t){e=e||10;let r=new Array(e),n=new Array(e),i=0,s=0,o;return t=t!==void 0?t:1e3,function(u){let l=Date.now(),c=n[s];o||(o=l),r[i]=u,n[i]=l;let h=s,d=0;for(;h!==i;)d+=r[h++],h=h%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),l-o<t)return;let m=c&&l-c;return m?Math.round(d*1e3/m):void 0}}var Da=q0;function M0(e,t){let r=0,n=1e3/t,i,s,o=(l,c=Date.now())=>{r=c,i=null,s&&(clearTimeout(s),s=null),e(...l)};return[(...l)=>{let c=Date.now(),h=c-r;h>=n?o(l,c):(i=l,s||(s=setTimeout(()=>{s=null,o(i)},n-h)))},()=>i&&o(i)]}var ka=M0;var Zt=(e,t,r=3)=>{let n=0,i=Da(50,250);return ka(s=>{let o=s.loaded,a=s.lengthComputable?s.total:void 0,u=o-n,l=i(u),c=o<=a;n=o;let h={loaded:o,total:a,progress:a?o/a:void 0,bytes:u,rate:l||void 0,estimated:l&&a&&c?(a-o)/l:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(h)},r)},os=(e,t)=>{let r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},as=e=>(...t)=>E.asap(()=>e(...t));var La=de.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,de.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(de.origin),de.navigator&&/(msie|trident)/i.test(de.navigator.userAgent)):()=>!0;var Na=de.hasStandardBrowserEnv?{write(e,t,r,n,i,s,o){if(typeof document=="undefined")return;let a=[`${e}=${encodeURIComponent(t)}`];E.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),E.isString(n)&&a.push(`path=${n}`),E.isString(i)&&a.push(`domain=${i}`),s===!0&&a.push("secure"),E.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document=="undefined")return null;let t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function us(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ls(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function zr(e,t,r){let n=!us(t);return e&&(n||r==!1)?ls(e,t):t}var ja=e=>e instanceof Se?T({},e):e;function Fe(e,t){t=t||{};let r={};function n(l,c,h,d){return E.isPlainObject(l)&&E.isPlainObject(c)?E.merge.call({caseless:d},l,c):E.isPlainObject(c)?E.merge({},c):E.isArray(c)?c.slice():c}function i(l,c,h,d){if(E.isUndefined(c)){if(!E.isUndefined(l))return n(void 0,l,h,d)}else return n(l,c,h,d)}function s(l,c){if(!E.isUndefined(c))return n(void 0,c)}function o(l,c){if(E.isUndefined(c)){if(!E.isUndefined(l))return n(void 0,l)}else return n(void 0,c)}function a(l,c,h){if(h in t)return n(l,c);if(h in e)return n(void 0,l)}let u={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,c,h)=>i(ja(l),ja(c),h,!0)};return E.forEach(Object.keys(T(T({},e),t)),function(c){let h=u[c]||i,d=h(e[c],t[c],c);E.isUndefined(d)&&h!==a||(r[c]=d)}),r}var kn=e=>{let t=Fe({},e),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;if(t.headers=o=Se.from(o),t.url=jr(zr(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),E.isFormData(r)){if(de.hasStandardBrowserEnv||de.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(E.isFunction(r.getHeaders)){let u=r.getHeaders(),l=["content-type","content-length"];Object.entries(u).forEach(([c,h])=>{l.includes(c.toLowerCase())&&o.set(c,h)})}}if(de.hasStandardBrowserEnv&&(n&&E.isFunction(n)&&(n=n(t)),n||n!==!1&&La(t.url))){let u=i&&s&&Na.read(s);u&&o.set(i,u)}return t};var D0=typeof XMLHttpRequest!="undefined",Fa=D0&&function(e){return new Promise(function(r,n){let i=kn(e),s=i.data,o=Se.from(i.headers).normalize(),{responseType:a,onUploadProgress:u,onDownloadProgress:l}=i,c,h,d,m,f;function g(){m&&m(),f&&f(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let w=new XMLHttpRequest;w.open(i.method.toUpperCase(),i.url,!0),w.timeout=i.timeout;function C(){if(!w)return;let O=Se.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),N={data:!a||a==="text"||a==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:O,config:e,request:w};$r(function(M){r(M),g()},function(M){n(M),g()},N),w=null}"onloadend"in w?w.onloadend=C:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(C)},w.onabort=function(){w&&(n(new Y("Request aborted",Y.ECONNABORTED,e,w)),w=null)},w.onerror=function(L){let N=L&&L.message?L.message:"Network Error",S=new Y(N,Y.ERR_NETWORK,e,w);S.event=L||null,n(S),w=null},w.ontimeout=function(){let L=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",N=i.transitional||qn;i.timeoutErrorMessage&&(L=i.timeoutErrorMessage),n(new Y(L,N.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,w)),w=null},s===void 0&&o.setContentType(null),"setRequestHeader"in w&&E.forEach(o.toJSON(),function(L,N){w.setRequestHeader(N,L)}),E.isUndefined(i.withCredentials)||(w.withCredentials=!!i.withCredentials),a&&a!=="json"&&(w.responseType=i.responseType),l&&([d,f]=Zt(l,!0),w.addEventListener("progress",d)),u&&w.upload&&([h,m]=Zt(u),w.upload.addEventListener("progress",h),w.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(c=O=>{w&&(n(!O||O.type?new Ze(null,e,w):O),w.abort(),w=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));let I=ss(i.url);if(I&&de.protocols.indexOf(I)===-1){n(new Y("Unsupported protocol "+I+":",Y.ERR_BAD_REQUEST,e));return}w.send(s||null)})};var k0=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i,s=function(l){if(!i){i=!0,a();let c=l instanceof Error?l:this.reason;n.abort(c instanceof Y?c:new Ze(c instanceof Error?c.message:c))}},o=t&&setTimeout(()=>{o=null,s(new Y(`timeout of ${t}ms exceeded`,Y.ETIMEDOUT))},t),a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));let{signal:u}=n;return u.unsubscribe=()=>E.asap(a),u}},Ba=k0;var L0=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let n=0,i;for(;n<r;)i=n+t,yield e.slice(n,i),n=i},N0=function(e,t){return Wi(this,null,function*(){try{for(var r=da(j0(e)),n,i,s;n=!(i=yield new Rt(r.next())).done;n=!1){let o=i.value;yield*Ki(L0(o,t))}}catch(i){s=[i]}finally{try{n&&(i=r.return)&&(yield new Rt(i.call(r)))}finally{if(s)throw s[0]}}})},j0=function(e){return Wi(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Ki(e);return}let t=e.getReader();try{for(;;){let{done:r,value:n}=yield new Rt(t.read());if(r)break;yield n}}finally{yield new Rt(t.cancel())}})},cs=(e,t,r,n)=>{let i=N0(e,t),s=0,o,a=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({pull(l){return P(this,null,function*(){try{let{done:c,value:h}=yield i.next();if(c){a(),l.close();return}let d=h.byteLength;if(r){let m=s+=d;r(m)}l.enqueue(new Uint8Array(h))}catch(c){throw a(c),c}})},cancel(l){return a(l),i.return()}},{highWaterMark:2})};var Ua=64*1024,{isFunction:Ln}=E,F0=(({Request:e,Response:t})=>({Request:e,Response:t}))(E.global),{ReadableStream:$a,TextEncoder:za}=E.global,Ha=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},B0=e=>{e=E.merge.call({skipUndefined:!0},F0,e);let{fetch:t,Request:r,Response:n}=e,i=t?Ln(t):typeof fetch=="function",s=Ln(r),o=Ln(n);if(!i)return!1;let a=i&&Ln($a),u=i&&(typeof za=="function"?(f=>g=>f.encode(g))(new za):f=>P(null,null,function*(){return new Uint8Array(yield new r(f).arrayBuffer())})),l=s&&a&&Ha(()=>{let f=!1,g=new r(de.origin,{body:new $a,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!g}),c=o&&a&&Ha(()=>E.isReadableStream(new n("").body)),h={stream:c&&(f=>f.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!h[f]&&(h[f]=(g,w)=>{let C=g&&g[f];if(C)return C.call(g);throw new Y(`Response type '${f}' is not supported`,Y.ERR_NOT_SUPPORT,w)})});let d=f=>P(null,null,function*(){if(f==null)return 0;if(E.isBlob(f))return f.size;if(E.isSpecCompliantForm(f))return(yield new r(de.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(E.isArrayBufferView(f)||E.isArrayBuffer(f))return f.byteLength;if(E.isURLSearchParams(f)&&(f=f+""),E.isString(f))return(yield u(f)).byteLength}),m=(f,g)=>P(null,null,function*(){let w=E.toFiniteNumber(f.getContentLength());return w==null?d(g):w});return f=>P(null,null,function*(){let{url:g,method:w,data:C,signal:I,cancelToken:O,timeout:L,onDownloadProgress:N,onUploadProgress:S,responseType:M,headers:D,withCredentials:z="same-origin",fetchOptions:X}=kn(f),J=t||fetch;M=M?(M+"").toLowerCase():"text";let ee=Ba([I,O&&O.toAbortSignal()],L),te=null,ne=ee&&ee.unsubscribe&&(()=>{ee.unsubscribe()}),se;try{if(S&&l&&w!=="get"&&w!=="head"&&(se=yield m(D,C))!==0){let Pe=new r(g,{method:"POST",body:C,duplex:"half"}),we;if(E.isFormData(C)&&(we=Pe.headers.get("content-type"))&&D.setContentType(we),Pe.body){let[Ne,V]=os(se,Zt(as(S)));C=cs(Pe.body,Ua,Ne,V)}}E.isString(z)||(z=z?"include":"omit");let ae=s&&"credentials"in r.prototype,Ye=B(T({},X),{signal:ee,method:w.toUpperCase(),headers:D.normalize().toJSON(),body:C,duplex:"half",credentials:ae?z:void 0});te=s&&new r(g,Ye);let pe=yield s?J(te,X):J(g,Ye),yt=c&&(M==="stream"||M==="response");if(c&&(N||yt&&ne)){let Pe={};["status","statusText","headers"].forEach(ue=>{Pe[ue]=pe[ue]});let we=E.toFiniteNumber(pe.headers.get("content-length")),[Ne,V]=N&&os(we,Zt(as(N),!0))||[];pe=new n(cs(pe.body,Ua,Ne,()=>{V&&V(),ne&&ne()}),Pe)}M=M||"text";let nt=yield h[E.findKey(h,M)||"text"](pe,f);return!yt&&ne&&ne(),yield new Promise((Pe,we)=>{$r(Pe,we,{data:nt,headers:Se.from(pe.headers),status:pe.status,statusText:pe.statusText,config:f,request:te})})}catch(ae){throw ne&&ne(),ae&&ae.name==="TypeError"&&/Load failed|fetch/i.test(ae.message)?Object.assign(new Y("Network Error",Y.ERR_NETWORK,f,te),{cause:ae.cause||ae}):Y.from(ae,ae&&ae.code,f,te)}})},U0=new Map,fs=e=>{let t=e&&e.env||{},{fetch:r,Request:n,Response:i}=t,s=[n,i,r],o=s.length,a=o,u,l,c=U0;for(;a--;)u=s[a],l=c.get(u),l===void 0&&c.set(u,l=a?new Map:B0(t)),c=l;return l},DI=fs();var hs={http:Pn,xhr:Fa,fetch:{get:fs}};E.forEach(hs,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});var Wa=e=>`- ${e}`,z0=e=>E.isFunction(e)||e===null||e===!1;function H0(e,t){e=E.isArray(e)?e:[e];let{length:r}=e,n,i,s={};for(let o=0;o<r;o++){n=e[o];let a;if(i=n,!z0(n)&&(i=hs[(a=String(n)).toLowerCase()],i===void 0))throw new Y(`Unknown adapter '${a}'`);if(i&&(E.isFunction(i)||(i=i.get(t))))break;s[a||"#"+o]=i}if(!i){let o=Object.entries(s).map(([u,l])=>`adapter ${u} `+(l===!1?"is not supported by the environment":"is not available in the build")),a=r?o.length>1?`since :
11
+ `+o.map(Wa).join(`
12
+ `):" "+Wa(o[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}var Nn={getAdapter:H0,adapters:hs};function ps(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ze(null,e)}function jn(e){return ps(e),e.headers=Se.from(e.headers),e.data=Br.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Nn.getAdapter(e.adapter||Yt.adapter,e)(e).then(function(n){return ps(e),n.data=Br.call(e,e.transformResponse,n),n.headers=Se.from(n.headers),n},function(n){return Ur(n)||(ps(e),n&&n.response&&(n.response.data=Br.call(e,e.transformResponse,n.response),n.response.headers=Se.from(n.response.headers))),Promise.reject(n)})}var Fn="1.13.4";var Bn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Bn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var Ka={};Bn.transitional=function(t,r,n){function i(s,o){return"[Axios v"+Fn+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,a)=>{if(t===!1)throw new Y(i(o," has been removed"+(r?" in "+r:"")),Y.ERR_DEPRECATED);return r&&!Ka[o]&&(Ka[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,o,a):!0}};Bn.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function W0(e,t,r){if(typeof e!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let s=n[i],o=t[s];if(o){let a=e[s],u=a===void 0||o(a,s,e);if(u!==!0)throw new Y("option "+s+" must be "+u,Y.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Y("Unknown option "+s,Y.ERR_BAD_OPTION)}}var Hr={assertOptions:W0,validators:Bn};var Qe=Hr.validators,Qt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Xi,response:new Xi}}request(t,r){return P(this,null,function*(){try{return yield this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;let s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
13
+ `+s):n.stack=s}catch(o){}}throw n}})}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Fe(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&Hr.assertOptions(n,{silentJSONParsing:Qe.transitional(Qe.boolean),forcedJSONParsing:Qe.transitional(Qe.boolean),clarifyTimeoutError:Qe.transitional(Qe.boolean)},!1),i!=null&&(E.isFunction(i)?r.paramsSerializer={serialize:i}:Hr.assertOptions(i,{encode:Qe.function,serialize:Qe.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Hr.assertOptions(r,{baseUrl:Qe.spelling("baseURL"),withXsrfToken:Qe.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&E.merge(s.common,s[r.method]);s&&E.forEach(["delete","get","head","post","put","patch","common"],f=>{delete s[f]}),r.headers=Se.concat(o,s);let a=[],u=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(r)===!1||(u=u&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});let l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let c,h=0,d;if(!u){let f=[jn.bind(this),void 0];for(f.unshift(...a),f.push(...l),d=f.length,c=Promise.resolve(r);h<d;)c=c.then(f[h++],f[h++]);return c}d=a.length;let m=r;for(;h<d;){let f=a[h++],g=a[h++];try{m=f(m)}catch(w){g.call(this,w);break}}try{c=jn.call(this,m)}catch(f){return Promise.reject(f)}for(h=0,d=l.length;h<d;)c=c.then(l[h++],l[h++]);return c}getUri(t){t=Fe(this.defaults,t);let r=zr(t.baseURL,t.url,t.allowAbsoluteUrls);return jr(r,t.params,t.paramsSerializer)}};E.forEach(["delete","get","head","options"],function(t){Qt.prototype[t]=function(r,n){return this.request(Fe(n||{},{method:t,url:r,data:(n||{}).data}))}});E.forEach(["post","put","patch"],function(t){function r(n){return function(s,o,a){return this.request(Fe(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Qt.prototype[t]=r(),Qt.prototype[t+"Form"]=r(!0)});var Wr=Qt;var ds=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});let n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s,o=new Promise(a=>{n.subscribe(a),s=a}).then(i);return o.cancel=function(){n.unsubscribe(s)},o},t(function(s,o,a){n.reason||(n.reason=new Ze(s,o,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new e(function(i){t=i}),cancel:t}}},Va=ds;function ms(e){return function(r){return e.apply(null,r)}}function gs(e){return E.isObject(e)&&e.isAxiosError===!0}var ys={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ys).forEach(([e,t])=>{ys[t]=e});var Ga=ys;function Ja(e){let t=new Wr(e),r=Dr(Wr.prototype.request,t);return E.extend(r,Wr.prototype,t,{allOwnKeys:!0}),E.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return Ja(Fe(e,i))},r}var _e=Ja(Yt);_e.Axios=Wr;_e.CanceledError=Ze;_e.CancelToken=Va;_e.isCancel=Ur;_e.VERSION=Fn;_e.toFormData=_t;_e.AxiosError=Y;_e.Cancel=_e.CanceledError;_e.all=function(t){return Promise.all(t)};_e.spread=ms;_e.isAxiosError=gs;_e.mergeConfig=Fe;_e.AxiosHeaders=Se;_e.formToJSON=e=>Mn(E.isHTMLForm(e)?new FormData(e):e);_e.getAdapter=Nn.getAdapter;_e.HttpStatusCode=Ga;_e.default=_e;var xe=_e;var{Axios:MP,AxiosError:DP,CanceledError:kP,isCancel:LP,CancelToken:NP,VERSION:jP,all:FP,Cancel:BP,isAxiosError:UP,spread:$P,toFormData:zP,AxiosHeaders:HP,HttpStatusCode:WP,formToJSON:KP,getAdapter:VP,mergeConfig:GP}=xe;var G=Ce(kl(),1),me=Ce(Wl(),1),At=Ce(gc(),1),cn=Ce(Uc(),1),io=Ce(tf(),1),so=Ce(Rf(),1),Ee=Ce(Me(),1),fn=Ce($e(),1),he=Ce(Mf(),1),oo=Ce(Gf(),1),et=Ce(Bh(),1),yO=Ce(Cp(),1),ao=Ce(to(),1),it=Ce(Id(),1),uo=Ce(Rd(),1);var wO=/[\\^$.*+?()[\]{}|]/g,vO=e=>e.replace(wO,"\\$&"),bO=/[%ÄÖÜäöü ]/g,lo=class{constructor(t={}){if(Object.assign(this,t),this.notationPattern||(this.notationPattern=".+"),!this.uriPattern&&this.namespace){this.uriPattern="^"+vO(this.namespace);let r=this.notationPattern.replace(bO,encodeURI);this.uriPattern+="("+r+")$"}this.NOTATION_REGEX=RegExp("^("+this.notationPattern+")$"),this.uriPattern&&(this.URI_REGEX=RegExp(this.uriPattern))}isValidNotation(t){return this.NOTATION_REGEX.exec(t)}notationFromUri(t){if(this.URI_REGEX){let r=this.URI_REGEX.exec(t);if(r)return decodeURI(r[1])}}uriFromNotation(t){if(this.uriPattern)return t=encodeURIComponent(t),this.uriPattern.replace(/^\^|\$$/g,"").replace(/\\/g,"").replace(/\(.*\)/,t)}conceptFromUri(t,r={}){let n=this.notationFromUri(t);if(n===void 0)return;let i={uri:t,notation:[n]};return r.inScheme&&(i.inScheme=[{uri:this.uri}]),r.topConcept&&(i.topConceptOf=[{uri:this.uri}]),i}conceptFromNotation(t,r){if(this.isValidNotation(t))return this.conceptFromUri(this.uriFromNotation(t),r)}},fi=lo;function pr(e,t,r){let n=Array.prototype.slice,i=typeof Object.keys=="function"?Object.keys:function(l){let c=[];for(let h in l)c.push(h);return c},s=function(l,c){return l===c?!0:l instanceof Date&&c instanceof Date?l.getTime()===c.getTime():typeof l!="object"&&typeof c!="object"?l==c:u(l,c)};function o(l){return l==null}function a(l){return Object.prototype.toString.call(l)=="[object Arguments]"}function u(l,c){if(o(l)||o(c)||l.prototype!==c.prototype)return!1;if(a(l))return a(c)?(l=n.call(l),c=n.call(c),s(l,c)):!1;let h,d,m,f;try{h=i(l),d=i(c)}catch(g){return!1}if(h.length!=d.length)return!1;for(h.sort(),d.sort(),f=h.length-1;f>=0;f--)if(h[f]!=d[f])return!1;for(f=h.length-1;f>=0;f--)if(m=h[f],r){let g=r(l[m],c[m],m);if(g===void 0&&(g=pr(l[m],c[m])),!g)return!1}else if(!s(l[m],c[m]))return!1;return!0}return s(e,t)}function re(e,t,r=void 0){let n=s=>String.prototype.split.call(t,s).filter(Boolean).reduce((o,a)=>o!=null?o[a]:o,e),i=n(/[,[\]]+?/)||n(/[,[\].]+?/);return i===void 0||i===e?r:i}function dr(e,t){return t.reduce((r,n)=>(e&&e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}function hn(e,t){for(let r in e)e.hasOwnProperty(r)&&t(e[r],r)}function mr(e){return typeof e=="object"&&e!==null}function pn(e){return!!(e&&typeof e.valueOf()=="string")}function qd(e,t){return[...new Set([...e,...t])]}function Md(e,t,r){return[...e,...t].reduce((n,i)=>(n.findIndex(s=>r(s,i))!==-1||n.push(i),n),[])}function Dd(e,t){for(let r of t){typeof r=="string"&&(r=r.split("."));for(let n=0;n<r.length-1;n++)e=e[r[n]];delete e[r.pop()]}}var hi={store:null,path:"",defaults:["en"],getLanguages:Ld,selectLanguage:_O};function Ld(){return re(hi.store,hi.path)||hi.defaults}function _O(e){if(!e)return null;for(let t of Ld())if(e[t])return t;for(let t of Object.keys(e))if(t!="-")return t;return null}var pi=hi;var po={};Pt(po,{addMappingIdentifiers:()=>fo,compareMappingContent:()=>xO,compareMappingMembers:()=>SO,compareMappings:()=>Hd,mappingContent:()=>Fd,mappingContentIdentifier:()=>Ud,mappingMembers:()=>Bd,mappingMembersIdentifier:()=>$d});function co(e){var t=function(L,N){var S=L<<N|L>>>32-N;return S},r=function(L){var N="",S,M;for(S=7;S>=0;S--)M=L>>>S*4&15,N+=M.toString(16);return N},n,i,s,o=new Array(80),a=1732584193,u=4023233417,l=2562383102,c=271733878,h=3285377520,d,m,f,g,w,C;e=unescape(encodeURIComponent(e));var I=e.length,O=[];for(i=0;i<I-3;i+=4)s=e.charCodeAt(i)<<24|e.charCodeAt(i+1)<<16|e.charCodeAt(i+2)<<8|e.charCodeAt(i+3),O.push(s);switch(I%4){case 0:i=2147483648;break;case 1:i=e.charCodeAt(I-1)<<24|8388608;break;case 2:i=e.charCodeAt(I-2)<<24|e.charCodeAt(I-1)<<16|32768;break;case 3:i=e.charCodeAt(I-3)<<24|e.charCodeAt(I-2)<<16|e.charCodeAt(I-1)<<8|128;break}for(O.push(i);O.length%16!==14;)O.push(0);for(O.push(I>>>29),O.push(I<<3&4294967295),n=0;n<O.length;n+=16){for(i=0;i<16;i++)o[i]=O[n+i];for(i=16;i<=79;i++)o[i]=t(o[i-3]^o[i-8]^o[i-14]^o[i-16],1);for(d=a,m=u,f=l,g=c,w=h,i=0;i<=19;i++)C=t(d,5)+(m&f|~m&g)+w+o[i]+1518500249&4294967295,w=g,g=f,f=t(m,30),m=d,d=C;for(i=20;i<=39;i++)C=t(d,5)+(m^f^g)+w+o[i]+1859775393&4294967295,w=g,g=f,f=t(m,30),m=d,d=C;for(i=40;i<=59;i++)C=t(d,5)+(m&f|m&g|f&g)+w+o[i]+2400959708&4294967295,w=g,g=f,f=t(m,30),m=d,d=C;for(i=60;i<=79;i++)C=t(d,5)+(m^f^g)+w+o[i]+3395469782&4294967295,w=g,g=f,f=t(m,30),m=d,d=C;a=a+d&4294967295,u=u+m&4294967295,l=l+f&4294967295,c=c+g&4294967295,h=h+w&4294967295}return C=r(a)+r(u)+r(l)+r(c)+r(h),C.toLowerCase()}function jd(e){return e.map(t=>t&&t.uri).filter(Boolean)}function ho(e){return["memberSet","memberList","memberChoice"].find(t=>e[t])}function Nd(e){let t=ho(e),r=e[t]?jd(e[t]):[];return{[r.length>1?t:"memberSet"]:r.map(n=>({uri:n}))}}function Fd(e){let{from:t,to:r,type:n}=e,i={from:Nd(t||{}),to:Nd(r||{}),type:[n&&n[0]||"http://www.w3.org/2004/02/skos/core#mappingRelation"]};for(let s of["from","to"])if((i[s][ho(i[s])]||[]).length==0){let o=e[s+"Scheme"];o&&o.uri&&(i[s+"Scheme"]={uri:o.uri})}return i}function Bd(e){let{from:t,to:r}=e,n=[t,r].filter(Boolean).map(i=>jd(i[ho(i)]||[]));return[].concat(...n).sort()}function Ud(e){let t=JSON.stringify(Fd(e),["from","fromScheme","to","toScheme","type","memberSet","memberList","memberChoice","uri"]);return"urn:jskos:mapping:content:"+co(t+`
14
+ `)}function $d(e){let t=JSON.stringify(Bd(e));return"urn:jskos:mapping:members:"+co(t+`
15
+ `)}function fo(e){let t=(e.identifier||[]).filter(r=>r&&!r.startsWith("urn:jskos:mapping:")).concat([$d(e),Ud(e)]).sort();return Object.assign({},e,{identifier:t})}function zd(e,t,r){e=e&&fo(e),t=t&&fo(t);let n=e&&e.identifier?e.identifier.find(s=>s.startsWith(r)):null,i=t&&t.identifier?t.identifier.find(s=>s.startsWith(r)):null;return n==i}function Hd(e,t){return zd(e,t,"urn:jskos:mapping:content:")}var xO=Hd;function SO(e,t){return zd(e,t,"urn:jskos:mapping:members:")}var vo={};Pt(vo,{addContext:()=>EO,annotationCreatorMatches:()=>YO,annotationCreatorName:()=>JO,annotationCreatorUri:()=>GO,clean:()=>yo,cleanJSKOS:()=>CO,compare:()=>Et,compareConcepts:()=>PO,compareFunctions:()=>zO,compareMappingsDeep:()=>BO,compareObjects:()=>TO,compareSchemes:()=>IO,conceptsOfMapping:()=>Lt,copyDeep:()=>gi,deepCopy:()=>OO,defaultMappingType:()=>Gd,definition:()=>KO,flattenMapping:()=>NO,getAllUris:()=>mo,guessObjectType:()=>mi,guessSchemeFromNotation:()=>XO,isConcept:()=>RO,isContainedIn:()=>Vd,isScheme:()=>Kd,isSchemeInList:()=>qO,isValidUri:()=>$O,languageMapContent:()=>wo,mappingCSV:()=>FO,mappingRegistryIsStored:()=>VO,mappingTypeByType:()=>LO,mappingTypeByUri:()=>gn,mappingTypes:()=>dn,matchObjectTypes:()=>UO,merge:()=>Xd,mergeUris:()=>Yd,minifyMapping:()=>kO,normalize:()=>go,notation:()=>WO,objectTypes:()=>mn,prefLabel:()=>yr,sortConcepts:()=>MO,sortSchemes:()=>DO,usedObjectTypes:()=>Wd,userOwnsMapping:()=>HO});var dn=[{RELEVANCE:"very high",broader:[{uri:"http://www.w3.org/2004/02/skos/core#closeMatch"}],definition:{de:["gleiche Bedeutung"],en:["same meaning"]},notation:["="],prefLabel:{ar:"\u062A\u0637\u0627\u0628\u0642 \u062A\u0627\u0645",be:"\u0434\u0430\u043A\u043B\u0430\u0434\u043D\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u0446\u044C","be-tarask":"\u0434\u0430\u043A\u043B\u0430\u0434\u043D\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",bn:"\u09B9\u09C1\u09AC\u09C1\u09B9\u09C1 \u09AE\u09BF\u09B2",bs:"ta\u010Dno podudaranje",ca:"equival\xE8ncia exacta",cs:"p\u0159esn\xE1 shoda",da:"exact match",de:"exakte \xDCbereinstimmung",el:"\u03B1\u03BA\u03C1\u03B9\u03B2\u03AE\u03C2 \u03B1\u03BD\u03C4\u03B9\u03C3\u03C4\u03BF\u03B9\u03C7\u03AF\u03B1",en:"exact match",eo:"ekzakta ekvivalento",es:"equivalencia exacta",et:"t\xE4pne vaste",fi:"vastaava k\xE4site",fr:"\xE9quivalence exacte",ga:"meaitse\xE1il chruinn",gl:"correspondencia exacta",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05DE\u05D3\u05D5\u05D9\u05E7\u05EA",hu:"pontos egyez\xE9s",id:"sama persis",it:"corrispondenza esatta",ja:"\u5B8C\u5168\u4E00\u81F4",lv:"tie\u0161a sakrit\u012Bba",mk:"\u0442\u043E\u0447\u043D\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",ms:"padanan tepat","ms-arab":"\u06A4\u0627\u062F\u0646\u0646 \u062A\u06A4\u062A",nb:"eksakt samsvar",nl:"exacte match",nn:"eksakt samsvar",pl:"dok\u0142adne dopasowanie",pt:"correspond\xEAncia exata",ro:"echivalentul exact",ru:"\u0442\u043E\u0447\u043D\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sl:"natan\u010Dno ujemanje",sq:"p\xEBrputhje e p\xEBrpikt\xEB",sr:"\u0442\u0430\u0447\u043D\u043E \u043F\u043E\u0434\u0443\u0434\u0430\u0440\u0430\u045A\u0435",sv:"exakt tr\xE4ff",tr:"tam e\u015Fle\u015Fme",uk:"\u0442\u043E\u0447\u043D\u0430 \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u043D\u0456\u0441\u0442\u044C",ur:"\u0628\u0627\u0644\u06A9\u0644 \u062F\u0631\u0633\u062A \u062C\u0648\u0691",zh:"\u7CBE\u78BA\u5339\u914D","zh-cn":"\u7CBE\u786E\u5339\u914D","zh-hans":"\u7CBE\u786E\u5339\u914D","zh-hant":"\u7CBE\u78BA\u5339\u914D"},SHORT:"exact",uri:"http://www.w3.org/2004/02/skos/core#exactMatch"},{RELEVANCE:"high",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{de:["in etwa gleiche Bedeutung"],en:["same general idea but not fully identical meaning"]},notation:["\u2248"],prefLabel:{ar:"\u062A\u0637\u0627\u0628\u0642 \u0642\u0631\u064A\u0628","be-tarask":"\u0431\u043B\u0456\u0437\u043A\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"equival\xE8ncia inexacta",de:"hohe \xDCbereinstimmung",el:"\u03C3\u03C4\u03B5\u03BD\u03AE \u03B1\u03BD\u03C4\u03B9\u03C3\u03C4\u03BF\u03B9\u03C7\u03AF\u03B1",en:"close match",eo:"proksima kongrua\u0135o",es:"equivalencia inexacta",fi:"l\xE4hes vastaava k\xE4site",fr:"quasi-\xE9quivalence",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E7\u05E8\u05D5\u05D1\u05D4",hu:"kv\xE1zi-egyen\xE9rt\xE9k\u0171s\xE9g",it:"corrispondenza parziale",ja:"\u985E\u4F3C\u4E00\u81F4",mk:"\u0431\u043B\u0438\u0441\u043A\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",ms:"padanan dekat","ms-arab":"\u06A4\u0627\u062F\u0646\u0646 \u062F\u06A9\u062A",nb:"n\xE6rt samsvar",nl:"nabije match",nn:"n\xE6rt samsvar",pl:"cz\u0119\u015Bciowe dopasowanie",pt:"correspond\xEAncia pr\xF3xima",ru:"\u0431\u043B\u0438\u0437\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sl:"visoko ujemanje",sr:"\u0431\u043B\u0438\u0441\u043A\u043E \u043F\u043E\u043A\u043B\u0430\u043F\u0430\u045A\u0435",sv:"n\xE4ra matchning",tr:"yak\u0131n e\u015Fle\u015Fme","zh-hans":"\u9AD8\u5EA6\u5339\u914D"},SHORT:"close",uri:"http://www.w3.org/2004/02/skos/core#closeMatch"},{RELEVANCE:"medium",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{de:["umfassendere Bedeutung"],en:["broader meaning"]},notation:[">"],prefLabel:{"be-tarask":"\u0448\u044B\u0440\u043E\u043A\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"relaci\xF3 llunyana",cs:"\u0161ir\u0161\xED koncept",de:"allgemeinere Bedeutung",en:"broad match",eo:"malstrikta kongruo",et:"laiem vaste",fi:"vastaava laajempi k\xE4site",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E8\u05D7\u05D1\u05D4",hu:"t\xE1gabb jelent\xE9s",it:"corrispondenza con termine pi\xF9 generico",ja:"\u5E83\u7FA9\u4E00\u81F4",mk:"\u043F\u043E\u0448\u0438\u0440\u043E\u043A\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",nb:"bredere samsvar",nl:"brede match",nn:"breitt samsvar",pl:"dopasowanie poj\u0119cia o szerszym znaczeniu","pt-br":"correspond\xEAncia gen\xE9rica",ru:"\u0431\u043E\u043B\u0435\u0435 \u0448\u0438\u0440\u043E\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sl:"splo\u0161ni pomen",sr:"\u0443 \u0448\u0438\u0440\u0435\u043C \u0441\u043C\u0438\u0441\u043B\u0443",sv:"bred tr\xE4ff",uk:"\u0448\u0438\u0440\u0448\u0430 \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u043D\u0456\u0441\u0442\u044C",vi:"\u0111\u1ED1i s\xE1nh r\u1ED9ng","zh-hans":"\u5E7F\u6CDB\u5339\u914D"},related:[{uri:"http://www.w3.org/2004/02/skos/core#narrowMatch"}],SHORT:"broad",uri:"http://www.w3.org/2004/02/skos/core#broadMatch"},{RELEVANCE:"medium",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{en:["more specific meaning"]},notation:["<"],prefLabel:{"be-tarask":"\u0432\u0443\u0437\u043A\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"relaci\xF3 estreta",de:"spezifischere Bedeutung",en:"narrow match",eo:"strikta kongruo",et:"kitsam vaste",fi:"vastaava suppeampi k\xE4site",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E6\u05E8\u05D4",hu:"sz\u0171kebb jelent\xE9s",it:"corrispondenza con termine pi\xF9 specifico",ja:"\u72ED\u7FA9\u4E00\u81F4",mk:"\u043F\u043E\u0442\u0435\u0441\u043D\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",nb:"smalere samsvar",nl:"nauwe match",nn:"snevert samsvar",pl:"dopasowanie poj\u0119cia o w\u0119\u017Cszym znaczeniu","pt-br":"correspond\xEAncia aproximada",ru:"\u0431\u043E\u043B\u0435\u0435 \u0443\u0437\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sl:"ozki pomen",sr:"\u0443 \u0443\u0436\u0435\u043C \u0441\u043C\u0438\u0441\u043B\u0443",sv:"smal tr\xE4ff",ur:"\u0646\u06CC\u0631\u0648 \u0645\u06CC\u0686",vi:"\u0111\u1ED1i s\xE1nh h\u1EB9p","zh-hans":"\u6709\u9650\u5339\u914D"},related:[{uri:"http://www.w3.org/2004/02/skos/core#broadMatch"}],SHORT:"narrow",uri:"http://www.w3.org/2004/02/skos/core#narrowMatch"},{RELEVANCE:"low",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{de:["assoziative Verkn\xFCpfung unterschiedlicher Bedeutungen"],en:["associative link between meanings"]},notation:["~"],prefLabel:{"be-tarask":"\u0437\u044C\u0432\u044F\u0437\u0430\u043D\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"parella relacionada",de:"verwandte Bedeutung",en:"related match",eo:"rilata kongruo",fi:"liittyv\xE4 k\xE4site",fr:"association",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E7\u05E9\u05D5\u05E8\u05D4",hu:"rokon jelent\xE9s",it:"corrispondenza correlata",ja:"\u95A2\u9023\u4E00\u81F4",lv:"saist\u012Bta sakrit\u012Bba",mk:"\u043F\u043E\u0432\u0440\u0437\u0430\u043D\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",ms:"padanan berkaitan","ms-arab":"\u06A4\u0627\u062F\u0646\u0646 \u0628\u0631\u06A9\u0627\u0621\u064A\u062A\u0646",nb:"relatert samsvar",nl:"gerelateerde match",pl:"dopasowanie poj\u0119cia o powi\u0105zanym znaczeniu",ru:"\u0430\u0441\u0441\u043E\u0446\u0438\u0430\u0442\u0438\u0432\u043D\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sl:"povezano ujemanje",tr:"ili\u015Fkili benze\u015Fme",uk:"\u043F\u043E\u0432\u2019\u044F\u0437\u044C",ur:"\u0645\u062A\u0639\u0644\u0642\u06C1 \u0645\u06CC\u0686",vec:"parente\u0142a re\u0142asionada","zh-hans":"\u5173\u8054\u5339\u914D"},SHORT:"related",uri:"http://www.w3.org/2004/02/skos/core#relatedMatch"},{RELEVANCE:"generic",definition:{de:["unbekannter Bedeutungszusammenhang"],en:["unknown type of link between meanings"]},notation:["\u2192"],prefLabel:{ar:"\u0646\u0648\u0639 \u0639\u0644\u0627\u0642\u0629 \u0627\u0644\u062A\u0637\u0628\u064A\u0642",be:"\u0445\u0430\u0440\u0430\u043A\u0442\u044D\u0440\u043D\u0430\u044F \u0430\u0434\u043D\u043E\u0441\u0456\u043D\u0430 \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u043D\u043D\u044F","be-tarask":"\u0445\u0430\u0440\u0430\u043A\u0442\u044D\u0440\u043D\u0430\u044F \u0430\u0434\u043D\u043E\u0441\u0456\u043D\u0430 \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u043D\u044C\u043D\u044F",ca:"relaci\xF3 de mapatge",de:"allgemeine Mapping-Relation",en:"SKOS generic mapping relation",fi:"SKOS-kartoitussuhde",fr:"lien de correspondance SKOS",he:"\u05D9\u05D7\u05E1 \u05DE\u05D9\u05E4\u05D5\u05D9 \u05DB\u05DC\u05DC\u05D9",id:"relasi pemetaan",ja:"SKOS\u4E00\u822C\u30DE\u30C3\u30D4\u30F3\u30B0\u95A2\u4FC2",mk:"\u043F\u0440\u0435\u0441\u043B\u0438\u043A\u0443\u0432\u0430\u0447\u043A\u0438 \u043E\u0434\u043D\u043E\u0441",nb:"SKOS generisk mappingrelasjon","pt-br":"rela\xE7\xE3o gen\xE9rica de mapeamento",sl:"splo\u0161na relacija kartiranja SKOS",sr:"\u0440\u0435\u043B\u0430\u0446\u0438\u0458\u0430 \u043C\u0430\u043F\u0438\u0440\u0430\u045A\u0430",sv:"mappnings relation",zh:"\u6620\u5C04\u95DC\u4FC2","zh-hant":"\u6620\u5C04\u95DC\u4FC2"},SHORT:"",uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}];var mn={Concept:{type:["http://www.w3.org/2004/02/skos/core#Concept"]},ConceptScheme:{type:["http://www.w3.org/2004/02/skos/core#ConceptScheme"]},ConceptMapping:{type:dn.map(e=>e.uri)},ConceptOccurrence:{},Registry:{type:["http://www.w3.org/ns/dcat#Catalog","http://purl.org/cld/cdtype/CatalogueOrIndex"]},Distribution:{type:["http://www.w3.org/ns/dcat#Distribution"]},Service:{type:["http://www.w3.org/ns/dcat#DataService"]},Dataset:{type:["http://www.w3.org/ns/dcat#Dataset"]},Concordance:{type:["http://rdf-vocabulary.ddialliance.org/xkos#Correspondence","http://rdfs.org/ns/void#Linkset","http://purl.org/spar/fabio/VocabularyMapping"]},Resource:{},Item:{},ConceptBundle:{},Annotation:{type:["Annotation","http://www.w3.org/ns/oa#Annotation"]}},di=Object.keys(mn).reduce((e,t)=>{for(let r of mn[t].type||[])e[r]=t;return e},{});function mi(e,t=!1){let r;if(typeof e=="string"&&e)e in di?r=di[e]:(e=e.toLowerCase().replace(/s$/,""),r=Object.keys(mn).find(n=>{let i=n.toLowerCase();if(i===e||i==="concept"+e)return!0}));else if(typeof e=="object"&&e.type){let n=Array.isArray(e.type)?e.type:[e.type];for(let i of n)if(i in di){r=di[i];break}}return t&&r?r.toLowerCase().replace(/^concept(.+)/,"$1"):r}function Wd(e){var n;let t=[],r={concepts:"http://www.w3.org/2004/02/skos/core#Concept",schemes:"http://www.w3.org/2004/02/skos/core#ConceptScheme",mappings:"http://www.w3.org/2004/02/skos/core#mappingRelation",concordances:"http://rdf-vocabulary.ddialliance.org/xkos#Correspondence",registries:"http://www.w3.org/ns/dcat#Catalog",types:"http://www.w3.org/2002/07/owl#Class",properties:"http://www.w3.org/1999/02/22-rdf-syntax-ns#Property",annotations:"http://www.w3.org/ns/oa#Annotation"};for(let i in r)(n=e[i])!=null&&n.find(s=>s!==null)&&t.push(r[i]);return t.sort()}var AO=e=>/^[A-Z]*$/.test(e),gr=(e,t)=>t.split(".").reduce((r,n)=>r&&r[n]?r[n]:null,e),EO=e=>((e instanceof Array?e:[e]).forEach(r=>{r["@context"]="https://gbv.github.io/jskos/context.json"}),e),yo=e=>(Object.keys(e).forEach(t=>{AO(t)||t.startsWith("_")?delete e[t]:e[t]!=null&&typeof e[t]=="object"&&(e[t]=yo(e[t]))}),e),CO=yo,gi=(e,t=[],r=!0)=>{t=t.concat(["ancestors","narrower","broader","mappings","memberList","TOPCONCEPTS","MAPPINGS","PROVIDER"]);let n=Array.isArray(e)?[]:{};for(let i in e)if(!(r&&i[0]=="_")){if(t.includes(i))if(e[i]&&Array.isArray(e[i])){e[i].length>0?n[i]=[null]:n[i]=[];continue}else{n[i]=null;continue}if(i=="inScheme"){let s=[];for(let o of e.inScheme){let a={uri:o.uri};o.notation&&(a.notation=o.notation),o.prefLabel&&(a.prefLabel=o.prefLabel),s.push(a)}n.inScheme=s;continue}e[i]!=null&&typeof e[i]=="object"?n[i]=gi(e[i]):n[i]=e[i]}return n},OO=gi,mo=e=>e?(e.uri?[e.uri]:[]).concat(e.identifier||[]).filter(Boolean):[],Et=(e,t)=>{if(e==null&&t==null)return!0;let r=i=>i.replace("https://","http://"),n=mo(e).map(r);for(let i of mo(t).map(r))if(n.indexOf(i)!==-1)return!0;return!1},TO=Et,IO=Et,PO=Et,RO=e=>{var t;return((t=re(e,"type",[]))==null?void 0:t.includes("http://www.w3.org/2004/02/skos/core#Concept"))||re(e,"inScheme")!=null||re(e,"topConceptOf")!=null},Kd=e=>{var t;return(t=re(e,"type",[]))==null?void 0:t.includes("http://www.w3.org/2004/02/skos/core#ConceptScheme")},Vd=(e,t)=>{if(!e||!t)return!1;for(let r of t)if(Et(e,r))return!0;return!1},qO=Vd,MO=(e,t=!1)=>e.sort((r,n)=>{let i=re(r,"notation[0]"),s=re(n,"notation[0]");if(i&&s&&(i=i.toLowerCase(),s=s.toLowerCase()),t&&i&&s){let o,a;if(o=parseFloat(i),a=parseFloat(s),!o&&!a){let u=`${i}`.split(/[^\w\d]/),l=`${s}`.split(/[^\w\d]/);for(let c=0;c<Math.min(u.length,l.length);c+=1)if(u[c]!==l[c]){o=parseFloat(u[c])||u[c],a=parseFloat(l[c])||l[c];break}!o&&!a&&(o=i,a=s)}i=o,s=a}if((!i||!s||i==s)&&(i=r.uri,s=n.uri),i&&s){if(i>s)return 1;if(i<s)return-1}return 0}),DO=e=>{let t=["notation[0]",["prefLabel.de","prefLabel.en"],"uri"];return e.sort((r,n)=>{for(let i of t){let s,o;if(Array.isArray(i))for(let a of i)s=s||re(r,a),o=o||re(n,a);else s=re(r,i),o=re(n,i);if(s!=null&&o!=null){if(s=s.toLowerCase(),o=o.toLowerCase(),s>o)return 1;if(s<o)return-1}}return 0})},kO=e=>{let t=dr(gi(e),["from","to","fromScheme","toScheme","creator","contributor","type","created","modified","note","identifier","uri","partOf","mappingRelevance"]);for(let r of[t.from,t.to])hn(r,(n,i)=>{let s=[];for(let o of n)s.push(dr(o,["uri","notation"]));r[i]=s});return t.fromScheme&&(t.fromScheme=dr(t.fromScheme,["uri","notation"])),t.toScheme&&(t.toScheme=dr(t.toScheme,["uri","notation"])),t.partOf&&(t.partOf=t.partOf.map(r=>dr(r,["uri"]))),t},gn=function(e){for(let t of dn)if(e==t.uri)return t;return null},Gd=gn("http://www.w3.org/2004/02/skos/core#mappingRelation"),LO=function(e,t=Gd){let r;return Array.isArray(e)&&e.length>0?r=e[0]:r=e,gn(r)||t},NO=(e,t={})=>{let{language:r}=t,n=gr(e,"from.memberSet.0.notation.0"),i=gr(e,"to.memberSet.0.notation.0");n=n!==null?n:"",i=i!==null?i:"";let s=gn(gr(e,"type.0"));s=s?s.SHORT:"";let o=yr(gr(e,"from.memberSet.0"),{language:r,fallbackToUri:!1})||"",a=yr(gr(e,"to.memberSet.0"),{language:r,fallbackToUri:!1})||"",u=yr(gr(e,"creator.0"),{language:r,fallbackToUri:!1})||"";return{fromNotation:n,toNotation:i,fromLabel:o,toLabel:a,type:s,creator:u}},jO=(e={})=>{let t=e.delimiter||",",r=e.quoteChar||'"',n=e.lineTerminator||`
16
+ `,i=r+r,s=o=>r+(o==null?"":o.split(r).join(i))+r;return o=>o.map(s).join(t)+n},Lt=(e,t)=>{let r=[];for(let n of["from","to"])(t==null||n===t)&&(r=r.concat(re(e,`${n}.memberSet`)||re(e,`${n}.memberChoice`)||re(e,`${n}.memberList`)||[]));return r.filter(n=>n!=null)},FO=(e={})=>{let t=jO(e),r=e.language||"en";e.type==null&&(e.type=!0);let n=o=>{o=o||[];let a=[];for(let u of["from","to"]){e.schemes&&a.push(`${u}Scheme`);let l=Math.max(...o.map(c=>Lt(c,u).length),1);for(let c=0;c<l;c+=1)a.push(`${u}Notation${c?c+1:""}`),e.labels&&a.push(`${u}Label${c?c+1:""}`)}return e.type&&a.push("type"),e.creator&&a.push("creator"),t(a)},i=(o,a={})=>{let u=[];for(let l of["from","to"]){e.schemes&&u.push(re(o,`${l}Scheme.notation[0]`,""));let c=Lt(o,l),h=a[`${l}Count`];h==null&&(h=c.length),h=Math.max(h,1);for(let d=0;d<h;d+=1)u.push(re(c[d],"notation[0]","")),e.labels&&u.push(yr(c[d],{language:r,fallbackToUri:!1}))}return e.type&&u.push(re(gn(re(o,"type[0]")),"SHORT","")),e.creator&&u.push(yr(re(o,"creator[0]"),{language:r,fallbackToUri:!1})),t(u)};return{header:n,fromMapping:i,fromMappings:(o,a={header:!0})=>{let u="";a.header&&(u+=n(o));let l={fromCount:Math.max(...o.map(c=>Lt(c,"from").length)),toCount:Math.max(...o.map(c=>Lt(c,"to").length))};for(let c of o)u+=i(c,l);return u}}};function BO(e,t){return pr(e,t,(r,n,i)=>{let s={[i]:r},o={[i]:n};if(i=="from"||i=="to")return pr(Object.getOwnPropertyNames(re(r,i,{})),Object.getOwnPropertyNames(re(n,i,{})))?pr(Lt(s,i),Lt(o,i),(a,u,l)=>{if(l!=null)return Et(a,u)}):!1;if(i=="fromScheme"||i=="toScheme")return Et(r,n)})}var UO=(e,t)=>{let r=mi(e),n=mi(t);return!(r&&n&&r!=n)},Jd=e=>{Array.isArray(e)&&e.sort((t,r)=>t===null?1:r===null?-1:0)},Yd=(e,t)=>(!e||!t||((Array.isArray(e.identifier)||Array.isArray(t.identifier))&&(e.identifier=qd(e.identifier||[],t.identifier||[])),!e.uri&&t.uri&&(e.uri=t.uri),e.uri&&t.uri&&e.uri!=t.uri&&!(e.identifier||[]).includes(t.uri)&&(e.identifier=(e.identifier||[]).concat([t.uri])),Array.isArray(e.identifier)&&e.uri&&(e.identifier=e.identifier.filter(r=>r!==e.uri)),(e.identifier||[]).length==0&&delete e.identifier,Jd(e.identifier)),e),Xd=(e,t,r)=>{if(!e||!t)return e||t;r=r||{};let n=r._path||"",i=r.detectMismatch||[],s=r.skipPaths||[],o={};return hn(e,(a,u)=>{if(!s.includes(n+u))if(Array.isArray(a)&&Array.isArray(t[u]))o[u]=Md(a,t[u],(l,c)=>mr(l)&&mr(c)?Et(l,c):l===c),Jd(o[u]);else if(mr(a)&&mr(t[u]))o[u]=Xd(a,t[u],Object.assign({_path:`${n}${u}.`},r));else{if(a&&t[u]&&i.includes(n+u)&&!pr(a,t[u]))throw new Error("Property mismatch in "+n+u);o[u]=a}}),hn(t,(a,u)=>{e[u]||(o[u]=a)}),n==""&&Dd(o,s),r.mergeUris&&Yd(o,t),o},go=e=>Array.isArray(e)?e.map(t=>go(t)):mr(e)?(hn(e,(t,r)=>{e[r]=go(t)}),e):pn(e)?e.normalize():e,$O=e=>{let t=/^[A-Za-z][A-Za-z0-9+\-.]*:(?:\/\/(?:(?:[A-Za-z0-9\-._~!$&'()*+,;=:]|%[0-9A-Fa-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::)(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)|[Vv][0-9A-Fa-f]+\.[A-Za-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:[A-Za-z0-9\-._~!$&'()*+,;=]|%[0-9A-Fa-f]{2})*)(?::[0-9]*)?(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|\/(?:(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)?|(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|)(?:\?(?:[A-Za-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?(?:#(?:[A-Za-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?$/;return e.match(t)!==null},zO={mappingsByConcepts:(e,t,r)=>{let n=["memberSet","memberList","memberChoice"],i,s;for(let o of n)i=i||re(e,r+"."+o+"[0].notation[0]"),s=s||re(t,r+"."+o+"[0].notation[0]");return i==null||i<s?-1:s==null||i>s?1:0}},HO=(e,t)=>!e||!t?!1:[e.uri].concat(Object.values(e.identities||{}).map(r=>r.uri)).filter(r=>r!=null).includes(re(t,"creator[0].uri"));function WO(e,t){let r;if(e&&e.notation&&e.notation.length)r=e.notation[0],(Kd(e)||t=="scheme")&&(r=r.toUpperCase());else if(e&&e.inScheme&&e.inScheme[0]&&e.uri)try{r=new fi(e&&e.inScheme&&e.inScheme[0]).notationFromUri(e.uri)}catch(n){}return r||""}function wo(e,t,{language:r}={}){let n=e&&t?e[t]:e;return n&&(n[r]||(r=pi.selectLanguage(n),r))?n[r]:null}function yr(e,t={}){t=t||{};let r=t.fallbackToUri==null?!0:t.fallbackToUri;return re(e,`prefLabel.${t.language}`)||wo(e,"prefLabel",t)||(r&&e&&e.uri?e.uri:"")}function KO(e,t={}){t=t||{};let r=re(e,`definition.${t.language}`)||wo(e,"definition",t)||[];return pn(r)&&(r=[r]),r}function VO(e){return re(e,"stored",re(e,"constructor.stored",re(e,"provider.constructor.stored",!1)))}function GO(e){return pn(e.creator)?e.creator:e.creator&&e.creator.id}function JO(e){return re(e,"creator.name")||""}function YO(e,t){return!!(e&&pn(e.creator)?t&&t.includes(e.creator):t&&e.creator&&t.includes(e.creator.id))}function XO(e,t){return t.filter(({notationPattern:r})=>(r||".+")===".+"?!1:RegExp("^("+r+")$").test(e))}var q=B(T(T({},po),vo),{ConceptScheme:fi,languagePreference:pi});var xn={};Pt(xn,{BaseProvider:()=>Q,ConceptApiProvider:()=>We,LabelSearchSuggestionProvider:()=>ut,LobidApiProvider:()=>dt,LocApiProvider:()=>ct,LocalMappingsProvider:()=>Ct,MappingsApiProvider:()=>He,MyCoReProvider:()=>mt,NoTApiProvider:()=>gt,OccurrencesApiProvider:()=>at,ReconciliationApiProvider:()=>tt,SkohubProvider:()=>ht,SkosmosApiProvider:()=>lt});var jt={};Pt(jt,{concatUrl:()=>st,listOfCapabilities:()=>_o,requestMethods:()=>bo,withCustomProps:()=>Nt});var bo=[{method:"getRegistries",fallback:[],type:"Registries"},{method:"getSchemes",fallback:[],type:"Schemes"},{method:"vocSearch",fallback:[],type:"Schemes"},{method:"getTypes",fallback:[],type:"Types"},{method:"suggest",fallback:["",[],[],[]]},{method:"vocSuggest",fallback:["",[],[],[]]},{method:"getConcordances",fallback:[],type:"Concordances"},{method:"getOccurrences",fallback:[],type:"Occurrences"},{method:"getTop",fallback:[],type:"Concepts"},{method:"getConcepts",fallback:[],type:"Concepts"},{method:"getNarrower",fallback:[],type:"Concepts"},{method:"getAncestors",fallback:[],type:"Concepts"},{method:"search",fallback:[],type:"Concepts"},{method:"getMapping",fallback:null,type:"Mapping"},{method:"getMappings",fallback:[],type:"Mappings"},{method:"postMapping",fallback:null,type:"Mapping"},{method:"postMappings",fallback:[],type:"Mapping"},{method:"putMapping",fallback:null,type:"Mapping"},{method:"patchMapping",fallback:null,type:"Mapping"},{method:"deleteMapping",fallback:!1},{method:"deleteMappings",fallback:[]},{method:"getAnnotations",fallback:[],type:"Annotations"},{method:"postAnnotation",fallback:null,type:"Annotation"},{method:"putAnnotation",fallback:null,type:"Annotation"},{method:"patchAnnotation",fallback:null,type:"Annotation"},{method:"deleteAnnotation",fallback:!1}];function st(...e){let[t,...r]=e;for(let n of r)t.endsWith("/")||(t+="/"),n.startsWith("/")&&(n=n.slice(1)),t+=n;return t}function Nt(e,t){return e._totalCount=t._totalCount,e._url=t._url,e}var _o=["schemes","top","data","concepts","narrower","ancestors","types","suggest","search","auth","mappings","concordances","annotations","occurrences"];var Q=class{constructor(t={}){var n,i;this._jskos=t,this.axios=xe.create({timeout:2e4}),this._path=typeof window!="undefined"&&window.location.pathname,this.has={},(n=this.constructor)!=null&&n.supports&&(this.has=Object.assign({},(i=this.constructor)==null?void 0:i.supports)),_o.filter(s=>!this.has[s]).forEach(s=>{this.has[s]=!1}),this._defaultLanguages="en,de,fr,es,nl,it,fi,pl,ru,cs,jp".split(","),this.languages=[],this._auth={key:null,bearerToken:null},this._repeating=[],this._api={status:t.status,schemes:Array.isArray(t.schemes)?void 0:t.schemes,top:t.top,data:t.data,concepts:t.concepts,narrower:t.narrower,ancestors:t.ancestors,types:t.types,suggest:t.suggest,search:t.search,"voc-suggest":t["voc-suggest"],"voc-search":t["voc-search"],mappings:t.mappings,concordances:t.concordances,annotations:t.annotations,occurrences:t.occurrences,reconcile:t.reconcile,api:t.api},this._config={},this.setRetryConfig(),this.axios.interceptors.request.use((s={})=>{var o;if(!s._skipAdditionalParameters){let a=At.default([].concat(G.default(s,"params.language","").split(","),this.languages,this._defaultLanguages).filter(u=>u!="")).join(",");me.default(s,"params.language",a),this.has.auth&&this._auth.bearerToken&&!G.default(s,"headers.Authorization")&&me.default(s,"headers.Authorization",`Bearer ${this._auth.bearerToken}`)}if((o=s.url)!=null&&o.startsWith("http:")&&typeof window!="undefined"&&window.location.protocol=="https:")throw new xe.Cancel("Can't call http API from https.");return s}),this.axios.interceptors.response.use(({data:s,headers:o={},config:a={}})=>{s=q.normalize(s);let u=a.url;if(u.endsWith("?")||(u+="?"),so.default(a.params||{},(l,c)=>{u+=`${c}=${encodeURIComponent(l)}&`}),Ee.default(s)||fn.default(s)){let l=parseInt(o["x-total-count"]);isNaN(l)||(s._totalCount=l),s._url=u}return s},s=>{let o=G.default(s,"config._retryCount",0),a=G.default(s,"config.method"),u=G.default(s,"response.status");return this._retryConfig.methods.includes(a)&&this._retryConfig.statusCodes.includes(u)&&o<this._retryConfig.count?(s.config._retryCount=o+1,s.config.data&&(s.config.data=JSON.parse(s.config.data)),new Promise((l,c)=>{setTimeout(()=>{this.axios(s.config).then(l).catch(c)},(()=>{let h=this._retryConfig.delay;return typeof h=="function"?h(o):h})())})):Promise.reject(s)});let r=[];for(let{method:s,type:o}of bo){let a=this[s]&&this[s].bind(this);if(!a){this[s]=()=>{throw new Pr({method:s})};continue}this[s]=(u={})=>{if(u._raw)return delete u._raw,a(u);let l=r.find(m=>m.method==s&&et.default(m.options,u));if(l)return l.promise;let c;u.cancelToken||(c=this.getCancelTokenSource(),u.cancelToken=c.token);let h=this.init().then(()=>a(u)).then(m=>(Ee.default(m)&&m._totalCount===void 0?m._totalCount=m.length:fn.default(m)&&m._totalCount===void 0&&(m._totalCount=1),m&&o&&this[`adjust${o}`]&&(m=this[`adjust${o}`](m)),m)).catch(m=>{throw m instanceof Ae?m:m.response?m.response.status.toString().startsWith(4)?new Xe({relatedError:m,code:m.response.status}):new Rr({relatedError:m,code:m.response.status}):m.request?typeof navigator!="undefined"&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection)?new qr({relatedError:m}):new Mr({relatedError:m}):new Ae({relatedError:m})});c&&(h.cancel=(...m)=>c.cancel(...m));let d={method:s,options:it.default(u,["cancelToken"]),promise:h};return r.push(d),h.catch(()=>{}).then(()=>r.splice(r.indexOf(d),1)),h}}}get uri(){return this._jskos.uri}get notation(){return this._jskos.notation}get prefLabel(){return this._jskos.prefLabel}get definition(){return this._jskos.definition}get schemes(){return this._jskos.schemes}get excludedSchemes(){return this._jskos.excludedSchemes}get stored(){return this._jskos.stored!==void 0?this._jskos.stored:this.constructor.stored}init(){return P(this,null,function*(){return this._init?this._init:(this._init=P(this,null,function*(){this._prepare();let t;if(he.default(this._api.status))try{t=yield this.axios({method:"get",url:this._api.status})}catch(r){G.default(r,"response.status")===404&&(this._api.status=null)}else t=this._api.status;if(fn.default(t)&&!oo.default(t)){this._config=t.config||{};for(let r of Object.keys(this._api))this._api[r]===void 0&&(this._api[r]=t[r]||null)}this._setup()}),this._init)})}_prepare(){}_setup(){}getCancelTokenSource(){return xe.CancelToken.source()}setAuth({key:t=this._auth.key,bearerToken:r=this._auth.bearerToken}){this._auth.key=t,this._auth.bearerToken=r}setRetryConfig(t={}){this._retryConfig=Object.assign({methods:["get","head","options"],statusCodes:[401,403],count:3,delay:r=>300*r},t)}isAuthorizedFor({type:t,action:r,user:n,crossUser:i}){if(r=="read"&&this.has[t]===!0)return!0;if(!this.has[t])return!1;let s=G.default(this._config,`${t}.${r}`);if(!s)return!!this.has[t][r];if(s.auth&&(!n||!this._auth.key)||s.auth&&this._auth.key!=G.default(this._config,"auth.key"))return!1;let o=[n==null?void 0:n.uri].concat(Object.values((n==null?void 0:n.identities)||{}).map(a=>a.uri)).filter(Boolean);if(s.auth&&s.identities&&cn.default(o,s.identities).length==0)return!1;if(s.auth&&s.identityProviders){let a=Object.keys((n==null?void 0:n.identities)||{});if(cn.default(a,s.identityProviders).length==0)return!1}return i?s.crossUser===!0||cn.default(s.crossUser||[],o).length>0:!!this.has[t][r]}supportsScheme(t){if(!t)return!1;let r=Ee.default(this.schemes)?this.schemes:null;return r==null&&!q.isContainedIn(t,this.excludedSchemes||[])?!0:q.isContainedIn(t,r)}adjustConcept(t){if(!t||t.__SAVED__)return t;t._getNarrower=r=>this.getNarrower(B(T({},r),{concept:t})),t._getAncestors=r=>this.getAncestors(B(T({},r),{concept:t})),t._getDetails=r=>P(this,null,function*(){return(yield this.getConcepts(B(T({},r),{concepts:[t]})))[0]});for(let r of["broader","narrower","ancestors"])Array.isArray(t[r])&&t[r].length&&!t[r].includes(null)&&(t[r]=this.adjustConcepts(t[r]));return t._registry=this,t}adjustConcepts(t){return Nt(t.map(r=>this.adjustConcept(r)),t)}adjustRegistries(t){return t}adjustScheme(t){if(!t||t.__SAVED__)return t;let r=t._registry;return t._registry=this.cdk&&this.cdk.registryForScheme(t),!t._registry||r===t._registry||t._registry._api.api===this._api.api?t._registry=r||this:["concepts","topConcepts"].forEach(n=>{Array.isArray(t[n])&&(t[n].length===0||t[n][0]===null)&&delete t[n]}),t._registry&&(t._getTop=n=>t._registry.getTop(B(T({},n),{scheme:t})),t._getTypes=n=>t._registry.getTypes(B(T({},n),{scheme:t})),t._suggest=s=>{var o=s,{search:n}=o,i=H(o,["search"]);return t._registry.suggest(B(T({},i),{search:n,scheme:t}))}),t}adjustSchemes(t){return Nt(t.map(r=>this.adjustScheme(r)),t)}adjustConcordances(t){for(let r of t)r._registry=this;return t}adjustMapping(t){for(let r of["from","to"]){let n=`${r}Scheme`;t[n]||(t[n]=G.default(q.conceptsOfMapping(t,r),"[0].inScheme[0]",null))}if(t._registry=this,!t.identifier){let r=G.default(q.addMappingIdentifiers(t),"identifier");r&&(t.identifier=r)}return t}adjustMappings(t){return Nt(t.map(r=>this.adjustMapping(r)),t)}postMappings(){return P(this,arguments,function*(n={}){var i=n,{mappings:t}=i,r=H(i,["mappings"]);if(!t||!t.length)throw new U({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"postMapping",items:t,itemProperty:"mapping",config:r})})}deleteMappings(){return P(this,arguments,function*(n={}){var i=n,{mappings:t}=i,r=H(i,["mappings"]);if(!t||!t.length)throw new U({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"deleteMapping",items:t,itemProperty:"mapping",config:r})})}_callHelperForArrayWrappers(s){return P(this,arguments,function*({method:t,items:r,itemProperty:n,config:i}){let o=[],a=yield Promise.all(r.map(u=>P(this,null,function*(){try{return yield this[t](B(T({[n]:u},i),{_raw:!0}))}catch(l){return o[r.indexOf(u)]=l,null}})));return a._errors=o,a})}};Q.providerName="Base";var ot=Ce(Qd(),1);var Te=[];for(let e=0;e<256;++e)Te.push((e+256).toString(16).slice(1));function em(e,t=0){return(Te[e[t+0]]+Te[e[t+1]]+Te[e[t+2]]+Te[e[t+3]]+"-"+Te[e[t+4]]+Te[e[t+5]]+"-"+Te[e[t+6]]+Te[e[t+7]]+"-"+Te[e[t+8]]+Te[e[t+9]]+"-"+Te[e[t+10]]+Te[e[t+11]]+Te[e[t+12]]+Te[e[t+13]]+Te[e[t+14]]+Te[e[t+15]]).toLowerCase()}var So,ZO=new Uint8Array(16);function Ao(){if(!So){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");So=crypto.getRandomValues.bind(crypto)}return So(ZO)}var QO=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Eo={randomUUID:QO};function e3(e,t,r){var i,s,o;e=e||{};let n=(o=(s=e.random)!=null?s:(i=e.rng)==null?void 0:i.call(e))!=null?o:Ao();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let a=0;a<16;++a)t[r+a]=n[a];return t}return em(n)}function t3(e,t,r){return Eo.randomUUID&&!t&&!e?Eo.randomUUID():e3(e,t,r)}var yi=t3;var wi="urn:uuid:",Ct=class extends Q{static get supports(){return{mappings:{read:!0,create:!0,update:!0,delete:!0}}}_setup(){this.queue=[],this.localStorageKey="cocoda-mappings--"+this._path;let t="mappings",r=()=>ot.default.getItem(this.localStorageKey).then(n=>{n=n||[];let i=0;for(let s of n.filter(o=>!o.uri||!o.uri.startsWith(wi)))s.uri&&(s.identifier||(s.identifier=[]),s.identifier.push(s.uri)),s.uri=`${wi}${yi()}`,i+=1;return i&&console.warn(`URIs added to ${i} local mappings.`),ot.default.setItem(this.localStorageKey,n)});ot.default.getItem(t).then(n=>{n&&console.warn(`Warning: There is old data in local storage (or IndexedDB, depending on the ) with the key "${t}". This data will not be used anymore. A manual export is necessary to get this data back.`)}),this.queue.push(r().catch(n=>{console.warn("Error when adding URIs to local mappings:",n)}))}isAuthorizedFor({type:t,action:r}){return t=="mappings"&&r!="anonymous"}_getMappingsQueue(){let t=ao.default(this.queue)||Promise.resolve();return new Promise(r=>{function n(){let o,a,u=new Promise((l,c)=>{o=l,a=c});return u.resolve=o,u.reject=a,u}let i=n(),s=()=>{i.resolve()};this.queue.push(i),t.then(()=>ot.default.getItem(this.localStorageKey)).then(o=>{r({mappings:o,done:s})})})}getMapping(n){return P(this,null,function*(){var i=n,{mapping:t}=i,r=H(i,["mapping"]);if(r._raw=!0,!t||!t.uri)throw new U({parameter:"mapping"});return(yield this.getMappings(B(T({},r),{uri:t.uri})))[0]})}getMappings(){return P(this,arguments,function*({from:t,fromScheme:r,to:n,toScheme:i,creator:s,type:o,partOf:a,offset:u,limit:l,direction:c,mode:h,identifier:d,uri:m}={}){let f={};return t&&(f.from=he.default(t)?t:t.uri),r&&(f.fromScheme=he.default(r)?{uri:r}:r),n&&(f.to=he.default(n)?n:n.uri),i&&(f.toScheme=he.default(i)?{uri:i}:i),s&&(f.creator=he.default(s)?s:q.prefLabel(s)),o&&(f.type=he.default(o)?o:o.uri),a&&(f.partOf=he.default(a)?a:a.uri),u&&(f.offset=u),l&&(f.limit=l),c&&(f.direction=c),h&&(f.mode=h),d&&(f.identifier=d),m&&(f.uri=m),this._getMappingsQueue().catch(g=>{throw new Ae({message:"Could not get mappings from local storage",relatedError:g})}).then(({mappings:g,done:w})=>{w();let C=(O,L)=>O.uri==L||L&&O.notation&&O.notation[0].toLowerCase()==L.toLowerCase();if((f.from||f.to)&&(g=g.filter(O=>{let L=q.conceptsOfMapping(O,"from").find(D=>C(D,f.from))!=null,N=q.conceptsOfMapping(O,"to").find(D=>C(D,f.from))!=null,S=q.conceptsOfMapping(O,"from").find(D=>C(D,f.to))!=null,M=q.conceptsOfMapping(O,"to").find(D=>C(D,f.to))!=null;return f.direction=="backward"?f.mode=="or"?f.from&&N||f.to&&S:(!f.from||N)&&(!f.to||S):f.direction=="both"?f.mode=="or"?f.from&&(L||N)||f.to&&(S||M):(!f.from||L)&&(!f.to||M)||(!f.from||N)&&(!f.to||S):f.mode=="or"?f.from&&L||f.to&&M:(!f.from||L)&&(!f.to||M)})),(f.fromScheme||f.toScheme)&&(g=g.filter(O=>{let L=q.compare(O.fromScheme,f.fromScheme),N=q.compare(O.toScheme,f.fromScheme),S=q.compare(O.fromScheme,f.toScheme),M=q.compare(O.toScheme,f.toScheme);return f.direction=="backward"?f.mode=="or"?f.fromScheme&&N||f.toScheme&&S:(!f.fromScheme||N)&&(!f.toScheme||S):f.direction=="both"?f.mode=="or"?f.fromScheme&&(L||N)||f.toScheme&&(S||M):(!f.fromScheme||L)&&(!f.toScheme||M)||(!f.fromScheme||N)&&(!f.toScheme||S):f.mode=="or"?f.fromScheme&&L||f.toScheme&&M:(!f.fromScheme||L)&&(!f.toScheme||M)})),f.creator){let O=f.creator.split("|");g=g.filter(L=>(L.creator&&L.creator.find(N=>O.includes(q.prefLabel(N))||O.includes(N.uri)))!=null)}f.type&&(g=g.filter(O=>(O.type||[q.defaultMappingType.uri]).includes(f.type))),f.partOf&&(g=g.filter(O=>O.partOf!=null&&O.partOf.find(L=>q.compare(L,{uri:f.partOf}))!=null)),f.identifier&&(g=g.filter(O=>f.identifier.split("|").map(L=>(O.identifier||[]).includes(L)||O.uri==L).reduce((L,N)=>L||N))),f.uri&&(g=g.filter(O=>O.uri==f.uri));let I=g.length;return g=g.sort((O,L)=>{let N=O.modified||O.created,S=L.modified||L.created;return S==null?-1:N==null?1:N>S?-1:1}),g=g.slice(f.offset||0),g=g.slice(0,f.limit),g._totalCount=I,g})})}postMapping(r){return P(this,arguments,function*({mapping:t}){if(!t)throw new U({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue();if((!t.uri||!t.uri.startsWith(wi))&&(t.uri&&(t.identifier||(t.identifier=[]),t.identifier.push(t.uri)),t.uri=`${wi}${yi()}`),n.find(s=>s.uri==t.uri))throw i(),new U({parameter:"mapping",message:"Duplicate URI"});t.created||(t.created=new Date().toISOString()),t.modified||(t.modified=t.created),delete t.partOf,n.push(t),n=n.map(s=>q.minifyMapping(s));try{return yield ot.default.setItem(this.localStorageKey,n),i(),t}catch(s){throw i(),s}})}putMapping(r){return P(this,arguments,function*({mapping:t}){if(!t)throw new U({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue(),s=n.findIndex(o=>o.uri==t.uri);if(s==-1)throw i(),new U({parameter:"mapping",message:"Mapping not found"});t.created||(t.created=n[s].created),t.modified=new Date().toISOString(),delete t.partOf,n[s]=t,n=n.map(o=>q.minifyMapping(o));try{return yield ot.default.setItem(this.localStorageKey,n),i(),t}catch(o){throw i(),o}})}patchMapping(r){return P(this,arguments,function*({mapping:t}){if(!t)throw new U({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue(),s=n.findIndex(o=>o.uri==t.uri);if(s==-1)throw i(),new U({parameter:"mapping",message:"Mapping not found"});t.created||(t.created=n[s].created),t.modified=new Date().toISOString(),delete t.partOf,n[s]=Object.assign(n[s],t),n=n.map(o=>q.minifyMapping(o));try{return yield ot.default.setItem(this.localStorageKey,n),i(),t}catch(o){throw i(),o}})}deleteMapping(r){return P(this,arguments,function*({mapping:t}){if(!t)throw new U({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue();try{return n=n.filter(s=>s.uri!=t.uri),n=n.map(s=>q.minifyMapping(s)),yield ot.default.setItem(this.localStorageKey,n),i(),!0}catch(s){throw i(),s}})}};Ct.providerName="LocalMappings";Ct.stored=!0;var He=class extends Q{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=st(this._api.api,"/status"))}_setup(){if(this._api.api){let t={mappings:"/mappings",concordances:"/concordances",annotations:"/annotations"};for(let r of Object.keys(t))this._api[r]===void 0&&(this._api[r]=st(this._api.api,t[r]))}this.has.mappings=this._api.mappings?{}:!1,this.has.mappings&&(this.has.mappings.read=!!G.default(this._config,"mappings.read",!0),this.has.mappings.create=!!G.default(this._config,"mappings.create"),this.has.mappings.update=!!G.default(this._config,"mappings.update"),this.has.mappings.delete=!!G.default(this._config,"mappings.delete"),this.has.mappings.anonymous=!!G.default(this._config,"mappings.anonymous")),this.has.concordances=this._api.concordances?{}:!1,this.has.concordances&&(this.has.concordances.read=!!G.default(this._config,"concordances.read"),this.has.concordances.create=!!G.default(this._config,"concordances.create"),this.has.concordances.update=!!G.default(this._config,"concordances.update"),this.has.concordances.delete=!!G.default(this._config,"concordances.delete")),this.has.annotations=this._api.annotations?{}:!1,this.has.annotations&&(this.has.annotations.read=!!G.default(this._config,"annotations.read"),this.has.annotations.create=!!G.default(this._config,"annotations.create"),this.has.annotations.update=!!G.default(this._config,"annotations.update"),this.has.annotations.delete=!!G.default(this._config,"annotations.delete")),this.has.auth=G.default(this._config,"auth.key")!=null,this._defaultParams={properties:"annotations"}}getMapping(n){return P(this,null,function*(){var i=n,{mapping:t}=i,r=H(i,["mapping"]);if(!t)throw new U({parameter:"mapping"});if(!t.uri||!t.uri.startsWith(this._api.mappings))throw new U({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});try{return yield this.axios(B(T({},r),{url:t.uri,params:T(T({},this._defaultParams),r.params||{})}))}catch(s){if(G.default(s,"response.status")==404)return null;throw s}})}getMappings(L){return P(this,null,function*(){var N=L,{from:t,fromScheme:r,to:n,toScheme:i,creator:s,type:o,partOf:a,offset:u,limit:l,direction:c,mode:h,identifier:d,cardinality:m,annotatedBy:f,annotatedFor:g,annotatedWith:w,sort:C,order:I}=N,O=H(N,["from","fromScheme","to","toScheme","creator","type","partOf","offset","limit","direction","mode","identifier","cardinality","annotatedBy","annotatedFor","annotatedWith","sort","order"]);let S={},M=this._api.mappings;return t&&(S.from=he.default(t)?t:t.uri),r&&(S.fromScheme=he.default(r)?r:r.uri),n&&(S.to=he.default(n)?n:n.uri),i&&(S.toScheme=he.default(i)?i:i.uri),s&&(S.creator=he.default(s)?s:q.prefLabel(s)),o&&(S.type=he.default(o)?o:o.uri),a&&(S.partOf=he.default(a)?a:a.uri),u&&(S.offset=u),l&&(S.limit=l),c&&(S.direction=c),m&&(S.cardinality=m),f&&(S.annotatedBy=f),g&&(S.annotatedFor=g),w&&(S.annotatedWith=w),h&&(S.mode=h),d&&(S.identifier=d),C&&(S.sort=C),I&&(S.order=I),this.axios(B(T({},O),{method:"get",url:M,params:T(T(T({},this._defaultParams),O.params||{}),S)}))})}postMapping(n){return P(this,null,function*(){var i=n,{mapping:t}=i,r=H(i,["mapping"]);if(!t)throw new U({parameter:"mapping"});return t=q.minifyMapping(t),t=q.addMappingIdentifiers(t),this.axios(B(T({},r),{method:"post",url:this._api.mappings,data:t,params:T(T({},this._defaultParams),r.params||{})}))})}putMapping(n){return P(this,null,function*(){var i=n,{mapping:t}=i,r=H(i,["mapping"]);if(!t)throw new U({parameter:"mapping"});t=q.minifyMapping(t),t=q.addMappingIdentifiers(t);let s=t.uri;if(!s||!s.startsWith(this._api.mappings))throw new U({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return this.axios(B(T({},r),{method:"put",url:s,data:t,params:T(T({},this._defaultParams),r.params||{})}))})}patchMapping(n){return P(this,null,function*(){var i=n,{mapping:t}=i,r=H(i,["mapping"]);if(!t)throw new U({parameter:"mapping"});let s=t.uri;if(!s||!s.startsWith(this._api.mappings))throw new U({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return this.axios(B(T({},r),{method:"patch",url:s,data:it.default(t,"uri"),params:T(T({},this._defaultParams),r.params||{})}))})}deleteMapping(n){return P(this,null,function*(){var i=n,{mapping:t}=i,r=H(i,["mapping"]);if(!t)throw new U({parameter:"mapping"});let s=t.uri;if(!s||!s.startsWith(this._api.mappings))throw new U({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return yield this.axios(B(T({},r),{method:"delete",url:s})),!0})}getAnnotations(n){return P(this,null,function*(){var i=n,{target:t}=i,r=H(i,["target"]);return t&&me.default(r,"params.target",t),this.axios(B(T({},r),{method:"get",url:this._api.annotations}))})}postAnnotation(n){return P(this,null,function*(){var i=n,{annotation:t}=i,r=H(i,["annotation"]);return this.axios(B(T({},r),{method:"post",url:this._api.annotations,data:t}))})}putAnnotation(n){return P(this,null,function*(){var i=n,{annotation:t}=i,r=H(i,["annotation"]);let s=t.id;if(!s||!s.startsWith(this._api.annotations))throw new U({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return this.axios(B(T({},r),{method:"put",url:s,data:t}))})}patchAnnotation(n){return P(this,null,function*(){var i=n,{annotation:t}=i,r=H(i,["annotation"]);let s=t.id;if(!s||!s.startsWith(this._api.annotations))throw new U({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return this.axios(B(T({},r),{method:"patch",url:s,data:t}))})}deleteAnnotation(n){return P(this,null,function*(){var i=n,{annotation:t}=i,r=H(i,["annotation"]);let s=t.id;if(!s||!s.startsWith(this._api.annotations))throw new U({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return yield this.axios(B(T({},r),{method:"delete",url:s})),!0})}getConcordances(t){return P(this,null,function*(){return this.axios(B(T({},t),{method:"get",url:this._api.concordances}))})}postConcordance(n){return P(this,null,function*(){var i=n,{concordance:t}=i,r=H(i,["concordance"]);if(!t)throw new U({parameter:"concordance"});return this.axios(B(T({},r),{method:"post",url:this._api.concordances,data:t,params:T(T({},this._defaultParams),r.params||{})}))})}putConcordance(n){return P(this,null,function*(){var i=n,{concordance:t}=i,r=H(i,["concordance"]);if(!t)throw new U({parameter:"concordance"});let s=t.uri;if(!s||!s.startsWith(this._api.concordances))throw new U({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return this.axios(B(T({},r),{method:"put",url:s,data:t,params:T(T({},this._defaultParams),r.params||{})}))})}patchConcordance(n){return P(this,null,function*(){var i=n,{concordance:t}=i,r=H(i,["concordance"]);if(!t)throw new U({parameter:"concordance"});let s=t.uri;if(!s||!s.startsWith(this._api.concordances))throw new U({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return this.axios(B(T({},r),{method:"patch",url:s,data:it.default(t,"uri"),params:T(T({},this._defaultParams),r.params||{})}))})}deleteConcordance(n){return P(this,null,function*(){var i=n,{concordance:t}=i,r=H(i,["concordance"]);if(!t)throw new U({parameter:"concordance"});let s=t.uri;if(!s||!s.startsWith(this._api.concordances))throw new U({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return yield this.axios(B(T({},r),{method:"delete",url:s})),!0})}};ge(He,"supports",{mappings:!0,concordances:!0,annotations:!0});He.providerName="MappingsApi";He.stored=!0;var Co={},at=class extends Q{get _cache(){return Co[this.uri]}_prepare(){Co[this.uri]=[],this._occurrencesSupportedSchemes=[]}_occurrencesIsSupported(t){return P(this,null,function*(){if(!(this._occurrencesSupportedSchemes&&this._occurrencesSupportedSchemes.length))try{let n=st(this._api.api,"voc"),i=yield this.axios({method:"get",url:n});this._occurrencesSupportedSchemes=i||[]}catch(n){}let r=!1;for(let n of this._occurrencesSupportedSchemes)q.compare(t,n)&&(r=!0);return r})}getMappings(t){return P(this,null,function*(){let r=yield this.getOccurrences(t),n=t.from,i=G.default(n,"inScheme[0]")||t.fromScheme,s=t.to,o=G.default(s,"inScheme[0]")||t.toScheme,a=[];for(let u of r){if(!u)continue;let l={};l.from=G.default(u,"memberSet[0]"),l.from?l.from={memberSet:[l.from]}:l.from=null,l.fromScheme=G.default(u,"memberSet[0].inScheme[0]"),l.to=G.default(u,"memberSet[1]"),l.to?l.to={memberSet:[l.to]}:l.to={memberSet:[]},l.toScheme=G.default(u,"memberSet[1].inScheme[0]"),(n&&q.compare(n,G.default(l,"to.memberSet[0]"))||s&&q.compare(s,G.default(l,"from.memberSet[0]")))&&([l.from,l.fromScheme,l.to,l.toScheme]=[l.to,l.toScheme,l.from,l.fromScheme]),!l.fromScheme&&i&&(l.fromScheme=i),!l.toScheme&&o&&(l.toScheme=o),l.type=[q.defaultMappingType.uri],l._occurrence=u,l=q.addMappingIdentifiers(l),a.push(l)}return a._url=r._url,a})}getOccurrences(o){return P(this,null,function*(){var a=o,{from:t,to:r,concepts:n,threshold:i=0}=a,s=H(a,["from","to","concepts","threshold"]);let u=[];n=(n||[]).concat([t,r]).filter(f=>!!f);for(let f of n)u.push(this._occurrencesIsSupported(G.default(f,"inScheme[0]")).then(g=>g&&f.uri?f.uri:null));let l=yield Promise.all(u);if(l=l.filter(f=>f!=null),l.length==0)throw new U({parameter:"concepts"});u=[];for(let f of l)u.push(this._getOccurrences(B(T({},s),{params:{member:f,scheme:"*",threshold:i}})));let c=yield Promise.all(u),h=uo.default([],...c),d=[],m=[];for(let f=0;f<h.length;f+=1){let g=h[f];if(!g)continue;let w=g.memberSet.reduce((C,I)=>C.concat(I.uri),[]).sort().join(" ");d.includes(w)?m.push(f):d.push(w)}return m.forEach(f=>{delete h[f]}),h=h.filter(f=>f!=null),h=h.sort((f,g)=>parseInt(g.count||0)-parseInt(f.count||0)),h._url=c.map(f=>f._url),h})}_getOccurrences(t){return P(this,null,function*(){let r=this._cache.find(i=>et.default(i.config.params,t.params));if(r)return r.data;let n=yield this.axios(B(T({},t),{method:"get",url:this._api.api}));return this._cache.push({config:t,data:n}),this._cache.length>20&&(Co[this.uri]=this._cache.slice(this._cache.length-20)),n})}};ge(at,"supports",{occurrences:!0,mappings:!0});at.providerName="OccurrencesApi";at.stored=!1;var We=class extends Q{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=st(this._api.api,"/status"))}_setup(){if(this._api.api){let t={schemes:"/voc",top:"/voc/top",concepts:"/voc/concepts",data:"/data",narrower:"/narrower",ancestors:"/ancestors",types:"/types",suggest:"/suggest",search:"/search"};for(let r of Object.keys(t))this._api[r]===void 0&&(this._api[r]=st(this._api.api,t[r]))}this.has.schemes=!!this._api.schemes,!this.has.schemes&&Array.isArray(this.schemes)&&(this.has.schemes=!0),this.has.top=!!this._api.top,this.has.data=!!this._api.data,this.has.concepts=!!this._api.concepts||this.has.data,this.has.narrower=!!this._api.narrower,this.has.ancestors=!!this._api.ancestors,this.has.types=!!this._api.types,this.has.suggest=!!this._api.suggest,this.has.search=!!this._api.search,this.has.auth=G.default(this._config,"auth.key")!=null,this._defaultParams={properties:"+created,issued,modified,editorialNote,scopeNote,note,definition,mappings,location"}}static _registryConfigForBartocApiConfig({url:t,scheme:r}={}){return!t||!r?null:{api:t,schemes:[r]}}_getSchemeUri(t){return P(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let r=this._approvedSchemes.find(s=>q.compare(t,s));if(r)return r.uri;if(this._rejectedSchemes.find(s=>q.compare(t,s)))return null;let i=(yield this.getSchemes({params:{uri:q.getAllUris(t).join("|")}})).find(s=>q.compare(s,t));return i?(this._approvedSchemes.push({uri:i.uri,identifier:q.getAllUris(t)}),i.uri):(this._rejectedSchemes.push({uri:t.uri,identifier:t.identifier}),null)})}getSchemes(){return P(this,arguments,function*(t={}){if(!this._api.schemes){if(Array.isArray(this.schemes))return this.schemes;throw new ke}let r=yield this.axios(B(T({},t),{method:"get",url:this._api.schemes,params:T(B(T({},this._defaultParams),{limit:500}),t.params||{})}));return Array.isArray(this.schemes)?Nt(r.filter(n=>q.isContainedIn(n,this.schemes)),r):r})}getTop(n){return P(this,null,function*(){var i=n,{scheme:t}=i,r=H(i,["scheme"]);if(!this._api.top)throw new ke;if(!t)throw new U({parameter:"scheme"});let s=yield this._getSchemeUri(t);if(!s)throw new U({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return Array.isArray(this._api.top)?this._api.top:this.axios(B(T({},r),{method:"get",url:this._api.top,params:B(T(B(T({},this._defaultParams),{limit:1e4}),r.params||{}),{uri:s})}))})}getConcepts(n){return P(this,null,function*(){var i=n,{concepts:t}=i,r=H(i,["concepts"]);let s=this._api.concepts||this._api.data;if(!s)throw new ke;if(!t)throw new U({parameter:"concepts"});Array.isArray(t)||(t=[t]);let o=t.map(a=>a.uri).filter(a=>a!=null);return this.axios(B(T({},r),{method:"get",url:s,params:B(T(B(T({},this._defaultParams),{limit:500}),r.params||{}),{uri:o.join("|")})}))})}getNarrower(n){return P(this,null,function*(){var i=n,{concept:t}=i,r=H(i,["concept"]);var s;if(!t||!t.uri)throw new U({parameter:"concept"});if(this._api.narrower)return this.axios(B(T({},r),{method:"get",url:this._api.narrower,params:B(T(B(T({},this._defaultParams),{limit:1e4}),r.params||{}),{uri:t.uri})}));{let o=T({params:{}},r);o.params.properties="narrower";let u=((s=(yield this.getConcepts(T({concepts:[t]},o)))[0])==null?void 0:s.narrower)||[];return u.length?this.getConcepts(T({concepts:u},r)):[]}})}getAncestors(n){return P(this,null,function*(){var i=n,{concept:t}=i,r=H(i,["concept"]);var s;if(!t||!t.uri)throw new U({parameter:"concept"});if(this._api.ancestors)return this.axios(B(T({},r),{method:"get",url:this._api.ancestors,params:B(T(B(T({},this._defaultParams),{limit:1e4}),r.params||{}),{uri:t.uri})}));{let o=T({params:{}},r);o.params.properties="ancestors";let u=((s=(yield this.getConcepts(T({concepts:[t]},o)))[0])==null?void 0:s.ancestors)||[];return u.length?this.getConcepts(T({concepts:u},r)):[]}})}suggest(o){return P(this,null,function*(){var a=o,{use:t="notation,label",types:r=[],sort:n="score",params:i={}}=a,s=H(a,["use","types","sort","params"]);return this._search(B(T({},s),{endpoint:"suggest",params:B(T({},i),{type:r.join("|"),use:t,sort:n})}))})}search(i){return P(this,null,function*(){var s=i,{types:t=[],params:r={}}=s,n=H(s,["types","params"]);return this._search(B(T({},n),{endpoint:"search",params:B(T({},r),{type:t.join("|")})}))})}vocSuggest(s){return P(this,null,function*(){var o=s,{use:t="notation,label",sort:r="score",params:n={}}=o,i=H(o,["use","sort","params"]);return this._search(B(T({},i),{endpoint:"voc-suggest",params:B(T({},n),{use:t,sort:r})}))})}vocSearch(t){return P(this,null,function*(){return this._search(B(T({},t),{endpoint:"voc-search"}))})}_search(l){return P(this,null,function*(){var c=l,{endpoint:t,scheme:r,search:n,limit:i,offset:s,params:o,url:a}=c,u=H(c,["endpoint","scheme","search","limit","offset","params","url"]);if(a=a!=null?a:this._api[t],!a)throw new ke;if(!n)throw new U({parameter:"search"});i=i||this._jskos.suggestResultLimit||100,s=s||0;let h=r&&(yield this._getSchemeUri(r));return a=a.replace("{searchTerms}",n),this.axios(B(T({},u),{params:B(T(T({},this._defaultParams),o),{limit:i,count:i,offset:s,search:n,query:n,voc:h}),method:"get",url:a}))})}getTypes(n){return P(this,null,function*(){var i=n,{scheme:t}=i,r=H(i,["scheme"]);if(!this._api.types)throw new ke;if(Array.isArray(this._api.types))return this._api.types;let s=t&&(yield this._getSchemeUri(t));s&&me.default(r,"params.uri",s);let o=yield this.axios(B(T({},r),{method:"get",url:this._api.types}));return s&&(o=o.filter(a=>!a.inScheme||q.isContainedIn(t,a.inScheme))),o})}};ge(We,"supports",{schemes:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,types:!0,suggest:!0,search:!0,auth:!0});We.providerName="ConceptApi";We.providerType="http://bartoc.org/api-type/jskos";var Oo={},tt=class extends Q{get _cache(){return Oo[this.uri]}_prepare(){Oo[this.uri]=[]}getMappings(s){return P(this,null,function*(){var o=s,{from:t,to:r,mode:n}=o,i=H(o,["from","to","mode"]);let a=[];Ee.default(this.schemes)&&(a=this.schemes);let u,l,c=G.default(t,"inScheme[0]"),h=G.default(r,"inScheme[0]"),d,m;if(!t||q.isContainedIn(c,a)?(u=!0,l=r,d=h,m=a.find(S=>q.compare(S,c))||a[0]):(u=!1,l=t,d=c,m=a.find(S=>q.compare(S,h))||a[0]),n!="or")return[];if(!this._api.api)throw new ke;if(!l)throw new U({parameter:u?"to":"from"});let f=q.languagePreference.selectLanguage(l.prefLabel);if(!f)throw new U({parameter:u?"to":"from",message:"Missing language"});let g=G.default(l,`altLabel.${f}`,[]);he.default(g)&&(g=[g]);let w=G.default(l,`prefLabel.${f}`),C=g.concat([w]);C=[w];let{url:I,data:O}=yield this._getReconciliationResults(B(T({},i),{labels:C,language:f}));O=[].concat(...Object.values(O).map(S=>S.result)).filter(S=>S),O=O.sort((S,M)=>S.score!=M.score?M.score-S.score:S.match!=M.match?S.match?-1:1:S.id.length-M.id.length);let L=G.default(m,"namespace",""),N=O.map(S=>({fromScheme:d,from:{memberSet:[l]},toScheme:m,to:{memberSet:[{uri:L+S.id}]},type:[S.match?"http://www.w3.org/2004/02/skos/core#exactMatch":S.score>=80?"http://www.w3.org/2004/02/skos/core#closeMatch":"http://www.w3.org/2004/02/skos/core#mappingRelation"]}));return u&&(N=N.map(S=>Object.assign(S,{fromScheme:S.toScheme,from:S.to,toScheme:S.fromScheme,to:S.from}))),N._url=I,N})}_getReconciliationResults(i){return P(this,null,function*(){var s=i,{labels:t,language:r}=s,n=H(s,["labels","language"]);t=t.sort();let o=this._cache.find(m=>et.default(m.labels,t)&&m.language==r);if(o)return o;let a={},u=0;for(let m of t)a[`q${u}`]={query:m},u+=1;let l=this._api.api;r&&(l=l.replace("{language}",r));let c=`queries=${encodeURIComponent(JSON.stringify(a))}`;me.default(n,["headers","Content-Type"],"application/x-www-form-urlencoded");let h=yield this.axios(B(T({},n),{method:"post",url:l,data:c}));h=h||{};let d={labels:t,language:r,data:h,url:`${l}${l.includes("?")?"&":"?"}${c}`};return this._cache.push(d),this._cache.length>20&&(Oo[this.uri]=this._cache.slice(this._cache.length-20)),d})}};ge(tt,"supports",{mappings:!0});tt.providerName="ReconciliationApi";tt.providerType="http://bartoc.org/api-type/reconciliation";tt.stored=!1;var ut=class extends Q{_prepare(){this._cache=[]}supportsScheme(t){return super.supportsScheme(t)&&G.default(t,"_registry.has.search",!1)}getMappings(a){return P(this,null,function*(){var u=a,{from:t,to:r,mode:n,selected:i,limit:s=10}=u,o=H(u,["from","to","mode","selected","limit"]);if(n!="or")return[];if(!i)throw new U({parameter:"selected"});let l=[];t&&this.supportsScheme(i.scheme[!1])?l.push(this._getMappings(B(T({},o),{concept:t,sourceScheme:i.scheme[!0],targetScheme:i.scheme[!1],limit:s}))):l.push(Promise.resolve([])),r&&this.supportsScheme(i.scheme[!0])?l.push(this._getMappings(B(T({},o),{concept:r,sourceScheme:i.scheme[!1],targetScheme:i.scheme[!0],limit:s,swap:!0}))):l.push(Promise.resolve([]));let[c,h]=yield Promise.all(l);for(h=h.filter(d=>!c.find(m=>q.compareMappingMembers(d,m)));c.length+h.length>s;)h.length>=c.length?h=h.slice(0,-1):c=c.slice(0,-1);return io.default(c,h)})}_getMappings(a){return P(this,null,function*(){var u=a,{concept:t,sourceScheme:r,targetScheme:n,limit:i,swap:s=!1}=u,o=H(u,["concept","sourceScheme","targetScheme","limit","swap"]);var f;if(!t||!r||!n)return[];if(q.compare(r,n))return[];let l=q.languagePreference.selectLanguage(t.prefLabel)||this._defaultLanguages[0],c=q.prefLabel(t,{fallbackToUri:!1,language:l});if(!c)return[];let h=/^[\s\wäüöÄÜÖß]*\w/.exec(c);c=h?h[0]:c;let d=yield this._getResults(B(T({},o),{label:c,targetScheme:n,limit:i}));if(!d.length&&((f=t.broader)!=null&&f.length))for(let g of t.broader){let w=q.prefLabel(g,{fallbackToUri:!1,language:l});if(w&&(d=yield this._getResults(B(T({},o),{label:w,targetScheme:n,limit:i})),d.length))break}let m=d.map(g=>({fromScheme:r,from:{memberSet:[t]},toScheme:n,to:{memberSet:[g]},type:["http://www.w3.org/2004/02/skos/core#mappingRelation"]}));return s&&(m=m.map(g=>Object.assign(g,{fromScheme:g.toScheme,from:g.to,toScheme:g.fromScheme,to:g.from}))),m})}_getResults(s){return P(this,null,function*(){var o=s,{label:t,targetScheme:r,limit:n}=o,i=H(o,["label","targetScheme","limit"]);var h;let a=(this._cache[r.uri]||{})[t];if(a&&a._limit>=n)return a;let u=G.default(r,"_registry");if(!u||u.has.search===!1)return[];let l=(h=(this._jskos.overrides||[]).find(d=>q.compare(d,r)))==null?void 0:h.search,c=yield u.search(B(T({},i),{url:l,search:t,scheme:r,limit:n}));return this._cache[r.uri]||(this._cache[r.uri]={}),this._cache[r.uri][t]=c,this._cache[r.uri][t]._limit=n,c})}};ge(ut,"supports",{mappings:!0});ut.providerName="LabelSearchSuggestion";ut.stored=!1;var lt=class extends Q{static _registryConfigForBartocApiConfig({url:t,scheme:r}={}){if(!t||!r)return null;let n={},i=t.match(/(.+\/)([^/]+)\/$/);return i?(n.api=i[1]+"rest/v1/",r.VOCID=i[2],n.schemes=[r],n):null}get _language(){return this.languages[0]||this._defaultLanguages[0]||"en"}_getApiUrl(t,r,n){let i=t&&t.VOCID||G.default(this.schemes.find(o=>q.compare(o,t)),"VOCID");if(!i)throw new U({parameter:"scheme",message:"Missing scheme or VOCID property on scheme"});r=r||"",n=n||{},n.lang||(n.lang=this._language);let s=Object.keys(n).map(o=>`${o}=${encodeURIComponent(n[o])}`).join("&");return`${this._api.api}${i}${r}${s?"?"+s:""}`}_getDataUrl(t,{addFormatParameter:r=!0}={}){let n=G.default(t,"inScheme[0]");if(!t||!t.uri)throw new U({parameter:"concept",message:"Missing concept URI"});return this._getApiUrl(n,"/data",r?{format:"application/json"}:{})}_getSchemeUri(t){return P(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let r=this._approvedSchemes.find(o=>q.compare(t,o));if(r)return r.uri;if(this._rejectedSchemes.find(o=>q.compare(t,o)))return null;let n=this._getApiUrl(t,"/"),s=(yield this.axios({method:"get",url:n})).conceptschemes.find(o=>q.compare(o,t));return s?(this._approvedSchemes.push({uri:s.uri,identifier:q.getAllUris(t)}),s.uri):(this._rejectedSchemes.push({uri:t.uri,identifier:t.identifier}),null)})}_toJskosConcept(t,{concept:r,scheme:n,result:i,language:s}={}){if(!t)return null;r=q.deepCopy(r||{}),s=s||t.lang||"en",r.uri=t.uri,n&&(r.inScheme=[n]);let o=t.matchedPrefLabel||t.prefLabel||t.label;if(he.default(o))me.default(r,`prefLabel.${s}`,o);else{o&&!Ee.default(o)&&(o=[o]);for(let l of o||[])me.default(r,`prefLabel.${l.lang}`,l.value)}let a=t.altLabel;if(he.default(a))me.default(r,`altLabel.${s}`,[a]);else{a&&!Ee.default(a)&&(a=[a]);for(let l of a||[])G.default(r,`altLabel.${l.lang}`)?(r.altLabel[l.lang].push(l.value),r.altLabel[l.lang]=At.default(r.altLabel[l.lang])):me.default(r,`altLabel.${l.lang}`,[l.value])}let u=t.notation||t["skos:notation"]||q.notation(r);u&&(r.notation=[u.value||u]),t.broader&&(Ee.default(t.broader)||(t.broader=[t.broader]),r.broader=t.broader.map(l=>he.default(l)?{uri:l}:l)),t.hasChildren===!0?r.narrower=[null]:t.hasChildren===!1&&(r.narrower=[]),t.type&&!Ee.default(t.type)&&(t.type=[t.type]),r.type=r.type||[];for(let l of t.type||[]){if(!q.isValidUri(l))continue;let c=l.slice(0,l.indexOf(":"));i&&i["@context"]&&i["@context"][c]&&(l=l.replace(c+":",i["@context"][c])),r.type.push(l)}return r.type=At.default(r.type),r.type.length||(r.type=["http://www.w3.org/2004/02/skos/core#Concept"]),r}getSchemes(){return P(this,arguments,function*(r={}){var t=H(r,[]);let n=[];for(let i of this.schemes||[]){let s=this._getApiUrl(i,"/"),a=(yield this.axios(B(T({},t),{method:"get",url:s}))).conceptschemes.find(l=>q.compare(l,i)),u=a&&(a.prefLabel||a.label||a.title);u&&me.default(i,`prefLabel.${this._language}`,u),n.push(i),this._approvedSchemes=this._approvedSchemes||[],this._approvedSchemes.find(l=>q.compare(i,l))||this._approvedSchemes.push({uri:a.uri,identifier:q.getAllUris(i)})}return n})}getTop(n){return P(this,null,function*(){var i=n,{scheme:t}=i,r=H(i,["scheme"]);let s=this._getApiUrl(t,"/topConcepts"),o=yield this._getSchemeUri(t);if(!o)throw new U({parameter:"scheme",message:"Missing or unsupported scheme or VOCID property on scheme"});me.default(r,"params.scheme",o);let a=yield this.axios(B(T({},r),{method:"get",url:s})),u=[];for(let l of a.topconcepts||[]){let c=this._toJskosConcept(l,{scheme:t,language:this._language});c.topConceptOf=[t],u.push(c)}return u})}getConcepts(n){return P(this,null,function*(){var i=n,{concepts:t}=i,r=H(i,["concepts"]);Ee.default(t)||(t=[t]),t=t.map(o=>({uri:o.uri,inScheme:o.inScheme}));let s=[];for(let o of t){let a=this._getDataUrl(o,{addFormatParameter:!1});if(!a)continue;let u=yield this.axios(B(T({},r),{method:"get",url:a,params:{uri:o.uri,format:"application/json"}})),l=u&&u.graph&&u.graph.find(c=>q.compare(c,o));if(l){let c=this._toJskosConcept(l,{concept:o,result:u});for(let h of["broader","narrower"]){let d=l[h]||c[h];d&&!Ee.default(d)&&(d=[d]),d||(d=[]),c[h]=d.map(m=>this._toJskosConcept(u.graph.find(f=>q.compare(f,m)),{scheme:o.inScheme[0],result:u}))}c.ancestors=[],s.push(c)}}return s})}getNarrower(n){return P(this,null,function*(){var i=n,{concept:t}=i,r=H(i,["concept"]);if(!t||!t.uri)throw new U({parameter:"concept"});let s=t.inScheme[0],o=this._getApiUrl(s,"/children");return me.default(r,"params.uri",t.uri),((yield this.axios(B(T({},r),{method:"get",url:o}))).narrower||[]).map(l=>this._toJskosConcept(l,{scheme:s}))})}getAncestors(n){return P(this,null,function*(){var i=n,{concept:t}=i,r=H(i,["concept"]);if(!t||!t.uri)throw new U({parameter:"concept"});let s=t.inScheme[0],o=this._getApiUrl(s,"/broaderTransitive");me.default(r,"params.uri",t.uri);let a=yield this.axios(B(T({},r),{method:"get",url:o})),u=[],l=t.uri;for(;l;){if(l!=t.uri){let h=G.default(a,`broaderTransitive["${l}"]`);u=u.concat([h])}l=G.default(a,`broaderTransitive["${l}"].broader[0]`)}return u.map(h=>this._toJskosConcept(h,{scheme:s})).filter(h=>h.uri!=t.uri)})}suggest(t){return P(this,null,function*(){t._raw=!0;let r=yield this.search(t),n=[t.search,[],[],[]];for(let i of r){let s=q.notation(i),o=q.prefLabel(i);n[1].push((s?s+" ":"")+o),n[2].push(""),n[3].push(i.uri)}return r._totalCount!=null?n._totalCount=r._totalCount:n._totalCount=r.length,n})}search(o){return P(this,null,function*(){var a=o,{search:t,scheme:r,limit:n,types:i=[]}=a,s=H(a,["search","scheme","limit","types"]);let u=this._getApiUrl(r,"/search");return me.default(s,"params.query",`${t}*`),me.default(s,"params.unique",1),me.default(s,"params.maxhits",n||100),me.default(s,"params.type",i.join(" ")),((yield this.axios(B(T({},s),{method:"get",url:u}))).results||[]).map(h=>this._toJskosConcept(h,{scheme:r}))})}getTypes(n){return P(this,null,function*(){var i=n,{scheme:t}=i,r=H(i,["scheme"]);let s=this._getApiUrl(t,"/types"),o=[],a=yield this.axios(B(T({},r),{method:"get",url:s}));for(let u of a&&a.types||[])u.uri!="http://www.w3.org/2004/02/skos/core#Concept"&&(u.label&&(u.prefLabel={[a["@context"]["@language"]]:u.label},delete u.label),o.push(u));return o._url=s,o})}};ge(lt,"supports",{scheme:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,types:!0,suggest:!0,search:!0});lt.providerName="SkosmosApi";lt.providerType="http://bartoc.org/api-type/skosmos";var bi="http://id.loc.gov/authorities/",vi=[{uri:`${bi}subjects`,identifier:["http://bartoc.org/en/node/454"],notation:["LCSH"],concepts:[null],topConcepts:[]},{uri:`${bi}names`,identifier:["http://bartoc.org/en/node/18536"],notation:["LCNAF"],concepts:[null],topConcepts:[]}],tm=`${bi}classification`;function rm(e){let t={};t.uri=e["@id"],t.notation=(e["http://www.loc.gov/mads/rdf/v1#code"]||[]).map(i=>i["@value"]);let r=e["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]||e["http://www.w3.org/2000/01/rdf-schema#label"]||[];r.length&&(t.prefLabel={},t.prefLabel[r[0]["@language"]||"en"]=r[0]["@value"]);let n=e["http://www.w3.org/2004/02/skos/core#altLabel"]||[];n.length&&(t.altLabel={en:n.map(i=>i["@value"])});for(let i of e["http://www.w3.org/2000/01/rdf-schema#comment"]||[])t.definition=t.definition||{},t.definition.en=t.definition.en||[],t.definition.en.push(i["@value"]);return t}function r3(e){let t=rm(e);return t.namespace=t.uri+"/",t.type=["http://www.w3.org/2004/02/skos/core#ConceptScheme"],t}var To=e=>t=>!t||!e||!e.namespace?!0:t.uri.startsWith(e.namespace);function n3(e,{scheme:t}){let r=rm(e);r.type=["http://www.w3.org/2004/02/skos/core#Concept"],r.inScheme=t?[t]:(e["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSScheme"]||[]).map(s=>vi.find(o=>o.uri===s["@id"])),(!r.inScheme.length||!r.inScheme[0])&&delete r.inScheme;let n=e["http://www.loc.gov/mads/rdf/v1#hasNarrowerAuthority"]||q.compare(r.inScheme[0],{uri:tm})&&e["http://www.loc.gov/mads/rdf/v1#hasMADSCollectionMember"]||[];r.narrower=n.map(s=>({uri:s["@id"]})).filter(To(r.inScheme&&r.inScheme[0]));let i=e["http://www.loc.gov/mads/rdf/v1#hasBroaderAuthority"]||q.compare(r.inScheme[0],{uri:tm})&&e["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSCollection"]||[];return r.broader=i.map(s=>({uri:s["@id"]})).filter(To(r.inScheme&&r.inScheme[0])),r}var ct=class extends Q{static _registryConfigForBartocApiConfig({scheme:t}={}){return!t||!vi.find(r=>q.compare(r,t))?null:{schemes:[t]}}getSchemes(){return P(this,null,function*(){let t=[];for(let r of yield Promise.all(vi.filter(n=>!this.schemes||!this.schemes.length||this.schemes.find(i=>q.compare(n,i))).map(n=>xe({method:"get",url:`${n.uri.replace("http:","https:")}.json`}).then(({status:i,data:s})=>{if(i===200){let o=s.find(a=>n.uri===a["@id"]);if(o)return o=q.merge(r3(o),n),o.topConcepts=(o.topConcepts||[]).filter(a=>a),o}return null}))))r&&t.push(r);return t})}getConcepts(r){return P(this,arguments,function*({concepts:t}){Array.isArray(t)||(t=[t]);let n=[];for(let i of yield Promise.all(t.map(s=>xe({method:"get",url:`${s.uri.replace("http:","https:")}.json`}).then(({status:o,data:a})=>{if(o===200){let u=a.find(l=>s.uri===l["@id"]);return u?n3(u,{scheme:s.inScheme&&s.inScheme[0]}):null}}))))i&&n.push(i);return n})}suggest(t){return P(this,null,function*(){let r=yield this.search(t);return[t.search,r.map(n=>q.prefLabel(n,{fallbackToUri:!0})),[],r.map(n=>n.uri)]})}search(s){return P(this,arguments,function*({search:t,scheme:r,limit:n,offset:i}){let o=q.getAllUris(r).find(u=>u.startsWith(bi));if(!o||!vi.find(u=>q.compare(u,{uri:o})))throw new U({parameter:"scheme",message:"provided scheme is not supported (yet)"});if(!t)throw new U({parameter:"search",message:"parameter is empty or missing"});n=n||this._jskos.suggestResultLimit||100,i=i||0;let{data:a}=yield xe({method:"get",url:`${o}/suggest2`.replace("http:","https:"),params:{q:t,count:n||100,offset:i,searchtype:"keyword"}});return(a.hits||[]).map(u=>({uri:u.uri,notation:[u.token],prefLabel:{en:u.aLabel},inScheme:[r]})).filter(To(r))})}};ge(ct,"supports",{schemes:!0,top:!1,data:!0,concepts:!0,narrower:!1,ancestors:!1,suggest:!0,search:!0});ct.providerName="LocApi";ct.providerType="http://bartoc.org/api-type/loc";var mm={};var W;function Ie(e,t,r){let n=typeof r,i=typeof e;if(n!=="undefined"){if(i!=="undefined"){if(r){if(i==="function"&&n===i)return function(a){return e(r(a))};if(t=e.constructor,t===r.constructor){if(t===Array)return r.concat(e);if(t===Map){var s=new Map(r);for(var o of e)s.set(o[0],o[1]);return s}if(t===Set){o=new Set(r);for(s of e.values())o.add(s);return o}}}return e}return r}return i==="undefined"?t:e}function wr(e,t){return typeof e=="undefined"?t:e}function ye(){return Object.create(null)}function Ke(e){return typeof e=="string"}function wn(e){return typeof e=="object"}function vn(e,t){if(Ke(t))e=e[t];else for(let r=0;e&&r<t.length;r++)e=e[t[r]];return e}var i3=/[^\p{L}\p{N}]+/u,s3=/(\d{3})/g,o3=/(\D)(\d{3})/g,a3=/(\d{3})(\D)/g,nm=/[\u0300-\u036f]/g;function xr(e={}){if(!this||this.constructor!==xr)return new xr(...arguments);if(arguments.length)for(e=0;e<arguments.length;e++)this.assign(arguments[e]);else this.assign(e)}W=xr.prototype;W.assign=function(e){this.normalize=Ie(e.normalize,!0,this.normalize);let t=e.include,r=t||e.exclude||e.split,n;if(r||r===""){if(typeof r=="object"&&r.constructor!==RegExp){let i="";n=!t,t||(i+="\\p{Z}"),r.letter&&(i+="\\p{L}"),r.number&&(i+="\\p{N}",n=!!t),r.symbol&&(i+="\\p{S}"),r.punctuation&&(i+="\\p{P}"),r.control&&(i+="\\p{C}"),(r=r.char)&&(i+=typeof r=="object"?r.join(""):r);try{this.split=new RegExp("["+(t?"^":"")+i+"]+","u")}catch(s){this.split=/\s+/}}else this.split=r,n=r===!1||"a1a".split(r).length<2;this.numeric=Ie(e.numeric,n)}else{try{this.split=Ie(this.split,i3)}catch(i){this.split=/\s+/}this.numeric=Ie(e.numeric,Ie(this.numeric,!0))}if(this.prepare=Ie(e.prepare,null,this.prepare),this.finalize=Ie(e.finalize,null,this.finalize),r=e.filter,this.filter=typeof r=="function"?r:Ie(r&&new Set(r),null,this.filter),this.dedupe=Ie(e.dedupe,!0,this.dedupe),this.matcher=Ie((r=e.matcher)&&new Map(r),null,this.matcher),this.mapper=Ie((r=e.mapper)&&new Map(r),null,this.mapper),this.stemmer=Ie((r=e.stemmer)&&new Map(r),null,this.stemmer),this.replacer=Ie(e.replacer,null,this.replacer),this.minlength=Ie(e.minlength,1,this.minlength),this.maxlength=Ie(e.maxlength,1024,this.maxlength),this.rtl=Ie(e.rtl,!1,this.rtl),(this.cache=r=Ie(e.cache,!0,this.cache))&&(this.F=null,this.L=typeof r=="number"?r:2e5,this.B=new Map,this.D=new Map,this.I=this.H=128),this.h="",this.J=null,this.A="",this.K=null,this.matcher)for(let i of this.matcher.keys())this.h+=(this.h?"|":"")+i;if(this.stemmer)for(let i of this.stemmer.keys())this.A+=(this.A?"|":"")+i;return this};W.addStemmer=function(e,t){return this.stemmer||(this.stemmer=new Map),this.stemmer.set(e,t),this.A+=(this.A?"|":"")+e,this.K=null,this.cache&&Bt(this),this};W.addFilter=function(e){return typeof e=="function"?this.filter=e:(this.filter||(this.filter=new Set),this.filter.add(e)),this.cache&&Bt(this),this};W.addMapper=function(e,t){return typeof e=="object"?this.addReplacer(e,t):e.length>1?this.addMatcher(e,t):(this.mapper||(this.mapper=new Map),this.mapper.set(e,t),this.cache&&Bt(this),this)};W.addMatcher=function(e,t){return typeof e=="object"?this.addReplacer(e,t):e.length<2&&(this.dedupe||this.mapper)?this.addMapper(e,t):(this.matcher||(this.matcher=new Map),this.matcher.set(e,t),this.h+=(this.h?"|":"")+e,this.J=null,this.cache&&Bt(this),this)};W.addReplacer=function(e,t){return typeof e=="string"?this.addMatcher(e,t):(this.replacer||(this.replacer=[]),this.replacer.push(e,t),this.cache&&Bt(this),this)};W.encode=function(e,t){if(this.cache&&e.length<=this.H)if(this.F){if(this.B.has(e))return this.B.get(e)}else this.F=setTimeout(Bt,50,this);this.normalize&&(typeof this.normalize=="function"?e=this.normalize(e):e=nm?e.normalize("NFKD").replace(nm,"").toLowerCase():e.toLowerCase()),this.prepare&&(e=this.prepare(e)),this.numeric&&e.length>3&&(e=e.replace(o3,"$1 $2").replace(a3,"$1 $2").replace(s3,"$1 "));let r=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer),n=[],i=ye(),s,o,a=this.split||this.split===""?e.split(this.split):[e];for(let l=0,c,h;l<a.length;l++)if((c=h=a[l])&&!(c.length<this.minlength||c.length>this.maxlength)){if(t){if(i[c])continue;i[c]=1}else{if(s===c)continue;s=c}if(r)n.push(c);else if(!this.filter||(typeof this.filter=="function"?this.filter(c):!this.filter.has(c))){if(this.cache&&c.length<=this.I)if(this.F){var u=this.D.get(c);if(u||u===""){u&&n.push(u);continue}}else this.F=setTimeout(Bt,50,this);if(this.stemmer){this.K||(this.K=new RegExp("(?!^)("+this.A+")$"));let d;for(;d!==c&&c.length>2;)d=c,c=c.replace(this.K,m=>this.stemmer.get(m))}if(c&&(this.mapper||this.dedupe&&c.length>1)){u="";for(let d=0,m="",f,g;d<c.length;d++)f=c.charAt(d),f===m&&this.dedupe||((g=this.mapper&&this.mapper.get(f))||g===""?g===m&&this.dedupe||!(m=g)||(u+=g):u+=m=f);c=u}if(this.matcher&&c.length>1&&(this.J||(this.J=new RegExp("("+this.h+")","g")),c=c.replace(this.J,d=>this.matcher.get(d))),c&&this.replacer)for(u=0;c&&u<this.replacer.length;u+=2)c=c.replace(this.replacer[u],this.replacer[u+1]);if(this.cache&&h.length<=this.I&&(this.D.set(h,c),this.D.size>this.L&&(this.D.clear(),this.I=this.I/1.1|0)),c){if(c!==h)if(t){if(i[c])continue;i[c]=1}else{if(o===c)continue;o=c}n.push(c)}}}return this.finalize&&(n=this.finalize(n)||n),this.cache&&e.length<=this.H&&(this.B.set(e,n),this.B.size>this.L&&(this.B.clear(),this.H=this.H/1.1|0)),n};function Bt(e){e.F=null,e.B.clear(),e.D.clear()}function Lo(e,t,r){r||(t||typeof e!="object"?typeof t=="object"&&(r=t,t=0):r=e),r&&(e=r.query||e,t=r.limit||t);let n=""+(t||0);r&&(n+=(r.offset||0)+!!r.context+!!r.suggest+(r.resolve!==!1)+(r.resolution||this.resolution)+(r.boost||0)),e=(""+e).toLowerCase(),this.cache||(this.cache=new zt);let i=this.cache.get(e+n);if(!i){let s=r&&r.cache;s&&(r.cache=!1),i=this.search(e,t,r),s&&(r.cache=s),this.cache.set(e+n,i)}return i}function zt(e){this.limit=e&&e!==!0?e:1e3,this.cache=new Map,this.h=""}zt.prototype.set=function(e,t){this.cache.set(this.h=e,t),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)};zt.prototype.get=function(e){let t=this.cache.get(e);return t&&this.h!==e&&(this.cache.delete(e),this.cache.set(this.h=e,t)),t};zt.prototype.remove=function(e){for(let t of this.cache){let r=t[0];t[1].includes(e)&&this.cache.delete(r)}};zt.prototype.clear=function(){this.cache.clear(),this.h=""};var im={normalize:!1,numeric:!1,dedupe:!1},_i={},Po=new Map([["b","p"],["v","f"],["w","f"],["z","s"],["x","s"],["d","t"],["n","m"],["c","k"],["g","k"],["j","k"],["q","k"],["i","e"],["y","e"],["u","o"]]),sm=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),om=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\1+/g,"$1"],am={a:"",e:"",i:"",o:"",u:"",y:"",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,\u00DF:2,d:3,t:3,l:4,m:5,n:5,r:6},No={Exact:im,Default:_i,Normalize:_i,LatinBalance:{mapper:Po},LatinAdvanced:{mapper:Po,matcher:sm,replacer:om},LatinExtra:{mapper:Po,replacer:om.concat([/(?!^)[aeo]/g,""]),matcher:sm},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(e){for(let r=0;r<e.length;r++){var t=e[r];let n=t.charAt(0),i=am[n];for(let s=1,o;s<t.length&&(o=t.charAt(s),o==="h"||o==="w"||!(o=am[o])||o===i||(n+=o,i=o,n.length!==4));s++);e[r]=n}}},CJK:{split:""},LatinExact:im,LatinDefault:_i,LatinSimple:_i};function um(e,t,r,n){let i=[];for(let s=0,o;s<e.index.length;s++)if(o=e.index[s],t>=o.length)t-=o.length;else{t=o[n?"splice":"slice"](t,r);let a=t.length;if(a&&(i=i.length?i.concat(t):t,r-=a,n&&(e.length-=a),!r))break;t=0}return i}function Sr(e){if(!this||this.constructor!==Sr)return new Sr(e);this.index=e?[e]:[],this.length=e?e.length:0;let t=this;return new Proxy([],{get(r,n){if(n==="length")return t.length;if(n==="push")return function(i){t.index[t.index.length-1].push(i),t.length++};if(n==="pop")return function(){if(t.length)return t.length--,t.index[t.index.length-1].pop()};if(n==="indexOf")return function(i){let s=0;for(let o=0,a,u;o<t.index.length;o++){if(a=t.index[o],u=a.indexOf(i),u>=0)return s+u;s+=a.length}return-1};if(n==="includes")return function(i){for(let s=0;s<t.index.length;s++)if(t.index[s].includes(i))return!0;return!1};if(n==="slice")return function(i,s){return um(t,i||0,s||t.length,!1)};if(n==="splice")return function(i,s){return um(t,i||0,s||t.length,!0)};if(n==="constructor")return Array;if(typeof n!="symbol")return(r=t.index[n/bt(2,31)|0])&&r[n]},set(r,n,i){return r=n/bt(2,31)|0,(t.index[r]||(t.index[r]=[]))[n]=i,t.length++,!0}})}Sr.prototype.clear=function(){this.index.length=0};Sr.prototype.push=function(){};function Ve(e=8){if(!this||this.constructor!==Ve)return new Ve(e);this.index=ye(),this.h=[],this.size=0,e>32?(this.B=ym,this.A=BigInt(e)):(this.B=gm,this.A=e)}Ve.prototype.get=function(e){let t=this.index[this.B(e)];return t&&t.get(e)};Ve.prototype.set=function(e,t){var r=this.B(e);let n=this.index[r];n?(r=n.size,n.set(e,t),(r-=n.size)&&this.size++):(this.index[r]=n=new Map([[e,t]]),this.h.push(n),this.size++)};function Ge(e=8){if(!this||this.constructor!==Ge)return new Ge(e);this.index=ye(),this.h=[],this.size=0,e>32?(this.B=ym,this.A=BigInt(e)):(this.B=gm,this.A=e)}Ge.prototype.add=function(e){var t=this.B(e);let r=this.index[t];r?(t=r.size,r.add(e),(t-=r.size)&&this.size++):(this.index[t]=r=new Set([e]),this.h.push(r),this.size++)};W=Ve.prototype;W.has=Ge.prototype.has=function(e){let t=this.index[this.B(e)];return t&&t.has(e)};W.delete=Ge.prototype.delete=function(e){let t=this.index[this.B(e)];t&&t.delete(e)&&this.size--};W.clear=Ge.prototype.clear=function(){this.index=ye(),this.h=[],this.size=0};W.values=Ge.prototype.values=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].values())yield t};W.keys=Ge.prototype.keys=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].keys())yield t};W.entries=Ge.prototype.entries=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].entries())yield t};function gm(e){let t=bt(2,this.A)-1;if(typeof e=="number")return e&t;let r=0,n=this.A+1;for(let i=0;i<e.length;i++)r=(r*n^e.charCodeAt(i))&t;return this.A===32?r+bt(2,31):r}function ym(e){let t=bt(BigInt(2),this.A)-BigInt(1);var r=typeof e;if(r==="bigint")return e&t;if(r==="number")return BigInt(e)&t;r=BigInt(0);let n=this.A+BigInt(1);for(let i=0;i<e.length;i++)r=(r*n^BigInt(e.charCodeAt(i)))&t;return r}var vr,yn;function u3(e){return P(this,null,function*(){e=e.data;var t=e.task;let r=e.id,n=e.args;if(t==="init")yn=e.options||{},(t=e.factory)?(Function("return "+t)()(self),vr=new self.FlexSearch.Index(yn),delete self.FlexSearch):vr=new Je(yn),postMessage({id:r});else{let i;t==="export"&&(n[1]?(n[0]=yn.export,n[2]=0,n[3]=1):n=null),t==="import"?n[0]&&(e=yield yn.import.call(vr,n[0]),vr.import(n[0],e)):((i=n&&vr[t].apply(vr,n))&&i.then&&(i=yield i),i&&i.await&&(i=yield i.await),t==="search"&&i.result&&(i=i.result)),postMessage(t==="search"?{id:r,msg:i}:{id:r})}})}function jo(e){br.call(e,"add"),br.call(e,"append"),br.call(e,"search"),br.call(e,"update"),br.call(e,"remove"),br.call(e,"searchCache")}var qo,lm,Ai;function l3(){qo=Ai=0}function br(e){this[e+"Async"]=function(){let t=arguments;var r=t[t.length-1];let n;if(typeof r=="function"&&(n=r,delete t[t.length-1]),qo?Ai||(Ai=Date.now()-lm>=this.priority*this.priority*3):(qo=setTimeout(l3,0),lm=Date.now()),Ai){let s=this;return new Promise(o=>{setTimeout(function(){o(s[e+"Async"].apply(s,t))},0)})}let i=this[e].apply(this,t);return r=i.then?i:new Promise(s=>s(i)),n&&r.then(n),r}}var Ot=0;function Ut(e={},t){function r(a){function u(l){l=l.data||l;let c=l.id,h=c&&s.h[c];h&&(h(l.msg),delete s.h[c])}if(this.worker=a,this.h=ye(),this.worker)return i?this.worker.on("message",u):this.worker.onmessage=u,e.config?new Promise(function(l){Ot>1e9&&(Ot=0),s.h[++Ot]=function(){l(s)},s.worker.postMessage({id:Ot,task:"init",factory:n,options:e})}):(this.priority=e.priority||4,this.encoder=t||null,this.worker.postMessage({task:"init",factory:n,options:e}),this)}if(!this||this.constructor!==Ut)return new Ut(e);let n=typeof self!="undefined"?self._factory:typeof window!="undefined"?window._factory:null;n&&(n=n.toString());let i=typeof window=="undefined",s=this,o=c3(n,i,e.worker);return o.then?o.then(function(a){return r.call(s,a)}):r.call(this,o)}Tt("add");Tt("append");Tt("search");Tt("update");Tt("remove");Tt("clear");Tt("export");Tt("import");Ut.prototype.searchCache=Lo;jo(Ut.prototype);function Tt(e){Ut.prototype[e]=function(){let t=this,r=[].slice.call(arguments);var n=r[r.length-1];let i;return typeof n=="function"&&(i=n,r.pop()),n=new Promise(function(s){e==="export"&&typeof r[0]=="function"&&(r[0]=null),Ot>1e9&&(Ot=0),t.h[++Ot]=s,t.worker.postMessage({task:e,id:Ot,args:r})}),i?(n.then(i),this):n}}function c3(e,t,r){return t?typeof module!="undefined"?new(Io()).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>Ce(Io(),1)).then(function(n){return new n.Worker(mm.dirname+"/node/node.mjs")}):e?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+u3.toString()],{type:"text/javascript"}))):new window.Worker(typeof r=="string"?r:mm.url.replace("/worker.js","/worker/worker.js").replace("flexsearch.bundle.module.min.js","module/worker/worker.js").replace("flexsearch.bundle.module.min.mjs","module/worker/worker.js"),{type:"module"})}$t.prototype.add=function(e,t,r){if(wn(e)&&(t=e,e=vn(t,this.key)),t&&(e||e===0)){if(!r&&this.reg.has(e))return this.update(e,t);for(let a=0,u;a<this.field.length;a++){u=this.B[a];var n=this.index.get(this.field[a]);if(typeof u=="function"){var i=u(t);i&&n.add(e,i,r,!0)}else i=u.G,(!i||i(t))&&(u.constructor===String?u=[""+u]:Ke(u)&&(u=[u]),Do(t,u,this.D,0,n,e,u[0],r))}if(this.tag)for(n=0;n<this.A.length;n++){var s=this.A[n];i=this.tag.get(this.F[n]);let a=ye();if(typeof s=="function"){if(s=s(t),!s)continue}else{var o=s.G;if(o&&!o(t))continue;s.constructor===String&&(s=""+s),s=vn(t,s)}if(i&&s){Ke(s)&&(s=[s]);for(let u=0,l,c;u<s.length;u++)if(l=s[u],!a[l]&&(a[l]=1,(o=i.get(l))?c=o:i.set(l,c=[]),!r||!c.includes(e))){if(c.length===bt(2,31)-1){if(o=new Sr(c),this.fastupdate)for(let h of this.reg.values())h.includes(c)&&(h[h.indexOf(c)]=o);i.set(l,c=o)}c.push(e),this.fastupdate&&((o=this.reg.get(e))?o.push(c):this.reg.set(e,[c]))}}}if(this.store&&(!r||!this.store.has(e))){let a;if(this.h){a=ye();for(let u=0,l;u<this.h.length;u++){if(l=this.h[u],(r=l.G)&&!r(t))continue;let c;if(typeof l=="function"){if(c=l(t),!c)continue;l=[l.O]}else if(Ke(l)||l.constructor===String){a[l]=t[l];continue}Mo(t,a,l,0,l[0],c)}}this.store.set(e,a||t)}this.worker&&(this.fastupdate||this.reg.add(e))}return this};function Mo(e,t,r,n,i,s){if(e=e[i],n===r.length-1)t[i]=s||e;else if(e)if(e.constructor===Array)for(t=t[i]=Array(e.length),i=0;i<e.length;i++)Mo(e,t,r,n,i);else t=t[i]||(t[i]=ye()),i=r[++n],Mo(e,t,r,n,i)}function Do(e,t,r,n,i,s,o,a){if(e=e[o])if(n===t.length-1){if(e.constructor===Array){if(r[n]){for(t=0;t<e.length;t++)i.add(s,e[t],!0,!0);return}e=e.join(" ")}i.add(s,e,a,!0)}else if(e.constructor===Array)for(o=0;o<e.length;o++)Do(e,t,r,n,i,s,o,a);else o=t[++n],Do(e,t,r,n,i,s,o,a)}function Fo(e,t,r,n){if(!e.length)return e;if(e.length===1)return e=e[0],e=r||e.length>t?e.slice(r,r+t):e,n?_r.call(this,e):e;let i=[];for(let s=0,o,a;s<e.length;s++)if((o=e[s])&&(a=o.length)){if(r){if(r>=a){r-=a;continue}o=o.slice(r,r+t),a=o.length,r=0}if(a>t&&(o=o.slice(0,t),a=t),!i.length&&a>=t)return n?_r.call(this,o):o;if(i.push(o),t-=a,!t)break}return i=i.length>1?[].concat.apply([],i):i[0],n?_r.call(this,i):i}function Ri(e,t,r,n){var i=n[0];if(i[0]&&i[0].query)return e[t].apply(e,i);if(!(t!=="and"&&t!=="not"||e.result.length||e.await||i.suggest))return n.length>1&&(i=n[n.length-1]),(n=i.resolve)?e.await||e.result:e;let s=[],o=0,a=0,u,l,c,h,d;for(t=0;t<n.length;t++)if(i=n[t]){var m=void 0;if(i.constructor===ce)m=i.await||i.result;else if(i.then||i.constructor===Array)m=i;else{o=i.limit||0,a=i.offset||0,c=i.suggest,l=i.resolve,u=((h=i.highlight||e.highlight)||i.enrich)&&l,m=i.queue;let f=i.async||m,g=i.index,w=i.query;if(g?e.index||(e.index=g):g=e.index,w||i.tag){let C=i.field||i.pluck;if(C&&(!w||e.query&&!h||(e.query=w,e.field=C,e.highlight=h),g=g.index.get(C)),m&&(d||e.await)){d=1;let I,O=e.C.length,L=new Promise(function(N){I=N});(function(N,S){L.h=function(){S.index=null,S.resolve=!1;let M=f?N.searchAsync(S):N.search(S);return M.then?M.then(function(D){return e.C[O]=D=D.result||D,I(D),D}):(M=M.result||M,I(M),M)}})(g,Object.assign({},i)),e.C.push(L),s[t]=L;continue}else i.resolve=!1,i.index=null,m=f?g.searchAsync(i):g.search(i),i.resolve=l,i.index=g}else if(i.and)m=xi(i,"and",g);else if(i.or)m=xi(i,"or",g);else if(i.not)m=xi(i,"not",g);else if(i.xor)m=xi(i,"xor",g);else continue}m.await?(d=1,m=m.await):m.then?(d=1,m=m.then(function(f){return f.result||f})):m=m.result||m,s[t]=m}if(d&&!e.await&&(e.await=new Promise(function(f){e.return=f})),d){let f=Promise.all(s).then(function(g){for(let w=0;w<e.C.length;w++)if(e.C[w]===f){e.C[w]=function(){return r.call(e,g,o,a,u,l,c,h)};break}Bo(e)});e.C.push(f)}else if(e.await)e.C.push(function(){return r.call(e,s,o,a,u,l,c,h)});else return r.call(e,s,o,a,u,l,c,h);return l?e.await||e.result:e}function xi(e,t,r){e=e[t];let n=e[0]||e;return n.index||(n.index=r),r=new ce(n),e.length>1&&(r=r[t].apply(r,e.slice(1))),r}ce.prototype.or=function(){return Ri(this,"or",f3,arguments)};function f3(e,t,r,n,i,s,o){return e.length&&(this.result.length&&e.push(this.result),e.length<2?this.result=e[0]:(this.result=wm(e,t,r,!1,this.h),r=0)),i&&(this.await=null),i?this.resolve(t,r,n,o):this}ce.prototype.and=function(){return Ri(this,"and",h3,arguments)};function h3(e,t,r,n,i,s,o){if(!s&&!this.result.length)return i?this.result:this;let a;if(e.length)if(this.result.length&&e.unshift(this.result),e.length<2)this.result=e[0];else{let u=0;for(let l=0,c,h;l<e.length;l++)if((c=e[l])&&(h=c.length))u<h&&(u=h);else if(!s){u=0;break}u?(this.result=Ci(e,u,t,r,s,this.h,i),a=!0):this.result=[]}else s||(this.result=e);return i&&(this.await=null),i?this.resolve(t,r,n,o,a):this}ce.prototype.xor=function(){return Ri(this,"xor",p3,arguments)};function p3(e,t,r,n,i,s,o){if(e.length)if(this.result.length&&e.unshift(this.result),e.length<2)this.result=e[0];else{e:{s=r;var a=this.h;let u=[],l=ye(),c=0;for(let h=0,d;h<e.length;h++)if(d=e[h]){c<d.length&&(c=d.length);for(let m=0,f;m<d.length;m++)if(f=d[m])for(let g=0,w;g<f.length;g++)w=f[g],l[w]=l[w]?2:1}for(let h=0,d,m=0;h<c;h++)for(let f=0,g;f<e.length;f++)if((g=e[f])&&(d=g[h])){for(let w=0,C;w<d.length;w++)if(C=d[w],l[C]===1)if(s)s--;else if(i){if(u.push(C),u.length===t){e=u;break e}}else{let I=h+(f?a:0);if(u[I]||(u[I]=[]),u[I].push(C),++m===t){e=u;break e}}}e=u}this.result=e,a=!0}else s||(this.result=e);return i&&(this.await=null),i?this.resolve(t,r,n,o,a):this}ce.prototype.not=function(){return Ri(this,"not",d3,arguments)};function d3(e,t,r,n,i,s,o){if(!s&&!this.result.length)return i?this.result:this;if(e.length&&this.result.length){e:{s=r;var a=[];e=new Set(e.flat().flat());for(let u=0,l,c=0;u<this.result.length;u++)if(l=this.result[u]){for(let h=0,d;h<l.length;h++)if(d=l[h],!e.has(d)){if(s)s--;else if(i){if(a.push(d),a.length===t){e=a;break e}}else if(a[u]||(a[u]=[]),a[u].push(d),++c===t){e=a;break e}}}e=a}this.result=e,a=!0}return i&&(this.await=null),i?this.resolve(t,r,n,o,a):this}function Ei(e,t,r,n,i){let s,o,a;typeof i=="string"?(s=i,i=""):s=i.template,o=s.indexOf("$1"),a=s.substring(o+2),o=s.substring(0,o);let u=i&&i.boundary,l=!i||i.clip!==!1,c=i&&i.merge&&a&&o&&new RegExp(a+" "+o,"g");i=i&&i.ellipsis;var h=0;if(typeof i=="object"){var d=i.template;h=d.length-2,i=i.pattern}typeof i!="string"&&(i=i===!1?"":"..."),h&&(i=d.replace("$1",i)),d=i.length-h;let m,f;typeof u=="object"&&(m=u.before,m===0&&(m=-1),f=u.after,f===0&&(f=-1),u=u.total||9e5),h=new Map;for(let Ye=0,pe,yt,nt;Ye<t.length;Ye++){let Pe;if(n)Pe=t,nt=n;else{var g=t[Ye];if(nt=g.field,!nt)continue;Pe=g.result}yt=r.get(nt),pe=yt.encoder,g=h.get(pe),typeof g!="string"&&(g=pe.encode(e),h.set(pe,g));for(let we=0;we<Pe.length;we++){var w=Pe[we].doc;if(!w||(w=vn(w,nt),!w))continue;var C=w.trim().split(/\s+/);if(!C.length)continue;w="";var I=[];let Ne=[];for(var O=-1,L=-1,N=0,S=0;S<C.length;S++){var M=C[S],D=pe.encode(M);D=D.length>1?D.join(" "):D[0];let V;if(D&&M){for(var z=M.length,X=(pe.split?M.replace(pe.split,""):M).length-D.length,J="",ee=0,te=0;te<g.length;te++){var ne=g[te];if(ne){var se=ne.length;se+=X<0?0:X,ee&&se<=ee||(ne=D.indexOf(ne),ne>-1&&(J=(ne?M.substring(0,ne):"")+o+M.substring(ne,ne+se)+a+(ne+se<z?M.substring(ne+se):""),ee=se,V=!0))}}J&&(u&&(O<0&&(O=w.length+(w?1:0)),L=w.length+(w?1:0)+J.length,N+=z,Ne.push(I.length),I.push({match:J})),w+=(w?" ":"")+J)}if(!V)M=C[S],w+=(w?" ":"")+M,u&&I.push({text:M});else if(u&&N>=u)break}if(N=Ne.length*(s.length-2),m||f||u&&w.length-N>u)if(N=u+N-d*2,S=L-O,m>0&&(S+=m),f>0&&(S+=f),S<=N)C=m?O-(m>0?m:0):O-((N-S)/2|0),I=f?L+(f>0?f:0):C+N,l||(C>0&&w.charAt(C)!==" "&&w.charAt(C-1)!==" "&&(C=w.indexOf(" ",C),C<0&&(C=0)),I<w.length&&w.charAt(I-1)!==" "&&w.charAt(I)!==" "&&(I=w.lastIndexOf(" ",I),I<L?I=L:++I)),w=(C?i:"")+w.substring(C,I)+(I<w.length?i:"");else{for(L=[],O={},N={},S={},M={},D={},J=X=z=0,te=ee=1;;){var ae=void 0;for(let V=0,ue;V<Ne.length;V++){if(ue=Ne[V],J)if(X!==J){if(S[V+1])continue;if(ue+=J,O[ue]){z-=d,N[V+1]=1,S[V+1]=1;continue}if(ue>=I.length-1){if(ue>=I.length){S[V+1]=1,ue>=C.length&&(N[V+1]=1);continue}z-=d}if(w=I[ue].text,se=f&&D[V])if(se>0){if(w.length>se)if(S[V+1]=1,l)w=w.substring(0,se);else continue;(se-=w.length)||(se=-1),D[V]=se}else{S[V+1]=1;continue}if(z+w.length+1<=u)w=" "+w,L[V]+=w;else if(l)ae=u-z-1,ae>0&&(w=" "+w.substring(0,ae),L[V]+=w),S[V+1]=1;else{S[V+1]=1;continue}}else{if(S[V])continue;if(ue-=X,O[ue]){z-=d,S[V]=1,N[V]=1;continue}if(ue<=0){if(ue<0){S[V]=1,N[V]=1;continue}z-=d}if(w=I[ue].text,se=m&&M[V])if(se>0){if(w.length>se)if(S[V]=1,l)w=w.substring(w.length-se);else continue;(se-=w.length)||(se=-1),M[V]=se}else{S[V]=1;continue}if(z+w.length+1<=u)w+=" ",L[V]=w+L[V];else if(l)ae=w.length+1-(u-z),ae>=0&&ae<w.length&&(w=w.substring(ae)+" ",L[V]=w+L[V]),S[V]=1;else{S[V]=1;continue}}else{w=I[ue].match,m&&(M[V]=m),f&&(D[V]=f),V&&z++;let Er;if(ue?!V&&d&&(z+=d):(N[V]=1,S[V]=1),ue>=C.length-1||ue<I.length-1&&I[ue+1].match?Er=1:d&&(z+=d),z-=s.length-2,!V||z+w.length<=u)L[V]=w;else{ae=ee=te=N[V]=0;break}Er&&(N[V+1]=1,S[V+1]=1)}z+=w.length,ae=O[ue]=1}if(ae)X===J?J++:X++;else{if(X===J?ee=0:te=0,!ee&&!te)break;ee?(X++,J=X):J++}}w="";for(let V=0,ue;V<L.length;V++)ue=(N[V]?V?" ":"":(V&&!i?" ":"")+i)+L[V],w+=ue;i&&!N[L.length]&&(w+=i)}c&&(w=w.replace(c," ")),Pe[we].highlight=w}if(n)break}return t}function ce(e,t){if(!this||this.constructor!==ce)return new ce(e,t);let r=0,n,i,s,o,a,u;if(e&&e.index){let l=e;if(t=l.index,r=l.boost||0,i=l.query){s=l.field||l.pluck,o=l.highlight;let c=l.resolve;e=l.async||l.queue,l.resolve=!1,l.index=null,e=e?t.searchAsync(l):t.search(l),l.resolve=c,l.index=t,e=e.result||e}else e=[]}if(e&&e.then){let l=this;e=e.then(function(c){l.C[0]=l.result=c.result||c,Bo(l)}),n=[e],e=[],a=new Promise(function(c){u=c})}this.index=t||null,this.result=e||[],this.h=r,this.C=n||[],this.await=a||null,this.return=u||null,this.highlight=o||null,this.query=i||"",this.field=s||""}W=ce.prototype;W.limit=function(e){if(this.await){let t=this;this.C.push(function(){return t.limit(e).result})}else if(this.result.length){let t=[];for(let r=0,n;r<this.result.length;r++)if(n=this.result[r])if(n.length<=e){if(t[r]=n,e-=n.length,!e)break}else{t[r]=n.slice(0,e);break}this.result=t}return this};W.offset=function(e){if(this.await){let t=this;this.C.push(function(){return t.offset(e).result})}else if(this.result.length){let t=[];for(let r=0,n;r<this.result.length;r++)(n=this.result[r])&&(n.length<=e?e-=n.length:(t[r]=n.slice(e),e=0));this.result=t}return this};W.boost=function(e){if(this.await){let t=this;this.C.push(function(){return t.boost(e).result})}else this.h+=e;return this};function Bo(e,t){let r=e.result;var n=e.await;e.await=null;for(let i=0,s;i<e.C.length;i++)if(s=e.C[i]){if(typeof s=="function")r=s(),e.C[i]=r=r.result||r,i--;else if(s.h)r=s.h(),e.C[i]=r=r.result||r,i--;else if(s.then)return e.await=n}return n=e.return,e.C=[],e.return=null,t||n(r),r}W.resolve=function(e,t,r,n,i){let s=this.await?Bo(this,!0):this.result;if(s.then){let o=this;return s.then(function(){return o.resolve(e,t,r,n,i)})}return s.length&&(typeof e=="object"?(n=e.highlight||this.highlight,r=!!n||e.enrich,t=e.offset,e=e.limit):(n=n||this.highlight,r=!!n||r),s=i?r?_r.call(this.index,s):s:Fo.call(this.index,s,e||100,t,r)),this.finalize(s,n)};W.finalize=function(e,t){if(e.then){let n=this;return e.then(function(i){return n.finalize(i,t)})}t&&e.length&&this.query&&(e=Ei(this.query,e,this.index.index,this.field,t));let r=this.return;return this.highlight=this.index=this.result=this.C=this.await=this.return=null,this.query=this.field="",r&&r(e),e};function Ci(e,t,r,n,i,s,o){let a=e.length,u=[],l,c;l=ye();for(let h=0,d,m,f,g;h<t;h++)for(let w=0;w<a;w++)if(f=e[w],h<f.length&&(d=f[h]))for(let C=0;C<d.length;C++){if(m=d[C],(c=l[m])?l[m]++:(c=0,l[m]=1),g=u[c]||(u[c]=[]),!o){let I=h+(w||!i?0:s||0);g=g[I]||(g[I]=[])}if(g.push(m),o&&r&&c===a-1&&g.length-n===r)return n?g.slice(n):g}if(e=u.length)if(i)u=u.length>1?wm(u,r,n,o,s):(u=u[0])&&r&&u.length>r||n?u.slice(n,r+n):u;else{if(e<a)return[];if(u=u[e-1],r||n)if(o)(u.length>r||n)&&(u=u.slice(n,r+n));else{i=[];for(let h=0,d;h<u.length;h++)if(d=u[h]){if(n&&d.length>n)n-=d.length;else if((r&&d.length>r||n)&&(d=d.slice(n,r+n),r-=d.length,n&&(n-=d.length)),i.push(d),!r)break}u=i}}return u}function wm(e,t,r,n,i){let s=[],o=ye(),a;var u=e.length;let l;if(n){for(i=u-1;i>=0;i--)if(l=(n=e[i])&&n.length){for(u=0;u<l;u++)if(a=n[u],!o[a]){if(o[a]=1,r)r--;else if(s.push(a),s.length===t)return s}}}else for(let c=u-1,h,d=0;c>=0;c--){h=e[c];for(let m=0;m<h.length;m++)if(l=(n=h[m])&&n.length){for(let f=0;f<l;f++)if(a=n[f],!o[a])if(o[a]=1,r)r--;else{let g=(m+(c<u-1&&i||0))/(c+1)|0;if((s[g]||(s[g]=[])).push(a),++d===t)return s}}}return s}function m3(e,t,r,n,i){let s=ye(),o=[];for(let a=0,u;a<t.length;a++){u=t[a];for(let l=0;l<u.length;l++)s[u[l]]=1}if(i){for(let a=0,u;a<e.length;a++)if(u=e[a],s[u]){if(n)n--;else if(o.push(u),s[u]=0,r&&--r===0)break}}else for(let a=0,u,l;a<e.result.length;a++)for(u=e.result[a],t=0;t<u.length;t++)l=u[t],s[l]&&((o[a]||(o[a]=[])).push(l),s[l]=0);return o}ye();$t.prototype.search=function(e,t,r,n){r||(!t&&wn(e)?(r=e,e=""):wn(t)&&(r=t,t=0));let i=[];var s=[];let o,a,u,l,c,h,d=0,m=!0,f;if(r){r.constructor===Array&&(r={index:r}),e=r.query||e,o=r.pluck,a=r.merge,l=r.boost,h=o||r.field||(h=r.index)&&(h.index?null:h);var g=this.tag&&r.tag;u=r.suggest,m=r.resolve!==!1,c=r.cache,f=m&&this.store&&r.highlight;var w=!!f||m&&this.store&&r.enrich;t=r.limit||t;var C=r.offset||0;if(t||(t=m?100:0),g&&(!this.db||!n)){g.constructor!==Array&&(g=[g]);var I=[];for(let M=0,D;M<g.length;M++)if(D=g[M],D.field&&D.tag){var O=D.tag;if(O.constructor===Array)for(var L=0;L<O.length;L++)I.push(D.field,O[L]);else I.push(D.field,O)}else{O=Object.keys(D);for(let z=0,X,J;z<O.length;z++)if(X=O[z],J=D[X],J.constructor===Array)for(L=0;L<J.length;L++)I.push(X,J[L]);else I.push(X,J)}if(g=I,!e){if(s=[],I.length)for(g=0;g<I.length;g+=2){if(this.db){if(n=this.index.get(I[g]),!n)continue;s.push(n=n.db.tag(I[g+1],t,C,w))}else n=g3.call(this,I[g],I[g+1],t,C,w);i.push(m?{field:I[g],tag:I[g+1],result:n}:[n])}if(s.length){let M=this;return Promise.all(s).then(function(D){for(let z=0;z<D.length;z++)m?i[z].result=D[z]:i[z]=D[z];return m?i:new ce(i.length>1?Ci(i,1,0,0,u,l):i[0],M)})}return m?i:new ce(i.length>1?Ci(i,1,0,0,u,l):i[0],this)}}m||o||!(h=h||this.field)||(Ke(h)?o=h:(h.constructor===Array&&h.length===1&&(h=h[0]),o=h.field||h.index)),h&&h.constructor!==Array&&(h=[h])}h||(h=this.field);let N;I=(this.worker||this.db)&&!n&&[];for(let M=0,D,z,X;M<h.length;M++){if(z=h[M],this.db&&this.tag&&!this.B[M])continue;let J;if(Ke(z)||(J=z,z=J.field,e=J.query||e,t=wr(J.limit,t),C=wr(J.offset,C),u=wr(J.suggest,u),f=m&&this.store&&wr(J.highlight,f),w=!!f||m&&this.store&&wr(J.enrich,w),c=wr(J.cache,c)),n)D=n[M];else{O=J||r||{},L=O.enrich;var S=this.index.get(z);if(g&&(this.db&&(O.tag=g,O.field=h,N=S.db.support_tag_search),!N&&L&&(O.enrich=!1),N||(O.limit=0,O.offset=0)),D=c?S.searchCache(e,g&&!N?0:t,O):S.search(e,g&&!N?0:t,O),g&&!N&&(O.limit=t,O.offset=C),L&&(O.enrich=L),I){I[M]=D;continue}}if(X=(D=D.result||D)&&D.length,g&&X){if(O=[],L=0,this.db&&n){if(!N)for(S=h.length;S<n.length;S++){let ee=n[S];if(ee&&ee.length)L++,O.push(ee);else if(!u)return m?i:new ce(i,this)}}else for(let ee=0,te,ne;ee<g.length;ee+=2){if(te=this.tag.get(g[ee]),!te){if(u)continue;return m?i:new ce(i,this)}if(ne=(te=te&&te.get(g[ee+1]))&&te.length)L++,O.push(te);else if(!u)return m?i:new ce(i,this)}if(L){if(D=m3(D,O,t,C,m),X=D.length,!X&&!u)return m?D:new ce(D,this);L--}}if(X)s[d]=z,i.push(D),d++;else if(h.length===1)return m?i:new ce(i,this)}if(I){if(this.db&&g&&g.length&&!N)for(w=0;w<g.length;w+=2){if(s=this.index.get(g[w]),!s){if(u)continue;return m?i:new ce(i,this)}I.push(s.db.tag(g[w+1],t,C,!1))}let M=this;return Promise.all(I).then(function(D){return r&&(r.resolve=m),D.length&&(D=M.search(e,t,r,D)),D})}if(!d)return m?i:new ce(i,this);if(o&&(!w||!this.store))return i=i[0],m?i:new ce(i,this);for(I=[],C=0;C<s.length;C++){if(g=i[C],w&&g.length&&typeof g[0].doc=="undefined"&&(this.db?I.push(g=this.index.get(this.field[0]).db.enrich(g)):g=_r.call(this,g)),o)return m?f?Ei(e,g,this.index,o,f):g:new ce(g,this);i[C]={field:s[C],result:g}}if(w&&this.db&&I.length){let M=this;return Promise.all(I).then(function(D){for(let z=0;z<D.length;z++)i[z].result=D[z];return f&&(i=Ei(e,i,M.index,o,f)),a?cm(i):i})}return f&&(i=Ei(e,i,this.index,o,f)),a?cm(i):i};function cm(e){let t=[],r=ye(),n=ye();for(let i=0,s,o,a,u,l,c,h;i<e.length;i++){s=e[i],o=s.field,a=s.result;for(let d=0;d<a.length;d++)l=a[d],typeof l!="object"?l={id:u=l}:u=l.id,(c=r[u])?c.push(o):(l.field=r[u]=[o],t.push(l)),(h=l.highlight)&&(c=n[u],c||(n[u]=c={},l.highlight=c),c[o]=h)}return t}function g3(e,t,r,n,i){return e=this.tag.get(e),e?(e=e.get(t),e?(t=e.length-n,t>0&&((r&&t>r||n)&&(e=e.slice(n,n+r)),i&&(e=_r.call(this,e))),e):[]):[]}function _r(e){if(!this||!this.store)return e;if(this.db)return this.index.get(this.field[0]).db.enrich(e);let t=Array(e.length);for(let r=0,n;r<e.length;r++)n=e[r],t[r]={id:n,doc:this.store.get(n)};return t}function $t(e){if(!this||this.constructor!==$t)return new $t(e);let t=e.document||e.doc||e,r,n;if(this.B=[],this.field=[],this.D=[],this.key=(r=t.key||t.id)&&Oi(r,this.D)||"id",(n=e.keystore||0)&&(this.keystore=n),this.fastupdate=!!e.fastupdate,this.reg=!this.fastupdate||e.worker||e.db?n?new Ge(n):new Set:n?new Ve(n):new Map,this.h=(r=t.store||null)&&r&&r!==!0&&[],this.store=r?n?new Ve(n):new Map:null,this.cache=(r=e.cache||null)&&new zt(r),e.cache=!1,this.worker=e.worker||!1,this.priority=e.priority||4,this.index=y3.call(this,e,t),this.tag=null,(r=t.tag)&&(typeof r=="string"&&(r=[r]),r.length)){this.tag=new Map,this.A=[],this.F=[];for(let i=0,s,o;i<r.length;i++){if(s=r[i],o=s.field||s,!o)throw Error("The tag field from the document descriptor is undefined.");s.custom?this.A[i]=s.custom:(this.A[i]=Oi(o,this.D),s.filter&&(typeof this.A[i]=="string"&&(this.A[i]=new String(this.A[i])),this.A[i].G=s.filter)),this.F[i]=o,this.tag.set(o,new Map)}}if(this.worker){this.fastupdate=!1,e=[];for(let i of this.index.values())i.then&&e.push(i);if(e.length){let i=this;return Promise.all(e).then(function(s){let o=0;for(let a of i.index.entries()){let u=a[0],l=a[1];l.then&&(l=s[o],i.index.set(u,l),o++)}return i})}}else e.db&&(this.fastupdate=!1,this.mount(e.db))}W=$t.prototype;W.mount=function(e){let t=this.field;if(this.tag)for(let s=0,o;s<this.F.length;s++){o=this.F[s];var r=void 0;this.index.set(o,r=new Je({},this.reg)),t===this.field&&(t=t.slice(0)),t.push(o),r.tag=this.tag.get(o)}r=[];let n={db:e.db,type:e.type,fastupdate:e.fastupdate};for(let s=0,o,a;s<t.length;s++){n.field=a=t[s],o=this.index.get(a);let u=new e.constructor(e.id,n);u.id=e.id,r[s]=u.mount(o),o.document=!0,s?o.bypass=!0:o.store=this.store}let i=this;return this.db=Promise.all(r).then(function(){i.db=!0})};W.commit=function(){return P(this,null,function*(){let e=[];for(let t of this.index.values())e.push(t.commit());yield Promise.all(e),this.reg.clear()})};W.destroy=function(){let e=[];for(let t of this.index.values())e.push(t.destroy());return Promise.all(e)};function y3(e,t){let r=new Map,n=t.index||t.field||t;Ke(n)&&(n=[n]);for(let s=0,o,a;s<n.length;s++){if(o=n[s],Ke(o)||(a=o,o=o.field),a=wn(a)?Object.assign({},e,a):e,this.worker){var i=void 0;i=(i=a.encoder)&&i.encode?i:new xr(typeof i=="string"?No[i]:i||{}),i=new Ut(a,i),r.set(o,i)}this.worker||r.set(o,new Je(a,this.reg)),a.custom?this.B[s]=a.custom:(this.B[s]=Oi(o,this.D),a.filter&&(typeof this.B[s]=="string"&&(this.B[s]=new String(this.B[s])),this.B[s].G=a.filter)),this.field[s]=o}if(this.h){e=t.store,Ke(e)&&(e=[e]);for(let s=0,o,a;s<e.length;s++)o=e[s],a=o.field||o,o.custom?(this.h[s]=o.custom,o.custom.O=a):(this.h[s]=Oi(a,this.D),o.filter&&(typeof this.h[s]=="string"&&(this.h[s]=new String(this.h[s])),this.h[s].G=o.filter))}return r}function Oi(e,t){let r=e.split(":"),n=0;for(let i=0;i<r.length;i++)e=r[i],e[e.length-1]==="]"&&(e=e.substring(0,e.length-2))&&(t[n]=!0),e&&(r[n++]=e);return n<r.length&&(r.length=n),n>1?r:r[0]}W.append=function(e,t){return this.add(e,t,!0)};W.update=function(e,t){return this.remove(e).add(e,t)};W.remove=function(e){wn(e)&&(e=vn(e,this.key));for(var t of this.index.values())t.remove(e,!0);if(this.reg.has(e)){if(this.tag&&!this.fastupdate)for(let r of this.tag.values())for(let n of r){t=n[0];let i=n[1],s=i.indexOf(e);s>-1&&(i.length>1?i.splice(s,1):r.delete(t))}this.store&&this.store.delete(e),this.reg.delete(e)}return this.cache&&this.cache.remove(e),this};W.clear=function(){let e=[];for(let t of this.index.values()){let r=t.clear();r.then&&e.push(r)}if(this.tag)for(let t of this.tag.values())t.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),e.length?Promise.all(e):this};W.contain=function(e){return this.db?this.index.get(this.field[0]).db.has(e):this.reg.has(e)};W.cleanup=function(){for(let e of this.index.values())e.cleanup();return this};W.get=function(e){return this.db?this.index.get(this.field[0]).db.enrich(e).then(function(t){return t[0]&&t[0].doc||null}):this.store.get(e)||null};W.set=function(e,t){return typeof e=="object"&&(t=e,e=vn(t,this.key)),this.store.set(e,t),this};W.searchCache=Lo;W.export=w3;W.import=v3;jo($t.prototype);function Uo(e,t=0){let r=[],n=[];t&&(t=25e4/t*5e3|0);for(let i of e.entries())n.push(i),n.length===t&&(r.push(n),n=[]);return n.length&&r.push(n),r}function $o(e,t){t||(t=new Map);for(let r=0,n;r<e.length;r++)n=e[r],t.set(n[0],n[1]);return t}function vm(e,t=0){let r=[],n=[];t&&(t=25e4/t*1e3|0);for(let i of e.entries())n.push([i[0],Uo(i[1])[0]||[]]),n.length===t&&(r.push(n),n=[]);return n.length&&r.push(n),r}function bm(e,t){t||(t=new Map);for(let r=0,n,i;r<e.length;r++)n=e[r],i=t.get(n[0]),t.set(n[0],$o(n[1],i));return t}function _m(e){let t=[],r=[];for(let n of e.keys())r.push(n),r.length===25e4&&(t.push(r),r=[]);return r.length&&t.push(r),t}function xm(e,t){t||(t=new Set);for(let r=0;r<e.length;r++)t.add(e[r]);return t}function Ti(e,t,r,n,i,s,o=0){let a=n&&n.constructor===Array;var u=a?n.shift():n;if(!u)return this.export(e,t,i,s+1);if((u=e((t?t+".":"")+(o+1)+"."+r,JSON.stringify(u)))&&u.then){let l=this;return u.then(function(){return Ti.call(l,e,t,r,a?n:null,i,s,o+1)})}return Ti.call(this,e,t,r,a?n:null,i,s,o+1)}function w3(e,t,r=0,n=0){if(r<this.field.length){let o=this.field[r];if((t=this.index.get(o).export(e,o,r,n=1))&&t.then){let a=this;return t.then(function(){return a.export(e,o,r+1)})}return this.export(e,o,r+1)}let i,s;switch(n){case 0:i="reg",s=_m(this.reg),t=null;break;case 1:i="tag",s=this.tag&&vm(this.tag,this.reg.size),t=null;break;case 2:i="doc",s=this.store&&Uo(this.store),t=null;break;default:return}return Ti.call(this,e,t,i,s||null,r,n)}function v3(e,t){var r=e.split(".");r[r.length-1]==="json"&&r.pop();let n=r.length>2?r[0]:"";if(r=r.length>2?r[2]:r[1],this.worker&&n)return this.index.get(n).import(e);if(t){if(typeof t=="string"&&(t=JSON.parse(t)),n)return this.index.get(n).import(r,t);switch(r){case"reg":this.fastupdate=!1,this.reg=xm(t,this.reg);for(let i=0,s;i<this.field.length;i++)s=this.index.get(this.field[i]),s.fastupdate=!1,s.reg=this.reg;if(this.worker){t=[];for(let i of this.index.values())t.push(i.import(e));return Promise.all(t)}break;case"tag":this.tag=bm(t,this.tag);break;case"doc":this.store=$o(t,this.store)}}}function fm(e,t){let r="";for(let n of e.entries()){e=n[0];let i=n[1],s="";for(let o=0,a;o<i.length;o++){a=i[o]||[""];let u="";for(let l=0;l<a.length;l++)u+=(u?",":"")+(t==="string"?'"'+a[l]+'"':a[l]);u="["+u+"]",s+=(s?",":"")+u}s='["'+e+'",['+s+"]]",r+=(r?",":"")+s}return r}Je.prototype.remove=function(e,t){let r=this.reg.size&&(this.fastupdate?this.reg.get(e):this.reg.has(e));if(r){if(this.fastupdate){for(let n=0,i,s;n<r.length;n++)if((i=r[n])&&(s=i.length))if(i[s-1]===e)i.pop();else{let o=i.indexOf(e);o>=0&&i.splice(o,1)}}else bn(this.map,e),this.depth&&bn(this.ctx,e);t||this.reg.delete(e)}return this.db&&(this.commit_task.push({del:e}),this.M&&Sm(this)),this.cache&&this.cache.remove(e),this};function bn(e,t){let r=0;var n=typeof t=="undefined";if(e.constructor===Array){for(let i=0,s,o,a;i<e.length;i++)if((s=e[i])&&s.length){if(n)return 1;if(o=s.indexOf(t),o>=0){if(s.length>1)return s.splice(o,1),1;if(delete e[i],r)return 1;a=1}else{if(a)return 1;r++}}}else for(let i of e.entries())n=i[0],bn(i[1],t)?r++:e.delete(n);return r}var b3={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};Je.prototype.add=function(e,t,r,n){if(t&&(e||e===0)){if(!n&&!r&&this.reg.has(e))return this.update(e,t);n=this.depth,t=this.encoder.encode(t,!n);let l=t.length;if(l){let c=ye(),h=ye(),d=this.resolution;for(let m=0;m<l;m++){let f=t[this.rtl?l-1-m:m];var i=f.length;if(i&&(n||!h[f])){var s=this.score?this.score(t,f,m,null,0):Si(d,l,m),o="";switch(this.tokenize){case"tolerant":if(ft(this,h,f,s,e,r),i>2){for(let g=1,w,C,I,O;g<i-1;g++)w=f.charAt(g),C=f.charAt(g+1),I=f.substring(0,g)+C,O=f.substring(g+2),o=I+w+O,ft(this,h,o,s,e,r),o=I+O,ft(this,h,o,s,e,r);ft(this,h,f.substring(0,f.length-1),s,e,r)}break;case"full":if(i>2){for(let g=0,w;g<i;g++)for(s=i;s>g;s--){o=f.substring(g,s),w=this.rtl?i-1-g:g;var a=this.score?this.score(t,f,m,o,w):Si(d,l,m,i,w);ft(this,h,o,a,e,r)}break}case"bidirectional":case"reverse":if(i>1){for(a=i-1;a>0;a--){o=f[this.rtl?i-1-a:a]+o;var u=this.score?this.score(t,f,m,o,a):Si(d,l,m,i,a);ft(this,h,o,u,e,r)}o=""}case"forward":if(i>1){for(a=0;a<i;a++)o+=f[this.rtl?i-1-a:a],ft(this,h,o,s,e,r);break}default:if(ft(this,h,f,s,e,r),n&&l>1&&m<l-1)for(i=this.N,o=f,s=Math.min(n+1,this.rtl?m+1:l-m),a=1;a<s;a++){f=t[this.rtl?l-1-m-a:m+a],u=this.bidirectional&&f>o;let g=this.score?this.score(t,o,m,f,a-1):Si(i+(l/2>i?0:1),l,m,s-1,a-1);ft(this,c,u?o:f,g,e,r,u?f:o)}}}}this.fastupdate||this.reg.add(e)}}return this.db&&(this.commit_task.push(r?{ins:e}:{del:e}),this.M&&Sm(this)),this};function ft(e,t,r,n,i,s,o){let a,u;if(!(a=t[r])||o&&!a[o]){if(o?(t=a||(t[r]=ye()),t[o]=1,u=e.ctx,(a=u.get(o))?u=a:u.set(o,u=e.keystore?new Ve(e.keystore):new Map)):(u=e.map,t[r]=1),(a=u.get(r))?u=a:u.set(r,u=a=[]),s){for(let l=0,c;l<a.length;l++)if((c=a[l])&&c.includes(i)){if(l<=n)return;c.splice(c.indexOf(i),1),e.fastupdate&&(t=e.reg.get(i))&&t.splice(t.indexOf(c),1);break}}if(u=u[n]||(u[n]=[]),u.push(i),u.length===bt(2,31)-1){if(t=new Sr(u),e.fastupdate)for(let l of e.reg.values())l.includes(u)&&(l[l.indexOf(u)]=t);a[n]=u=t}e.fastupdate&&((n=e.reg.get(i))?n.push(u):e.reg.set(i,[u]))}}function Si(e,t,r,n,i){return r&&e>1?t+(n||0)<=e?r+(i||0):(e-1)/(t+(n||0))*(r+(i||0))+1|0:0}Je.prototype.search=function(e,t,r){if(r||(t||typeof e!="object"?typeof t=="object"&&(r=t,t=0):(r=e,e="")),r&&r.cache)return r.cache=!1,e=this.searchCache(e,t,r),r.cache=!0,e;let n=[],i,s,o,a=0,u,l,c,h,d;r&&(e=r.query||e,t=r.limit||t,a=r.offset||0,s=r.context,o=r.suggest,d=(u=r.resolve)&&r.enrich,c=r.boost,h=r.resolution,l=this.db&&r.tag),typeof u=="undefined"&&(u=this.resolve),s=this.depth&&s!==!1;let m=this.encoder.encode(e,!s);if(i=m.length,t=t||(u?100:0),i===1)return pm.call(this,m[0],"",t,a,u,d,l);if(i===2&&s&&!o)return pm.call(this,m[1],m[0],t,a,u,d,l);let f=ye(),g=0,w;if(s&&(w=m[0],g=1),h||h===0||(h=w?this.N:this.resolution),this.db){if(this.db.search&&(r=this.db.search(this,m,t,a,o,u,d,l),r!==!1))return r;let C=this;return(function(){return P(this,null,function*(){for(let I,O;g<i;g++){if((O=m[g])&&!f[O]){if(f[O]=1,I=yield ko(C,O,w,0,0,!1,!1),I=dm(I,n,o,h)){n=I;break}w&&(o&&I&&n.length||(w=O))}o&&w&&g===i-1&&!n.length&&(h=C.resolution,w="",g=-1,f=ye())}return hm(n,h,t,a,o,c,u)})})()}for(let C,I;g<i;g++){if((I=m[g])&&!f[I]){if(f[I]=1,C=ko(this,I,w,0,0,!1,!1),C=dm(C,n,o,h)){n=C;break}w&&(o&&C&&n.length||(w=I))}o&&w&&g===i-1&&!n.length&&(h=this.resolution,w="",g=-1,f=ye())}return hm(n,h,t,a,o,c,u)};function hm(e,t,r,n,i,s,o){let a=e.length,u=e;if(a>1)u=Ci(e,t,r,n,i,s,o);else if(a===1)return o?Fo.call(null,e[0],r,n):new ce(e[0],this);return o?u:new ce(u,this)}function pm(e,t,r,n,i,s,o){return e=ko(this,e,t,r,n,i,s,o),this.db?e.then(function(a){return i?a||[]:new ce(a,this)}):e&&e.length?i?Fo.call(this,e,r,n):new ce(e,this):i?[]:new ce([],this)}function dm(e,t,r,n){let i=[];if(e&&e.length){if(e.length<=n){t.push(e);return}for(let s=0,o;s<n;s++)(o=e[s])&&(i[s]=o);if(i.length){t.push(i);return}}if(!r)return i}function ko(e,t,r,n,i,s,o,a){let u;return r&&(u=e.bidirectional&&t>r)&&(u=r,r=t,t=u),e.db?e.db.get(t,r,n,i,s,o,a):(e=r?(e=e.ctx.get(r))&&e.get(t):e.map.get(t),e)}function Je(e,t){if(!this||this.constructor!==Je)return new Je(e);if(e){var r=Ke(e)?e:e.preset;r&&(e=Object.assign({},b3[r],e))}else e={};r=e.context;let n=r===!0?{depth:1}:r||{},i=Ke(e.encoder)?No[e.encoder]:e.encode||e.encoder||{};this.encoder=i.encode?i:typeof i=="object"?new xr(i):{encode:i},this.resolution=e.resolution||9,this.tokenize=r=(r=e.tokenize)&&r!=="default"&&r!=="exact"&&r||"strict",this.depth=r==="strict"&&n.depth||0,this.bidirectional=n.bidirectional!==!1,this.fastupdate=!!e.fastupdate,this.score=e.score||null,(r=e.keystore||0)&&(this.keystore=r),this.map=r?new Ve(r):new Map,this.ctx=r?new Ve(r):new Map,this.reg=t||(this.fastupdate?r?new Ve(r):new Map:r?new Ge(r):new Set),this.N=n.resolution||3,this.rtl=i.rtl||e.rtl||!1,this.cache=(r=e.cache||null)&&new zt(r),this.resolve=e.resolve!==!1,(r=e.db)&&(this.db=this.mount(r)),this.M=e.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=e.priority||4}W=Je.prototype;W.mount=function(e){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),e.mount(this)};W.commit=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this)};W.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function Sm(e){e.commit_timer||(e.commit_timer=setTimeout(function(){e.commit_timer=null,e.db.commit(e)},1))}W.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db?(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[],this.db.clear()):this};W.append=function(e,t){return this.add(e,t,!0)};W.contain=function(e){return this.db?this.db.has(e):this.reg.has(e)};W.update=function(e,t){let r=this,n=this.remove(e);return n&&n.then?n.then(()=>r.add(e,t)):this.add(e,t)};W.cleanup=function(){return this.fastupdate?(bn(this.map),this.depth&&bn(this.ctx),this):this};W.searchCache=Lo;W.export=function(e,t,r=0,n=0){let i,s;switch(n){case 0:i="reg",s=_m(this.reg);break;case 1:i="cfg",s=null;break;case 2:i="map",s=Uo(this.map,this.reg.size);break;case 3:i="ctx",s=vm(this.ctx,this.reg.size);break;default:return}return Ti.call(this,e,t,i,s,r,n)};W.import=function(e,t){if(t)switch(typeof t=="string"&&(t=JSON.parse(t)),e=e.split("."),e[e.length-1]==="json"&&e.pop(),e.length===3&&e.shift(),e=e.length>1?e[1]:e[0],e){case"reg":this.fastupdate=!1,this.reg=xm(t,this.reg);break;case"map":this.map=$o(t,this.map);break;case"ctx":this.ctx=bm(t,this.ctx)}};W.serialize=function(e=!0){let t="",r="",n="";if(this.reg.size){let s;for(var i of this.reg.keys())s||(s=typeof i),t+=(t?",":"")+(s==="string"?'"'+i+'"':i);t="index.reg=new Set(["+t+"]);",r=fm(this.map,s),r="index.map=new Map(["+r+"]);";for(let o of this.ctx.entries()){i=o[0];let a=fm(o[1],s);a="new Map(["+a+"])",a='["'+i+'",'+a+"]",n+=(n?",":"")+a}n="index.ctx=new Map(["+n+"]);"}return e?"function inject(index){"+t+r+n+"}":t+r+n};jo(Je.prototype);var Am=typeof window!="undefined"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Ii=["map","ctx","tag","reg","cfg"],Ft=ye();function Pi(e,t={}){if(!this||this.constructor!==Pi)return new Pi(e,t);typeof e=="object"&&(t=e,e=e.name),e||console.info("Default storage space was used, because a name was not passed."),this.id="flexsearch"+(e?":"+e.toLowerCase().replace(/[^a-z0-9_\-]/g,""):""),this.field=t.field?t.field.toLowerCase().replace(/[^a-z0-9_\-]/g,""):"",this.type=t.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}W=Pi.prototype;W.mount=function(e){return e.index?e.mount(this):(e.db=this,this.open())};W.open=function(){if(this.db)return this.db;let e=this;navigator.storage&&navigator.storage.persist&&navigator.storage.persist(),Ft[e.id]||(Ft[e.id]=[]),Ft[e.id].push(e.field);let t=Am.open(e.id,1);return t.onupgradeneeded=function(){let r=e.db=this.result;for(let n=0,i;n<Ii.length;n++){i=Ii[n];for(let s=0,o;s<Ft[e.id].length;s++)o=Ft[e.id][s],r.objectStoreNames.contains(i+(i!=="reg"&&o?":"+o:""))||r.createObjectStore(i+(i!=="reg"&&o?":"+o:""))}},e.db=It(t,function(r){e.db=r,e.db.onversionchange=function(){e.close()}})};W.close=function(){this.db&&this.db.close(),this.db=null};W.destroy=function(){let e=Am.deleteDatabase(this.id);return It(e)};W.clear=function(){let e=[];for(let r=0,n;r<Ii.length;r++){n=Ii[r];for(let i=0,s;i<Ft[this.id].length;i++)s=Ft[this.id][i],e.push(n+(n!=="reg"&&s?":"+s:""))}let t=this.db.transaction(e,"readwrite");for(let r=0;r<e.length;r++)t.objectStore(e[r]).clear();return It(t)};W.get=function(e,t,r=0,n=0,i=!0,s=!1){e=this.db.transaction((t?"ctx":"map")+(this.field?":"+this.field:""),"readonly").objectStore((t?"ctx":"map")+(this.field?":"+this.field:"")).get(t?t+":"+e:e);let o=this;return It(e).then(function(a){let u=[];if(!a||!a.length)return u;if(i){if(!r&&!n&&a.length===1)return a[0];for(let l=0,c;l<a.length;l++)if((c=a[l])&&c.length){if(n>=c.length){n-=c.length;continue}let h=r?n+Math.min(c.length-n,r):c.length;for(let d=n;d<h;d++)u.push(c[d]);if(n=0,u.length===r)break}return s?o.enrich(u):u}return a})};W.tag=function(e,t=0,r=0,n=!1){e=this.db.transaction("tag"+(this.field?":"+this.field:""),"readonly").objectStore("tag"+(this.field?":"+this.field:"")).get(e);let i=this;return It(e).then(function(s){return!s||!s.length||r>=s.length?[]:!t&&!r?s:(s=s.slice(r,r+t),n?i.enrich(s):s)})};W.enrich=function(e){typeof e!="object"&&(e=[e]);let t=this.db.transaction("reg","readonly").objectStore("reg"),r=[];for(let n=0;n<e.length;n++)r[n]=It(t.get(e[n]));return Promise.all(r).then(function(n){for(let i=0;i<n.length;i++)n[i]={id:e[i],doc:n[i]?JSON.parse(n[i]):null};return n})};W.has=function(e){return e=this.db.transaction("reg","readonly").objectStore("reg").getKey(e),It(e).then(function(t){return!!t})};W.search=null;W.info=function(){};W.transaction=function(e,t,r){e+=e!=="reg"&&this.field?":"+this.field:"";let n=this.h[e+":"+t];if(n)return r.call(this,n);let i=this.db.transaction(e,t);this.h[e+":"+t]=n=i.objectStore(e);let s=r.call(this,n);return this.h[e+":"+t]=null,It(i).finally(function(){return s})};W.commit=function(e){return P(this,null,function*(){let t=e.commit_task,r=[];e.commit_task=[];for(let n=0,i;n<t.length;n++)i=t[n],i.del&&r.push(i.del);r.length&&(yield this.remove(r)),e.reg.size&&(yield this.transaction("map","readwrite",function(n){for(let i of e.map){let s=i[0],o=i[1];o.length&&(n.get(s).onsuccess=function(){let a=this.result;var u;if(a&&a.length){let l=Math.max(a.length,o.length);for(let c=0,h,d;c<l;c++)if((d=o[c])&&d.length){if((h=a[c])&&h.length)for(u=0;u<d.length;u++)h.push(d[u]);else a[c]=d;u=1}}else a=o,u=1;u&&n.put(a,s)})}}),yield this.transaction("ctx","readwrite",function(n){for(let i of e.ctx){let s=i[0],o=i[1];for(let a of o){let u=a[0],l=a[1];l.length&&(n.get(s+":"+u).onsuccess=function(){let c=this.result;var h;if(c&&c.length){let d=Math.max(c.length,l.length);for(let m=0,f,g;m<d;m++)if((g=l[m])&&g.length){if((f=c[m])&&f.length)for(h=0;h<g.length;h++)f.push(g[h]);else c[m]=g;h=1}}else c=l,h=1;h&&n.put(c,s+":"+u)})}}}),e.store?yield this.transaction("reg","readwrite",function(n){for(let i of e.store){let s=i[0],o=i[1];n.put(typeof o=="object"?JSON.stringify(o):1,s)}}):e.bypass||(yield this.transaction("reg","readwrite",function(n){for(let i of e.reg.keys())n.put(1,i)})),e.tag&&(yield this.transaction("tag","readwrite",function(n){for(let i of e.tag){let s=i[0],o=i[1];o.length&&(n.get(s).onsuccess=function(){let a=this.result;a=a&&a.length?a.concat(o):o,n.put(a,s)})}})),e.map.clear(),e.ctx.clear(),e.tag&&e.tag.clear(),e.store&&e.store.clear(),e.document||e.reg.clear())})};function Ro(e,t,r){let n=e.value,i,s=0;for(let o=0,a;o<n.length;o++){if(a=r?n:n[o]){for(let u=0,l,c;u<t.length;u++)if(c=t[u],l=a.indexOf(c),l>=0)if(i=1,a.length>1)a.splice(l,1);else{n[o]=[];break}s+=a.length}if(r)break}s?i&&e.update(n):e.delete(),e.continue()}W.remove=function(e){return typeof e!="object"&&(e=[e]),Promise.all([this.transaction("map","readwrite",function(t){t.openCursor().onsuccess=function(){let r=this.result;r&&Ro(r,e)}}),this.transaction("ctx","readwrite",function(t){t.openCursor().onsuccess=function(){let r=this.result;r&&Ro(r,e)}}),this.transaction("tag","readwrite",function(t){t.openCursor().onsuccess=function(){let r=this.result;r&&Ro(r,e,!0)}}),this.transaction("reg","readwrite",function(t){for(let r=0;r<e.length;r++)t.delete(e[r])})])};function It(e,t){return new Promise((r,n)=>{e.onsuccess=e.oncomplete=function(){t&&t(this.result),t=null,r(this.result)},e.onerror=e.onblocked=n,e=null})}var qi={Index:Je,Charset:No,Encoder:xr,Document:$t,Worker:Ut,Resolver:ce,IndexedDB:Pi,Language:{}};function Mi(e){return e.replace(/\\u[\dA-F]{4}/gi,function(t){return String.fromCharCode(parseInt(t.replace(/\\u/g,""),16))})}var Ht={},ht=class extends Q{_prepare(){Ht[this.uri]={index:{},conceptCache:{},schemeCache:{}}}get _index(){return Ht[this.uri]&&Ht[this.uri].index}get _conceptCache(){return Ht[this.uri]&&Ht[this.uri].conceptCache}get _schemeCache(){return Ht[this.uri]&&Ht[this.uri].schemeCache}static _registryConfigForBartocApiConfig({url:t,scheme:r}={}){return!t||!r?null:{schemes:[{uri:t,identifier:q.getAllUris(r).filter(i=>i!==t)}]}}_loadScheme(n){return P(this,null,function*(){var i=n,{scheme:t}=i,r=H(i,["scheme"]);let s=q.getAllUris(t);for(let f of s)if(this._schemeCache[f])return this._schemeCache[f];let o=this.schemes.find(f=>q.compare(f,t));if(!o||!o.uri)throw new Xe({message:`Tried to load unsupported scheme (${t&&t.uri})`});let a=o.uri;s=At.default(s.concat(q.getAllUris(o)));let u=".json";a.endsWith("/")&&(u="index.json");let l=yield this.axios(B(T({},r),{url:`${a}${u}`,_skipAdditionalParameters:!0}));if(l.id!==a)throw new Xe({message:"Skohub URL did not return expected concept scheme"});let{title:c,preferredNamespaceUri:h,hasTopConcept:d,description:m}=l;t={uri:a,identifier:s.filter(f=>f!==a)},t.prefLabel=c,Object.keys(t.prefLabel||{}).forEach(f=>{t.prefLabel[f]=Mi(t.prefLabel[f])}),t.namespace=h,t.topConcepts=(d||[]).map(f=>this._toJskosConcept(f)),t.concepts=[null],m&&(t.definition=m,Object.keys(t.definition).forEach(f=>{t.definition[f]=[Mi(t.definition[f])]}));for(let f of Object.keys(t).filter(g=>!t[g]))delete t[f];for(let f of s)this._schemeCache[f]=t;return t})}_loadConcept(n){return P(this,null,function*(){var i=n,{uri:t}=i,r=H(i,["uri"]);if(this._conceptCache[t])return this._conceptCache[t];try{let s=yield this.axios(B(T({},r),{url:`${t}.json`,_skipAdditionalParameters:!0}));if(s.id!==t)throw new Xe({message:"Skohub URL did not return expected concept URI"});let o=this._toJskosConcept(s);return this._conceptCache[t]=o,o}catch(s){return null}})}_toJskosConcept(t){let r={uri:t.id};return r.prefLabel=t.prefLabel,Object.keys(r.prefLabel||{}).forEach(n=>{r.prefLabel[n]=Mi(r.prefLabel[n])}),r.narrower=(t.narrower||[]).map(n=>this._toJskosConcept(n)),r.notation=t.notation||[],t.broader&&t.broader.id&&(r.broader=[{uri:t.broader.id}]),t.inScheme&&t.inScheme.id&&(r.inScheme=[{uri:t.inScheme.id}]),t.scopeNote&&(r.scopeNote=t.scopeNote,Object.keys(r.scopeNote).forEach(n=>{r.scopeNote[n]=[Mi(r.scopeNote[n])]})),r}getSchemes(){return P(this,arguments,function*(r={}){var t=H(r,[]);return Promise.all(this.schemes.map(n=>this._loadScheme(B(T({},t),{scheme:n}))))})}getTop(n){return P(this,null,function*(){var i=n,{scheme:t}=i,r=H(i,["scheme"]);if(!t||!t.uri)throw new U({parameter:"scheme",message:"Missing scheme URI"});return t=yield this._loadScheme(T({scheme:t},r)),t.topConcepts||[]})}getConcepts(n){return P(this,null,function*(){var i=n,{concepts:t}=i,r=H(i,["concepts"]);return Ee.default(t)||(t=[t]),(yield Promise.all(t.map(({uri:s})=>this._loadConcept(B(T({},r),{uri:s}))))).filter(Boolean)})}getAncestors(n){return P(this,null,function*(){var i=n,{concept:t}=i,r=H(i,["concept"]);if(!t||!t.uri)throw new U({parameter:"concept"});if(t.ancestors&&t.ancestors[0]!==null)return t.ancestors;if(t=yield this._loadConcept(B(T({},r),{uri:t.uri})),!t||!t.broader||!t.broader.length)return[];let s=t.broader[0];return[s].concat(yield this.getAncestors(T({concept:s},r))).map(o=>({uri:o.uri}))})}getNarrower(n){return P(this,null,function*(){var i=n,{concept:t}=i,r=H(i,["concept"]);if(!t||!t.uri)throw new U({parameter:"concept"});return t.narrower&&t.narrower[0]!==null||(t=yield this._loadConcept(B(T({},r),{uri:t.uri}))),t.narrower})}search(i){return P(this,arguments,function*({search:t,scheme:r,limit:n=100}){if(r=yield this._loadScheme({scheme:r}),!r||!r.uri)throw new U({parameter:"scheme"});if(!t)throw new U({parameter:"search"});let s;this._index[r.uri]||(this._index[r.uri]={});for(let u of[""].concat(this.languages)){if(this._index[r.uri][u]){s=this._index[r.uri][u];break}if(this._index[r.uri][u]!==null)try{let l=u?`.${u}.index`:".index";r.uri.endsWith("/")&&(l=`index${l}`);let c=yield this.axios({url:`${r.uri}${l}`,_skipAdditionalParameters:!0});if(c.length<100){this._index[r.uri][u]=null;continue}s=qi.create(),s.import(c),this._index[r.uri][u]=s;break}catch(l){this._index[r.uri][u]=null}}if(!s)throw new Xe({message:"Could not find search index for any of the available languages "+this.languages.join(",")});let o=s.search(t);return(yield this.getConcepts({concepts:o.map(u=>({uri:u}))})).slice(0,n)})}suggest(t){return P(this,null,function*(){t._raw=!0;let r=yield this.search(t),n=[t.search,[],[],[]];for(let i of r){let s=q.notation(i),o=q.prefLabel(i);n[1].push((s?s+" ":"")+o),n[2].push(""),n[3].push(i.uri)}return r._totalCount!=null?n._totalCount=r._totalCount:n._totalCount=r.length,n})}};ge(ht,"supports",{schemes:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,suggest:!0,search:!0});ht.providerName="Skohub";ht.providerType="http://bartoc.org/api-type/skohub";var Em="https://lobid.org/gnd/",pt={uri:"http://bartoc.org/en/node/430",concepts:[null],topConcepts:[],type:["http://www.w3.org/2004/02/skos/core#ConceptScheme"],DISPLAY:{hideNotation:!0},identifier:["http://www.wikidata.org/entity/Q36578"],license:[{uri:"http://creativecommons.org/publicdomain/zero/1.0/"}],namespace:"https://d-nb.info/gnd/",notation:["GND"],notationPattern:"[0-9X-]+",prefLabel:{de:"Gemeinsame Normdatei",en:"Integrated Authority File"},types:[{uri:"https://d-nb.info/standards/elementset/gnd#DifferentiatedPerson",prefLabel:{de:"Person",en:"Person"}},{uri:"https://d-nb.info/standards/elementset/gnd#PlaceOrGeographicName",prefLabel:{de:"Geografikum",en:"Place"}},{uri:"https://d-nb.info/standards/elementset/gnd#CorporateBody",prefLabel:{de:"Organisation",en:"Organization"}},{uri:"https://d-nb.info/standards/elementset/gnd#SubjectHeading",prefLabel:{de:"Sachbegriff",en:"Subject"}},{uri:"https://d-nb.info/standards/elementset/gnd#Work",prefLabel:{de:"Werk",en:"Work"}},{uri:"https://d-nb.info/standards/elementset/gnd#ConferenceOrEvent",prefLabel:{de:"Konferenz oder Veranstaltung",en:"ConferenceOrEvent"}}]},Wo=new q.ConceptScheme({uri:"https://d-nb.info/standards/elementset/gnd",namespace:"https://d-nb.info/standards/elementset/gnd#"});pt.types.forEach(e=>{e.notation=[Wo.notationFromUri(e.uri)]});var _3=new q.ConceptScheme(pt),Om=["broaderTerm","broaderTermGeneral","broaderTermGeneric","broaderTermInstantial","broaderTermPartitive"],Cm={sameAs:"http://www.w3.org/2004/02/skos/core#exactMatch",exactMatch:"http://www.w3.org/2004/02/skos/core#exactMatch",closeMatch:"http://www.w3.org/2004/02/skos/core#closeMatch",relatedDdcWithDegreeOfDeterminacy1:"http://www.w3.org/2004/02/skos/core#narrowMatch",relatedDdcWithDegreeOfDeterminacy2:"http://www.w3.org/2004/02/skos/core#narrowMatch",relatedDdcWithDegreeOfDeterminacy3:"http://www.w3.org/2004/02/skos/core#closeMatch",relatedDdcWithDegreeOfDeterminacy4:"http://www.w3.org/2004/02/skos/core#exactMatch"},x3=[{uri:"http://bartoc.org/en/node/241",uriPattern:"http://dewey.info/class/(.+)/"},{uri:"http://bartoc.org/en/node/18",namespace:"https://data.bnf.fr/ark:/12148/"},{uri:"http://bartoc.org/en/node/20450",namespace:"https://datos.bne.es/resource/"},{uri:"http://bartoc.org/en/node/1940",namespace:"http://www.wikidata.org/entity/"},{uri:"http://bartoc.org/en/node/294",namespace:"http://lod.gesis.org/thesoz/"},{uri:"http://bartoc.org/en/node/20425",namespace:"http://uri.gbv.de/terminology/tpro/"},{uri:"http://bartoc.org/en/node/2053",namespace:"http://viaf.org/viaf/"},{uri:"http://bartoc.org/en/node/305",uriPattern:"http?://aims.fao.org/aos/agrovoc/(.+)"},{uri:"http://bartoc.org/en/node/391",uriPattern:"http?://id.nlm.nih.gov/mesh/(.+)"},{uri:"http://bartoc.org/en/node/313",uriPattern:"http?://zbw.eu/stw/descriptor/(.+)"},{uri:"http://bartoc.org/en/node/443",uriPattern:"https?://purl.org/bncf/tid/(.+)"},{uri:"http://bartoc.org/en/node/454",uriPattern:"http?://id.loc.gov/authorities/subjects/(.+)"},{uri:"http://bartoc.org/en/node/18536",uriPattern:"http?://id.loc.gov/authorities/names/(.+)"}].map(e=>new q.ConceptScheme(e));function zo(e){var n,i;let t={uri:e.id,notation:[e.gndIdentifier],prefLabel:{de:e.preferredName},inScheme:[{uri:pt.uri}]};e.variantName&&(t.altLabel={de:e.variantName}),(n=e.usingInstructions)!=null&&n.length&&(t.scopeNote={de:e.usingInstructions}),t.type=e.type.map(s=>Wo.uriFromNotation(s)).filter(Boolean),t.broader=[],Om.forEach(s=>{t.broader=t.broader.concat(e[s]||[])}),t.broader=t.broader.map(s=>({uri:s.id})),t.uri&&(t.identifier=[t.uri.replace("https://","http://")]);let r=[];for(let s of Object.keys(Cm)){let o=Cm[s];(i=e[s])!=null&&i.length&&(r=r.concat(e[s].map(a=>{let u=x3.find(c=>c.notationFromUri(a.id)),l=u==null?void 0:u.conceptFromUri(a.id);return!u||!l?null:(u.uri==="http://bartoc.org/en/node/241"&&(l.uri+="e23/"),{from:{memberSet:[{uri:t.uri,notation:t.notation}]},fromScheme:{uri:pt.uri},to:{memberSet:[l]},toScheme:{uri:u.uri},type:[o]})}).filter(Boolean)))}return r.length&&(t.mappings=r),t}function Ho(e){return e&&e.startsWith("http://")?e.replace("http://","https://"):e}var dt=class extends Q{_setup(){this._api.api||(this._api.api=Em)}static _registryConfigForBartocApiConfig({url:t,scheme:r}={}){return!t||!r||!q.compare(r,pt)||t!=="https://lobid.org/gnd/api"?null:{api:Em,schemes:[pt]}}getSchemes(){return P(this,null,function*(){return[pt]})}getTop(){return P(this,null,function*(){return[]})}getConcepts(r){return P(this,arguments,function*({concepts:t}){if(!t)throw new i.InvalidOrMissingParameterError({parameter:"concepts"});Array.isArray(t)||(t=[t]);let n=t.map(o=>{var a,u;return(a=o==null?void 0:o.notation)!=null&&a[0]?(u=o==null?void 0:o.notation)==null?void 0:u[0]:_3.notationFromUri(Ho(o==null?void 0:o.uri))}).filter(Boolean),i=[],s=yield Promise.all(n.map(o=>P(this,null,function*(){try{let a=yield xe.get(`${this._api.api}${o}.json`);return zo(a.data)}catch(a){i.push(a)}})));if(i.length===t.length)throw i[0];return s.filter(Boolean)})}getNarrower(i){return P(this,arguments,function*({concept:t,limit:r=200,offset:n=0}){if(!t||!t.uri)throw new U({parameter:"concept"});let s=Ho(t.uri),o=Om.map(u=>`${u}.id:"${s}"`).join(" OR ");return(yield xe.get(`${this._api.api}search`,{params:{q:o,format:"json",size:r,from:n}})).data.member.map(u=>zo(u))})}suggest(t){return P(this,null,function*(){let r=yield this._search(B(T({},t),{format:"json:suggest"}));return[t.search,r.map(n=>n.label),[],r.map(n=>n.id)]})}search(t){return P(this,null,function*(){return(yield this._search(t)).member.map(n=>zo(n))})}_search(o){return P(this,arguments,function*({search:t,types:r,limit:n=100,offset:i=0,format:s="json"}){if(!t)throw new U({parameter:"search"});let a="";return r=(r==null?void 0:r.map(l=>Wo.notationFromUri(Ho(l))).filter(Boolean))||[],r.length&&(a=r.map(l=>`type:${l}`).join(" OR ")),(yield xe.get(`${this._api.api}search`,{params:{q:t,filter:a,format:s,size:n,from:i}})).data})}getTypes(r){return P(this,arguments,function*({scheme:t}){if(!t||!q.compare(t,pt))throw new U({parameter:"search",message:t!=null&&t.uri?`scheme ${t==null?void 0:t.uri} not supported`:""});return pt.types})}};ge(dt,"supports",{schemes:!0,data:!0,concepts:!0,narrower:!0,suggest:!0,search:!0,types:!0});dt.providerName="LobidApi";dt.providerType="http://bartoc.org/api-type/lobid-gnd";var De={},mt=class extends Q{_setup(){this._scheme=null}static _registryConfigForBartocApiConfig({url:t,scheme:r}={}){return!t||!r?null:{api:t}}_schemeInfoToJSKOS(t){let r=t.labels.find(s=>s.lang==="x-uri").text,n={};t.labels.filter(s=>!s.lang.startsWith("x-")).forEach(s=>{n[s.lang]=s.text});let i={uri:r,prefLabel:n};return t.categories&&t.categories.length&&(i.topConcepts=[null]),t.category&&t.category.length&&(i.concepts=[null]),i}_categoryToJSKOS(t,{scheme:r,broader:n=[]}){if(!t||!r)return null;let i=t.ID,s=`${r.uri}/${i}`;if(De[r.uri].concepts[s])return De[r.uri].concepts[s];let o={};t.labels.filter(u=>!u.lang.startsWith("x-")&&u.text).forEach(u=>{o[u.lang]=u.text.replace(`${i} `,""),De[r.uri].searchIndex.add(s,o[u.lang])});let a={};return t.labels.filter(u=>!u.lang.startsWith("x-")&&u.description).forEach(u=>{a[u.lang]||(a[u.lang]=[]),a[u.lang].push(u.description)}),De[r.uri].concepts[s]={uri:s,notation:[i],prefLabel:o,scopeNote:a,inScheme:[{uri:r.uri}],narrower:(t.categories||[]).map(u=>({uri:`${r.uri}/${u.ID}`})),broader:n},De[r.uri].concepts[s]}_removeNarrower(t){return t&&Object.assign({},t,{narrower:t.narrower&&t.narrower.length?[null]:[]})}_loadSchemeData(t){return P(this,null,function*(){let r=yield this.axios(B(T({},t),{method:"get",url:this._api.api,_skipAdditionalParameters:!0}));this._scheme=this._schemeInfoToJSKOS(r);let n=this._scheme.uri;De[n]={schemeInfo:r,searchIndex:qi.create({tokenize:"full"}),concepts:{}};let i=(s,{broader:o=[]}={})=>{let a=this._categoryToJSKOS(s,{scheme:this._scheme,broader:o});(s.categories||[]).forEach(u=>i(u,{broader:[{uri:a.uri}]}))};r.categories.forEach(s=>i(s)),De[n].topConcepts=r.categories.map(s=>this._categoryToJSKOS(s,{scheme:this._scheme}))})}getSchemes(){return P(this,arguments,function*(t={}){if(!this._api.api)throw new ke;return this._scheme||(this._loadSchemeDataPromise||(this._loadSchemeDataPromise=this._loadSchemeData(t)),yield this._loadSchemeDataPromise),[this._scheme]})}getTop(n){return P(this,null,function*(){var i=n,{scheme:t}=i,r=H(i,["scheme"]);if(!t||!t.uri)throw new U({parameter:"scheme",message:"Missing scheme URI"});if(this._scheme||(yield this.getSchemes(r)),!q.compare(t,this._scheme))throw new U({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return De[this._scheme.uri].topConcepts.map(this._removeNarrower)})}getConcepts(n){return P(this,null,function*(){var i=n,{concepts:t}=i,r=H(i,["concepts"]);return Ee.default(t)||(t=[t]),this._scheme||(yield this.getSchemes(r)),t.map(s=>De[this._scheme.uri].concepts[s.uri]).map(this._removeNarrower)})}getAncestors(n){return P(this,null,function*(){var i=n,{concept:t}=i,r=H(i,["concept"]);if(!t||!t.uri)throw new U({parameter:"concept"});if(t.ancestors&&t.ancestors[0]!==null)return t.ancestors;this._scheme||(yield this.getSchemes(r)),t=De[this._scheme.uri].concepts[t.uri];let s=t&&t.broader&&t.broader[0];return s?[s].concat(yield this.getAncestors(T({concept:s},r))):[]})}getNarrower(n){return P(this,null,function*(){var i=n,{concept:t}=i,r=H(i,["concept"]);if(!t||!t.uri)throw new U({parameter:"concept"});return t.narrower&&t.narrower[0]!==null?t.narrower:(this._scheme||(yield this.getSchemes(r)),t=De[this._scheme.uri].concepts[t.uri],(t&&t.narrower||[]).map(s=>De[this._scheme.uri].concepts[s.uri]).map(this._removeNarrower))})}search(i){return P(this,arguments,function*({search:t,scheme:r,limit:n=100}){if(!r||!r.uri)throw new U({parameter:"scheme"});if(!t)throw new U({parameter:"search"});if(!r||!r.uri)throw new U({parameter:"scheme",message:"Missing scheme URI"});if(this._scheme||(yield this.getSchemes()),!q.compare(r,this._scheme))throw new U({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return(yield De[this._scheme.uri].searchIndex.search(t)).map(o=>De[this._scheme.uri].concepts[o]).map(this._removeNarrower).slice(0,n)})}suggest(t){return P(this,null,function*(){t._raw=!0;let r=yield this.search(t),n=[t.search,[],[],[]];for(let i of r){let s=q.notation(i),o=q.prefLabel(i);n[1].push((s?s+" ":"")+o),n[2].push(""),n[3].push(i.uri)}return r._totalCount!=null?n._totalCount=r._totalCount:n._totalCount=r.length,n})}};ge(mt,"supports",{schemes:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,suggest:!0,search:!0});mt.providerName="MyCoRe";mt.providerType="http://bartoc.org/api-type/mycore";var _n={schemes:[]},gt=class extends Q{static _registryConfigForBartocApiConfig({url:t}={}){return t?{api:t}:null}getSchemes(){return P(this,null,function*(){var t,r;if(!_n.schemes.length){let n=yield xe.post(this._api.api,{query:"query sources { sources { name uri description alternateName } }",operationName:"sources"}),i=((r=(t=n==null?void 0:n.data)==null?void 0:t.data)==null?void 0:r.sources)||[];if(i.length)_n.schemes=i.map(s=>{let o={uri:s.uri,prefLabel:{und:s.name}};return s.desciption&&(o.description={und:[s.description]}),s.alternateName&&(o.notation=[s.alternateName]),o});else return[]}return _n.schemes})}getConcepts(r){return P(this,arguments,function*({concepts:t}){var i,s;if(!t)throw new U({parameter:"concepts"});return Array.isArray(t)||(t=[t]),(((s=(i=(yield xe.post(this._api.api,{query:`query { lookup( uris: [${t.map(o=>`"${o.uri}"`)}], ) { uri source { ... on Source { uri } } result { ... on Term { uri prefLabel scopeNote altLabel broader { uri } narrower { uri } } } } }`})).data)==null?void 0:i.data)==null?void 0:s.lookup)||[]).map(o=>{var u,l,c,h,d,m,f,g,w,C;let a={uri:o.uri,inScheme:[_n.schemes.find(I=>q.compare(I,{uri:o.source.uri}))]};return(l=(u=o.result)==null?void 0:u.prefLabel)!=null&&l[0]&&(a.prefLabel={und:o.result.prefLabel[0]}),(h=(c=o.result)==null?void 0:c.altLabel)!=null&&h[0]&&(a.altLabel={und:o.result.altLabel}),(m=(d=o.result)==null?void 0:d.scopeNote)!=null&&m[0]&&(a.scopeNote={und:o.result.scopeNote}),(g=(f=o.result)==null?void 0:f.broader)!=null&&g.length&&(a.broader=o.result.broader),(C=(w=o.result)==null?void 0:w.narrower)!=null&&C.length&&(a.narrower=o.result.narrower),a})})}suggest(t){return P(this,null,function*(){let r=t.search,n=yield this.search(t);return[r,n.map(i=>q.prefLabel(i,{fallbackToUri:!1})),[],n.map(i=>i.uri)]})}search(n){return P(this,arguments,function*({scheme:t,search:r}){var s,o,a,u,l;if(!r)throw new U({parameter:"search"});if(!t||!q.isContainedIn(t,_n.schemes))throw new U({parameter:"scheme"});return(((l=(u=(a=(o=(s=(yield xe.post(this._api.api,{query:`query { terms( sources: ["${t.uri}"] query: "${r}" ) { source { uri } result { ... on Terms { terms { uri prefLabel scopeNote } } } }}`})).data)==null?void 0:s.data)==null?void 0:o.terms)==null?void 0:a[0])==null?void 0:u.result)==null?void 0:l.terms)||[]).map(c=>{var d,m,f;let h={uri:c.uri,inScheme:[t]};return(d=c.prefLabel)!=null&&d[0]&&(h.prefLabel={und:c.prefLabel[0]}),(m=c.altLabel)!=null&&m[0]&&(h.altLabel={und:c.altLabel}),(f=c.scopeNote)!=null&&f[0]&&(h.scopeNote={und:c.scopeNote[0]}),h})})}};ge(gt,"supports",{schemes:!0,top:!1,data:!0,concepts:!0,narrower:!1,ancestors:!1,suggest:!0,search:!0});gt.providerName="NoTApi";gt.providerType="http://bartoc.org/api-type/noterms";var rt={[Q.providerName]:Q,init(e){if(this[e.provider])return new this[e.provider](e);throw new Vt},addProvider(e){if(e.prototype instanceof Q||e===Q)this[e.providerName]=e;else throw new Vt}};rt.addProvider(We);rt.addProvider(He);Object.values(xn).forEach(e=>{rt.addProvider(e)});var Ko={},Ar=class e{constructor(t){this.config=t,this.axios=xe.create()}setConfig(t){this.config=t}get config(){return this._config}set config(t){t=t||{},t.registries=t.registries||[],t.registries=t.registries.map(r=>rt.init(r)).filter(r=>r),t.registries.forEach(r=>{r.cdk=this}),this._config=t}get providers(){return rt}createInstance(t){return new e(t)}loadConfig(t){return P(this,null,function*(){let r=yield this.axios.get(t);this.config=r.data})}loadBuildInfo(o){var a=o,{url:t,buildInfo:r=null,interval:n=6e4,callback:i}=a,s=H(a,["url","buildInfo","interval","callback"]);if(!t&&!this.config.cocodaBaseUrl)throw new Ae({message:"Could not determine URL to load build config."});return t||(t=`${this.config.cocodaBaseUrl}build-info.json`),this.repeat(B(T({},s),{function:()=>P(this,null,function*(){return(yield this.axios.get(t,{headers:{"Cache-Control":"no-cache"}})).data}),interval:n,callback:(u,l,c)=>{u?i(u):(c||!c&&r&&!et.default(l,r))&&i(null,l,c||r)}}))}getRegistryForUri(t){return this.config.registries.find(r=>r.uri==t)}initializeRegistry(t){return t=rt.init(t),t.cdk=this,t}addProvider(t){rt.addProvider(t)}static addProvider(t){rt.addProvider(t)}repeat({function:t,interval:r=15e3,callback:n,callImmediately:i=!0}={}){if(!t)throw new U({parameter:"function"});if(typeof t!="function")throw new U({parameter:"function",message:"function needs to be a function"});let s=()=>P(null,null,function*(){return t()});if(r=parseInt(r),isNaN(r))throw new U({parameter:"interval"});if(!n)throw new U({parameter:"callback"});if(typeof n!="function")throw new U({parameter:"callback",message:"callback needs to be a function"});let o={timer:null,result:null,error:null,isPaused:!1,interval:r},a=d=>{let m=o.result;et.default(m,d)||(o.result=d,o.error=null,n(null,d,m))},u=d=>{o.error=d,n(d)},l=d=>{o.isPaused||(o.timer=setTimeout(()=>{d()},o.interval))},c=()=>s().then(a).catch(u).then(()=>l(c)),h=(d=i)=>{d?c():l(c)};return h(),{start:(...d)=>{o.isPaused=!1,h(...d)},stop:()=>{o.isPaused=!0,o.timer?clearTimeout(o.timer):setTimeout(()=>{o.timer&&clearTimeout(o.timer)},o.interval)},get isPaused(){return o.isPaused},get lastResult(){return o.result},get hasErrored(){return!!o.error},get interval(){return o.interval},set interval(d){o.interval=d}}}getSchemes(){return P(this,arguments,function*(t={}){let r=[],n=[];for(let i of this.config.registries)if(i.has.schemes!==!1){let s=i.getSchemes(t).then(o=>{for(let a of o){a._registry=i,a.__DETAILSLOADED__=1,a.type=a.type||["http://www.w3.org/2004/02/skos/core#ConceptScheme"];let u=r.find(d=>q.compare(d,a)),l,c,h=!1;if(u){l=this.config.registries.indexOf(i),l!=-1&&(l=this.config.registries.length-l),c=this.config.registries.indexOf(G.default(u,"_registry")),c!=-1&&(c=this.config.registries.length-c);let d=a.concepts?a.concepts.length==0?-1:1:0,m=u.concepts?u.concepts.length==0?-1:1:0;d>m?h=!0:d<m?h=!1:h=c<l}if(!u||h){if(h){let d=r.findIndex(m=>q.compare(m,u));d!=-1&&r.splice(d,1),a=q.merge(a,it.default(u,["concepts","topConcepts"]),{mergeUris:!0,skipPaths:["_registry"]})}a._registry=i,r.push(a)}else{let d=r.findIndex(m=>q.compare(m,a));if(d!=-1){let m=r[d]._registry;r[d]=q.merge(r[d],it.default(a,["concepts","topConcepts"]),{mergeUris:!0,skipPaths:["_registry"]}),r[d]._registry=m}}}}).catch(o=>{console.warn("Couldn't load schemes for registry",i.uri,o)});n.push(s)}return yield Promise.all(n),r.forEach(i=>{let s=i._registry;delete i._registry;let o=this.registryForScheme(i);!o||o._api.api===s._api.api?i._registry=s:i._registry=o}),q.sortSchemes(r.filter(Boolean))})}registryForScheme(t,r="concepts"){var i;let n=t._registry;if(n)return n;for(let s of t.API||[]){let o=s,{type:a}=o,u=H(o,["type"]);let l=u.url,c=`${a}-${l}`;if(Ko[c]){let h=Ko[c];return Array.isArray(h._jskos.schemes)&&!q.isContainedIn(t,h._jskos.schemes)&&h._jskos.schemes.push(t),h}else{u.scheme=t;for(let h of Object.values(rt)){if((h==null?void 0:h.providerType)!==a||!h._registryConfigForBartocApiConfig||r&&!((i=h==null?void 0:h.supports)!=null&&i[r]))continue;let d=h.providerName,m=rt[d]._registryConfigForBartocApiConfig(u);if(m){m.provider=d;try{if(n=this.initializeRegistry(m),n)return Ko[c]=n,n}catch(f){continue}}}}}return null}};var Tm=new Ar;function S3(e){Object.values(xn).forEach(t=>(e||Tm).addProvider(t))}return Pg(A3);})();
17
17
  /*! Bundled license information:
18
18
 
19
19
  localforage/dist/localforage.js: