cocoda-sdk 3.6.0 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -76
- package/dist/cjs/index.cjs +250 -210
- package/dist/cocoda-sdk.js +10 -10
- package/dist/cocoda-sdk.js.LICENSES.txt +0 -53
- package/dist/cocoda-sdk.js.map +4 -4
- package/dist/esm/index.js +2 -1
- package/dist/esm/lib/CocodaSDK.js +21 -8
- package/dist/esm/providers/base-provider.js +39 -37
- package/dist/esm/providers/concept-api-provider.js +10 -13
- package/dist/esm/providers/label-search-suggestion-provider.js +5 -6
- package/dist/esm/providers/local-mappings-provider.js +8 -9
- package/dist/esm/providers/mappings-api-provider.js +33 -33
- package/dist/esm/providers/mycore-provider.js +1 -2
- package/dist/esm/providers/occurrences-api-provider.js +12 -15
- package/dist/esm/providers/ols-api-provider.js +8 -17
- package/dist/esm/providers/reconciliation-api-provider.js +11 -12
- package/dist/esm/providers/skohub-provider.js +2 -3
- package/dist/esm/providers/skosmos-api-provider.js +71 -37
- package/dist/esm/utils/index.js +21 -0
- package/package.json +1 -2
- package/dist/esm/utils/lodash.js +0 -32
package/dist/cocoda-sdk.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* cocoda-sdk v3.6.
|
|
2
|
+
* cocoda-sdk v3.6.2
|
|
3
3
|
* Copyright (c) 2021 Verbundzentrale des GBV (VZG)
|
|
4
4
|
* @license MIT
|
|
5
5
|
*
|
|
6
6
|
* For dependency license information, please see ./dist/cocoda-sdk.js.LICENSES.txt.
|
|
7
7
|
*/
|
|
8
|
-
var CDK=(()=>{var Tg=Object.create;var Ir=Object.defineProperty,Ig=Object.defineProperties,Pg=Object.getOwnPropertyDescriptor,Rg=Object.getOwnPropertyDescriptors,qg=Object.getOwnPropertyNames,En=Object.getOwnPropertySymbols,Mg=Object.getPrototypeOf,Ki=Object.prototype.hasOwnProperty,pa=Object.prototype.propertyIsEnumerable;var Wt=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),Dg=t=>{throw TypeError(t)},gt=Math.pow,Hi=(t,e,r)=>e in t?Ir(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,P=(t,e)=>{for(var r in e||(e={}))Ki.call(e,r)&&Hi(t,r,e[r]);if(En)for(var r of En(e))pa.call(e,r)&&Hi(t,r,e[r]);return t},j=(t,e)=>Ig(t,Rg(e));var Pr=(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 H=(t,e)=>{var r={};for(var n in t)Ki.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&En)for(var n of En(t))e.indexOf(n)<0&&pa.call(t,n)&&(r[n]=t[n]);return r};var v=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Pt=(t,e)=>{for(var r in e)Ir(t,r,{get:e[r],enumerable:!0})},da=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of qg(e))!Ki.call(t,i)&&i!==r&&Ir(t,i,{get:()=>e[i],enumerable:!(n=Pg(e,i))||n.enumerable});return t};var Se=(t,e,r)=>(r=t!=null?Tg(Mg(t)):{},da(e||!t||!t.__esModule?Ir(r,"default",{value:t,enumerable:!0}):r,t)),Lg=t=>da(Ir({},"__esModule",{value:!0}),t);var ee=(t,e,r)=>Hi(t,typeof e!="symbol"?e+"":e,r);var E=(t,e,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(t,e)).next())}),Rt=function(t,e){this[0]=t,this[1]=e},Wi=(t,e,r)=>{var n=(o,a,u,l)=>{try{var c=r[o](a),h=(a=c.value)instanceof Rt,m=c.done;Promise.resolve(h?a[0]:a).then(d=>h?n(o==="return"?o:"next",a[1]?{done:d.done,value:d.value}:d,u,l):u({value:d,done:m})).catch(d=>n("throw",d,u,l))}catch(d){l(d)}},i=o=>s[o]=a=>new Promise((u,l)=>n(o,a,u,l)),s={};return r=r.apply(t,e),s[Wt("asyncIterator")]=()=>s,i("next"),i("throw"),i("return"),s},Vi=t=>{var e=t[Wt("asyncIterator")],r=!1,n,i={};return e==null?(e=t[Wt("iterator")](),n=s=>i[s]=o=>e[s](o)):(e=e.call(t),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=e[s](o);u instanceof Object||Dg("Object expected"),a(u)}),1)}}),i[Wt("iterator")]=()=>i,n("next"),"throw"in e?n("throw"):i.throw=s=>{throw s},"return"in e&&n("return"),i},ma=(t,e,r)=>(e=t[Wt("asyncIterator")])?e.call(t):(t=t[Wt("iterator")](),e={},r=(n,i)=>(i=t[n])&&(e[n]=s=>new Promise((o,a,u)=>(s=i.call(t,s),u=s.done,Promise.resolve(s.value).then(l=>o({value:l,done:u}),a)))),r("next"),r("return"),e);var Pe=v((QP,tu)=>{var Y0=Array.isArray;tu.exports=Y0});var _s=v((e2,ru)=>{var X0=typeof global=="object"&&global&&global.Object===Object&&global;ru.exports=X0});var je=v((t2,nu)=>{var Z0=_s(),Q0=typeof self=="object"&&self&&self.Object===Object&&self,ey=Z0||Q0||Function("return this")();nu.exports=ey});var Mt=v((r2,iu)=>{var ty=je(),ry=ty.Symbol;iu.exports=ry});var uu=v((n2,au)=>{var su=Mt(),ou=Object.prototype,ny=ou.hasOwnProperty,iy=ou.toString,Wr=su?su.toStringTag:void 0;function sy(t){var e=ny.call(t,Wr),r=t[Wr];try{t[Wr]=void 0;var n=!0}catch(s){}var i=iy.call(t);return n&&(e?t[Wr]=r:delete t[Wr]),i}au.exports=sy});var cu=v((i2,lu)=>{var oy=Object.prototype,ay=oy.toString;function uy(t){return ay.call(t)}lu.exports=uy});var wt=v((s2,pu)=>{var fu=Mt(),ly=uu(),cy=cu(),fy="[object Null]",hy="[object Undefined]",hu=fu?fu.toStringTag:void 0;function py(t){return t==null?t===void 0?hy:fy:hu&&hu in Object(t)?ly(t):cy(t)}pu.exports=py});var Fe=v((o2,du)=>{function dy(t){return t!=null&&typeof t=="object"}du.exports=dy});var $n=v((a2,mu)=>{var my=wt(),gy=Fe(),yy="[object Symbol]";function wy(t){return typeof t=="symbol"||gy(t)&&my(t)==yy}mu.exports=wy});var yu=v((u2,gu)=>{var _y=Pe(),by=$n(),vy=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xy=/^\w*$/;function Sy(t,e){if(_y(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||by(t)?!0:xy.test(t)||!vy.test(t)||e!=null&&t in Object(e)}gu.exports=Sy});var Ne=v((l2,wu)=>{function Ay(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}wu.exports=Ay});var zn=v((c2,_u)=>{var Ey=wt(),Cy=Ne(),Oy="[object AsyncFunction]",Ty="[object Function]",Iy="[object GeneratorFunction]",Py="[object Proxy]";function Ry(t){if(!Cy(t))return!1;var e=Ey(t);return e==Ty||e==Iy||e==Oy||e==Py}_u.exports=Ry});var vu=v((f2,bu)=>{var qy=je(),My=qy["__core-js_shared__"];bu.exports=My});var Au=v((h2,Su)=>{var bs=vu(),xu=(function(){var t=/[^.]+$/.exec(bs&&bs.keys&&bs.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Dy(t){return!!xu&&xu in t}Su.exports=Dy});var vs=v((p2,Eu)=>{var Ly=Function.prototype,ky=Ly.toString;function jy(t){if(t!=null){try{return ky.call(t)}catch(e){}try{return t+""}catch(e){}}return""}Eu.exports=jy});var Ou=v((d2,Cu)=>{var Fy=zn(),Ny=Au(),By=Ne(),Uy=vs(),$y=/[\\^$.*+?()[\]{}|]/g,zy=/^\[object .+?Constructor\]$/,Hy=Function.prototype,Ky=Object.prototype,Wy=Hy.toString,Vy=Ky.hasOwnProperty,Jy=RegExp("^"+Wy.call(Vy).replace($y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Gy(t){if(!By(t)||Ny(t))return!1;var e=Fy(t)?Jy:zy;return e.test(Uy(t))}Cu.exports=Gy});var Iu=v((m2,Tu)=>{function Yy(t,e){return t==null?void 0:t[e]}Tu.exports=Yy});var _t=v((g2,Pu)=>{var Xy=Ou(),Zy=Iu();function Qy(t,e){var r=Zy(t,e);return Xy(r)?r:void 0}Pu.exports=Qy});var Vr=v((y2,Ru)=>{var ew=_t(),tw=ew(Object,"create");Ru.exports=tw});var Du=v((w2,Mu)=>{var qu=Vr();function rw(){this.__data__=qu?qu(null):{},this.size=0}Mu.exports=rw});var ku=v((_2,Lu)=>{function nw(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}Lu.exports=nw});var Fu=v((b2,ju)=>{var iw=Vr(),sw="__lodash_hash_undefined__",ow=Object.prototype,aw=ow.hasOwnProperty;function uw(t){var e=this.__data__;if(iw){var r=e[t];return r===sw?void 0:r}return aw.call(e,t)?e[t]:void 0}ju.exports=uw});var Bu=v((v2,Nu)=>{var lw=Vr(),cw=Object.prototype,fw=cw.hasOwnProperty;function hw(t){var e=this.__data__;return lw?e[t]!==void 0:fw.call(e,t)}Nu.exports=hw});var $u=v((x2,Uu)=>{var pw=Vr(),dw="__lodash_hash_undefined__";function mw(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=pw&&e===void 0?dw:e,this}Uu.exports=mw});var Hu=v((S2,zu)=>{var gw=Du(),yw=ku(),ww=Fu(),_w=Bu(),bw=$u();function er(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])}}er.prototype.clear=gw;er.prototype.delete=yw;er.prototype.get=ww;er.prototype.has=_w;er.prototype.set=bw;zu.exports=er});var Wu=v((A2,Ku)=>{function vw(){this.__data__=[],this.size=0}Ku.exports=vw});var tr=v((E2,Vu)=>{function xw(t,e){return t===e||t!==t&&e!==e}Vu.exports=xw});var Jr=v((C2,Ju)=>{var Sw=tr();function Aw(t,e){for(var r=t.length;r--;)if(Sw(t[r][0],e))return r;return-1}Ju.exports=Aw});var Yu=v((O2,Gu)=>{var Ew=Jr(),Cw=Array.prototype,Ow=Cw.splice;function Tw(t){var e=this.__data__,r=Ew(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Ow.call(e,r,1),--this.size,!0}Gu.exports=Tw});var Zu=v((T2,Xu)=>{var Iw=Jr();function Pw(t){var e=this.__data__,r=Iw(e,t);return r<0?void 0:e[r][1]}Xu.exports=Pw});var el=v((I2,Qu)=>{var Rw=Jr();function qw(t){return Rw(this.__data__,t)>-1}Qu.exports=qw});var rl=v((P2,tl)=>{var Mw=Jr();function Dw(t,e){var r=this.__data__,n=Mw(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}tl.exports=Dw});var Gr=v((R2,nl)=>{var Lw=Wu(),kw=Yu(),jw=Zu(),Fw=el(),Nw=rl();function rr(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])}}rr.prototype.clear=Lw;rr.prototype.delete=kw;rr.prototype.get=jw;rr.prototype.has=Fw;rr.prototype.set=Nw;nl.exports=rr});var Hn=v((q2,il)=>{var Bw=_t(),Uw=je(),$w=Bw(Uw,"Map");il.exports=$w});var al=v((M2,ol)=>{var sl=Hu(),zw=Gr(),Hw=Hn();function Kw(){this.size=0,this.__data__={hash:new sl,map:new(Hw||zw),string:new sl}}ol.exports=Kw});var ll=v((D2,ul)=>{function Ww(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}ul.exports=Ww});var Yr=v((L2,cl)=>{var Vw=ll();function Jw(t,e){var r=t.__data__;return Vw(e)?r[typeof e=="string"?"string":"hash"]:r.map}cl.exports=Jw});var hl=v((k2,fl)=>{var Gw=Yr();function Yw(t){var e=Gw(this,t).delete(t);return this.size-=e?1:0,e}fl.exports=Yw});var dl=v((j2,pl)=>{var Xw=Yr();function Zw(t){return Xw(this,t).get(t)}pl.exports=Zw});var gl=v((F2,ml)=>{var Qw=Yr();function e_(t){return Qw(this,t).has(t)}ml.exports=e_});var wl=v((N2,yl)=>{var t_=Yr();function r_(t,e){var r=t_(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}yl.exports=r_});var Kn=v((B2,_l)=>{var n_=al(),i_=hl(),s_=dl(),o_=gl(),a_=wl();function nr(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])}}nr.prototype.clear=n_;nr.prototype.delete=i_;nr.prototype.get=s_;nr.prototype.has=o_;nr.prototype.set=a_;_l.exports=nr});var xl=v((U2,vl)=>{var bl=Kn(),u_="Expected a function";function xs(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(u_);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=t.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(xs.Cache||bl),r}xs.Cache=bl;vl.exports=xs});var Al=v(($2,Sl)=>{var l_=xl(),c_=500;function f_(t){var e=l_(t,function(n){return r.size===c_&&r.clear(),n}),r=e.cache;return e}Sl.exports=f_});var Cl=v((z2,El)=>{var h_=Al(),p_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d_=/\\(\\)?/g,m_=h_(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(p_,function(r,n,i,s){e.push(i?s.replace(d_,"$1"):n||r)}),e});El.exports=m_});var Xr=v((H2,Ol)=>{function g_(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}Ol.exports=g_});var Ml=v((K2,ql)=>{var Tl=Mt(),y_=Xr(),w_=Pe(),__=$n(),b_=1/0,Il=Tl?Tl.prototype:void 0,Pl=Il?Il.toString:void 0;function Rl(t){if(typeof t=="string")return t;if(w_(t))return y_(t,Rl)+"";if(__(t))return Pl?Pl.call(t):"";var e=t+"";return e=="0"&&1/t==-b_?"-0":e}ql.exports=Rl});var Ll=v((W2,Dl)=>{var v_=Ml();function x_(t){return t==null?"":v_(t)}Dl.exports=x_});var Zr=v((V2,kl)=>{var S_=Pe(),A_=yu(),E_=Cl(),C_=Ll();function O_(t,e){return S_(t)?t:A_(t,e)?[t]:E_(C_(t))}kl.exports=O_});var Wn=v((J2,jl)=>{var T_=$n(),I_=1/0;function P_(t){if(typeof t=="string"||T_(t))return t;var e=t+"";return e=="0"&&1/t==-I_?"-0":e}jl.exports=P_});var Ss=v((G2,Fl)=>{var R_=Zr(),q_=Wn();function M_(t,e){e=R_(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[q_(e[r++])];return r&&r==n?t:void 0}Fl.exports=M_});var Bl=v((Y2,Nl)=>{var D_=Ss();function L_(t,e,r){var n=t==null?void 0:D_(t,e);return n===void 0?r:n}Nl.exports=L_});var As=v((X2,Ul)=>{var k_=_t(),j_=(function(){try{var t=k_(Object,"defineProperty");return t({},"",{}),t}catch(e){}})();Ul.exports=j_});var Vn=v((Z2,zl)=>{var $l=As();function F_(t,e,r){e=="__proto__"&&$l?$l(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}zl.exports=F_});var Jn=v((Q2,Hl)=>{var N_=Vn(),B_=tr(),U_=Object.prototype,$_=U_.hasOwnProperty;function z_(t,e,r){var n=t[e];(!($_.call(t,e)&&B_(n,r))||r===void 0&&!(e in t))&&N_(t,e,r)}Hl.exports=z_});var Gn=v((eR,Kl)=>{var H_=9007199254740991,K_=/^(?:0|[1-9]\d*)$/;function W_(t,e){var r=typeof t;return e=e==null?H_:e,!!e&&(r=="number"||r!="symbol"&&K_.test(t))&&t>-1&&t%1==0&&t<e}Kl.exports=W_});var Jl=v((tR,Vl)=>{var V_=Jn(),J_=Zr(),G_=Gn(),Wl=Ne(),Y_=Wn();function X_(t,e,r,n){if(!Wl(t))return t;e=J_(e,t);for(var i=-1,s=e.length,o=s-1,a=t;a!=null&&++i<s;){var u=Y_(e[i]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(i!=o){var c=a[u];l=n?n(c,u,a):void 0,l===void 0&&(l=Wl(c)?c:G_(e[i+1])?[]:{})}V_(a,u,l),a=a[u]}return t}Vl.exports=X_});var Yl=v((rR,Gl)=>{var Z_=Jl();function Q_(t,e,r){return t==null?t:Z_(t,e,r)}Gl.exports=Q_});var Zl=v((nR,Xl)=>{var eb="__lodash_hash_undefined__";function tb(t){return this.__data__.set(t,eb),this}Xl.exports=tb});var ec=v((iR,Ql)=>{function rb(t){return this.__data__.has(t)}Ql.exports=rb});var Xn=v((sR,tc)=>{var nb=Kn(),ib=Zl(),sb=ec();function Yn(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new nb;++e<r;)this.add(t[e])}Yn.prototype.add=Yn.prototype.push=ib;Yn.prototype.has=sb;tc.exports=Yn});var nc=v((oR,rc)=>{function ob(t,e,r,n){for(var i=t.length,s=r+(n?1:-1);n?s--:++s<i;)if(e(t[s],s,t))return s;return-1}rc.exports=ob});var sc=v((aR,ic)=>{function ab(t){return t!==t}ic.exports=ab});var ac=v((uR,oc)=>{function ub(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}oc.exports=ub});var lc=v((lR,uc)=>{var lb=nc(),cb=sc(),fb=ac();function hb(t,e,r){return e===e?fb(t,e,r):lb(t,cb,r)}uc.exports=hb});var Es=v((cR,cc)=>{var pb=lc();function db(t,e){var r=t==null?0:t.length;return!!r&&pb(t,e,0)>-1}cc.exports=db});var Cs=v((fR,fc)=>{function mb(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}fc.exports=mb});var Zn=v((hR,hc)=>{function gb(t,e){return t.has(e)}hc.exports=gb});var Os=v((pR,pc)=>{var yb=_t(),wb=je(),_b=yb(wb,"Set");pc.exports=_b});var mc=v((dR,dc)=>{function bb(){}dc.exports=bb});var Qn=v((mR,gc)=>{function vb(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}gc.exports=vb});var wc=v((gR,yc)=>{var Ts=Os(),xb=mc(),Sb=Qn(),Ab=1/0,Eb=Ts&&1/Sb(new Ts([,-0]))[1]==Ab?function(t){return new Ts(t)}:xb;yc.exports=Eb});var Is=v((yR,_c)=>{var Cb=Xn(),Ob=Es(),Tb=Cs(),Ib=Zn(),Pb=wc(),Rb=Qn(),qb=200;function Mb(t,e,r){var n=-1,i=Ob,s=t.length,o=!0,a=[],u=a;if(r)o=!1,i=Tb;else if(s>=qb){var l=e?null:Pb(t);if(l)return Rb(l);o=!1,i=Ib,u=new Cb}else u=e?[]:a;e:for(;++n<s;){var c=t[n],h=e?e(c):c;if(c=r||c!==0?c:0,o&&h===h){for(var m=u.length;m--;)if(u[m]===h)continue e;e&&u.push(h),a.push(c)}else i(u,h,r)||(u!==a&&u.push(h),a.push(c))}return a}_c.exports=Mb});var vc=v((wR,bc)=>{var Db=Is();function Lb(t){return t&&t.length?Db(t):[]}bc.exports=Lb});var Qr=v((_R,xc)=>{function kb(t){return function(e){return t(e)}}xc.exports=kb});var Ec=v((bR,Ac)=>{var jb=Xn(),Fb=Es(),Nb=Cs(),Bb=Xr(),Ub=Qr(),Sc=Zn(),$b=Math.min;function zb(t,e,r){for(var n=r?Nb:Fb,i=t[0].length,s=t.length,o=s,a=Array(s),u=1/0,l=[];o--;){var c=t[o];o&&e&&(c=Bb(c,Ub(e))),u=$b(c.length,u),a[o]=!r&&(e||i>=120&&c.length>=120)?new jb(o&&c):void 0}c=t[0];var h=-1,m=a[0];e:for(;++h<i&&l.length<u;){var d=c[h],f=e?e(d):d;if(d=r||d!==0?d:0,!(m?Sc(m,f):n(l,f,r))){for(o=s;--o;){var g=a[o];if(!(g?Sc(g,f):n(t[o],f,r)))continue e}m&&m.push(f),l.push(d)}}return l}Ac.exports=zb});var ei=v((vR,Cc)=>{function Hb(t){return t}Cc.exports=Hb});var Tc=v((xR,Oc)=>{function Kb(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)}Oc.exports=Kb});var Ps=v((SR,Pc)=>{var Wb=Tc(),Ic=Math.max;function Vb(t,e,r){return e=Ic(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,s=Ic(n.length-e,0),o=Array(s);++i<s;)o[i]=n[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=n[i];return a[e]=r(o),Wb(t,this,a)}}Pc.exports=Vb});var qc=v((AR,Rc)=>{function Jb(t){return function(){return t}}Rc.exports=Jb});var Lc=v((ER,Dc)=>{var Gb=qc(),Mc=As(),Yb=ei(),Xb=Mc?function(t,e){return Mc(t,"toString",{configurable:!0,enumerable:!1,value:Gb(e),writable:!0})}:Yb;Dc.exports=Xb});var jc=v((CR,kc)=>{var Zb=800,Qb=16,ev=Date.now;function tv(t){var e=0,r=0;return function(){var n=ev(),i=Qb-(n-r);if(r=n,i>0){if(++e>=Zb)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}kc.exports=tv});var Rs=v((OR,Fc)=>{var rv=Lc(),nv=jc(),iv=nv(rv);Fc.exports=iv});var ti=v((TR,Nc)=>{var sv=ei(),ov=Ps(),av=Rs();function uv(t,e){return av(ov(t,e,sv),t+"")}Nc.exports=uv});var qs=v((IR,Bc)=>{var lv=9007199254740991;function cv(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=lv}Bc.exports=cv});var ir=v((PR,Uc)=>{var fv=zn(),hv=qs();function pv(t){return t!=null&&hv(t.length)&&!fv(t)}Uc.exports=pv});var ri=v((RR,$c)=>{var dv=ir(),mv=Fe();function gv(t){return mv(t)&&dv(t)}$c.exports=gv});var Hc=v((qR,zc)=>{var yv=ri();function wv(t){return yv(t)?t:[]}zc.exports=wv});var Wc=v((MR,Kc)=>{var _v=Xr(),bv=Ec(),vv=ti(),xv=Hc(),Sv=vv(function(t){var e=_v(t,xv);return e.length&&e[0]===t[0]?bv(e):[]});Kc.exports=Sv});var en=v((DR,Vc)=>{function Av(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}Vc.exports=Av});var Gc=v((LR,Jc)=>{var Ev=wt(),Cv=Fe(),Ov="[object Arguments]";function Tv(t){return Cv(t)&&Ev(t)==Ov}Jc.exports=Tv});var tn=v((kR,Zc)=>{var Yc=Gc(),Iv=Fe(),Xc=Object.prototype,Pv=Xc.hasOwnProperty,Rv=Xc.propertyIsEnumerable,qv=Yc((function(){return arguments})())?Yc:function(t){return Iv(t)&&Pv.call(t,"callee")&&!Rv.call(t,"callee")};Zc.exports=qv});var rf=v((jR,tf)=>{var Qc=Mt(),Mv=tn(),Dv=Pe(),ef=Qc?Qc.isConcatSpreadable:void 0;function Lv(t){return Dv(t)||Mv(t)||!!(ef&&t&&t[ef])}tf.exports=Lv});var ni=v((FR,sf)=>{var kv=en(),jv=rf();function nf(t,e,r,n,i){var s=-1,o=t.length;for(r||(r=jv),i||(i=[]);++s<o;){var a=t[s];e>0&&r(a)?e>1?nf(a,e-1,r,n,i):kv(i,a):n||(i[i.length]=a)}return i}sf.exports=nf});var af=v((NR,of)=>{var Fv=ni(),Nv=ti(),Bv=Is(),Uv=ri(),$v=Nv(function(t){return Bv(Fv(t,1,Uv,!0))});of.exports=$v});var lf=v((BR,uf)=>{function zv(t){return function(e,r,n){for(var i=-1,s=Object(e),o=n(e),a=o.length;a--;){var u=o[t?a:++i];if(r(s[u],u,s)===!1)break}return e}}uf.exports=zv});var Ms=v((UR,cf)=>{var Hv=lf(),Kv=Hv();cf.exports=Kv});var hf=v(($R,ff)=>{function Wv(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}ff.exports=Wv});var df=v((zR,pf)=>{function Vv(){return!1}pf.exports=Vv});var or=v((rn,sr)=>{var Jv=je(),Gv=df(),yf=typeof rn=="object"&&rn&&!rn.nodeType&&rn,mf=yf&&typeof sr=="object"&&sr&&!sr.nodeType&&sr,Yv=mf&&mf.exports===yf,gf=Yv?Jv.Buffer:void 0,Xv=gf?gf.isBuffer:void 0,Zv=Xv||Gv;sr.exports=Zv});var _f=v((HR,wf)=>{var Qv=wt(),e4=qs(),t4=Fe(),r4="[object Arguments]",n4="[object Array]",i4="[object Boolean]",s4="[object Date]",o4="[object Error]",a4="[object Function]",u4="[object Map]",l4="[object Number]",c4="[object Object]",f4="[object RegExp]",h4="[object Set]",p4="[object String]",d4="[object WeakMap]",m4="[object ArrayBuffer]",g4="[object DataView]",y4="[object Float32Array]",w4="[object Float64Array]",_4="[object Int8Array]",b4="[object Int16Array]",v4="[object Int32Array]",x4="[object Uint8Array]",S4="[object Uint8ClampedArray]",A4="[object Uint16Array]",E4="[object Uint32Array]",le={};le[y4]=le[w4]=le[_4]=le[b4]=le[v4]=le[x4]=le[S4]=le[A4]=le[E4]=!0;le[r4]=le[n4]=le[m4]=le[i4]=le[g4]=le[s4]=le[o4]=le[a4]=le[u4]=le[l4]=le[c4]=le[f4]=le[h4]=le[p4]=le[d4]=!1;function C4(t){return t4(t)&&e4(t.length)&&!!le[Qv(t)]}wf.exports=C4});var ii=v((nn,ar)=>{var O4=_s(),bf=typeof nn=="object"&&nn&&!nn.nodeType&&nn,sn=bf&&typeof ar=="object"&&ar&&!ar.nodeType&&ar,T4=sn&&sn.exports===bf,Ds=T4&&O4.process,I4=(function(){try{var t=sn&&sn.require&&sn.require("util").types;return t||Ds&&Ds.binding&&Ds.binding("util")}catch(e){}})();ar.exports=I4});var on=v((KR,Sf)=>{var P4=_f(),R4=Qr(),vf=ii(),xf=vf&&vf.isTypedArray,q4=xf?R4(xf):P4;Sf.exports=q4});var Ls=v((WR,Af)=>{var M4=hf(),D4=tn(),L4=Pe(),k4=or(),j4=Gn(),F4=on(),N4=Object.prototype,B4=N4.hasOwnProperty;function U4(t,e){var r=L4(t),n=!r&&D4(t),i=!r&&!n&&k4(t),s=!r&&!n&&!i&&F4(t),o=r||n||i||s,a=o?M4(t.length,String):[],u=a.length;for(var l in t)(e||B4.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||s&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||j4(l,u)))&&a.push(l);return a}Af.exports=U4});var an=v((VR,Ef)=>{var $4=Object.prototype;function z4(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||$4;return t===r}Ef.exports=z4});var ks=v((JR,Cf)=>{function H4(t,e){return function(r){return t(e(r))}}Cf.exports=H4});var Tf=v((GR,Of)=>{var K4=ks(),W4=K4(Object.keys,Object);Of.exports=W4});var js=v((YR,If)=>{var V4=an(),J4=Tf(),G4=Object.prototype,Y4=G4.hasOwnProperty;function X4(t){if(!V4(t))return J4(t);var e=[];for(var r in Object(t))Y4.call(t,r)&&r!="constructor"&&e.push(r);return e}If.exports=X4});var un=v((XR,Pf)=>{var Z4=Ls(),Q4=js(),ex=ir();function tx(t){return ex(t)?Z4(t):Q4(t)}Pf.exports=tx});var qf=v((ZR,Rf)=>{var rx=Ms(),nx=un();function ix(t,e){return t&&rx(t,e,nx)}Rf.exports=ix});var Df=v((QR,Mf)=>{var sx=ei();function ox(t){return typeof t=="function"?t:sx}Mf.exports=ox});var kf=v((eq,Lf)=>{var ax=qf(),ux=Df();function lx(t,e){return t&&ax(t,ux(e))}Lf.exports=lx});var Ff=v((tq,jf)=>{var cx=wt(),fx=Pe(),hx=Fe(),px="[object String]";function dx(t){return typeof t=="string"||!fx(t)&&hx(t)&&cx(t)==px}jf.exports=dx});var Bf=v((rq,Nf)=>{var mx=_t(),gx=je(),yx=mx(gx,"DataView");Nf.exports=yx});var $f=v((nq,Uf)=>{var wx=_t(),_x=je(),bx=wx(_x,"Promise");Uf.exports=bx});var Hf=v((iq,zf)=>{var vx=_t(),xx=je(),Sx=vx(xx,"WeakMap");zf.exports=Sx});var lr=v((sq,Xf)=>{var Fs=Bf(),Ns=Hn(),Bs=$f(),Us=Os(),$s=Hf(),Yf=wt(),ur=vs(),Kf="[object Map]",Ax="[object Object]",Wf="[object Promise]",Vf="[object Set]",Jf="[object WeakMap]",Gf="[object DataView]",Ex=ur(Fs),Cx=ur(Ns),Ox=ur(Bs),Tx=ur(Us),Ix=ur($s),Dt=Yf;(Fs&&Dt(new Fs(new ArrayBuffer(1)))!=Gf||Ns&&Dt(new Ns)!=Kf||Bs&&Dt(Bs.resolve())!=Wf||Us&&Dt(new Us)!=Vf||$s&&Dt(new $s)!=Jf)&&(Dt=function(t){var e=Yf(t),r=e==Ax?t.constructor:void 0,n=r?ur(r):"";if(n)switch(n){case Ex:return Gf;case Cx:return Kf;case Ox:return Wf;case Tx:return Vf;case Ix:return Jf}return e});Xf.exports=Dt});var Qf=v((oq,Zf)=>{var Px=js(),Rx=lr(),qx=tn(),Mx=Pe(),Dx=ir(),Lx=or(),kx=an(),jx=on(),Fx="[object Map]",Nx="[object Set]",Bx=Object.prototype,Ux=Bx.hasOwnProperty;function $x(t){if(t==null)return!0;if(Dx(t)&&(Mx(t)||typeof t=="string"||typeof t.splice=="function"||Lx(t)||jx(t)||qx(t)))return!t.length;var e=Rx(t);if(e==Fx||e==Nx)return!t.size;if(kx(t))return!Px(t).length;for(var r in t)if(Ux.call(t,r))return!1;return!0}Zf.exports=$x});var th=v((aq,eh)=>{var zx=Gr();function Hx(){this.__data__=new zx,this.size=0}eh.exports=Hx});var nh=v((uq,rh)=>{function Kx(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}rh.exports=Kx});var sh=v((lq,ih)=>{function Wx(t){return this.__data__.get(t)}ih.exports=Wx});var ah=v((cq,oh)=>{function Vx(t){return this.__data__.has(t)}oh.exports=Vx});var lh=v((fq,uh)=>{var Jx=Gr(),Gx=Hn(),Yx=Kn(),Xx=200;function Zx(t,e){var r=this.__data__;if(r instanceof Jx){var n=r.__data__;if(!Gx||n.length<Xx-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Yx(n)}return r.set(t,e),this.size=r.size,this}uh.exports=Zx});var si=v((hq,ch)=>{var Qx=Gr(),eS=th(),tS=nh(),rS=sh(),nS=ah(),iS=lh();function cr(t){var e=this.__data__=new Qx(t);this.size=e.size}cr.prototype.clear=eS;cr.prototype.delete=tS;cr.prototype.get=rS;cr.prototype.has=nS;cr.prototype.set=iS;ch.exports=cr});var hh=v((pq,fh)=>{function sS(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}fh.exports=sS});var zs=v((dq,ph)=>{var oS=Xn(),aS=hh(),uS=Zn(),lS=1,cS=2;function fS(t,e,r,n,i,s){var o=r&lS,a=t.length,u=e.length;if(a!=u&&!(o&&u>a))return!1;var l=s.get(t),c=s.get(e);if(l&&c)return l==e&&c==t;var h=-1,m=!0,d=r&cS?new oS:void 0;for(s.set(t,e),s.set(e,t);++h<a;){var f=t[h],g=e[h];if(n)var w=o?n(g,f,h,e,t,s):n(f,g,h,t,e,s);if(w!==void 0){if(w)continue;m=!1;break}if(d){if(!aS(e,function(O,I){if(!uS(d,I)&&(f===O||i(f,O,r,n,s)))return d.push(I)})){m=!1;break}}else if(!(f===g||i(f,g,r,n,s))){m=!1;break}}return s.delete(t),s.delete(e),m}ph.exports=fS});var Hs=v((mq,dh)=>{var hS=je(),pS=hS.Uint8Array;dh.exports=pS});var gh=v((gq,mh)=>{function dS(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}mh.exports=dS});var vh=v((yq,bh)=>{var yh=Mt(),wh=Hs(),mS=tr(),gS=zs(),yS=gh(),wS=Qn(),_S=1,bS=2,vS="[object Boolean]",xS="[object Date]",SS="[object Error]",AS="[object Map]",ES="[object Number]",CS="[object RegExp]",OS="[object Set]",TS="[object String]",IS="[object Symbol]",PS="[object ArrayBuffer]",RS="[object DataView]",_h=yh?yh.prototype:void 0,Ks=_h?_h.valueOf:void 0;function qS(t,e,r,n,i,s,o){switch(r){case RS:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case PS:return!(t.byteLength!=e.byteLength||!s(new wh(t),new wh(e)));case vS:case xS:case ES:return mS(+t,+e);case SS:return t.name==e.name&&t.message==e.message;case CS:case TS:return t==e+"";case AS:var a=yS;case OS:var u=n&_S;if(a||(a=wS),t.size!=e.size&&!u)return!1;var l=o.get(t);if(l)return l==e;n|=bS,o.set(t,e);var c=gS(a(t),a(e),n,i,s,o);return o.delete(t),c;case IS:if(Ks)return Ks.call(t)==Ks.call(e)}return!1}bh.exports=qS});var Ws=v((wq,xh)=>{var MS=en(),DS=Pe();function LS(t,e,r){var n=e(t);return DS(t)?n:MS(n,r(t))}xh.exports=LS});var Ah=v((_q,Sh)=>{function kS(t,e){for(var r=-1,n=t==null?0:t.length,i=0,s=[];++r<n;){var o=t[r];e(o,r,t)&&(s[i++]=o)}return s}Sh.exports=kS});var Vs=v((bq,Eh)=>{function jS(){return[]}Eh.exports=jS});var oi=v((vq,Oh)=>{var FS=Ah(),NS=Vs(),BS=Object.prototype,US=BS.propertyIsEnumerable,Ch=Object.getOwnPropertySymbols,$S=Ch?function(t){return t==null?[]:(t=Object(t),FS(Ch(t),function(e){return US.call(t,e)}))}:NS;Oh.exports=$S});var Js=v((xq,Th)=>{var zS=Ws(),HS=oi(),KS=un();function WS(t){return zS(t,KS,HS)}Th.exports=WS});var Rh=v((Sq,Ph)=>{var Ih=Js(),VS=1,JS=Object.prototype,GS=JS.hasOwnProperty;function YS(t,e,r,n,i,s){var o=r&VS,a=Ih(t),u=a.length,l=Ih(e),c=l.length;if(u!=c&&!o)return!1;for(var h=u;h--;){var m=a[h];if(!(o?m in e:GS.call(e,m)))return!1}var d=s.get(t),f=s.get(e);if(d&&f)return d==e&&f==t;var g=!0;s.set(t,e),s.set(e,t);for(var w=o;++h<u;){m=a[h];var O=t[m],I=e[m];if(n)var T=o?n(I,O,m,e,t,s):n(O,I,m,t,e,s);if(!(T===void 0?O===I||i(O,I,r,n,s):T)){g=!1;break}w||(w=m=="constructor")}if(g&&!w){var F=t.constructor,k=e.constructor;F!=k&&"constructor"in t&&"constructor"in e&&!(typeof F=="function"&&F instanceof F&&typeof k=="function"&&k instanceof k)&&(g=!1)}return s.delete(t),s.delete(e),g}Ph.exports=YS});var Nh=v((Aq,Fh)=>{var Gs=si(),XS=zs(),ZS=vh(),QS=Rh(),qh=lr(),Mh=Pe(),Dh=or(),e1=on(),t1=1,Lh="[object Arguments]",kh="[object Array]",ai="[object Object]",r1=Object.prototype,jh=r1.hasOwnProperty;function n1(t,e,r,n,i,s){var o=Mh(t),a=Mh(e),u=o?kh:qh(t),l=a?kh:qh(e);u=u==Lh?ai:u,l=l==Lh?ai:l;var c=u==ai,h=l==ai,m=u==l;if(m&&Dh(t)){if(!Dh(e))return!1;o=!0,c=!1}if(m&&!c)return s||(s=new Gs),o||e1(t)?XS(t,e,r,n,i,s):ZS(t,e,u,r,n,i,s);if(!(r&t1)){var d=c&&jh.call(t,"__wrapped__"),f=h&&jh.call(e,"__wrapped__");if(d||f){var g=d?t.value():t,w=f?e.value():e;return s||(s=new Gs),i(g,w,r,n,s)}}return m?(s||(s=new Gs),QS(t,e,r,n,i,s)):!1}Fh.exports=n1});var zh=v((Eq,$h)=>{var i1=Nh(),Bh=Fe();function Uh(t,e,r,n,i){return t===e?!0:t==null||e==null||!Bh(t)&&!Bh(e)?t!==t&&e!==e:i1(t,e,r,n,Uh,i)}$h.exports=Uh});var Kh=v((Cq,Hh)=>{var s1=zh();function o1(t,e){return s1(t,e)}Hh.exports=o1});var Ys=v((Oq,Wh)=>{var a1=Vn(),u1=tr();function l1(t,e,r){(r!==void 0&&!u1(t[e],r)||r===void 0&&!(e in t))&&a1(t,e,r)}Wh.exports=l1});var Xs=v((ln,fr)=>{var c1=je(),Yh=typeof ln=="object"&&ln&&!ln.nodeType&&ln,Vh=Yh&&typeof fr=="object"&&fr&&!fr.nodeType&&fr,f1=Vh&&Vh.exports===Yh,Jh=f1?c1.Buffer:void 0,Gh=Jh?Jh.allocUnsafe:void 0;function h1(t,e){if(e)return t.slice();var r=t.length,n=Gh?Gh(r):new t.constructor(r);return t.copy(n),n}fr.exports=h1});var ui=v((Tq,Zh)=>{var Xh=Hs();function p1(t){var e=new t.constructor(t.byteLength);return new Xh(e).set(new Xh(t)),e}Zh.exports=p1});var Zs=v((Iq,Qh)=>{var d1=ui();function m1(t,e){var r=e?d1(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}Qh.exports=m1});var li=v((Pq,ep)=>{function g1(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}ep.exports=g1});var np=v((Rq,rp)=>{var y1=Ne(),tp=Object.create,w1=(function(){function t(){}return function(e){if(!y1(e))return{};if(tp)return tp(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})();rp.exports=w1});var ci=v((qq,ip)=>{var _1=ks(),b1=_1(Object.getPrototypeOf,Object);ip.exports=b1});var Qs=v((Mq,sp)=>{var v1=np(),x1=ci(),S1=an();function A1(t){return typeof t.constructor=="function"&&!S1(t)?v1(x1(t)):{}}sp.exports=A1});var eo=v((Dq,ap)=>{var E1=wt(),C1=ci(),O1=Fe(),T1="[object Object]",I1=Function.prototype,P1=Object.prototype,op=I1.toString,R1=P1.hasOwnProperty,q1=op.call(Object);function M1(t){if(!O1(t)||E1(t)!=T1)return!1;var e=C1(t);if(e===null)return!0;var r=R1.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&op.call(r)==q1}ap.exports=M1});var to=v((Lq,up)=>{function D1(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}up.exports=D1});var Lt=v((kq,lp)=>{var L1=Jn(),k1=Vn();function j1(t,e,r,n){var i=!r;r||(r={});for(var s=-1,o=e.length;++s<o;){var a=e[s],u=n?n(r[a],t[a],a,r,t):void 0;u===void 0&&(u=t[a]),i?k1(r,a,u):L1(r,a,u)}return r}lp.exports=j1});var fp=v((jq,cp)=>{function F1(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}cp.exports=F1});var pp=v((Fq,hp)=>{var N1=Ne(),B1=an(),U1=fp(),$1=Object.prototype,z1=$1.hasOwnProperty;function H1(t){if(!N1(t))return U1(t);var e=B1(t),r=[];for(var n in t)n=="constructor"&&(e||!z1.call(t,n))||r.push(n);return r}hp.exports=H1});var hr=v((Nq,dp)=>{var K1=Ls(),W1=pp(),V1=ir();function J1(t){return V1(t)?K1(t,!0):W1(t)}dp.exports=J1});var gp=v((Bq,mp)=>{var G1=Lt(),Y1=hr();function X1(t){return G1(t,Y1(t))}mp.exports=X1});var xp=v((Uq,vp)=>{var yp=Ys(),Z1=Xs(),Q1=Zs(),eA=li(),tA=Qs(),wp=tn(),_p=Pe(),rA=ri(),nA=or(),iA=zn(),sA=Ne(),oA=eo(),aA=on(),bp=to(),uA=gp();function lA(t,e,r,n,i,s,o){var a=bp(t,r),u=bp(e,r),l=o.get(u);if(l){yp(t,r,l);return}var c=s?s(a,u,r+"",t,e,o):void 0,h=c===void 0;if(h){var m=_p(u),d=!m&&nA(u),f=!m&&!d&&aA(u);c=u,m||d||f?_p(a)?c=a:rA(a)?c=eA(a):d?(h=!1,c=Z1(u,!0)):f?(h=!1,c=Q1(u,!0)):c=[]:oA(u)||wp(u)?(c=a,wp(a)?c=uA(a):(!sA(a)||iA(a))&&(c=tA(u))):h=!1}h&&(o.set(u,c),i(c,u,n,s,o),o.delete(u)),yp(t,r,c)}vp.exports=lA});var Ep=v(($q,Ap)=>{var cA=si(),fA=Ys(),hA=Ms(),pA=xp(),dA=Ne(),mA=hr(),gA=to();function Sp(t,e,r,n,i){t!==e&&hA(e,function(s,o){if(i||(i=new cA),dA(s))pA(t,e,o,r,Sp,n,i);else{var a=n?n(gA(t,o),s,o+"",t,e,i):void 0;a===void 0&&(a=s),fA(t,o,a)}},mA)}Ap.exports=Sp});var Op=v((zq,Cp)=>{var yA=tr(),wA=ir(),_A=Gn(),bA=Ne();function vA(t,e,r){if(!bA(r))return!1;var n=typeof e;return(n=="number"?wA(r)&&_A(e,r.length):n=="string"&&e in r)?yA(r[e],t):!1}Cp.exports=vA});var Ip=v((Hq,Tp)=>{var xA=ti(),SA=Op();function AA(t){return xA(function(e,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,o&&SA(r[0],r[1],o)&&(s=i<3?void 0:s,i=1),e=Object(e);++n<i;){var a=r[n];a&&t(e,a,n,s)}return e})}Tp.exports=AA});var Rp=v((Kq,Pp)=>{var EA=Ep(),CA=Ip(),OA=CA(function(t,e,r){EA(t,e,r)});Pp.exports=OA});var ro=v((Wq,qp)=>{function TA(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}qp.exports=TA});var Dp=v((Vq,Mp)=>{function IA(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}Mp.exports=IA});var kp=v((Jq,Lp)=>{var PA=Lt(),RA=un();function qA(t,e){return t&&PA(e,RA(e),t)}Lp.exports=qA});var Fp=v((Gq,jp)=>{var MA=Lt(),DA=hr();function LA(t,e){return t&&MA(e,DA(e),t)}jp.exports=LA});var Bp=v((Yq,Np)=>{var kA=Lt(),jA=oi();function FA(t,e){return kA(t,jA(t),e)}Np.exports=FA});var no=v((Xq,Up)=>{var NA=en(),BA=ci(),UA=oi(),$A=Vs(),zA=Object.getOwnPropertySymbols,HA=zA?function(t){for(var e=[];t;)NA(e,UA(t)),t=BA(t);return e}:$A;Up.exports=HA});var zp=v((Zq,$p)=>{var KA=Lt(),WA=no();function VA(t,e){return KA(t,WA(t),e)}$p.exports=VA});var io=v((Qq,Hp)=>{var JA=Ws(),GA=no(),YA=hr();function XA(t){return JA(t,YA,GA)}Hp.exports=XA});var Wp=v((eM,Kp)=>{var ZA=Object.prototype,QA=ZA.hasOwnProperty;function eE(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&QA.call(t,"index")&&(r.index=t.index,r.input=t.input),r}Kp.exports=eE});var Jp=v((tM,Vp)=>{var tE=ui();function rE(t,e){var r=e?tE(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}Vp.exports=rE});var Yp=v((rM,Gp)=>{var nE=/\w*$/;function iE(t){var e=new t.constructor(t.source,nE.exec(t));return e.lastIndex=t.lastIndex,e}Gp.exports=iE});var td=v((nM,ed)=>{var Xp=Mt(),Zp=Xp?Xp.prototype:void 0,Qp=Zp?Zp.valueOf:void 0;function sE(t){return Qp?Object(Qp.call(t)):{}}ed.exports=sE});var nd=v((iM,rd)=>{var oE=ui(),aE=Jp(),uE=Yp(),lE=td(),cE=Zs(),fE="[object Boolean]",hE="[object Date]",pE="[object Map]",dE="[object Number]",mE="[object RegExp]",gE="[object Set]",yE="[object String]",wE="[object Symbol]",_E="[object ArrayBuffer]",bE="[object DataView]",vE="[object Float32Array]",xE="[object Float64Array]",SE="[object Int8Array]",AE="[object Int16Array]",EE="[object Int32Array]",CE="[object Uint8Array]",OE="[object Uint8ClampedArray]",TE="[object Uint16Array]",IE="[object Uint32Array]";function PE(t,e,r){var n=t.constructor;switch(e){case _E:return oE(t);case fE:case hE:return new n(+t);case bE:return aE(t,r);case vE:case xE:case SE:case AE:case EE:case CE:case OE:case TE:case IE:return cE(t,r);case pE:return new n;case dE:case yE:return new n(t);case mE:return uE(t);case gE:return new n;case wE:return lE(t)}}rd.exports=PE});var sd=v((sM,id)=>{var RE=lr(),qE=Fe(),ME="[object Map]";function DE(t){return qE(t)&&RE(t)==ME}id.exports=DE});var ld=v((oM,ud)=>{var LE=sd(),kE=Qr(),od=ii(),ad=od&&od.isMap,jE=ad?kE(ad):LE;ud.exports=jE});var fd=v((aM,cd)=>{var FE=lr(),NE=Fe(),BE="[object Set]";function UE(t){return NE(t)&&FE(t)==BE}cd.exports=UE});var md=v((uM,dd)=>{var $E=fd(),zE=Qr(),hd=ii(),pd=hd&&hd.isSet,HE=pd?zE(pd):$E;dd.exports=HE});var bd=v((lM,_d)=>{var KE=si(),WE=Dp(),VE=Jn(),JE=kp(),GE=Fp(),YE=Xs(),XE=li(),ZE=Bp(),QE=zp(),eC=Js(),tC=io(),rC=lr(),nC=Wp(),iC=nd(),sC=Qs(),oC=Pe(),aC=or(),uC=ld(),lC=Ne(),cC=md(),fC=un(),hC=hr(),pC=1,dC=2,mC=4,gd="[object Arguments]",gC="[object Array]",yC="[object Boolean]",wC="[object Date]",_C="[object Error]",yd="[object Function]",bC="[object GeneratorFunction]",vC="[object Map]",xC="[object Number]",wd="[object Object]",SC="[object RegExp]",AC="[object Set]",EC="[object String]",CC="[object Symbol]",OC="[object WeakMap]",TC="[object ArrayBuffer]",IC="[object DataView]",PC="[object Float32Array]",RC="[object Float64Array]",qC="[object Int8Array]",MC="[object Int16Array]",DC="[object Int32Array]",LC="[object Uint8Array]",kC="[object Uint8ClampedArray]",jC="[object Uint16Array]",FC="[object Uint32Array]",ae={};ae[gd]=ae[gC]=ae[TC]=ae[IC]=ae[yC]=ae[wC]=ae[PC]=ae[RC]=ae[qC]=ae[MC]=ae[DC]=ae[vC]=ae[xC]=ae[wd]=ae[SC]=ae[AC]=ae[EC]=ae[CC]=ae[LC]=ae[kC]=ae[jC]=ae[FC]=!0;ae[_C]=ae[yd]=ae[OC]=!1;function fi(t,e,r,n,i,s){var o,a=e&pC,u=e&dC,l=e&mC;if(r&&(o=i?r(t,n,i,s):r(t)),o!==void 0)return o;if(!lC(t))return t;var c=oC(t);if(c){if(o=nC(t),!a)return XE(t,o)}else{var h=rC(t),m=h==yd||h==bC;if(aC(t))return YE(t,a);if(h==wd||h==gd||m&&!i){if(o=u||m?{}:sC(t),!a)return u?QE(t,GE(o,t)):ZE(t,JE(o,t))}else{if(!ae[h])return i?t:{};o=iC(t,h,a)}}s||(s=new KE);var d=s.get(t);if(d)return d;s.set(t,o),cC(t)?t.forEach(function(w){o.add(fi(w,e,r,w,t,s))}):uC(t)&&t.forEach(function(w,O){o.set(O,fi(w,e,r,O,t,s))});var f=l?u?tC:eC:u?hC:fC,g=c?void 0:f(t);return WE(g||t,function(w,O){g&&(O=w,w=t[O]),VE(o,O,fi(w,e,r,O,t,s))}),o}_d.exports=fi});var xd=v((cM,vd)=>{function NC(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 s=Array(i);++n<i;)s[n]=t[n+e];return s}vd.exports=NC});var Ad=v((fM,Sd)=>{var BC=Ss(),UC=xd();function $C(t,e){return e.length<2?t:BC(t,UC(e,0,-1))}Sd.exports=$C});var Cd=v((hM,Ed)=>{var zC=Zr(),HC=ro(),KC=Ad(),WC=Wn();function VC(t,e){return e=zC(e,t),t=KC(t,e),t==null||delete t[WC(HC(e))]}Ed.exports=VC});var Td=v((pM,Od)=>{var JC=eo();function GC(t){return JC(t)?void 0:t}Od.exports=GC});var Pd=v((dM,Id)=>{var YC=ni();function XC(t){var e=t==null?0:t.length;return e?YC(t,1):[]}Id.exports=XC});var qd=v((mM,Rd)=>{var ZC=Pd(),QC=Ps(),eO=Rs();function tO(t){return eO(QC(t,void 0,ZC),t+"")}Rd.exports=tO});var Dd=v((gM,Md)=>{var rO=Xr(),nO=bd(),iO=Cd(),sO=Zr(),oO=Lt(),aO=Td(),uO=qd(),lO=io(),cO=1,fO=2,hO=4,pO=uO(function(t,e){var r={};if(t==null)return r;var n=!1;e=rO(e,function(s){return s=sO(s,t),n||(n=s.length>1),s}),oO(t,lO(t),r),n&&(r=nO(r,cO|fO|hO,aO));for(var i=e.length;i--;)iO(r,e[i]);return r});Md.exports=pO});var kd=v((yM,Ld)=>{var dO=en(),mO=ni(),gO=li(),yO=Pe();function wO(){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 dO(yO(r)?gO(r):[r],mO(e,1))}Ld.exports=wO});var im=v((nm,So)=>{(function(t){if(typeof nm=="object"&&typeof So!="undefined")So.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,s,o){function a(c,h){if(!s[c]){if(!i[c]){var m=typeof Pr=="function"&⪻if(!h&&m)return m(c,!0);if(u)return u(c,!0);var d=new Error("Cannot find module '"+c+"'");throw d.code="MODULE_NOT_FOUND",d}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 Pr=="function"&&Pr,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 m=new o.MessageChannel;m.port1.onmessage=g,u=function(){m.port2.postMessage(0)}}else"document"in o&&"onreadystatechange"in o.document.createElement("script")?u=function(){var O=o.document.createElement("script");O.onreadystatechange=function(){g(),O.onreadystatechange=null,O.parentNode.removeChild(O),O=null},o.document.documentElement.appendChild(O)}:u=function(){setTimeout(g,0)};var d,f=[];function g(){d=!0;for(var O,I,T=f.length;T;){for(I=f,f=[],O=-1;++O<T;)I[O]();T=f.length}d=!1}i.exports=w;function w(O){f.push(O)===1&&!d&&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=m;function m(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)}m.prototype.catch=function(S){return this.then(null,S)},m.prototype.then=function(S,D){if(typeof S!="function"&&this.state===c||typeof D!="function"&&this.state===l)return this;var M=new this.constructor(a);if(this.state!==h){var z=this.state===c?S:D;f(M,z,this.outcome)}else this.queue.push(new d(M,S,D));return M};function d(S,D,M){this.promise=S,typeof D=="function"&&(this.onFulfilled=D,this.callFulfilled=this.otherCallFulfilled),typeof M=="function"&&(this.onRejected=M,this.callRejected=this.otherCallRejected)}d.prototype.callFulfilled=function(S){u.resolve(this.promise,S)},d.prototype.otherCallFulfilled=function(S){f(this.promise,this.onFulfilled,S)},d.prototype.callRejected=function(S){u.reject(this.promise,S)},d.prototype.otherCallRejected=function(S){f(this.promise,this.onRejected,S)};function f(S,D,M){o(function(){var z;try{z=D(M)}catch(Z){return u.reject(S,Z)}z===S?u.reject(S,new TypeError("Cannot resolve promise with itself")):u.resolve(S,z)})}u.resolve=function(S,D){var M=O(g,D);if(M.status==="error")return u.reject(S,M.value);var z=M.value;if(z)w(S,z);else{S.state=c,S.outcome=D;for(var Z=-1,Y=S.queue.length;++Z<Y;)S.queue[Z].callFulfilled(D)}return S},u.reject=function(S,D){S.state=l,S.outcome=D;for(var M=-1,z=S.queue.length;++M<z;)S.queue[M].callRejected(D);return S};function g(S){var D=S&&S.then;if(S&&(typeof S=="object"||typeof S=="function")&&typeof D=="function")return function(){D.apply(S,arguments)}}function w(S,D){var M=!1;function z(se){M||(M=!0,u.reject(S,se))}function Z(se){M||(M=!0,u.resolve(S,se))}function Y(){D(Z,z)}var re=O(Y);re.status==="error"&&z(re.value)}function O(S,D){var M={};try{M.value=S(D),M.status="success"}catch(z){M.status="error",M.value=z}return M}m.resolve=I;function I(S){return S instanceof this?S:u.resolve(new this(a),S)}m.reject=T;function T(S){var D=new this(a);return u.reject(D,S)}m.all=F;function F(S){var D=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=S.length,z=!1;if(!M)return this.resolve([]);for(var Z=new Array(M),Y=0,re=-1,se=new this(a);++re<M;)fe(S[re],re);return se;function fe(oe,Oe){D.resolve(oe).then(Ct,function(Te){z||(z=!0,u.reject(se,Te))});function Ct(Te){Z[Oe]=Te,++Y===M&&!z&&(z=!0,u.resolve(se,Z))}}}m.race=k;function k(S){var D=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=S.length,z=!1;if(!M)return this.resolve([]);for(var Z=-1,Y=new this(a);++Z<M;)re(S[Z]);return Y;function re(se){D.resolve(se).then(function(fe){z||(z=!0,u.resolve(Y,fe))},function(fe){z||(z=!0,u.reject(Y,fe))})}}},{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,_){if(!(p instanceof _))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),_=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!p||_)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch(y){return!1}}function h(p,_){p=p||[],_=_||{};try{return new Blob(p,_)}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(_.type)}}typeof Promise=="undefined"&&n(3);var m=Promise;function d(p,_){_&&p.then(function(y){_(null,y)},function(y){_(y)})}function f(p,_,y){typeof _=="function"&&p.then(_),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 O="local-forage-detect-blob-support",I=void 0,T={},F=Object.prototype.toString,k="readonly",S="readwrite";function D(p){for(var _=p.length,y=new ArrayBuffer(_),x=new Uint8Array(y),A=0;A<_;A++)x[A]=p.charCodeAt(A);return y}function M(p){return new m(function(_){var y=p.transaction(O,S),x=h([""]);y.objectStore(O).put(x,"key"),y.onabort=function(A){A.preventDefault(),A.stopPropagation(),_(!1)},y.oncomplete=function(){var A=navigator.userAgent.match(/Chrome\/(\d+)/),b=navigator.userAgent.match(/Edge\//);_(b||!A||parseInt(A[1],10)>=43)}}).catch(function(){return!1})}function z(p){return typeof I=="boolean"?m.resolve(I):M(p).then(function(_){return I=_,I})}function Z(p){var _=T[p.name],y={};y.promise=new m(function(x,A){y.resolve=x,y.reject=A}),_.deferredOperations.push(y),_.dbReady?_.dbReady=_.dbReady.then(function(){return y.promise}):_.dbReady=y.promise}function Y(p){var _=T[p.name],y=_.deferredOperations.pop();if(y)return y.resolve(),y.promise}function re(p,_){var y=T[p.name],x=y.deferredOperations.pop();if(x)return x.reject(_),x.promise}function se(p,_){return new m(function(y,x){if(T[p.name]=T[p.name]||It(),p.db)if(_)Z(p),p.db.close();else return y(p.db);var A=[p.name];_&&A.push(p.version);var b=l.open.apply(l,A);_&&(b.onupgradeneeded=function(R){var L=b.result;try{L.createObjectStore(p.storeName),R.oldVersion<=1&&L.createObjectStore(O)}catch(N){if(N.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 N}}),b.onerror=function(R){R.preventDefault(),x(b.error)},b.onsuccess=function(){var R=b.result;R.onversionchange=function(L){L.target.close()},y(R),Y(p)}})}function fe(p){return se(p,!1)}function oe(p){return se(p,!0)}function Oe(p,_){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!==_&&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 Ct(p){return new m(function(_,y){var x=new FileReader;x.onerror=y,x.onloadend=function(A){var b=btoa(A.target.result||"");_({__local_forage_encoded_blob:!0,data:b,type:p.type})},x.readAsBinaryString(p)})}function Te(p){var _=D(atob(p.data));return h([_],{type:p.type})}function Er(p){return p&&p.__local_forage_encoded_blob}function Ot(p){var _=this,y=_._initReady().then(function(){var x=T[_._dbInfo.name];if(x&&x.dbReady)return x.dbReady});return f(y,p,p),y}function Tt(p){Z(p);for(var _=T[p.name],y=_.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,fe(p).then(function(b){return p.db=b,Oe(p)?oe(p):b}).then(function(b){p.db=_.db=b;for(var R=0;R<y.length;R++)y[R]._dbInfo.db=b}).catch(function(b){throw re(p,b),b})}function Ie(p,_,y,x){x===void 0&&(x=1);try{var A=p.db.transaction(p.storeName,_);y(null,A)}catch(b){if(x>0&&(!p.db||b.name==="InvalidStateError"||b.name==="NotFoundError"))return m.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),oe(p)}).then(function(){return Tt(p).then(function(){Ie(p,_,y,x-1)})}).catch(y);y(b)}}function It(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function J(p){var _=this,y={db:null};if(p)for(var x in p)y[x]=p[x];var A=T[y.name];A||(A=It(),T[y.name]=A),A.forages.push(_),_._initReady||(_._initReady=_.ready,_.ready=Ot);var b=[];function R(){return m.resolve()}for(var L=0;L<A.forages.length;L++){var N=A.forages[L];N!==_&&b.push(N._initReady().catch(R))}var B=A.forages.slice(0);return m.all(b).then(function(){return y.db=A.db,fe(y)}).then(function($){return y.db=$,Oe(y,_._defaultConfig.version)?oe(y):$}).then(function($){y.db=A.db=$,_._dbInfo=y;for(var W=0;W<B.length;W++){var Q=B[W];Q!==_&&(Q._dbInfo.db=y.db,Q._dbInfo.version=y.version)}})}function he(p,_){var y=this;p=g(p);var x=new m(function(A,b){y.ready().then(function(){Ie(y._dbInfo,k,function(R,L){if(R)return b(R);try{var N=L.objectStore(y._dbInfo.storeName),B=N.get(p);B.onsuccess=function(){var $=B.result;$===void 0&&($=null),Er($)&&($=Te($)),A($)},B.onerror=function(){b(B.error)}}catch($){b($)}})}).catch(b)});return d(x,_),x}function Cr(p,_){var y=this,x=new m(function(A,b){y.ready().then(function(){Ie(y._dbInfo,k,function(R,L){if(R)return b(R);try{var N=L.objectStore(y._dbInfo.storeName),B=N.openCursor(),$=1;B.onsuccess=function(){var W=B.result;if(W){var Q=W.value;Er(Q)&&(Q=Te(Q));var ne=p(Q,W.key,$++);ne!==void 0?A(ne):W.continue()}else A()},B.onerror=function(){b(B.error)}}catch(W){b(W)}})}).catch(b)});return d(x,_),x}function Dm(p,_,y){var x=this;p=g(p);var A=new m(function(b,R){var L;x.ready().then(function(){return L=x._dbInfo,F.call(_)==="[object Blob]"?z(L.db).then(function(N){return N?_:Ct(_)}):_}).then(function(N){Ie(x._dbInfo,S,function(B,$){if(B)return R(B);try{var W=$.objectStore(x._dbInfo.storeName);N===null&&(N=void 0);var Q=W.put(N,p);$.oncomplete=function(){N===void 0&&(N=null),b(N)},$.onabort=$.onerror=function(){var ne=Q.error?Q.error:Q.transaction.error;R(ne)}}catch(ne){R(ne)}})}).catch(R)});return d(A,y),A}function Lm(p,_){var y=this;p=g(p);var x=new m(function(A,b){y.ready().then(function(){Ie(y._dbInfo,S,function(R,L){if(R)return b(R);try{var N=L.objectStore(y._dbInfo.storeName),B=N.delete(p);L.oncomplete=function(){A()},L.onerror=function(){b(B.error)},L.onabort=function(){var $=B.error?B.error:B.transaction.error;b($)}}catch($){b($)}})}).catch(b)});return d(x,_),x}function km(p){var _=this,y=new m(function(x,A){_.ready().then(function(){Ie(_._dbInfo,S,function(b,R){if(b)return A(b);try{var L=R.objectStore(_._dbInfo.storeName),N=L.clear();R.oncomplete=function(){x()},R.onabort=R.onerror=function(){var B=N.error?N.error:N.transaction.error;A(B)}}catch(B){A(B)}})}).catch(A)});return d(y,p),y}function jm(p){var _=this,y=new m(function(x,A){_.ready().then(function(){Ie(_._dbInfo,k,function(b,R){if(b)return A(b);try{var L=R.objectStore(_._dbInfo.storeName),N=L.count();N.onsuccess=function(){x(N.result)},N.onerror=function(){A(N.error)}}catch(B){A(B)}})}).catch(A)});return d(y,p),y}function Fm(p,_){var y=this,x=new m(function(A,b){if(p<0){A(null);return}y.ready().then(function(){Ie(y._dbInfo,k,function(R,L){if(R)return b(R);try{var N=L.objectStore(y._dbInfo.storeName),B=!1,$=N.openKeyCursor();$.onsuccess=function(){var W=$.result;if(!W){A(null);return}p===0||B?A(W.key):(B=!0,W.advance(p))},$.onerror=function(){b($.error)}}catch(W){b(W)}})}).catch(b)});return d(x,_),x}function Nm(p){var _=this,y=new m(function(x,A){_.ready().then(function(){Ie(_._dbInfo,k,function(b,R){if(b)return A(b);try{var L=R.objectStore(_._dbInfo.storeName),N=L.openKeyCursor(),B=[];N.onsuccess=function(){var $=N.result;if(!$){x(B);return}B.push($.key),$.continue()},N.onerror=function(){A(N.error)}}catch($){A($)}})}).catch(A)});return d(y,p),y}function Bm(p,_){_=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=m.reject("Invalid arguments");else{var b=p.name===y.name&&x._dbInfo.db,R=b?m.resolve(x._dbInfo.db):fe(p).then(function(L){var N=T[p.name],B=N.forages;N.db=L;for(var $=0;$<B.length;$++)B[$]._dbInfo.db=L;return L});p.storeName?A=R.then(function(L){if(L.objectStoreNames.contains(p.storeName)){var N=L.version+1;Z(p);var B=T[p.name],$=B.forages;L.close();for(var W=0;W<$.length;W++){var Q=$[W];Q._dbInfo.db=null,Q._dbInfo.version=N}var ne=new m(function(ie,ye){var ge=l.open(p.name,N);ge.onerror=function(De){var Tr=ge.result;Tr.close(),ye(De)},ge.onupgradeneeded=function(){var De=ge.result;De.deleteObjectStore(p.storeName)},ge.onsuccess=function(){var De=ge.result;De.close(),ie(De)}});return ne.then(function(ie){B.db=ie;for(var ye=0;ye<$.length;ye++){var ge=$[ye];ge._dbInfo.db=ie,Y(ge._dbInfo)}}).catch(function(ie){throw(re(p,ie)||m.resolve()).catch(function(){}),ie})}}):A=R.then(function(L){Z(p);var N=T[p.name],B=N.forages;L.close();for(var $=0;$<B.length;$++){var W=B[$];W._dbInfo.db=null}var Q=new m(function(ne,ie){var ye=l.deleteDatabase(p.name);ye.onerror=function(){var ge=ye.result;ge&&ge.close(),ie(ye.error)},ye.onblocked=function(){console.warn('dropInstance blocked for database "'+p.name+'" until all open connections are closed')},ye.onsuccess=function(){var ge=ye.result;ge&&ge.close(),ne(ge)}});return Q.then(function(ne){N.db=ne;for(var ie=0;ie<B.length;ie++){var ye=B[ie];Y(ye._dbInfo)}}).catch(function(ne){throw(re(p,ne)||m.resolve()).catch(function(){}),ne})})}return d(A,_),A}var Um={_driver:"asyncStorage",_initStorage:J,_support:c(),iterate:Cr,getItem:he,setItem:Dm,removeItem:Lm,clear:km,length:jm,key:Fm,keys:Nm,dropInstance:Bm};function $m(){return typeof openDatabase=="function"}var dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zm="~~local_forage_type~",Jo=/^~~local_forage_type~([^~]+)~/,Sn="__lfsc__:",Li=Sn.length,ki="arbf",ji="blob",Go="si08",Yo="ui08",Xo="uic8",Zo="si16",Qo="si32",ea="ur16",ta="ui32",ra="fl32",na="fl64",ia=Li+ki.length,sa=Object.prototype.toString;function oa(p){var _=p.length*.75,y=p.length,x,A=0,b,R,L,N;p[p.length-1]==="="&&(_--,p[p.length-2]==="="&&_--);var B=new ArrayBuffer(_),$=new Uint8Array(B);for(x=0;x<y;x+=4)b=dt.indexOf(p[x]),R=dt.indexOf(p[x+1]),L=dt.indexOf(p[x+2]),N=dt.indexOf(p[x+3]),$[A++]=b<<2|R>>4,$[A++]=(R&15)<<4|L>>2,$[A++]=(L&3)<<6|N&63;return B}function Fi(p){var _=new Uint8Array(p),y="",x;for(x=0;x<_.length;x+=3)y+=dt[_[x]>>2],y+=dt[(_[x]&3)<<4|_[x+1]>>4],y+=dt[(_[x+1]&15)<<2|_[x+2]>>6],y+=dt[_[x+2]&63];return _.length%3===2?y=y.substring(0,y.length-1)+"=":_.length%3===1&&(y=y.substring(0,y.length-2)+"=="),y}function Hm(p,_){var y="";if(p&&(y=sa.call(p)),p&&(y==="[object ArrayBuffer]"||p.buffer&&sa.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+=Yo:y==="[object Uint8ClampedArray]"?A+=Xo:y==="[object Int16Array]"?A+=Zo:y==="[object Uint16Array]"?A+=ea:y==="[object Int32Array]"?A+=Qo:y==="[object Uint32Array]"?A+=ta:y==="[object Float32Array]"?A+=ra:y==="[object Float64Array]"?A+=na:_(new Error("Failed to get type for BinaryArray"))),_(A+Fi(x))}else if(y==="[object Blob]"){var b=new FileReader;b.onload=function(){var R=zm+p.type+"~"+Fi(this.result);_(Sn+ji+R)},b.readAsArrayBuffer(p)}else try{_(JSON.stringify(p))}catch(R){console.error("Couldn't convert value into a JSON string: ",p),_(null,R)}}function Km(p){if(p.substring(0,Li)!==Sn)return JSON.parse(p);var _=p.substring(ia),y=p.substring(Li,ia),x;if(y===ji&&Jo.test(_)){var A=_.match(Jo);x=A[1],_=_.substring(A[0].length)}var b=oa(_);switch(y){case ki:return b;case ji:return h([b],{type:x});case Go:return new Int8Array(b);case Yo:return new Uint8Array(b);case Xo:return new Uint8ClampedArray(b);case Zo:return new Int16Array(b);case ea:return new Uint16Array(b);case Qo:return new Int32Array(b);case ta:return new Uint32Array(b);case ra:return new Float32Array(b);case na:return new Float64Array(b);default:throw new Error("Unkown type: "+y)}}var Ni={serialize:Hm,deserialize:Km,stringToBuffer:oa,bufferToString:Fi};function aa(p,_,y,x){p.executeSql("CREATE TABLE IF NOT EXISTS "+_.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],y,x)}function Wm(p){var _=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 m(function(b,R){try{y.db=openDatabase(y.name,String(y.version),y.description,y.size)}catch(L){return R(L)}y.db.transaction(function(L){aa(L,y,function(){_._dbInfo=y,b()},function(N,B){R(B)})},R)});return y.serializer=Ni,A}function mt(p,_,y,x,A,b){p.executeSql(y,x,A,function(R,L){L.code===L.SYNTAX_ERR?R.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[_.storeName],function(N,B){B.rows.length?b(N,L):aa(N,_,function(){N.executeSql(y,x,A,b)},b)},b):b(R,L)},b)}function Vm(p,_){var y=this;p=g(p);var x=new m(function(A,b){y.ready().then(function(){var R=y._dbInfo;R.db.transaction(function(L){mt(L,R,"SELECT * FROM "+R.storeName+" WHERE key = ? LIMIT 1",[p],function(N,B){var $=B.rows.length?B.rows.item(0).value:null;$&&($=R.serializer.deserialize($)),A($)},function(N,B){b(B)})})}).catch(b)});return d(x,_),x}function Jm(p,_){var y=this,x=new m(function(A,b){y.ready().then(function(){var R=y._dbInfo;R.db.transaction(function(L){mt(L,R,"SELECT * FROM "+R.storeName,[],function(N,B){for(var $=B.rows,W=$.length,Q=0;Q<W;Q++){var ne=$.item(Q),ie=ne.value;if(ie&&(ie=R.serializer.deserialize(ie)),ie=p(ie,ne.key,Q+1),ie!==void 0){A(ie);return}}A()},function(N,B){b(B)})})}).catch(b)});return d(x,_),x}function ua(p,_,y,x){var A=this;p=g(p);var b=new m(function(R,L){A.ready().then(function(){_===void 0&&(_=null);var N=_,B=A._dbInfo;B.serializer.serialize(_,function($,W){W?L(W):B.db.transaction(function(Q){mt(Q,B,"INSERT OR REPLACE INTO "+B.storeName+" (key, value) VALUES (?, ?)",[p,$],function(){R(N)},function(ne,ie){L(ie)})},function(Q){if(Q.code===Q.QUOTA_ERR){if(x>0){R(ua.apply(A,[p,N,y,x-1]));return}L(Q)}})})}).catch(L)});return d(b,y),b}function Gm(p,_,y){return ua.apply(this,[p,_,y,1])}function Ym(p,_){var y=this;p=g(p);var x=new m(function(A,b){y.ready().then(function(){var R=y._dbInfo;R.db.transaction(function(L){mt(L,R,"DELETE FROM "+R.storeName+" WHERE key = ?",[p],function(){A()},function(N,B){b(B)})})}).catch(b)});return d(x,_),x}function Xm(p){var _=this,y=new m(function(x,A){_.ready().then(function(){var b=_._dbInfo;b.db.transaction(function(R){mt(R,b,"DELETE FROM "+b.storeName,[],function(){x()},function(L,N){A(N)})})}).catch(A)});return d(y,p),y}function Zm(p){var _=this,y=new m(function(x,A){_.ready().then(function(){var b=_._dbInfo;b.db.transaction(function(R){mt(R,b,"SELECT COUNT(key) as c FROM "+b.storeName,[],function(L,N){var B=N.rows.item(0).c;x(B)},function(L,N){A(N)})})}).catch(A)});return d(y,p),y}function Qm(p,_){var y=this,x=new m(function(A,b){y.ready().then(function(){var R=y._dbInfo;R.db.transaction(function(L){mt(L,R,"SELECT key FROM "+R.storeName+" WHERE id = ? LIMIT 1",[p+1],function(N,B){var $=B.rows.length?B.rows.item(0).key:null;A($)},function(N,B){b(B)})})}).catch(b)});return d(x,_),x}function eg(p){var _=this,y=new m(function(x,A){_.ready().then(function(){var b=_._dbInfo;b.db.transaction(function(R){mt(R,b,"SELECT key FROM "+b.storeName,[],function(L,N){for(var B=[],$=0;$<N.rows.length;$++)B.push(N.rows.item($).key);x(B)},function(L,N){A(N)})})}).catch(A)});return d(y,p),y}function tg(p){return new m(function(_,y){p.transaction(function(x){x.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(A,b){for(var R=[],L=0;L<b.rows.length;L++)R.push(b.rows.item(L).name);_({db:p,storeNames:R})},function(A,b){y(b)})},function(x){y(x)})})}function rg(p,_){_=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 m(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(tg(R))}).then(function(b){return new m(function(R,L){b.db.transaction(function(N){function B(ne){return new m(function(ie,ye){N.executeSql("DROP TABLE IF EXISTS "+ne,[],function(){ie()},function(ge,De){ye(De)})})}for(var $=[],W=0,Q=b.storeNames.length;W<Q;W++)$.push(B(b.storeNames[W]));m.all($).then(function(){R()}).catch(function(ne){L(ne)})},function(N){L(N)})})}):A=m.reject("Invalid arguments"),d(A,_),A}var ng={_driver:"webSQLStorage",_initStorage:Wm,_support:$m(),iterate:Jm,getItem:Vm,setItem:Gm,removeItem:Ym,clear:Xm,length:Zm,key:Qm,keys:eg,dropInstance:rg};function ig(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch(p){return!1}}function la(p,_){var y=p.name+"/";return p.storeName!==_.storeName&&(y+=p.storeName+"/"),y}function sg(){var p="_localforage_support_test";try{return localStorage.setItem(p,!0),localStorage.removeItem(p),!1}catch(_){return!0}}function og(){return!sg()||localStorage.length>0}function ag(p){var _=this,y={};if(p)for(var x in p)y[x]=p[x];return y.keyPrefix=la(p,_._defaultConfig),og()?(_._dbInfo=y,y.serializer=Ni,m.resolve()):m.reject()}function ug(p){var _=this,y=_.ready().then(function(){for(var x=_._dbInfo.keyPrefix,A=localStorage.length-1;A>=0;A--){var b=localStorage.key(A);b.indexOf(x)===0&&localStorage.removeItem(b)}});return d(y,p),y}function lg(p,_){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 d(x,_),x}function cg(p,_){var y=this,x=y.ready().then(function(){for(var A=y._dbInfo,b=A.keyPrefix,R=b.length,L=localStorage.length,N=1,B=0;B<L;B++){var $=localStorage.key(B);if($.indexOf(b)===0){var W=localStorage.getItem($);if(W&&(W=A.serializer.deserialize(W)),W=p(W,$.substring(R),N++),W!==void 0)return W}}});return d(x,_),x}function fg(p,_){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 d(x,_),x}function hg(p){var _=this,y=_.ready().then(function(){for(var x=_._dbInfo,A=localStorage.length,b=[],R=0;R<A;R++){var L=localStorage.key(R);L.indexOf(x.keyPrefix)===0&&b.push(L.substring(x.keyPrefix.length))}return b});return d(y,p),y}function pg(p){var _=this,y=_.keys().then(function(x){return x.length});return d(y,p),y}function dg(p,_){var y=this;p=g(p);var x=y.ready().then(function(){var A=y._dbInfo;localStorage.removeItem(A.keyPrefix+p)});return d(x,_),x}function mg(p,_,y){var x=this;p=g(p);var A=x.ready().then(function(){_===void 0&&(_=null);var b=_;return new m(function(R,L){var N=x._dbInfo;N.serializer.serialize(_,function(B,$){if($)L($);else try{localStorage.setItem(N.keyPrefix+p,B),R(b)}catch(W){(W.name==="QuotaExceededError"||W.name==="NS_ERROR_DOM_QUOTA_REACHED")&&L(W),L(W)}})})});return d(A,y),A}function gg(p,_){if(_=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 m(function(b){p.storeName?b(la(p,x._defaultConfig)):b(p.name+"/")}).then(function(b){for(var R=localStorage.length-1;R>=0;R--){var L=localStorage.key(R);L.indexOf(b)===0&&localStorage.removeItem(L)}}):A=m.reject("Invalid arguments"),d(A,_),A}var yg={_driver:"localStorageWrapper",_initStorage:ag,_support:ig(),iterate:cg,getItem:lg,setItem:mg,removeItem:dg,clear:ug,length:pg,key:fg,keys:hg,dropInstance:gg},wg=function(_,y){return _===y||typeof _=="number"&&typeof y=="number"&&isNaN(_)&&isNaN(y)},_g=function(_,y){for(var x=_.length,A=0;A<x;){if(wg(_[A],y))return!0;A++}return!1},ca=Array.isArray||function(p){return Object.prototype.toString.call(p)==="[object Array]"},Or={},fa={},Kt={INDEXEDDB:Um,WEBSQL:ng,LOCALSTORAGE:yg},bg=[Kt.INDEXEDDB._driver,Kt.WEBSQL._driver,Kt.LOCALSTORAGE._driver],An=["dropInstance"],Bi=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(An),vg={description:"",driver:bg.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function xg(p,_){p[_]=function(){var y=arguments;return p.ready().then(function(){return p[_].apply(p,y)})}}function Ui(){for(var p=1;p<arguments.length;p++){var _=arguments[p];if(_)for(var y in _)_.hasOwnProperty(y)&&(ca(_[y])?arguments[0][y]=_[y].slice():arguments[0][y]=_[y])}return arguments[0]}var Sg=(function(){function p(_){a(this,p);for(var y in Kt)if(Kt.hasOwnProperty(y)){var x=Kt[y],A=x._driver;this[y]=A,Or[A]||this.defineDriver(x)}this._defaultConfig=Ui({},vg),this._config=Ui({},this._defaultConfig,_),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 m(function(R,L){try{var N=y._driver,B=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!y._driver){L(B);return}for(var $=Bi.concat("_initStorage"),W=0,Q=$.length;W<Q;W++){var ne=$[W],ie=!_g(An,ne);if((ie||y[ne])&&typeof y[ne]!="function"){L(B);return}}var ye=function(){for(var Tr=function(Cg){return function(){var Og=new Error("Method "+Cg+" is not implemented by the current driver"),ha=m.reject(Og);return d(ha,arguments[arguments.length-1]),ha}},$i=0,Eg=An.length;$i<Eg;$i++){var zi=An[$i];y[zi]||(y[zi]=Tr(zi))}};ye();var ge=function(Tr){Or[N]&&console.info("Redefining LocalForage driver: "+N),Or[N]=y,fa[N]=Tr,R()};"_support"in y?y._support&&typeof y._support=="function"?y._support().then(ge,L):ge(!!y._support):ge(!0)}catch(De){L(De)}});return f(b,x,A),b},p.prototype.driver=function(){return this._driver||null},p.prototype.getDriver=function(y,x,A){var b=Or[y]?m.resolve(Or[y]):m.reject(new Error("Driver not found."));return f(b,x,A),b},p.prototype.getSerializer=function(y){var x=m.resolve(Ni);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;ca(y)||(y=[y]);var R=this._getSupportedDrivers(y);function L(){b._config.driver=b.driver()}function N(W){return b._extend(W),L(),b._ready=b._initStorage(b._config),b._ready}function B(W){return function(){var Q=0;function ne(){for(;Q<W.length;){var ie=W[Q];return Q++,b._dbInfo=null,b._ready=null,b.getDriver(ie).then(N).catch(ne)}L();var ye=new Error("No available storage method found.");return b._driverSet=m.reject(ye),b._driverSet}return ne()}}var $=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=$.then(function(){var W=R[0];return b._dbInfo=null,b._ready=null,b.getDriver(W).then(function(Q){b._driver=Q._driver,L(),b._wrapLibraryMethodsWithReady(),b._initDriver=B(R)})}).catch(function(){L();var W=new Error("No available storage method found.");return b._driverSet=m.reject(W),b._driverSet}),f(this._driverSet,x,A),this._driverSet},p.prototype.supports=function(y){return!!fa[y]},p.prototype._extend=function(y){Ui(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=Bi.length;y<x;y++)xg(this,Bi[y])},p.prototype.createInstance=function(y){return new p(y)},p})(),Ag=new Sg;i.exports=Ag},{3:3}]},{},[4])(4)})});var Po=v(()=>{});var C3={};Pt(C3,{BaseProvider:()=>X,CocodaSDK:()=>Ar,ConceptApiProvider:()=>$e,LabelSearchSuggestionProvider:()=>nt,LobidApiProvider:()=>lt,LocApiProvider:()=>st,LocalMappingsProvider:()=>xt,MappingsApiProvider:()=>Ue,ModApiProvider:()=>ct,MyCoReProvider:()=>ht,NoTApiProvider:()=>pt,OccurrencesApiProvider:()=>rt,OlsApiProvider:()=>ft,ReconciliationApiProvider:()=>Xe,SkohubProvider:()=>at,SkosmosApiProvider:()=>it,addAllProviders:()=>E3,cdk:()=>Mm,errors:()=>Ae,utils:()=>Ft});var Ae={};Pt(Ae,{BackendError:()=>qr,BackendUnavailableError:()=>Mr,CDKError:()=>ve,InvalidOrMissingParameterError:()=>U,InvalidProviderError:()=>Vt,InvalidRequestError:()=>Ve,MethodNotImplementedError:()=>Rr,MissingApiUrlError:()=>qe,NetworkError:()=>Dr});var ve=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}},Rr=class extends ve{constructor(i){var s=i,{method:e,message:r=""}=s,n=H(s,["method","message"]);n.message=`Method not implemented: ${e} (${r})`,super(n)}},U=class extends ve{constructor(i){var s=i,{parameter:e,message:r=""}=s,n=H(s,["parameter","message"]);n.message=`Invalid or missing parameter: ${e} (${r})`,super(n)}},Ve=class extends ve{},qr=class extends ve{},Mr=class extends ve{},Dr=class extends ve{},qe=class extends ve{},Vt=class extends ve{};function Lr(t,e){return function(){return t.apply(e,arguments)}}var{toString:kg}=Object.prototype,{getPrototypeOf:Yi}=Object,On=(t=>e=>{let r=kg.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Le=t=>(t=t.toLowerCase(),e=>On(e)===t),Tn=t=>e=>typeof e===t,{isArray:Jt}=Array,kr=Tn("undefined");function jg(t){return t!==null&&!kr(t)&&t.constructor!==null&&!kr(t.constructor)&&Me(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var wa=Le("ArrayBuffer");function Fg(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&wa(t.buffer),e}var Ng=Tn("string"),Me=Tn("function"),_a=Tn("number"),In=t=>t!==null&&typeof t=="object",Bg=t=>t===!0||t===!1,Cn=t=>{if(On(t)!=="object")return!1;let e=Yi(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Ug=Le("Date"),$g=Le("File"),zg=Le("Blob"),Hg=Le("FileList"),Kg=t=>In(t)&&Me(t.pipe),Wg=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Me(t.append)&&((e=On(t))==="formdata"||e==="object"&&Me(t.toString)&&t.toString()==="[object FormData]"))},Vg=Le("URLSearchParams"),[Jg,Gg,Yg,Xg]=["ReadableStream","Request","Response","Headers"].map(Le),Zg=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jr(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t=="undefined")return;let n,i;if(typeof t!="object"&&(t=[t]),Jt(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{let s=r?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length,a;for(n=0;n<o;n++)a=s[n],e.call(null,t[a],a,t)}}function ba(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 qt=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,va=t=>!kr(t)&&t!==qt;function Gi(){let{caseless:t}=va(this)&&this||{},e={},r=(n,i)=>{let s=t&&ba(e,i)||i;Cn(e[s])&&Cn(n)?e[s]=Gi(e[s],n):Cn(n)?e[s]=Gi({},n):Jt(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&jr(arguments[n],r);return e}var Qg=(t,e,r,{allOwnKeys:n}={})=>(jr(e,(i,s)=>{r&&Me(i)?t[s]=Lr(i,r):t[s]=i},{allOwnKeys:n}),t),e0=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),t0=(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)},r0=(t,e,r,n)=>{let i,s,o,a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!n||n(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=r!==!1&&Yi(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},n0=(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},i0=t=>{if(!t)return null;if(Jt(t))return t;let e=t.length;if(!_a(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},s0=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&Yi(Uint8Array)),o0=(t,e)=>{let n=(t&&t[Symbol.iterator]).call(t),i;for(;(i=n.next())&&!i.done;){let s=i.value;e.call(t,s[0],s[1])}},a0=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},u0=Le("HTMLFormElement"),l0=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),ga=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),c0=Le("RegExp"),xa=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};jr(r,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(n[s]=o||i)}),Object.defineProperties(t,n)},f0=t=>{xa(t,(e,r)=>{if(Me(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=t[r];if(Me(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+"'")})}})},h0=(t,e)=>{let r={},n=i=>{i.forEach(s=>{r[s]=!0})};return Jt(t)?n(t):n(String(t).split(e)),r},p0=()=>{},d0=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Ji="abcdefghijklmnopqrstuvwxyz",ya="0123456789",Sa={DIGIT:ya,ALPHA:Ji,ALPHA_DIGIT:Ji+Ji.toUpperCase()+ya},m0=(t=16,e=Sa.ALPHA_DIGIT)=>{let r="",{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r};function g0(t){return!!(t&&Me(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}var y0=t=>{let e=new Array(10),r=(n,i)=>{if(In(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;let s=Jt(n)?[]:{};return jr(n,(o,a)=>{let u=r(o,i+1);!kr(u)&&(s[a]=u)}),e[i]=void 0,s}}return n};return r(t,0)},w0=Le("AsyncFunction"),_0=t=>t&&(In(t)||Me(t))&&Me(t.then)&&Me(t.catch),Aa=((t,e)=>t?setImmediate:e?((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",Me(qt.postMessage)),b0=typeof queueMicrotask!="undefined"?queueMicrotask.bind(qt):typeof process!="undefined"&&process.nextTick||Aa,C={isArray:Jt,isArrayBuffer:wa,isBuffer:jg,isFormData:Wg,isArrayBufferView:Fg,isString:Ng,isNumber:_a,isBoolean:Bg,isObject:In,isPlainObject:Cn,isReadableStream:Jg,isRequest:Gg,isResponse:Yg,isHeaders:Xg,isUndefined:kr,isDate:Ug,isFile:$g,isBlob:zg,isRegExp:c0,isFunction:Me,isStream:Kg,isURLSearchParams:Vg,isTypedArray:s0,isFileList:Hg,forEach:jr,merge:Gi,extend:Qg,trim:Zg,stripBOM:e0,inherits:t0,toFlatObject:r0,kindOf:On,kindOfTest:Le,endsWith:n0,toArray:i0,forEachEntry:o0,matchAll:a0,isHTMLForm:u0,hasOwnProperty:ga,hasOwnProp:ga,reduceDescriptors:xa,freezeMethods:f0,toObjectSet:h0,toCamelCase:l0,noop:p0,toFiniteNumber:d0,findKey:ba,global:qt,isContextDefined:va,ALPHABET:Sa,generateString:m0,isSpecCompliantForm:g0,toJSONObject:y0,isAsyncFn:w0,isThenable:_0,setImmediate:Aa,asap:b0};function Gt(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)}C.inherits(Gt,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:C.toJSONObject(this.config),code:this.code,status:this.status}}});var Ea=Gt.prototype,Ca={};["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=>{Ca[t]={value:t}});Object.defineProperties(Gt,Ca);Object.defineProperty(Ea,"isAxiosError",{value:!0});Gt.from=(t,e,r,n,i,s)=>{let o=Object.create(Ea);return C.toFlatObject(t,o,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),Gt.call(o,t.message,e,r,n,i),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};var G=Gt;var Pn=null;function Xi(t){return C.isPlainObject(t)||C.isArray(t)}function Ta(t){return C.endsWith(t,"[]")?t.slice(0,-2):t}function Oa(t,e,r){return t?t.concat(e).map(function(i,s){return i=Ta(i),!r&&s?"["+i+"]":i}).join(r?".":""):e}function v0(t){return C.isArray(t)&&!t.some(Xi)}var x0=C.toFlatObject(C,{},null,function(e){return/^is[A-Z]/.test(e)});function S0(t,e,r){if(!C.isObject(t))throw new TypeError("target must be an object");e=e||new(Pn||FormData),r=C.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,w){return!C.isUndefined(w[g])});let n=r.metaTokens,i=r.visitor||c,s=r.dots,o=r.indexes,u=(r.Blob||typeof Blob!="undefined"&&Blob)&&C.isSpecCompliantForm(e);if(!C.isFunction(i))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(C.isDate(f))return f.toISOString();if(!u&&C.isBlob(f))throw new G("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(f)||C.isTypedArray(f)?u&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function c(f,g,w){let O=f;if(f&&!w&&typeof f=="object"){if(C.endsWith(g,"{}"))g=n?g:g.slice(0,-2),f=JSON.stringify(f);else if(C.isArray(f)&&v0(f)||(C.isFileList(f)||C.endsWith(g,"[]"))&&(O=C.toArray(f)))return g=Ta(g),O.forEach(function(T,F){!(C.isUndefined(T)||T===null)&&e.append(o===!0?Oa([g],F,s):o===null?g:g+"[]",l(T))}),!1}return Xi(f)?!0:(e.append(Oa(w,g,s),l(f)),!1)}let h=[],m=Object.assign(x0,{defaultVisitor:c,convertValue:l,isVisitable:Xi});function d(f,g){if(!C.isUndefined(f)){if(h.indexOf(f)!==-1)throw Error("Circular reference detected in "+g.join("."));h.push(f),C.forEach(f,function(O,I){(!(C.isUndefined(O)||O===null)&&i.call(e,O,C.isString(I)?I.trim():I,g,m))===!0&&d(O,g?g.concat(I):[I])}),h.pop()}}if(!C.isObject(t))throw new TypeError("data must be an object");return d(t),e}var yt=S0;function Ia(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Pa(t,e){this._pairs=[],t&&yt(t,this,e)}var Ra=Pa.prototype;Ra.append=function(e,r){this._pairs.push([e,r])};Ra.toString=function(e){let r=e?function(n){return e.call(this,n,Ia)}:Ia;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};var Rn=Pa;function A0(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Fr(t,e,r){if(!e)return t;let n=r&&r.encode||A0;C.isFunction(r)&&(r={serialize:r});let i=r&&r.serialize,s;if(i?s=i(e,r):s=C.isURLSearchParams(e)?e.toString():new Rn(e,r).toString(n),s){let o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}var Zi=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){C.forEach(this.handlers,function(n){n!==null&&e(n)})}},Qi=Zi;var qn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var qa=typeof URLSearchParams!="undefined"?URLSearchParams:Rn;var Ma=typeof FormData!="undefined"?FormData:null;var Da=typeof Blob!="undefined"?Blob:null;var La={isBrowser:!0,classes:{URLSearchParams:qa,FormData:Ma,Blob:Da},protocols:["http","https","file","blob","url","data"]};var rs={};Pt(rs,{hasBrowserEnv:()=>ts,hasStandardBrowserEnv:()=>E0,hasStandardBrowserWebWorkerEnv:()=>C0,navigator:()=>es,origin:()=>O0});var ts=typeof window!="undefined"&&typeof document!="undefined",es=typeof navigator=="object"&&navigator||void 0,E0=ts&&(!es||["ReactNative","NativeScript","NS"].indexOf(es.product)<0),C0=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",O0=ts&&window.location.href||"http://localhost";var pe=P(P({},rs),La);function ns(t,e){return yt(t,new pe.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,s){return pe.isNode&&C.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function T0(t){return C.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function I0(t){let e={},r=Object.keys(t),n,i=r.length,s;for(n=0;n<i;n++)s=r[n],e[s]=t[s];return e}function P0(t){function e(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&&C.isArray(i)?i.length:o,u?(C.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a):((!i[o]||!C.isObject(i[o]))&&(i[o]=[]),e(r,n,i[o],s)&&C.isArray(i[o])&&(i[o]=I0(i[o])),!a)}if(C.isFormData(t)&&C.isFunction(t.entries)){let r={};return C.forEachEntry(t,(n,i)=>{e(T0(n),i,r,0)}),r}return null}var Mn=P0;function R0(t,e,r){if(C.isString(t))try{return(e||JSON.parse)(t),C.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var is={transitional:qn,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let n=r.getContentType()||"",i=n.indexOf("application/json")>-1,s=C.isObject(e);if(s&&C.isHTMLForm(e)&&(e=new FormData(e)),C.isFormData(e))return i?JSON.stringify(Mn(e)):e;if(C.isArrayBuffer(e)||C.isBuffer(e)||C.isStream(e)||C.isFile(e)||C.isBlob(e)||C.isReadableStream(e))return e;if(C.isArrayBufferView(e))return e.buffer;if(C.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ns(e,this.formSerializer).toString();if((a=C.isFileList(e))||n.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return yt(a?{"files[]":e}:e,u&&new u,this.formSerializer)}}return s||i?(r.setContentType("application/json",!1),R0(e)):e}],transformResponse:[function(e){let r=this.transitional||is.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(C.isResponse(e)||C.isReadableStream(e))return e;if(e&&C.isString(e)&&(n&&!this.responseType||i)){let o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?G.from(a,G.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pe.classes.FormData,Blob:pe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch"],t=>{is.headers[t]={}});var Yt=is;var q0=C.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"]),ka=t=>{let e={},r,n,i;return t&&t.split(`
|
|
9
|
-
`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||e[r]&&
|
|
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[ja]=this[ja]={accessors:{}}).accessors,i=this.prototype;function s(o){let a=Nr(o);n[a]||(k0(i,o),n[a]=!0)}return C.isArray(e)?e.forEach(s):s(e),this}};Xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);C.reduceDescriptors(Xt.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});C.freezeMethods(Xt);var be=Xt;function Br(t,e){let r=this||Yt,n=e||r,i=be.from(n.headers),s=n.data;return C.forEach(t,function(a){s=a.call(r,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function Ur(t){return!!(t&&t.__CANCEL__)}function Fa(t,e,r){G.call(this,t==null?"canceled":t,G.ERR_CANCELED,e,r),this.name="CanceledError"}C.inherits(Fa,G,{__CANCEL__:!0});var Je=Fa;function $r(t,e,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new G("Request failed with status code "+r.status,[G.ERR_BAD_REQUEST,G.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function os(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function j0(t,e){t=t||10;let r=new Array(t),n=new Array(t),i=0,s=0,o;return e=e!==void 0?e:1e3,function(u){let l=Date.now(),c=n[s];o||(o=l),r[i]=u,n[i]=l;let h=s,m=0;for(;h!==i;)m+=r[h++],h=h%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),l-o<e)return;let d=c&&l-c;return d?Math.round(m*1e3/d):void 0}}var Na=j0;function F0(t,e){let r=0,n=1e3/e,i,s,o=(l,c=Date.now())=>{r=c,i=null,s&&(clearTimeout(s),s=null),t.apply(null,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 Ba=F0;var Zt=(t,e,r=3)=>{let n=0,i=Na(50,250);return Ba(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,[e?"download":"upload"]:!0};t(h)},r)},as=(t,e)=>{let r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},us=t=>(...e)=>C.asap(()=>t(...e));var Ua=pe.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,pe.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(pe.origin),pe.navigator&&/(msie|trident)/i.test(pe.navigator.userAgent)):()=>!0;var $a=pe.hasStandardBrowserEnv?{write(t,e,r,n,i,s){let o=[t+"="+encodeURIComponent(e)];C.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),C.isString(n)&&o.push("path="+n),C.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.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 ls(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function cs(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function zr(t,e){return t&&!ls(e)?cs(t,e):e}var za=t=>t instanceof be?P({},t):t;function ke(t,e){e=e||{};let r={};function n(l,c,h,m){return C.isPlainObject(l)&&C.isPlainObject(c)?C.merge.call({caseless:m},l,c):C.isPlainObject(c)?C.merge({},c):C.isArray(c)?c.slice():c}function i(l,c,h,m){if(C.isUndefined(c)){if(!C.isUndefined(l))return n(void 0,l,h,m)}else return n(l,c,h,m)}function s(l,c){if(!C.isUndefined(c))return n(void 0,c)}function o(l,c){if(C.isUndefined(c)){if(!C.isUndefined(l))return n(void 0,l)}else return n(void 0,c)}function a(l,c,h){if(h in e)return n(l,c);if(h in t)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(za(l),za(c),h,!0)};return C.forEach(Object.keys(Object.assign({},t,e)),function(c){let h=u[c]||i,m=h(t[c],e[c],c);C.isUndefined(m)&&h!==a||(r[c]=m)}),r}var Ln=t=>{let e=ke({},t),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=e;e.headers=o=be.from(o),e.url=Fr(zr(e.baseURL,e.url),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let u;if(C.isFormData(r)){if(pe.hasStandardBrowserEnv||pe.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){let[l,...c]=u?u.split(";").map(h=>h.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...c].join("; "))}}if(pe.hasStandardBrowserEnv&&(n&&C.isFunction(n)&&(n=n(e)),n||n!==!1&&Ua(e.url))){let l=i&&s&&$a.read(s);l&&o.set(i,l)}return e};var N0=typeof XMLHttpRequest!="undefined",Ha=N0&&function(t){return new Promise(function(r,n){let i=Ln(t),s=i.data,o=be.from(i.headers).normalize(),{responseType:a,onUploadProgress:u,onDownloadProgress:l}=i,c,h,m,d,f;function g(){d&&d(),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 O(){if(!w)return;let T=be.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:T,config:t,request:w};$r(function(D){r(D),g()},function(D){n(D),g()},k),w=null}"onloadend"in w?w.onloadend=O:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(O)},w.onabort=function(){w&&(n(new G("Request aborted",G.ECONNABORTED,t,w)),w=null)},w.onerror=function(){n(new G("Network Error",G.ERR_NETWORK,t,w)),w=null},w.ontimeout=function(){let F=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",k=i.transitional||qn;i.timeoutErrorMessage&&(F=i.timeoutErrorMessage),n(new G(F,k.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,t,w)),w=null},s===void 0&&o.setContentType(null),"setRequestHeader"in w&&C.forEach(o.toJSON(),function(F,k){w.setRequestHeader(k,F)}),C.isUndefined(i.withCredentials)||(w.withCredentials=!!i.withCredentials),a&&a!=="json"&&(w.responseType=i.responseType),l&&([m,f]=Zt(l,!0),w.addEventListener("progress",m)),u&&w.upload&&([h,d]=Zt(u),w.upload.addEventListener("progress",h),w.upload.addEventListener("loadend",d)),(i.cancelToken||i.signal)&&(c=T=>{w&&(n(!T||T.type?new Je(null,t,w):T),w.abort(),w=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));let I=os(i.url);if(I&&pe.protocols.indexOf(I)===-1){n(new G("Unsupported protocol "+I+":",G.ERR_BAD_REQUEST,t));return}w.send(s||null)})};var B0=(t,e)=>{let{length:r}=t=t?t.filter(Boolean):[];if(e||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 G?c:new Je(c instanceof Error?c.message:c))}},o=e&&setTimeout(()=>{o=null,s(new G(`timeout ${e} of ms exceeded`,G.ETIMEDOUT))},e),a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),t=null)};t.forEach(l=>l.addEventListener("abort",s));let{signal:u}=n;return u.unsubscribe=()=>C.asap(a),u}},Ka=B0;var U0=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},$0=function(t,e){return Wi(this,null,function*(){try{for(var r=ma(z0(t)),n,i,s;n=!(i=yield new Rt(r.next())).done;n=!1){let o=i.value;yield*Vi(U0(o,e))}}catch(i){s=[i]}finally{try{n&&(i=r.return)&&(yield new Rt(i.call(r)))}finally{if(s)throw s[0]}}})},z0=function(t){return Wi(this,null,function*(){if(t[Symbol.asyncIterator]){yield*Vi(t);return}let e=t.getReader();try{for(;;){let{done:r,value:n}=yield new Rt(e.read());if(r)break;yield n}}finally{yield new Rt(e.cancel())}})},fs=(t,e,r,n)=>{let i=$0(t,e),s=0,o,a=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({pull(l){return E(this,null,function*(){try{let{done:c,value:h}=yield i.next();if(c){a(),l.close();return}let m=h.byteLength;if(r){let d=s+=m;r(d)}l.enqueue(new Uint8Array(h))}catch(c){throw a(c),c}})},cancel(l){return a(l),i.return()}},{highWaterMark:2})};var jn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Va=jn&&typeof ReadableStream=="function",H0=jn&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):t=>E(null,null,function*(){return new Uint8Array(yield new Response(t).arrayBuffer())})),Ja=(t,...e)=>{try{return!!t(...e)}catch(r){return!1}},K0=Va&&Ja(()=>{let t=!1,e=new Request(pe.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Wa=64*1024,hs=Va&&Ja(()=>C.isReadableStream(new Response("").body)),kn={stream:hs&&(t=>t.body)};jn&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!kn[e]&&(kn[e]=C.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new G(`Response type '${e}' is not supported`,G.ERR_NOT_SUPPORT,n)})})})(new Response);var W0=t=>E(null,null,function*(){if(t==null)return 0;if(C.isBlob(t))return t.size;if(C.isSpecCompliantForm(t))return(yield new Request(pe.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(C.isArrayBufferView(t)||C.isArrayBuffer(t))return t.byteLength;if(C.isURLSearchParams(t)&&(t=t+""),C.isString(t))return(yield H0(t)).byteLength}),V0=(t,e)=>E(null,null,function*(){let r=C.toFiniteNumber(t.getContentLength());return r==null?W0(e):r}),Ga=jn&&(t=>E(null,null,function*(){let{url:e,method:r,data:n,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:u,responseType:l,headers:c,withCredentials:h="same-origin",fetchOptions:m}=Ln(t);l=l?(l+"").toLowerCase():"text";let d=Ka([i,s&&s.toAbortSignal()],o),f,g=d&&d.unsubscribe&&(()=>{d.unsubscribe()}),w;try{if(u&&K0&&r!=="get"&&r!=="head"&&(w=yield V0(c,n))!==0){let k=new Request(e,{method:"POST",body:n,duplex:"half"}),S;if(C.isFormData(n)&&(S=k.headers.get("content-type"))&&c.setContentType(S),k.body){let[D,M]=as(w,Zt(us(u)));n=fs(k.body,Wa,D,M)}}C.isString(h)||(h=h?"include":"omit");let O="credentials"in Request.prototype;f=new Request(e,j(P({},m),{signal:d,method:r.toUpperCase(),headers:c.normalize().toJSON(),body:n,duplex:"half",credentials:O?h:void 0}));let I=yield fetch(f),T=hs&&(l==="stream"||l==="response");if(hs&&(a||T&&g)){let k={};["status","statusText","headers"].forEach(z=>{k[z]=I[z]});let S=C.toFiniteNumber(I.headers.get("content-length")),[D,M]=a&&as(S,Zt(us(a),!0))||[];I=new Response(fs(I.body,Wa,D,()=>{M&&M(),g&&g()}),k)}l=l||"text";let F=yield kn[C.findKey(kn,l)||"text"](I,t);return!T&&g&&g(),yield new Promise((k,S)=>{$r(k,S,{data:F,headers:be.from(I.headers),status:I.status,statusText:I.statusText,config:t,request:f})})}catch(O){throw g&&g(),O&&O.name==="TypeError"&&/fetch/i.test(O.message)?Object.assign(new G("Network Error",G.ERR_NETWORK,t,f),{cause:O.cause||O}):G.from(O,O&&O.code,t,f)}}));var ps={http:Pn,xhr:Ha,fetch:Ga};C.forEach(ps,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(r){}Object.defineProperty(t,"adapterName",{value:e})}});var Ya=t=>`- ${t}`,J0=t=>C.isFunction(t)||t===null||t===!1,Fn={getAdapter:t=>{t=C.isArray(t)?t:[t];let{length:e}=t,r,n,i={};for(let s=0;s<e;s++){r=t[s];let o;if(n=r,!J0(r)&&(n=ps[(o=String(r)).toLowerCase()],n===void 0))throw new G(`Unknown adapter '${o}'`);if(n)break;i[o||"#"+s]=n}if(!n){let s=Object.entries(i).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build")),o=e?s.length>1?`since :
|
|
11
|
-
`+s.map(
|
|
12
|
-
`):" "+
|
|
13
|
-
`+s):n.stack=s}catch(o){}}throw n}})}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=ke(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&Hr.assertOptions(n,{silentJSONParsing:Ge.transitional(Ge.boolean),forcedJSONParsing:Ge.transitional(Ge.boolean),clarifyTimeoutError:Ge.transitional(Ge.boolean)},!1),i!=null&&(C.isFunction(i)?r.paramsSerializer={serialize:i}:Hr.assertOptions(i,{encode:Ge.function,serialize:Ge.function},!0)),Hr.assertOptions(r,{baseUrl:Ge.spelling("baseURL"),withXsrfToken:Ge.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&C.merge(s.common,s[r.method]);s&&C.forEach(["delete","get","head","post","put","patch","common"],f=>{delete s[f]}),r.headers=be.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,m;if(!u){let f=[Nn.bind(this),void 0];for(f.unshift.apply(f,a),f.push.apply(f,l),m=f.length,c=Promise.resolve(r);h<m;)c=c.then(f[h++],f[h++]);return c}m=a.length;let d=r;for(h=0;h<m;){let f=a[h++],g=a[h++];try{d=f(d)}catch(w){g.call(this,w);break}}try{c=Nn.call(this,d)}catch(f){return Promise.reject(f)}for(h=0,m=l.length;h<m;)c=c.then(l[h++],l[h++]);return c}getUri(e){e=ke(this.defaults,e);let r=zr(e.baseURL,e.url);return Fr(r,e.params,e.paramsSerializer)}};C.forEach(["delete","get","head","options"],function(e){Qt.prototype[e]=function(r,n){return this.request(ke(n||{},{method:e,url:r,data:(n||{}).data}))}});C.forEach(["post","put","patch"],function(e){function r(n){return function(s,o,a){return this.request(ke(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Qt.prototype[e]=r(),Qt.prototype[e+"Form"]=r(!0)});var Kr=Qt;var ms=class t{constructor(e){if(typeof e!="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},e(function(s,o,a){n.reason||(n.reason=new Je(s,o,a),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}}},Za=ms;function gs(t){return function(r){return t.apply(null,r)}}function ys(t){return C.isObject(t)&&t.isAxiosError===!0}var ws={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(ws).forEach(([t,e])=>{ws[e]=t});var Qa=ws;function eu(t){let e=new Kr(t),r=Lr(Kr.prototype.request,e);return C.extend(r,Kr.prototype,e,{allOwnKeys:!0}),C.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return eu(ke(t,i))},r}var we=eu(Yt);we.Axios=Kr;we.CanceledError=Je;we.CancelToken=Za;we.isCancel=Ur;we.VERSION=Bn;we.toFormData=yt;we.AxiosError=G;we.Cancel=we.CanceledError;we.all=function(e){return Promise.all(e)};we.spread=gs;we.isAxiosError=ys;we.mergeConfig=ke;we.AxiosHeaders=be;we.formToJSON=t=>Mn(C.isHTMLForm(t)?new FormData(t):t);we.getAdapter=Fn.getAdapter;we.HttpStatusCode=Qa;we.default=we;var _e=we;var{Axios:kP,AxiosError:jP,CanceledError:FP,isCancel:NP,CancelToken:BP,VERSION:UP,all:$P,Cancel:zP,isAxiosError:HP,spread:KP,toFormData:WP,AxiosHeaders:VP,HttpStatusCode:JP,formToJSON:GP,getAdapter:YP,mergeConfig:XP}=_e;var V=Se(Bl(),1),de=Se(Yl(),1),bt=Se(vc(),1),cn=Se(Wc(),1),so=Se(af(),1),oo=Se(kf(),1),xe=Se(Pe(),1),fn=Se(Ne(),1),ce=Se(Ff(),1),ao=Se(Qf(),1),Ye=Se(Kh(),1),_O=Se(Rp(),1),uo=Se(ro(),1),Qe=Se(Dd(),1),lo=Se(kd(),1);var bO=/[\\^$.*+?()[\]{}|]/g,vO=t=>t.replace(bO,"\\$&"),xO=/[%ÄÖÜäöü ]/g,co=class{constructor(e={}){if(Object.assign(this,e),this.notationPattern||(this.notationPattern=".+"),!this.uriPattern&&this.namespace){this.uriPattern="^"+vO(this.namespace);let r=this.notationPattern.replace(xO,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)}},hi=co;function pr(t,e,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,m,d,f;try{h=i(l),m=i(c)}catch(g){return!1}if(h.length!=m.length)return!1;for(h.sort(),m.sort(),f=h.length-1;f>=0;f--)if(h[f]!=m[f])return!1;for(f=h.length-1;f>=0;f--)if(d=h[f],r){let g=r(l[d],c[d],d);if(g===void 0&&(g=pr(l[d],c[d])),!g)return!1}else if(!s(l[d],c[d]))return!1;return!0}return s(t,e)}function te(t,e,r=void 0){let n=s=>String.prototype.split.call(e,s).filter(Boolean).reduce((o,a)=>o!=null?o[a]:o,t),i=n(/[,[\]]+?/)||n(/[,[\].]+?/);return i===void 0||i===t?r:i}function dr(t,e){return e.reduce((r,n)=>(t&&t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}function hn(t,e){for(let r in t)t.hasOwnProperty(r)&&e(t[r],r)}function mr(t){return typeof t=="object"&&t!==null}function pn(t){return!!(t&&typeof t.valueOf()=="string")}function jd(t,e){return[...new Set([...t,...e])]}function Fd(t,e,r){return[...t,...e].reduce((n,i)=>(n.findIndex(s=>r(s,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 pi={store:null,path:"",defaults:["en"],getLanguages:Ud,selectLanguage:SO};function Ud(){return te(pi.store,pi.path)||pi.defaults}function SO(t){if(!t)return null;for(let e of Ud())if(t[e])return e;for(let e of Object.keys(t))if(e!="-")return e;return null}var di=pi;var mo={};Pt(mo,{addMappingIdentifiers:()=>ho,compareMappingContent:()=>AO,compareMappingMembers:()=>EO,compareMappings:()=>Gd,mappingContent:()=>Hd,mappingContentIdentifier:()=>Wd,mappingMembers:()=>Kd,mappingMembersIdentifier:()=>Vd});function fo(t){var e=function(F,k){var S=F<<k|F>>>32-k;return S},r=function(F){var k="",S,D;for(S=7;S>=0;S--)D=F>>>S*4&15,k+=D.toString(16);return k},n,i,s,o=new Array(80),a=1732584193,u=4023233417,l=2562383102,c=271733878,h=3285377520,m,d,f,g,w,O;t=unescape(encodeURIComponent(t));var I=t.length,T=[];for(i=0;i<I-3;i+=4)s=t.charCodeAt(i)<<24|t.charCodeAt(i+1)<<16|t.charCodeAt(i+2)<<8|t.charCodeAt(i+3),T.push(s);switch(I%4){case 0:i=2147483648;break;case 1:i=t.charCodeAt(I-1)<<24|8388608;break;case 2:i=t.charCodeAt(I-2)<<24|t.charCodeAt(I-1)<<16|32768;break;case 3:i=t.charCodeAt(I-3)<<24|t.charCodeAt(I-2)<<16|t.charCodeAt(I-1)<<8|128;break}for(T.push(i);T.length%16!==14;)T.push(0);for(T.push(I>>>29),T.push(I<<3&4294967295),n=0;n<T.length;n+=16){for(i=0;i<16;i++)o[i]=T[n+i];for(i=16;i<=79;i++)o[i]=e(o[i-3]^o[i-8]^o[i-14]^o[i-16],1);for(m=a,d=u,f=l,g=c,w=h,i=0;i<=19;i++)O=e(m,5)+(d&f|~d&g)+w+o[i]+1518500249&4294967295,w=g,g=f,f=e(d,30),d=m,m=O;for(i=20;i<=39;i++)O=e(m,5)+(d^f^g)+w+o[i]+1859775393&4294967295,w=g,g=f,f=e(d,30),d=m,m=O;for(i=40;i<=59;i++)O=e(m,5)+(d&f|d&g|f&g)+w+o[i]+2400959708&4294967295,w=g,g=f,f=e(d,30),d=m,m=O;for(i=60;i<=79;i++)O=e(m,5)+(d^f^g)+w+o[i]+3395469782&4294967295,w=g,g=f,f=e(d,30),d=m,m=O;a=a+m&4294967295,u=u+d&4294967295,l=l+f&4294967295,c=c+g&4294967295,h=h+w&4294967295}return O=r(a)+r(u)+r(l)+r(c)+r(h),O.toLowerCase()}function zd(t){return t.map(e=>e&&e.uri).filter(Boolean)}function po(t){return["memberSet","memberList","memberChoice"].find(e=>t[e])}function $d(t){let e=po(t),r=t[e]?zd(t[e]):[];return{[r.length>1?e:"memberSet"]:r.map(n=>({uri:n}))}}function Hd(t){let{from:e,to:r,type:n}=t,i={from:$d(e||{}),to:$d(r||{}),type:[n&&n[0]||"http://www.w3.org/2004/02/skos/core#mappingRelation"]};for(let s of["from","to"])if((i[s][po(i[s])]||[]).length==0){let o=t[s+"Scheme"];o&&o.uri&&(i[s+"Scheme"]={uri:o.uri})}return i}function Kd(t){let{from:e,to:r}=t,n=[e,r].filter(Boolean).map(i=>zd(i[po(i)]||[]));return[].concat(...n).sort()}function Wd(t){let e=JSON.stringify(Hd(t),["from","fromScheme","to","toScheme","type","memberSet","memberList","memberChoice","uri"]);return"urn:jskos:mapping:content:"+fo(e+`
|
|
14
|
-
`)}function
|
|
15
|
-
`)}function ho(t){let e=(t.identifier||[]).filter(r=>r&&!r.startsWith("urn:jskos:mapping:")).concat([Vd(t),Wd(t)]).sort();return Object.assign({},t,{identifier:e})}function Jd(t,e,r){t=t&&ho(t),e=e&&ho(e);let n=t&&t.identifier?t.identifier.find(s=>s.startsWith(r)):null,i=e&&e.identifier?e.identifier.find(s=>s.startsWith(r)):null;return n==i}function Gd(t,e){return Jd(t,e,"urn:jskos:mapping:content:")}var AO=Gd;function EO(t,e){return Jd(t,e,"urn:jskos:mapping:members:")}var bo={};Pt(bo,{addContext:()=>OO,annotationCreatorMatches:()=>ZO,annotationCreatorName:()=>XO,annotationCreatorUri:()=>YO,clean:()=>wo,cleanJSKOS:()=>TO,compare:()=>vt,compareConcepts:()=>qO,compareFunctions:()=>KO,compareMappingsDeep:()=>$O,compareObjects:()=>PO,compareSchemes:()=>RO,conceptsOfMapping:()=>kt,copyDeep:()=>yi,deepCopy:()=>IO,defaultMappingType:()=>Qd,definition:()=>JO,flattenMapping:()=>NO,getAllUris:()=>go,guessObjectType:()=>gi,guessSchemeFromNotation:()=>QO,isConcept:()=>MO,isContainedIn:()=>Zd,isScheme:()=>Xd,isSchemeInList:()=>DO,isValidUri:()=>HO,languageMapContent:()=>_o,mappingCSV:()=>UO,mappingRegistryIsStored:()=>GO,mappingTypeByType:()=>FO,mappingTypeByUri:()=>gn,mappingTypes:()=>dn,matchObjectTypes:()=>zO,merge:()=>rm,mergeUris:()=>tm,minifyMapping:()=>jO,normalize:()=>yo,notation:()=>VO,objectTypes:()=>mn,prefLabel:()=>yr,sortConcepts:()=>LO,sortSchemes:()=>kO,usedObjectTypes:()=>Yd,userOwnsMapping:()=>WO});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(t=>t.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"]}},mi=Object.keys(mn).reduce((t,e)=>{for(let r of mn[e].type||[])t[r]=e;return t},{});function gi(t,e=!1){let r;if(typeof t=="string"&&t)t in mi?r=mi[t]:(t=t.toLowerCase().replace(/s$/,""),r=Object.keys(mn).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 mi){r=mi[i];break}}return e&&r?r.toLowerCase().replace(/^concept(.+)/,"$1"):r}function Yd(t){var n;let e=[],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=t[i])!=null&&n.find(s=>s!==null)&&e.push(r[i]);return e.sort()}var CO=t=>/^[A-Z]*$/.test(t),gr=(t,e)=>e.split(".").reduce((r,n)=>r&&r[n]?r[n]:null,t),OO=t=>((t instanceof Array?t:[t]).forEach(r=>{r["@context"]="https://gbv.github.io/jskos/context.json"}),t),wo=t=>(Object.keys(t).forEach(e=>{CO(e)||e.startsWith("_")?delete t[e]:t[e]!=null&&typeof t[e]=="object"&&(t[e]=wo(t[e]))}),t),TO=wo,yi=(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 s=[];for(let o of t.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}t[i]!=null&&typeof t[i]=="object"?n[i]=yi(t[i]):n[i]=t[i]}return n},IO=yi,go=t=>t?(t.uri?[t.uri]:[]).concat(t.identifier||[]).filter(Boolean):[],vt=(t,e)=>{if(t==null&&e==null)return!0;let r=i=>i.replace("https://","http://"),n=go(t).map(r);for(let i of go(e).map(r))if(n.indexOf(i)!==-1)return!0;return!1},PO=vt,RO=vt,qO=vt,MO=t=>{var e;return((e=te(t,"type",[]))==null?void 0:e.includes("http://www.w3.org/2004/02/skos/core#Concept"))||te(t,"inScheme")!=null||te(t,"topConceptOf")!=null},Xd=t=>{var e;return(e=te(t,"type",[]))==null?void 0:e.includes("http://www.w3.org/2004/02/skos/core#ConceptScheme")},Zd=(t,e)=>{if(!t||!e)return!1;for(let r of e)if(vt(t,r))return!0;return!1},DO=Zd,LO=(t,e=!1)=>t.sort((r,n)=>{let i=te(r,"notation[0]"),s=te(n,"notation[0]");if(i&&s&&(i=i.toLowerCase(),s=s.toLowerCase()),e&&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}),kO=t=>{let e=["notation[0]",["prefLabel.de","prefLabel.en"],"uri"];return t.sort((r,n)=>{for(let i of e){let s,o;if(Array.isArray(i))for(let a of i)s=s||te(r,a),o=o||te(n,a);else s=te(r,i),o=te(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})},jO=t=>{let e=dr(yi(t),["from","to","fromScheme","toScheme","creator","contributor","type","created","modified","note","identifier","uri","partOf","mappingRelevance"]);for(let r of[e.from,e.to])hn(r,(n,i)=>{let s=[];for(let o of n)s.push(dr(o,["uri","notation"]));r[i]=s});return e.fromScheme&&(e.fromScheme=dr(e.fromScheme,["uri","notation"])),e.toScheme&&(e.toScheme=dr(e.toScheme,["uri","notation"])),e.partOf&&(e.partOf=e.partOf.map(r=>dr(r,["uri"]))),e},gn=function(t){for(let e of dn)if(t==e.uri)return e;return null},Qd=gn("http://www.w3.org/2004/02/skos/core#mappingRelation"),FO=function(t,e=Qd){let r;return Array.isArray(t)&&t.length>0?r=t[0]:r=t,gn(r)||e},NO=(t,e={})=>{let{language:r}=e,n=gr(t,"from.memberSet.0.notation.0"),i=gr(t,"to.memberSet.0.notation.0");n=n!==null?n:"",i=i!==null?i:"";let s=gn(gr(t,"type.0"));s=s?s.SHORT:"";let o=yr(gr(t,"from.memberSet.0"),{language:r,fallbackToUri:!1})||"",a=yr(gr(t,"to.memberSet.0"),{language:r,fallbackToUri:!1})||"",u=yr(gr(t,"creator.0"),{language:r,fallbackToUri:!1})||"";return{fromNotation:n,toNotation:i,fromLabel:o,toLabel:a,type:s,creator:u}},BO=(t={})=>{let e=t.delimiter||",",r=t.quoteChar||'"',n=t.lineTerminator||`
|
|
16
|
-
`,i=r+r,s=o=>r+(o==null?"":o.split(r).join(i))+r;return o=>o.map(s).join(e)+n},kt=(t,e)=>{let r=[];for(let n of["from","to"])(e==null||n===e)&&(r=r.concat(te(t,`${n}.memberSet`)||te(t,`${n}.memberChoice`)||te(t,`${n}.memberList`)||[]));return r.filter(n=>n!=null)},UO=(t={})=>{let e=BO(t),r=t.language||"en";t.type==null&&(t.type=!0);let n=o=>{o=o||[];let a=[];for(let u of["from","to"]){t.schemes&&a.push(`${u}Scheme`);let l=Math.max(...o.map(c=>kt(c,u).length),1);for(let c=0;c<l;c+=1)a.push(`${u}Notation${c?c+1:""}`),t.labels&&a.push(`${u}Label${c?c+1:""}`)}return t.type&&a.push("type"),t.creator&&a.push("creator"),e(a)},i=(o,a={})=>{let u=[];for(let l of["from","to"]){t.schemes&&u.push(te(o,`${l}Scheme.notation[0]`,""));let c=kt(o,l),h=a[`${l}Count`];h==null&&(h=c.length),h=Math.max(h,1);for(let m=0;m<h;m+=1)u.push(te(c[m],"notation[0]","")),t.labels&&u.push(yr(c[m],{language:r,fallbackToUri:!1}))}return t.type&&u.push(te(gn(te(o,"type[0]")),"SHORT","")),t.creator&&u.push(yr(te(o,"creator[0]"),{language:r,fallbackToUri:!1})),e(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=>kt(c,"from").length)),toCount:Math.max(...o.map(c=>kt(c,"to").length))};for(let c of o)u+=i(c,l);return u}}};function $O(t,e){return pr(t,e,(r,n,i)=>{let s={[i]:r},o={[i]:n};if(i=="from"||i=="to")return pr(Object.getOwnPropertyNames(te(r,i,{})),Object.getOwnPropertyNames(te(n,i,{})))?pr(kt(s,i),kt(o,i),(a,u,l)=>{if(l!=null)return vt(a,u)}):!1;if(i=="fromScheme"||i=="toScheme")return vt(r,n)})}var zO=(t,e)=>{let r=gi(t),n=gi(e);return!(r&&n&&r!=n)},em=t=>{Array.isArray(t)&&t.sort((e,r)=>e===null?1:r===null?-1:0)},tm=(t,e)=>(!t||!e||((Array.isArray(t.identifier)||Array.isArray(e.identifier))&&(t.identifier=jd(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,em(t.identifier)),t),rm=(t,e,r)=>{if(!t||!e)return t||e;r=r||{};let n=r._path||"",i=r.detectMismatch||[],s=r.skipPaths||[],o={};return hn(t,(a,u)=>{if(!s.includes(n+u))if(Array.isArray(a)&&Array.isArray(e[u]))o[u]=Fd(a,e[u],(l,c)=>mr(l)&&mr(c)?vt(l,c):l===c),em(o[u]);else if(mr(a)&&mr(e[u]))o[u]=rm(a,e[u],Object.assign({_path:`${n}${u}.`},r));else{if(a&&e[u]&&i.includes(n+u)&&!pr(a,e[u]))throw new Error("Property mismatch in "+n+u);o[u]=a}}),hn(e,(a,u)=>{t[u]||(o[u]=a)}),n==""&&Nd(o,s),r.mergeUris&&tm(o,e),o},yo=t=>Array.isArray(t)?t.map(e=>yo(e)):mr(t)?(hn(t,(e,r)=>{t[r]=yo(e)}),t):pn(t)?t.normalize():t,HO=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},KO={mappingsByConcepts:(t,e,r)=>{let n=["memberSet","memberList","memberChoice"],i,s;for(let o of n)i=i||te(t,r+"."+o+"[0].notation[0]"),s=s||te(e,r+"."+o+"[0].notation[0]");return i==null||i<s?-1:s==null||i>s?1:0}},WO=(t,e)=>!t||!e?!1:[t.uri].concat(Object.values(t.identities||{}).map(r=>r.uri)).filter(r=>r!=null).includes(te(e,"creator[0].uri"));function VO(t,e){let r;if(t&&t.notation&&t.notation.length)r=t.notation[0],(Xd(t)||e=="scheme")&&(r=r.toUpperCase());else if(t&&t.inScheme&&t.inScheme[0]&&t.uri)try{r=new hi(t&&t.inScheme&&t.inScheme[0]).notationFromUri(t.uri)}catch(n){}return r||""}function _o(t,e,{language:r}={}){let n=t&&e?t[e]:t;return n&&(n[r]||(r=di.selectLanguage(n),r))?n[r]:null}function yr(t,e={}){e=e||{};let r=e.fallbackToUri==null?!0:e.fallbackToUri;return te(t,`prefLabel.${e.language}`)||_o(t,"prefLabel",e)||(r&&t&&t.uri?t.uri:"")}function JO(t,e={}){e=e||{};let r=te(t,`definition.${e.language}`)||_o(t,"definition",e)||[];return pn(r)&&(r=[r]),r}function GO(t){return te(t,"stored",te(t,"constructor.stored",te(t,"provider.constructor.stored",!1)))}function YO(t){return pn(t.creator)?t.creator:t.creator&&t.creator.id}function XO(t){return te(t,"creator.name")||""}function ZO(t,e){return!!(t&&pn(t.creator)?e&&e.includes(t.creator):e&&t.creator&&e.includes(t.creator.id))}function QO(t,e){return e.filter(({notationPattern:r})=>(r||".+")===".+"?!1:RegExp("^("+r+")$").test(t))}var q=j(P(P({},mo),bo),{ConceptScheme:hi,languagePreference:di});var xn={};Pt(xn,{BaseProvider:()=>X,ConceptApiProvider:()=>$e,LabelSearchSuggestionProvider:()=>nt,LobidApiProvider:()=>lt,LocApiProvider:()=>st,LocalMappingsProvider:()=>xt,MappingsApiProvider:()=>Ue,ModApiProvider:()=>ct,MyCoReProvider:()=>ht,NoTApiProvider:()=>pt,OccurrencesApiProvider:()=>rt,OlsApiProvider:()=>ft,ReconciliationApiProvider:()=>Xe,SkohubProvider:()=>at,SkosmosApiProvider:()=>it});var Ft={};Pt(Ft,{concatUrl:()=>et,listOfCapabilities:()=>xo,requestMethods:()=>vo,withCustomProps:()=>jt});var vo=[{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 et(...t){let[e,...r]=t;for(let n of r)e.endsWith("/")||(e+="/"),n.startsWith("/")&&(n=n.slice(1)),e+=n;return e}function jt(t,e){return t._totalCount=e._totalCount,t._url=e._url,t}var xo=["schemes","top","data","concepts","narrower","ancestors","types","suggest","search","auth","mappings","concordances","annotations","occurrences"];var X=class{constructor(e={}){var n,i;this._jskos=e,this.axios=_e.create({timeout:2e5}),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)),xo.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: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((s={})=>{var o;if(!s._skipAdditionalParameters){let a=bt.default([].concat(V.default(s,"params.language","").split(","),this.languages,this._defaultLanguages).filter(u=>u!="")).join(",");de.default(s,"params.language",a),this.has.auth&&this._auth.bearerToken&&!V.default(s,"headers.Authorization")&&de.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 _e.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+="?"),oo.default(a.params||{},(l,c)=>{u+=`${c}=${encodeURIComponent(l)}&`}),xe.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=V.default(s,"config._retryCount",0),a=V.default(s,"config.method"),u=V.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 vo){let a=this[s]&&this[s].bind(this);if(!a){this[s]=()=>{throw new Rr({method:s})};continue}this[s]=(u={})=>{if(u._raw)return delete u._raw,a(u);let l=r.find(d=>d.method==s&&Ye.default(d.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(d=>(xe.default(d)&&d._totalCount===void 0?d._totalCount=d.length:fn.default(d)&&d._totalCount===void 0&&(d._totalCount=1),d&&o&&this[`adjust${o}`]&&(d=this[`adjust${o}`](d)),d)).catch(d=>{throw d instanceof ve?d:d.response?d.response.status.toString().startsWith(4)?new Ve({relatedError:d,code:d.response.status}):new qr({relatedError:d,code:d.response.status}):d.request?typeof navigator!="undefined"&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection)?new Mr({relatedError:d}):new Dr({relatedError:d}):(console.error(d),new ve({relatedError:d}))});c&&(h.cancel=(...d)=>c.cancel(...d));let m={method:s,options:Qe.default(u,["cancelToken"]),promise:h};return r.push(m),h.catch(()=>{}).then(()=>r.splice(r.indexOf(m),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 E(this,null,function*(){return this._init?this._init:(this._init=E(this,null,function*(){this._prepare();let e;if(ce.default(this._api.status))try{e=yield this.axios({method:"get",url:this._api.status})}catch(r){V.default(r,"response.status")===404&&(this._api.status=null)}else e=this._api.status;if(fn.default(e)&&!ao.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 _e.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)}suggest(e){return E(this,null,function*(){e._raw=!0;let r=yield this.search(e),n=[e.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})}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 s=V.default(this._config,`${e}.${r}`);if(!s)return!!this.has[e][r];if(s.auth&&(!n||!this._auth.key)||s.auth&&this._auth.key!=V.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[e][r]}supportsScheme(e){if(!e)return!1;let r=xe.default(this.schemes)?this.schemes:null;return r==null&&!q.isContainedIn(e,this.excludedSchemes||[])?!0:q.isContainedIn(e,r)}adjustConcept(e){if(!e||e.__SAVED__)return e;e._getNarrower=r=>this.getNarrower(j(P({},r),{concept:e})),e._getAncestors=r=>this.getAncestors(j(P({},r),{concept:e})),e._getDetails=r=>E(this,null,function*(){return(yield this.getConcepts(j(P({},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 jt(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(j(P({},n),{scheme:e})),e._getTypes=n=>e._registry.getTypes(j(P({},n),{scheme:e})),e._suggest=s=>{var o=s,{search:n}=o,i=H(o,["search"]);return e._registry.suggest(j(P({},i),{search:n,scheme:e}))}),e}adjustSchemes(e){return jt(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]=V.default(q.conceptsOfMapping(e,r),"[0].inScheme[0]",null))}if(e._registry=this,!e.identifier){let r=V.default(q.addMappingIdentifiers(e),"identifier");r&&(e.identifier=r)}return e}adjustMappings(e){return jt(e.map(r=>this.adjustMapping(r)),e)}postMappings(){return E(this,arguments,function*(n={}){var i=n,{mappings:e}=i,r=H(i,["mappings"]);if(!e||!e.length)throw new U({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"postMapping",items:e,itemProperty:"mapping",config:r})})}deleteMappings(){return E(this,arguments,function*(n={}){var i=n,{mappings:e}=i,r=H(i,["mappings"]);if(!e||!e.length)throw new U({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"deleteMapping",items:e,itemProperty:"mapping",config:r})})}_callHelperForArrayWrappers(s){return E(this,arguments,function*({method:e,items:r,itemProperty:n,config:i}){let o=[],a=yield Promise.all(r.map(u=>E(this,null,function*(){try{return yield this[e](j(P({[n]:u},i),{_raw:!0}))}catch(l){return o[r.indexOf(u)]=l,null}})));return a._errors=o,a})}};X.providerName="Base";var tt=Se(im(),1);var Ee=[];for(let t=0;t<256;++t)Ee.push((t+256).toString(16).slice(1));function sm(t,e=0){return(Ee[t[e+0]]+Ee[t[e+1]]+Ee[t[e+2]]+Ee[t[e+3]]+"-"+Ee[t[e+4]]+Ee[t[e+5]]+"-"+Ee[t[e+6]]+Ee[t[e+7]]+"-"+Ee[t[e+8]]+Ee[t[e+9]]+"-"+Ee[t[e+10]]+Ee[t[e+11]]+Ee[t[e+12]]+Ee[t[e+13]]+Ee[t[e+14]]+Ee[t[e+15]]).toLowerCase()}var Ao,e3=new Uint8Array(16);function Eo(){if(!Ao){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ao=crypto.getRandomValues.bind(crypto)}return Ao(e3)}var t3=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Co={randomUUID:t3};function r3(t,e,r){var i,s,o;t=t||{};let n=(o=(s=t.random)!=null?s:(i=t.rng)==null?void 0:i.call(t))!=null?o:Eo();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,e){if(r=r||0,r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let a=0;a<16;++a)e[r+a]=n[a];return e}return sm(n)}function n3(t,e,r){return Co.randomUUID&&!e&&!t?Co.randomUUID():r3(t,e,r)}var wi=n3;var _i="urn:uuid:",xt=class extends X{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=()=>tt.default.getItem(this.localStorageKey).then(n=>{n=n||[];let i=0;for(let s of n.filter(o=>!o.uri||!o.uri.startsWith(_i)))s.uri&&(s.identifier||(s.identifier=[]),s.identifier.push(s.uri)),s.uri=`${_i}${wi()}`,i+=1;return i&&console.warn(`URIs added to ${i} local mappings.`),tt.default.setItem(this.localStorageKey,n)});tt.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=uo.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),e.then(()=>tt.default.getItem(this.localStorageKey)).then(o=>{r({mappings:o,done:s})})})}getMapping(n){return E(this,null,function*(){var i=n,{mapping:e}=i,r=H(i,["mapping"]);if(r._raw=!0,!e||!e.uri)throw new U({parameter:"mapping"});return(yield this.getMappings(j(P({},r),{uri:e.uri})))[0]})}getMappings(){return E(this,arguments,function*({from:e,fromScheme:r,to:n,toScheme:i,creator:s,type:o,partOf:a,offset:u,limit:l,direction:c,mode:h,identifier:m,uri:d}={}){let f={};return e&&(f.from=ce.default(e)?e:e.uri),r&&(f.fromScheme=ce.default(r)?{uri:r}:r),n&&(f.to=ce.default(n)?n:n.uri),i&&(f.toScheme=ce.default(i)?{uri:i}:i),s&&(f.creator=ce.default(s)?s:q.prefLabel(s)),o&&(f.type=ce.default(o)?o:o.uri),a&&(f.partOf=ce.default(a)?a:a.uri),u&&(f.offset=u),l&&(f.limit=l),c&&(f.direction=c),h&&(f.mode=h),m&&(f.identifier=m),d&&(f.uri=d),this._getMappingsQueue().catch(g=>{throw new ve({message:"Could not get mappings from local storage",relatedError:g})}).then(({mappings:g,done:w})=>{w();let O=(T,F)=>T.uri==F||F&&T.notation&&T.notation[0].toLowerCase()==F.toLowerCase();if((f.from||f.to)&&(g=g.filter(T=>{let F=q.conceptsOfMapping(T,"from").find(M=>O(M,f.from))!=null,k=q.conceptsOfMapping(T,"to").find(M=>O(M,f.from))!=null,S=q.conceptsOfMapping(T,"from").find(M=>O(M,f.to))!=null,D=q.conceptsOfMapping(T,"to").find(M=>O(M,f.to))!=null;return f.direction=="backward"?f.mode=="or"?f.from&&k||f.to&&S:(!f.from||k)&&(!f.to||S):f.direction=="both"?f.mode=="or"?f.from&&(F||k)||f.to&&(S||D):(!f.from||F)&&(!f.to||D)||(!f.from||k)&&(!f.to||S):f.mode=="or"?f.from&&F||f.to&&D:(!f.from||F)&&(!f.to||D)})),(f.fromScheme||f.toScheme)&&(g=g.filter(T=>{let F=q.compare(T.fromScheme,f.fromScheme),k=q.compare(T.toScheme,f.fromScheme),S=q.compare(T.fromScheme,f.toScheme),D=q.compare(T.toScheme,f.toScheme);return f.direction=="backward"?f.mode=="or"?f.fromScheme&&k||f.toScheme&&S:(!f.fromScheme||k)&&(!f.toScheme||S):f.direction=="both"?f.mode=="or"?f.fromScheme&&(F||k)||f.toScheme&&(S||D):(!f.fromScheme||F)&&(!f.toScheme||D)||(!f.fromScheme||k)&&(!f.toScheme||S):f.mode=="or"?f.fromScheme&&F||f.toScheme&&D:(!f.fromScheme||F)&&(!f.toScheme||D)})),f.creator){let T=f.creator.split("|");g=g.filter(F=>(F.creator&&F.creator.find(k=>T.includes(q.prefLabel(k))||T.includes(k.uri)))!=null)}f.type&&(g=g.filter(T=>(T.type||[q.defaultMappingType.uri]).includes(f.type))),f.partOf&&(g=g.filter(T=>T.partOf!=null&&T.partOf.find(F=>q.compare(F,{uri:f.partOf}))!=null)),f.identifier&&(g=g.filter(T=>f.identifier.split("|").map(F=>(T.identifier||[]).includes(F)||T.uri==F).reduce((F,k)=>F||k))),f.uri&&(g=g.filter(T=>T.uri==f.uri));let I=g.length;return g=g.sort((T,F)=>{let k=T.modified||T.created,S=F.modified||F.created;return S==null?-1:k==null?1:k>S?-1:1}),g=g.slice(f.offset||0),g=g.slice(0,f.limit),g._totalCount=I,g})})}postMapping(r){return E(this,arguments,function*({mapping:e}){if(!e)throw new U({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue();if((!e.uri||!e.uri.startsWith(_i))&&(e.uri&&(e.identifier||(e.identifier=[]),e.identifier.push(e.uri)),e.uri=`${_i}${wi()}`),n.find(s=>s.uri==e.uri))throw i(),new U({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(s=>q.minifyMapping(s));try{return yield tt.default.setItem(this.localStorageKey,n),i(),e}catch(s){throw i(),s}})}putMapping(r){return E(this,arguments,function*({mapping:e}){if(!e)throw new U({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue(),s=n.findIndex(o=>o.uri==e.uri);if(s==-1)throw i(),new U({parameter:"mapping",message:"Mapping not found"});e.created||(e.created=n[s].created),e.modified=new Date().toISOString(),delete e.partOf,n[s]=e,n=n.map(o=>q.minifyMapping(o));try{return yield tt.default.setItem(this.localStorageKey,n),i(),e}catch(o){throw i(),o}})}patchMapping(r){return E(this,arguments,function*({mapping:e}){if(!e)throw new U({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue(),s=n.findIndex(o=>o.uri==e.uri);if(s==-1)throw i(),new U({parameter:"mapping",message:"Mapping not found"});e.created||(e.created=n[s].created),e.modified=new Date().toISOString(),delete e.partOf,n[s]=Object.assign(n[s],e),n=n.map(o=>q.minifyMapping(o));try{return yield tt.default.setItem(this.localStorageKey,n),i(),e}catch(o){throw i(),o}})}deleteMapping(r){return E(this,arguments,function*({mapping:e}){if(!e)throw new U({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue();try{return n=n.filter(s=>s.uri!=e.uri),n=n.map(s=>q.minifyMapping(s)),yield tt.default.setItem(this.localStorageKey,n),i(),!0}catch(s){throw i(),s}})}};xt.providerName="LocalMappings";xt.stored=!0;var Ue=class extends X{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=et(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]=et(this._api.api,e[r]))}this.has.mappings=this._api.mappings?{}:!1,this.has.mappings&&(this.has.mappings.read=!!V.default(this._config,"mappings.read",!0),this.has.mappings.create=!!V.default(this._config,"mappings.create"),this.has.mappings.update=!!V.default(this._config,"mappings.update"),this.has.mappings.delete=!!V.default(this._config,"mappings.delete"),this.has.mappings.anonymous=!!V.default(this._config,"mappings.anonymous")),this.has.concordances=this._api.concordances?{}:!1,this.has.concordances&&(this.has.concordances.read=!!V.default(this._config,"concordances.read"),this.has.concordances.create=!!V.default(this._config,"concordances.create"),this.has.concordances.update=!!V.default(this._config,"concordances.update"),this.has.concordances.delete=!!V.default(this._config,"concordances.delete")),this.has.annotations=this._api.annotations?{}:!1,this.has.annotations&&(this.has.annotations.read=!!V.default(this._config,"annotations.read"),this.has.annotations.create=!!V.default(this._config,"annotations.create"),this.has.annotations.update=!!V.default(this._config,"annotations.update"),this.has.annotations.delete=!!V.default(this._config,"annotations.delete")),this.has.auth=V.default(this._config,"auth.key")!=null,this._defaultParams={properties:"annotations"}}getMapping(n){return E(this,null,function*(){var i=n,{mapping:e}=i,r=H(i,["mapping"]);if(!e)throw new U({parameter:"mapping"});if(!e.uri||!e.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(j(P({},r),{url:e.uri,params:P(P({},this._defaultParams),r.params||{})}))}catch(s){if(V.default(s,"response.status")==404)return null;throw s}})}getMappings(F){return E(this,null,function*(){var k=F,{from:e,fromScheme:r,to:n,toScheme:i,creator:s,type:o,partOf:a,offset:u,limit:l,direction:c,mode:h,identifier:m,cardinality:d,annotatedBy:f,annotatedFor:g,annotatedWith:w,sort:O,order:I}=k,T=H(k,["from","fromScheme","to","toScheme","creator","type","partOf","offset","limit","direction","mode","identifier","cardinality","annotatedBy","annotatedFor","annotatedWith","sort","order"]);let S={},D=this._api.mappings;return e&&(S.from=ce.default(e)?e:e.uri),r&&(S.fromScheme=ce.default(r)?r:r.uri),n&&(S.to=ce.default(n)?n:n.uri),i&&(S.toScheme=ce.default(i)?i:i.uri),s&&(S.creator=ce.default(s)?s:q.prefLabel(s)),o&&(S.type=ce.default(o)?o:o.uri),a&&(S.partOf=ce.default(a)?a:a.uri),u&&(S.offset=u),l&&(S.limit=l),c&&(S.direction=c),d&&(S.cardinality=d),f&&(S.annotatedBy=f),g&&(S.annotatedFor=g),w&&(S.annotatedWith=w),h&&(S.mode=h),m&&(S.identifier=m),O&&(S.sort=O),I&&(S.order=I),this.axios(j(P({},T),{method:"get",url:D,params:P(P(P({},this._defaultParams),T.params||{}),S)}))})}postMapping(n){return E(this,null,function*(){var i=n,{mapping:e}=i,r=H(i,["mapping"]);if(!e)throw new U({parameter:"mapping"});return e=q.minifyMapping(e),e=q.addMappingIdentifiers(e),this.axios(j(P({},r),{method:"post",url:this._api.mappings,data:e,params:P(P({},this._defaultParams),r.params||{})}))})}putMapping(n){return E(this,null,function*(){var i=n,{mapping:e}=i,r=H(i,["mapping"]);if(!e)throw new U({parameter:"mapping"});e=q.minifyMapping(e),e=q.addMappingIdentifiers(e);let s=e.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(j(P({},r),{method:"put",url:s,data:e,params:P(P({},this._defaultParams),r.params||{})}))})}patchMapping(n){return E(this,null,function*(){var i=n,{mapping:e}=i,r=H(i,["mapping"]);if(!e)throw new U({parameter:"mapping"});let s=e.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(j(P({},r),{method:"patch",url:s,data:Qe.default(e,"uri"),params:P(P({},this._defaultParams),r.params||{})}))})}deleteMapping(n){return E(this,null,function*(){var i=n,{mapping:e}=i,r=H(i,["mapping"]);if(!e)throw new U({parameter:"mapping"});let s=e.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(j(P({},r),{method:"delete",url:s})),!0})}getAnnotations(n){return E(this,null,function*(){var i=n,{target:e}=i,r=H(i,["target"]);return e&&de.default(r,"params.target",e),this.axios(j(P({},r),{method:"get",url:this._api.annotations}))})}postAnnotation(n){return E(this,null,function*(){var i=n,{annotation:e}=i,r=H(i,["annotation"]);return this.axios(j(P({},r),{method:"post",url:this._api.annotations,data:e}))})}putAnnotation(n){return E(this,null,function*(){var i=n,{annotation:e}=i,r=H(i,["annotation"]);let s=e.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(j(P({},r),{method:"put",url:s,data:e}))})}patchAnnotation(n){return E(this,null,function*(){var i=n,{annotation:e}=i,r=H(i,["annotation"]);let s=e.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(j(P({},r),{method:"patch",url:s,data:e}))})}deleteAnnotation(n){return E(this,null,function*(){var i=n,{annotation:e}=i,r=H(i,["annotation"]);let s=e.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(j(P({},r),{method:"delete",url:s})),!0})}getConcordances(e){return E(this,null,function*(){return this.axios(j(P({},e),{method:"get",url:this._api.concordances}))})}postConcordance(n){return E(this,null,function*(){var i=n,{concordance:e}=i,r=H(i,["concordance"]);if(!e)throw new U({parameter:"concordance"});return this.axios(j(P({},r),{method:"post",url:this._api.concordances,data:e,params:P(P({},this._defaultParams),r.params||{})}))})}putConcordance(n){return E(this,null,function*(){var i=n,{concordance:e}=i,r=H(i,["concordance"]);if(!e)throw new U({parameter:"concordance"});let s=e.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(j(P({},r),{method:"put",url:s,data:e,params:P(P({},this._defaultParams),r.params||{})}))})}patchConcordance(n){return E(this,null,function*(){var i=n,{concordance:e}=i,r=H(i,["concordance"]);if(!e)throw new U({parameter:"concordance"});let s=e.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(j(P({},r),{method:"patch",url:s,data:Qe.default(e,"uri"),params:P(P({},this._defaultParams),r.params||{})}))})}deleteConcordance(n){return E(this,null,function*(){var i=n,{concordance:e}=i,r=H(i,["concordance"]);if(!e)throw new U({parameter:"concordance"});let s=e.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(j(P({},r),{method:"delete",url:s})),!0})}};ee(Ue,"supports",{mappings:!0,concordances:!0,annotations:!0});Ue.providerName="MappingsApi";Ue.stored=!0;var Oo={},rt=class extends X{get _cache(){return Oo[this.uri]}_prepare(){Oo[this.uri]=[],this._occurrencesSupportedSchemes=[]}_occurrencesIsSupported(e){return E(this,null,function*(){if(!(this._occurrencesSupportedSchemes&&this._occurrencesSupportedSchemes.length))try{let n=et(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(e,n)&&(r=!0);return r})}getMappings(e){return E(this,null,function*(){let r=yield this.getOccurrences(e),n=e.from,i=V.default(n,"inScheme[0]")||e.fromScheme,s=e.to,o=V.default(s,"inScheme[0]")||e.toScheme,a=[];for(let u of r){if(!u)continue;let l={};l.from=V.default(u,"memberSet[0]"),l.from?l.from={memberSet:[l.from]}:l.from=null,l.fromScheme=V.default(u,"memberSet[0].inScheme[0]"),l.to=V.default(u,"memberSet[1]"),l.to?l.to={memberSet:[l.to]}:l.to={memberSet:[]},l.toScheme=V.default(u,"memberSet[1].inScheme[0]"),(n&&q.compare(n,V.default(l,"to.memberSet[0]"))||s&&q.compare(s,V.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 E(this,null,function*(){var a=o,{from:e,to:r,concepts:n,threshold:i=0}=a,s=H(a,["from","to","concepts","threshold"]);let u=[];n=(n||[]).concat([e,r]).filter(f=>!!f);for(let f of n)u.push(this._occurrencesIsSupported(V.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(j(P({},s),{params:{member:f,scheme:"*",threshold:i}})));let c=yield Promise.all(u),h=lo.default([],...c),m=[],d=[];for(let f=0;f<h.length;f+=1){let g=h[f];if(!g)continue;let w=g.memberSet.reduce((O,I)=>O.concat(I.uri),[]).sort().join(" ");m.includes(w)?d.push(f):m.push(w)}return d.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(e){return E(this,null,function*(){let r=this._cache.find(i=>Ye.default(i.config.params,e.params));if(r)return r.data;let n=yield this.axios(j(P({},e),{method:"get",url:this._api.api}));return this._cache.push({config:e,data:n}),this._cache.length>20&&(Oo[this.uri]=this._cache.slice(this._cache.length-20)),n})}};ee(rt,"supports",{occurrences:!0,mappings:!0});rt.providerName="OccurrencesApi";rt.stored=!1;var $e=class extends X{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=et(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]=et(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=V.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 E(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let r=this._approvedSchemes.find(s=>q.compare(e,s));if(r)return r.uri;if(this._rejectedSchemes.find(s=>q.compare(e,s)))return null;let i=(yield this.getSchemes({params:{uri:q.getAllUris(e).join("|")}})).find(s=>q.compare(s,e));return i?(this._approvedSchemes.push({uri:i.uri,identifier:q.getAllUris(e)}),i.uri):(this._rejectedSchemes.push({uri:e.uri,identifier:e.identifier}),null)})}getSchemes(){return E(this,arguments,function*(e={}){if(!this._api.schemes){if(Array.isArray(this.schemes))return this.schemes;throw new qe}let r=yield this.axios(j(P({},e),{method:"get",url:this._api.schemes,params:P(j(P({},this._defaultParams),{limit:500}),e.params||{})}));return Array.isArray(this.schemes)?jt(r.filter(n=>q.isContainedIn(n,this.schemes)),r):r})}getTop(n){return E(this,null,function*(){var i=n,{scheme:e}=i,r=H(i,["scheme"]);if(!this._api.top)throw new qe;if(!e)throw new U({parameter:"scheme"});let s=yield this._getSchemeUri(e);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(j(P({},r),{method:"get",url:this._api.top,params:j(P(j(P({},this._defaultParams),{limit:1e4}),r.params||{}),{uri:s})}))})}getConcepts(n){return E(this,null,function*(){var i=n,{concepts:e}=i,r=H(i,["concepts"]);let s=this._api.concepts||this._api.data;if(!s)throw new qe;if(!e)throw new U({parameter:"concepts"});Array.isArray(e)||(e=[e]);let o=e.map(a=>a.uri).filter(a=>a!=null);return this.axios(j(P({},r),{method:"get",url:s,params:j(P(j(P({},this._defaultParams),{limit:500}),r.params||{}),{uri:o.join("|")})}))})}getNarrower(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=H(i,["concept"]);var s;if(!e||!e.uri)throw new U({parameter:"concept"});if(this._api.narrower)return this.axios(j(P({},r),{method:"get",url:this._api.narrower,params:j(P(j(P({},this._defaultParams),{limit:1e4}),r.params||{}),{uri:e.uri})}));{let o=P({params:{}},r);o.params.properties="narrower";let u=((s=(yield this.getConcepts(P({concepts:[e]},o)))[0])==null?void 0:s.narrower)||[];return u.length?this.getConcepts(P({concepts:u},r)):[]}})}getAncestors(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=H(i,["concept"]);var s;if(!e||!e.uri)throw new U({parameter:"concept"});if(this._api.ancestors)return this.axios(j(P({},r),{method:"get",url:this._api.ancestors,params:j(P(j(P({},this._defaultParams),{limit:1e4}),r.params||{}),{uri:e.uri})}));{let o=P({params:{}},r);o.params.properties="ancestors";let u=((s=(yield this.getConcepts(P({concepts:[e]},o)))[0])==null?void 0:s.ancestors)||[];return u.length?this.getConcepts(P({concepts:u},r)):[]}})}suggest(o){return E(this,null,function*(){var a=o,{use:e="notation,label",types:r=[],sort:n="score",params:i={}}=a,s=H(a,["use","types","sort","params"]);return this._search(j(P({},s),{endpoint:"suggest",params:j(P({},i),{type:r.join("|"),use:e,sort:n})}))})}search(i){return E(this,null,function*(){var s=i,{types:e=[],params:r={}}=s,n=H(s,["types","params"]);return this._search(j(P({},n),{endpoint:"search",params:j(P({},r),{type:e.join("|")})}))})}vocSuggest(s){return E(this,null,function*(){var o=s,{use:e="notation,label",sort:r="score",params:n={}}=o,i=H(o,["use","sort","params"]);return this._search(j(P({},i),{endpoint:"voc-suggest",params:j(P({},n),{use:e,sort:r})}))})}vocSearch(e){return E(this,null,function*(){return this._search(j(P({},e),{endpoint:"voc-search"}))})}_search(l){return E(this,null,function*(){var c=l,{endpoint:e,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[e],!a)throw new qe;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(j(P({},u),{params:j(P(P({},this._defaultParams),o),{limit:i,count:i,offset:s,search:n,query:n,voc:h}),method:"get",url:a}))})}getTypes(n){return E(this,null,function*(){var i=n,{scheme:e}=i,r=H(i,["scheme"]);if(!this._api.types)throw new qe;if(Array.isArray(this._api.types))return this._api.types;let s=e&&(yield this._getSchemeUri(e));s&&de.default(r,"params.uri",s);let o=yield this.axios(j(P({},r),{method:"get",url:this._api.types}));return s&&(o=o.filter(a=>!a.inScheme||q.isContainedIn(e,a.inScheme))),o})}};ee($e,"providerName","ConceptApi"),ee($e,"providerType","http://bartoc.org/api-type/jskos"),ee($e,"supports",{schemes:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,types:!0,suggest:!0,search:!0,auth:!0});var To={},Xe=class extends X{get _cache(){return To[this.uri]}_prepare(){To[this.uri]=[]}getMappings(s){return E(this,null,function*(){var o=s,{from:e,to:r,mode:n}=o,i=H(o,["from","to","mode"]);let a=[];xe.default(this.schemes)&&(a=this.schemes);let u,l,c=V.default(e,"inScheme[0]"),h=V.default(r,"inScheme[0]"),m,d;if(!e||q.isContainedIn(c,a)?(u=!0,l=r,m=h,d=a.find(S=>q.compare(S,c))||a[0]):(u=!1,l=e,m=c,d=a.find(S=>q.compare(S,h))||a[0]),n!="or")return[];if(!this._api.api)throw new qe;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=V.default(l,`altLabel.${f}`,[]);ce.default(g)&&(g=[g]);let w=V.default(l,`prefLabel.${f}`),O=g.concat([w]);O=[w];let{url:I,data:T}=yield this._getReconciliationResults(j(P({},i),{labels:O,language:f}));T=[].concat(...Object.values(T).map(S=>S.result)).filter(S=>S),T=T.sort((S,D)=>S.score!=D.score?D.score-S.score:S.match!=D.match?S.match?-1:1:S.id.length-D.id.length);let F=V.default(d,"namespace",""),k=T.map(S=>({fromScheme:m,from:{memberSet:[l]},toScheme:d,to:{memberSet:[{uri:F+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&&(k=k.map(S=>Object.assign(S,{fromScheme:S.toScheme,from:S.to,toScheme:S.fromScheme,to:S.from}))),k._url=I,k})}_getReconciliationResults(i){return E(this,null,function*(){var s=i,{labels:e,language:r}=s,n=H(s,["labels","language"]);e=e.sort();let o=this._cache.find(d=>Ye.default(d.labels,e)&&d.language==r);if(o)return o;let a={},u=0;for(let d of e)a[`q${u}`]={query:d},u+=1;let l=this._api.api;r&&(l=l.replace("{language}",r));let c=`queries=${encodeURIComponent(JSON.stringify(a))}`;de.default(n,["headers","Content-Type"],"application/x-www-form-urlencoded");let h=yield this.axios(j(P({},n),{method:"post",url:l,data:c}));h=h||{};let m={labels:e,language:r,data:h,url:`${l}${l.includes("?")?"&":"?"}${c}`};return this._cache.push(m),this._cache.length>20&&(To[this.uri]=this._cache.slice(this._cache.length-20)),m})}};ee(Xe,"supports",{mappings:!0});Xe.providerName="ReconciliationApi";Xe.providerType="http://bartoc.org/api-type/reconciliation";Xe.stored=!1;var nt=class extends X{_prepare(){this._cache=[]}supportsScheme(e){return super.supportsScheme(e)&&V.default(e,"_registry.has.search",!1)}getMappings(a){return E(this,null,function*(){var u=a,{from:e,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=[];e&&this.supportsScheme(i.scheme[!1])?l.push(this._getMappings(j(P({},o),{concept:e,sourceScheme:i.scheme[!0],targetScheme:i.scheme[!1],limit:s}))):l.push(Promise.resolve([])),r&&this.supportsScheme(i.scheme[!0])?l.push(this._getMappings(j(P({},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(m=>!c.find(d=>q.compareMappingMembers(m,d)));c.length+h.length>s;)h.length>=c.length?h=h.slice(0,-1):c=c.slice(0,-1);return so.default(c,h)})}_getMappings(a){return E(this,null,function*(){var u=a,{concept:e,sourceScheme:r,targetScheme:n,limit:i,swap:s=!1}=u,o=H(u,["concept","sourceScheme","targetScheme","limit","swap"]);var f;if(!e||!r||!n)return[];if(q.compare(r,n))return[];let l=q.languagePreference.selectLanguage(e.prefLabel)||this._defaultLanguages[0],c=q.prefLabel(e,{fallbackToUri:!1,language:l});if(!c)return[];let h=/^[\s\wäüöÄÜÖß]*\w/.exec(c);c=h?h[0]:c;let m=yield this._getResults(j(P({},o),{label:c,targetScheme:n,limit:i}));if(!m.length&&((f=e.broader)!=null&&f.length))for(let g of e.broader){let w=q.prefLabel(g,{fallbackToUri:!1,language:l});if(w&&(m=yield this._getResults(j(P({},o),{label:w,targetScheme:n,limit:i})),m.length))break}let d=m.map(g=>({fromScheme:r,from:{memberSet:[e]},toScheme:n,to:{memberSet:[g]},type:["http://www.w3.org/2004/02/skos/core#mappingRelation"]}));return s&&(d=d.map(g=>Object.assign(g,{fromScheme:g.toScheme,from:g.to,toScheme:g.fromScheme,to:g.from}))),d})}_getResults(s){return E(this,null,function*(){var o=s,{label:e,targetScheme:r,limit:n}=o,i=H(o,["label","targetScheme","limit"]);var h;let a=(this._cache[r.uri]||{})[e];if(a&&a._limit>=n)return a;let u=V.default(r,"_registry");if(!u||u.has.search===!1)return[];let l=(h=(this._jskos.overrides||[]).find(m=>q.compare(m,r)))==null?void 0:h.search,c=yield u.search(j(P({},i),{url:l,search:e,scheme:r,limit:n}));return this._cache[r.uri]||(this._cache[r.uri]={}),this._cache[r.uri][e]=c,this._cache[r.uri][e]._limit=n,c})}};ee(nt,"supports",{mappings:!0});nt.providerName="LabelSearchSuggestion";nt.stored=!1;var it=class extends X{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||V.default(this.schemes.find(o=>q.compare(o,e)),"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(e,{addFormatParameter:r=!0}={}){let n=V.default(e,"inScheme[0]");if(!e||!e.uri)throw new U({parameter:"concept",message:"Missing concept URI"});return this._getApiUrl(n,"/data",r?{format:"application/json"}:{})}_getSchemeUri(e){return E(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let r=this._approvedSchemes.find(o=>q.compare(e,o));if(r)return r.uri;if(this._rejectedSchemes.find(o=>q.compare(e,o)))return null;let n=this._getApiUrl(e,"/"),s=(yield this.axios({method:"get",url:n})).conceptschemes.find(o=>q.compare(o,e));return s?(this._approvedSchemes.push({uri:s.uri,identifier:q.getAllUris(e)}),s.uri):(this._rejectedSchemes.push({uri:e.uri,identifier:e.identifier}),null)})}_toJskosConcept(e,{concept:r,scheme:n,result:i,language:s}={}){if(!e)return null;r=q.deepCopy(r||{}),s=s||e.lang||"en",r.uri=e.uri,n&&(r.inScheme=[n]);let o=e.matchedPrefLabel||e.prefLabel||e.label;if(ce.default(o))de.default(r,`prefLabel.${s}`,o);else{o&&!xe.default(o)&&(o=[o]);for(let l of o||[])de.default(r,`prefLabel.${l.lang}`,l.value)}let a=e.altLabel;if(ce.default(a))de.default(r,`altLabel.${s}`,[a]);else{a&&!xe.default(a)&&(a=[a]);for(let l of a||[])V.default(r,`altLabel.${l.lang}`)?(r.altLabel[l.lang].push(l.value),r.altLabel[l.lang]=bt.default(r.altLabel[l.lang])):de.default(r,`altLabel.${l.lang}`,[l.value])}let u=e.notation||e["skos:notation"]||q.notation(r);u&&(r.notation=[u.value||u]),e.broader&&(xe.default(e.broader)||(e.broader=[e.broader]),r.broader=e.broader.map(l=>ce.default(l)?{uri:l}:l)),e.hasChildren===!0?r.narrower=[null]:e.hasChildren===!1&&(r.narrower=[]),e.type&&!xe.default(e.type)&&(e.type=[e.type]),r.type=r.type||[];for(let l of e.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=bt.default(r.type),r.type.length||(r.type=["http://www.w3.org/2004/02/skos/core#Concept"]),r}getSchemes(){return E(this,arguments,function*(r={}){var e=H(r,[]);let n=[];for(let i of this.schemes||[]){let s=this._getApiUrl(i,"/"),a=(yield this.axios(j(P({},e),{method:"get",url:s}))).conceptschemes.find(l=>q.compare(l,i)),u=a&&(a.prefLabel||a.label||a.title);u&&de.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 E(this,null,function*(){var i=n,{scheme:e}=i,r=H(i,["scheme"]);let s=this._getApiUrl(e,"/topConcepts"),o=yield this._getSchemeUri(e);if(!o)throw new U({parameter:"scheme",message:"Missing or unsupported scheme or VOCID property on scheme"});de.default(r,"params.scheme",o);let a=yield this.axios(j(P({},r),{method:"get",url:s})),u=[];for(let l of a.topconcepts||[]){let c=this._toJskosConcept(l,{scheme:e,language:this._language});c.topConceptOf=[e],u.push(c)}return u})}getConcepts(n){return E(this,null,function*(){var i=n,{concepts:e}=i,r=H(i,["concepts"]);xe.default(e)||(e=[e]),e=e.map(o=>({uri:o.uri,inScheme:o.inScheme}));let s=[];for(let o of e){let a=this._getDataUrl(o,{addFormatParameter:!1});if(!a)continue;let u=yield this.axios(j(P({},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 m=l[h]||c[h];m&&!xe.default(m)&&(m=[m]),m||(m=[]),c[h]=m.map(d=>this._toJskosConcept(u.graph.find(f=>q.compare(f,d)),{scheme:o.inScheme[0],result:u}))}c.ancestors=[],s.push(c)}}return s})}getNarrower(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=H(i,["concept"]);if(!e||!e.uri)throw new U({parameter:"concept"});let s=e.inScheme[0],o=this._getApiUrl(s,"/children");return de.default(r,"params.uri",e.uri),((yield this.axios(j(P({},r),{method:"get",url:o}))).narrower||[]).map(l=>this._toJskosConcept(l,{scheme:s}))})}getAncestors(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=H(i,["concept"]);if(!e||!e.uri)throw new U({parameter:"concept"});let s=e.inScheme[0],o=this._getApiUrl(s,"/broaderTransitive");de.default(r,"params.uri",e.uri);let a=yield this.axios(j(P({},r),{method:"get",url:o})),u=[],l=e.uri;for(;l;){if(l!=e.uri){let h=V.default(a,`broaderTransitive["${l}"]`);u=u.concat([h])}l=V.default(a,`broaderTransitive["${l}"].broader[0]`)}return u.map(h=>this._toJskosConcept(h,{scheme:s})).filter(h=>h.uri!=e.uri)})}search(o){return E(this,null,function*(){var a=o,{search:e,scheme:r,limit:n,types:i=[]}=a,s=H(a,["search","scheme","limit","types"]);let u=this._getApiUrl(r,"/search");return de.default(s,"params.query",`${e}*`),de.default(s,"params.unique",1),de.default(s,"params.maxhits",n||100),de.default(s,"params.type",i.join(" ")),((yield this.axios(j(P({},s),{method:"get",url:u}))).results||[]).map(h=>this._toJskosConcept(h,{scheme:r}))})}getTypes(n){return E(this,null,function*(){var i=n,{scheme:e}=i,r=H(i,["scheme"]);let s=this._getApiUrl(e,"/types"),o=[],a=yield this.axios(j(P({},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})}};ee(it,"supports",{scheme:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,types:!0,suggest:!0,search:!0});it.providerName="SkosmosApi";it.providerType="http://bartoc.org/api-type/skosmos";var vi="http://id.loc.gov/authorities/",bi=[{uri:`${vi}subjects`,identifier:["http://bartoc.org/en/node/454"],notation:["LCSH"],concepts:[null],topConcepts:[]},{uri:`${vi}names`,identifier:["http://bartoc.org/en/node/18536"],notation:["LCNAF"],concepts:[null],topConcepts:[]}],om=`${vi}classification`;function am(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 i3(t){let e=am(t);return e.namespace=e.uri+"/",e.type=["http://www.w3.org/2004/02/skos/core#ConceptScheme"],e}var Io=t=>e=>!e||!t||!t.namespace?!0:e.uri.startsWith(t.namespace);function s3(t,{scheme:e}){let r=am(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(s=>bi.find(o=>o.uri===s["@id"])),(!r.inScheme.length||!r.inScheme[0])&&delete r.inScheme;let n=t["http://www.loc.gov/mads/rdf/v1#hasNarrowerAuthority"]||q.compare(r.inScheme[0],{uri:om})&&t["http://www.loc.gov/mads/rdf/v1#hasMADSCollectionMember"]||[];r.narrower=n.map(s=>({uri:s["@id"]})).filter(Io(r.inScheme&&r.inScheme[0]));let i=t["http://www.loc.gov/mads/rdf/v1#hasBroaderAuthority"]||q.compare(r.inScheme[0],{uri:om})&&t["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSCollection"]||[];return r.broader=i.map(s=>({uri:s["@id"]})).filter(Io(r.inScheme&&r.inScheme[0])),r}var st=class extends X{static _registryConfigForBartocApiConfig({scheme:e}={}){return!e||!bi.find(r=>q.compare(r,e))?null:{schemes:[e]}}getSchemes(){return E(this,null,function*(){let e=[];for(let r of yield Promise.all(bi.filter(n=>!this.schemes||!this.schemes.length||this.schemes.find(i=>q.compare(n,i))).map(n=>_e({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(i3(o),n),o.topConcepts=(o.topConcepts||[]).filter(a=>a),o}return null}))))r&&e.push(r);return e})}getConcepts(r){return E(this,arguments,function*({concepts:e}){Array.isArray(e)||(e=[e]);let n=[];for(let i of yield Promise.all(e.map(s=>_e({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?s3(u,{scheme:s.inScheme&&s.inScheme[0]}):null}}))))i&&n.push(i);return n})}suggest(e){return E(this,null,function*(){let r=yield this.search(e);return[e.search,r.map(n=>q.prefLabel(n,{fallbackToUri:!0})),[],r.map(n=>n.uri)]})}search(s){return E(this,arguments,function*({search:e,scheme:r,limit:n,offset:i}){let o=q.getAllUris(r).find(u=>u.startsWith(vi));if(!o||!bi.find(u=>q.compare(u,{uri:o})))throw new U({parameter:"scheme",message:"provided scheme is not supported (yet)"});if(!e)throw new U({parameter:"search",message:"parameter is empty or missing"});n=n||this._jskos.suggestResultLimit||100,i=i||0;let{data:a}=yield _e({method:"get",url:`${o}/suggest2`.replace("http:","https:"),params:{q:e,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(Io(r))})}};ee(st,"supports",{schemes:!0,top:!1,data:!0,concepts:!0,narrower:!1,ancestors:!1,suggest:!0,search:!0});st.providerName="LocApi";st.providerType="http://bartoc.org/api-type/loc";var bm={};var K;function Ce(t,e,r){let n=typeof r,i=typeof t;if(n!=="undefined"){if(i!=="undefined"){if(r){if(i==="function"&&n===i)return function(a){return t(r(a))};if(e=t.constructor,e===r.constructor){if(e===Array)return r.concat(t);if(e===Map){var s=new Map(r);for(var o of t)s.set(o[0],o[1]);return s}if(e===Set){o=new Set(r);for(s of t.values())o.add(s);return o}}}return t}return r}return i==="undefined"?e:t}function wr(t,e){return typeof t=="undefined"?e:t}function me(){return Object.create(null)}function ze(t){return typeof t=="string"}function wn(t){return typeof t=="object"}function _n(t,e){if(ze(e))t=t[e];else for(let r=0;t&&r<e.length;r++)t=t[e[r]];return t}var o3=/[^\p{L}\p{N}]+/u,a3=/(\d{3})/g,u3=/(\D)(\d{3})/g,l3=/(\d{3})(\D)/g,um=/[\u0300-\u036f]/g;function xr(t={}){if(!this||this.constructor!==xr)return new xr(...arguments);if(arguments.length)for(t=0;t<arguments.length;t++)this.assign(arguments[t]);else this.assign(t)}K=xr.prototype;K.assign=function(t){this.normalize=Ce(t.normalize,!0,this.normalize);let e=t.include,r=e||t.exclude||t.split,n;if(r||r===""){if(typeof r=="object"&&r.constructor!==RegExp){let i="";n=!e,e||(i+="\\p{Z}"),r.letter&&(i+="\\p{L}"),r.number&&(i+="\\p{N}",n=!!e),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("["+(e?"^":"")+i+"]+","u")}catch(s){this.split=/\s+/}}else this.split=r,n=r===!1||"a1a".split(r).length<2;this.numeric=Ce(t.numeric,n)}else{try{this.split=Ce(this.split,o3)}catch(i){this.split=/\s+/}this.numeric=Ce(t.numeric,Ce(this.numeric,!0))}if(this.prepare=Ce(t.prepare,null,this.prepare),this.finalize=Ce(t.finalize,null,this.finalize),r=t.filter,this.filter=typeof r=="function"?r:Ce(r&&new Set(r),null,this.filter),this.dedupe=Ce(t.dedupe,!0,this.dedupe),this.matcher=Ce((r=t.matcher)&&new Map(r),null,this.matcher),this.mapper=Ce((r=t.mapper)&&new Map(r),null,this.mapper),this.stemmer=Ce((r=t.stemmer)&&new Map(r),null,this.stemmer),this.replacer=Ce(t.replacer,null,this.replacer),this.minlength=Ce(t.minlength,1,this.minlength),this.maxlength=Ce(t.maxlength,1024,this.maxlength),this.rtl=Ce(t.rtl,!1,this.rtl),(this.cache=r=Ce(t.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};K.addStemmer=function(t,e){return this.stemmer||(this.stemmer=new Map),this.stemmer.set(t,e),this.A+=(this.A?"|":"")+t,this.K=null,this.cache&&Bt(this),this};K.addFilter=function(t){return typeof t=="function"?this.filter=t:(this.filter||(this.filter=new Set),this.filter.add(t)),this.cache&&Bt(this),this};K.addMapper=function(t,e){return typeof t=="object"?this.addReplacer(t,e):t.length>1?this.addMatcher(t,e):(this.mapper||(this.mapper=new Map),this.mapper.set(t,e),this.cache&&Bt(this),this)};K.addMatcher=function(t,e){return typeof t=="object"?this.addReplacer(t,e):t.length<2&&(this.dedupe||this.mapper)?this.addMapper(t,e):(this.matcher||(this.matcher=new Map),this.matcher.set(t,e),this.h+=(this.h?"|":"")+t,this.J=null,this.cache&&Bt(this),this)};K.addReplacer=function(t,e){return typeof t=="string"?this.addMatcher(t,e):(this.replacer||(this.replacer=[]),this.replacer.push(t,e),this.cache&&Bt(this),this)};K.encode=function(t,e){if(this.cache&&t.length<=this.H)if(this.F){if(this.B.has(t))return this.B.get(t)}else this.F=setTimeout(Bt,50,this);this.normalize&&(typeof this.normalize=="function"?t=this.normalize(t):t=um?t.normalize("NFKD").replace(um,"").toLowerCase():t.toLowerCase()),this.prepare&&(t=this.prepare(t)),this.numeric&&t.length>3&&(t=t.replace(u3,"$1 $2").replace(l3,"$1 $2").replace(a3,"$1 "));let r=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer),n=[],i=me(),s,o,a=this.split||this.split===""?t.split(this.split):[t];for(let l=0,c,h;l<a.length;l++)if((c=h=a[l])&&!(c.length<this.minlength||c.length>this.maxlength)){if(e){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 m;for(;m!==c&&c.length>2;)m=c,c=c.replace(this.K,d=>this.stemmer.get(d))}if(c&&(this.mapper||this.dedupe&&c.length>1)){u="";for(let m=0,d="",f,g;m<c.length;m++)f=c.charAt(m),f===d&&this.dedupe||((g=this.mapper&&this.mapper.get(f))||g===""?g===d&&this.dedupe||!(d=g)||(u+=g):u+=d=f);c=u}if(this.matcher&&c.length>1&&(this.J||(this.J=new RegExp("("+this.h+")","g")),c=c.replace(this.J,m=>this.matcher.get(m))),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(e){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&&t.length<=this.H&&(this.B.set(t,n),this.B.size>this.L&&(this.B.clear(),this.H=this.H/1.1|0)),n};function Bt(t){t.F=null,t.B.clear(),t.D.clear()}function jo(t,e,r){r||(e||typeof t!="object"?typeof e=="object"&&(r=e,e=0):r=t),r&&(t=r.query||t,e=r.limit||e);let n=""+(e||0);r&&(n+=(r.offset||0)+!!r.context+!!r.suggest+(r.resolve!==!1)+(r.resolution||this.resolution)+(r.boost||0)),t=(""+t).toLowerCase(),this.cache||(this.cache=new zt);let i=this.cache.get(t+n);if(!i){let s=r&&r.cache;s&&(r.cache=!1),i=this.search(t,e,r),s&&(r.cache=s),this.cache.set(t+n,i)}return i}function zt(t){this.limit=t&&t!==!0?t:1e3,this.cache=new Map,this.h=""}zt.prototype.set=function(t,e){this.cache.set(this.h=t,e),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)};zt.prototype.get=function(t){let e=this.cache.get(t);return e&&this.h!==t&&(this.cache.delete(t),this.cache.set(this.h=t,e)),e};zt.prototype.remove=function(t){for(let e of this.cache){let r=e[0];e[1].includes(t)&&this.cache.delete(r)}};zt.prototype.clear=function(){this.cache.clear(),this.h=""};var lm={normalize:!1,numeric:!1,dedupe:!1},xi={},Ro=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"]]),cm=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),fm=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\1+/g,"$1"],hm={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},Fo={Exact:lm,Default:xi,Normalize:xi,LatinBalance:{mapper:Ro},LatinAdvanced:{mapper:Ro,matcher:cm,replacer:fm},LatinExtra:{mapper:Ro,replacer:fm.concat([/(?!^)[aeo]/g,""]),matcher:cm},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(t){for(let r=0;r<t.length;r++){var e=t[r];let n=e.charAt(0),i=hm[n];for(let s=1,o;s<e.length&&(o=e.charAt(s),o==="h"||o==="w"||!(o=hm[o])||o===i||(n+=o,i=o,n.length!==4));s++);t[r]=n}}},CJK:{split:""},LatinExact:lm,LatinDefault:xi,LatinSimple:xi};function pm(t,e,r,n){let i=[];for(let s=0,o;s<t.index.length;s++)if(o=t.index[s],e>=o.length)e-=o.length;else{e=o[n?"splice":"slice"](e,r);let a=e.length;if(a&&(i=i.length?i.concat(e):e,r-=a,n&&(t.length-=a),!r))break;e=0}return i}function Sr(t){if(!this||this.constructor!==Sr)return new Sr(t);this.index=t?[t]:[],this.length=t?t.length:0;let e=this;return new Proxy([],{get(r,n){if(n==="length")return e.length;if(n==="push")return function(i){e.index[e.index.length-1].push(i),e.length++};if(n==="pop")return function(){if(e.length)return e.length--,e.index[e.index.length-1].pop()};if(n==="indexOf")return function(i){let s=0;for(let o=0,a,u;o<e.index.length;o++){if(a=e.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<e.index.length;s++)if(e.index[s].includes(i))return!0;return!1};if(n==="slice")return function(i,s){return pm(e,i||0,s||e.length,!1)};if(n==="splice")return function(i,s){return pm(e,i||0,s||e.length,!0)};if(n==="constructor")return Array;if(typeof n!="symbol")return(r=e.index[n/gt(2,31)|0])&&r[n]},set(r,n,i){return r=n/gt(2,31)|0,(e.index[r]||(e.index[r]=[]))[n]=i,e.length++,!0}})}Sr.prototype.clear=function(){this.index.length=0};Sr.prototype.push=function(){};function He(t=8){if(!this||this.constructor!==He)return new He(t);this.index=me(),this.h=[],this.size=0,t>32?(this.B=xm,this.A=BigInt(t)):(this.B=vm,this.A=t)}He.prototype.get=function(t){let e=this.index[this.B(t)];return e&&e.get(t)};He.prototype.set=function(t,e){var r=this.B(t);let n=this.index[r];n?(r=n.size,n.set(t,e),(r-=n.size)&&this.size++):(this.index[r]=n=new Map([[t,e]]),this.h.push(n),this.size++)};function Ke(t=8){if(!this||this.constructor!==Ke)return new Ke(t);this.index=me(),this.h=[],this.size=0,t>32?(this.B=xm,this.A=BigInt(t)):(this.B=vm,this.A=t)}Ke.prototype.add=function(t){var e=this.B(t);let r=this.index[e];r?(e=r.size,r.add(t),(e-=r.size)&&this.size++):(this.index[e]=r=new Set([t]),this.h.push(r),this.size++)};K=He.prototype;K.has=Ke.prototype.has=function(t){let e=this.index[this.B(t)];return e&&e.has(t)};K.delete=Ke.prototype.delete=function(t){let e=this.index[this.B(t)];e&&e.delete(t)&&this.size--};K.clear=Ke.prototype.clear=function(){this.index=me(),this.h=[],this.size=0};K.values=Ke.prototype.values=function*(){for(let t=0;t<this.h.length;t++)for(let e of this.h[t].values())yield e};K.keys=Ke.prototype.keys=function*(){for(let t=0;t<this.h.length;t++)for(let e of this.h[t].keys())yield e};K.entries=Ke.prototype.entries=function*(){for(let t=0;t<this.h.length;t++)for(let e of this.h[t].entries())yield e};function vm(t){let e=gt(2,this.A)-1;if(typeof t=="number")return t&e;let r=0,n=this.A+1;for(let i=0;i<t.length;i++)r=(r*n^t.charCodeAt(i))&e;return this.A===32?r+gt(2,31):r}function xm(t){let e=gt(BigInt(2),this.A)-BigInt(1);var r=typeof t;if(r==="bigint")return t&e;if(r==="number")return BigInt(t)&e;r=BigInt(0);let n=this.A+BigInt(1);for(let i=0;i<t.length;i++)r=(r*n^BigInt(t.charCodeAt(i)))&e;return r}var _r,yn;function c3(t){return E(this,null,function*(){t=t.data;var e=t.task;let r=t.id,n=t.args;if(e==="init")yn=t.options||{},(e=t.factory)?(Function("return "+e)()(self),_r=new self.FlexSearch.Index(yn),delete self.FlexSearch):_r=new We(yn),postMessage({id:r});else{let i;e==="export"&&(n[1]?(n[0]=yn.export,n[2]=0,n[3]=1):n=null),e==="import"?n[0]&&(t=yield yn.import.call(_r,n[0]),_r.import(n[0],t)):((i=n&&_r[e].apply(_r,n))&&i.then&&(i=yield i),i&&i.await&&(i=yield i.await),e==="search"&&i.result&&(i=i.result)),postMessage(e==="search"?{id:r,msg:i}:{id:r})}})}function No(t){br.call(t,"add"),br.call(t,"append"),br.call(t,"search"),br.call(t,"update"),br.call(t,"remove"),br.call(t,"searchCache")}var Mo,dm,Ei;function f3(){Mo=Ei=0}function br(t){this[t+"Async"]=function(){let e=arguments;var r=e[e.length-1];let n;if(typeof r=="function"&&(n=r,delete e[e.length-1]),Mo?Ei||(Ei=Date.now()-dm>=this.priority*this.priority*3):(Mo=setTimeout(f3,0),dm=Date.now()),Ei){let s=this;return new Promise(o=>{setTimeout(function(){o(s[t+"Async"].apply(s,e))},0)})}let i=this[t].apply(this,e);return r=i.then?i:new Promise(s=>s(i)),n&&r.then(n),r}}var St=0;function Ut(t={},e){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=me(),this.worker)return i?this.worker.on("message",u):this.worker.onmessage=u,t.config?new Promise(function(l){St>1e9&&(St=0),s.h[++St]=function(){l(s)},s.worker.postMessage({id:St,task:"init",factory:n,options:t})}):(this.priority=t.priority||4,this.encoder=e||null,this.worker.postMessage({task:"init",factory:n,options:t}),this)}if(!this||this.constructor!==Ut)return new Ut(t);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=h3(n,i,t.worker);return o.then?o.then(function(a){return r.call(s,a)}):r.call(this,o)}At("add");At("append");At("search");At("update");At("remove");At("clear");At("export");At("import");Ut.prototype.searchCache=jo;No(Ut.prototype);function At(t){Ut.prototype[t]=function(){let e=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){t==="export"&&typeof r[0]=="function"&&(r[0]=null),St>1e9&&(St=0),e.h[++St]=s,e.worker.postMessage({task:t,id:St,args:r})}),i?(n.then(i),this):n}}function h3(t,e,r){return e?typeof module!="undefined"?new(Po()).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>Se(Po(),1)).then(function(n){return new n.Worker(bm.dirname+"/node/node.mjs")}):t?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+c3.toString()],{type:"text/javascript"}))):new window.Worker(typeof r=="string"?r:bm.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(t,e,r){if(wn(t)&&(e=t,t=_n(e,this.key)),e&&(t||t===0)){if(!r&&this.reg.has(t))return this.update(t,e);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(e);i&&n.add(t,i,r,!0)}else i=u.G,(!i||i(e))&&(u.constructor===String?u=[""+u]:ze(u)&&(u=[u]),Lo(e,u,this.D,0,n,t,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=me();if(typeof s=="function"){if(s=s(e),!s)continue}else{var o=s.G;if(o&&!o(e))continue;s.constructor===String&&(s=""+s),s=_n(e,s)}if(i&&s){ze(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(t))){if(c.length===gt(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(t),this.fastupdate&&((o=this.reg.get(t))?o.push(c):this.reg.set(t,[c]))}}}if(this.store&&(!r||!this.store.has(t))){let a;if(this.h){a=me();for(let u=0,l;u<this.h.length;u++){if(l=this.h[u],(r=l.G)&&!r(e))continue;let c;if(typeof l=="function"){if(c=l(e),!c)continue;l=[l.O]}else if(ze(l)||l.constructor===String){a[l]=e[l];continue}Do(e,a,l,0,l[0],c)}}this.store.set(t,a||e)}this.worker&&(this.fastupdate||this.reg.add(t))}return this};function Do(t,e,r,n,i,s){if(t=t[i],n===r.length-1)e[i]=s||t;else if(t)if(t.constructor===Array)for(e=e[i]=Array(t.length),i=0;i<t.length;i++)Do(t,e,r,n,i);else e=e[i]||(e[i]=me()),i=r[++n],Do(t,e,r,n,i)}function Lo(t,e,r,n,i,s,o,a){if(t=t[o])if(n===e.length-1){if(t.constructor===Array){if(r[n]){for(e=0;e<t.length;e++)i.add(s,t[e],!0,!0);return}t=t.join(" ")}i.add(s,t,a,!0)}else if(t.constructor===Array)for(o=0;o<t.length;o++)Lo(t,e,r,n,i,s,o,a);else o=e[++n],Lo(t,e,r,n,i,s,o,a)}function Bo(t,e,r,n){if(!t.length)return t;if(t.length===1)return t=t[0],t=r||t.length>e?t.slice(r,r+e):t,n?vr.call(this,t):t;let i=[];for(let s=0,o,a;s<t.length;s++)if((o=t[s])&&(a=o.length)){if(r){if(r>=a){r-=a;continue}o=o.slice(r,r+e),a=o.length,r=0}if(a>e&&(o=o.slice(0,e),a=e),!i.length&&a>=e)return n?vr.call(this,o):o;if(i.push(o),e-=a,!e)break}return i=i.length>1?[].concat.apply([],i):i[0],n?vr.call(this,i):i}function qi(t,e,r,n){var i=n[0];if(i[0]&&i[0].query)return t[e].apply(t,i);if(!(e!=="and"&&e!=="not"||t.result.length||t.await||i.suggest))return n.length>1&&(i=n[n.length-1]),(n=i.resolve)?t.await||t.result:t;let s=[],o=0,a=0,u,l,c,h,m;for(e=0;e<n.length;e++)if(i=n[e]){var d=void 0;if(i.constructor===ue)d=i.await||i.result;else if(i.then||i.constructor===Array)d=i;else{o=i.limit||0,a=i.offset||0,c=i.suggest,l=i.resolve,u=((h=i.highlight||t.highlight)||i.enrich)&&l,d=i.queue;let f=i.async||d,g=i.index,w=i.query;if(g?t.index||(t.index=g):g=t.index,w||i.tag){let O=i.field||i.pluck;if(O&&(!w||t.query&&!h||(t.query=w,t.field=O,t.highlight=h),g=g.index.get(O)),d&&(m||t.await)){m=1;let I,T=t.C.length,F=new Promise(function(k){I=k});(function(k,S){F.h=function(){S.index=null,S.resolve=!1;let D=f?k.searchAsync(S):k.search(S);return D.then?D.then(function(M){return t.C[T]=M=M.result||M,I(M),M}):(D=D.result||D,I(D),D)}})(g,Object.assign({},i)),t.C.push(F),s[e]=F;continue}else i.resolve=!1,i.index=null,d=f?g.searchAsync(i):g.search(i),i.resolve=l,i.index=g}else if(i.and)d=Si(i,"and",g);else if(i.or)d=Si(i,"or",g);else if(i.not)d=Si(i,"not",g);else if(i.xor)d=Si(i,"xor",g);else continue}d.await?(m=1,d=d.await):d.then?(m=1,d=d.then(function(f){return f.result||f})):d=d.result||d,s[e]=d}if(m&&!t.await&&(t.await=new Promise(function(f){t.return=f})),m){let f=Promise.all(s).then(function(g){for(let w=0;w<t.C.length;w++)if(t.C[w]===f){t.C[w]=function(){return r.call(t,g,o,a,u,l,c,h)};break}Uo(t)});t.C.push(f)}else if(t.await)t.C.push(function(){return r.call(t,s,o,a,u,l,c,h)});else return r.call(t,s,o,a,u,l,c,h);return l?t.await||t.result:t}function Si(t,e,r){t=t[e];let n=t[0]||t;return n.index||(n.index=r),r=new ue(n),t.length>1&&(r=r[e].apply(r,t.slice(1))),r}ue.prototype.or=function(){return qi(this,"or",p3,arguments)};function p3(t,e,r,n,i,s,o){return t.length&&(this.result.length&&t.push(this.result),t.length<2?this.result=t[0]:(this.result=Sm(t,e,r,!1,this.h),r=0)),i&&(this.await=null),i?this.resolve(e,r,n,o):this}ue.prototype.and=function(){return qi(this,"and",d3,arguments)};function d3(t,e,r,n,i,s,o){if(!s&&!this.result.length)return i?this.result:this;let a;if(t.length)if(this.result.length&&t.unshift(this.result),t.length<2)this.result=t[0];else{let u=0;for(let l=0,c,h;l<t.length;l++)if((c=t[l])&&(h=c.length))u<h&&(u=h);else if(!s){u=0;break}u?(this.result=Oi(t,u,e,r,s,this.h,i),a=!0):this.result=[]}else s||(this.result=t);return i&&(this.await=null),i?this.resolve(e,r,n,o,a):this}ue.prototype.xor=function(){return qi(this,"xor",m3,arguments)};function m3(t,e,r,n,i,s,o){if(t.length)if(this.result.length&&t.unshift(this.result),t.length<2)this.result=t[0];else{e:{s=r;var a=this.h;let u=[],l=me(),c=0;for(let h=0,m;h<t.length;h++)if(m=t[h]){c<m.length&&(c=m.length);for(let d=0,f;d<m.length;d++)if(f=m[d])for(let g=0,w;g<f.length;g++)w=f[g],l[w]=l[w]?2:1}for(let h=0,m,d=0;h<c;h++)for(let f=0,g;f<t.length;f++)if((g=t[f])&&(m=g[h])){for(let w=0,O;w<m.length;w++)if(O=m[w],l[O]===1)if(s)s--;else if(i){if(u.push(O),u.length===e){t=u;break e}}else{let I=h+(f?a:0);if(u[I]||(u[I]=[]),u[I].push(O),++d===e){t=u;break e}}}t=u}this.result=t,a=!0}else s||(this.result=t);return i&&(this.await=null),i?this.resolve(e,r,n,o,a):this}ue.prototype.not=function(){return qi(this,"not",g3,arguments)};function g3(t,e,r,n,i,s,o){if(!s&&!this.result.length)return i?this.result:this;if(t.length&&this.result.length){e:{s=r;var a=[];t=new Set(t.flat().flat());for(let u=0,l,c=0;u<this.result.length;u++)if(l=this.result[u]){for(let h=0,m;h<l.length;h++)if(m=l[h],!t.has(m)){if(s)s--;else if(i){if(a.push(m),a.length===e){t=a;break e}}else if(a[u]||(a[u]=[]),a[u].push(m),++c===e){t=a;break e}}}t=a}this.result=t,a=!0}return i&&(this.await=null),i?this.resolve(e,r,n,o,a):this}function Ci(t,e,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 m=i.template;h=m.length-2,i=i.pattern}typeof i!="string"&&(i=i===!1?"":"..."),h&&(i=m.replace("$1",i)),m=i.length-h;let d,f;typeof u=="object"&&(d=u.before,d===0&&(d=-1),f=u.after,f===0&&(f=-1),u=u.total||9e5),h=new Map;for(let Ct=0,Te,Er,Ot;Ct<e.length;Ct++){let Tt;if(n)Tt=e,Ot=n;else{var g=e[Ct];if(Ot=g.field,!Ot)continue;Tt=g.result}Er=r.get(Ot),Te=Er.encoder,g=h.get(Te),typeof g!="string"&&(g=Te.encode(t),h.set(Te,g));for(let Ie=0;Ie<Tt.length;Ie++){var w=Tt[Ie].doc;if(!w||(w=_n(w,Ot),!w))continue;var O=w.trim().split(/\s+/);if(!O.length)continue;w="";var I=[];let It=[];for(var T=-1,F=-1,k=0,S=0;S<O.length;S++){var D=O[S],M=Te.encode(D);M=M.length>1?M.join(" "):M[0];let J;if(M&&D){for(var z=D.length,Z=(Te.split?D.replace(Te.split,""):D).length-M.length,Y="",re=0,se=0;se<g.length;se++){var fe=g[se];if(fe){var oe=fe.length;oe+=Z<0?0:Z,re&&oe<=re||(fe=M.indexOf(fe),fe>-1&&(Y=(fe?D.substring(0,fe):"")+o+D.substring(fe,fe+oe)+a+(fe+oe<z?D.substring(fe+oe):""),re=oe,J=!0))}}Y&&(u&&(T<0&&(T=w.length+(w?1:0)),F=w.length+(w?1:0)+Y.length,k+=z,It.push(I.length),I.push({match:Y})),w+=(w?" ":"")+Y)}if(!J)D=O[S],w+=(w?" ":"")+D,u&&I.push({text:D});else if(u&&k>=u)break}if(k=It.length*(s.length-2),d||f||u&&w.length-k>u)if(k=u+k-m*2,S=F-T,d>0&&(S+=d),f>0&&(S+=f),S<=k)O=d?T-(d>0?d:0):T-((k-S)/2|0),I=f?F+(f>0?f:0):O+k,l||(O>0&&w.charAt(O)!==" "&&w.charAt(O-1)!==" "&&(O=w.indexOf(" ",O),O<0&&(O=0)),I<w.length&&w.charAt(I-1)!==" "&&w.charAt(I)!==" "&&(I=w.lastIndexOf(" ",I),I<F?I=F:++I)),w=(O?i:"")+w.substring(O,I)+(I<w.length?i:"");else{for(F=[],T={},k={},S={},D={},M={},Y=Z=z=0,se=re=1;;){var Oe=void 0;for(let J=0,he;J<It.length;J++){if(he=It[J],Y)if(Z!==Y){if(S[J+1])continue;if(he+=Y,T[he]){z-=m,k[J+1]=1,S[J+1]=1;continue}if(he>=I.length-1){if(he>=I.length){S[J+1]=1,he>=O.length&&(k[J+1]=1);continue}z-=m}if(w=I[he].text,oe=f&&M[J])if(oe>0){if(w.length>oe)if(S[J+1]=1,l)w=w.substring(0,oe);else continue;(oe-=w.length)||(oe=-1),M[J]=oe}else{S[J+1]=1;continue}if(z+w.length+1<=u)w=" "+w,F[J]+=w;else if(l)Oe=u-z-1,Oe>0&&(w=" "+w.substring(0,Oe),F[J]+=w),S[J+1]=1;else{S[J+1]=1;continue}}else{if(S[J])continue;if(he-=Z,T[he]){z-=m,S[J]=1,k[J]=1;continue}if(he<=0){if(he<0){S[J]=1,k[J]=1;continue}z-=m}if(w=I[he].text,oe=d&&D[J])if(oe>0){if(w.length>oe)if(S[J]=1,l)w=w.substring(w.length-oe);else continue;(oe-=w.length)||(oe=-1),D[J]=oe}else{S[J]=1;continue}if(z+w.length+1<=u)w+=" ",F[J]=w+F[J];else if(l)Oe=w.length+1-(u-z),Oe>=0&&Oe<w.length&&(w=w.substring(Oe)+" ",F[J]=w+F[J]),S[J]=1;else{S[J]=1;continue}}else{w=I[he].match,d&&(D[J]=d),f&&(M[J]=f),J&&z++;let Cr;if(he?!J&&m&&(z+=m):(k[J]=1,S[J]=1),he>=O.length-1||he<I.length-1&&I[he+1].match?Cr=1:m&&(z+=m),z-=s.length-2,!J||z+w.length<=u)F[J]=w;else{Oe=re=se=k[J]=0;break}Cr&&(k[J+1]=1,S[J+1]=1)}z+=w.length,Oe=T[he]=1}if(Oe)Z===Y?Y++:Z++;else{if(Z===Y?re=0:se=0,!re&&!se)break;re?(Z++,Y=Z):Y++}}w="";for(let J=0,he;J<F.length;J++)he=(k[J]?J?" ":"":(J&&!i?" ":"")+i)+F[J],w+=he;i&&!k[F.length]&&(w+=i)}c&&(w=w.replace(c," ")),Tt[Ie].highlight=w}if(n)break}return e}function ue(t,e){if(!this||this.constructor!==ue)return new ue(t,e);let r=0,n,i,s,o,a,u;if(t&&t.index){let l=t;if(e=l.index,r=l.boost||0,i=l.query){s=l.field||l.pluck,o=l.highlight;let c=l.resolve;t=l.async||l.queue,l.resolve=!1,l.index=null,t=t?e.searchAsync(l):e.search(l),l.resolve=c,l.index=e,t=t.result||t}else t=[]}if(t&&t.then){let l=this;t=t.then(function(c){l.C[0]=l.result=c.result||c,Uo(l)}),n=[t],t=[],a=new Promise(function(c){u=c})}this.index=e||null,this.result=t||[],this.h=r,this.C=n||[],this.await=a||null,this.return=u||null,this.highlight=o||null,this.query=i||"",this.field=s||""}K=ue.prototype;K.limit=function(t){if(this.await){let e=this;this.C.push(function(){return e.limit(t).result})}else if(this.result.length){let e=[];for(let r=0,n;r<this.result.length;r++)if(n=this.result[r])if(n.length<=t){if(e[r]=n,t-=n.length,!t)break}else{e[r]=n.slice(0,t);break}this.result=e}return this};K.offset=function(t){if(this.await){let e=this;this.C.push(function(){return e.offset(t).result})}else if(this.result.length){let e=[];for(let r=0,n;r<this.result.length;r++)(n=this.result[r])&&(n.length<=t?t-=n.length:(e[r]=n.slice(t),t=0));this.result=e}return this};K.boost=function(t){if(this.await){let e=this;this.C.push(function(){return e.boost(t).result})}else this.h+=t;return this};function Uo(t,e){let r=t.result;var n=t.await;t.await=null;for(let i=0,s;i<t.C.length;i++)if(s=t.C[i]){if(typeof s=="function")r=s(),t.C[i]=r=r.result||r,i--;else if(s.h)r=s.h(),t.C[i]=r=r.result||r,i--;else if(s.then)return t.await=n}return n=t.return,t.C=[],t.return=null,e||n(r),r}K.resolve=function(t,e,r,n,i){let s=this.await?Uo(this,!0):this.result;if(s.then){let o=this;return s.then(function(){return o.resolve(t,e,r,n,i)})}return s.length&&(typeof t=="object"?(n=t.highlight||this.highlight,r=!!n||t.enrich,e=t.offset,t=t.limit):(n=n||this.highlight,r=!!n||r),s=i?r?vr.call(this.index,s):s:Bo.call(this.index,s,t||100,e,r)),this.finalize(s,n)};K.finalize=function(t,e){if(t.then){let n=this;return t.then(function(i){return n.finalize(i,e)})}e&&t.length&&this.query&&(t=Ci(this.query,t,this.index.index,this.field,e));let r=this.return;return this.highlight=this.index=this.result=this.C=this.await=this.return=null,this.query=this.field="",r&&r(t),t};function Oi(t,e,r,n,i,s,o){let a=t.length,u=[],l,c;l=me();for(let h=0,m,d,f,g;h<e;h++)for(let w=0;w<a;w++)if(f=t[w],h<f.length&&(m=f[h]))for(let O=0;O<m.length;O++){if(d=m[O],(c=l[d])?l[d]++:(c=0,l[d]=1),g=u[c]||(u[c]=[]),!o){let I=h+(w||!i?0:s||0);g=g[I]||(g[I]=[])}if(g.push(d),o&&r&&c===a-1&&g.length-n===r)return n?g.slice(n):g}if(t=u.length)if(i)u=u.length>1?Sm(u,r,n,o,s):(u=u[0])&&r&&u.length>r||n?u.slice(n,r+n):u;else{if(t<a)return[];if(u=u[t-1],r||n)if(o)(u.length>r||n)&&(u=u.slice(n,r+n));else{i=[];for(let h=0,m;h<u.length;h++)if(m=u[h]){if(n&&m.length>n)n-=m.length;else if((r&&m.length>r||n)&&(m=m.slice(n,r+n),r-=m.length,n&&(n-=m.length)),i.push(m),!r)break}u=i}}return u}function Sm(t,e,r,n,i){let s=[],o=me(),a;var u=t.length;let l;if(n){for(i=u-1;i>=0;i--)if(l=(n=t[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===e)return s}}}else for(let c=u-1,h,m=0;c>=0;c--){h=t[c];for(let d=0;d<h.length;d++)if(l=(n=h[d])&&n.length){for(let f=0;f<l;f++)if(a=n[f],!o[a])if(o[a]=1,r)r--;else{let g=(d+(c<u-1&&i||0))/(c+1)|0;if((s[g]||(s[g]=[])).push(a),++m===e)return s}}}return s}function y3(t,e,r,n,i){let s=me(),o=[];for(let a=0,u;a<e.length;a++){u=e[a];for(let l=0;l<u.length;l++)s[u[l]]=1}if(i){for(let a=0,u;a<t.length;a++)if(u=t[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<t.result.length;a++)for(u=t.result[a],e=0;e<u.length;e++)l=u[e],s[l]&&((o[a]||(o[a]=[])).push(l),s[l]=0);return o}me();$t.prototype.search=function(t,e,r,n){r||(!e&&wn(t)?(r=t,t=""):wn(e)&&(r=e,e=0));let i=[];var s=[];let o,a,u,l,c,h,m=0,d=!0,f;if(r){r.constructor===Array&&(r={index:r}),t=r.query||t,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,d=r.resolve!==!1,c=r.cache,f=d&&this.store&&r.highlight;var w=!!f||d&&this.store&&r.enrich;e=r.limit||e;var O=r.offset||0;if(e||(e=d?100:0),g&&(!this.db||!n)){g.constructor!==Array&&(g=[g]);var I=[];for(let D=0,M;D<g.length;D++)if(M=g[D],M.field&&M.tag){var T=M.tag;if(T.constructor===Array)for(var F=0;F<T.length;F++)I.push(M.field,T[F]);else I.push(M.field,T)}else{T=Object.keys(M);for(let z=0,Z,Y;z<T.length;z++)if(Z=T[z],Y=M[Z],Y.constructor===Array)for(F=0;F<Y.length;F++)I.push(Z,Y[F]);else I.push(Z,Y)}if(g=I,!t){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],e,O,w))}else n=w3.call(this,I[g],I[g+1],e,O,w);i.push(d?{field:I[g],tag:I[g+1],result:n}:[n])}if(s.length){let D=this;return Promise.all(s).then(function(M){for(let z=0;z<M.length;z++)d?i[z].result=M[z]:i[z]=M[z];return d?i:new ue(i.length>1?Oi(i,1,0,0,u,l):i[0],D)})}return d?i:new ue(i.length>1?Oi(i,1,0,0,u,l):i[0],this)}}d||o||!(h=h||this.field)||(ze(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 k;I=(this.worker||this.db)&&!n&&[];for(let D=0,M,z,Z;D<h.length;D++){if(z=h[D],this.db&&this.tag&&!this.B[D])continue;let Y;if(ze(z)||(Y=z,z=Y.field,t=Y.query||t,e=wr(Y.limit,e),O=wr(Y.offset,O),u=wr(Y.suggest,u),f=d&&this.store&&wr(Y.highlight,f),w=!!f||d&&this.store&&wr(Y.enrich,w),c=wr(Y.cache,c)),n)M=n[D];else{T=Y||r||{},F=T.enrich;var S=this.index.get(z);if(g&&(this.db&&(T.tag=g,T.field=h,k=S.db.support_tag_search),!k&&F&&(T.enrich=!1),k||(T.limit=0,T.offset=0)),M=c?S.searchCache(t,g&&!k?0:e,T):S.search(t,g&&!k?0:e,T),g&&!k&&(T.limit=e,T.offset=O),F&&(T.enrich=F),I){I[D]=M;continue}}if(Z=(M=M.result||M)&&M.length,g&&Z){if(T=[],F=0,this.db&&n){if(!k)for(S=h.length;S<n.length;S++){let re=n[S];if(re&&re.length)F++,T.push(re);else if(!u)return d?i:new ue(i,this)}}else for(let re=0,se,fe;re<g.length;re+=2){if(se=this.tag.get(g[re]),!se){if(u)continue;return d?i:new ue(i,this)}if(fe=(se=se&&se.get(g[re+1]))&&se.length)F++,T.push(se);else if(!u)return d?i:new ue(i,this)}if(F){if(M=y3(M,T,e,O,d),Z=M.length,!Z&&!u)return d?M:new ue(M,this);F--}}if(Z)s[m]=z,i.push(M),m++;else if(h.length===1)return d?i:new ue(i,this)}if(I){if(this.db&&g&&g.length&&!k)for(w=0;w<g.length;w+=2){if(s=this.index.get(g[w]),!s){if(u)continue;return d?i:new ue(i,this)}I.push(s.db.tag(g[w+1],e,O,!1))}let D=this;return Promise.all(I).then(function(M){return r&&(r.resolve=d),M.length&&(M=D.search(t,e,r,M)),M})}if(!m)return d?i:new ue(i,this);if(o&&(!w||!this.store))return i=i[0],d?i:new ue(i,this);for(I=[],O=0;O<s.length;O++){if(g=i[O],w&&g.length&&typeof g[0].doc=="undefined"&&(this.db?I.push(g=this.index.get(this.field[0]).db.enrich(g)):g=vr.call(this,g)),o)return d?f?Ci(t,g,this.index,o,f):g:new ue(g,this);i[O]={field:s[O],result:g}}if(w&&this.db&&I.length){let D=this;return Promise.all(I).then(function(M){for(let z=0;z<M.length;z++)i[z].result=M[z];return f&&(i=Ci(t,i,D.index,o,f)),a?mm(i):i})}return f&&(i=Ci(t,i,this.index,o,f)),a?mm(i):i};function mm(t){let e=[],r=me(),n=me();for(let i=0,s,o,a,u,l,c,h;i<t.length;i++){s=t[i],o=s.field,a=s.result;for(let m=0;m<a.length;m++)l=a[m],typeof l!="object"?l={id:u=l}:u=l.id,(c=r[u])?c.push(o):(l.field=r[u]=[o],e.push(l)),(h=l.highlight)&&(c=n[u],c||(n[u]=c={},l.highlight=c),c[o]=h)}return e}function w3(t,e,r,n,i){return t=this.tag.get(t),t?(t=t.get(e),t?(e=t.length-n,e>0&&((r&&e>r||n)&&(t=t.slice(n,n+r)),i&&(t=vr.call(this,t))),t):[]):[]}function vr(t){if(!this||!this.store)return t;if(this.db)return this.index.get(this.field[0]).db.enrich(t);let e=Array(t.length);for(let r=0,n;r<t.length;r++)n=t[r],e[r]={id:n,doc:this.store.get(n)};return e}function $t(t){if(!this||this.constructor!==$t)return new $t(t);let e=t.document||t.doc||t,r,n;if(this.B=[],this.field=[],this.D=[],this.key=(r=e.key||e.id)&&Ti(r,this.D)||"id",(n=t.keystore||0)&&(this.keystore=n),this.fastupdate=!!t.fastupdate,this.reg=!this.fastupdate||t.worker||t.db?n?new Ke(n):new Set:n?new He(n):new Map,this.h=(r=e.store||null)&&r&&r!==!0&&[],this.store=r?n?new He(n):new Map:null,this.cache=(r=t.cache||null)&&new zt(r),t.cache=!1,this.worker=t.worker||!1,this.priority=t.priority||4,this.index=_3.call(this,t,e),this.tag=null,(r=e.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]=Ti(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,t=[];for(let i of this.index.values())i.then&&t.push(i);if(t.length){let i=this;return Promise.all(t).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 t.db&&(this.fastupdate=!1,this.mount(t.db))}K=$t.prototype;K.mount=function(t){let e=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 We({},this.reg)),e===this.field&&(e=e.slice(0)),e.push(o),r.tag=this.tag.get(o)}r=[];let n={db:t.db,type:t.type,fastupdate:t.fastupdate};for(let s=0,o,a;s<e.length;s++){n.field=a=e[s],o=this.index.get(a);let u=new t.constructor(t.id,n);u.id=t.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})};K.commit=function(){return E(this,null,function*(){let t=[];for(let e of this.index.values())t.push(e.commit());yield Promise.all(t),this.reg.clear()})};K.destroy=function(){let t=[];for(let e of this.index.values())t.push(e.destroy());return Promise.all(t)};function _3(t,e){let r=new Map,n=e.index||e.field||e;ze(n)&&(n=[n]);for(let s=0,o,a;s<n.length;s++){if(o=n[s],ze(o)||(a=o,o=o.field),a=wn(a)?Object.assign({},t,a):t,this.worker){var i=void 0;i=(i=a.encoder)&&i.encode?i:new xr(typeof i=="string"?Fo[i]:i||{}),i=new Ut(a,i),r.set(o,i)}this.worker||r.set(o,new We(a,this.reg)),a.custom?this.B[s]=a.custom:(this.B[s]=Ti(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){t=e.store,ze(t)&&(t=[t]);for(let s=0,o,a;s<t.length;s++)o=t[s],a=o.field||o,o.custom?(this.h[s]=o.custom,o.custom.O=a):(this.h[s]=Ti(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 Ti(t,e){let r=t.split(":"),n=0;for(let i=0;i<r.length;i++)t=r[i],t[t.length-1]==="]"&&(t=t.substring(0,t.length-2))&&(e[n]=!0),t&&(r[n++]=t);return n<r.length&&(r.length=n),n>1?r:r[0]}K.append=function(t,e){return this.add(t,e,!0)};K.update=function(t,e){return this.remove(t).add(t,e)};K.remove=function(t){wn(t)&&(t=_n(t,this.key));for(var e of this.index.values())e.remove(t,!0);if(this.reg.has(t)){if(this.tag&&!this.fastupdate)for(let r of this.tag.values())for(let n of r){e=n[0];let i=n[1],s=i.indexOf(t);s>-1&&(i.length>1?i.splice(s,1):r.delete(e))}this.store&&this.store.delete(t),this.reg.delete(t)}return this.cache&&this.cache.remove(t),this};K.clear=function(){let t=[];for(let e of this.index.values()){let r=e.clear();r.then&&t.push(r)}if(this.tag)for(let e of this.tag.values())e.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),t.length?Promise.all(t):this};K.contain=function(t){return this.db?this.index.get(this.field[0]).db.has(t):this.reg.has(t)};K.cleanup=function(){for(let t of this.index.values())t.cleanup();return this};K.get=function(t){return this.db?this.index.get(this.field[0]).db.enrich(t).then(function(e){return e[0]&&e[0].doc||null}):this.store.get(t)||null};K.set=function(t,e){return typeof t=="object"&&(e=t,t=_n(e,this.key)),this.store.set(t,e),this};K.searchCache=jo;K.export=b3;K.import=v3;No($t.prototype);function $o(t,e=0){let r=[],n=[];e&&(e=25e4/e*5e3|0);for(let i of t.entries())n.push(i),n.length===e&&(r.push(n),n=[]);return n.length&&r.push(n),r}function zo(t,e){e||(e=new Map);for(let r=0,n;r<t.length;r++)n=t[r],e.set(n[0],n[1]);return e}function Am(t,e=0){let r=[],n=[];e&&(e=25e4/e*1e3|0);for(let i of t.entries())n.push([i[0],$o(i[1])[0]||[]]),n.length===e&&(r.push(n),n=[]);return n.length&&r.push(n),r}function Em(t,e){e||(e=new Map);for(let r=0,n,i;r<t.length;r++)n=t[r],i=e.get(n[0]),e.set(n[0],zo(n[1],i));return e}function Cm(t){let e=[],r=[];for(let n of t.keys())r.push(n),r.length===25e4&&(e.push(r),r=[]);return r.length&&e.push(r),e}function Om(t,e){e||(e=new Set);for(let r=0;r<t.length;r++)e.add(t[r]);return e}function Ii(t,e,r,n,i,s,o=0){let a=n&&n.constructor===Array;var u=a?n.shift():n;if(!u)return this.export(t,e,i,s+1);if((u=t((e?e+".":"")+(o+1)+"."+r,JSON.stringify(u)))&&u.then){let l=this;return u.then(function(){return Ii.call(l,t,e,r,a?n:null,i,s,o+1)})}return Ii.call(this,t,e,r,a?n:null,i,s,o+1)}function b3(t,e,r=0,n=0){if(r<this.field.length){let o=this.field[r];if((e=this.index.get(o).export(t,o,r,n=1))&&e.then){let a=this;return e.then(function(){return a.export(t,o,r+1)})}return this.export(t,o,r+1)}let i,s;switch(n){case 0:i="reg",s=Cm(this.reg),e=null;break;case 1:i="tag",s=this.tag&&Am(this.tag,this.reg.size),e=null;break;case 2:i="doc",s=this.store&&$o(this.store),e=null;break;default:return}return Ii.call(this,t,e,i,s||null,r,n)}function v3(t,e){var r=t.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(t);if(e){if(typeof e=="string"&&(e=JSON.parse(e)),n)return this.index.get(n).import(r,e);switch(r){case"reg":this.fastupdate=!1,this.reg=Om(e,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){e=[];for(let i of this.index.values())e.push(i.import(t));return Promise.all(e)}break;case"tag":this.tag=Em(e,this.tag);break;case"doc":this.store=zo(e,this.store)}}}function gm(t,e){let r="";for(let n of t.entries()){t=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?",":"")+(e==="string"?'"'+a[l]+'"':a[l]);u="["+u+"]",s+=(s?",":"")+u}s='["'+t+'",['+s+"]]",r+=(r?",":"")+s}return r}We.prototype.remove=function(t,e){let r=this.reg.size&&(this.fastupdate?this.reg.get(t):this.reg.has(t));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]===t)i.pop();else{let o=i.indexOf(t);o>=0&&i.splice(o,1)}}else bn(this.map,t),this.depth&&bn(this.ctx,t);e||this.reg.delete(t)}return this.db&&(this.commit_task.push({del:t}),this.M&&Tm(this)),this.cache&&this.cache.remove(t),this};function bn(t,e){let r=0;var n=typeof e=="undefined";if(t.constructor===Array){for(let i=0,s,o,a;i<t.length;i++)if((s=t[i])&&s.length){if(n)return 1;if(o=s.indexOf(e),o>=0){if(s.length>1)return s.splice(o,1),1;if(delete t[i],r)return 1;a=1}else{if(a)return 1;r++}}}else for(let i of t.entries())n=i[0],bn(i[1],e)?r++:t.delete(n);return r}var x3={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};We.prototype.add=function(t,e,r,n){if(e&&(t||t===0)){if(!n&&!r&&this.reg.has(t))return this.update(t,e);n=this.depth,e=this.encoder.encode(e,!n);let l=e.length;if(l){let c=me(),h=me(),m=this.resolution;for(let d=0;d<l;d++){let f=e[this.rtl?l-1-d:d];var i=f.length;if(i&&(n||!h[f])){var s=this.score?this.score(e,f,d,null,0):Ai(m,l,d),o="";switch(this.tokenize){case"tolerant":if(ot(this,h,f,s,t,r),i>2){for(let g=1,w,O,I,T;g<i-1;g++)w=f.charAt(g),O=f.charAt(g+1),I=f.substring(0,g)+O,T=f.substring(g+2),o=I+w+T,ot(this,h,o,s,t,r),o=I+T,ot(this,h,o,s,t,r);ot(this,h,f.substring(0,f.length-1),s,t,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(e,f,d,o,w):Ai(m,l,d,i,w);ot(this,h,o,a,t,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(e,f,d,o,a):Ai(m,l,d,i,a);ot(this,h,o,u,t,r)}o=""}case"forward":if(i>1){for(a=0;a<i;a++)o+=f[this.rtl?i-1-a:a],ot(this,h,o,s,t,r);break}default:if(ot(this,h,f,s,t,r),n&&l>1&&d<l-1)for(i=this.N,o=f,s=Math.min(n+1,this.rtl?d+1:l-d),a=1;a<s;a++){f=e[this.rtl?l-1-d-a:d+a],u=this.bidirectional&&f>o;let g=this.score?this.score(e,o,d,f,a-1):Ai(i+(l/2>i?0:1),l,d,s-1,a-1);ot(this,c,u?o:f,g,t,r,u?f:o)}}}}this.fastupdate||this.reg.add(t)}}return this.db&&(this.commit_task.push(r?{ins:t}:{del:t}),this.M&&Tm(this)),this};function ot(t,e,r,n,i,s,o){let a,u;if(!(a=e[r])||o&&!a[o]){if(o?(e=a||(e[r]=me()),e[o]=1,u=t.ctx,(a=u.get(o))?u=a:u.set(o,u=t.keystore?new He(t.keystore):new Map)):(u=t.map,e[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),t.fastupdate&&(e=t.reg.get(i))&&e.splice(e.indexOf(c),1);break}}if(u=u[n]||(u[n]=[]),u.push(i),u.length===gt(2,31)-1){if(e=new Sr(u),t.fastupdate)for(let l of t.reg.values())l.includes(u)&&(l[l.indexOf(u)]=e);a[n]=u=e}t.fastupdate&&((n=t.reg.get(i))?n.push(u):t.reg.set(i,[u]))}}function Ai(t,e,r,n,i){return r&&t>1?e+(n||0)<=t?r+(i||0):(t-1)/(e+(n||0))*(r+(i||0))+1|0:0}We.prototype.search=function(t,e,r){if(r||(e||typeof t!="object"?typeof e=="object"&&(r=e,e=0):(r=t,t="")),r&&r.cache)return r.cache=!1,t=this.searchCache(t,e,r),r.cache=!0,t;let n=[],i,s,o,a=0,u,l,c,h,m;r&&(t=r.query||t,e=r.limit||e,a=r.offset||0,s=r.context,o=r.suggest,m=(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 d=this.encoder.encode(t,!s);if(i=d.length,e=e||(u?100:0),i===1)return wm.call(this,d[0],"",e,a,u,m,l);if(i===2&&s&&!o)return wm.call(this,d[1],d[0],e,a,u,m,l);let f=me(),g=0,w;if(s&&(w=d[0],g=1),h||h===0||(h=w?this.N:this.resolution),this.db){if(this.db.search&&(r=this.db.search(this,d,e,a,o,u,m,l),r!==!1))return r;let O=this;return(function(){return E(this,null,function*(){for(let I,T;g<i;g++){if((T=d[g])&&!f[T]){if(f[T]=1,I=yield ko(O,T,w,0,0,!1,!1),I=_m(I,n,o,h)){n=I;break}w&&(o&&I&&n.length||(w=T))}o&&w&&g===i-1&&!n.length&&(h=O.resolution,w="",g=-1,f=me())}return ym(n,h,e,a,o,c,u)})})()}for(let O,I;g<i;g++){if((I=d[g])&&!f[I]){if(f[I]=1,O=ko(this,I,w,0,0,!1,!1),O=_m(O,n,o,h)){n=O;break}w&&(o&&O&&n.length||(w=I))}o&&w&&g===i-1&&!n.length&&(h=this.resolution,w="",g=-1,f=me())}return ym(n,h,e,a,o,c,u)};function ym(t,e,r,n,i,s,o){let a=t.length,u=t;if(a>1)u=Oi(t,e,r,n,i,s,o);else if(a===1)return o?Bo.call(null,t[0],r,n):new ue(t[0],this);return o?u:new ue(u,this)}function wm(t,e,r,n,i,s,o){return t=ko(this,t,e,r,n,i,s,o),this.db?t.then(function(a){return i?a||[]:new ue(a,this)}):t&&t.length?i?Bo.call(this,t,r,n):new ue(t,this):i?[]:new ue([],this)}function _m(t,e,r,n){let i=[];if(t&&t.length){if(t.length<=n){e.push(t);return}for(let s=0,o;s<n;s++)(o=t[s])&&(i[s]=o);if(i.length){e.push(i);return}}if(!r)return i}function ko(t,e,r,n,i,s,o,a){let u;return r&&(u=t.bidirectional&&e>r)&&(u=r,r=e,e=u),t.db?t.db.get(e,r,n,i,s,o,a):(t=r?(t=t.ctx.get(r))&&t.get(e):t.map.get(e),t)}function We(t,e){if(!this||this.constructor!==We)return new We(t);if(t){var r=ze(t)?t:t.preset;r&&(t=Object.assign({},x3[r],t))}else t={};r=t.context;let n=r===!0?{depth:1}:r||{},i=ze(t.encoder)?Fo[t.encoder]:t.encode||t.encoder||{};this.encoder=i.encode?i:typeof i=="object"?new xr(i):{encode:i},this.resolution=t.resolution||9,this.tokenize=r=(r=t.tokenize)&&r!=="default"&&r!=="exact"&&r||"strict",this.depth=r==="strict"&&n.depth||0,this.bidirectional=n.bidirectional!==!1,this.fastupdate=!!t.fastupdate,this.score=t.score||null,(r=t.keystore||0)&&(this.keystore=r),this.map=r?new He(r):new Map,this.ctx=r?new He(r):new Map,this.reg=e||(this.fastupdate?r?new He(r):new Map:r?new Ke(r):new Set),this.N=n.resolution||3,this.rtl=i.rtl||t.rtl||!1,this.cache=(r=t.cache||null)&&new zt(r),this.resolve=t.resolve!==!1,(r=t.db)&&(this.db=this.mount(r)),this.M=t.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=t.priority||4}K=We.prototype;K.mount=function(t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),t.mount(this)};K.commit=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this)};K.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function Tm(t){t.commit_timer||(t.commit_timer=setTimeout(function(){t.commit_timer=null,t.db.commit(t)},1))}K.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};K.append=function(t,e){return this.add(t,e,!0)};K.contain=function(t){return this.db?this.db.has(t):this.reg.has(t)};K.update=function(t,e){let r=this,n=this.remove(t);return n&&n.then?n.then(()=>r.add(t,e)):this.add(t,e)};K.cleanup=function(){return this.fastupdate?(bn(this.map),this.depth&&bn(this.ctx),this):this};K.searchCache=jo;K.export=function(t,e,r=0,n=0){let i,s;switch(n){case 0:i="reg",s=Cm(this.reg);break;case 1:i="cfg",s=null;break;case 2:i="map",s=$o(this.map,this.reg.size);break;case 3:i="ctx",s=Am(this.ctx,this.reg.size);break;default:return}return Ii.call(this,t,e,i,s,r,n)};K.import=function(t,e){if(e)switch(typeof e=="string"&&(e=JSON.parse(e)),t=t.split("."),t[t.length-1]==="json"&&t.pop(),t.length===3&&t.shift(),t=t.length>1?t[1]:t[0],t){case"reg":this.fastupdate=!1,this.reg=Om(e,this.reg);break;case"map":this.map=zo(e,this.map);break;case"ctx":this.ctx=Em(e,this.ctx)}};K.serialize=function(t=!0){let e="",r="",n="";if(this.reg.size){let s;for(var i of this.reg.keys())s||(s=typeof i),e+=(e?",":"")+(s==="string"?'"'+i+'"':i);e="index.reg=new Set(["+e+"]);",r=gm(this.map,s),r="index.map=new Map(["+r+"]);";for(let o of this.ctx.entries()){i=o[0];let a=gm(o[1],s);a="new Map(["+a+"])",a='["'+i+'",'+a+"]",n+=(n?",":"")+a}n="index.ctx=new Map(["+n+"]);"}return t?"function inject(index){"+e+r+n+"}":e+r+n};No(We.prototype);var Im=typeof window!="undefined"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Pi=["map","ctx","tag","reg","cfg"],Nt=me();function Ri(t,e={}){if(!this||this.constructor!==Ri)return new Ri(t,e);typeof t=="object"&&(e=t,t=t.name),t||console.info("Default storage space was used, because a name was not passed."),this.id="flexsearch"+(t?":"+t.toLowerCase().replace(/[^a-z0-9_\-]/g,""):""),this.field=e.field?e.field.toLowerCase().replace(/[^a-z0-9_\-]/g,""):"",this.type=e.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}K=Ri.prototype;K.mount=function(t){return t.index?t.mount(this):(t.db=this,this.open())};K.open=function(){if(this.db)return this.db;let t=this;navigator.storage&&navigator.storage.persist&&navigator.storage.persist(),Nt[t.id]||(Nt[t.id]=[]),Nt[t.id].push(t.field);let e=Im.open(t.id,1);return e.onupgradeneeded=function(){let r=t.db=this.result;for(let n=0,i;n<Pi.length;n++){i=Pi[n];for(let s=0,o;s<Nt[t.id].length;s++)o=Nt[t.id][s],r.objectStoreNames.contains(i+(i!=="reg"&&o?":"+o:""))||r.createObjectStore(i+(i!=="reg"&&o?":"+o:""))}},t.db=Et(e,function(r){t.db=r,t.db.onversionchange=function(){t.close()}})};K.close=function(){this.db&&this.db.close(),this.db=null};K.destroy=function(){let t=Im.deleteDatabase(this.id);return Et(t)};K.clear=function(){let t=[];for(let r=0,n;r<Pi.length;r++){n=Pi[r];for(let i=0,s;i<Nt[this.id].length;i++)s=Nt[this.id][i],t.push(n+(n!=="reg"&&s?":"+s:""))}let e=this.db.transaction(t,"readwrite");for(let r=0;r<t.length;r++)e.objectStore(t[r]).clear();return Et(e)};K.get=function(t,e,r=0,n=0,i=!0,s=!1){t=this.db.transaction((e?"ctx":"map")+(this.field?":"+this.field:""),"readonly").objectStore((e?"ctx":"map")+(this.field?":"+this.field:"")).get(e?e+":"+t:t);let o=this;return Et(t).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 m=n;m<h;m++)u.push(c[m]);if(n=0,u.length===r)break}return s?o.enrich(u):u}return a})};K.tag=function(t,e=0,r=0,n=!1){t=this.db.transaction("tag"+(this.field?":"+this.field:""),"readonly").objectStore("tag"+(this.field?":"+this.field:"")).get(t);let i=this;return Et(t).then(function(s){return!s||!s.length||r>=s.length?[]:!e&&!r?s:(s=s.slice(r,r+e),n?i.enrich(s):s)})};K.enrich=function(t){typeof t!="object"&&(t=[t]);let e=this.db.transaction("reg","readonly").objectStore("reg"),r=[];for(let n=0;n<t.length;n++)r[n]=Et(e.get(t[n]));return Promise.all(r).then(function(n){for(let i=0;i<n.length;i++)n[i]={id:t[i],doc:n[i]?JSON.parse(n[i]):null};return n})};K.has=function(t){return t=this.db.transaction("reg","readonly").objectStore("reg").getKey(t),Et(t).then(function(e){return!!e})};K.search=null;K.info=function(){};K.transaction=function(t,e,r){t+=t!=="reg"&&this.field?":"+this.field:"";let n=this.h[t+":"+e];if(n)return r.call(this,n);let i=this.db.transaction(t,e);this.h[t+":"+e]=n=i.objectStore(t);let s=r.call(this,n);return this.h[t+":"+e]=null,Et(i).finally(function(){return s})};K.commit=function(t){return E(this,null,function*(){let e=t.commit_task,r=[];t.commit_task=[];for(let n=0,i;n<e.length;n++)i=e[n],i.del&&r.push(i.del);r.length&&(yield this.remove(r)),t.reg.size&&(yield this.transaction("map","readwrite",function(n){for(let i of t.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,m;c<l;c++)if((m=o[c])&&m.length){if((h=a[c])&&h.length)for(u=0;u<m.length;u++)h.push(m[u]);else a[c]=m;u=1}}else a=o,u=1;u&&n.put(a,s)})}}),yield this.transaction("ctx","readwrite",function(n){for(let i of t.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 m=Math.max(c.length,l.length);for(let d=0,f,g;d<m;d++)if((g=l[d])&&g.length){if((f=c[d])&&f.length)for(h=0;h<g.length;h++)f.push(g[h]);else c[d]=g;h=1}}else c=l,h=1;h&&n.put(c,s+":"+u)})}}}),t.store?yield this.transaction("reg","readwrite",function(n){for(let i of t.store){let s=i[0],o=i[1];n.put(typeof o=="object"?JSON.stringify(o):1,s)}}):t.bypass||(yield this.transaction("reg","readwrite",function(n){for(let i of t.reg.keys())n.put(1,i)})),t.tag&&(yield this.transaction("tag","readwrite",function(n){for(let i of t.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)})}})),t.map.clear(),t.ctx.clear(),t.tag&&t.tag.clear(),t.store&&t.store.clear(),t.document||t.reg.clear())})};function qo(t,e,r){let n=t.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<e.length;u++)if(c=e[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&&t.update(n):t.delete(),t.continue()}K.remove=function(t){return typeof t!="object"&&(t=[t]),Promise.all([this.transaction("map","readwrite",function(e){e.openCursor().onsuccess=function(){let r=this.result;r&&qo(r,t)}}),this.transaction("ctx","readwrite",function(e){e.openCursor().onsuccess=function(){let r=this.result;r&&qo(r,t)}}),this.transaction("tag","readwrite",function(e){e.openCursor().onsuccess=function(){let r=this.result;r&&qo(r,t,!0)}}),this.transaction("reg","readwrite",function(e){for(let r=0;r<t.length;r++)e.delete(t[r])})])};function Et(t,e){return new Promise((r,n)=>{t.onsuccess=t.oncomplete=function(){e&&e(this.result),e=null,r(this.result)},t.onerror=t.onblocked=n,t=null})}var Mi={Index:We,Charset:Fo,Encoder:xr,Document:$t,Worker:Ut,Resolver:ue,IndexedDB:Ri,Language:{}};function Di(t){return t.replace(/\\u[\dA-F]{4}/gi,function(e){return String.fromCharCode(parseInt(e.replace(/\\u/g,""),16))})}var Ht={},at=class extends X{_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:e,scheme:r}={}){return!e||!r?null:{schemes:[{uri:e,identifier:q.getAllUris(r).filter(i=>i!==e)}]}}_loadScheme(n){return E(this,null,function*(){var i=n,{scheme:e}=i,r=H(i,["scheme"]);let s=q.getAllUris(e);for(let f of s)if(this._schemeCache[f])return this._schemeCache[f];let o=this.schemes.find(f=>q.compare(f,e));if(!o||!o.uri)throw new Ve({message:`Tried to load unsupported scheme (${e&&e.uri})`});let a=o.uri;s=bt.default(s.concat(q.getAllUris(o)));let u=".json";a.endsWith("/")&&(u="index.json");let l=yield this.axios(j(P({},r),{url:`${a}${u}`,_skipAdditionalParameters:!0}));if(l.id!==a)throw new Ve({message:"Skohub URL did not return expected concept scheme"});let{title:c,preferredNamespaceUri:h,hasTopConcept:m,description:d}=l;e={uri:a,identifier:s.filter(f=>f!==a)},e.prefLabel=c,Object.keys(e.prefLabel||{}).forEach(f=>{e.prefLabel[f]=Di(e.prefLabel[f])}),e.namespace=h,e.topConcepts=(m||[]).map(f=>this._toJskosConcept(f)),e.concepts=[null],d&&(e.definition=d,Object.keys(e.definition).forEach(f=>{e.definition[f]=[Di(e.definition[f])]}));for(let f of Object.keys(e).filter(g=>!e[g]))delete e[f];for(let f of s)this._schemeCache[f]=e;return e})}_loadConcept(n){return E(this,null,function*(){var i=n,{uri:e}=i,r=H(i,["uri"]);if(this._conceptCache[e])return this._conceptCache[e];try{let s=yield this.axios(j(P({},r),{url:`${e}.json`,_skipAdditionalParameters:!0}));if(s.id!==e)throw new Ve({message:"Skohub URL did not return expected concept URI"});let o=this._toJskosConcept(s);return this._conceptCache[e]=o,o}catch(s){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 E(this,arguments,function*(r={}){var e=H(r,[]);return Promise.all(this.schemes.map(n=>this._loadScheme(j(P({},e),{scheme:n}))))})}getTop(n){return E(this,null,function*(){var i=n,{scheme:e}=i,r=H(i,["scheme"]);if(!e||!e.uri)throw new U({parameter:"scheme",message:"Missing scheme URI"});return e=yield this._loadScheme(P({scheme:e},r)),e.topConcepts||[]})}getConcepts(n){return E(this,null,function*(){var i=n,{concepts:e}=i,r=H(i,["concepts"]);return xe.default(e)||(e=[e]),(yield Promise.all(e.map(({uri:s})=>this._loadConcept(j(P({},r),{uri:s}))))).filter(Boolean)})}getAncestors(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=H(i,["concept"]);if(!e||!e.uri)throw new U({parameter:"concept"});if(e.ancestors&&e.ancestors[0]!==null)return e.ancestors;if(e=yield this._loadConcept(j(P({},r),{uri:e.uri})),!e||!e.broader||!e.broader.length)return[];let s=e.broader[0];return[s].concat(yield this.getAncestors(P({concept:s},r))).map(o=>({uri:o.uri}))})}getNarrower(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=H(i,["concept"]);if(!e||!e.uri)throw new U({parameter:"concept"});return e.narrower&&e.narrower[0]!==null||(e=yield this._loadConcept(j(P({},r),{uri:e.uri}))),e.narrower})}search(i){return E(this,arguments,function*({search:e,scheme:r,limit:n=100}){if(r=yield this._loadScheme({scheme:r}),!r||!r.uri)throw new U({parameter:"scheme"});if(!e)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=Mi.create(),s.import(c),this._index[r.uri][u]=s;break}catch(l){this._index[r.uri][u]=null}}if(!s)throw new Ve({message:"Could not find search index for any of the available languages "+this.languages.join(",")});let o=s.search(e);return(yield this.getConcepts({concepts:o.map(u=>({uri:u}))})).slice(0,n)})}suggest(e){return E(this,null,function*(){e._raw=!0;let r=yield this.search(e),n=[e.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})}};ee(at,"supports",{schemes:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,suggest:!0,search:!0});at.providerName="Skohub";at.providerType="http://bartoc.org/api-type/skohub";var Pm="https://lobid.org/gnd/",ut={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#"});ut.types.forEach(t=>{t.notation=[Wo.notationFromUri(t.uri)]});var S3=new q.ConceptScheme(ut),qm=["broaderTerm","broaderTermGeneral","broaderTermGeneric","broaderTermInstantial","broaderTermPartitive"],Rm={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"},A3=[{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 q.ConceptScheme(t));function Ho(t){var n,i;let e={uri:t.id,notation:[t.gndIdentifier],prefLabel:{de:t.preferredName},inScheme:[{uri:ut.uri}]};t.variantName&&(e.altLabel={de:t.variantName}),(n=t.usingInstructions)!=null&&n.length&&(e.scopeNote={de:t.usingInstructions}),e.type=t.type.map(s=>Wo.uriFromNotation(s)).filter(Boolean),e.broader=[],qm.forEach(s=>{e.broader=e.broader.concat(t[s]||[])}),e.broader=e.broader.map(s=>({uri:s.id})),e.uri&&(e.identifier=[e.uri.replace("https://","http://")]);let r=[];for(let s of Object.keys(Rm)){let o=Rm[s];(i=t[s])!=null&&i.length&&(r=r.concat(t[s].map(a=>{let u=A3.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:e.uri,notation:e.notation}]},fromScheme:{uri:ut.uri},to:{memberSet:[l]},toScheme:{uri:u.uri},type:[o]})}).filter(Boolean)))}return r.length&&(e.mappings=r),e}function Ko(t){return t&&t.startsWith("http://")?t.replace("http://","https://"):t}var lt=class extends X{_setup(){this._api.api||(this._api.api=Pm)}static _registryConfigForBartocApiConfig({url:e,scheme:r}={}){return!e||!r||!q.compare(r,ut)||e!=="https://lobid.org/gnd/api"?null:{api:Pm,schemes:[ut]}}getSchemes(){return E(this,null,function*(){return[ut]})}getTop(){return E(this,null,function*(){return[]})}getConcepts(r){return E(this,arguments,function*({concepts:e}){if(!e)throw new i.InvalidOrMissingParameterError({parameter:"concepts"});Array.isArray(e)||(e=[e]);let n=e.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]:S3.notationFromUri(Ko(o==null?void 0:o.uri))}).filter(Boolean),i=[],s=yield Promise.all(n.map(o=>E(this,null,function*(){try{let a=yield _e.get(`${this._api.api}${o}.json`);return Ho(a.data)}catch(a){i.push(a)}})));if(i.length===e.length)throw i[0];return s.filter(Boolean)})}getNarrower(i){return E(this,arguments,function*({concept:e,limit:r=200,offset:n=0}){if(!e||!e.uri)throw new U({parameter:"concept"});let s=Ko(e.uri),o=qm.map(u=>`${u}.id:"${s}"`).join(" OR ");return(yield _e.get(`${this._api.api}search`,{params:{q:o,format:"json",size:r,from:n}})).data.member.map(u=>Ho(u))})}suggest(e){return E(this,null,function*(){let r=yield this._search(j(P({},e),{format:"json:suggest"}));return[e.search,r.map(n=>n.label),[],r.map(n=>n.id)]})}search(e){return E(this,null,function*(){return(yield this._search(e)).member.map(n=>Ho(n))})}_search(o){return E(this,arguments,function*({search:e,types:r,limit:n=100,offset:i=0,format:s="json"}){if(!e)throw new U({parameter:"search"});let a="";return r=(r==null?void 0:r.map(l=>Wo.notationFromUri(Ko(l))).filter(Boolean))||[],r.length&&(a=r.map(l=>`type:${l}`).join(" OR ")),(yield _e.get(`${this._api.api}search`,{params:{q:e,filter:a,format:s,size:n,from:i}})).data})}getTypes(r){return E(this,arguments,function*({scheme:e}){if(!e||!q.compare(e,ut))throw new U({parameter:"search",message:e!=null&&e.uri?`scheme ${e==null?void 0:e.uri} not supported`:""});return ut.types})}};ee(lt,"supports",{schemes:!0,data:!0,concepts:!0,narrower:!0,suggest:!0,search:!0,types:!0});lt.providerName="LobidApi";lt.providerType="http://bartoc.org/api-type/lobid-gnd";var ct=class extends X{_getApiUrl(e,r){let n=this.uri||"";n.endsWith("/")&&(n=n.slice(0,-1));for(let i of e)if(i)n+="/"+i;else return;if(r){let i=Object.keys(r).map(s=>`${s}=${encodeURIComponent(r[s])}`).join("&");n+=(n.includes("?")?"&":"?")+i}return n}_artefactToJSKOS(e){let r=e.language||this._language||"en",n={};return e.subject&&(n.subject=[e.subject]),e.includedInDataCatalog&&(n.api=[e.includedInDataCatalog]),e["@type"]&&(n["@type"]=e["@type"]),e.type&&(n.type=[e.type]),e.source_name&&(n.notation=[e.source_name]),e.short_form&&(n.notation?n.notation.push(e.short_form):n.notation=[e.short_form]),e.label&&(n.prefLabel={},n.prefLabel[r]=[],n.prefLabel[r].push(e.label)),e.synonyms&&(n.altLabel={},n.altLabel[r]=e.synonyms),e.descriptions&&(n.definition={},n.definition[r]=e.descriptions),e.language&&(n.languages=e.language),e["@id"]&&(n.uri=e["@id"]),e.iri&&(n.iri=e.iri),e.identifier&&(n.identifier=[e.identifier]),e.source&&(n.source=[e.source]),e.source_url&&(n.namespace=e.source_url),e.landingPage&&(n.url=e.landingPage),e.version&&(n.version=e.version),e.modified&&(n.modified=e.modified),e.created&&(n.created=e.created),e.hasFormat&&(n.format=e.hasFormat),e.license&&(n.license=[e.license]),e.creator&&(n.creator=e.creator),e.contributor&&(n.contributor={},n.contributor.prefLabel={},n.contributor.prefLabel[r]=e.contributor),e.publisher&&(n.publisher={},n.publisher[r]=e.publisher),e.released&&(n.issued=e.released),e.children&&(n.narrower={},n.narrower[r]=e.children),n}_request(e,...r){return E(this,null,function*(){if(!e)return;let n=yield this.axios(P({method:"get",url:e,headers:{"Content-Type":"application/json",Accept:"application/json"}},r));if(!(n!=null&&n._url)||Object.keys(n).length!=1)return n})}_getSchemesMod(){return E(this,null,function*(){let e=this._getApiUrl(["artefacts"],null);return yield this._request(e)})}_getSchemesModLimit(e){return E(this,null,function*(){let r=yield this._getSchemesMod();return e&&e>0?r.slice(0,e):r})}_getSchemeMod(e){return E(this,null,function*(){if(e.short)return yield this._getSchemeFromShort(e.short);if(e.uri)return yield this._getSchemeFromUri(e.uri)})}_getSchemeFromShort(e){return E(this,null,function*(){let r=this._getApiUrl(["artefacts",e],null);return yield this._request(r)})}_getSchemeFromUri(e){return E(this,null,function*(){let r=yield this._getSchemesMod();if(r){for(let n of yield r)if(n.source==e||n.source_url==e||n.source_name==e||n["@id"]==e||n.iri==e||n.includedInDataCatalog&&n.includedInDataCatalog.includes(e))return yield n}})}_getConceptsMod(e){return E(this,null,function*(){let r=yield this._schemeShortFromObj(e);if(!r)return[];let n=this._getApiUrl(["artefacts",r,"resources","concepts"],null),i=yield this._request(n);if(!i)return[];let{page:s,totalPages:o,member:a}=i,u=[];for(let l of a)l&&u.push(l);for(let l=s+1;l<=o;l++){let c=this._getApiUrl(["artefacts",r,"resources","concepts"],{page:l}),h=yield this._request(c);if(!h)break;let{member:m}=h;for(let d of m)d&&u.push(d)}return u})}_getConceptsModLimit(e,r){return E(this,null,function*(){let n=yield this._getConceptsMod(e);return r&&r>0?n.slice(0,r):n})}_getConceptMod(e){return E(this,null,function*(){let{conceptNotation:r,schemeShort:n}=yield this._conceptNotationFromObj(e),i=this._getApiUrl(["artefacts",n,"resources","concepts",r],null);return yield this._request(i)})}_containsString(e,r){for(let n in e){let i=e[n];if(typeof i=="string"&&i.includes(r)||typeof i=="object"&&i!==null&&this.containsString(i,r))return!0}return!1}_getSchemesContaining(e){return E(this,null,function*(){let r=[],n=yield this._getSchemesMod();for(let i of n)this.containsString(i,e)&&r.push(i);return r})}_getSchemeShort(e){return E(this,null,function*(){let r=yield this._getSchemeFromUri(e);if(r)return yield r.short_form.toLowerCase()})}_getconceptNotation(e){return e.split("/").pop()}_schemeShortFromObj(e){return E(this,null,function*(){if(e.short)return e.short;if(e.uri)return yield this._getSchemeShort(e.uri)})}_conceptNotationFromObj(e){return E(this,null,function*(){if(!e.inScheme||!e.inScheme[0])return;let r=yield this._schemeShortFromObj(e.inScheme[0]),n=e.notation;return n||(n=yield this._getconceptNotation(e.uri)),{conceptNotation:n,schemeShort:r}})}_prepare(){}_setup(){}getSchemes(i){return E(this,null,function*(){var s=i,{schemes:e,limit:r}=s,n=H(s,["schemes","limit"]);let o=[],a=[];if(e)for(let u of e){let l=yield this._getSchemeMod(u);l&&a.push(l)}else a=yield this._getSchemesModLimit(r);for(let u of a){let l=yield this._artefactToJSKOS(u);l?o.push(l):console.warn("JSKOS transformation failed for artefact: ",u)}return o})}getConcepts(s){return E(this,null,function*(){var o=s,{concepts:e,scheme:r,limit:n}=o,i=H(o,["concepts","scheme","limit"]);let a=[];if(e)for(let u of e){let l=yield this._getConceptMod(u);if(l){let c=yield this._artefactToJSKOS(l);c?a.push(c):console.warn("JSKOS transformation failed for concept: ",l)}}else if(r){let u=yield this._getConceptsModLimit(r,n);for(let l of u){let c=yield this._artefactToJSKOS(l);c?a.push(c):console.warn("JSKOS transformation failed for concept: ",l)}}return a})}get _language(){return this._jskos.language||this.languages[0]||this._defaultLanguages[0]||"en"}getMappings(){return[]}};ee(ct,"providerName","ModApi"),ee(ct,"providerType","http://bartoc.org/en/node/20333"),ee(ct,"supports",{schemes:!0,top:!1,data:!1,concepts:!0,narrower:!1,ancestors:!1,types:!1,suggest:!1,search:!1,auth:!1,mappings:!1,concordances:!1,annotations:!1,occurrences:!1});var ft=class extends X{constructor(e){super(e),this.endpoint=e.endpoint}static _registryConfigForBartocApiConfig({url:e}={}){if(e)return{endpoint:e}}_getApiUrl(e,r={}){let n=this.endpoint+e.join("/");return r=Object.fromEntries(Object.entries(r).filter(([i,s])=>s!=null)),r=new URLSearchParams(r),r.size?`${n}?${r}`:n}_ontologyToJSKOS(e){var i;let r=e.lang||this._language||"en",n={};return e.iri&&(n.uri=e.iri),n.type=["http://www.w3.org/2004/02/skos/core#ConceptScheme"],e["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"]&&(n.type=n.type.concat(e["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"])),e.title&&(n.prefLabel={},n.prefLabel[r]=e.title),e.description&&(n.definition={},n.definition[r]=[e.description]),e.homepage&&(n.url=e.homepage),e.tracker&&(n.issueTracker=[{url:e.tracker}]),e.language&&(n.languages=e.language),e.ontologyId&&(n.VOCID=e.ontologyId,n.notation=[e.ontologyId]),(i=e.license)!=null&&i.url&&(n.license=[{uri:e.license.url}]),n}_termToJSKOS(e){let r=e.language||this._language||"en",n={};return e.curie&&(n.notation=[e.curie]),e.hasDirectChildren?n.narrower=[null]:n.narrower=[],e.hasDirectParents?n.broader=[null]:n.broader=[],e.iri&&(n.uri=e.iri),e["http://www.w3.org/2000/01/rdf-schema#label"]&&(n.prefLabel={},n.prefLabel[r]=e["http://www.w3.org/2000/01/rdf-schema#label"]),n.type=["http://www.w3.org/2004/02/skos/core#Concept","http://www.w3.org/2002/07/owl#Class"],e.ontologyIri&&(n.inScheme=[{uri:e.ontologyIri}]),n}_request(n){return E(this,arguments,function*(e,r={_skipAdditionalParameters:!0}){if(e){e=new URL(e);let i=Object.fromEntries(e.searchParams.entries());return this.axios(P({method:"get",url:e.origin+e.pathname,params:P(P({},i),r.params)},r))}})}_paginate(e,r,n){return E(this,null,function*(){let i=n>0?n:null,s=this._getApiUrl(e,j(P({},r),{size:i})),o=yield this._request(s),a=(o==null?void 0:o.elements)||[];if(!i){let u=(o==null?void 0:o.totalPages)||0;for(let l=1;l<u;l++)s=this._getApiUrl(e,j(P({},r),{page:l})),o=yield this._request(s),a=a.concat((o==null?void 0:o.elements)||[])}return a})}_getConceptOls(e){return E(this,null,function*(){var n,i;let r=yield this._getSchemeVOCID((n=e==null?void 0:e.inScheme)==null?void 0:n[0]);if(r){let s=null;e.notation?s=this._getApiUrl(["ontologies",r,"classes"],{curie:e.notation}):e.uri&&(s=this._getApiUrl(["ontologies",r,"classes"],{iri:e.uri}));let o=yield this._request(s);return((i=o==null?void 0:o.elements)==null?void 0:i[0])||null}})}_searchOls(e,r,n,i){return E(this,null,function*(){let s=[],o={"http://www.w3.org/2002/07/owl#Class":"classes","http://www.w3.org/1999/02/22-rdf-syntax-ns#Property":"properties"};i!=null&&i.length||(i=Object.keys(o));for(let a of i)if(a in o){let u=r?yield this._getSchemeVOCID(r):null,l={search:e,ontology:u};if(!r||u){let c=yield this._paginate([o[a]],l,n);s.push(...c)}}return s})}_conceptIriFromObj(e,r){return E(this,null,function*(){let n=this._getApiUrl(["ontologies",e,"classes"],{curie:r}),i=yield this._request(n);if(i&&i.elements&&i.elements.length>0)return i.elements[0].iri})}get _language(){return this._jskos.language||this.languages[0]||this._defaultLanguages[0]||"en"}_getSchemeVOCID(e){return E(this,null,function*(){return e!=null&&e.VOCID?e.VOCID:this._getScheme(e).then(r=>r==null?void 0:r.ontologyId)})}_getScheme(e){return E(this,null,function*(){if(e){let{VOCID:r,uri:n,notation:i,identifier:s}=e;if(r)return this._request(this._getApiUrl(["ontologies",r]));if(n&&(e=yield this._getSchemeFromUri(n),e)||i!=null&&i[0]&&(n||s!=null&&s.length)&&(e=yield this._request(this._getApiUrl(["ontologies",i[0]])),e.iri===n||s!=null&&s.includes(e.iri)))return e;for(let o of s||[]){let a=yield this._getSchemeFromUri(o);if(a)return a}}})}_getSchemeFromUri(e){return E(this,null,function*(){if(e){let r=this._getApiUrl(["ontologies"],{searchFields:"iri",search:e}),n=yield this._request(r),i=(n==null?void 0:n.elements)||[];return i.reduce((s,o)=>o.ontologyId.length<s.ontologyId.length?o:s,i[0])}return null})}getSchemes(n){return E(this,arguments,function*({schemes:e,limit:r}){let i=[];if(e)i=(yield Promise.all(e.map(s=>this._getScheme(s)))).filter(Boolean);else if(r>0){let s=this._getApiUrl(["ontologies"],{size:r});i=(yield this._request(s)).elements||[]}else i=yield this._paginate(["ontologies"],{});return Promise.all(i.map(s=>this._ontologyToJSKOS(s)))})}getConcepts(i){return E(this,arguments,function*({concepts:e,scheme:r,limit:n}){let s=[];if(e)for(let o of e){let a=yield this._getConceptOls(o);a&&s.push(yield this._termToJSKOS(a))}else if(r){let o=yield this._getSchemeVOCID(r);if(o){let a=yield this._paginate(["ontologies",o,"classes"],{},n);s=Promise.all(a.map(u=>this._termToJSKOS(u)))}}return s})}getTop(r){return E(this,arguments,function*({scheme:e}){let n=yield this._getSchemeVOCID(e);if(n){let i=this._getApiUrl(["ontologies",n,"classes"],{hasDirectParents:"false"}),s=yield this._request(i);if(s!=null&&s.elements)return Promise.all(s.elements.map(o=>this._termToJSKOS(o)))}return[]})}_splitConcept(e){return E(this,null,function*(){var n;let r={};return e&&(r.VOCID=yield this._getSchemeVOCID((n=e==null?void 0:e.inScheme)==null?void 0:n[0]),r.iri=e.uri||(yield this._conceptIriFromObj(r.VOCID,e.notation)),r.iri=encodeURIComponent(encodeURIComponent(r.iri))),r})}getNarrower(r){return E(this,arguments,function*({concept:e}){let{VOCID:n,iri:i}=yield this._splitConcept(e);if(n&&i){let s=this._getApiUrl(["ontologies",n,"classes",i,"children"]),o=yield this._request(s);if(o!=null&&o.elements)return Promise.all(o.elements.map(a=>this._termToJSKOS(a)))}return[]})}getAncestors(r){return E(this,arguments,function*({concept:e}){let{VOCID:n,iri:i}=yield this._splitConcept(e);if(n&&i){let s=this._getApiUrl(["ontologies",n,"classes",i,"ancestors"]),o=yield this._request(s);if(o!=null&&o.elements)return Promise.all(o.elements.map(a=>this._termToJSKOS(a)))}return[]})}getTypes(){return E(this,null,function*(){return[{uri:"http://www.w3.org/2002/07/owl#Class",prefLabel:{en:"Class",de:"Klasse"}},{uri:"http://www.w3.org/1999/02/22-rdf-syntax-ns#Property",prefLabel:{en:"Property",de:"Eigenschaft"}}]})}search(s){return E(this,arguments,function*({search:e,scheme:r=null,limit:n=0,types:i=["http://www.w3.org/2002/07/owl#Class"]}){let o=yield this._searchOls(e,r,n,i);return Promise.all(o.map(a=>this._termToJSKOS(a)))})}};ee(ft,"providerName","OlsApi"),ee(ft,"providerType","http://bartoc.org/api-type/ols"),ee(ft,"supports",{schemes:!0,top:!0,data:!1,concepts:!0,narrower:!0,ancestors:!0,types:!0,suggest:!0,search:!0});var Re={},ht=class extends X{_setup(){this._scheme=null}static _registryConfigForBartocApiConfig({url:e,scheme:r}={}){return!e||!r?null:{api:e}}_schemeInfoToJSKOS(e){let r=e.labels.find(s=>s.lang==="x-uri").text,n={};e.labels.filter(s=>!s.lang.startsWith("x-")).forEach(s=>{n[s.lang]=s.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,s=`${r.uri}/${i}`;if(Re[r.uri].concepts[s])return Re[r.uri].concepts[s];let o={};e.labels.filter(u=>!u.lang.startsWith("x-")&&u.text).forEach(u=>{o[u.lang]=u.text.replace(`${i} `,""),Re[r.uri].searchIndex.add(s,o[u.lang])});let a={};return e.labels.filter(u=>!u.lang.startsWith("x-")&&u.description).forEach(u=>{a[u.lang]||(a[u.lang]=[]),a[u.lang].push(u.description)}),Re[r.uri].concepts[s]={uri:s,notation:[i],prefLabel:o,scopeNote:a,inScheme:[{uri:r.uri}],narrower:(e.categories||[]).map(u=>({uri:`${r.uri}/${u.ID}`})),broader:n},Re[r.uri].concepts[s]}_removeNarrower(e){return e&&Object.assign({},e,{narrower:e.narrower&&e.narrower.length?[null]:[]})}_loadSchemeData(e){return E(this,null,function*(){let r=yield this.axios(j(P({},e),{method:"get",url:this._api.api,_skipAdditionalParameters:!0}));this._scheme=this._schemeInfoToJSKOS(r);let n=this._scheme.uri;Re[n]={schemeInfo:r,searchIndex:Mi.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)),Re[n].topConcepts=r.categories.map(s=>this._categoryToJSKOS(s,{scheme:this._scheme}))})}getSchemes(){return E(this,arguments,function*(e={}){if(!this._api.api)throw new qe;return this._scheme||(this._loadSchemeDataPromise||(this._loadSchemeDataPromise=this._loadSchemeData(e)),yield this._loadSchemeDataPromise),[this._scheme]})}getTop(n){return E(this,null,function*(){var i=n,{scheme:e}=i,r=H(i,["scheme"]);if(!e||!e.uri)throw new U({parameter:"scheme",message:"Missing scheme URI"});if(this._scheme||(yield this.getSchemes(r)),!q.compare(e,this._scheme))throw new U({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return Re[this._scheme.uri].topConcepts.map(this._removeNarrower)})}getConcepts(n){return E(this,null,function*(){var i=n,{concepts:e}=i,r=H(i,["concepts"]);return xe.default(e)||(e=[e]),this._scheme||(yield this.getSchemes(r)),e.map(s=>Re[this._scheme.uri].concepts[s.uri]).map(this._removeNarrower)})}getAncestors(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=H(i,["concept"]);if(!e||!e.uri)throw new U({parameter:"concept"});if(e.ancestors&&e.ancestors[0]!==null)return e.ancestors;this._scheme||(yield this.getSchemes(r)),e=Re[this._scheme.uri].concepts[e.uri];let s=e&&e.broader&&e.broader[0];return s?[s].concat(yield this.getAncestors(P({concept:s},r))):[]})}getNarrower(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=H(i,["concept"]);if(!e||!e.uri)throw new U({parameter:"concept"});return e.narrower&&e.narrower[0]!==null?e.narrower:(this._scheme||(yield this.getSchemes(r)),e=Re[this._scheme.uri].concepts[e.uri],(e&&e.narrower||[]).map(s=>Re[this._scheme.uri].concepts[s.uri]).map(this._removeNarrower))})}search(i){return E(this,arguments,function*({search:e,scheme:r,limit:n=100}){if(!r||!r.uri)throw new U({parameter:"scheme"});if(!e)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 Re[this._scheme.uri].searchIndex.search(e)).map(o=>Re[this._scheme.uri].concepts[o]).map(this._removeNarrower).slice(0,n)})}suggest(e){return E(this,null,function*(){e._raw=!0;let r=yield this.search(e),n=[e.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})}};ee(ht,"supports",{schemes:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,suggest:!0,search:!0});ht.providerName="MyCoRe";ht.providerType="http://bartoc.org/api-type/mycore";var vn={schemes:[]},pt=class extends X{static _registryConfigForBartocApiConfig({url:e}={}){return e?{api:e}:null}getSchemes(){return E(this,null,function*(){var e,r;if(!vn.schemes.length){let n=yield _e.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)vn.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 vn.schemes})}getConcepts(r){return E(this,arguments,function*({concepts:e}){var i,s;if(!e)throw new U({parameter:"concepts"});return Array.isArray(e)||(e=[e]),(((s=(i=(yield _e.post(this._api.api,{query:`query { lookup( uris: [${e.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,m,d,f,g,w,O;let a={uri:o.uri,inScheme:[vn.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}),(d=(m=o.result)==null?void 0:m.scopeNote)!=null&&d[0]&&(a.scopeNote={und:o.result.scopeNote}),(g=(f=o.result)==null?void 0:f.broader)!=null&&g.length&&(a.broader=o.result.broader),(O=(w=o.result)==null?void 0:w.narrower)!=null&&O.length&&(a.narrower=o.result.narrower),a})})}suggest(e){return E(this,null,function*(){let r=e.search,n=yield this.search(e);return[r,n.map(i=>q.prefLabel(i,{fallbackToUri:!1})),[],n.map(i=>i.uri)]})}search(n){return E(this,arguments,function*({scheme:e,search:r}){var s,o,a,u,l;if(!r)throw new U({parameter:"search"});if(!e||!q.isContainedIn(e,vn.schemes))throw new U({parameter:"scheme"});return(((l=(u=(a=(o=(s=(yield _e.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: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 m,d,f;let h={uri:c.uri,inScheme:[e]};return(m=c.prefLabel)!=null&&m[0]&&(h.prefLabel={und:c.prefLabel[0]}),(d=c.altLabel)!=null&&d[0]&&(h.altLabel={und:c.altLabel}),(f=c.scopeNote)!=null&&f[0]&&(h.scopeNote={und:c.scopeNote[0]}),h})})}};ee(pt,"supports",{schemes:!0,top:!1,data:!0,concepts:!0,narrower:!1,ancestors:!1,suggest:!0,search:!0});pt.providerName="NoTApi";pt.providerType="http://bartoc.org/api-type/noterms";var Ze={[X.providerName]:X,init(t){if(this[t.provider])return new this[t.provider](t);throw new Vt},addProvider(t){if(t.prototype instanceof X||t===X)this[t.providerName]=t;else throw new Vt}};Ze.addProvider($e);Ze.addProvider(Ue);Object.values(xn).forEach(t=>{Ze.addProvider(t)});var Vo={},Ar=class t{constructor(e){this.config=e,this.axios=_e.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=>Ze.init(r)).filter(r=>r),e.registries.forEach(r=>{r.cdk=this}),this._config=e}get providers(){return Ze}createInstance(e){return new t(e)}loadConfig(e){return E(this,null,function*(){let r=yield this.axios.get(e);this.config=r.data})}loadBuildInfo(o){var a=o,{url:e,buildInfo:r=null,interval:n=6e4,callback:i}=a,s=H(a,["url","buildInfo","interval","callback"]);if(!e&&!this.config.cocodaBaseUrl)throw new ve({message:"Could not determine URL to load build config."});return e||(e=`${this.config.cocodaBaseUrl}build-info.json`),this.repeat(j(P({},s),{function:()=>E(this,null,function*(){return(yield this.axios.get(e,{headers:{"Cache-Control":"no-cache"}})).data}),interval:n,callback:(u,l,c)=>{u?i(u):(c||!c&&r&&!Ye.default(l,r))&&i(null,l,c||r)}}))}getRegistryForUri(e){return this.config.registries.find(r=>r.uri==e)}initializeRegistry(e){return e=Ze.init(e),e.cdk=this,e}addProvider(e){Ze.addProvider(e)}static addProvider(e){Ze.addProvider(e)}repeat({function:e,interval:r=15e3,callback:n,callImmediately:i=!0}={}){if(!e)throw new U({parameter:"function"});if(typeof e!="function")throw new U({parameter:"function",message:"function needs to be a function"});let s=()=>E(null,null,function*(){return e()});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=m=>{let d=o.result;Ye.default(d,m)||(o.result=m,o.error=null,n(null,m,d))},u=m=>{o.error=m,n(m)},l=m=>{o.isPaused||(o.timer=setTimeout(()=>{m()},o.interval))},c=()=>s().then(a).catch(u).then(()=>l(c)),h=(m=i)=>{m?c():l(c)};return h(),{start:(...m)=>{o.isPaused=!1,h(...m)},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(m){o.interval=m}}}getSchemes(){return E(this,arguments,function*(e={}){let r=[],n=[];for(let i of this.config.registries)if(i.has.schemes!==!1){let s=i.getSchemes(e).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(m=>q.compare(m,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(V.default(u,"_registry")),c!=-1&&(c=this.config.registries.length-c);let m=a.concepts?a.concepts.length==0?-1:1:0,d=u.concepts?u.concepts.length==0?-1:1:0;m>d?h=!0:m<d?h=!1:h=c<l}if(!u||h){if(h){let m=r.findIndex(d=>q.compare(d,u));m!=-1&&r.splice(m,1),a=q.merge(a,Qe.default(u,["concepts","topConcepts"]),{mergeUris:!0,skipPaths:["_registry"]})}a._registry=i,r.push(a)}else{let m=r.findIndex(d=>q.compare(d,a));if(m!=-1){let d=r[m]._registry;r[m]=q.merge(r[m],Qe.default(a,["concepts","topConcepts"]),{mergeUris:!0,skipPaths:["_registry"]}),r[m]._registry=d}}}}).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(e,r="concepts"){var i;let n=e._registry;if(n)return n;for(let s of e.API||[]){let o=s,{type:a}=o,u=H(o,["type"]);let l=u.url,c=`${a}-${l}`;if(Vo[c]){let h=Vo[c];return Array.isArray(h._jskos.schemes)&&!q.isContainedIn(e,h._jskos.schemes)&&h._jskos.schemes.push(e),h}else{u.scheme=e;for(let h of Object.values(Ze)){if((h==null?void 0:h.providerType)!==a||!h._registryConfigForBartocApiConfig||r&&!((i=h==null?void 0:h.supports)!=null&&i[r]))continue;let m=h.providerName,d=Ze[m]._registryConfigForBartocApiConfig(u);if(d){d.provider=m;try{if(n=this.initializeRegistry(d),n)return Vo[c]=n,n}catch(f){continue}}}}}return null}};var Mm=new Ar;function E3(t){Object.values(xn).forEach(e=>(t||Mm).addProvider(e))}return Lg(C3);})();
|
|
8
|
+
var CDK=(()=>{var La=Object.create;var Xt=Object.defineProperty,Fa=Object.defineProperties,Ba=Object.getOwnPropertyDescriptor,ja=Object.getOwnPropertyDescriptors,Ua=Object.getOwnPropertyNames,Ar=Object.getOwnPropertySymbols,za=Object.getPrototypeOf,Sn=Object.prototype.hasOwnProperty,es=Object.prototype.propertyIsEnumerable;var At=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),$a=t=>{throw TypeError(t)},rt=Math.pow,vn=(t,e,r)=>e in t?Xt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,I=(t,e)=>{for(var r in e||(e={}))Sn.call(e,r)&&vn(t,r,e[r]);if(Ar)for(var r of Ar(e))es.call(e,r)&&vn(t,r,e[r]);return t},F=(t,e)=>Fa(t,ja(e));var Gt=(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 W=(t,e)=>{var r={};for(var n in t)Sn.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Ar)for(var n of Ar(t))e.indexOf(n)<0&&es.call(t,n)&&(r[n]=t[n]);return r};var ts=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),pt=(t,e)=>{for(var r in e)Xt(t,r,{get:e[r],enumerable:!0})},rs=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ua(e))!Sn.call(t,i)&&i!==r&&Xt(t,i,{get:()=>e[i],enumerable:!(n=Ba(e,i))||n.enumerable});return t};var ns=(t,e,r)=>(r=t!=null?La(za(t)):{},rs(e||!t||!t.__esModule?Xt(r,"default",{value:t,enumerable:!0}):r,t)),Wa=t=>rs(Xt({},"__esModule",{value:!0}),t);var ee=(t,e,r)=>vn(t,typeof e!="symbol"?e+"":e,r);var E=(t,e,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(t,e)).next())}),dt=function(t,e){this[0]=t,this[1]=e},xn=(t,e,r)=>{var n=(o,a,u,l)=>{try{var c=r[o](a),f=(a=c.value)instanceof dt,m=c.done;Promise.resolve(f?a[0]:a).then(g=>f?n(o==="return"?o:"next",a[1]?{done:g.done,value:g.value}:g,u,l):u({value:g,done:m})).catch(g=>n("throw",g,u,l))}catch(g){l(g)}},i=o=>s[o]=a=>new Promise((u,l)=>n(o,a,u,l)),s={};return r=r.apply(t,e),s[At("asyncIterator")]=()=>s,i("next"),i("throw"),i("return"),s},En=t=>{var e=t[At("asyncIterator")],r=!1,n,i={};return e==null?(e=t[At("iterator")](),n=s=>i[s]=o=>e[s](o)):(e=e.call(t),n=s=>i[s]=o=>{if(r){if(r=!1,s==="throw")throw o;return o}return r=!0,{done:!1,value:new dt(new Promise(a=>{var u=e[s](o);u instanceof Object||$a("Object expected"),a(u)}),1)}}),i[At("iterator")]=()=>i,n("next"),"throw"in e?n("throw"):i.throw=s=>{throw s},"return"in e&&n("return"),i},is=(t,e,r)=>(e=t[At("asyncIterator")])?e.call(t):(t=t[At("iterator")](),e={},r=(n,i)=>(i=t[n])&&(e[n]=s=>new Promise((o,a,u)=>(s=i.call(t,s),u=s.done,Promise.resolve(s.value).then(l=>o({value:l,done:u}),a)))),r("next"),r("return"),e);var fo=ts((co,ci)=>{(function(t){if(typeof co=="object"&&typeof ci!="undefined")ci.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,s,o){function a(c,f){if(!s[c]){if(!i[c]){var m=typeof Gt=="function"&≫if(!f&&m)return m(c,!0);if(u)return u(c,!0);var g=new Error("Cannot find module '"+c+"'");throw g.code="MODULE_NOT_FOUND",g}var h=s[c]={exports:{}};i[c][0].call(h.exports,function(d){var y=i[c][1][d];return a(y||d)},h,h.exports,n,i,s,o)}return s[c].exports}for(var u=typeof Gt=="function"&&Gt,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(d),f=o.document.createTextNode("");c.observe(f,{characterData:!0}),u=function(){f.data=l=++l%2}}else if(!o.setImmediate&&typeof o.MessageChannel!="undefined"){var m=new o.MessageChannel;m.port1.onmessage=d,u=function(){m.port2.postMessage(0)}}else"document"in o&&"onreadystatechange"in o.document.createElement("script")?u=function(){var O=o.document.createElement("script");O.onreadystatechange=function(){d(),O.onreadystatechange=null,O.parentNode.removeChild(O),O=null},o.document.documentElement.appendChild(O)}:u=function(){setTimeout(d,0)};var g,h=[];function d(){g=!0;for(var O,R,C=h.length;C;){for(R=h,h=[],O=-1;++O<C;)R[O]();C=h.length}g=!1}i.exports=y;function y(O){h.push(O)===1&&!g&&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"],f=["PENDING"];i.exports=m;function m(S){if(typeof S!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,S!==a&&y(this,S)}m.prototype.catch=function(S){return this.then(null,S)},m.prototype.then=function(S,k){if(typeof S!="function"&&this.state===c||typeof k!="function"&&this.state===l)return this;var D=new this.constructor(a);if(this.state!==f){var $=this.state===c?S:k;h(D,$,this.outcome)}else this.queue.push(new g(D,S,k));return D};function g(S,k,D){this.promise=S,typeof k=="function"&&(this.onFulfilled=k,this.callFulfilled=this.otherCallFulfilled),typeof D=="function"&&(this.onRejected=D,this.callRejected=this.otherCallRejected)}g.prototype.callFulfilled=function(S){u.resolve(this.promise,S)},g.prototype.otherCallFulfilled=function(S){h(this.promise,this.onFulfilled,S)},g.prototype.callRejected=function(S){u.reject(this.promise,S)},g.prototype.otherCallRejected=function(S){h(this.promise,this.onRejected,S)};function h(S,k,D){o(function(){var $;try{$=k(D)}catch(X){return u.reject(S,X)}$===S?u.reject(S,new TypeError("Cannot resolve promise with itself")):u.resolve(S,$)})}u.resolve=function(S,k){var D=O(d,k);if(D.status==="error")return u.reject(S,D.value);var $=D.value;if($)y(S,$);else{S.state=c,S.outcome=k;for(var X=-1,K=S.queue.length;++X<K;)S.queue[X].callFulfilled(k)}return S},u.reject=function(S,k){S.state=l,S.outcome=k;for(var D=-1,$=S.queue.length;++D<$;)S.queue[D].callRejected(k);return S};function d(S){var k=S&&S.then;if(S&&(typeof S=="object"||typeof S=="function")&&typeof k=="function")return function(){k.apply(S,arguments)}}function y(S,k){var D=!1;function $(Z){D||(D=!0,u.reject(S,Z))}function X(Z){D||(D=!0,u.resolve(S,Z))}function K(){k(X,$)}var V=O(K);V.status==="error"&&$(V.value)}function O(S,k){var D={};try{D.value=S(k),D.status="success"}catch($){D.status="error",D.value=$}return D}m.resolve=R;function R(S){return S instanceof this?S:u.resolve(new this(a),S)}m.reject=C;function C(S){var k=new this(a);return u.reject(k,S)}m.all=L;function L(S){var k=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var D=S.length,$=!1;if(!D)return this.resolve([]);for(var X=new Array(D),K=0,V=-1,Z=new this(a);++V<D;)se(S[V],V);return Z;function se(re,_e){k.resolve(re).then(lt,function(be){$||($=!0,u.reject(Z,be))});function lt(be){X[_e]=be,++K===D&&!$&&($=!0,u.resolve(Z,X))}}}m.race=N;function N(S){var k=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var D=S.length,$=!1;if(!D)return this.resolve([]);for(var X=-1,K=new this(a);++X<D;)V(S[X]);return K;function V(Z){k.resolve(Z).then(function(se){$||($=!0,u.resolve(K,se))},function(se){$||($=!0,u.reject(K,se))})}}},{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,_){if(!(p instanceof _))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),_=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!p||_)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch(w){return!1}}function f(p,_){p=p||[],_=_||{};try{return new Blob(p,_)}catch(b){if(b.name!=="TypeError")throw b;for(var w=typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder,v=new w,x=0;x<p.length;x+=1)v.append(p[x]);return v.getBlob(_.type)}}typeof Promise=="undefined"&&n(3);var m=Promise;function g(p,_){_&&p.then(function(w){_(null,w)},function(w){_(w)})}function h(p,_,w){typeof _=="function"&&p.then(_),typeof w=="function"&&p.catch(w)}function d(p){return typeof p!="string"&&(console.warn(p+" used as a key, but it is not a string."),p=String(p)),p}function y(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var O="local-forage-detect-blob-support",R=void 0,C={},L=Object.prototype.toString,N="readonly",S="readwrite";function k(p){for(var _=p.length,w=new ArrayBuffer(_),v=new Uint8Array(w),x=0;x<_;x++)v[x]=p.charCodeAt(x);return w}function D(p){return new m(function(_){var w=p.transaction(O,S),v=f([""]);w.objectStore(O).put(v,"key"),w.onabort=function(x){x.preventDefault(),x.stopPropagation(),_(!1)},w.oncomplete=function(){var x=navigator.userAgent.match(/Chrome\/(\d+)/),b=navigator.userAgent.match(/Edge\//);_(b||!x||parseInt(x[1],10)>=43)}}).catch(function(){return!1})}function $(p){return typeof R=="boolean"?m.resolve(R):D(p).then(function(_){return R=_,R})}function X(p){var _=C[p.name],w={};w.promise=new m(function(v,x){w.resolve=v,w.reject=x}),_.deferredOperations.push(w),_.dbReady?_.dbReady=_.dbReady.then(function(){return w.promise}):_.dbReady=w.promise}function K(p){var _=C[p.name],w=_.deferredOperations.pop();if(w)return w.resolve(),w.promise}function V(p,_){var w=C[p.name],v=w.deferredOperations.pop();if(v)return v.reject(_),v.promise}function Z(p,_){return new m(function(w,v){if(C[p.name]=C[p.name]||ht(),p.db)if(_)X(p),p.db.close();else return w(p.db);var x=[p.name];_&&x.push(p.version);var b=l.open.apply(l,x);_&&(b.onupgradeneeded=function(T){var M=b.result;try{M.createObjectStore(p.storeName),T.oldVersion<=1&&M.createObjectStore(O)}catch(B){if(B.name==="ConstraintError")console.warn('The database "'+p.name+'" has been upgraded from version '+T.oldVersion+" to version "+T.newVersion+', but the storage "'+p.storeName+'" already exists.');else throw B}}),b.onerror=function(T){T.preventDefault(),v(b.error)},b.onsuccess=function(){var T=b.result;T.onversionchange=function(M){M.target.close()},w(T),K(p)}})}function se(p){return Z(p,!1)}function re(p){return Z(p,!0)}function _e(p,_){if(!p.db)return!0;var w=!p.db.objectStoreNames.contains(p.storeName),v=p.version<p.db.version,x=p.version>p.db.version;if(v&&(p.version!==_&&console.warn('The database "'+p.name+`" can't be downgraded from version `+p.db.version+" to version "+p.version+"."),p.version=p.db.version),x||w){if(w){var b=p.db.version+1;b>p.version&&(p.version=b)}return!0}return!1}function lt(p){return new m(function(_,w){var v=new FileReader;v.onerror=w,v.onloadend=function(x){var b=btoa(x.target.result||"");_({__local_forage_encoded_blob:!0,data:b,type:p.type})},v.readAsBinaryString(p)})}function be(p){var _=k(atob(p.data));return f([_],{type:p.type})}function Vt(p){return p&&p.__local_forage_encoded_blob}function ct(p){var _=this,w=_._initReady().then(function(){var v=C[_._dbInfo.name];if(v&&v.dbReady)return v.dbReady});return h(w,p,p),w}function ft(p){X(p);for(var _=C[p.name],w=_.forages,v=0;v<w.length;v++){var x=w[v];x._dbInfo.db&&(x._dbInfo.db.close(),x._dbInfo.db=null)}return p.db=null,se(p).then(function(b){return p.db=b,_e(p)?re(p):b}).then(function(b){p.db=_.db=b;for(var T=0;T<w.length;T++)w[T]._dbInfo.db=b}).catch(function(b){throw V(p,b),b})}function ve(p,_,w,v){v===void 0&&(v=1);try{var x=p.db.transaction(p.storeName,_);w(null,x)}catch(b){if(v>0&&(!p.db||b.name==="InvalidStateError"||b.name==="NotFoundError"))return m.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),re(p)}).then(function(){return ft(p).then(function(){ve(p,_,w,v-1)})}).catch(w);w(b)}}function ht(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function J(p){var _=this,w={db:null};if(p)for(var v in p)w[v]=p[v];var x=C[w.name];x||(x=ht(),C[w.name]=x),x.forages.push(_),_._initReady||(_._initReady=_.ready,_.ready=ct);var b=[];function T(){return m.resolve()}for(var M=0;M<x.forages.length;M++){var B=x.forages[M];B!==_&&b.push(B._initReady().catch(T))}var j=x.forages.slice(0);return m.all(b).then(function(){return w.db=x.db,se(w)}).then(function(z){return w.db=z,_e(w,_._defaultConfig.version)?re(w):z}).then(function(z){w.db=x.db=z,_._dbInfo=w;for(var q=0;q<j.length;q++){var Q=j[q];Q!==_&&(Q._dbInfo.db=w.db,Q._dbInfo.version=w.version)}})}function ae(p,_){var w=this;p=d(p);var v=new m(function(x,b){w.ready().then(function(){ve(w._dbInfo,N,function(T,M){if(T)return b(T);try{var B=M.objectStore(w._dbInfo.storeName),j=B.get(p);j.onsuccess=function(){var z=j.result;z===void 0&&(z=null),Vt(z)&&(z=be(z)),x(z)},j.onerror=function(){b(j.error)}}catch(z){b(z)}})}).catch(b)});return g(v,_),v}function Jt(p,_){var w=this,v=new m(function(x,b){w.ready().then(function(){ve(w._dbInfo,N,function(T,M){if(T)return b(T);try{var B=M.objectStore(w._dbInfo.storeName),j=B.openCursor(),z=1;j.onsuccess=function(){var q=j.result;if(q){var Q=q.value;Vt(Q)&&(Q=be(Q));var ne=p(Q,q.key,z++);ne!==void 0?x(ne):q.continue()}else x()},j.onerror=function(){b(j.error)}}catch(q){b(q)}})}).catch(b)});return g(v,_),v}function $o(p,_,w){var v=this;p=d(p);var x=new m(function(b,T){var M;v.ready().then(function(){return M=v._dbInfo,L.call(_)==="[object Blob]"?$(M.db).then(function(B){return B?_:lt(_)}):_}).then(function(B){ve(v._dbInfo,S,function(j,z){if(j)return T(j);try{var q=z.objectStore(v._dbInfo.storeName);B===null&&(B=void 0);var Q=q.put(B,p);z.oncomplete=function(){B===void 0&&(B=null),b(B)},z.onabort=z.onerror=function(){var ne=Q.error?Q.error:Q.transaction.error;T(ne)}}catch(ne){T(ne)}})}).catch(T)});return g(x,w),x}function Wo(p,_){var w=this;p=d(p);var v=new m(function(x,b){w.ready().then(function(){ve(w._dbInfo,S,function(T,M){if(T)return b(T);try{var B=M.objectStore(w._dbInfo.storeName),j=B.delete(p);M.oncomplete=function(){x()},M.onerror=function(){b(j.error)},M.onabort=function(){var z=j.error?j.error:j.transaction.error;b(z)}}catch(z){b(z)}})}).catch(b)});return g(v,_),v}function Ho(p){var _=this,w=new m(function(v,x){_.ready().then(function(){ve(_._dbInfo,S,function(b,T){if(b)return x(b);try{var M=T.objectStore(_._dbInfo.storeName),B=M.clear();T.oncomplete=function(){v()},T.onabort=T.onerror=function(){var j=B.error?B.error:B.transaction.error;x(j)}}catch(j){x(j)}})}).catch(x)});return g(w,p),w}function qo(p){var _=this,w=new m(function(v,x){_.ready().then(function(){ve(_._dbInfo,N,function(b,T){if(b)return x(b);try{var M=T.objectStore(_._dbInfo.storeName),B=M.count();B.onsuccess=function(){v(B.result)},B.onerror=function(){x(B.error)}}catch(j){x(j)}})}).catch(x)});return g(w,p),w}function Vo(p,_){var w=this,v=new m(function(x,b){if(p<0){x(null);return}w.ready().then(function(){ve(w._dbInfo,N,function(T,M){if(T)return b(T);try{var B=M.objectStore(w._dbInfo.storeName),j=!1,z=B.openKeyCursor();z.onsuccess=function(){var q=z.result;if(!q){x(null);return}p===0||j?x(q.key):(j=!0,q.advance(p))},z.onerror=function(){b(z.error)}}catch(q){b(q)}})}).catch(b)});return g(v,_),v}function Jo(p){var _=this,w=new m(function(v,x){_.ready().then(function(){ve(_._dbInfo,N,function(b,T){if(b)return x(b);try{var M=T.objectStore(_._dbInfo.storeName),B=M.openKeyCursor(),j=[];B.onsuccess=function(){var z=B.result;if(!z){v(j);return}j.push(z.key),z.continue()},B.onerror=function(){x(B.error)}}catch(z){x(z)}})}).catch(x)});return g(w,p),w}function Ko(p,_){_=y.apply(this,arguments);var w=this.config();p=typeof p!="function"&&p||{},p.name||(p.name=p.name||w.name,p.storeName=p.storeName||w.storeName);var v=this,x;if(!p.name)x=m.reject("Invalid arguments");else{var b=p.name===w.name&&v._dbInfo.db,T=b?m.resolve(v._dbInfo.db):se(p).then(function(M){var B=C[p.name],j=B.forages;B.db=M;for(var z=0;z<j.length;z++)j[z]._dbInfo.db=M;return M});p.storeName?x=T.then(function(M){if(M.objectStoreNames.contains(p.storeName)){var B=M.version+1;X(p);var j=C[p.name],z=j.forages;M.close();for(var q=0;q<z.length;q++){var Q=z[q];Q._dbInfo.db=null,Q._dbInfo.version=B}var ne=new m(function(ie,fe){var ce=l.open(p.name,B);ce.onerror=function(Ae){var Yt=ce.result;Yt.close(),fe(Ae)},ce.onupgradeneeded=function(){var Ae=ce.result;Ae.deleteObjectStore(p.storeName)},ce.onsuccess=function(){var Ae=ce.result;Ae.close(),ie(Ae)}});return ne.then(function(ie){j.db=ie;for(var fe=0;fe<z.length;fe++){var ce=z[fe];ce._dbInfo.db=ie,K(ce._dbInfo)}}).catch(function(ie){throw(V(p,ie)||m.resolve()).catch(function(){}),ie})}}):x=T.then(function(M){X(p);var B=C[p.name],j=B.forages;M.close();for(var z=0;z<j.length;z++){var q=j[z];q._dbInfo.db=null}var Q=new m(function(ne,ie){var fe=l.deleteDatabase(p.name);fe.onerror=function(){var ce=fe.result;ce&&ce.close(),ie(fe.error)},fe.onblocked=function(){console.warn('dropInstance blocked for database "'+p.name+'" until all open connections are closed')},fe.onsuccess=function(){var ce=fe.result;ce&&ce.close(),ne(ce)}});return Q.then(function(ne){B.db=ne;for(var ie=0;ie<j.length;ie++){var fe=j[ie];K(fe._dbInfo)}}).catch(function(ne){throw(V(p,ne)||m.resolve()).catch(function(){}),ne})})}return g(x,_),x}var Yo={_driver:"asyncStorage",_initStorage:J,_support:c(),iterate:Jt,getItem:ae,setItem:$o,removeItem:Wo,clear:Ho,length:qo,key:Vo,keys:Jo,dropInstance:Ko};function Xo(){return typeof openDatabase=="function"}var et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Go="~~local_forage_type~",Ni=/^~~local_forage_type~([^~]+)~/,xr="__lfsc__:",hn=xr.length,pn="arbf",dn="blob",Li="si08",Fi="ui08",Bi="uic8",ji="si16",Ui="si32",zi="ur16",$i="ui32",Wi="fl32",Hi="fl64",qi=hn+pn.length,Vi=Object.prototype.toString;function Ji(p){var _=p.length*.75,w=p.length,v,x=0,b,T,M,B;p[p.length-1]==="="&&(_--,p[p.length-2]==="="&&_--);var j=new ArrayBuffer(_),z=new Uint8Array(j);for(v=0;v<w;v+=4)b=et.indexOf(p[v]),T=et.indexOf(p[v+1]),M=et.indexOf(p[v+2]),B=et.indexOf(p[v+3]),z[x++]=b<<2|T>>4,z[x++]=(T&15)<<4|M>>2,z[x++]=(M&3)<<6|B&63;return j}function mn(p){var _=new Uint8Array(p),w="",v;for(v=0;v<_.length;v+=3)w+=et[_[v]>>2],w+=et[(_[v]&3)<<4|_[v+1]>>4],w+=et[(_[v+1]&15)<<2|_[v+2]>>6],w+=et[_[v+2]&63];return _.length%3===2?w=w.substring(0,w.length-1)+"=":_.length%3===1&&(w=w.substring(0,w.length-2)+"=="),w}function Qo(p,_){var w="";if(p&&(w=Vi.call(p)),p&&(w==="[object ArrayBuffer]"||p.buffer&&Vi.call(p.buffer)==="[object ArrayBuffer]")){var v,x=xr;p instanceof ArrayBuffer?(v=p,x+=pn):(v=p.buffer,w==="[object Int8Array]"?x+=Li:w==="[object Uint8Array]"?x+=Fi:w==="[object Uint8ClampedArray]"?x+=Bi:w==="[object Int16Array]"?x+=ji:w==="[object Uint16Array]"?x+=zi:w==="[object Int32Array]"?x+=Ui:w==="[object Uint32Array]"?x+=$i:w==="[object Float32Array]"?x+=Wi:w==="[object Float64Array]"?x+=Hi:_(new Error("Failed to get type for BinaryArray"))),_(x+mn(v))}else if(w==="[object Blob]"){var b=new FileReader;b.onload=function(){var T=Go+p.type+"~"+mn(this.result);_(xr+dn+T)},b.readAsArrayBuffer(p)}else try{_(JSON.stringify(p))}catch(T){console.error("Couldn't convert value into a JSON string: ",p),_(null,T)}}function Zo(p){if(p.substring(0,hn)!==xr)return JSON.parse(p);var _=p.substring(qi),w=p.substring(hn,qi),v;if(w===dn&&Ni.test(_)){var x=_.match(Ni);v=x[1],_=_.substring(x[0].length)}var b=Ji(_);switch(w){case pn:return b;case dn:return f([b],{type:v});case Li:return new Int8Array(b);case Fi:return new Uint8Array(b);case Bi:return new Uint8ClampedArray(b);case ji:return new Int16Array(b);case zi:return new Uint16Array(b);case Ui:return new Int32Array(b);case $i:return new Uint32Array(b);case Wi:return new Float32Array(b);case Hi:return new Float64Array(b);default:throw new Error("Unkown type: "+w)}}var gn={serialize:Qo,deserialize:Zo,stringToBuffer:Ji,bufferToString:mn};function Ki(p,_,w,v){p.executeSql("CREATE TABLE IF NOT EXISTS "+_.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],w,v)}function ea(p){var _=this,w={db:null};if(p)for(var v in p)w[v]=typeof p[v]!="string"?p[v].toString():p[v];var x=new m(function(b,T){try{w.db=openDatabase(w.name,String(w.version),w.description,w.size)}catch(M){return T(M)}w.db.transaction(function(M){Ki(M,w,function(){_._dbInfo=w,b()},function(B,j){T(j)})},T)});return w.serializer=gn,x}function tt(p,_,w,v,x,b){p.executeSql(w,v,x,function(T,M){M.code===M.SYNTAX_ERR?T.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[_.storeName],function(B,j){j.rows.length?b(B,M):Ki(B,_,function(){B.executeSql(w,v,x,b)},b)},b):b(T,M)},b)}function ta(p,_){var w=this;p=d(p);var v=new m(function(x,b){w.ready().then(function(){var T=w._dbInfo;T.db.transaction(function(M){tt(M,T,"SELECT * FROM "+T.storeName+" WHERE key = ? LIMIT 1",[p],function(B,j){var z=j.rows.length?j.rows.item(0).value:null;z&&(z=T.serializer.deserialize(z)),x(z)},function(B,j){b(j)})})}).catch(b)});return g(v,_),v}function ra(p,_){var w=this,v=new m(function(x,b){w.ready().then(function(){var T=w._dbInfo;T.db.transaction(function(M){tt(M,T,"SELECT * FROM "+T.storeName,[],function(B,j){for(var z=j.rows,q=z.length,Q=0;Q<q;Q++){var ne=z.item(Q),ie=ne.value;if(ie&&(ie=T.serializer.deserialize(ie)),ie=p(ie,ne.key,Q+1),ie!==void 0){x(ie);return}}x()},function(B,j){b(j)})})}).catch(b)});return g(v,_),v}function Yi(p,_,w,v){var x=this;p=d(p);var b=new m(function(T,M){x.ready().then(function(){_===void 0&&(_=null);var B=_,j=x._dbInfo;j.serializer.serialize(_,function(z,q){q?M(q):j.db.transaction(function(Q){tt(Q,j,"INSERT OR REPLACE INTO "+j.storeName+" (key, value) VALUES (?, ?)",[p,z],function(){T(B)},function(ne,ie){M(ie)})},function(Q){if(Q.code===Q.QUOTA_ERR){if(v>0){T(Yi.apply(x,[p,B,w,v-1]));return}M(Q)}})})}).catch(M)});return g(b,w),b}function na(p,_,w){return Yi.apply(this,[p,_,w,1])}function ia(p,_){var w=this;p=d(p);var v=new m(function(x,b){w.ready().then(function(){var T=w._dbInfo;T.db.transaction(function(M){tt(M,T,"DELETE FROM "+T.storeName+" WHERE key = ?",[p],function(){x()},function(B,j){b(j)})})}).catch(b)});return g(v,_),v}function sa(p){var _=this,w=new m(function(v,x){_.ready().then(function(){var b=_._dbInfo;b.db.transaction(function(T){tt(T,b,"DELETE FROM "+b.storeName,[],function(){v()},function(M,B){x(B)})})}).catch(x)});return g(w,p),w}function oa(p){var _=this,w=new m(function(v,x){_.ready().then(function(){var b=_._dbInfo;b.db.transaction(function(T){tt(T,b,"SELECT COUNT(key) as c FROM "+b.storeName,[],function(M,B){var j=B.rows.item(0).c;v(j)},function(M,B){x(B)})})}).catch(x)});return g(w,p),w}function aa(p,_){var w=this,v=new m(function(x,b){w.ready().then(function(){var T=w._dbInfo;T.db.transaction(function(M){tt(M,T,"SELECT key FROM "+T.storeName+" WHERE id = ? LIMIT 1",[p+1],function(B,j){var z=j.rows.length?j.rows.item(0).key:null;x(z)},function(B,j){b(j)})})}).catch(b)});return g(v,_),v}function ua(p){var _=this,w=new m(function(v,x){_.ready().then(function(){var b=_._dbInfo;b.db.transaction(function(T){tt(T,b,"SELECT key FROM "+b.storeName,[],function(M,B){for(var j=[],z=0;z<B.rows.length;z++)j.push(B.rows.item(z).key);v(j)},function(M,B){x(B)})})}).catch(x)});return g(w,p),w}function la(p){return new m(function(_,w){p.transaction(function(v){v.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(x,b){for(var T=[],M=0;M<b.rows.length;M++)T.push(b.rows.item(M).name);_({db:p,storeNames:T})},function(x,b){w(b)})},function(v){w(v)})})}function ca(p,_){_=y.apply(this,arguments);var w=this.config();p=typeof p!="function"&&p||{},p.name||(p.name=p.name||w.name,p.storeName=p.storeName||w.storeName);var v=this,x;return p.name?x=new m(function(b){var T;p.name===w.name?T=v._dbInfo.db:T=openDatabase(p.name,"","",0),p.storeName?b({db:T,storeNames:[p.storeName]}):b(la(T))}).then(function(b){return new m(function(T,M){b.db.transaction(function(B){function j(ne){return new m(function(ie,fe){B.executeSql("DROP TABLE IF EXISTS "+ne,[],function(){ie()},function(ce,Ae){fe(Ae)})})}for(var z=[],q=0,Q=b.storeNames.length;q<Q;q++)z.push(j(b.storeNames[q]));m.all(z).then(function(){T()}).catch(function(ne){M(ne)})},function(B){M(B)})})}):x=m.reject("Invalid arguments"),g(x,_),x}var fa={_driver:"webSQLStorage",_initStorage:ea,_support:Xo(),iterate:ra,getItem:ta,setItem:na,removeItem:ia,clear:sa,length:oa,key:aa,keys:ua,dropInstance:ca};function ha(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch(p){return!1}}function Xi(p,_){var w=p.name+"/";return p.storeName!==_.storeName&&(w+=p.storeName+"/"),w}function pa(){var p="_localforage_support_test";try{return localStorage.setItem(p,!0),localStorage.removeItem(p),!1}catch(_){return!0}}function da(){return!pa()||localStorage.length>0}function ma(p){var _=this,w={};if(p)for(var v in p)w[v]=p[v];return w.keyPrefix=Xi(p,_._defaultConfig),da()?(_._dbInfo=w,w.serializer=gn,m.resolve()):m.reject()}function ga(p){var _=this,w=_.ready().then(function(){for(var v=_._dbInfo.keyPrefix,x=localStorage.length-1;x>=0;x--){var b=localStorage.key(x);b.indexOf(v)===0&&localStorage.removeItem(b)}});return g(w,p),w}function wa(p,_){var w=this;p=d(p);var v=w.ready().then(function(){var x=w._dbInfo,b=localStorage.getItem(x.keyPrefix+p);return b&&(b=x.serializer.deserialize(b)),b});return g(v,_),v}function ya(p,_){var w=this,v=w.ready().then(function(){for(var x=w._dbInfo,b=x.keyPrefix,T=b.length,M=localStorage.length,B=1,j=0;j<M;j++){var z=localStorage.key(j);if(z.indexOf(b)===0){var q=localStorage.getItem(z);if(q&&(q=x.serializer.deserialize(q)),q=p(q,z.substring(T),B++),q!==void 0)return q}}});return g(v,_),v}function _a(p,_){var w=this,v=w.ready().then(function(){var x=w._dbInfo,b;try{b=localStorage.key(p)}catch(T){b=null}return b&&(b=b.substring(x.keyPrefix.length)),b});return g(v,_),v}function ba(p){var _=this,w=_.ready().then(function(){for(var v=_._dbInfo,x=localStorage.length,b=[],T=0;T<x;T++){var M=localStorage.key(T);M.indexOf(v.keyPrefix)===0&&b.push(M.substring(v.keyPrefix.length))}return b});return g(w,p),w}function va(p){var _=this,w=_.keys().then(function(v){return v.length});return g(w,p),w}function Sa(p,_){var w=this;p=d(p);var v=w.ready().then(function(){var x=w._dbInfo;localStorage.removeItem(x.keyPrefix+p)});return g(v,_),v}function xa(p,_,w){var v=this;p=d(p);var x=v.ready().then(function(){_===void 0&&(_=null);var b=_;return new m(function(T,M){var B=v._dbInfo;B.serializer.serialize(_,function(j,z){if(z)M(z);else try{localStorage.setItem(B.keyPrefix+p,j),T(b)}catch(q){(q.name==="QuotaExceededError"||q.name==="NS_ERROR_DOM_QUOTA_REACHED")&&M(q),M(q)}})})});return g(x,w),x}function Ea(p,_){if(_=y.apply(this,arguments),p=typeof p!="function"&&p||{},!p.name){var w=this.config();p.name=p.name||w.name,p.storeName=p.storeName||w.storeName}var v=this,x;return p.name?x=new m(function(b){p.storeName?b(Xi(p,v._defaultConfig)):b(p.name+"/")}).then(function(b){for(var T=localStorage.length-1;T>=0;T--){var M=localStorage.key(T);M.indexOf(b)===0&&localStorage.removeItem(M)}}):x=m.reject("Invalid arguments"),g(x,_),x}var Aa={_driver:"localStorageWrapper",_initStorage:ma,_support:ha(),iterate:ya,getItem:wa,setItem:xa,removeItem:Sa,clear:ga,length:va,key:_a,keys:ba,dropInstance:Ea},Ca=function(_,w){return _===w||typeof _=="number"&&typeof w=="number"&&isNaN(_)&&isNaN(w)},Oa=function(_,w){for(var v=_.length,x=0;x<v;){if(Ca(_[x],w))return!0;x++}return!1},Gi=Array.isArray||function(p){return Object.prototype.toString.call(p)==="[object Array]"},Kt={},Qi={},Et={INDEXEDDB:Yo,WEBSQL:fa,LOCALSTORAGE:Aa},ka=[Et.INDEXEDDB._driver,Et.WEBSQL._driver,Et.LOCALSTORAGE._driver],Er=["dropInstance"],wn=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Er),Ra={description:"",driver:ka.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Ia(p,_){p[_]=function(){var w=arguments;return p.ready().then(function(){return p[_].apply(p,w)})}}function yn(){for(var p=1;p<arguments.length;p++){var _=arguments[p];if(_)for(var w in _)_.hasOwnProperty(w)&&(Gi(_[w])?arguments[0][w]=_[w].slice():arguments[0][w]=_[w])}return arguments[0]}var Ta=(function(){function p(_){a(this,p);for(var w in Et)if(Et.hasOwnProperty(w)){var v=Et[w],x=v._driver;this[w]=x,Kt[x]||this.defineDriver(v)}this._defaultConfig=yn({},Ra),this._config=yn({},this._defaultConfig,_),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(w){if((typeof w=="undefined"?"undefined":o(w))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var v in w){if(v==="storeName"&&(w[v]=w[v].replace(/\W/g,"_")),v==="version"&&typeof w[v]!="number")return new Error("Database version must be a number.");this._config[v]=w[v]}return"driver"in w&&w.driver?this.setDriver(this._config.driver):!0}else return typeof w=="string"?this._config[w]:this._config},p.prototype.defineDriver=function(w,v,x){var b=new m(function(T,M){try{var B=w._driver,j=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!w._driver){M(j);return}for(var z=wn.concat("_initStorage"),q=0,Q=z.length;q<Q;q++){var ne=z[q],ie=!Oa(Er,ne);if((ie||w[ne])&&typeof w[ne]!="function"){M(j);return}}var fe=function(){for(var Yt=function(Ma){return function(){var Na=new Error("Method "+Ma+" is not implemented by the current driver"),Zi=m.reject(Na);return g(Zi,arguments[arguments.length-1]),Zi}},_n=0,Da=Er.length;_n<Da;_n++){var bn=Er[_n];w[bn]||(w[bn]=Yt(bn))}};fe();var ce=function(Yt){Kt[B]&&console.info("Redefining LocalForage driver: "+B),Kt[B]=w,Qi[B]=Yt,T()};"_support"in w?w._support&&typeof w._support=="function"?w._support().then(ce,M):ce(!!w._support):ce(!0)}catch(Ae){M(Ae)}});return h(b,v,x),b},p.prototype.driver=function(){return this._driver||null},p.prototype.getDriver=function(w,v,x){var b=Kt[w]?m.resolve(Kt[w]):m.reject(new Error("Driver not found."));return h(b,v,x),b},p.prototype.getSerializer=function(w){var v=m.resolve(gn);return h(v,w),v},p.prototype.ready=function(w){var v=this,x=v._driverSet.then(function(){return v._ready===null&&(v._ready=v._initDriver()),v._ready});return h(x,w,w),x},p.prototype.setDriver=function(w,v,x){var b=this;Gi(w)||(w=[w]);var T=this._getSupportedDrivers(w);function M(){b._config.driver=b.driver()}function B(q){return b._extend(q),M(),b._ready=b._initStorage(b._config),b._ready}function j(q){return function(){var Q=0;function ne(){for(;Q<q.length;){var ie=q[Q];return Q++,b._dbInfo=null,b._ready=null,b.getDriver(ie).then(B).catch(ne)}M();var fe=new Error("No available storage method found.");return b._driverSet=m.reject(fe),b._driverSet}return ne()}}var z=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=z.then(function(){var q=T[0];return b._dbInfo=null,b._ready=null,b.getDriver(q).then(function(Q){b._driver=Q._driver,M(),b._wrapLibraryMethodsWithReady(),b._initDriver=j(T)})}).catch(function(){M();var q=new Error("No available storage method found.");return b._driverSet=m.reject(q),b._driverSet}),h(this._driverSet,v,x),this._driverSet},p.prototype.supports=function(w){return!!Qi[w]},p.prototype._extend=function(w){yn(this,w)},p.prototype._getSupportedDrivers=function(w){for(var v=[],x=0,b=w.length;x<b;x++){var T=w[x];this.supports(T)&&v.push(T)}return v},p.prototype._wrapLibraryMethodsWithReady=function(){for(var w=0,v=wn.length;w<v;w++)Ia(this,wn[w])},p.prototype.createInstance=function(w){return new p(w)},p})(),Pa=new Ta;i.exports=Pa},{3:3}]},{},[4])(4)})});var wi=ts(()=>{});var cc={};pt(cc,{BaseProvider:()=>G,CocodaSDK:()=>qt,ConceptApiProvider:()=>Te,LabelSearchSuggestionProvider:()=>We,LobidApiProvider:()=>Ye,LocApiProvider:()=>qe,LocalMappingsProvider:()=>st,MappingsApiProvider:()=>Ie,ModApiProvider:()=>Xe,MyCoReProvider:()=>Qe,NoTApiProvider:()=>Ze,OccurrencesApiProvider:()=>$e,OlsApiProvider:()=>Ge,ReconciliationApiProvider:()=>je,SkohubProvider:()=>Je,SkosmosApiProvider:()=>He,addAllProviders:()=>lc,cdk:()=>zo,errors:()=>ge,providers:()=>Ht,utils:()=>ui});var ge={};pt(ge,{BackendError:()=>Zt,BackendUnavailableError:()=>er,CDKError:()=>me,InvalidOrMissingParameterError:()=>U,InvalidProviderError:()=>Ct,InvalidRequestError:()=>Le,MethodNotImplementedError:()=>Qt,MissingApiUrlError:()=>xe,NetworkError:()=>tr});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}},Qt=class extends me{constructor(i){var s=i,{method:e,message:r=""}=s,n=W(s,["method","message"]);n.message=`Method not implemented: ${e} (${r})`,super(n)}},U=class extends me{constructor(i){var s=i,{parameter:e,message:r=""}=s,n=W(s,["parameter","message"]);n.message=`Invalid or missing parameter: ${e} (${r})`,super(n)}},Le=class extends me{},Zt=class extends me{},er=class extends me{},tr=class extends me{},xe=class extends me{},Ct=class extends me{};function rr(t,e){return function(){return t.apply(e,arguments)}}var{toString:Ha}=Object.prototype,{getPrototypeOf:On}=Object,Or=(t=>e=>{let r=Ha.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Oe=t=>(t=t.toLowerCase(),e=>Or(e)===t),kr=t=>e=>typeof e===t,{isArray:Ot}=Array,nr=kr("undefined");function qa(t){return t!==null&&!nr(t)&&t.constructor!==null&&!nr(t.constructor)&&Ee(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var as=Oe("ArrayBuffer");function Va(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&as(t.buffer),e}var Ja=kr("string"),Ee=kr("function"),us=kr("number"),Rr=t=>t!==null&&typeof t=="object",Ka=t=>t===!0||t===!1,Cr=t=>{if(Or(t)!=="object")return!1;let e=On(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Ya=Oe("Date"),Xa=Oe("File"),Ga=Oe("Blob"),Qa=Oe("FileList"),Za=t=>Rr(t)&&Ee(t.pipe),eu=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ee(t.append)&&((e=Or(t))==="formdata"||e==="object"&&Ee(t.toString)&&t.toString()==="[object FormData]"))},tu=Oe("URLSearchParams"),[ru,nu,iu,su]=["ReadableStream","Request","Response","Headers"].map(Oe),ou=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ir(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t=="undefined")return;let n,i;if(typeof t!="object"&&(t=[t]),Ot(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{let s=r?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length,a;for(n=0;n<o;n++)a=s[n],e.call(null,t[a],a,t)}}function ls(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 mt=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,cs=t=>!nr(t)&&t!==mt;function Cn(){let{caseless:t}=cs(this)&&this||{},e={},r=(n,i)=>{let s=t&&ls(e,i)||i;Cr(e[s])&&Cr(n)?e[s]=Cn(e[s],n):Cr(n)?e[s]=Cn({},n):Ot(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&ir(arguments[n],r);return e}var au=(t,e,r,{allOwnKeys:n}={})=>(ir(e,(i,s)=>{r&&Ee(i)?t[s]=rr(i,r):t[s]=i},{allOwnKeys:n}),t),uu=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),lu=(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)},cu=(t,e,r,n)=>{let i,s,o,a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!n||n(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=r!==!1&&On(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},fu=(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},hu=t=>{if(!t)return null;if(Ot(t))return t;let e=t.length;if(!us(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},pu=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&On(Uint8Array)),du=(t,e)=>{let n=(t&&t[Symbol.iterator]).call(t),i;for(;(i=n.next())&&!i.done;){let s=i.value;e.call(t,s[0],s[1])}},mu=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},gu=Oe("HTMLFormElement"),wu=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),ss=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),yu=Oe("RegExp"),fs=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};ir(r,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(n[s]=o||i)}),Object.defineProperties(t,n)},_u=t=>{fs(t,(e,r)=>{if(Ee(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=t[r];if(Ee(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+"'")})}})},bu=(t,e)=>{let r={},n=i=>{i.forEach(s=>{r[s]=!0})};return Ot(t)?n(t):n(String(t).split(e)),r},vu=()=>{},Su=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,An="abcdefghijklmnopqrstuvwxyz",os="0123456789",hs={DIGIT:os,ALPHA:An,ALPHA_DIGIT:An+An.toUpperCase()+os},xu=(t=16,e=hs.ALPHA_DIGIT)=>{let r="",{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r};function Eu(t){return!!(t&&Ee(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}var Au=t=>{let e=new Array(10),r=(n,i)=>{if(Rr(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;let s=Ot(n)?[]:{};return ir(n,(o,a)=>{let u=r(o,i+1);!nr(u)&&(s[a]=u)}),e[i]=void 0,s}}return n};return r(t,0)},Cu=Oe("AsyncFunction"),Ou=t=>t&&(Rr(t)||Ee(t))&&Ee(t.then)&&Ee(t.catch),ps=((t,e)=>t?setImmediate:e?((r,n)=>(mt.addEventListener("message",({source:i,data:s})=>{i===mt&&s===r&&n.length&&n.shift()()},!1),i=>{n.push(i),mt.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ee(mt.postMessage)),ku=typeof queueMicrotask!="undefined"?queueMicrotask.bind(mt):typeof process!="undefined"&&process.nextTick||ps,A={isArray:Ot,isArrayBuffer:as,isBuffer:qa,isFormData:eu,isArrayBufferView:Va,isString:Ja,isNumber:us,isBoolean:Ka,isObject:Rr,isPlainObject:Cr,isReadableStream:ru,isRequest:nu,isResponse:iu,isHeaders:su,isUndefined:nr,isDate:Ya,isFile:Xa,isBlob:Ga,isRegExp:yu,isFunction:Ee,isStream:Za,isURLSearchParams:tu,isTypedArray:pu,isFileList:Qa,forEach:ir,merge:Cn,extend:au,trim:ou,stripBOM:uu,inherits:lu,toFlatObject:cu,kindOf:Or,kindOfTest:Oe,endsWith:fu,toArray:hu,forEachEntry:du,matchAll:mu,isHTMLForm:gu,hasOwnProperty:ss,hasOwnProp:ss,reduceDescriptors:fs,freezeMethods:_u,toObjectSet:bu,toCamelCase:wu,noop:vu,toFiniteNumber:Su,findKey:ls,global:mt,isContextDefined:cs,ALPHABET:hs,generateString:xu,isSpecCompliantForm:Eu,toJSONObject:Au,isAsyncFn:Cu,isThenable:Ou,setImmediate:ps,asap:ku};function kt(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)}A.inherits(kt,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:A.toJSONObject(this.config),code:this.code,status:this.status}}});var ds=kt.prototype,ms={};["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=>{ms[t]={value:t}});Object.defineProperties(kt,ms);Object.defineProperty(ds,"isAxiosError",{value:!0});kt.from=(t,e,r,n,i,s)=>{let o=Object.create(ds);return A.toFlatObject(t,o,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),kt.call(o,t.message,e,r,n,i),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};var Y=kt;var Ir=null;function kn(t){return A.isPlainObject(t)||A.isArray(t)}function ws(t){return A.endsWith(t,"[]")?t.slice(0,-2):t}function gs(t,e,r){return t?t.concat(e).map(function(i,s){return i=ws(i),!r&&s?"["+i+"]":i}).join(r?".":""):e}function Ru(t){return A.isArray(t)&&!t.some(kn)}var Iu=A.toFlatObject(A,{},null,function(e){return/^is[A-Z]/.test(e)});function Tu(t,e,r){if(!A.isObject(t))throw new TypeError("target must be an object");e=e||new(Ir||FormData),r=A.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,y){return!A.isUndefined(y[d])});let n=r.metaTokens,i=r.visitor||c,s=r.dots,o=r.indexes,u=(r.Blob||typeof Blob!="undefined"&&Blob)&&A.isSpecCompliantForm(e);if(!A.isFunction(i))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(A.isDate(h))return h.toISOString();if(!u&&A.isBlob(h))throw new Y("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(h)||A.isTypedArray(h)?u&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,d,y){let O=h;if(h&&!y&&typeof h=="object"){if(A.endsWith(d,"{}"))d=n?d:d.slice(0,-2),h=JSON.stringify(h);else if(A.isArray(h)&&Ru(h)||(A.isFileList(h)||A.endsWith(d,"[]"))&&(O=A.toArray(h)))return d=ws(d),O.forEach(function(C,L){!(A.isUndefined(C)||C===null)&&e.append(o===!0?gs([d],L,s):o===null?d:d+"[]",l(C))}),!1}return kn(h)?!0:(e.append(gs(y,d,s),l(h)),!1)}let f=[],m=Object.assign(Iu,{defaultVisitor:c,convertValue:l,isVisitable:kn});function g(h,d){if(!A.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+d.join("."));f.push(h),A.forEach(h,function(O,R){(!(A.isUndefined(O)||O===null)&&i.call(e,O,A.isString(R)?R.trim():R,d,m))===!0&&g(O,d?d.concat(R):[R])}),f.pop()}}if(!A.isObject(t))throw new TypeError("data must be an object");return g(t),e}var nt=Tu;function ys(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function _s(t,e){this._pairs=[],t&&nt(t,this,e)}var bs=_s.prototype;bs.append=function(e,r){this._pairs.push([e,r])};bs.toString=function(e){let r=e?function(n){return e.call(this,n,ys)}:ys;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};var Tr=_s;function Pu(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function sr(t,e,r){if(!e)return t;let n=r&&r.encode||Pu;A.isFunction(r)&&(r={serialize:r});let i=r&&r.serialize,s;if(i?s=i(e,r):s=A.isURLSearchParams(e)?e.toString():new Tr(e,r).toString(n),s){let o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}var Rn=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){A.forEach(this.handlers,function(n){n!==null&&e(n)})}},In=Rn;var Pr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var vs=typeof URLSearchParams!="undefined"?URLSearchParams:Tr;var Ss=typeof FormData!="undefined"?FormData:null;var xs=typeof Blob!="undefined"?Blob:null;var Es={isBrowser:!0,classes:{URLSearchParams:vs,FormData:Ss,Blob:xs},protocols:["http","https","file","blob","url","data"]};var Dn={};pt(Dn,{hasBrowserEnv:()=>Pn,hasStandardBrowserEnv:()=>Du,hasStandardBrowserWebWorkerEnv:()=>Mu,navigator:()=>Tn,origin:()=>Nu});var Pn=typeof window!="undefined"&&typeof document!="undefined",Tn=typeof navigator=="object"&&navigator||void 0,Du=Pn&&(!Tn||["ReactNative","NativeScript","NS"].indexOf(Tn.product)<0),Mu=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Nu=Pn&&window.location.href||"http://localhost";var ue=I(I({},Dn),Es);function Mn(t,e){return nt(t,new ue.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,s){return ue.isNode&&A.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Lu(t){return A.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Fu(t){let e={},r=Object.keys(t),n,i=r.length,s;for(n=0;n<i;n++)s=r[n],e[s]=t[s];return e}function Bu(t){function e(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&&A.isArray(i)?i.length:o,u?(A.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a):((!i[o]||!A.isObject(i[o]))&&(i[o]=[]),e(r,n,i[o],s)&&A.isArray(i[o])&&(i[o]=Fu(i[o])),!a)}if(A.isFormData(t)&&A.isFunction(t.entries)){let r={};return A.forEachEntry(t,(n,i)=>{e(Lu(n),i,r,0)}),r}return null}var Dr=Bu;function ju(t,e,r){if(A.isString(t))try{return(e||JSON.parse)(t),A.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Nn={transitional:Pr,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let n=r.getContentType()||"",i=n.indexOf("application/json")>-1,s=A.isObject(e);if(s&&A.isHTMLForm(e)&&(e=new FormData(e)),A.isFormData(e))return i?JSON.stringify(Dr(e)):e;if(A.isArrayBuffer(e)||A.isBuffer(e)||A.isStream(e)||A.isFile(e)||A.isBlob(e)||A.isReadableStream(e))return e;if(A.isArrayBufferView(e))return e.buffer;if(A.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Mn(e,this.formSerializer).toString();if((a=A.isFileList(e))||n.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return nt(a?{"files[]":e}:e,u&&new u,this.formSerializer)}}return s||i?(r.setContentType("application/json",!1),ju(e)):e}],transformResponse:[function(e){let r=this.transitional||Nn.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(A.isResponse(e)||A.isReadableStream(e))return e;if(e&&A.isString(e)&&(n&&!this.responseType||i)){let o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?Y.from(a,Y.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ue.classes.FormData,Blob:ue.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],t=>{Nn.headers[t]={}});var Rt=Nn;var Uu=A.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"]),As=t=>{let e={},r,n,i;return t&&t.split(`
|
|
9
|
+
`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||e[r]&&Uu[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e};var Cs=Symbol("internals");function or(t){return t&&String(t).trim().toLowerCase()}function Mr(t){return t===!1||t==null?t:A.isArray(t)?t.map(Mr):String(t)}function zu(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 $u=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ln(t,e,r,n,i){if(A.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!A.isString(e)){if(A.isString(n))return e.indexOf(n)!==-1;if(A.isRegExp(n))return n.test(e)}}function Wu(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Hu(t,e){let r=A.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,s,o){return this[n].call(this,e,i,s,o)},configurable:!0})})}var It=class{constructor(e){e&&this.set(e)}set(e,r,n){let i=this;function s(a,u,l){let c=or(u);if(!c)throw new Error("header name must be a non-empty string");let f=A.findKey(i,c);(!f||i[f]===void 0||l===!0||l===void 0&&i[f]!==!1)&&(i[f||u]=Mr(a))}let o=(a,u)=>A.forEach(a,(l,c)=>s(l,c,u));if(A.isPlainObject(e)||e instanceof this.constructor)o(e,r);else if(A.isString(e)&&(e=e.trim())&&!$u(e))o(As(e),r);else if(A.isHeaders(e))for(let[a,u]of e.entries())s(u,a,n);else e!=null&&s(r,e,n);return this}get(e,r){if(e=or(e),e){let n=A.findKey(this,e);if(n){let i=this[n];if(!r)return i;if(r===!0)return zu(i);if(A.isFunction(r))return r.call(this,i,n);if(A.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=or(e),e){let n=A.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Ln(this,this[n],n,r)))}return!1}delete(e,r){let n=this,i=!1;function s(o){if(o=or(o),o){let a=A.findKey(n,o);a&&(!r||Ln(n,n[a],a,r))&&(delete n[a],i=!0)}}return A.isArray(e)?e.forEach(s):s(e),i}clear(e){let r=Object.keys(this),n=r.length,i=!1;for(;n--;){let s=r[n];(!e||Ln(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){let r=this,n={};return A.forEach(this,(i,s)=>{let o=A.findKey(n,s);if(o){r[o]=Mr(i),delete r[s];return}let a=e?Wu(s):String(s).trim();a!==s&&delete r[s],r[a]=Mr(i),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let r=Object.create(null);return A.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&A.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[Cs]=this[Cs]={accessors:{}}).accessors,i=this.prototype;function s(o){let a=or(o);n[a]||(Hu(i,o),n[a]=!0)}return A.isArray(e)?e.forEach(s):s(e),this}};It.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);A.reduceDescriptors(It.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});A.freezeMethods(It);var de=It;function ar(t,e){let r=this||Rt,n=e||r,i=de.from(n.headers),s=n.data;return A.forEach(t,function(a){s=a.call(r,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function ur(t){return!!(t&&t.__CANCEL__)}function Os(t,e,r){Y.call(this,t==null?"canceled":t,Y.ERR_CANCELED,e,r),this.name="CanceledError"}A.inherits(Os,Y,{__CANCEL__:!0});var Fe=Os;function lr(t,e,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(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 Fn(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function qu(t,e){t=t||10;let r=new Array(t),n=new Array(t),i=0,s=0,o;return e=e!==void 0?e:1e3,function(u){let l=Date.now(),c=n[s];o||(o=l),r[i]=u,n[i]=l;let f=s,m=0;for(;f!==i;)m+=r[f++],f=f%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),l-o<e)return;let g=c&&l-c;return g?Math.round(m*1e3/g):void 0}}var ks=qu;function Vu(t,e){let r=0,n=1e3/e,i,s,o=(l,c=Date.now())=>{r=c,i=null,s&&(clearTimeout(s),s=null),t.apply(null,l)};return[(...l)=>{let c=Date.now(),f=c-r;f>=n?o(l,c):(i=l,s||(s=setTimeout(()=>{s=null,o(i)},n-f)))},()=>i&&o(i)]}var Rs=Vu;var Tt=(t,e,r=3)=>{let n=0,i=ks(50,250);return Rs(s=>{let o=s.loaded,a=s.lengthComputable?s.total:void 0,u=o-n,l=i(u),c=o<=a;n=o;let f={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,[e?"download":"upload"]:!0};t(f)},r)},Bn=(t,e)=>{let r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},jn=t=>(...e)=>A.asap(()=>t(...e));var Is=ue.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,ue.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(ue.origin),ue.navigator&&/(msie|trident)/i.test(ue.navigator.userAgent)):()=>!0;var Ts=ue.hasStandardBrowserEnv?{write(t,e,r,n,i,s){let o=[t+"="+encodeURIComponent(e)];A.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),A.isString(n)&&o.push("path="+n),A.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.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 Un(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function zn(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function cr(t,e){return t&&!Un(e)?zn(t,e):e}var Ps=t=>t instanceof de?I({},t):t;function ke(t,e){e=e||{};let r={};function n(l,c,f,m){return A.isPlainObject(l)&&A.isPlainObject(c)?A.merge.call({caseless:m},l,c):A.isPlainObject(c)?A.merge({},c):A.isArray(c)?c.slice():c}function i(l,c,f,m){if(A.isUndefined(c)){if(!A.isUndefined(l))return n(void 0,l,f,m)}else return n(l,c,f,m)}function s(l,c){if(!A.isUndefined(c))return n(void 0,c)}function o(l,c){if(A.isUndefined(c)){if(!A.isUndefined(l))return n(void 0,l)}else return n(void 0,c)}function a(l,c,f){if(f in e)return n(l,c);if(f in t)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,f)=>i(Ps(l),Ps(c),f,!0)};return A.forEach(Object.keys(Object.assign({},t,e)),function(c){let f=u[c]||i,m=f(t[c],e[c],c);A.isUndefined(m)&&f!==a||(r[c]=m)}),r}var Nr=t=>{let e=ke({},t),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=e;e.headers=o=de.from(o),e.url=sr(cr(e.baseURL,e.url),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let u;if(A.isFormData(r)){if(ue.hasStandardBrowserEnv||ue.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){let[l,...c]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...c].join("; "))}}if(ue.hasStandardBrowserEnv&&(n&&A.isFunction(n)&&(n=n(e)),n||n!==!1&&Is(e.url))){let l=i&&s&&Ts.read(s);l&&o.set(i,l)}return e};var Ju=typeof XMLHttpRequest!="undefined",Ds=Ju&&function(t){return new Promise(function(r,n){let i=Nr(t),s=i.data,o=de.from(i.headers).normalize(),{responseType:a,onUploadProgress:u,onDownloadProgress:l}=i,c,f,m,g,h;function d(){g&&g(),h&&h(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function O(){if(!y)return;let C=de.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),N={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:C,config:t,request:y};lr(function(k){r(k),d()},function(k){n(k),d()},N),y=null}"onloadend"in y?y.onloadend=O:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(O)},y.onabort=function(){y&&(n(new Y("Request aborted",Y.ECONNABORTED,t,y)),y=null)},y.onerror=function(){n(new Y("Network Error",Y.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let L=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",N=i.transitional||Pr;i.timeoutErrorMessage&&(L=i.timeoutErrorMessage),n(new Y(L,N.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,t,y)),y=null},s===void 0&&o.setContentType(null),"setRequestHeader"in y&&A.forEach(o.toJSON(),function(L,N){y.setRequestHeader(N,L)}),A.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),a&&a!=="json"&&(y.responseType=i.responseType),l&&([m,h]=Tt(l,!0),y.addEventListener("progress",m)),u&&y.upload&&([f,g]=Tt(u),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(c=C=>{y&&(n(!C||C.type?new Fe(null,t,y):C),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));let R=Fn(i.url);if(R&&ue.protocols.indexOf(R)===-1){n(new Y("Unsupported protocol "+R+":",Y.ERR_BAD_REQUEST,t));return}y.send(s||null)})};var Ku=(t,e)=>{let{length:r}=t=t?t.filter(Boolean):[];if(e||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 Fe(c instanceof Error?c.message:c))}},o=e&&setTimeout(()=>{o=null,s(new Y(`timeout ${e} of ms exceeded`,Y.ETIMEDOUT))},e),a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),t=null)};t.forEach(l=>l.addEventListener("abort",s));let{signal:u}=n;return u.unsubscribe=()=>A.asap(a),u}},Ms=Ku;var Yu=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},Xu=function(t,e){return xn(this,null,function*(){try{for(var r=is(Gu(t)),n,i,s;n=!(i=yield new dt(r.next())).done;n=!1){let o=i.value;yield*En(Yu(o,e))}}catch(i){s=[i]}finally{try{n&&(i=r.return)&&(yield new dt(i.call(r)))}finally{if(s)throw s[0]}}})},Gu=function(t){return xn(this,null,function*(){if(t[Symbol.asyncIterator]){yield*En(t);return}let e=t.getReader();try{for(;;){let{done:r,value:n}=yield new dt(e.read());if(r)break;yield n}}finally{yield new dt(e.cancel())}})},$n=(t,e,r,n)=>{let i=Xu(t,e),s=0,o,a=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({pull(l){return E(this,null,function*(){try{let{done:c,value:f}=yield i.next();if(c){a(),l.close();return}let m=f.byteLength;if(r){let g=s+=m;r(g)}l.enqueue(new Uint8Array(f))}catch(c){throw a(c),c}})},cancel(l){return a(l),i.return()}},{highWaterMark:2})};var Fr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ls=Fr&&typeof ReadableStream=="function",Qu=Fr&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):t=>E(null,null,function*(){return new Uint8Array(yield new Response(t).arrayBuffer())})),Fs=(t,...e)=>{try{return!!t(...e)}catch(r){return!1}},Zu=Ls&&Fs(()=>{let t=!1,e=new Request(ue.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Ns=64*1024,Wn=Ls&&Fs(()=>A.isReadableStream(new Response("").body)),Lr={stream:Wn&&(t=>t.body)};Fr&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Lr[e]&&(Lr[e]=A.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new Y(`Response type '${e}' is not supported`,Y.ERR_NOT_SUPPORT,n)})})})(new Response);var el=t=>E(null,null,function*(){if(t==null)return 0;if(A.isBlob(t))return t.size;if(A.isSpecCompliantForm(t))return(yield new Request(ue.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(A.isArrayBufferView(t)||A.isArrayBuffer(t))return t.byteLength;if(A.isURLSearchParams(t)&&(t=t+""),A.isString(t))return(yield Qu(t)).byteLength}),tl=(t,e)=>E(null,null,function*(){let r=A.toFiniteNumber(t.getContentLength());return r==null?el(e):r}),Bs=Fr&&(t=>E(null,null,function*(){let{url:e,method:r,data:n,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:u,responseType:l,headers:c,withCredentials:f="same-origin",fetchOptions:m}=Nr(t);l=l?(l+"").toLowerCase():"text";let g=Ms([i,s&&s.toAbortSignal()],o),h,d=g&&g.unsubscribe&&(()=>{g.unsubscribe()}),y;try{if(u&&Zu&&r!=="get"&&r!=="head"&&(y=yield tl(c,n))!==0){let N=new Request(e,{method:"POST",body:n,duplex:"half"}),S;if(A.isFormData(n)&&(S=N.headers.get("content-type"))&&c.setContentType(S),N.body){let[k,D]=Bn(y,Tt(jn(u)));n=$n(N.body,Ns,k,D)}}A.isString(f)||(f=f?"include":"omit");let O="credentials"in Request.prototype;h=new Request(e,F(I({},m),{signal:g,method:r.toUpperCase(),headers:c.normalize().toJSON(),body:n,duplex:"half",credentials:O?f:void 0}));let R=yield fetch(h),C=Wn&&(l==="stream"||l==="response");if(Wn&&(a||C&&d)){let N={};["status","statusText","headers"].forEach($=>{N[$]=R[$]});let S=A.toFiniteNumber(R.headers.get("content-length")),[k,D]=a&&Bn(S,Tt(jn(a),!0))||[];R=new Response($n(R.body,Ns,k,()=>{D&&D(),d&&d()}),N)}l=l||"text";let L=yield Lr[A.findKey(Lr,l)||"text"](R,t);return!C&&d&&d(),yield new Promise((N,S)=>{lr(N,S,{data:L,headers:de.from(R.headers),status:R.status,statusText:R.statusText,config:t,request:h})})}catch(O){throw d&&d(),O&&O.name==="TypeError"&&/fetch/i.test(O.message)?Object.assign(new Y("Network Error",Y.ERR_NETWORK,t,h),{cause:O.cause||O}):Y.from(O,O&&O.code,t,h)}}));var Hn={http:Ir,xhr:Ds,fetch:Bs};A.forEach(Hn,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(r){}Object.defineProperty(t,"adapterName",{value:e})}});var js=t=>`- ${t}`,rl=t=>A.isFunction(t)||t===null||t===!1,Br={getAdapter:t=>{t=A.isArray(t)?t:[t];let{length:e}=t,r,n,i={};for(let s=0;s<e;s++){r=t[s];let o;if(n=r,!rl(r)&&(n=Hn[(o=String(r)).toLowerCase()],n===void 0))throw new Y(`Unknown adapter '${o}'`);if(n)break;i[o||"#"+s]=n}if(!n){let s=Object.entries(i).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build")),o=e?s.length>1?`since :
|
|
11
|
+
`+s.map(js).join(`
|
|
12
|
+
`):" "+js(s[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:Hn};function qn(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Fe(null,t)}function jr(t){return qn(t),t.headers=de.from(t.headers),t.data=ar.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Br.getAdapter(t.adapter||Rt.adapter)(t).then(function(n){return qn(t),n.data=ar.call(t,t.transformResponse,n),n.headers=de.from(n.headers),n},function(n){return ur(n)||(qn(t),n&&n.response&&(n.response.data=ar.call(t,t.transformResponse,n.response),n.response.headers=de.from(n.response.headers))),Promise.reject(n)})}var Ur="1.7.9";var zr={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{zr[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var Us={};zr.transitional=function(e,r,n){function i(s,o){return"[Axios v"+Ur+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,a)=>{if(e===!1)throw new Y(i(o," has been removed"+(r?" in "+r:"")),Y.ERR_DEPRECATED);return r&&!Us[o]&&(Us[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,o,a):!0}};zr.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function nl(t,e,r){if(typeof t!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);let n=Object.keys(t),i=n.length;for(;i-- >0;){let s=n[i],o=e[s];if(o){let a=t[s],u=a===void 0||o(a,s,t);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 fr={assertOptions:nl,validators:zr};var Be=fr.validators,Pt=class{constructor(e){this.defaults=e,this.interceptors={request:new In,response:new In}}request(e,r){return E(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 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(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=ke(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&fr.assertOptions(n,{silentJSONParsing:Be.transitional(Be.boolean),forcedJSONParsing:Be.transitional(Be.boolean),clarifyTimeoutError:Be.transitional(Be.boolean)},!1),i!=null&&(A.isFunction(i)?r.paramsSerializer={serialize:i}:fr.assertOptions(i,{encode:Be.function,serialize:Be.function},!0)),fr.assertOptions(r,{baseUrl:Be.spelling("baseURL"),withXsrfToken:Be.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&A.merge(s.common,s[r.method]);s&&A.forEach(["delete","get","head","post","put","patch","common"],h=>{delete s[h]}),r.headers=de.concat(o,s);let a=[],u=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(r)===!1||(u=u&&d.synchronous,a.unshift(d.fulfilled,d.rejected))});let l=[];this.interceptors.response.forEach(function(d){l.push(d.fulfilled,d.rejected)});let c,f=0,m;if(!u){let h=[jr.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,l),m=h.length,c=Promise.resolve(r);f<m;)c=c.then(h[f++],h[f++]);return c}m=a.length;let g=r;for(f=0;f<m;){let h=a[f++],d=a[f++];try{g=h(g)}catch(y){d.call(this,y);break}}try{c=jr.call(this,g)}catch(h){return Promise.reject(h)}for(f=0,m=l.length;f<m;)c=c.then(l[f++],l[f++]);return c}getUri(e){e=ke(this.defaults,e);let r=cr(e.baseURL,e.url);return sr(r,e.params,e.paramsSerializer)}};A.forEach(["delete","get","head","options"],function(e){Pt.prototype[e]=function(r,n){return this.request(ke(n||{},{method:e,url:r,data:(n||{}).data}))}});A.forEach(["post","put","patch"],function(e){function r(n){return function(s,o,a){return this.request(ke(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Pt.prototype[e]=r(),Pt.prototype[e+"Form"]=r(!0)});var hr=Pt;var Vn=class t{constructor(e){if(typeof e!="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},e(function(s,o,a){n.reason||(n.reason=new Fe(s,o,a),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}}},zs=Vn;function Jn(t){return function(r){return t.apply(null,r)}}function Kn(t){return A.isObject(t)&&t.isAxiosError===!0}var Yn={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(Yn).forEach(([t,e])=>{Yn[e]=t});var $s=Yn;function Ws(t){let e=new hr(t),r=rr(hr.prototype.request,e);return A.extend(r,hr.prototype,e,{allOwnKeys:!0}),A.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return Ws(ke(t,i))},r}var he=Ws(Rt);he.Axios=hr;he.CanceledError=Fe;he.CancelToken=zs;he.isCancel=ur;he.VERSION=Ur;he.toFormData=nt;he.AxiosError=Y;he.Cancel=he.CanceledError;he.all=function(e){return Promise.all(e)};he.spread=Jn;he.isAxiosError=Kn;he.mergeConfig=ke;he.AxiosHeaders=de;he.formToJSON=t=>Dr(A.isHTMLForm(t)?new FormData(t):t);he.getAdapter=Br.getAdapter;he.HttpStatusCode=$s;he.default=he;var pe=he;var{Axios:vp,AxiosError:Sp,CanceledError:xp,isCancel:Ep,CancelToken:Ap,VERSION:Cp,all:Op,Cancel:kp,isAxiosError:Rp,spread:Ip,toFormData:Tp,AxiosHeaders:Pp,HttpStatusCode:Dp,formToJSON:Mp,getAdapter:Np,mergeConfig:Lp}=pe;var il=/[\\^$.*+?()[\]{}|]/g,sl=t=>t.replace(il,"\\$&"),ol=/[%ÄÖÜäöü ]/g,Xn=class{constructor(e={}){if(Object.assign(this,e),this.notationPattern||(this.notationPattern=".+"),!this.uriPattern&&this.namespace){this.uriPattern="^"+sl(this.namespace);let r=this.notationPattern.replace(ol,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)}},$r=Xn;function Dt(t,e,r){let n=Array.prototype.slice,i=typeof Object.keys=="function"?Object.keys:function(l){let c=[];for(let f in l)c.push(f);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 f,m,g,h;try{f=i(l),m=i(c)}catch(d){return!1}if(f.length!=m.length)return!1;for(f.sort(),m.sort(),h=f.length-1;h>=0;h--)if(f[h]!=m[h])return!1;for(h=f.length-1;h>=0;h--)if(g=f[h],r){let d=r(l[g],c[g],g);if(d===void 0&&(d=Dt(l[g],c[g])),!d)return!1}else if(!s(l[g],c[g]))return!1;return!0}return s(t,e)}function te(t,e,r=void 0){let n=s=>String.prototype.split.call(e,s).filter(Boolean).reduce((o,a)=>o!=null?o[a]:o,t),i=n(/[,[\]]+?/)||n(/[,[\].]+?/);return i===void 0||i===t?r:i}function Mt(t,e){return e.reduce((r,n)=>(t&&t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}function pr(t,e){for(let r in t)t.hasOwnProperty(r)&&e(t[r],r)}function Nt(t){return typeof t=="object"&&t!==null}function dr(t){return!!(t&&typeof t.valueOf()=="string")}function Hs(t,e){return[...new Set([...t,...e])]}function qs(t,e,r){return[...t,...e].reduce((n,i)=>(n.findIndex(s=>r(s,i))!==-1||n.push(i),n),[])}function Vs(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 Wr={store:null,path:"",defaults:["en"],getLanguages:Ks,selectLanguage:al};function Ks(){return te(Wr.store,Wr.path)||Wr.defaults}function al(t){if(!t)return null;for(let e of Ks())if(t[e])return e;for(let e of Object.keys(t))if(e!="-")return e;return null}var Hr=Wr;var ei={};pt(ei,{addMappingIdentifiers:()=>Qn,compareMappingContent:()=>ul,compareMappingMembers:()=>ll,compareMappings:()=>ro,mappingContent:()=>Gs,mappingContentIdentifier:()=>Zs,mappingMembers:()=>Qs,mappingMembersIdentifier:()=>eo});function Gn(t){var e=function(L,N){var S=L<<N|L>>>32-N;return S},r=function(L){var N="",S,k;for(S=7;S>=0;S--)k=L>>>S*4&15,N+=k.toString(16);return N},n,i,s,o=new Array(80),a=1732584193,u=4023233417,l=2562383102,c=271733878,f=3285377520,m,g,h,d,y,O;t=unescape(encodeURIComponent(t));var R=t.length,C=[];for(i=0;i<R-3;i+=4)s=t.charCodeAt(i)<<24|t.charCodeAt(i+1)<<16|t.charCodeAt(i+2)<<8|t.charCodeAt(i+3),C.push(s);switch(R%4){case 0:i=2147483648;break;case 1:i=t.charCodeAt(R-1)<<24|8388608;break;case 2:i=t.charCodeAt(R-2)<<24|t.charCodeAt(R-1)<<16|32768;break;case 3:i=t.charCodeAt(R-3)<<24|t.charCodeAt(R-2)<<16|t.charCodeAt(R-1)<<8|128;break}for(C.push(i);C.length%16!==14;)C.push(0);for(C.push(R>>>29),C.push(R<<3&4294967295),n=0;n<C.length;n+=16){for(i=0;i<16;i++)o[i]=C[n+i];for(i=16;i<=79;i++)o[i]=e(o[i-3]^o[i-8]^o[i-14]^o[i-16],1);for(m=a,g=u,h=l,d=c,y=f,i=0;i<=19;i++)O=e(m,5)+(g&h|~g&d)+y+o[i]+1518500249&4294967295,y=d,d=h,h=e(g,30),g=m,m=O;for(i=20;i<=39;i++)O=e(m,5)+(g^h^d)+y+o[i]+1859775393&4294967295,y=d,d=h,h=e(g,30),g=m,m=O;for(i=40;i<=59;i++)O=e(m,5)+(g&h|g&d|h&d)+y+o[i]+2400959708&4294967295,y=d,d=h,h=e(g,30),g=m,m=O;for(i=60;i<=79;i++)O=e(m,5)+(g^h^d)+y+o[i]+3395469782&4294967295,y=d,d=h,h=e(g,30),g=m,m=O;a=a+m&4294967295,u=u+g&4294967295,l=l+h&4294967295,c=c+d&4294967295,f=f+y&4294967295}return O=r(a)+r(u)+r(l)+r(c)+r(f),O.toLowerCase()}function Xs(t){return t.map(e=>e&&e.uri).filter(Boolean)}function Zn(t){return["memberSet","memberList","memberChoice"].find(e=>t[e])}function Ys(t){let e=Zn(t),r=t[e]?Xs(t[e]):[];return{[r.length>1?e:"memberSet"]:r.map(n=>({uri:n}))}}function Gs(t){let{from:e,to:r,type:n}=t,i={from:Ys(e||{}),to:Ys(r||{}),type:[n&&n[0]||"http://www.w3.org/2004/02/skos/core#mappingRelation"]};for(let s of["from","to"])if((i[s][Zn(i[s])]||[]).length==0){let o=t[s+"Scheme"];o&&o.uri&&(i[s+"Scheme"]={uri:o.uri})}return i}function Qs(t){let{from:e,to:r}=t,n=[e,r].filter(Boolean).map(i=>Xs(i[Zn(i)]||[]));return[].concat(...n).sort()}function Zs(t){let e=JSON.stringify(Gs(t),["from","fromScheme","to","toScheme","type","memberSet","memberList","memberChoice","uri"]);return"urn:jskos:mapping:content:"+Gn(e+`
|
|
14
|
+
`)}function eo(t){let e=JSON.stringify(Qs(t));return"urn:jskos:mapping:members:"+Gn(e+`
|
|
15
|
+
`)}function Qn(t){let e=(t.identifier||[]).filter(r=>r&&!r.startsWith("urn:jskos:mapping:")).concat([eo(t),Zs(t)]).sort();return Object.assign({},t,{identifier:e})}function to(t,e,r){t=t&&Qn(t),e=e&&Qn(e);let n=t&&t.identifier?t.identifier.find(s=>s.startsWith(r)):null,i=e&&e.identifier?e.identifier.find(s=>s.startsWith(r)):null;return n==i}function ro(t,e){return to(t,e,"urn:jskos:mapping:content:")}var ul=ro;function ll(t,e){return to(t,e,"urn:jskos:mapping:members:")}var si={};pt(si,{addContext:()=>fl,annotationCreatorMatches:()=>Ll,annotationCreatorName:()=>Nl,annotationCreatorUri:()=>Ml,clean:()=>ni,cleanJSKOS:()=>hl,compare:()=>it,compareConcepts:()=>gl,compareFunctions:()=>Rl,compareMappingsDeep:()=>Cl,compareObjects:()=>dl,compareSchemes:()=>ml,conceptsOfMapping:()=>gt,copyDeep:()=>Jr,deepCopy:()=>pl,defaultMappingType:()=>oo,definition:()=>Pl,flattenMapping:()=>xl,getAllUris:()=>ti,guessObjectType:()=>Vr,guessSchemeFromNotation:()=>Fl,isConcept:()=>wl,isContainedIn:()=>so,isScheme:()=>io,isSchemeInList:()=>yl,isValidUri:()=>kl,languageMapContent:()=>ii,mappingCSV:()=>Al,mappingRegistryIsStored:()=>Dl,mappingTypeByType:()=>Sl,mappingTypeByUri:()=>wr,mappingTypes:()=>mr,matchObjectTypes:()=>Ol,merge:()=>lo,mergeUris:()=>uo,minifyMapping:()=>vl,normalize:()=>ri,notation:()=>Tl,objectTypes:()=>gr,prefLabel:()=>Ft,sortConcepts:()=>_l,sortSchemes:()=>bl,usedObjectTypes:()=>no,userOwnsMapping:()=>Il});var mr=[{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 gr={Concept:{type:["http://www.w3.org/2004/02/skos/core#Concept"]},ConceptScheme:{type:["http://www.w3.org/2004/02/skos/core#ConceptScheme"]},ConceptMapping:{type:mr.map(t=>t.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"]}},qr=Object.keys(gr).reduce((t,e)=>{for(let r of gr[e].type||[])t[r]=e;return t},{});function Vr(t,e=!1){let r;if(typeof t=="string"&&t)t in qr?r=qr[t]:(t=t.toLowerCase().replace(/s$/,""),r=Object.keys(gr).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 qr){r=qr[i];break}}return e&&r?r.toLowerCase().replace(/^concept(.+)/,"$1"):r}function no(t){var n;let e=[],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=t[i])!=null&&n.find(s=>s!==null)&&e.push(r[i]);return e.sort()}var cl=t=>/^[A-Z]*$/.test(t),Lt=(t,e)=>e.split(".").reduce((r,n)=>r&&r[n]?r[n]:null,t),fl=t=>((t instanceof Array?t:[t]).forEach(r=>{r["@context"]="https://gbv.github.io/jskos/context.json"}),t),ni=t=>(Object.keys(t).forEach(e=>{cl(e)||e.startsWith("_")?delete t[e]:t[e]!=null&&typeof t[e]=="object"&&(t[e]=ni(t[e]))}),t),hl=ni,Jr=(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 s=[];for(let o of t.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}t[i]!=null&&typeof t[i]=="object"?n[i]=Jr(t[i]):n[i]=t[i]}return n},pl=Jr,ti=t=>t?(t.uri?[t.uri]:[]).concat(t.identifier||[]).filter(Boolean):[],it=(t,e)=>{if(t==null&&e==null)return!0;let r=i=>i.replace("https://","http://"),n=ti(t).map(r);for(let i of ti(e).map(r))if(n.indexOf(i)!==-1)return!0;return!1},dl=it,ml=it,gl=it,wl=t=>{var e;return((e=te(t,"type",[]))==null?void 0:e.includes("http://www.w3.org/2004/02/skos/core#Concept"))||te(t,"inScheme")!=null||te(t,"topConceptOf")!=null},io=t=>{var e;return(e=te(t,"type",[]))==null?void 0:e.includes("http://www.w3.org/2004/02/skos/core#ConceptScheme")},so=(t,e)=>{if(!t||!e)return!1;for(let r of e)if(it(t,r))return!0;return!1},yl=so,_l=(t,e=!1)=>t.sort((r,n)=>{let i=te(r,"notation[0]"),s=te(n,"notation[0]");if(i&&s&&(i=i.toLowerCase(),s=s.toLowerCase()),e&&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}),bl=t=>{let e=["notation[0]",["prefLabel.de","prefLabel.en"],"uri"];return t.sort((r,n)=>{for(let i of e){let s,o;if(Array.isArray(i))for(let a of i)s=s||te(r,a),o=o||te(n,a);else s=te(r,i),o=te(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})},vl=t=>{let e=Mt(Jr(t),["from","to","fromScheme","toScheme","creator","contributor","type","created","modified","note","identifier","uri","partOf","mappingRelevance"]);for(let r of[e.from,e.to])pr(r,(n,i)=>{let s=[];for(let o of n)s.push(Mt(o,["uri","notation"]));r[i]=s});return e.fromScheme&&(e.fromScheme=Mt(e.fromScheme,["uri","notation"])),e.toScheme&&(e.toScheme=Mt(e.toScheme,["uri","notation"])),e.partOf&&(e.partOf=e.partOf.map(r=>Mt(r,["uri"]))),e},wr=function(t){for(let e of mr)if(t==e.uri)return e;return null},oo=wr("http://www.w3.org/2004/02/skos/core#mappingRelation"),Sl=function(t,e=oo){let r;return Array.isArray(t)&&t.length>0?r=t[0]:r=t,wr(r)||e},xl=(t,e={})=>{let{language:r}=e,n=Lt(t,"from.memberSet.0.notation.0"),i=Lt(t,"to.memberSet.0.notation.0");n=n!==null?n:"",i=i!==null?i:"";let s=wr(Lt(t,"type.0"));s=s?s.SHORT:"";let o=Ft(Lt(t,"from.memberSet.0"),{language:r,fallbackToUri:!1})||"",a=Ft(Lt(t,"to.memberSet.0"),{language:r,fallbackToUri:!1})||"",u=Ft(Lt(t,"creator.0"),{language:r,fallbackToUri:!1})||"";return{fromNotation:n,toNotation:i,fromLabel:o,toLabel:a,type:s,creator:u}},El=(t={})=>{let e=t.delimiter||",",r=t.quoteChar||'"',n=t.lineTerminator||`
|
|
16
|
+
`,i=r+r,s=o=>r+(o==null?"":o.split(r).join(i))+r;return o=>o.map(s).join(e)+n},gt=(t,e)=>{let r=[];for(let n of["from","to"])(e==null||n===e)&&(r=r.concat(te(t,`${n}.memberSet`)||te(t,`${n}.memberChoice`)||te(t,`${n}.memberList`)||[]));return r.filter(n=>n!=null)},Al=(t={})=>{let e=El(t),r=t.language||"en";t.type==null&&(t.type=!0);let n=o=>{o=o||[];let a=[];for(let u of["from","to"]){t.schemes&&a.push(`${u}Scheme`);let l=Math.max(...o.map(c=>gt(c,u).length),1);for(let c=0;c<l;c+=1)a.push(`${u}Notation${c?c+1:""}`),t.labels&&a.push(`${u}Label${c?c+1:""}`)}return t.type&&a.push("type"),t.creator&&a.push("creator"),e(a)},i=(o,a={})=>{let u=[];for(let l of["from","to"]){t.schemes&&u.push(te(o,`${l}Scheme.notation[0]`,""));let c=gt(o,l),f=a[`${l}Count`];f==null&&(f=c.length),f=Math.max(f,1);for(let m=0;m<f;m+=1)u.push(te(c[m],"notation[0]","")),t.labels&&u.push(Ft(c[m],{language:r,fallbackToUri:!1}))}return t.type&&u.push(te(wr(te(o,"type[0]")),"SHORT","")),t.creator&&u.push(Ft(te(o,"creator[0]"),{language:r,fallbackToUri:!1})),e(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=>gt(c,"from").length)),toCount:Math.max(...o.map(c=>gt(c,"to").length))};for(let c of o)u+=i(c,l);return u}}};function Cl(t,e){return Dt(t,e,(r,n,i)=>{let s={[i]:r},o={[i]:n};if(i=="from"||i=="to")return Dt(Object.getOwnPropertyNames(te(r,i,{})),Object.getOwnPropertyNames(te(n,i,{})))?Dt(gt(s,i),gt(o,i),(a,u,l)=>{if(l!=null)return it(a,u)}):!1;if(i=="fromScheme"||i=="toScheme")return it(r,n)})}var Ol=(t,e)=>{let r=Vr(t),n=Vr(e);return!(r&&n&&r!=n)},ao=t=>{Array.isArray(t)&&t.sort((e,r)=>e===null?1:r===null?-1:0)},uo=(t,e)=>(!t||!e||((Array.isArray(t.identifier)||Array.isArray(e.identifier))&&(t.identifier=Hs(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,ao(t.identifier)),t),lo=(t,e,r)=>{if(!t||!e)return t||e;r=r||{};let n=r._path||"",i=r.detectMismatch||[],s=r.skipPaths||[],o={};return pr(t,(a,u)=>{if(!s.includes(n+u))if(Array.isArray(a)&&Array.isArray(e[u]))o[u]=qs(a,e[u],(l,c)=>Nt(l)&&Nt(c)?it(l,c):l===c),ao(o[u]);else if(Nt(a)&&Nt(e[u]))o[u]=lo(a,e[u],Object.assign({_path:`${n}${u}.`},r));else{if(a&&e[u]&&i.includes(n+u)&&!Dt(a,e[u]))throw new Error("Property mismatch in "+n+u);o[u]=a}}),pr(e,(a,u)=>{t[u]||(o[u]=a)}),n==""&&Vs(o,s),r.mergeUris&&uo(o,e),o},ri=t=>Array.isArray(t)?t.map(e=>ri(e)):Nt(t)?(pr(t,(e,r)=>{t[r]=ri(e)}),t):dr(t)?t.normalize():t,kl=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},Rl={mappingsByConcepts:(t,e,r)=>{let n=["memberSet","memberList","memberChoice"],i,s;for(let o of n)i=i||te(t,r+"."+o+"[0].notation[0]"),s=s||te(e,r+"."+o+"[0].notation[0]");return i==null||i<s?-1:s==null||i>s?1:0}},Il=(t,e)=>!t||!e?!1:[t.uri].concat(Object.values(t.identities||{}).map(r=>r.uri)).filter(r=>r!=null).includes(te(e,"creator[0].uri"));function Tl(t,e){let r;if(t&&t.notation&&t.notation.length)r=t.notation[0],(io(t)||e=="scheme")&&(r=r.toUpperCase());else if(t&&t.inScheme&&t.inScheme[0]&&t.uri)try{r=new $r(t&&t.inScheme&&t.inScheme[0]).notationFromUri(t.uri)}catch(n){}return r||""}function ii(t,e,{language:r}={}){let n=t&&e?t[e]:t;return n&&(n[r]||(r=Hr.selectLanguage(n),r))?n[r]:null}function Ft(t,e={}){e=e||{};let r=e.fallbackToUri==null?!0:e.fallbackToUri;return te(t,`prefLabel.${e.language}`)||ii(t,"prefLabel",e)||(r&&t&&t.uri?t.uri:"")}function Pl(t,e={}){e=e||{};let r=te(t,`definition.${e.language}`)||ii(t,"definition",e)||[];return dr(r)&&(r=[r]),r}function Dl(t){return te(t,"stored",te(t,"constructor.stored",te(t,"provider.constructor.stored",!1)))}function Ml(t){return dr(t.creator)?t.creator:t.creator&&t.creator.id}function Nl(t){return te(t,"creator.name")||""}function Ll(t,e){return!!(t&&dr(t.creator)?e&&e.includes(t.creator):e&&t.creator&&e.includes(t.creator.id))}function Fl(t,e){return e.filter(({notationPattern:r})=>(r||".+")===".+"?!1:RegExp("^("+r+")$").test(t))}var P=F(I(I({},ei),si),{ConceptScheme:$r,languagePreference:Hr});var ui={};pt(ui,{concatUrl:()=>Ue,deepEqual:()=>Re,listOfCapabilities:()=>ai,requestMethods:()=>oi,withCustomProps:()=>wt});var oi=[{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 Ue(...t){let[e,...r]=t;for(let n of r)e.endsWith("/")||(e+="/"),n.startsWith("/")&&(n=n.slice(1)),e+=n;return e}function wt(t,e){return t._totalCount=e._totalCount,t._url=e._url,t}var ai=["schemes","top","data","concepts","narrower","ancestors","types","suggest","search","auth","mappings","concordances","annotations","occurrences"],Re=(t,e)=>{if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t===null||e===null)return!1;if(Object.keys(t).length===Object.keys(e).length){for(let r in t)if(!(r in e)||!Re(t[r],e[r]))return!1;return!0}return!1};var Ht={};pt(Ht,{BaseProvider:()=>G,ConceptApiProvider:()=>Te,LabelSearchSuggestionProvider:()=>We,LobidApiProvider:()=>Ye,LocApiProvider:()=>qe,LocalMappingsProvider:()=>st,MappingsApiProvider:()=>Ie,ModApiProvider:()=>Xe,MyCoReProvider:()=>Qe,NoTApiProvider:()=>Ze,OccurrencesApiProvider:()=>$e,OlsApiProvider:()=>Ge,ReconciliationApiProvider:()=>je,SkohubProvider:()=>Je,SkosmosApiProvider:()=>He});var li=t=>t.reduce((e,r)=>e.filter(n=>r.includes(n))),G=class{constructor(e={}){var n,i;this._jskos=e,this.axios=pe.create({timeout:2e5}),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)),ai.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: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.endpoint||e.api},this._config={},this.setRetryConfig(),this.axios.interceptors.request.use((s={})=>{var o,a,u;if(s._skipAdditionalParameters||(s.params||(s.params={}),s.params.language=[...new Set([].concat(((o=s.params.language)!=null?o:"").split(","),this.languages,this._defaultLanguages).filter(Boolean))].join(","),this.has.auth&&this._auth.bearerToken&&!((a=s==null?void 0:s.headers)!=null&&a.Authorization)&&(s.headers||(s.headers={}),s.headers.Authorization=`Bearer ${this._auth.bearerToken}`)),(u=s.url)!=null&&u.startsWith("http:")&&typeof window!="undefined"&&window.location.protocol=="https:")throw new pe.Cancel("Can't call http API from https.");return s}),this.axios.interceptors.response.use(({data:s,headers:o={},config:a={}})=>{s=P.normalize(s);let u=a.url;if(u.endsWith("?")||(u+="?"),u+=new URLSearchParams(a.params||{}).toString(),typeof s=="object"){let l=parseInt(o["x-total-count"]);isNaN(l)||(s._totalCount=l),s._url=u}return s},s=>{var l,c,f;let o=(c=(l=s.config)==null?void 0:l._retryCount)!=null?c:0,a=s.config.method,u=(f=s.response)==null?void 0:f.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((m,g)=>{setTimeout(()=>{this.axios(s.config).then(m).catch(g)},(()=>{let h=this._retryConfig.delay;return typeof h=="function"?h(o):h})())})):Promise.reject(s)});let r=[];for(let{method:s,type:o}of oi){let a=this[s]&&this[s].bind(this);if(!a){this[s]=()=>{throw new Qt({method:s})};continue}this[s]=(u={})=>{if(u._raw)return delete u._raw,a(u);let l=r.find(y=>y.method==s&&Re(y.options,u));if(l)return l.promise;let c;u.cancelToken||(c=this.getCancelTokenSource(),u.cancelToken=c.token);let f=this.init().then(()=>a(u)).then(y=>(typeof y=="object"&&y._totalCount===void 0&&(y._totalCount=Array.isArray(y)?y.length:1),y&&o&&this[`adjust${o}`]&&(y=this[`adjust${o}`](y)),y)).catch(y=>{throw y instanceof me?y:y.response?y.response.status.toString().startsWith(4)?new Le({relatedError:y,code:y.response.status}):new Zt({relatedError:y,code:y.response.status}):y.request?typeof navigator!="undefined"&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection)?new er({relatedError:y}):new tr({relatedError:y}):(console.error(y),new me({relatedError:y}))});c&&(f.cancel=(...y)=>c.cancel(...y));let d=u,{cancelToken:m}=d,g=W(d,["cancelToken"]),h={method:s,options:g,promise:f};return r.push(h),f.catch(()=>{}).then(()=>r.splice(r.indexOf(h),1)),f}}}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 E(this,null,function*(){return this._init?this._init:(this._init=E(this,null,function*(){var r;this._prepare();let e;if(typeof this._api.status=="string")try{e=yield this.axios({method:"get",url:this._api.status})}catch(n){((r=n==null?void 0:n.response)==null?void 0:r.status)===404&&(this._api.status=null)}else e=this._api.status;if(typeof e=="object"&&Object.keys(e).length){this._config=e.config||{};for(let n of Object.keys(this._api))this._api[n]===void 0&&(this._api[n]=e[n]||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)}suggest(e){return E(this,null,function*(){e._raw=!0;let r=yield this.search(e),n=[e.search,[],[],[]];for(let i of r){let s=P.notation(i),o=P.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})}isAuthorizedFor({type:e,action:r,user:n,crossUser:i}){var a,u,l,c;if(r=="read"&&this.has[e]===!0)return!0;if(!this.has[e])return!1;let s=(u=(a=this._config)==null?void 0:a[e])==null?void 0:u[r];if(!s)return!!this.has[e][r];if(s.auth&&(!n||!this._auth.key)||s.auth&&this._auth.key!=((c=(l=this._config)==null?void 0:l.auth)==null?void 0:c.key))return!1;let o=[n==null?void 0:n.uri].concat(Object.values((n==null?void 0:n.identities)||{}).map(f=>f.uri)).filter(Boolean);if(s.auth&&s.identities&&li(o,s.identities).length==0)return!1;if(s.auth&&s.identityProviders){let f=Object.keys((n==null?void 0:n.identities)||{});if(li(f,s.identityProviders).length==0)return!1}return i?s.crossUser===!0||li(s.crossUser||[],o).length>0:!!this.has[e][r]}supportsScheme(e){if(!e)return!1;let r=Array.isArray(this.schemes)?this.schemes:null;return r==null&&!P.isContainedIn(e,this.excludedSchemes||[])?!0:P.isContainedIn(e,r)}adjustConcept(e){if(!e||e.__SAVED__)return e;e._getNarrower=r=>this.getNarrower(F(I({},r),{concept:e})),e._getAncestors=r=>this.getAncestors(F(I({},r),{concept:e})),e._getDetails=r=>E(this,null,function*(){return(yield this.getConcepts(F(I({},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 wt(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(F(I({},n),{scheme:e})),e._getTypes=n=>e._registry.getTypes(F(I({},n),{scheme:e})),e._suggest=s=>{var o=s,{search:n}=o,i=W(o,["search"]);return e._registry.suggest(F(I({},i),{search:n,scheme:e}))}),e}adjustSchemes(e){return wt(e.map(r=>this.adjustScheme(r)),e)}adjustConcordances(e){for(let r of e)r._registry=this;return e}adjustMapping(e){var r,n,i,s,o;for(let a of["from","to"]){let u=`${a}Scheme`;e[u]||(e[u]=(s=(i=(n=(r=P.conceptsOfMapping(e,a))==null?void 0:r[0])==null?void 0:n.inScheme)==null?void 0:i[0])!=null?s:null)}if(e._registry=this,!e.identifier){let a=(o=P.addMappingIdentifiers(e))==null?void 0:o.identifier;a&&(e.identifier=a)}return e}adjustMappings(e){return wt(e.map(r=>this.adjustMapping(r)),e)}postMappings(){return E(this,arguments,function*(n={}){var i=n,{mappings:e}=i,r=W(i,["mappings"]);if(!e||!e.length)throw new U({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"postMapping",items:e,itemProperty:"mapping",config:r})})}deleteMappings(){return E(this,arguments,function*(n={}){var i=n,{mappings:e}=i,r=W(i,["mappings"]);if(!e||!e.length)throw new U({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"deleteMapping",items:e,itemProperty:"mapping",config:r})})}_callHelperForArrayWrappers(s){return E(this,arguments,function*({method:e,items:r,itemProperty:n,config:i}){let o=[],a=yield Promise.all(r.map(u=>E(this,null,function*(){try{return yield this[e](F(I({[n]:u},i),{_raw:!0}))}catch(l){return o[r.indexOf(u)]=l,null}})));return a._errors=o,a})}};ee(G,"providerName","Base");var ze=ns(fo(),1);var we=[];for(let t=0;t<256;++t)we.push((t+256).toString(16).slice(1));function ho(t,e=0){return(we[t[e+0]]+we[t[e+1]]+we[t[e+2]]+we[t[e+3]]+"-"+we[t[e+4]]+we[t[e+5]]+"-"+we[t[e+6]]+we[t[e+7]]+"-"+we[t[e+8]]+we[t[e+9]]+"-"+we[t[e+10]]+we[t[e+11]]+we[t[e+12]]+we[t[e+13]]+we[t[e+14]]+we[t[e+15]]).toLowerCase()}var fi,Bl=new Uint8Array(16);function hi(){if(!fi){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");fi=crypto.getRandomValues.bind(crypto)}return fi(Bl)}var jl=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),pi={randomUUID:jl};function Ul(t,e,r){var i,s,o;t=t||{};let n=(o=(s=t.random)!=null?s:(i=t.rng)==null?void 0:i.call(t))!=null?o:hi();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,e){if(r=r||0,r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let a=0;a<16;++a)e[r+a]=n[a];return e}return ho(n)}function zl(t,e,r){return pi.randomUUID&&!e&&!t?pi.randomUUID():Ul(t,e,r)}var Kr=zl;var Yr="urn:uuid:",st=class extends G{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=()=>ze.default.getItem(this.localStorageKey).then(n=>{n=n||[];let i=0;for(let s of n.filter(o=>!o.uri||!o.uri.startsWith(Yr)))s.uri&&(s.identifier||(s.identifier=[]),s.identifier.push(s.uri)),s.uri=`${Yr}${Kr()}`,i+=1;return i&&console.warn(`URIs added to ${i} local mappings.`),ze.default.setItem(this.localStorageKey,n)});ze.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=this.queue.slice(-1)[0]||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),e.then(()=>ze.default.getItem(this.localStorageKey)).then(o=>{r({mappings:o,done:s})})})}getMapping(n){return E(this,null,function*(){var i=n,{mapping:e}=i,r=W(i,["mapping"]);if(r._raw=!0,!e||!e.uri)throw new U({parameter:"mapping"});return(yield this.getMappings(F(I({},r),{uri:e.uri})))[0]})}getMappings(){return E(this,arguments,function*({from:e,fromScheme:r,to:n,toScheme:i,creator:s,type:o,partOf:a,offset:u,limit:l,direction:c,mode:f,identifier:m,uri:g}={}){let h={};return e&&(h.from=typeof e=="string"?e:e.uri),r&&(h.fromScheme=typeof r=="string"?{uri:r}:r),n&&(h.to=typeof n=="string"?n:n.uri),i&&(h.toScheme=typeof i=="string"?{uri:i}:i),s&&(h.creator=typeof s=="string"?s:P.prefLabel(s)),o&&(h.type=typeof o=="string"?o:o.uri),a&&(h.partOf=typeof a=="string"?a:a.uri),u&&(h.offset=u),l&&(h.limit=l),c&&(h.direction=c),f&&(h.mode=f),m&&(h.identifier=m),g&&(h.uri=g),this._getMappingsQueue().catch(d=>{throw new me({message:"Could not get mappings from local storage",relatedError:d})}).then(({mappings:d,done:y})=>{y();let O=(C,L)=>C.uri==L||L&&C.notation&&C.notation[0].toLowerCase()==L.toLowerCase();if((h.from||h.to)&&(d=d.filter(C=>{let L=P.conceptsOfMapping(C,"from").find(D=>O(D,h.from))!=null,N=P.conceptsOfMapping(C,"to").find(D=>O(D,h.from))!=null,S=P.conceptsOfMapping(C,"from").find(D=>O(D,h.to))!=null,k=P.conceptsOfMapping(C,"to").find(D=>O(D,h.to))!=null;return h.direction=="backward"?h.mode=="or"?h.from&&N||h.to&&S:(!h.from||N)&&(!h.to||S):h.direction=="both"?h.mode=="or"?h.from&&(L||N)||h.to&&(S||k):(!h.from||L)&&(!h.to||k)||(!h.from||N)&&(!h.to||S):h.mode=="or"?h.from&&L||h.to&&k:(!h.from||L)&&(!h.to||k)})),(h.fromScheme||h.toScheme)&&(d=d.filter(C=>{let L=P.compare(C.fromScheme,h.fromScheme),N=P.compare(C.toScheme,h.fromScheme),S=P.compare(C.fromScheme,h.toScheme),k=P.compare(C.toScheme,h.toScheme);return h.direction=="backward"?h.mode=="or"?h.fromScheme&&N||h.toScheme&&S:(!h.fromScheme||N)&&(!h.toScheme||S):h.direction=="both"?h.mode=="or"?h.fromScheme&&(L||N)||h.toScheme&&(S||k):(!h.fromScheme||L)&&(!h.toScheme||k)||(!h.fromScheme||N)&&(!h.toScheme||S):h.mode=="or"?h.fromScheme&&L||h.toScheme&&k:(!h.fromScheme||L)&&(!h.toScheme||k)})),h.creator){let C=h.creator.split("|");d=d.filter(L=>(L.creator&&L.creator.find(N=>C.includes(P.prefLabel(N))||C.includes(N.uri)))!=null)}h.type&&(d=d.filter(C=>(C.type||[P.defaultMappingType.uri]).includes(h.type))),h.partOf&&(d=d.filter(C=>C.partOf!=null&&C.partOf.find(L=>P.compare(L,{uri:h.partOf}))!=null)),h.identifier&&(d=d.filter(C=>h.identifier.split("|").map(L=>(C.identifier||[]).includes(L)||C.uri==L).reduce((L,N)=>L||N))),h.uri&&(d=d.filter(C=>C.uri==h.uri));let R=d.length;return d=d.sort((C,L)=>{let N=C.modified||C.created,S=L.modified||L.created;return S==null?-1:N==null?1:N>S?-1:1}),d=d.slice(h.offset||0),d=d.slice(0,h.limit),d._totalCount=R,d})})}postMapping(r){return E(this,arguments,function*({mapping:e}){if(!e)throw new U({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue();if((!e.uri||!e.uri.startsWith(Yr))&&(e.uri&&(e.identifier||(e.identifier=[]),e.identifier.push(e.uri)),e.uri=`${Yr}${Kr()}`),n.find(s=>s.uri==e.uri))throw i(),new U({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(s=>P.minifyMapping(s));try{return yield ze.default.setItem(this.localStorageKey,n),i(),e}catch(s){throw i(),s}})}putMapping(r){return E(this,arguments,function*({mapping:e}){if(!e)throw new U({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue(),s=n.findIndex(o=>o.uri==e.uri);if(s==-1)throw i(),new U({parameter:"mapping",message:"Mapping not found"});e.created||(e.created=n[s].created),e.modified=new Date().toISOString(),delete e.partOf,n[s]=e,n=n.map(o=>P.minifyMapping(o));try{return yield ze.default.setItem(this.localStorageKey,n),i(),e}catch(o){throw i(),o}})}patchMapping(r){return E(this,arguments,function*({mapping:e}){if(!e)throw new U({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue(),s=n.findIndex(o=>o.uri==e.uri);if(s==-1)throw i(),new U({parameter:"mapping",message:"Mapping not found"});e.created||(e.created=n[s].created),e.modified=new Date().toISOString(),delete e.partOf,n[s]=Object.assign(n[s],e),n=n.map(o=>P.minifyMapping(o));try{return yield ze.default.setItem(this.localStorageKey,n),i(),e}catch(o){throw i(),o}})}deleteMapping(r){return E(this,arguments,function*({mapping:e}){if(!e)throw new U({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue();try{return n=n.filter(s=>s.uri!=e.uri),n=n.map(s=>P.minifyMapping(s)),yield ze.default.setItem(this.localStorageKey,n),i(),!0}catch(s){throw i(),s}})}};st.providerName="LocalMappings";st.stored=!0;var Ie=class extends G{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=Ue(this._api.api,"/status"))}_setup(){var e,r,n,i,s,o,a,u,l,c,f,m,g,h,d,y,O,R,C,L,N,S,k,D,$,X,K,V,Z;if(this._api.api){let se={mappings:"/mappings",concordances:"/concordances",annotations:"/annotations"};for(let re of Object.keys(se))this._api[re]===void 0&&(this._api[re]=Ue(this._api.api,se[re]))}this.has.mappings=this._api.mappings?{}:!1,this.has.mappings&&(this.has.mappings.read=!!((n=(r=(e=this._config)==null?void 0:e.mappings)==null?void 0:r.read)==null||n),this.has.mappings.create=!!((s=(i=this._config)==null?void 0:i.mappings)!=null&&s.create),this.has.mappings.update=!!((a=(o=this._config)==null?void 0:o.mappings)!=null&&a.update),this.has.mappings.delete=!!((l=(u=this._config)==null?void 0:u.mappings)!=null&&l.delete),this.has.mappings.anonymous=!!((f=(c=this._config)==null?void 0:c.mappings)!=null&&f.anonymous)),this.has.concordances=this._api.concordances?{}:!1,this.has.concordances&&(this.has.concordances.read=!!((g=(m=this._config)==null?void 0:m.concordances)!=null&&g.read),this.has.concordances.create=!!((d=(h=this._config)==null?void 0:h.concordances)!=null&&d.create),this.has.concordances.update=!!((O=(y=this._config)==null?void 0:y.concordances)!=null&&O.update),this.has.concordances.delete=!!((C=(R=this._config)==null?void 0:R.concordances)!=null&&C.delete)),this.has.annotations=this._api.annotations?{}:!1,this.has.annotations&&(this.has.annotations.read=!!((N=(L=this._config)==null?void 0:L.annotations)!=null&&N.read),this.has.annotations.create=!!((k=(S=this._config)==null?void 0:S.annotations)!=null&&k.create),this.has.annotations.update=!!(($=(D=this._config)==null?void 0:D.annotations)!=null&&$.update),this.has.annotations.delete=!!((K=(X=this._config)==null?void 0:X.annotations)!=null&&K.delete)),this.has.auth=((Z=(V=this._config)==null?void 0:V.auth)==null?void 0:Z.key)!=null,this._defaultParams={properties:"annotations"}}getMapping(n){return E(this,null,function*(){var i=n,{mapping:e}=i,r=W(i,["mapping"]);var s;if(!e)throw new U({parameter:"mapping"});if(!e.uri||!e.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(F(I({},r),{url:e.uri,params:I(I({},this._defaultParams),r.params||{})}))}catch(o){if(((s=o==null?void 0:o.response)==null?void 0:s.status)==404)return null;throw o}})}getMappings(L){return E(this,null,function*(){var N=L,{from:e,fromScheme:r,to:n,toScheme:i,creator:s,type:o,partOf:a,offset:u,limit:l,direction:c,mode:f,identifier:m,cardinality:g,annotatedBy:h,annotatedFor:d,annotatedWith:y,sort:O,order:R}=N,C=W(N,["from","fromScheme","to","toScheme","creator","type","partOf","offset","limit","direction","mode","identifier","cardinality","annotatedBy","annotatedFor","annotatedWith","sort","order"]);let S={},k=this._api.mappings;return e&&(S.from=typeof e=="string"?e:e.uri),r&&(S.fromScheme=typeof r=="string"?r:r.uri),n&&(S.to=typeof n=="string"?n:n.uri),i&&(S.toScheme=typeof i=="string"?i:i.uri),s&&(S.creator=typeof s=="string"?s:P.prefLabel(s)),o&&(S.type=typeof o=="string"?o:o.uri),a&&(S.partOf=typeof a=="string"?a:a.uri),u&&(S.offset=u),l&&(S.limit=l),c&&(S.direction=c),g&&(S.cardinality=g),h&&(S.annotatedBy=h),d&&(S.annotatedFor=d),y&&(S.annotatedWith=y),f&&(S.mode=f),m&&(S.identifier=m),O&&(S.sort=O),R&&(S.order=R),this.axios(F(I({},C),{method:"get",url:k,params:I(I(I({},this._defaultParams),C.params||{}),S)}))})}postMapping(n){return E(this,null,function*(){var i=n,{mapping:e}=i,r=W(i,["mapping"]);if(!e)throw new U({parameter:"mapping"});return e=P.minifyMapping(e),e=P.addMappingIdentifiers(e),this.axios(F(I({},r),{method:"post",url:this._api.mappings,data:e,params:I(I({},this._defaultParams),r.params||{})}))})}putMapping(n){return E(this,null,function*(){var i=n,{mapping:e}=i,r=W(i,["mapping"]);if(!e)throw new U({parameter:"mapping"});e=P.minifyMapping(e),e=P.addMappingIdentifiers(e);let s=e.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(F(I({},r),{method:"put",url:s,data:e,params:I(I({},this._defaultParams),r.params||{})}))})}patchMapping(n){return E(this,null,function*(){var i=n,{mapping:e}=i,r=W(i,["mapping"]);var a;if(!e)throw new U({parameter:"mapping"});if(!((a=e.uri)!=null&&a.startsWith(this._api.mappings)))throw new U({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});let u=e,{uri:s}=u,o=W(u,["uri"]);return this.axios(F(I({},r),{method:"patch",url:s,data:o,params:I(I({},this._defaultParams),r.params||{})}))})}deleteMapping(n){return E(this,null,function*(){var i=n,{mapping:e}=i,r=W(i,["mapping"]);if(!e)throw new U({parameter:"mapping"});let s=e.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(F(I({},r),{method:"delete",url:s})),!0})}getAnnotations(n){return E(this,null,function*(){var i=n,{target:e}=i,r=W(i,["target"]);return e&&(r.params||(r.params={}),r.params.target=e),this.axios(F(I({},r),{method:"get",url:this._api.annotations}))})}postAnnotation(n){return E(this,null,function*(){var i=n,{annotation:e}=i,r=W(i,["annotation"]);return this.axios(F(I({},r),{method:"post",url:this._api.annotations,data:e}))})}putAnnotation(n){return E(this,null,function*(){var i=n,{annotation:e}=i,r=W(i,["annotation"]);let s=e.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(F(I({},r),{method:"put",url:s,data:e}))})}patchAnnotation(n){return E(this,null,function*(){var i=n,{annotation:e}=i,r=W(i,["annotation"]);let s=e.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(F(I({},r),{method:"patch",url:s,data:e}))})}deleteAnnotation(n){return E(this,null,function*(){var i=n,{annotation:e}=i,r=W(i,["annotation"]);let s=e.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(F(I({},r),{method:"delete",url:s})),!0})}getConcordances(e){return E(this,null,function*(){return this.axios(F(I({},e),{method:"get",url:this._api.concordances}))})}postConcordance(n){return E(this,null,function*(){var i=n,{concordance:e}=i,r=W(i,["concordance"]);if(!e)throw new U({parameter:"concordance"});return this.axios(F(I({},r),{method:"post",url:this._api.concordances,data:e,params:I(I({},this._defaultParams),r.params||{})}))})}putConcordance(n){return E(this,null,function*(){var i=n,{concordance:e}=i,r=W(i,["concordance"]);if(!e)throw new U({parameter:"concordance"});let s=e.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(F(I({},r),{method:"put",url:s,data:e,params:I(I({},this._defaultParams),r.params||{})}))})}patchConcordance(n){return E(this,null,function*(){var i=n,{concordance:e}=i,r=W(i,["concordance"]);var a;if(!e)throw new U({parameter:"concordance"});if(!((a=e.uri)!=null&&a.startsWith(this._api.concordances)))throw new U({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});let u=e,{uri:s}=u,o=W(u,["uri"]);return this.axios(F(I({},r),{method:"patch",url:s,data:o,params:I(I({},this._defaultParams),r.params||{})}))})}deleteConcordance(n){return E(this,null,function*(){var i=n,{concordance:e}=i,r=W(i,["concordance"]);if(!e)throw new U({parameter:"concordance"});let s=e.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(F(I({},r),{method:"delete",url:s})),!0})}};ee(Ie,"supports",{mappings:!0,concordances:!0,annotations:!0});Ie.providerName="MappingsApi";Ie.stored=!0;var di={},$e=class extends G{get _cache(){return di[this.uri]}_prepare(){di[this.uri]=[],this._occurrencesSupportedSchemes=[]}_occurrencesIsSupported(e){return E(this,null,function*(){if(!(this._occurrencesSupportedSchemes&&this._occurrencesSupportedSchemes.length))try{let n=Ue(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)P.compare(e,n)&&(r=!0);return r})}getMappings(e){return E(this,null,function*(){var u,l,c,f,m,g,h,d,y,O,R,C,L,N;let r=yield this.getOccurrences(e),n=e.from,i=((u=n==null?void 0:n.inScheme)==null?void 0:u[0])||e.fromScheme,s=e.to,o=((l=s==null?void 0:s.inScheme)==null?void 0:l[0])||e.toScheme,a=[];for(let S of r){if(!S)continue;let k={};k.from=(c=S==null?void 0:S.memberSet)==null?void 0:c[0],k.from?k.from={memberSet:[k.from]}:k.from=null,k.fromScheme=(g=(m=(f=S==null?void 0:S.memberSet)==null?void 0:f[0])==null?void 0:m.inScheme)==null?void 0:g[0],k.to=(h=S==null?void 0:S.memberSet)==null?void 0:h[1],k.to?k.to={memberSet:[k.to]}:k.to={memberSet:[]},k.toScheme=(O=(y=(d=S==null?void 0:S.memberSet)==null?void 0:d[1])==null?void 0:y.inScheme)==null?void 0:O[0],(n&&P.compare(n,(C=(R=k==null?void 0:k.to)==null?void 0:R.memberSet)==null?void 0:C[0])||s&&P.compare(s,(N=(L=k==null?void 0:k.from)==null?void 0:L.memberSet)==null?void 0:N[0]))&&([k.from,k.fromScheme,k.to,k.toScheme]=[k.to,k.toScheme,k.from,k.fromScheme]),!k.fromScheme&&i&&(k.fromScheme=i),!k.toScheme&&o&&(k.toScheme=o),k.type=[P.defaultMappingType.uri],k._occurrence=S,k=P.addMappingIdentifiers(k),a.push(k)}return a._url=r._url,a})}getOccurrences(o){return E(this,null,function*(){var a=o,{from:e,to:r,concepts:n,threshold:i=0}=a,s=W(a,["from","to","concepts","threshold"]);var h;let u=[];n=(n||[]).concat([e,r]).filter(d=>!!d);for(let d of n)u.push(this._occurrencesIsSupported((h=d==null?void 0:d.inScheme)==null?void 0:h[0]).then(y=>y&&d.uri?d.uri:null));let l=yield Promise.all(u);if(l=l.filter(d=>d!=null),l.length==0)throw new U({parameter:"concepts"});u=[];for(let d of l)u.push(this._getOccurrences(F(I({},s),{params:{member:d,scheme:"*",threshold:i}})));let c=yield Promise.all(u),f=c.flat(),m=[],g=[];for(let d=0;d<f.length;d+=1){let y=f[d];if(!y)continue;let O=y.memberSet.reduce((R,C)=>R.concat(C.uri),[]).sort().join(" ");m.includes(O)?g.push(d):m.push(O)}return g.forEach(d=>{delete f[d]}),f=f.filter(d=>d!=null),f=f.sort((d,y)=>parseInt(y.count||0)-parseInt(d.count||0)),f._url=c.map(d=>d._url),f})}_getOccurrences(e){return E(this,null,function*(){let r=this._cache.find(i=>Re(i.config.params,e.params));if(r)return r.data;let n=yield this.axios(F(I({},e),{method:"get",url:this._api.api}));return this._cache.push({config:e,data:n}),this._cache.length>20&&(di[this.uri]=this._cache.slice(this._cache.length-20)),n})}};ee($e,"supports",{occurrences:!0,mappings:!0});$e.providerName="OccurrencesApi";$e.stored=!1;var Te=class extends G{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=Ue(this._api.api,"/status"))}_setup(){var e,r;if(this._api.api){let n={schemes:"/voc",top:"/voc/top",concepts:"/voc/concepts",data:"/data",narrower:"/narrower",ancestors:"/ancestors",types:"/types",suggest:"/suggest",search:"/search"};for(let i of Object.keys(n))this._api[i]===void 0&&(this._api[i]=Ue(this._api.api,n[i]))}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=(r=(e=this._config)==null?void 0:e.auth)==null?void 0:r.key,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 E(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let r=this._approvedSchemes.find(s=>P.compare(e,s));if(r)return r.uri;if(this._rejectedSchemes.find(s=>P.compare(e,s)))return null;let i=(yield this.getSchemes({params:{uri:P.getAllUris(e).join("|")}})).find(s=>P.compare(s,e));return i?(this._approvedSchemes.push({uri:i.uri,identifier:P.getAllUris(e)}),i.uri):(this._rejectedSchemes.push({uri:e.uri,identifier:e.identifier}),null)})}getSchemes(){return E(this,arguments,function*(e={}){if(!this._api.schemes){if(Array.isArray(this.schemes))return this.schemes;throw new xe}let r=yield this.axios(F(I({},e),{method:"get",url:this._api.schemes,params:I(F(I({},this._defaultParams),{limit:500}),e.params||{})}));return Array.isArray(this.schemes)?wt(r.filter(n=>P.isContainedIn(n,this.schemes)),r):r})}getTop(n){return E(this,null,function*(){var i=n,{scheme:e}=i,r=W(i,["scheme"]);if(!this._api.top)throw new xe;if(!e)throw new U({parameter:"scheme"});let s=yield this._getSchemeUri(e);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(F(I({},r),{method:"get",url:this._api.top,params:F(I(F(I({},this._defaultParams),{limit:1e4}),r.params||{}),{uri:s})}))})}getConcepts(n){return E(this,null,function*(){var i=n,{concepts:e}=i,r=W(i,["concepts"]);let s=this._api.concepts||this._api.data;if(!s)throw new xe;Array.isArray(e)||(e=e?[e]:[]);let o=e.map(a=>a.uri).filter(a=>a!=null);return this.axios(F(I({},r),{method:"get",url:s,params:F(I(F(I({},this._defaultParams),{limit:100}),r.params||{}),{uri:o.join("|")})}))})}getNarrower(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=W(i,["concept"]);var s;if(!e||!e.uri)throw new U({parameter:"concept"});if(this._api.narrower)return this.axios(F(I({},r),{method:"get",url:this._api.narrower,params:F(I(F(I({},this._defaultParams),{limit:1e4}),r.params||{}),{uri:e.uri})}));{let o=I({params:{}},r);o.params.properties="narrower";let u=((s=(yield this.getConcepts(I({concepts:[e]},o)))[0])==null?void 0:s.narrower)||[];return u.length?this.getConcepts(I({concepts:u},r)):[]}})}getAncestors(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=W(i,["concept"]);var s;if(!e||!e.uri)throw new U({parameter:"concept"});if(this._api.ancestors)return this.axios(F(I({},r),{method:"get",url:this._api.ancestors,params:F(I(F(I({},this._defaultParams),{limit:1e4}),r.params||{}),{uri:e.uri})}));{let o=I({params:{}},r);o.params.properties="ancestors";let u=((s=(yield this.getConcepts(I({concepts:[e]},o)))[0])==null?void 0:s.ancestors)||[];return u.length?this.getConcepts(I({concepts:u},r)):[]}})}suggest(o){return E(this,null,function*(){var a=o,{use:e="notation,label",types:r=[],sort:n="score",params:i={}}=a,s=W(a,["use","types","sort","params"]);return this._search(F(I({},s),{endpoint:"suggest",params:F(I({},i),{type:r.join("|"),use:e,sort:n})}))})}search(i){return E(this,null,function*(){var s=i,{types:e=[],params:r={}}=s,n=W(s,["types","params"]);return this._search(F(I({},n),{endpoint:"search",params:F(I({},r),{type:e.join("|")})}))})}vocSuggest(s){return E(this,null,function*(){var o=s,{use:e="notation,label",sort:r="score",params:n={}}=o,i=W(o,["use","sort","params"]);return this._search(F(I({},i),{endpoint:"voc-suggest",params:F(I({},n),{use:e,sort:r})}))})}vocSearch(e){return E(this,null,function*(){return this._search(F(I({},e),{endpoint:"voc-search"}))})}_search(l){return E(this,null,function*(){var c=l,{endpoint:e,scheme:r,search:n,limit:i,offset:s,params:o,url:a}=c,u=W(c,["endpoint","scheme","search","limit","offset","params","url"]);if(a=a!=null?a:this._api[e],!a)throw new xe;if(!n)throw new U({parameter:"search"});i=i||this._jskos.suggestResultLimit||100,s=s||0;let f=r&&(yield this._getSchemeUri(r));return a=a.replace("{searchTerms}",n),this.axios(F(I({},u),{params:F(I(I({},this._defaultParams),o),{limit:i,count:i,offset:s,search:n,query:n,voc:f}),method:"get",url:a}))})}getTypes(n){return E(this,null,function*(){var i=n,{scheme:e}=i,r=W(i,["scheme"]);if(!this._api.types)throw new xe;if(Array.isArray(this._api.types))return this._api.types;let s=e&&(yield this._getSchemeUri(e));s&&(r.params||(r.params={}),r.params.uri=s);let o=yield this.axios(F(I({},r),{method:"get",url:this._api.types}));return s&&(o=o.filter(a=>!a.inScheme||P.isContainedIn(e,a.inScheme))),o})}};ee(Te,"providerName","ConceptApi"),ee(Te,"providerType","http://bartoc.org/api-type/jskos"),ee(Te,"supports",{schemes:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,types:!0,suggest:!0,search:!0,auth:!0});var mi={},je=class extends G{get _cache(){return mi[this.uri]}_prepare(){mi[this.uri]=[]}getMappings(s){return E(this,null,function*(){var o=s,{from:e,to:r,mode:n}=o,i=W(o,["from","to","mode"]);var S,k,D,$,X,K;let a=[];Array.isArray(this.schemes)&&(a=this.schemes);let u,l,c=(S=e==null?void 0:e.inScheme)==null?void 0:S[0],f=(k=r==null?void 0:r.inScheme)==null?void 0:k[0],m,g;if(!e||P.isContainedIn(c,a)?(u=!0,l=r,m=f,g=a.find(V=>P.compare(V,c))||a[0]):(u=!1,l=e,m=c,g=a.find(V=>P.compare(V,f))||a[0]),n!="or")return[];if(!this._api.api)throw new xe;if(!l)throw new U({parameter:u?"to":"from"});let h=P.languagePreference.selectLanguage(l.prefLabel);if(!h)throw new U({parameter:u?"to":"from",message:"Missing language"});let d=($=(D=l==null?void 0:l.altLabel)==null?void 0:D[h])!=null?$:[];typeof d=="string"&&(d=[d]);let y=(X=l==null?void 0:l.prefLabel)==null?void 0:X[h],O=d.concat([y]);O=[y];let{url:R,data:C}=yield this._getReconciliationResults(F(I({},i),{labels:O,language:h}));C=[].concat(...Object.values(C).map(V=>V.result)).filter(V=>V),C=C.sort((V,Z)=>V.score!=Z.score?Z.score-V.score:V.match!=Z.match?V.match?-1:1:V.id.length-Z.id.length);let L=(K=g==null?void 0:g.namespace)!=null?K:"",N=C.map(V=>({fromScheme:m,from:{memberSet:[l]},toScheme:g,to:{memberSet:[{uri:L+V.id}]},type:[V.match?"http://www.w3.org/2004/02/skos/core#exactMatch":V.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(V=>Object.assign(V,{fromScheme:V.toScheme,from:V.to,toScheme:V.fromScheme,to:V.from}))),N._url=R,N})}_getReconciliationResults(i){return E(this,null,function*(){var s=i,{labels:e,language:r}=s,n=W(s,["labels","language"]);e=e.sort();let o=this._cache.find(g=>Re(g.labels,e)&&g.language==r);if(o)return o;let a={},u=0;for(let g of e)a[`q${u}`]={query:g},u+=1;let l=this._api.api;r&&(l=l.replace("{language}",r));let c=`queries=${encodeURIComponent(JSON.stringify(a))}`;n.headers||(n.headers={}),n.headers["Content-Type"]="application/x-www-form-urlencoded";let f=yield this.axios(F(I({},n),{method:"post",url:l,data:c}));f=f||{};let m={labels:e,language:r,data:f,url:`${l}${l.includes("?")?"&":"?"}${c}`};return this._cache.push(m),this._cache.length>20&&(mi[this.uri]=this._cache.slice(this._cache.length-20)),m})}};ee(je,"supports",{mappings:!0});je.providerName="ReconciliationApi";je.providerType="http://bartoc.org/api-type/reconciliation";je.stored=!1;var We=class extends G{_prepare(){this._cache=[]}supportsScheme(e){var r,n;return super.supportsScheme(e)&&((n=(r=e==null?void 0:e._registry)==null?void 0:r.has)==null?void 0:n.search)}getMappings(a){return E(this,null,function*(){var u=a,{from:e,to:r,mode:n,selected:i,limit:s=10}=u,o=W(u,["from","to","mode","selected","limit"]);if(n!="or")return[];if(!i)throw new U({parameter:"selected"});let l=[];e&&this.supportsScheme(i.scheme[!1])?l.push(this._getMappings(F(I({},o),{concept:e,sourceScheme:i.scheme[!0],targetScheme:i.scheme[!1],limit:s}))):l.push(Promise.resolve([])),r&&this.supportsScheme(i.scheme[!0])?l.push(this._getMappings(F(I({},o),{concept:r,sourceScheme:i.scheme[!1],targetScheme:i.scheme[!0],limit:s,swap:!0}))):l.push(Promise.resolve([]));let[c,f]=yield Promise.all(l);for(f=f.filter(m=>!c.find(g=>P.compareMappingMembers(m,g)));c.length+f.length>s;)f.length>=c.length?f.pop():c.pop();return[...c,...f]})}_getMappings(a){return E(this,null,function*(){var u=a,{concept:e,sourceScheme:r,targetScheme:n,limit:i,swap:s=!1}=u,o=W(u,["concept","sourceScheme","targetScheme","limit","swap"]);var h;if(!e||!r||!n)return[];if(P.compare(r,n))return[];let l=P.languagePreference.selectLanguage(e.prefLabel)||this._defaultLanguages[0],c=P.prefLabel(e,{fallbackToUri:!1,language:l});if(!c)return[];let f=/^[\s\wäüöÄÜÖß]*\w/.exec(c);c=f?f[0]:c;let m=yield this._getResults(F(I({},o),{label:c,targetScheme:n,limit:i}));if(!m.length&&((h=e.broader)!=null&&h.length))for(let d of e.broader){let y=P.prefLabel(d,{fallbackToUri:!1,language:l});if(y&&(m=yield this._getResults(F(I({},o),{label:y,targetScheme:n,limit:i})),m.length))break}let g=m.map(d=>({fromScheme:r,from:{memberSet:[e]},toScheme:n,to:{memberSet:[d]},type:["http://www.w3.org/2004/02/skos/core#mappingRelation"]}));return s&&(g=g.map(d=>Object.assign(d,{fromScheme:d.toScheme,from:d.to,toScheme:d.fromScheme,to:d.from}))),g})}_getResults(s){return E(this,null,function*(){var o=s,{label:e,targetScheme:r,limit:n}=o,i=W(o,["label","targetScheme","limit"]);var f;let a=(this._cache[r.uri]||{})[e];if(a&&a._limit>=n)return a;let u=r==null?void 0:r._registry;if(!u||u.has.search===!1)return[];let l=(f=(this._jskos.overrides||[]).find(m=>P.compare(m,r)))==null?void 0:f.search,c=yield u.search(F(I({},i),{url:l,search:e,scheme:r,limit:n}));return this._cache[r.uri]||(this._cache[r.uri]={}),this._cache[r.uri][e]=c,this._cache[r.uri][e]._limit=n,c})}};ee(We,"supports",{mappings:!0});We.providerName="LabelSearchSuggestion";We.stored=!1;var He=class extends G{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){var o;let i=(e==null?void 0:e.VOCID)||((o=this.schemes.find(a=>P.compare(a,e)))==null?void 0:o.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(a=>`${a}=${encodeURIComponent(n[a])}`).join("&");return`${this._api.api}${i}${r}${s?"?"+s:""}`}_getDataUrl(e,{addFormatParameter:r=!0}={}){var i;let n=(i=e==null?void 0:e.inScheme)==null?void 0:i[0];if(!e||!e.uri)throw new U({parameter:"concept",message:"Missing concept URI"});return this._getApiUrl(n,"/data",r?{format:"application/json"}:{})}_getSchemeUri(e){return E(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let r=this._approvedSchemes.find(o=>P.compare(e,o));if(r)return r.uri;if(this._rejectedSchemes.find(o=>P.compare(e,o)))return null;let n=this._getApiUrl(e,"/"),s=(yield this.axios({method:"get",url:n})).conceptschemes.find(o=>P.compare(o,e));return s?(this._approvedSchemes.push({uri:s.uri,identifier:P.getAllUris(e)}),s.uri):(this._rejectedSchemes.push({uri:e.uri,identifier:e.identifier}),null)})}_toJskosConcept(e,{concept:r,scheme:n,result:i,language:s}={}){var c;if(!e)return null;r=P.deepCopy(r||{}),s=s||e.lang||"en",r.uri=e.uri,n&&(r.inScheme=[n]);let o=e.matchedPrefLabel||e.prefLabel||e.label;if(typeof o=="string")r.prefLabel||(r.prefLabel={}),r.prefLabel[s]=o;else{o&&!Array.isArray(o)&&(o=[o]);for(let f of o||[])r.prefLabel||(r.prefLabel={}),r.prefLabel[f.lang]=f.value}let a=e.altLabel;if(typeof a=="string")r.altLabel||(r.altLabel={}),r.altLabel[s]=a;else{a&&!Array.isArray(a)&&(a=[a]);for(let f of a||[])(c=r==null?void 0:r.altLabel)!=null&&c[f.lang]?(r.altLabel[f.lang].push(f.value),r.altLabel[f.lang]=[...new Set(r.altLabel[f.lang])]):(r.altLabel||(r.altLabel={}),r.altLabel[f.lang]=[f.value])}let u=e.notation||e["skos:notation"]||P.notation(r);u&&(r.notation=[u.value||u]),e.broader&&(Array.isArray(e.broader)||(e.broader=[e.broader]),r.broader=e.broader.map(f=>typeof f=="string"?{uri:f}:f)),e.hasChildren===!0?r.narrower=[null]:e.hasChildren===!1&&(r.narrower=[]),e.type&&!Array.isArray(e.type)&&(e.type=[e.type]),r.type=r.type||[];for(let f of e.type||[]){if(!P.isValidUri(f))continue;let m=f.slice(0,f.indexOf(":"));i&&i["@context"]&&i["@context"][m]&&(f=f.replace(m+":",i["@context"][m])),r.type.push(f)}r.type=[...new Set(r.type)],r.type.length||(r.type=["http://www.w3.org/2004/02/skos/core#Concept"]);let l={"skos:definition":"definition","skos:note":"note","skos:scopeNote":"scopeNote","skos:example":"example","skos:historyNote":"historyNote","skos:editorialNote":"editorialNote","skos:changeNote":"changeNote"};for(let f in l)if(e[f]){let m=e[f];if(m.lang&&m.value)r[l[f]]={[m.lang]:m.value};else if(Array.isArray(m)){r[l[f]]={};for(let g of m)g.lang&&g.value&&(r[l[f]][g.lang]=g.value)}}return r}getSchemes(){return E(this,arguments,function*(r={}){var e=W(r,[]);let n=[];for(let i of this.schemes||[]){let s=this._getApiUrl(i,"/"),a=(yield this.axios(F(I({},e),{method:"get",url:s}))).conceptschemes.find(l=>P.compare(l,i)),u=a&&(a.prefLabel||a.label||a.title);u&&(i.prefLabel||(i.prefLabel={}),i.prefLabel[this._language]=u),n.push(i),this._approvedSchemes=this._approvedSchemes||[],this._approvedSchemes.find(l=>P.compare(i,l))||this._approvedSchemes.push({uri:a.uri,identifier:P.getAllUris(i)})}return n})}getTop(n){return E(this,null,function*(){var i=n,{scheme:e}=i,r=W(i,["scheme"]);let s=this._getApiUrl(e,"/topConcepts"),o=yield this._getSchemeUri(e);if(!o)throw new U({parameter:"scheme",message:"Missing or unsupported scheme or VOCID property on scheme"});r.params||(r.params={}),r.params.scheme=o;let a=yield this.axios(F(I({},r),{method:"get",url:s})),u=[];for(let l of a.topconcepts||[]){let c=this._toJskosConcept(l,{scheme:e,language:this._language});c.topConceptOf=[e],u.push(c)}return u})}getConcepts(n){return E(this,null,function*(){var i=n,{concepts:e}=i,r=W(i,["concepts"]);var o,a;Array.isArray(e)||(e=[e]),e=e.map(u=>({uri:u.uri,inScheme:u.inScheme}));let s=[];for(let u of e){if(!u||!u.uri)throw new U({parameter:"concept",message:"Missing concept URI"});let l={uri:u.uri,format:"application/json"},c=this._getApiUrl((o=u==null?void 0:u.inScheme)==null?void 0:o[0],"/data",l);if(!c)continue;let f=yield this.axios(F(I({},r),{method:"get",url:c})),m=(a=f==null?void 0:f.graph)==null?void 0:a.find(g=>P.compare(g,u));if(m){let g=this._toJskosConcept(m,{concept:u,result:f});for(let h of["broader","narrower"]){let d=m[h]||g[h];d&&!Array.isArray(d)&&(d=[d]),d||(d=[]),g[h]=d.map(y=>this._toJskosConcept(f.graph.find(O=>P.compare(O,y)),{scheme:u.inScheme[0],result:f}))}g.ancestors=[],s.push(g)}}return s})}getNarrower(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=W(i,["concept"]);if(!e||!e.uri)throw new U({parameter:"concept"});let s=e.inScheme[0],o=this._getApiUrl(s,"/children");return r.params||(r.params={}),r.params.uri=e.uri,((yield this.axios(F(I({},r),{method:"get",url:o}))).narrower||[]).map(l=>this._toJskosConcept(l,{scheme:s}))})}getAncestors(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=W(i,["concept"]);var f,m,g,h;if(!e||!e.uri)throw new U({parameter:"concept"});let s=e.inScheme[0],o=this._getApiUrl(s,"/broaderTransitive");r.params||(r.params={}),r.params.uri=e.uri;let a=yield this.axios(F(I({},r),{method:"get",url:o})),u=[],l=e.uri;for(;l;){if(l!=e.uri){let d=(f=a==null?void 0:a.broaderTransitive)==null?void 0:f[l];u=u.concat([d])}l=(h=(g=(m=a==null?void 0:a.broaderTransitive)==null?void 0:m[l])==null?void 0:g.broader)==null?void 0:h[0]}return u.map(d=>this._toJskosConcept(d,{scheme:s})).filter(d=>d.uri!=e.uri)})}search(o){return E(this,null,function*(){var a=o,{search:e,scheme:r,limit:n,types:i=[]}=a,s=W(a,["search","scheme","limit","types"]);let u=this._getApiUrl(r,"/search");return s.params||(s.params={}),s.params.query=`${e}*`,s.params.unique=1,s.params.maxhits=n||100,s.params.type=i.join(" "),((yield this.axios(F(I({},s),{method:"get",url:u}))).results||[]).map(f=>this._toJskosConcept(f,{scheme:r}))})}getTypes(n){return E(this,null,function*(){var i=n,{scheme:e}=i,r=W(i,["scheme"]);let s=this._getApiUrl(e,"/types"),o=[],a=yield this.axios(F(I({},r),{method:"get",url:s}));for(let u of(a==null?void 0: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})}};ee(He,"supports",{scheme:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,types:!0,suggest:!0,search:!0});He.providerName="SkosmosApi";He.providerType="http://bartoc.org/api-type/skosmos";var Gr="http://id.loc.gov/authorities/",Xr=[{uri:`${Gr}subjects`,identifier:["http://bartoc.org/en/node/454"],notation:["LCSH"],concepts:[null],topConcepts:[]},{uri:`${Gr}names`,identifier:["http://bartoc.org/en/node/18536"],notation:["LCNAF"],concepts:[null],topConcepts:[]}],po=`${Gr}classification`;function mo(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 $l(t){let e=mo(t);return e.namespace=e.uri+"/",e.type=["http://www.w3.org/2004/02/skos/core#ConceptScheme"],e}var gi=t=>e=>!e||!t||!t.namespace?!0:e.uri.startsWith(t.namespace);function Wl(t,{scheme:e}){let r=mo(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(s=>Xr.find(o=>o.uri===s["@id"])),(!r.inScheme.length||!r.inScheme[0])&&delete r.inScheme;let n=t["http://www.loc.gov/mads/rdf/v1#hasNarrowerAuthority"]||P.compare(r.inScheme[0],{uri:po})&&t["http://www.loc.gov/mads/rdf/v1#hasMADSCollectionMember"]||[];r.narrower=n.map(s=>({uri:s["@id"]})).filter(gi(r.inScheme&&r.inScheme[0]));let i=t["http://www.loc.gov/mads/rdf/v1#hasBroaderAuthority"]||P.compare(r.inScheme[0],{uri:po})&&t["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSCollection"]||[];return r.broader=i.map(s=>({uri:s["@id"]})).filter(gi(r.inScheme&&r.inScheme[0])),r}var qe=class extends G{static _registryConfigForBartocApiConfig({scheme:e}={}){return!e||!Xr.find(r=>P.compare(r,e))?null:{schemes:[e]}}getSchemes(){return E(this,null,function*(){let e=[];for(let r of yield Promise.all(Xr.filter(n=>!this.schemes||!this.schemes.length||this.schemes.find(i=>P.compare(n,i))).map(n=>pe({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=P.merge($l(o),n),o.topConcepts=(o.topConcepts||[]).filter(a=>a),o}return null}))))r&&e.push(r);return e})}getConcepts(r){return E(this,arguments,function*({concepts:e}){Array.isArray(e)||(e=[e]);let n=[];for(let i of yield Promise.all(e.map(s=>pe({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?Wl(u,{scheme:s.inScheme&&s.inScheme[0]}):null}}))))i&&n.push(i);return n})}suggest(e){return E(this,null,function*(){let r=yield this.search(e);return[e.search,r.map(n=>P.prefLabel(n,{fallbackToUri:!0})),[],r.map(n=>n.uri)]})}search(s){return E(this,arguments,function*({search:e,scheme:r,limit:n,offset:i}){let o=P.getAllUris(r).find(u=>u.startsWith(Gr));if(!o||!Xr.find(u=>P.compare(u,{uri:o})))throw new U({parameter:"scheme",message:"provided scheme is not supported (yet)"});if(!e)throw new U({parameter:"search",message:"parameter is empty or missing"});n=n||this._jskos.suggestResultLimit||100,i=i||0;let{data:a}=yield pe({method:"get",url:`${o}/suggest2`.replace("http:","https:"),params:{q:e,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(gi(r))})}};ee(qe,"supports",{schemes:!0,top:!1,data:!0,concepts:!0,narrower:!1,ancestors:!1,suggest:!0,search:!0});qe.providerName="LocApi";qe.providerType="http://bartoc.org/api-type/loc";var ko={};var H;function ye(t,e,r){let n=typeof r,i=typeof t;if(n!=="undefined"){if(i!=="undefined"){if(r){if(i==="function"&&n===i)return function(a){return t(r(a))};if(e=t.constructor,e===r.constructor){if(e===Array)return r.concat(t);if(e===Map){var s=new Map(r);for(var o of t)s.set(o[0],o[1]);return s}if(e===Set){o=new Set(r);for(s of t.values())o.add(s);return o}}}return t}return r}return i==="undefined"?e:t}function Bt(t,e){return typeof t=="undefined"?e:t}function le(){return Object.create(null)}function Pe(t){return typeof t=="string"}function _r(t){return typeof t=="object"}function br(t,e){if(Pe(e))t=t[e];else for(let r=0;t&&r<e.length;r++)t=t[e[r]];return t}var Hl=/[^\p{L}\p{N}]+/u,ql=/(\d{3})/g,Vl=/(\D)(\d{3})/g,Jl=/(\d{3})(\D)/g,go=/[\u0300-\u036f]/g;function $t(t={}){if(!this||this.constructor!==$t)return new $t(...arguments);if(arguments.length)for(t=0;t<arguments.length;t++)this.assign(arguments[t]);else this.assign(t)}H=$t.prototype;H.assign=function(t){this.normalize=ye(t.normalize,!0,this.normalize);let e=t.include,r=e||t.exclude||t.split,n;if(r||r===""){if(typeof r=="object"&&r.constructor!==RegExp){let i="";n=!e,e||(i+="\\p{Z}"),r.letter&&(i+="\\p{L}"),r.number&&(i+="\\p{N}",n=!!e),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("["+(e?"^":"")+i+"]+","u")}catch(s){this.split=/\s+/}}else this.split=r,n=r===!1||"a1a".split(r).length<2;this.numeric=ye(t.numeric,n)}else{try{this.split=ye(this.split,Hl)}catch(i){this.split=/\s+/}this.numeric=ye(t.numeric,ye(this.numeric,!0))}if(this.prepare=ye(t.prepare,null,this.prepare),this.finalize=ye(t.finalize,null,this.finalize),r=t.filter,this.filter=typeof r=="function"?r:ye(r&&new Set(r),null,this.filter),this.dedupe=ye(t.dedupe,!0,this.dedupe),this.matcher=ye((r=t.matcher)&&new Map(r),null,this.matcher),this.mapper=ye((r=t.mapper)&&new Map(r),null,this.mapper),this.stemmer=ye((r=t.stemmer)&&new Map(r),null,this.stemmer),this.replacer=ye(t.replacer,null,this.replacer),this.minlength=ye(t.minlength,1,this.minlength),this.maxlength=ye(t.maxlength,1024,this.maxlength),this.rtl=ye(t.rtl,!1,this.rtl),(this.cache=r=ye(t.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};H.addStemmer=function(t,e){return this.stemmer||(this.stemmer=new Map),this.stemmer.set(t,e),this.A+=(this.A?"|":"")+t,this.K=null,this.cache&&_t(this),this};H.addFilter=function(t){return typeof t=="function"?this.filter=t:(this.filter||(this.filter=new Set),this.filter.add(t)),this.cache&&_t(this),this};H.addMapper=function(t,e){return typeof t=="object"?this.addReplacer(t,e):t.length>1?this.addMatcher(t,e):(this.mapper||(this.mapper=new Map),this.mapper.set(t,e),this.cache&&_t(this),this)};H.addMatcher=function(t,e){return typeof t=="object"?this.addReplacer(t,e):t.length<2&&(this.dedupe||this.mapper)?this.addMapper(t,e):(this.matcher||(this.matcher=new Map),this.matcher.set(t,e),this.h+=(this.h?"|":"")+t,this.J=null,this.cache&&_t(this),this)};H.addReplacer=function(t,e){return typeof t=="string"?this.addMatcher(t,e):(this.replacer||(this.replacer=[]),this.replacer.push(t,e),this.cache&&_t(this),this)};H.encode=function(t,e){if(this.cache&&t.length<=this.H)if(this.F){if(this.B.has(t))return this.B.get(t)}else this.F=setTimeout(_t,50,this);this.normalize&&(typeof this.normalize=="function"?t=this.normalize(t):t=go?t.normalize("NFKD").replace(go,"").toLowerCase():t.toLowerCase()),this.prepare&&(t=this.prepare(t)),this.numeric&&t.length>3&&(t=t.replace(Vl,"$1 $2").replace(Jl,"$1 $2").replace(ql,"$1 "));let r=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer),n=[],i=le(),s,o,a=this.split||this.split===""?t.split(this.split):[t];for(let l=0,c,f;l<a.length;l++)if((c=f=a[l])&&!(c.length<this.minlength||c.length>this.maxlength)){if(e){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(_t,50,this);if(this.stemmer){this.K||(this.K=new RegExp("(?!^)("+this.A+")$"));let m;for(;m!==c&&c.length>2;)m=c,c=c.replace(this.K,g=>this.stemmer.get(g))}if(c&&(this.mapper||this.dedupe&&c.length>1)){u="";for(let m=0,g="",h,d;m<c.length;m++)h=c.charAt(m),h===g&&this.dedupe||((d=this.mapper&&this.mapper.get(h))||d===""?d===g&&this.dedupe||!(g=d)||(u+=d):u+=g=h);c=u}if(this.matcher&&c.length>1&&(this.J||(this.J=new RegExp("("+this.h+")","g")),c=c.replace(this.J,m=>this.matcher.get(m))),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&&f.length<=this.I&&(this.D.set(f,c),this.D.size>this.L&&(this.D.clear(),this.I=this.I/1.1|0)),c){if(c!==f)if(e){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&&t.length<=this.H&&(this.B.set(t,n),this.B.size>this.L&&(this.B.clear(),this.H=this.H/1.1|0)),n};function _t(t){t.F=null,t.B.clear(),t.D.clear()}function Ei(t,e,r){r||(e||typeof t!="object"?typeof e=="object"&&(r=e,e=0):r=t),r&&(t=r.query||t,e=r.limit||e);let n=""+(e||0);r&&(n+=(r.offset||0)+!!r.context+!!r.suggest+(r.resolve!==!1)+(r.resolution||this.resolution)+(r.boost||0)),t=(""+t).toLowerCase(),this.cache||(this.cache=new St);let i=this.cache.get(t+n);if(!i){let s=r&&r.cache;s&&(r.cache=!1),i=this.search(t,e,r),s&&(r.cache=s),this.cache.set(t+n,i)}return i}function St(t){this.limit=t&&t!==!0?t:1e3,this.cache=new Map,this.h=""}St.prototype.set=function(t,e){this.cache.set(this.h=t,e),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)};St.prototype.get=function(t){let e=this.cache.get(t);return e&&this.h!==t&&(this.cache.delete(t),this.cache.set(this.h=t,e)),e};St.prototype.remove=function(t){for(let e of this.cache){let r=e[0];e[1].includes(t)&&this.cache.delete(r)}};St.prototype.clear=function(){this.cache.clear(),this.h=""};var wo={normalize:!1,numeric:!1,dedupe:!1},Qr={},yi=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"]]),yo=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),_o=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\1+/g,"$1"],bo={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},Ai={Exact:wo,Default:Qr,Normalize:Qr,LatinBalance:{mapper:yi},LatinAdvanced:{mapper:yi,matcher:yo,replacer:_o},LatinExtra:{mapper:yi,replacer:_o.concat([/(?!^)[aeo]/g,""]),matcher:yo},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(t){for(let r=0;r<t.length;r++){var e=t[r];let n=e.charAt(0),i=bo[n];for(let s=1,o;s<e.length&&(o=e.charAt(s),o==="h"||o==="w"||!(o=bo[o])||o===i||(n+=o,i=o,n.length!==4));s++);t[r]=n}}},CJK:{split:""},LatinExact:wo,LatinDefault:Qr,LatinSimple:Qr};function vo(t,e,r,n){let i=[];for(let s=0,o;s<t.index.length;s++)if(o=t.index[s],e>=o.length)e-=o.length;else{e=o[n?"splice":"slice"](e,r);let a=e.length;if(a&&(i=i.length?i.concat(e):e,r-=a,n&&(t.length-=a),!r))break;e=0}return i}function Wt(t){if(!this||this.constructor!==Wt)return new Wt(t);this.index=t?[t]:[],this.length=t?t.length:0;let e=this;return new Proxy([],{get(r,n){if(n==="length")return e.length;if(n==="push")return function(i){e.index[e.index.length-1].push(i),e.length++};if(n==="pop")return function(){if(e.length)return e.length--,e.index[e.index.length-1].pop()};if(n==="indexOf")return function(i){let s=0;for(let o=0,a,u;o<e.index.length;o++){if(a=e.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<e.index.length;s++)if(e.index[s].includes(i))return!0;return!1};if(n==="slice")return function(i,s){return vo(e,i||0,s||e.length,!1)};if(n==="splice")return function(i,s){return vo(e,i||0,s||e.length,!0)};if(n==="constructor")return Array;if(typeof n!="symbol")return(r=e.index[n/rt(2,31)|0])&&r[n]},set(r,n,i){return r=n/rt(2,31)|0,(e.index[r]||(e.index[r]=[]))[n]=i,e.length++,!0}})}Wt.prototype.clear=function(){this.index.length=0};Wt.prototype.push=function(){};function De(t=8){if(!this||this.constructor!==De)return new De(t);this.index=le(),this.h=[],this.size=0,t>32?(this.B=Io,this.A=BigInt(t)):(this.B=Ro,this.A=t)}De.prototype.get=function(t){let e=this.index[this.B(t)];return e&&e.get(t)};De.prototype.set=function(t,e){var r=this.B(t);let n=this.index[r];n?(r=n.size,n.set(t,e),(r-=n.size)&&this.size++):(this.index[r]=n=new Map([[t,e]]),this.h.push(n),this.size++)};function Me(t=8){if(!this||this.constructor!==Me)return new Me(t);this.index=le(),this.h=[],this.size=0,t>32?(this.B=Io,this.A=BigInt(t)):(this.B=Ro,this.A=t)}Me.prototype.add=function(t){var e=this.B(t);let r=this.index[e];r?(e=r.size,r.add(t),(e-=r.size)&&this.size++):(this.index[e]=r=new Set([t]),this.h.push(r),this.size++)};H=De.prototype;H.has=Me.prototype.has=function(t){let e=this.index[this.B(t)];return e&&e.has(t)};H.delete=Me.prototype.delete=function(t){let e=this.index[this.B(t)];e&&e.delete(t)&&this.size--};H.clear=Me.prototype.clear=function(){this.index=le(),this.h=[],this.size=0};H.values=Me.prototype.values=function*(){for(let t=0;t<this.h.length;t++)for(let e of this.h[t].values())yield e};H.keys=Me.prototype.keys=function*(){for(let t=0;t<this.h.length;t++)for(let e of this.h[t].keys())yield e};H.entries=Me.prototype.entries=function*(){for(let t=0;t<this.h.length;t++)for(let e of this.h[t].entries())yield e};function Ro(t){let e=rt(2,this.A)-1;if(typeof t=="number")return t&e;let r=0,n=this.A+1;for(let i=0;i<t.length;i++)r=(r*n^t.charCodeAt(i))&e;return this.A===32?r+rt(2,31):r}function Io(t){let e=rt(BigInt(2),this.A)-BigInt(1);var r=typeof t;if(r==="bigint")return t&e;if(r==="number")return BigInt(t)&e;r=BigInt(0);let n=this.A+BigInt(1);for(let i=0;i<t.length;i++)r=(r*n^BigInt(t.charCodeAt(i)))&e;return r}var jt,yr;function Kl(t){return E(this,null,function*(){t=t.data;var e=t.task;let r=t.id,n=t.args;if(e==="init")yr=t.options||{},(e=t.factory)?(Function("return "+e)()(self),jt=new self.FlexSearch.Index(yr),delete self.FlexSearch):jt=new Ne(yr),postMessage({id:r});else{let i;e==="export"&&(n[1]?(n[0]=yr.export,n[2]=0,n[3]=1):n=null),e==="import"?n[0]&&(t=yield yr.import.call(jt,n[0]),jt.import(n[0],t)):((i=n&&jt[e].apply(jt,n))&&i.then&&(i=yield i),i&&i.await&&(i=yield i.await),e==="search"&&i.result&&(i=i.result)),postMessage(e==="search"?{id:r,msg:i}:{id:r})}})}function Ci(t){Ut.call(t,"add"),Ut.call(t,"append"),Ut.call(t,"search"),Ut.call(t,"update"),Ut.call(t,"remove"),Ut.call(t,"searchCache")}var bi,So,tn;function Yl(){bi=tn=0}function Ut(t){this[t+"Async"]=function(){let e=arguments;var r=e[e.length-1];let n;if(typeof r=="function"&&(n=r,delete e[e.length-1]),bi?tn||(tn=Date.now()-So>=this.priority*this.priority*3):(bi=setTimeout(Yl,0),So=Date.now()),tn){let s=this;return new Promise(o=>{setTimeout(function(){o(s[t+"Async"].apply(s,e))},0)})}let i=this[t].apply(this,e);return r=i.then?i:new Promise(s=>s(i)),n&&r.then(n),r}}var ot=0;function bt(t={},e){function r(a){function u(l){l=l.data||l;let c=l.id,f=c&&s.h[c];f&&(f(l.msg),delete s.h[c])}if(this.worker=a,this.h=le(),this.worker)return i?this.worker.on("message",u):this.worker.onmessage=u,t.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:t})}):(this.priority=t.priority||4,this.encoder=e||null,this.worker.postMessage({task:"init",factory:n,options:t}),this)}if(!this||this.constructor!==bt)return new bt(t);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=Xl(n,i,t.worker);return o.then?o.then(function(a){return r.call(s,a)}):r.call(this,o)}at("add");at("append");at("search");at("update");at("remove");at("clear");at("export");at("import");bt.prototype.searchCache=Ei;Ci(bt.prototype);function at(t){bt.prototype[t]=function(){let e=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){t==="export"&&typeof r[0]=="function"&&(r[0]=null),ot>1e9&&(ot=0),e.h[++ot]=s,e.worker.postMessage({task:t,id:ot,args:r})}),i?(n.then(i),this):n}}function Xl(t,e,r){return e?typeof module!="undefined"?new(wi()).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>ns(wi(),1)).then(function(n){return new n.Worker(ko.dirname+"/node/node.mjs")}):t?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+Kl.toString()],{type:"text/javascript"}))):new window.Worker(typeof r=="string"?r:ko.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"})}vt.prototype.add=function(t,e,r){if(_r(t)&&(e=t,t=br(e,this.key)),e&&(t||t===0)){if(!r&&this.reg.has(t))return this.update(t,e);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(e);i&&n.add(t,i,r,!0)}else i=u.G,(!i||i(e))&&(u.constructor===String?u=[""+u]:Pe(u)&&(u=[u]),Si(e,u,this.D,0,n,t,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=le();if(typeof s=="function"){if(s=s(e),!s)continue}else{var o=s.G;if(o&&!o(e))continue;s.constructor===String&&(s=""+s),s=br(e,s)}if(i&&s){Pe(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(t))){if(c.length===rt(2,31)-1){if(o=new Wt(c),this.fastupdate)for(let f of this.reg.values())f.includes(c)&&(f[f.indexOf(c)]=o);i.set(l,c=o)}c.push(t),this.fastupdate&&((o=this.reg.get(t))?o.push(c):this.reg.set(t,[c]))}}}if(this.store&&(!r||!this.store.has(t))){let a;if(this.h){a=le();for(let u=0,l;u<this.h.length;u++){if(l=this.h[u],(r=l.G)&&!r(e))continue;let c;if(typeof l=="function"){if(c=l(e),!c)continue;l=[l.O]}else if(Pe(l)||l.constructor===String){a[l]=e[l];continue}vi(e,a,l,0,l[0],c)}}this.store.set(t,a||e)}this.worker&&(this.fastupdate||this.reg.add(t))}return this};function vi(t,e,r,n,i,s){if(t=t[i],n===r.length-1)e[i]=s||t;else if(t)if(t.constructor===Array)for(e=e[i]=Array(t.length),i=0;i<t.length;i++)vi(t,e,r,n,i);else e=e[i]||(e[i]=le()),i=r[++n],vi(t,e,r,n,i)}function Si(t,e,r,n,i,s,o,a){if(t=t[o])if(n===e.length-1){if(t.constructor===Array){if(r[n]){for(e=0;e<t.length;e++)i.add(s,t[e],!0,!0);return}t=t.join(" ")}i.add(s,t,a,!0)}else if(t.constructor===Array)for(o=0;o<t.length;o++)Si(t,e,r,n,i,s,o,a);else o=e[++n],Si(t,e,r,n,i,s,o,a)}function Oi(t,e,r,n){if(!t.length)return t;if(t.length===1)return t=t[0],t=r||t.length>e?t.slice(r,r+e):t,n?zt.call(this,t):t;let i=[];for(let s=0,o,a;s<t.length;s++)if((o=t[s])&&(a=o.length)){if(r){if(r>=a){r-=a;continue}o=o.slice(r,r+e),a=o.length,r=0}if(a>e&&(o=o.slice(0,e),a=e),!i.length&&a>=e)return n?zt.call(this,o):o;if(i.push(o),e-=a,!e)break}return i=i.length>1?[].concat.apply([],i):i[0],n?zt.call(this,i):i}function ln(t,e,r,n){var i=n[0];if(i[0]&&i[0].query)return t[e].apply(t,i);if(!(e!=="and"&&e!=="not"||t.result.length||t.await||i.suggest))return n.length>1&&(i=n[n.length-1]),(n=i.resolve)?t.await||t.result:t;let s=[],o=0,a=0,u,l,c,f,m;for(e=0;e<n.length;e++)if(i=n[e]){var g=void 0;if(i.constructor===oe)g=i.await||i.result;else if(i.then||i.constructor===Array)g=i;else{o=i.limit||0,a=i.offset||0,c=i.suggest,l=i.resolve,u=((f=i.highlight||t.highlight)||i.enrich)&&l,g=i.queue;let h=i.async||g,d=i.index,y=i.query;if(d?t.index||(t.index=d):d=t.index,y||i.tag){let O=i.field||i.pluck;if(O&&(!y||t.query&&!f||(t.query=y,t.field=O,t.highlight=f),d=d.index.get(O)),g&&(m||t.await)){m=1;let R,C=t.C.length,L=new Promise(function(N){R=N});(function(N,S){L.h=function(){S.index=null,S.resolve=!1;let k=h?N.searchAsync(S):N.search(S);return k.then?k.then(function(D){return t.C[C]=D=D.result||D,R(D),D}):(k=k.result||k,R(k),k)}})(d,Object.assign({},i)),t.C.push(L),s[e]=L;continue}else i.resolve=!1,i.index=null,g=h?d.searchAsync(i):d.search(i),i.resolve=l,i.index=d}else if(i.and)g=Zr(i,"and",d);else if(i.or)g=Zr(i,"or",d);else if(i.not)g=Zr(i,"not",d);else if(i.xor)g=Zr(i,"xor",d);else continue}g.await?(m=1,g=g.await):g.then?(m=1,g=g.then(function(h){return h.result||h})):g=g.result||g,s[e]=g}if(m&&!t.await&&(t.await=new Promise(function(h){t.return=h})),m){let h=Promise.all(s).then(function(d){for(let y=0;y<t.C.length;y++)if(t.C[y]===h){t.C[y]=function(){return r.call(t,d,o,a,u,l,c,f)};break}ki(t)});t.C.push(h)}else if(t.await)t.C.push(function(){return r.call(t,s,o,a,u,l,c,f)});else return r.call(t,s,o,a,u,l,c,f);return l?t.await||t.result:t}function Zr(t,e,r){t=t[e];let n=t[0]||t;return n.index||(n.index=r),r=new oe(n),t.length>1&&(r=r[e].apply(r,t.slice(1))),r}oe.prototype.or=function(){return ln(this,"or",Gl,arguments)};function Gl(t,e,r,n,i,s,o){return t.length&&(this.result.length&&t.push(this.result),t.length<2?this.result=t[0]:(this.result=To(t,e,r,!1,this.h),r=0)),i&&(this.await=null),i?this.resolve(e,r,n,o):this}oe.prototype.and=function(){return ln(this,"and",Ql,arguments)};function Ql(t,e,r,n,i,s,o){if(!s&&!this.result.length)return i?this.result:this;let a;if(t.length)if(this.result.length&&t.unshift(this.result),t.length<2)this.result=t[0];else{let u=0;for(let l=0,c,f;l<t.length;l++)if((c=t[l])&&(f=c.length))u<f&&(u=f);else if(!s){u=0;break}u?(this.result=nn(t,u,e,r,s,this.h,i),a=!0):this.result=[]}else s||(this.result=t);return i&&(this.await=null),i?this.resolve(e,r,n,o,a):this}oe.prototype.xor=function(){return ln(this,"xor",Zl,arguments)};function Zl(t,e,r,n,i,s,o){if(t.length)if(this.result.length&&t.unshift(this.result),t.length<2)this.result=t[0];else{e:{s=r;var a=this.h;let u=[],l=le(),c=0;for(let f=0,m;f<t.length;f++)if(m=t[f]){c<m.length&&(c=m.length);for(let g=0,h;g<m.length;g++)if(h=m[g])for(let d=0,y;d<h.length;d++)y=h[d],l[y]=l[y]?2:1}for(let f=0,m,g=0;f<c;f++)for(let h=0,d;h<t.length;h++)if((d=t[h])&&(m=d[f])){for(let y=0,O;y<m.length;y++)if(O=m[y],l[O]===1)if(s)s--;else if(i){if(u.push(O),u.length===e){t=u;break e}}else{let R=f+(h?a:0);if(u[R]||(u[R]=[]),u[R].push(O),++g===e){t=u;break e}}}t=u}this.result=t,a=!0}else s||(this.result=t);return i&&(this.await=null),i?this.resolve(e,r,n,o,a):this}oe.prototype.not=function(){return ln(this,"not",ec,arguments)};function ec(t,e,r,n,i,s,o){if(!s&&!this.result.length)return i?this.result:this;if(t.length&&this.result.length){e:{s=r;var a=[];t=new Set(t.flat().flat());for(let u=0,l,c=0;u<this.result.length;u++)if(l=this.result[u]){for(let f=0,m;f<l.length;f++)if(m=l[f],!t.has(m)){if(s)s--;else if(i){if(a.push(m),a.length===e){t=a;break e}}else if(a[u]||(a[u]=[]),a[u].push(m),++c===e){t=a;break e}}}t=a}this.result=t,a=!0}return i&&(this.await=null),i?this.resolve(e,r,n,o,a):this}function rn(t,e,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 f=0;if(typeof i=="object"){var m=i.template;f=m.length-2,i=i.pattern}typeof i!="string"&&(i=i===!1?"":"..."),f&&(i=m.replace("$1",i)),m=i.length-f;let g,h;typeof u=="object"&&(g=u.before,g===0&&(g=-1),h=u.after,h===0&&(h=-1),u=u.total||9e5),f=new Map;for(let lt=0,be,Vt,ct;lt<e.length;lt++){let ft;if(n)ft=e,ct=n;else{var d=e[lt];if(ct=d.field,!ct)continue;ft=d.result}Vt=r.get(ct),be=Vt.encoder,d=f.get(be),typeof d!="string"&&(d=be.encode(t),f.set(be,d));for(let ve=0;ve<ft.length;ve++){var y=ft[ve].doc;if(!y||(y=br(y,ct),!y))continue;var O=y.trim().split(/\s+/);if(!O.length)continue;y="";var R=[];let ht=[];for(var C=-1,L=-1,N=0,S=0;S<O.length;S++){var k=O[S],D=be.encode(k);D=D.length>1?D.join(" "):D[0];let J;if(D&&k){for(var $=k.length,X=(be.split?k.replace(be.split,""):k).length-D.length,K="",V=0,Z=0;Z<d.length;Z++){var se=d[Z];if(se){var re=se.length;re+=X<0?0:X,V&&re<=V||(se=D.indexOf(se),se>-1&&(K=(se?k.substring(0,se):"")+o+k.substring(se,se+re)+a+(se+re<$?k.substring(se+re):""),V=re,J=!0))}}K&&(u&&(C<0&&(C=y.length+(y?1:0)),L=y.length+(y?1:0)+K.length,N+=$,ht.push(R.length),R.push({match:K})),y+=(y?" ":"")+K)}if(!J)k=O[S],y+=(y?" ":"")+k,u&&R.push({text:k});else if(u&&N>=u)break}if(N=ht.length*(s.length-2),g||h||u&&y.length-N>u)if(N=u+N-m*2,S=L-C,g>0&&(S+=g),h>0&&(S+=h),S<=N)O=g?C-(g>0?g:0):C-((N-S)/2|0),R=h?L+(h>0?h:0):O+N,l||(O>0&&y.charAt(O)!==" "&&y.charAt(O-1)!==" "&&(O=y.indexOf(" ",O),O<0&&(O=0)),R<y.length&&y.charAt(R-1)!==" "&&y.charAt(R)!==" "&&(R=y.lastIndexOf(" ",R),R<L?R=L:++R)),y=(O?i:"")+y.substring(O,R)+(R<y.length?i:"");else{for(L=[],C={},N={},S={},k={},D={},K=X=$=0,Z=V=1;;){var _e=void 0;for(let J=0,ae;J<ht.length;J++){if(ae=ht[J],K)if(X!==K){if(S[J+1])continue;if(ae+=K,C[ae]){$-=m,N[J+1]=1,S[J+1]=1;continue}if(ae>=R.length-1){if(ae>=R.length){S[J+1]=1,ae>=O.length&&(N[J+1]=1);continue}$-=m}if(y=R[ae].text,re=h&&D[J])if(re>0){if(y.length>re)if(S[J+1]=1,l)y=y.substring(0,re);else continue;(re-=y.length)||(re=-1),D[J]=re}else{S[J+1]=1;continue}if($+y.length+1<=u)y=" "+y,L[J]+=y;else if(l)_e=u-$-1,_e>0&&(y=" "+y.substring(0,_e),L[J]+=y),S[J+1]=1;else{S[J+1]=1;continue}}else{if(S[J])continue;if(ae-=X,C[ae]){$-=m,S[J]=1,N[J]=1;continue}if(ae<=0){if(ae<0){S[J]=1,N[J]=1;continue}$-=m}if(y=R[ae].text,re=g&&k[J])if(re>0){if(y.length>re)if(S[J]=1,l)y=y.substring(y.length-re);else continue;(re-=y.length)||(re=-1),k[J]=re}else{S[J]=1;continue}if($+y.length+1<=u)y+=" ",L[J]=y+L[J];else if(l)_e=y.length+1-(u-$),_e>=0&&_e<y.length&&(y=y.substring(_e)+" ",L[J]=y+L[J]),S[J]=1;else{S[J]=1;continue}}else{y=R[ae].match,g&&(k[J]=g),h&&(D[J]=h),J&&$++;let Jt;if(ae?!J&&m&&($+=m):(N[J]=1,S[J]=1),ae>=O.length-1||ae<R.length-1&&R[ae+1].match?Jt=1:m&&($+=m),$-=s.length-2,!J||$+y.length<=u)L[J]=y;else{_e=V=Z=N[J]=0;break}Jt&&(N[J+1]=1,S[J+1]=1)}$+=y.length,_e=C[ae]=1}if(_e)X===K?K++:X++;else{if(X===K?V=0:Z=0,!V&&!Z)break;V?(X++,K=X):K++}}y="";for(let J=0,ae;J<L.length;J++)ae=(N[J]?J?" ":"":(J&&!i?" ":"")+i)+L[J],y+=ae;i&&!N[L.length]&&(y+=i)}c&&(y=y.replace(c," ")),ft[ve].highlight=y}if(n)break}return e}function oe(t,e){if(!this||this.constructor!==oe)return new oe(t,e);let r=0,n,i,s,o,a,u;if(t&&t.index){let l=t;if(e=l.index,r=l.boost||0,i=l.query){s=l.field||l.pluck,o=l.highlight;let c=l.resolve;t=l.async||l.queue,l.resolve=!1,l.index=null,t=t?e.searchAsync(l):e.search(l),l.resolve=c,l.index=e,t=t.result||t}else t=[]}if(t&&t.then){let l=this;t=t.then(function(c){l.C[0]=l.result=c.result||c,ki(l)}),n=[t],t=[],a=new Promise(function(c){u=c})}this.index=e||null,this.result=t||[],this.h=r,this.C=n||[],this.await=a||null,this.return=u||null,this.highlight=o||null,this.query=i||"",this.field=s||""}H=oe.prototype;H.limit=function(t){if(this.await){let e=this;this.C.push(function(){return e.limit(t).result})}else if(this.result.length){let e=[];for(let r=0,n;r<this.result.length;r++)if(n=this.result[r])if(n.length<=t){if(e[r]=n,t-=n.length,!t)break}else{e[r]=n.slice(0,t);break}this.result=e}return this};H.offset=function(t){if(this.await){let e=this;this.C.push(function(){return e.offset(t).result})}else if(this.result.length){let e=[];for(let r=0,n;r<this.result.length;r++)(n=this.result[r])&&(n.length<=t?t-=n.length:(e[r]=n.slice(t),t=0));this.result=e}return this};H.boost=function(t){if(this.await){let e=this;this.C.push(function(){return e.boost(t).result})}else this.h+=t;return this};function ki(t,e){let r=t.result;var n=t.await;t.await=null;for(let i=0,s;i<t.C.length;i++)if(s=t.C[i]){if(typeof s=="function")r=s(),t.C[i]=r=r.result||r,i--;else if(s.h)r=s.h(),t.C[i]=r=r.result||r,i--;else if(s.then)return t.await=n}return n=t.return,t.C=[],t.return=null,e||n(r),r}H.resolve=function(t,e,r,n,i){let s=this.await?ki(this,!0):this.result;if(s.then){let o=this;return s.then(function(){return o.resolve(t,e,r,n,i)})}return s.length&&(typeof t=="object"?(n=t.highlight||this.highlight,r=!!n||t.enrich,e=t.offset,t=t.limit):(n=n||this.highlight,r=!!n||r),s=i?r?zt.call(this.index,s):s:Oi.call(this.index,s,t||100,e,r)),this.finalize(s,n)};H.finalize=function(t,e){if(t.then){let n=this;return t.then(function(i){return n.finalize(i,e)})}e&&t.length&&this.query&&(t=rn(this.query,t,this.index.index,this.field,e));let r=this.return;return this.highlight=this.index=this.result=this.C=this.await=this.return=null,this.query=this.field="",r&&r(t),t};function nn(t,e,r,n,i,s,o){let a=t.length,u=[],l,c;l=le();for(let f=0,m,g,h,d;f<e;f++)for(let y=0;y<a;y++)if(h=t[y],f<h.length&&(m=h[f]))for(let O=0;O<m.length;O++){if(g=m[O],(c=l[g])?l[g]++:(c=0,l[g]=1),d=u[c]||(u[c]=[]),!o){let R=f+(y||!i?0:s||0);d=d[R]||(d[R]=[])}if(d.push(g),o&&r&&c===a-1&&d.length-n===r)return n?d.slice(n):d}if(t=u.length)if(i)u=u.length>1?To(u,r,n,o,s):(u=u[0])&&r&&u.length>r||n?u.slice(n,r+n):u;else{if(t<a)return[];if(u=u[t-1],r||n)if(o)(u.length>r||n)&&(u=u.slice(n,r+n));else{i=[];for(let f=0,m;f<u.length;f++)if(m=u[f]){if(n&&m.length>n)n-=m.length;else if((r&&m.length>r||n)&&(m=m.slice(n,r+n),r-=m.length,n&&(n-=m.length)),i.push(m),!r)break}u=i}}return u}function To(t,e,r,n,i){let s=[],o=le(),a;var u=t.length;let l;if(n){for(i=u-1;i>=0;i--)if(l=(n=t[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===e)return s}}}else for(let c=u-1,f,m=0;c>=0;c--){f=t[c];for(let g=0;g<f.length;g++)if(l=(n=f[g])&&n.length){for(let h=0;h<l;h++)if(a=n[h],!o[a])if(o[a]=1,r)r--;else{let d=(g+(c<u-1&&i||0))/(c+1)|0;if((s[d]||(s[d]=[])).push(a),++m===e)return s}}}return s}function tc(t,e,r,n,i){let s=le(),o=[];for(let a=0,u;a<e.length;a++){u=e[a];for(let l=0;l<u.length;l++)s[u[l]]=1}if(i){for(let a=0,u;a<t.length;a++)if(u=t[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<t.result.length;a++)for(u=t.result[a],e=0;e<u.length;e++)l=u[e],s[l]&&((o[a]||(o[a]=[])).push(l),s[l]=0);return o}le();vt.prototype.search=function(t,e,r,n){r||(!e&&_r(t)?(r=t,t=""):_r(e)&&(r=e,e=0));let i=[];var s=[];let o,a,u,l,c,f,m=0,g=!0,h;if(r){r.constructor===Array&&(r={index:r}),t=r.query||t,o=r.pluck,a=r.merge,l=r.boost,f=o||r.field||(f=r.index)&&(f.index?null:f);var d=this.tag&&r.tag;u=r.suggest,g=r.resolve!==!1,c=r.cache,h=g&&this.store&&r.highlight;var y=!!h||g&&this.store&&r.enrich;e=r.limit||e;var O=r.offset||0;if(e||(e=g?100:0),d&&(!this.db||!n)){d.constructor!==Array&&(d=[d]);var R=[];for(let k=0,D;k<d.length;k++)if(D=d[k],D.field&&D.tag){var C=D.tag;if(C.constructor===Array)for(var L=0;L<C.length;L++)R.push(D.field,C[L]);else R.push(D.field,C)}else{C=Object.keys(D);for(let $=0,X,K;$<C.length;$++)if(X=C[$],K=D[X],K.constructor===Array)for(L=0;L<K.length;L++)R.push(X,K[L]);else R.push(X,K)}if(d=R,!t){if(s=[],R.length)for(d=0;d<R.length;d+=2){if(this.db){if(n=this.index.get(R[d]),!n)continue;s.push(n=n.db.tag(R[d+1],e,O,y))}else n=rc.call(this,R[d],R[d+1],e,O,y);i.push(g?{field:R[d],tag:R[d+1],result:n}:[n])}if(s.length){let k=this;return Promise.all(s).then(function(D){for(let $=0;$<D.length;$++)g?i[$].result=D[$]:i[$]=D[$];return g?i:new oe(i.length>1?nn(i,1,0,0,u,l):i[0],k)})}return g?i:new oe(i.length>1?nn(i,1,0,0,u,l):i[0],this)}}g||o||!(f=f||this.field)||(Pe(f)?o=f:(f.constructor===Array&&f.length===1&&(f=f[0]),o=f.field||f.index)),f&&f.constructor!==Array&&(f=[f])}f||(f=this.field);let N;R=(this.worker||this.db)&&!n&&[];for(let k=0,D,$,X;k<f.length;k++){if($=f[k],this.db&&this.tag&&!this.B[k])continue;let K;if(Pe($)||(K=$,$=K.field,t=K.query||t,e=Bt(K.limit,e),O=Bt(K.offset,O),u=Bt(K.suggest,u),h=g&&this.store&&Bt(K.highlight,h),y=!!h||g&&this.store&&Bt(K.enrich,y),c=Bt(K.cache,c)),n)D=n[k];else{C=K||r||{},L=C.enrich;var S=this.index.get($);if(d&&(this.db&&(C.tag=d,C.field=f,N=S.db.support_tag_search),!N&&L&&(C.enrich=!1),N||(C.limit=0,C.offset=0)),D=c?S.searchCache(t,d&&!N?0:e,C):S.search(t,d&&!N?0:e,C),d&&!N&&(C.limit=e,C.offset=O),L&&(C.enrich=L),R){R[k]=D;continue}}if(X=(D=D.result||D)&&D.length,d&&X){if(C=[],L=0,this.db&&n){if(!N)for(S=f.length;S<n.length;S++){let V=n[S];if(V&&V.length)L++,C.push(V);else if(!u)return g?i:new oe(i,this)}}else for(let V=0,Z,se;V<d.length;V+=2){if(Z=this.tag.get(d[V]),!Z){if(u)continue;return g?i:new oe(i,this)}if(se=(Z=Z&&Z.get(d[V+1]))&&Z.length)L++,C.push(Z);else if(!u)return g?i:new oe(i,this)}if(L){if(D=tc(D,C,e,O,g),X=D.length,!X&&!u)return g?D:new oe(D,this);L--}}if(X)s[m]=$,i.push(D),m++;else if(f.length===1)return g?i:new oe(i,this)}if(R){if(this.db&&d&&d.length&&!N)for(y=0;y<d.length;y+=2){if(s=this.index.get(d[y]),!s){if(u)continue;return g?i:new oe(i,this)}R.push(s.db.tag(d[y+1],e,O,!1))}let k=this;return Promise.all(R).then(function(D){return r&&(r.resolve=g),D.length&&(D=k.search(t,e,r,D)),D})}if(!m)return g?i:new oe(i,this);if(o&&(!y||!this.store))return i=i[0],g?i:new oe(i,this);for(R=[],O=0;O<s.length;O++){if(d=i[O],y&&d.length&&typeof d[0].doc=="undefined"&&(this.db?R.push(d=this.index.get(this.field[0]).db.enrich(d)):d=zt.call(this,d)),o)return g?h?rn(t,d,this.index,o,h):d:new oe(d,this);i[O]={field:s[O],result:d}}if(y&&this.db&&R.length){let k=this;return Promise.all(R).then(function(D){for(let $=0;$<D.length;$++)i[$].result=D[$];return h&&(i=rn(t,i,k.index,o,h)),a?xo(i):i})}return h&&(i=rn(t,i,this.index,o,h)),a?xo(i):i};function xo(t){let e=[],r=le(),n=le();for(let i=0,s,o,a,u,l,c,f;i<t.length;i++){s=t[i],o=s.field,a=s.result;for(let m=0;m<a.length;m++)l=a[m],typeof l!="object"?l={id:u=l}:u=l.id,(c=r[u])?c.push(o):(l.field=r[u]=[o],e.push(l)),(f=l.highlight)&&(c=n[u],c||(n[u]=c={},l.highlight=c),c[o]=f)}return e}function rc(t,e,r,n,i){return t=this.tag.get(t),t?(t=t.get(e),t?(e=t.length-n,e>0&&((r&&e>r||n)&&(t=t.slice(n,n+r)),i&&(t=zt.call(this,t))),t):[]):[]}function zt(t){if(!this||!this.store)return t;if(this.db)return this.index.get(this.field[0]).db.enrich(t);let e=Array(t.length);for(let r=0,n;r<t.length;r++)n=t[r],e[r]={id:n,doc:this.store.get(n)};return e}function vt(t){if(!this||this.constructor!==vt)return new vt(t);let e=t.document||t.doc||t,r,n;if(this.B=[],this.field=[],this.D=[],this.key=(r=e.key||e.id)&&sn(r,this.D)||"id",(n=t.keystore||0)&&(this.keystore=n),this.fastupdate=!!t.fastupdate,this.reg=!this.fastupdate||t.worker||t.db?n?new Me(n):new Set:n?new De(n):new Map,this.h=(r=e.store||null)&&r&&r!==!0&&[],this.store=r?n?new De(n):new Map:null,this.cache=(r=t.cache||null)&&new St(r),t.cache=!1,this.worker=t.worker||!1,this.priority=t.priority||4,this.index=nc.call(this,t,e),this.tag=null,(r=e.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]=sn(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,t=[];for(let i of this.index.values())i.then&&t.push(i);if(t.length){let i=this;return Promise.all(t).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 t.db&&(this.fastupdate=!1,this.mount(t.db))}H=vt.prototype;H.mount=function(t){let e=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 Ne({},this.reg)),e===this.field&&(e=e.slice(0)),e.push(o),r.tag=this.tag.get(o)}r=[];let n={db:t.db,type:t.type,fastupdate:t.fastupdate};for(let s=0,o,a;s<e.length;s++){n.field=a=e[s],o=this.index.get(a);let u=new t.constructor(t.id,n);u.id=t.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})};H.commit=function(){return E(this,null,function*(){let t=[];for(let e of this.index.values())t.push(e.commit());yield Promise.all(t),this.reg.clear()})};H.destroy=function(){let t=[];for(let e of this.index.values())t.push(e.destroy());return Promise.all(t)};function nc(t,e){let r=new Map,n=e.index||e.field||e;Pe(n)&&(n=[n]);for(let s=0,o,a;s<n.length;s++){if(o=n[s],Pe(o)||(a=o,o=o.field),a=_r(a)?Object.assign({},t,a):t,this.worker){var i=void 0;i=(i=a.encoder)&&i.encode?i:new $t(typeof i=="string"?Ai[i]:i||{}),i=new bt(a,i),r.set(o,i)}this.worker||r.set(o,new Ne(a,this.reg)),a.custom?this.B[s]=a.custom:(this.B[s]=sn(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){t=e.store,Pe(t)&&(t=[t]);for(let s=0,o,a;s<t.length;s++)o=t[s],a=o.field||o,o.custom?(this.h[s]=o.custom,o.custom.O=a):(this.h[s]=sn(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 sn(t,e){let r=t.split(":"),n=0;for(let i=0;i<r.length;i++)t=r[i],t[t.length-1]==="]"&&(t=t.substring(0,t.length-2))&&(e[n]=!0),t&&(r[n++]=t);return n<r.length&&(r.length=n),n>1?r:r[0]}H.append=function(t,e){return this.add(t,e,!0)};H.update=function(t,e){return this.remove(t).add(t,e)};H.remove=function(t){_r(t)&&(t=br(t,this.key));for(var e of this.index.values())e.remove(t,!0);if(this.reg.has(t)){if(this.tag&&!this.fastupdate)for(let r of this.tag.values())for(let n of r){e=n[0];let i=n[1],s=i.indexOf(t);s>-1&&(i.length>1?i.splice(s,1):r.delete(e))}this.store&&this.store.delete(t),this.reg.delete(t)}return this.cache&&this.cache.remove(t),this};H.clear=function(){let t=[];for(let e of this.index.values()){let r=e.clear();r.then&&t.push(r)}if(this.tag)for(let e of this.tag.values())e.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),t.length?Promise.all(t):this};H.contain=function(t){return this.db?this.index.get(this.field[0]).db.has(t):this.reg.has(t)};H.cleanup=function(){for(let t of this.index.values())t.cleanup();return this};H.get=function(t){return this.db?this.index.get(this.field[0]).db.enrich(t).then(function(e){return e[0]&&e[0].doc||null}):this.store.get(t)||null};H.set=function(t,e){return typeof t=="object"&&(e=t,t=br(e,this.key)),this.store.set(t,e),this};H.searchCache=Ei;H.export=ic;H.import=sc;Ci(vt.prototype);function Ri(t,e=0){let r=[],n=[];e&&(e=25e4/e*5e3|0);for(let i of t.entries())n.push(i),n.length===e&&(r.push(n),n=[]);return n.length&&r.push(n),r}function Ii(t,e){e||(e=new Map);for(let r=0,n;r<t.length;r++)n=t[r],e.set(n[0],n[1]);return e}function Po(t,e=0){let r=[],n=[];e&&(e=25e4/e*1e3|0);for(let i of t.entries())n.push([i[0],Ri(i[1])[0]||[]]),n.length===e&&(r.push(n),n=[]);return n.length&&r.push(n),r}function Do(t,e){e||(e=new Map);for(let r=0,n,i;r<t.length;r++)n=t[r],i=e.get(n[0]),e.set(n[0],Ii(n[1],i));return e}function Mo(t){let e=[],r=[];for(let n of t.keys())r.push(n),r.length===25e4&&(e.push(r),r=[]);return r.length&&e.push(r),e}function No(t,e){e||(e=new Set);for(let r=0;r<t.length;r++)e.add(t[r]);return e}function on(t,e,r,n,i,s,o=0){let a=n&&n.constructor===Array;var u=a?n.shift():n;if(!u)return this.export(t,e,i,s+1);if((u=t((e?e+".":"")+(o+1)+"."+r,JSON.stringify(u)))&&u.then){let l=this;return u.then(function(){return on.call(l,t,e,r,a?n:null,i,s,o+1)})}return on.call(this,t,e,r,a?n:null,i,s,o+1)}function ic(t,e,r=0,n=0){if(r<this.field.length){let o=this.field[r];if((e=this.index.get(o).export(t,o,r,n=1))&&e.then){let a=this;return e.then(function(){return a.export(t,o,r+1)})}return this.export(t,o,r+1)}let i,s;switch(n){case 0:i="reg",s=Mo(this.reg),e=null;break;case 1:i="tag",s=this.tag&&Po(this.tag,this.reg.size),e=null;break;case 2:i="doc",s=this.store&&Ri(this.store),e=null;break;default:return}return on.call(this,t,e,i,s||null,r,n)}function sc(t,e){var r=t.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(t);if(e){if(typeof e=="string"&&(e=JSON.parse(e)),n)return this.index.get(n).import(r,e);switch(r){case"reg":this.fastupdate=!1,this.reg=No(e,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){e=[];for(let i of this.index.values())e.push(i.import(t));return Promise.all(e)}break;case"tag":this.tag=Do(e,this.tag);break;case"doc":this.store=Ii(e,this.store)}}}function Eo(t,e){let r="";for(let n of t.entries()){t=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?",":"")+(e==="string"?'"'+a[l]+'"':a[l]);u="["+u+"]",s+=(s?",":"")+u}s='["'+t+'",['+s+"]]",r+=(r?",":"")+s}return r}Ne.prototype.remove=function(t,e){let r=this.reg.size&&(this.fastupdate?this.reg.get(t):this.reg.has(t));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]===t)i.pop();else{let o=i.indexOf(t);o>=0&&i.splice(o,1)}}else vr(this.map,t),this.depth&&vr(this.ctx,t);e||this.reg.delete(t)}return this.db&&(this.commit_task.push({del:t}),this.M&&Lo(this)),this.cache&&this.cache.remove(t),this};function vr(t,e){let r=0;var n=typeof e=="undefined";if(t.constructor===Array){for(let i=0,s,o,a;i<t.length;i++)if((s=t[i])&&s.length){if(n)return 1;if(o=s.indexOf(e),o>=0){if(s.length>1)return s.splice(o,1),1;if(delete t[i],r)return 1;a=1}else{if(a)return 1;r++}}}else for(let i of t.entries())n=i[0],vr(i[1],e)?r++:t.delete(n);return r}var oc={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};Ne.prototype.add=function(t,e,r,n){if(e&&(t||t===0)){if(!n&&!r&&this.reg.has(t))return this.update(t,e);n=this.depth,e=this.encoder.encode(e,!n);let l=e.length;if(l){let c=le(),f=le(),m=this.resolution;for(let g=0;g<l;g++){let h=e[this.rtl?l-1-g:g];var i=h.length;if(i&&(n||!f[h])){var s=this.score?this.score(e,h,g,null,0):en(m,l,g),o="";switch(this.tokenize){case"tolerant":if(Ve(this,f,h,s,t,r),i>2){for(let d=1,y,O,R,C;d<i-1;d++)y=h.charAt(d),O=h.charAt(d+1),R=h.substring(0,d)+O,C=h.substring(d+2),o=R+y+C,Ve(this,f,o,s,t,r),o=R+C,Ve(this,f,o,s,t,r);Ve(this,f,h.substring(0,h.length-1),s,t,r)}break;case"full":if(i>2){for(let d=0,y;d<i;d++)for(s=i;s>d;s--){o=h.substring(d,s),y=this.rtl?i-1-d:d;var a=this.score?this.score(e,h,g,o,y):en(m,l,g,i,y);Ve(this,f,o,a,t,r)}break}case"bidirectional":case"reverse":if(i>1){for(a=i-1;a>0;a--){o=h[this.rtl?i-1-a:a]+o;var u=this.score?this.score(e,h,g,o,a):en(m,l,g,i,a);Ve(this,f,o,u,t,r)}o=""}case"forward":if(i>1){for(a=0;a<i;a++)o+=h[this.rtl?i-1-a:a],Ve(this,f,o,s,t,r);break}default:if(Ve(this,f,h,s,t,r),n&&l>1&&g<l-1)for(i=this.N,o=h,s=Math.min(n+1,this.rtl?g+1:l-g),a=1;a<s;a++){h=e[this.rtl?l-1-g-a:g+a],u=this.bidirectional&&h>o;let d=this.score?this.score(e,o,g,h,a-1):en(i+(l/2>i?0:1),l,g,s-1,a-1);Ve(this,c,u?o:h,d,t,r,u?h:o)}}}}this.fastupdate||this.reg.add(t)}}return this.db&&(this.commit_task.push(r?{ins:t}:{del:t}),this.M&&Lo(this)),this};function Ve(t,e,r,n,i,s,o){let a,u;if(!(a=e[r])||o&&!a[o]){if(o?(e=a||(e[r]=le()),e[o]=1,u=t.ctx,(a=u.get(o))?u=a:u.set(o,u=t.keystore?new De(t.keystore):new Map)):(u=t.map,e[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),t.fastupdate&&(e=t.reg.get(i))&&e.splice(e.indexOf(c),1);break}}if(u=u[n]||(u[n]=[]),u.push(i),u.length===rt(2,31)-1){if(e=new Wt(u),t.fastupdate)for(let l of t.reg.values())l.includes(u)&&(l[l.indexOf(u)]=e);a[n]=u=e}t.fastupdate&&((n=t.reg.get(i))?n.push(u):t.reg.set(i,[u]))}}function en(t,e,r,n,i){return r&&t>1?e+(n||0)<=t?r+(i||0):(t-1)/(e+(n||0))*(r+(i||0))+1|0:0}Ne.prototype.search=function(t,e,r){if(r||(e||typeof t!="object"?typeof e=="object"&&(r=e,e=0):(r=t,t="")),r&&r.cache)return r.cache=!1,t=this.searchCache(t,e,r),r.cache=!0,t;let n=[],i,s,o,a=0,u,l,c,f,m;r&&(t=r.query||t,e=r.limit||e,a=r.offset||0,s=r.context,o=r.suggest,m=(u=r.resolve)&&r.enrich,c=r.boost,f=r.resolution,l=this.db&&r.tag),typeof u=="undefined"&&(u=this.resolve),s=this.depth&&s!==!1;let g=this.encoder.encode(t,!s);if(i=g.length,e=e||(u?100:0),i===1)return Co.call(this,g[0],"",e,a,u,m,l);if(i===2&&s&&!o)return Co.call(this,g[1],g[0],e,a,u,m,l);let h=le(),d=0,y;if(s&&(y=g[0],d=1),f||f===0||(f=y?this.N:this.resolution),this.db){if(this.db.search&&(r=this.db.search(this,g,e,a,o,u,m,l),r!==!1))return r;let O=this;return(function(){return E(this,null,function*(){for(let R,C;d<i;d++){if((C=g[d])&&!h[C]){if(h[C]=1,R=yield xi(O,C,y,0,0,!1,!1),R=Oo(R,n,o,f)){n=R;break}y&&(o&&R&&n.length||(y=C))}o&&y&&d===i-1&&!n.length&&(f=O.resolution,y="",d=-1,h=le())}return Ao(n,f,e,a,o,c,u)})})()}for(let O,R;d<i;d++){if((R=g[d])&&!h[R]){if(h[R]=1,O=xi(this,R,y,0,0,!1,!1),O=Oo(O,n,o,f)){n=O;break}y&&(o&&O&&n.length||(y=R))}o&&y&&d===i-1&&!n.length&&(f=this.resolution,y="",d=-1,h=le())}return Ao(n,f,e,a,o,c,u)};function Ao(t,e,r,n,i,s,o){let a=t.length,u=t;if(a>1)u=nn(t,e,r,n,i,s,o);else if(a===1)return o?Oi.call(null,t[0],r,n):new oe(t[0],this);return o?u:new oe(u,this)}function Co(t,e,r,n,i,s,o){return t=xi(this,t,e,r,n,i,s,o),this.db?t.then(function(a){return i?a||[]:new oe(a,this)}):t&&t.length?i?Oi.call(this,t,r,n):new oe(t,this):i?[]:new oe([],this)}function Oo(t,e,r,n){let i=[];if(t&&t.length){if(t.length<=n){e.push(t);return}for(let s=0,o;s<n;s++)(o=t[s])&&(i[s]=o);if(i.length){e.push(i);return}}if(!r)return i}function xi(t,e,r,n,i,s,o,a){let u;return r&&(u=t.bidirectional&&e>r)&&(u=r,r=e,e=u),t.db?t.db.get(e,r,n,i,s,o,a):(t=r?(t=t.ctx.get(r))&&t.get(e):t.map.get(e),t)}function Ne(t,e){if(!this||this.constructor!==Ne)return new Ne(t);if(t){var r=Pe(t)?t:t.preset;r&&(t=Object.assign({},oc[r],t))}else t={};r=t.context;let n=r===!0?{depth:1}:r||{},i=Pe(t.encoder)?Ai[t.encoder]:t.encode||t.encoder||{};this.encoder=i.encode?i:typeof i=="object"?new $t(i):{encode:i},this.resolution=t.resolution||9,this.tokenize=r=(r=t.tokenize)&&r!=="default"&&r!=="exact"&&r||"strict",this.depth=r==="strict"&&n.depth||0,this.bidirectional=n.bidirectional!==!1,this.fastupdate=!!t.fastupdate,this.score=t.score||null,(r=t.keystore||0)&&(this.keystore=r),this.map=r?new De(r):new Map,this.ctx=r?new De(r):new Map,this.reg=e||(this.fastupdate?r?new De(r):new Map:r?new Me(r):new Set),this.N=n.resolution||3,this.rtl=i.rtl||t.rtl||!1,this.cache=(r=t.cache||null)&&new St(r),this.resolve=t.resolve!==!1,(r=t.db)&&(this.db=this.mount(r)),this.M=t.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=t.priority||4}H=Ne.prototype;H.mount=function(t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),t.mount(this)};H.commit=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this)};H.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function Lo(t){t.commit_timer||(t.commit_timer=setTimeout(function(){t.commit_timer=null,t.db.commit(t)},1))}H.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};H.append=function(t,e){return this.add(t,e,!0)};H.contain=function(t){return this.db?this.db.has(t):this.reg.has(t)};H.update=function(t,e){let r=this,n=this.remove(t);return n&&n.then?n.then(()=>r.add(t,e)):this.add(t,e)};H.cleanup=function(){return this.fastupdate?(vr(this.map),this.depth&&vr(this.ctx),this):this};H.searchCache=Ei;H.export=function(t,e,r=0,n=0){let i,s;switch(n){case 0:i="reg",s=Mo(this.reg);break;case 1:i="cfg",s=null;break;case 2:i="map",s=Ri(this.map,this.reg.size);break;case 3:i="ctx",s=Po(this.ctx,this.reg.size);break;default:return}return on.call(this,t,e,i,s,r,n)};H.import=function(t,e){if(e)switch(typeof e=="string"&&(e=JSON.parse(e)),t=t.split("."),t[t.length-1]==="json"&&t.pop(),t.length===3&&t.shift(),t=t.length>1?t[1]:t[0],t){case"reg":this.fastupdate=!1,this.reg=No(e,this.reg);break;case"map":this.map=Ii(e,this.map);break;case"ctx":this.ctx=Do(e,this.ctx)}};H.serialize=function(t=!0){let e="",r="",n="";if(this.reg.size){let s;for(var i of this.reg.keys())s||(s=typeof i),e+=(e?",":"")+(s==="string"?'"'+i+'"':i);e="index.reg=new Set(["+e+"]);",r=Eo(this.map,s),r="index.map=new Map(["+r+"]);";for(let o of this.ctx.entries()){i=o[0];let a=Eo(o[1],s);a="new Map(["+a+"])",a='["'+i+'",'+a+"]",n+=(n?",":"")+a}n="index.ctx=new Map(["+n+"]);"}return t?"function inject(index){"+e+r+n+"}":e+r+n};Ci(Ne.prototype);var Fo=typeof window!="undefined"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),an=["map","ctx","tag","reg","cfg"],yt=le();function un(t,e={}){if(!this||this.constructor!==un)return new un(t,e);typeof t=="object"&&(e=t,t=t.name),t||console.info("Default storage space was used, because a name was not passed."),this.id="flexsearch"+(t?":"+t.toLowerCase().replace(/[^a-z0-9_\-]/g,""):""),this.field=e.field?e.field.toLowerCase().replace(/[^a-z0-9_\-]/g,""):"",this.type=e.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}H=un.prototype;H.mount=function(t){return t.index?t.mount(this):(t.db=this,this.open())};H.open=function(){if(this.db)return this.db;let t=this;navigator.storage&&navigator.storage.persist&&navigator.storage.persist(),yt[t.id]||(yt[t.id]=[]),yt[t.id].push(t.field);let e=Fo.open(t.id,1);return e.onupgradeneeded=function(){let r=t.db=this.result;for(let n=0,i;n<an.length;n++){i=an[n];for(let s=0,o;s<yt[t.id].length;s++)o=yt[t.id][s],r.objectStoreNames.contains(i+(i!=="reg"&&o?":"+o:""))||r.createObjectStore(i+(i!=="reg"&&o?":"+o:""))}},t.db=ut(e,function(r){t.db=r,t.db.onversionchange=function(){t.close()}})};H.close=function(){this.db&&this.db.close(),this.db=null};H.destroy=function(){let t=Fo.deleteDatabase(this.id);return ut(t)};H.clear=function(){let t=[];for(let r=0,n;r<an.length;r++){n=an[r];for(let i=0,s;i<yt[this.id].length;i++)s=yt[this.id][i],t.push(n+(n!=="reg"&&s?":"+s:""))}let e=this.db.transaction(t,"readwrite");for(let r=0;r<t.length;r++)e.objectStore(t[r]).clear();return ut(e)};H.get=function(t,e,r=0,n=0,i=!0,s=!1){t=this.db.transaction((e?"ctx":"map")+(this.field?":"+this.field:""),"readonly").objectStore((e?"ctx":"map")+(this.field?":"+this.field:"")).get(e?e+":"+t:t);let o=this;return ut(t).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 f=r?n+Math.min(c.length-n,r):c.length;for(let m=n;m<f;m++)u.push(c[m]);if(n=0,u.length===r)break}return s?o.enrich(u):u}return a})};H.tag=function(t,e=0,r=0,n=!1){t=this.db.transaction("tag"+(this.field?":"+this.field:""),"readonly").objectStore("tag"+(this.field?":"+this.field:"")).get(t);let i=this;return ut(t).then(function(s){return!s||!s.length||r>=s.length?[]:!e&&!r?s:(s=s.slice(r,r+e),n?i.enrich(s):s)})};H.enrich=function(t){typeof t!="object"&&(t=[t]);let e=this.db.transaction("reg","readonly").objectStore("reg"),r=[];for(let n=0;n<t.length;n++)r[n]=ut(e.get(t[n]));return Promise.all(r).then(function(n){for(let i=0;i<n.length;i++)n[i]={id:t[i],doc:n[i]?JSON.parse(n[i]):null};return n})};H.has=function(t){return t=this.db.transaction("reg","readonly").objectStore("reg").getKey(t),ut(t).then(function(e){return!!e})};H.search=null;H.info=function(){};H.transaction=function(t,e,r){t+=t!=="reg"&&this.field?":"+this.field:"";let n=this.h[t+":"+e];if(n)return r.call(this,n);let i=this.db.transaction(t,e);this.h[t+":"+e]=n=i.objectStore(t);let s=r.call(this,n);return this.h[t+":"+e]=null,ut(i).finally(function(){return s})};H.commit=function(t){return E(this,null,function*(){let e=t.commit_task,r=[];t.commit_task=[];for(let n=0,i;n<e.length;n++)i=e[n],i.del&&r.push(i.del);r.length&&(yield this.remove(r)),t.reg.size&&(yield this.transaction("map","readwrite",function(n){for(let i of t.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,f,m;c<l;c++)if((m=o[c])&&m.length){if((f=a[c])&&f.length)for(u=0;u<m.length;u++)f.push(m[u]);else a[c]=m;u=1}}else a=o,u=1;u&&n.put(a,s)})}}),yield this.transaction("ctx","readwrite",function(n){for(let i of t.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 f;if(c&&c.length){let m=Math.max(c.length,l.length);for(let g=0,h,d;g<m;g++)if((d=l[g])&&d.length){if((h=c[g])&&h.length)for(f=0;f<d.length;f++)h.push(d[f]);else c[g]=d;f=1}}else c=l,f=1;f&&n.put(c,s+":"+u)})}}}),t.store?yield this.transaction("reg","readwrite",function(n){for(let i of t.store){let s=i[0],o=i[1];n.put(typeof o=="object"?JSON.stringify(o):1,s)}}):t.bypass||(yield this.transaction("reg","readwrite",function(n){for(let i of t.reg.keys())n.put(1,i)})),t.tag&&(yield this.transaction("tag","readwrite",function(n){for(let i of t.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)})}})),t.map.clear(),t.ctx.clear(),t.tag&&t.tag.clear(),t.store&&t.store.clear(),t.document||t.reg.clear())})};function _i(t,e,r){let n=t.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<e.length;u++)if(c=e[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&&t.update(n):t.delete(),t.continue()}H.remove=function(t){return typeof t!="object"&&(t=[t]),Promise.all([this.transaction("map","readwrite",function(e){e.openCursor().onsuccess=function(){let r=this.result;r&&_i(r,t)}}),this.transaction("ctx","readwrite",function(e){e.openCursor().onsuccess=function(){let r=this.result;r&&_i(r,t)}}),this.transaction("tag","readwrite",function(e){e.openCursor().onsuccess=function(){let r=this.result;r&&_i(r,t,!0)}}),this.transaction("reg","readwrite",function(e){for(let r=0;r<t.length;r++)e.delete(t[r])})])};function ut(t,e){return new Promise((r,n)=>{t.onsuccess=t.oncomplete=function(){e&&e(this.result),e=null,r(this.result)},t.onerror=t.onblocked=n,t=null})}var cn={Index:Ne,Charset:Ai,Encoder:$t,Document:vt,Worker:bt,Resolver:oe,IndexedDB:un,Language:{}};function fn(t){return t.replace(/\\u[\dA-F]{4}/gi,function(e){return String.fromCharCode(parseInt(e.replace(/\\u/g,""),16))})}var xt={},Je=class extends G{_prepare(){xt[this.uri]={index:{},conceptCache:{},schemeCache:{}}}get _index(){return xt[this.uri]&&xt[this.uri].index}get _conceptCache(){return xt[this.uri]&&xt[this.uri].conceptCache}get _schemeCache(){return xt[this.uri]&&xt[this.uri].schemeCache}static _registryConfigForBartocApiConfig({url:e,scheme:r}={}){return!e||!r?null:{schemes:[{uri:e,identifier:P.getAllUris(r).filter(i=>i!==e)}]}}_loadScheme(n){return E(this,null,function*(){var i=n,{scheme:e}=i,r=W(i,["scheme"]);let s=P.getAllUris(e);for(let h of s)if(this._schemeCache[h])return this._schemeCache[h];let o=this.schemes.find(h=>P.compare(h,e));if(!o||!o.uri)throw new Le({message:`Tried to load unsupported scheme (${e&&e.uri})`});let a=o.uri;s=[...new Set(s.concat(P.getAllUris(o)))];let u=".json";a.endsWith("/")&&(u="index.json");let l=yield this.axios(F(I({},r),{url:`${a}${u}`,_skipAdditionalParameters:!0}));if(l.id!==a)throw new Le({message:"Skohub URL did not return expected concept scheme"});let{title:c,preferredNamespaceUri:f,hasTopConcept:m,description:g}=l;e={uri:a,identifier:s.filter(h=>h!==a)},e.prefLabel=c,Object.keys(e.prefLabel||{}).forEach(h=>{e.prefLabel[h]=fn(e.prefLabel[h])}),e.namespace=f,e.topConcepts=(m||[]).map(h=>this._toJskosConcept(h)),e.concepts=[null],g&&(e.definition=g,Object.keys(e.definition).forEach(h=>{e.definition[h]=[fn(e.definition[h])]}));for(let h of Object.keys(e).filter(d=>!e[d]))delete e[h];for(let h of s)this._schemeCache[h]=e;return e})}_loadConcept(n){return E(this,null,function*(){var i=n,{uri:e}=i,r=W(i,["uri"]);if(this._conceptCache[e])return this._conceptCache[e];try{let s=yield this.axios(F(I({},r),{url:`${e}.json`,_skipAdditionalParameters:!0}));if(s.id!==e)throw new Le({message:"Skohub URL did not return expected concept URI"});let o=this._toJskosConcept(s);return this._conceptCache[e]=o,o}catch(s){return null}})}_toJskosConcept(e){let r={uri:e.id};return r.prefLabel=e.prefLabel,Object.keys(r.prefLabel||{}).forEach(n=>{r.prefLabel[n]=fn(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]=[fn(r.scopeNote[n])]})),r}getSchemes(){return E(this,arguments,function*(r={}){var e=W(r,[]);return Promise.all(this.schemes.map(n=>this._loadScheme(F(I({},e),{scheme:n}))))})}getTop(n){return E(this,null,function*(){var i=n,{scheme:e}=i,r=W(i,["scheme"]);if(!e||!e.uri)throw new U({parameter:"scheme",message:"Missing scheme URI"});return e=yield this._loadScheme(I({scheme:e},r)),e.topConcepts||[]})}getConcepts(n){return E(this,null,function*(){var i=n,{concepts:e}=i,r=W(i,["concepts"]);return Array.isArray(e)||(e=[e]),(yield Promise.all(e.map(({uri:s})=>this._loadConcept(F(I({},r),{uri:s}))))).filter(Boolean)})}getAncestors(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=W(i,["concept"]);if(!e||!e.uri)throw new U({parameter:"concept"});if(e.ancestors&&e.ancestors[0]!==null)return e.ancestors;if(e=yield this._loadConcept(F(I({},r),{uri:e.uri})),!e||!e.broader||!e.broader.length)return[];let s=e.broader[0];return[s].concat(yield this.getAncestors(I({concept:s},r))).map(o=>({uri:o.uri}))})}getNarrower(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=W(i,["concept"]);if(!e||!e.uri)throw new U({parameter:"concept"});return e.narrower&&e.narrower[0]!==null||(e=yield this._loadConcept(F(I({},r),{uri:e.uri}))),e.narrower})}search(i){return E(this,arguments,function*({search:e,scheme:r,limit:n=100}){if(r=yield this._loadScheme({scheme:r}),!r||!r.uri)throw new U({parameter:"scheme"});if(!e)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=cn.create(),s.import(c),this._index[r.uri][u]=s;break}catch(l){this._index[r.uri][u]=null}}if(!s)throw new Le({message:"Could not find search index for any of the available languages "+this.languages.join(",")});let o=s.search(e);return(yield this.getConcepts({concepts:o.map(u=>({uri:u}))})).slice(0,n)})}suggest(e){return E(this,null,function*(){e._raw=!0;let r=yield this.search(e),n=[e.search,[],[],[]];for(let i of r){let s=P.notation(i),o=P.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})}};ee(Je,"supports",{schemes:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,suggest:!0,search:!0});Je.providerName="Skohub";Je.providerType="http://bartoc.org/api-type/skohub";var Bo="https://lobid.org/gnd/",Ke={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"}}]},Di=new P.ConceptScheme({uri:"https://d-nb.info/standards/elementset/gnd",namespace:"https://d-nb.info/standards/elementset/gnd#"});Ke.types.forEach(t=>{t.notation=[Di.notationFromUri(t.uri)]});var ac=new P.ConceptScheme(Ke),Uo=["broaderTerm","broaderTermGeneral","broaderTermGeneric","broaderTermInstantial","broaderTermPartitive"],jo={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"},uc=[{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 P.ConceptScheme(t));function Ti(t){var n,i;let e={uri:t.id,notation:[t.gndIdentifier],prefLabel:{de:t.preferredName},inScheme:[{uri:Ke.uri}]};t.variantName&&(e.altLabel={de:t.variantName}),(n=t.usingInstructions)!=null&&n.length&&(e.scopeNote={de:t.usingInstructions}),e.type=t.type.map(s=>Di.uriFromNotation(s)).filter(Boolean),e.broader=[],Uo.forEach(s=>{e.broader=e.broader.concat(t[s]||[])}),e.broader=e.broader.map(s=>({uri:s.id})),e.uri&&(e.identifier=[e.uri.replace("https://","http://")]);let r=[];for(let s of Object.keys(jo)){let o=jo[s];(i=t[s])!=null&&i.length&&(r=r.concat(t[s].map(a=>{let u=uc.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:e.uri,notation:e.notation}]},fromScheme:{uri:Ke.uri},to:{memberSet:[l]},toScheme:{uri:u.uri},type:[o]})}).filter(Boolean)))}return r.length&&(e.mappings=r),e}function Pi(t){return t&&t.startsWith("http://")?t.replace("http://","https://"):t}var Ye=class extends G{_setup(){this._api.api||(this._api.api=Bo)}static _registryConfigForBartocApiConfig({url:e,scheme:r}={}){return!e||!r||!P.compare(r,Ke)||e!=="https://lobid.org/gnd/api"?null:{api:Bo,schemes:[Ke]}}getSchemes(){return E(this,null,function*(){return[Ke]})}getTop(){return E(this,null,function*(){return[]})}getConcepts(r){return E(this,arguments,function*({concepts:e}){if(!e)throw new i.InvalidOrMissingParameterError({parameter:"concepts"});Array.isArray(e)||(e=[e]);let n=e.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]:ac.notationFromUri(Pi(o==null?void 0:o.uri))}).filter(Boolean),i=[],s=yield Promise.all(n.map(o=>E(this,null,function*(){try{let a=yield pe.get(`${this._api.api}${o}.json`);return Ti(a.data)}catch(a){i.push(a)}})));if(i.length===e.length)throw i[0];return s.filter(Boolean)})}getNarrower(i){return E(this,arguments,function*({concept:e,limit:r=200,offset:n=0}){if(!e||!e.uri)throw new U({parameter:"concept"});let s=Pi(e.uri),o=Uo.map(u=>`${u}.id:"${s}"`).join(" OR ");return(yield pe.get(`${this._api.api}search`,{params:{q:o,format:"json",size:r,from:n}})).data.member.map(u=>Ti(u))})}suggest(e){return E(this,null,function*(){let r=yield this._search(F(I({},e),{format:"json:suggest"}));return[e.search,r.map(n=>n.label),[],r.map(n=>n.id)]})}search(e){return E(this,null,function*(){return(yield this._search(e)).member.map(n=>Ti(n))})}_search(o){return E(this,arguments,function*({search:e,types:r,limit:n=100,offset:i=0,format:s="json"}){if(!e)throw new U({parameter:"search"});let a="";return r=(r==null?void 0:r.map(l=>Di.notationFromUri(Pi(l))).filter(Boolean))||[],r.length&&(a=r.map(l=>`type:${l}`).join(" OR ")),(yield pe.get(`${this._api.api}search`,{params:{q:e,filter:a,format:s,size:n,from:i}})).data})}getTypes(r){return E(this,arguments,function*({scheme:e}){if(!e||!P.compare(e,Ke))throw new U({parameter:"search",message:e!=null&&e.uri?`scheme ${e==null?void 0:e.uri} not supported`:""});return Ke.types})}};ee(Ye,"supports",{schemes:!0,data:!0,concepts:!0,narrower:!0,suggest:!0,search:!0,types:!0});Ye.providerName="LobidApi";Ye.providerType="http://bartoc.org/api-type/lobid-gnd";var Xe=class extends G{_getApiUrl(e,r){let n=this.uri||"";n.endsWith("/")&&(n=n.slice(0,-1));for(let i of e)if(i)n+="/"+i;else return;if(r){let i=Object.keys(r).map(s=>`${s}=${encodeURIComponent(r[s])}`).join("&");n+=(n.includes("?")?"&":"?")+i}return n}_artefactToJSKOS(e){let r=e.language||this._language||"en",n={};return e.subject&&(n.subject=[e.subject]),e.includedInDataCatalog&&(n.api=[e.includedInDataCatalog]),e["@type"]&&(n["@type"]=e["@type"]),e.type&&(n.type=[e.type]),e.source_name&&(n.notation=[e.source_name]),e.short_form&&(n.notation?n.notation.push(e.short_form):n.notation=[e.short_form]),e.label&&(n.prefLabel={},n.prefLabel[r]=[],n.prefLabel[r].push(e.label)),e.synonyms&&(n.altLabel={},n.altLabel[r]=e.synonyms),e.descriptions&&(n.definition={},n.definition[r]=e.descriptions),e.language&&(n.languages=e.language),e["@id"]&&(n.uri=e["@id"]),e.iri&&(n.iri=e.iri),e.identifier&&(n.identifier=[e.identifier]),e.source&&(n.source=[e.source]),e.source_url&&(n.namespace=e.source_url),e.landingPage&&(n.url=e.landingPage),e.version&&(n.version=e.version),e.modified&&(n.modified=e.modified),e.created&&(n.created=e.created),e.hasFormat&&(n.format=e.hasFormat),e.license&&(n.license=[e.license]),e.creator&&(n.creator=e.creator),e.contributor&&(n.contributor={},n.contributor.prefLabel={},n.contributor.prefLabel[r]=e.contributor),e.publisher&&(n.publisher={},n.publisher[r]=e.publisher),e.released&&(n.issued=e.released),e.children&&(n.narrower={},n.narrower[r]=e.children),n}_request(e,...r){return E(this,null,function*(){if(!e)return;let n=yield this.axios(I({method:"get",url:e,headers:{"Content-Type":"application/json",Accept:"application/json"}},r));if(!(n!=null&&n._url)||Object.keys(n).length!=1)return n})}_getSchemesMod(){return E(this,null,function*(){let e=this._getApiUrl(["artefacts"],null);return yield this._request(e)})}_getSchemesModLimit(e){return E(this,null,function*(){let r=yield this._getSchemesMod();return e&&e>0?r.slice(0,e):r})}_getSchemeMod(e){return E(this,null,function*(){if(e.short)return yield this._getSchemeFromShort(e.short);if(e.uri)return yield this._getSchemeFromUri(e.uri)})}_getSchemeFromShort(e){return E(this,null,function*(){let r=this._getApiUrl(["artefacts",e],null);return yield this._request(r)})}_getSchemeFromUri(e){return E(this,null,function*(){let r=yield this._getSchemesMod();if(r){for(let n of yield r)if(n.source==e||n.source_url==e||n.source_name==e||n["@id"]==e||n.iri==e||n.includedInDataCatalog&&n.includedInDataCatalog.includes(e))return yield n}})}_getConceptsMod(e){return E(this,null,function*(){let r=yield this._schemeShortFromObj(e);if(!r)return[];let n=this._getApiUrl(["artefacts",r,"resources","concepts"],null),i=yield this._request(n);if(!i)return[];let{page:s,totalPages:o,member:a}=i,u=[];for(let l of a)l&&u.push(l);for(let l=s+1;l<=o;l++){let c=this._getApiUrl(["artefacts",r,"resources","concepts"],{page:l}),f=yield this._request(c);if(!f)break;let{member:m}=f;for(let g of m)g&&u.push(g)}return u})}_getConceptsModLimit(e,r){return E(this,null,function*(){let n=yield this._getConceptsMod(e);return r&&r>0?n.slice(0,r):n})}_getConceptMod(e){return E(this,null,function*(){let{conceptNotation:r,schemeShort:n}=yield this._conceptNotationFromObj(e),i=this._getApiUrl(["artefacts",n,"resources","concepts",r],null);return yield this._request(i)})}_containsString(e,r){for(let n in e){let i=e[n];if(typeof i=="string"&&i.includes(r)||typeof i=="object"&&i!==null&&this.containsString(i,r))return!0}return!1}_getSchemesContaining(e){return E(this,null,function*(){let r=[],n=yield this._getSchemesMod();for(let i of n)this.containsString(i,e)&&r.push(i);return r})}_getSchemeShort(e){return E(this,null,function*(){let r=yield this._getSchemeFromUri(e);if(r)return yield r.short_form.toLowerCase()})}_getconceptNotation(e){return e.split("/").pop()}_schemeShortFromObj(e){return E(this,null,function*(){if(e.short)return e.short;if(e.uri)return yield this._getSchemeShort(e.uri)})}_conceptNotationFromObj(e){return E(this,null,function*(){if(!e.inScheme||!e.inScheme[0])return;let r=yield this._schemeShortFromObj(e.inScheme[0]),n=e.notation;return n||(n=yield this._getconceptNotation(e.uri)),{conceptNotation:n,schemeShort:r}})}_prepare(){}_setup(){}getSchemes(i){return E(this,null,function*(){var s=i,{schemes:e,limit:r}=s,n=W(s,["schemes","limit"]);let o=[],a=[];if(e)for(let u of e){let l=yield this._getSchemeMod(u);l&&a.push(l)}else a=yield this._getSchemesModLimit(r);for(let u of a){let l=yield this._artefactToJSKOS(u);l?o.push(l):console.warn("JSKOS transformation failed for artefact: ",u)}return o})}getConcepts(s){return E(this,null,function*(){var o=s,{concepts:e,scheme:r,limit:n}=o,i=W(o,["concepts","scheme","limit"]);let a=[];if(e)for(let u of e){let l=yield this._getConceptMod(u);if(l){let c=yield this._artefactToJSKOS(l);c?a.push(c):console.warn("JSKOS transformation failed for concept: ",l)}}else if(r){let u=yield this._getConceptsModLimit(r,n);for(let l of u){let c=yield this._artefactToJSKOS(l);c?a.push(c):console.warn("JSKOS transformation failed for concept: ",l)}}return a})}get _language(){return this._jskos.language||this.languages[0]||this._defaultLanguages[0]||"en"}getMappings(){return[]}};ee(Xe,"providerName","ModApi"),ee(Xe,"providerType","http://bartoc.org/en/node/20333"),ee(Xe,"supports",{schemes:!0,top:!1,data:!1,concepts:!0,narrower:!1,ancestors:!1,types:!1,suggest:!1,search:!1,auth:!1,mappings:!1,concordances:!1,annotations:!1,occurrences:!1});var Ge=class extends G{constructor(e){super(e),this.endpoint=e.endpoint||e.uri}static _registryConfigForBartocApiConfig({url:e}={}){if(e)return{endpoint:e}}_getApiUrl(e,r={}){let n=this.endpoint+e.join("/");return r=Object.fromEntries(Object.entries(r).filter(([i,s])=>s!=null)),r=new URLSearchParams(r),r.size?`${n}?${r}`:n}_ontologyToJSKOS(e){var i;let r=e.lang||this._language||"en",n={};return e.iri&&(n.uri=e.iri),n.type=["http://www.w3.org/2004/02/skos/core#ConceptScheme"],e["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"]&&(n.type=n.type.concat(e["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"])),e.title&&(n.prefLabel={},n.prefLabel[r]=e.title),e.description&&(n.definition={},n.definition[r]=[e.description]),e.homepage&&(n.url=e.homepage),e.tracker&&(n.issueTracker=[{url:e.tracker}]),e.language&&(n.languages=e.language),e.ontologyId&&(n.VOCID=e.ontologyId,n.notation=[e.ontologyId]),(i=e.license)!=null&&i.url&&(n.license=[{uri:e.license.url}]),n}_termToJSKOS(e){let r=e.language||this._language||"en",n={};return e.curie&&(n.notation=[e.curie]),e.hasDirectChildren?n.narrower=[null]:n.narrower=[],e.hasDirectParents?n.broader=[null]:n.broader=[],e.iri&&(n.uri=e.iri),e["http://www.w3.org/2000/01/rdf-schema#label"]&&(n.prefLabel={},n.prefLabel[r]=e["http://www.w3.org/2000/01/rdf-schema#label"].value||e["http://www.w3.org/2000/01/rdf-schema#label"]),n.type=["http://www.w3.org/2004/02/skos/core#Concept","http://www.w3.org/2002/07/owl#Class"],e.ontologyIri&&(n.inScheme=[{uri:e.ontologyIri}]),n}_request(n){return E(this,arguments,function*(e,r={_skipAdditionalParameters:!0}){if(e){e=new URL(e);let i=Object.fromEntries(e.searchParams.entries());return this.axios(I({method:"get",url:e.origin+e.pathname,params:I(I({},i),r.params)},r))}})}_paginate(e,r,n){return E(this,null,function*(){let i=n>0?n:null,s=this._getApiUrl(e,F(I({},r),{size:i})),o=yield this._request(s),a=(o==null?void 0:o.elements)||[];if(!i){let u=(o==null?void 0:o.totalPages)||0;for(let l=1;l<u;l++)s=this._getApiUrl(e,F(I({},r),{page:l})),o=yield this._request(s),a=a.concat((o==null?void 0:o.elements)||[])}return a})}_getConceptOls(e){return E(this,null,function*(){var n,i;let r=yield this._getSchemeVOCID((n=e==null?void 0:e.inScheme)==null?void 0:n[0]);if(r){let s=null;e.notation?s=this._getApiUrl(["ontologies",r,"classes"],{curie:e.notation}):e.uri&&(s=this._getApiUrl(["ontologies",r,"classes"],{iri:e.uri}));let o=yield this._request(s);return((i=o==null?void 0:o.elements)==null?void 0:i[0])||null}})}_searchOls(e,r,n,i){return E(this,null,function*(){let s=[],o={"http://www.w3.org/2002/07/owl#Class":"classes","http://www.w3.org/1999/02/22-rdf-syntax-ns#Property":"properties"};i!=null&&i.length||(i=Object.keys(o));for(let a of i)if(a in o){let u=r?yield this._getSchemeVOCID(r):null,l={search:e,ontology:u};if(!r||u){let c=yield this._paginate([o[a]],l,n);s.push(...c)}}return s})}_conceptIriFromObj(e,r){return E(this,null,function*(){let n=this._getApiUrl(["ontologies",e,"classes"],{curie:r}),i=yield this._request(n);if(i&&i.elements&&i.elements.length>0)return i.elements[0].iri})}get _language(){return this._jskos.language||this.languages[0]||this._defaultLanguages[0]||"en"}_getSchemeVOCID(e){return E(this,null,function*(){return e!=null&&e.VOCID?e.VOCID:this._getScheme(e).then(r=>r==null?void 0:r.ontologyId)})}_getScheme(e){return E(this,null,function*(){if(e){let{VOCID:r,uri:n,notation:i,identifier:s}=e;if(r)return this._request(this._getApiUrl(["ontologies",r]));if(n&&(e=yield this._getSchemeFromUri(n),e)||i!=null&&i[0]&&(n||s!=null&&s.length)&&(e=yield this._request(this._getApiUrl(["ontologies",i[0]])),e.iri===n||s!=null&&s.includes(e.iri)))return e;for(let o of s||[]){let a=yield this._getSchemeFromUri(o);if(a)return a}}})}_getSchemeFromUri(e){return E(this,null,function*(){if(e){let r=this._getApiUrl(["ontologies"],{searchFields:"iri",search:e}),n=yield this._request(r),i=(n==null?void 0:n.elements)||[];return i.reduce((s,o)=>o.ontologyId.length<s.ontologyId.length?o:s,i[0])}return null})}getSchemes(n){return E(this,arguments,function*({schemes:e,limit:r}){let i=[];if(e)i=(yield Promise.all(e.map(s=>this._getScheme(s)))).filter(Boolean);else if(r>0){let s=this._getApiUrl(["ontologies"],{size:r});i=(yield this._request(s)).elements||[]}else i=yield this._paginate(["ontologies"],{});return Promise.all(i.map(s=>this._ontologyToJSKOS(s)))})}getConcepts(i){return E(this,arguments,function*({concepts:e,scheme:r,limit:n}){let s=[];if(e)for(let o of e){let a=yield this._getConceptOls(o);a&&s.push(yield this._termToJSKOS(a))}else if(r){let o=yield this._getSchemeVOCID(r);if(o){let a=yield this._paginate(["ontologies",o,"classes"],{},n);s=Promise.all(a.map(u=>this._termToJSKOS(u)))}}return s})}getTop(r){return E(this,arguments,function*({scheme:e}){let n=yield this._getSchemeVOCID(e);if(n){let i=yield this._paginate(["ontologies",n,"classes"],{hasDirectParents:"false"},null);return Promise.all(i.map(s=>this._termToJSKOS(s)))}return[]})}_splitConcept(e){return E(this,null,function*(){var n;let r={};return e&&(r.VOCID=yield this._getSchemeVOCID((n=e==null?void 0:e.inScheme)==null?void 0:n[0]),r.iri=e.uri||(yield this._conceptIriFromObj(r.VOCID,e.notation)),r.iri=encodeURIComponent(encodeURIComponent(r.iri))),r})}getNarrower(r){return E(this,arguments,function*({concept:e}){let{VOCID:n,iri:i}=yield this._splitConcept(e);if(n&&i){let s=yield this._paginate(["ontologies",n,"classes",i,"children"],{},0);return Promise.all(s.map(o=>this._termToJSKOS(o)))}return[]})}getAncestors(r){return E(this,arguments,function*({concept:e}){let{VOCID:n,iri:i}=yield this._splitConcept(e);if(n&&i){let s=yield this._paginate(["ontologies",n,"classes",i,"ancestors"],{},null);return Promise.all(s.map(o=>this._termToJSKOS(o)))}return[]})}getTypes(){return E(this,null,function*(){return[{uri:"http://www.w3.org/2002/07/owl#Class",prefLabel:{en:"Class",de:"Klasse"}},{uri:"http://www.w3.org/1999/02/22-rdf-syntax-ns#Property",prefLabel:{en:"Property",de:"Eigenschaft"}}]})}search(s){return E(this,arguments,function*({search:e,scheme:r=null,limit:n=0,types:i=["http://www.w3.org/2002/07/owl#Class"]}){let o=yield this._searchOls(e,r,n,i);return Promise.all(o.map(a=>this._termToJSKOS(a)))})}};ee(Ge,"providerName","OlsApi"),ee(Ge,"providerType","http://bartoc.org/api-type/ols"),ee(Ge,"supports",{schemes:!0,top:!0,data:!1,concepts:!0,narrower:!0,ancestors:!0,types:!0,suggest:!0,search:!0});var Se={},Qe=class extends G{_setup(){this._scheme=null}static _registryConfigForBartocApiConfig({url:e,scheme:r}={}){return!e||!r?null:{api:e}}_schemeInfoToJSKOS(e){let r=e.labels.find(s=>s.lang==="x-uri").text,n={};e.labels.filter(s=>!s.lang.startsWith("x-")).forEach(s=>{n[s.lang]=s.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,s=`${r.uri}/${i}`;if(Se[r.uri].concepts[s])return Se[r.uri].concepts[s];let o={};e.labels.filter(u=>!u.lang.startsWith("x-")&&u.text).forEach(u=>{o[u.lang]=u.text.replace(`${i} `,""),Se[r.uri].searchIndex.add(s,o[u.lang])});let a={};return e.labels.filter(u=>!u.lang.startsWith("x-")&&u.description).forEach(u=>{a[u.lang]||(a[u.lang]=[]),a[u.lang].push(u.description)}),Se[r.uri].concepts[s]={uri:s,notation:[i],prefLabel:o,scopeNote:a,inScheme:[{uri:r.uri}],narrower:(e.categories||[]).map(u=>({uri:`${r.uri}/${u.ID}`})),broader:n},Se[r.uri].concepts[s]}_removeNarrower(e){return e&&Object.assign({},e,{narrower:e.narrower&&e.narrower.length?[null]:[]})}_loadSchemeData(e){return E(this,null,function*(){let r=yield this.axios(F(I({},e),{method:"get",url:this._api.api,_skipAdditionalParameters:!0}));this._scheme=this._schemeInfoToJSKOS(r);let n=this._scheme.uri;Se[n]={schemeInfo:r,searchIndex:cn.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)),Se[n].topConcepts=r.categories.map(s=>this._categoryToJSKOS(s,{scheme:this._scheme}))})}getSchemes(){return E(this,arguments,function*(e={}){if(!this._api.api)throw new xe;return this._scheme||(this._loadSchemeDataPromise||(this._loadSchemeDataPromise=this._loadSchemeData(e)),yield this._loadSchemeDataPromise),[this._scheme]})}getTop(n){return E(this,null,function*(){var i=n,{scheme:e}=i,r=W(i,["scheme"]);if(!e||!e.uri)throw new U({parameter:"scheme",message:"Missing scheme URI"});if(this._scheme||(yield this.getSchemes(r)),!P.compare(e,this._scheme))throw new U({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return Se[this._scheme.uri].topConcepts.map(this._removeNarrower)})}getConcepts(n){return E(this,null,function*(){var i=n,{concepts:e}=i,r=W(i,["concepts"]);return Array.isArray(e)||(e=[e]),this._scheme||(yield this.getSchemes(r)),e.map(s=>Se[this._scheme.uri].concepts[s.uri]).map(this._removeNarrower)})}getAncestors(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=W(i,["concept"]);if(!e||!e.uri)throw new U({parameter:"concept"});if(e.ancestors&&e.ancestors[0]!==null)return e.ancestors;this._scheme||(yield this.getSchemes(r)),e=Se[this._scheme.uri].concepts[e.uri];let s=e&&e.broader&&e.broader[0];return s?[s].concat(yield this.getAncestors(I({concept:s},r))):[]})}getNarrower(n){return E(this,null,function*(){var i=n,{concept:e}=i,r=W(i,["concept"]);if(!e||!e.uri)throw new U({parameter:"concept"});return e.narrower&&e.narrower[0]!==null?e.narrower:(this._scheme||(yield this.getSchemes(r)),e=Se[this._scheme.uri].concepts[e.uri],(e&&e.narrower||[]).map(s=>Se[this._scheme.uri].concepts[s.uri]).map(this._removeNarrower))})}search(i){return E(this,arguments,function*({search:e,scheme:r,limit:n=100}){if(!r||!r.uri)throw new U({parameter:"scheme"});if(!e)throw new U({parameter:"search"});if(!r||!r.uri)throw new U({parameter:"scheme",message:"Missing scheme URI"});if(this._scheme||(yield this.getSchemes()),!P.compare(r,this._scheme))throw new U({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return(yield Se[this._scheme.uri].searchIndex.search(e)).map(o=>Se[this._scheme.uri].concepts[o]).map(this._removeNarrower).slice(0,n)})}suggest(e){return E(this,null,function*(){e._raw=!0;let r=yield this.search(e),n=[e.search,[],[],[]];for(let i of r){let s=P.notation(i),o=P.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})}};ee(Qe,"supports",{schemes:!0,top:!0,data:!0,concepts:!0,narrower:!0,ancestors:!0,suggest:!0,search:!0});Qe.providerName="MyCoRe";Qe.providerType="http://bartoc.org/api-type/mycore";var Sr={schemes:[]},Ze=class extends G{static _registryConfigForBartocApiConfig({url:e}={}){return e?{api:e}:null}getSchemes(){return E(this,null,function*(){var e,r;if(!Sr.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)Sr.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 Sr.schemes})}getConcepts(r){return E(this,arguments,function*({concepts:e}){var i,s;if(!e)throw new U({parameter:"concepts"});return Array.isArray(e)||(e=[e]),(((s=(i=(yield pe.post(this._api.api,{query:`query { lookup( uris: [${e.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,f,m,g,h,d,y,O;let a={uri:o.uri,inScheme:[Sr.schemes.find(R=>P.compare(R,{uri:o.source.uri}))]};return(l=(u=o.result)==null?void 0:u.prefLabel)!=null&&l[0]&&(a.prefLabel={und:o.result.prefLabel[0]}),(f=(c=o.result)==null?void 0:c.altLabel)!=null&&f[0]&&(a.altLabel={und:o.result.altLabel}),(g=(m=o.result)==null?void 0:m.scopeNote)!=null&&g[0]&&(a.scopeNote={und:o.result.scopeNote}),(d=(h=o.result)==null?void 0:h.broader)!=null&&d.length&&(a.broader=o.result.broader),(O=(y=o.result)==null?void 0:y.narrower)!=null&&O.length&&(a.narrower=o.result.narrower),a})})}suggest(e){return E(this,null,function*(){let r=e.search,n=yield this.search(e);return[r,n.map(i=>P.prefLabel(i,{fallbackToUri:!1})),[],n.map(i=>i.uri)]})}search(n){return E(this,arguments,function*({scheme:e,search:r}){var s,o,a,u,l;if(!r)throw new U({parameter:"search"});if(!e||!P.isContainedIn(e,Sr.schemes))throw new U({parameter:"scheme"});return(((l=(u=(a=(o=(s=(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: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 m,g,h;let f={uri:c.uri,inScheme:[e]};return(m=c.prefLabel)!=null&&m[0]&&(f.prefLabel={und:c.prefLabel[0]}),(g=c.altLabel)!=null&&g[0]&&(f.altLabel={und:c.altLabel}),(h=c.scopeNote)!=null&&h[0]&&(f.scopeNote={und:c.scopeNote[0]}),f})})}};ee(Ze,"supports",{schemes:!0,top:!1,data:!0,concepts:!0,narrower:!1,ancestors:!1,suggest:!0,search:!0});Ze.providerName="NoTApi";Ze.providerType="http://bartoc.org/api-type/noterms";var Ce={[G.providerName]:G,init(t){let e=t.provider;if(t.api&&Object.keys(this).find(r=>{if(Ce[r].prototype instanceof G&&t.api===Ce[r].providerType)return t=I({},t),delete t.api,e=r,!0}),this[e])return new this[e](t);throw new Ct},addProvider(t){if(t.prototype instanceof G||t===G)this[t.providerName]=t;else throw new Ct}};Ce.addProvider(Te);Ce.addProvider(Ie);Object.values(Ht).forEach(t=>{Ce.addProvider(t)});var Mi={},qt=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=>Ce.init(r)).filter(r=>r),e.registries.forEach(r=>{r.cdk=this}),this._config=e}get providers(){return Ce}createInstance(e){return new t(e)}loadConfig(e){return E(this,null,function*(){let r=yield this.axios.get(e);this.config=r.data})}loadBuildInfo(o){var a=o,{url:e,buildInfo:r=null,interval:n=6e4,callback:i}=a,s=W(a,["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(F(I({},s),{function:()=>E(this,null,function*(){return(yield this.axios.get(e,{headers:{"Cache-Control":"no-cache"}})).data}),interval:n,callback:(u,l,c)=>{u?i(u):(c||!c&&r&&!Re(l,r))&&i(null,l,c||r)}}))}getRegistryForUri(e){return this.config.registries.find(r=>r.uri==e)}initializeRegistry(e){return e=Ce.init(e),e.cdk=this,e}addProvider(e){Ce.addProvider(e)}static addProvider(e){Ce.addProvider(e)}repeat({function:e,interval:r=15e3,callback:n,callImmediately:i=!0}={}){if(!e)throw new U({parameter:"function"});if(typeof e!="function")throw new U({parameter:"function",message:"function needs to be a function"});let s=()=>E(null,null,function*(){return e()});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=m=>{let g=o.result;Re(g,m)||(o.result=m,o.error=null,n(null,m,g))},u=m=>{o.error=m,n(m)},l=m=>{o.isPaused||(o.timer=setTimeout(()=>{m()},o.interval))},c=()=>s().then(a).catch(u).then(()=>l(c)),f=(m=i)=>{m?c():l(c)};return f(),{start:(...m)=>{o.isPaused=!1,f(...m)},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(m){o.interval=m}}}getSchemes(){return E(this,arguments,function*(e={}){let r=[],n=[];for(let i of this.config.registries)if(i.has.schemes!==!1){let s=i.getSchemes(e).then(o=>{for(let l of o){l._registry=i,l.__DETAILSLOADED__=1,l.type=l.type||["http://www.w3.org/2004/02/skos/core#ConceptScheme"];let c=r.find(h=>P.compare(h,l)),f,m,g=!1;if(c){f=this.config.registries.indexOf(i),f!=-1&&(f=this.config.registries.length-f),m=this.config.registries.indexOf(c==null?void 0:c._registry),m!=-1&&(m=this.config.registries.length-m);let h=l.concepts?l.concepts.length==0?-1:1:0,d=c.concepts?c.concepts.length==0?-1:1:0;h>d?g=!0:h<d?g=!1:g=m<f}if(!c||g){if(g){let h=r.findIndex(R=>P.compare(R,c));h!=-1&&r.splice(h,1);let a=c,{concepts:d,topConcepts:y}=a,O=W(a,["concepts","topConcepts"]);l=P.merge(l,O,{mergeUris:!0,skipPaths:["_registry"]})}l._registry=i,r.push(l)}else{let h=r.findIndex(d=>P.compare(d,l));if(h!=-1){let d=r[h]._registry,u=l,{concepts:y,topConcepts:O}=u,R=W(u,["concepts","topConcepts"]);r[h]=P.merge(r[h],R,{mergeUris:!0,skipPaths:["_registry"]}),r[h]._registry=d}}}}).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}),P.sortSchemes(r.filter(Boolean))})}registryForScheme(e,r="concepts"){var i;let n=e._registry;if(n)return n;for(let s of e.API||[]){let o=s,{type:a}=o,u=W(o,["type"]);let l=u.url,c=`${a}-${l}`;if(Mi[c]){let f=Mi[c];return Array.isArray(f._jskos.schemes)&&!P.isContainedIn(e,f._jskos.schemes)&&f._jskos.schemes.push(e),f}else{u.scheme=e;for(let f of Object.values(Ce)){if((f==null?void 0:f.providerType)!==a||!f._registryConfigForBartocApiConfig||r&&!((i=f==null?void 0:f.supports)!=null&&i[r]))continue;let m=f.providerName,g=Ce[m]._registryConfigForBartocApiConfig(u);if(g){g.provider=m;try{if(n=this.initializeRegistry(g),n)return Mi[c]=n,n}catch(h){continue}}}}}return null}};var zo=new qt;function lc(t){Object.values(Ht).forEach(e=>(t||zo).addProvider(e))}return Wa(cc);})();
|
|
17
17
|
/*! Bundled license information:
|
|
18
18
|
|
|
19
19
|
localforage/dist/localforage.js:
|