@noeldemartin/solid-utils 0.5.0 → 0.6.0-next.70fba2db4562da63a3ae210c80936d148acfc0de
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/io-CMHtz5bu.js +401 -0
- package/dist/io-CMHtz5bu.js.map +1 -0
- package/dist/noeldemartin-solid-utils.d.ts +13 -65
- package/dist/noeldemartin-solid-utils.js +224 -0
- package/dist/noeldemartin-solid-utils.js.map +1 -0
- package/dist/testing.d.ts +45 -0
- package/dist/testing.js +157 -0
- package/dist/testing.js.map +1 -0
- package/package.json +58 -63
- package/src/errors/UnauthorizedError.ts +1 -3
- package/src/errors/UnsuccessfulNetworkRequestError.ts +2 -2
- package/src/helpers/auth.test.ts +221 -0
- package/src/helpers/auth.ts +28 -27
- package/src/helpers/identifiers.test.ts +76 -0
- package/src/helpers/identifiers.ts +14 -17
- package/src/helpers/index.ts +0 -1
- package/src/helpers/interop.ts +23 -16
- package/src/helpers/io.test.ts +228 -0
- package/src/helpers/io.ts +57 -77
- package/src/helpers/jsonld.ts +6 -6
- package/src/helpers/vocabs.ts +3 -6
- package/src/helpers/wac.test.ts +64 -0
- package/src/helpers/wac.ts +10 -6
- package/src/index.ts +3 -0
- package/src/models/SolidDocument.test.ts +77 -0
- package/src/models/SolidDocument.ts +14 -18
- package/src/models/SolidStore.ts +22 -12
- package/src/models/SolidThing.ts +5 -7
- package/src/models/index.ts +2 -0
- package/src/{helpers/testing.ts → testing/helpers.ts} +24 -27
- package/src/testing/hepers.test.ts +329 -0
- package/src/testing/index.ts +2 -2
- package/src/testing/vitest/index.ts +15 -0
- package/src/testing/vitest/matchers.ts +68 -0
- package/src/types/n3.d.ts +0 -2
- package/.github/workflows/ci.yml +0 -16
- package/.nvmrc +0 -1
- package/CHANGELOG.md +0 -70
- package/dist/noeldemartin-solid-utils.cjs.js +0 -2
- package/dist/noeldemartin-solid-utils.cjs.js.map +0 -1
- package/dist/noeldemartin-solid-utils.esm.js +0 -2
- package/dist/noeldemartin-solid-utils.esm.js.map +0 -1
- package/dist/noeldemartin-solid-utils.umd.js +0 -90
- package/dist/noeldemartin-solid-utils.umd.js.map +0 -1
- package/noeldemartin.config.js +0 -9
- package/src/main.ts +0 -5
- package/src/plugins/chai/assertions.ts +0 -40
- package/src/plugins/chai/index.ts +0 -5
- package/src/plugins/cypress/types.d.ts +0 -15
- package/src/plugins/index.ts +0 -2
- package/src/plugins/jest/index.ts +0 -5
- package/src/plugins/jest/matchers.ts +0 -65
- package/src/plugins/jest/types.d.ts +0 -14
- package/src/testing/ResponseStub.ts +0 -46
- package/src/testing/mocking.ts +0 -33
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).NoelDeMartinSolidUtils={})}(this,(function(e){"use strict";function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function n(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,u,"next",e)}function u(e){n(a,i,o,s,u,"throw",e)}s(void 0)}))}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d(this,r)}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){if(e){if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=y(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}var w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function x(e){var t={exports:{}};return e(t,t.exports),t.exports}var _,j,S=function(e){return e&&e.Math===Math&&e},I=S("object"==typeof globalThis&&globalThis)||S("object"==typeof window&&window)||S("object"==typeof self&&self)||S("object"==typeof w&&w)||S("object"==typeof w&&w)||function(){return this}()||Function("return this")(),k=function(e){try{return!!e()}catch(e){return!0}},R=!k((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),E=!k((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),O=Function.prototype.call,T=E?O.bind(O):function(){return O.apply(O,arguments)},A={}.propertyIsEnumerable,P=Object.getOwnPropertyDescriptor,N=P&&!A.call({1:2},1)?function(e){var t=P(this,e);return!!t&&t.enumerable}:A,L={f:N},C=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},D=Function.prototype,M=D.call,U=E&&D.bind.bind(M,M),F=E?U:function(e){return function(){return M.apply(e,arguments)}},B=F({}.toString),q=F("".slice),z=function(e){return q(B(e),8,-1)},J=Object,$=F("".split),G=k((function(){return!J("z").propertyIsEnumerable(0)}))?function(e){return"String"===z(e)?$(e,""):J(e)}:J,H=function(e){return null==e},V=TypeError,Q=function(e){if(H(e))throw new V("Can't call method on "+e);return e},W=function(e){return G(Q(e))},Y="object"==typeof document&&document.all,K=void 0===Y&&void 0!==Y?function(e){return"function"==typeof e||e===Y}:function(e){return"function"==typeof e},X=function(e){return"object"==typeof e?null!==e:K(e)},Z=function(e){return K(e)?e:void 0},ee=function(e,t){return arguments.length<2?Z(I[e]):I[e]&&I[e][t]},te=F({}.isPrototypeOf),re="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ne=I.process,ie=I.Deno,oe=ne&&ne.versions||ie&&ie.version,ae=oe&&oe.v8;ae&&(j=(_=ae.split("."))[0]>0&&_[0]<4?1:+(_[0]+_[1])),!j&&re&&(!(_=re.match(/Edge\/(\d+)/))||_[1]>=74)&&(_=re.match(/Chrome\/(\d+)/))&&(j=+_[1]);var se=j,ue=I.String,ce=!!Object.getOwnPropertySymbols&&!k((function(){var e=Symbol("symbol detection");return!ue(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&se&&se<41})),le=ce&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,fe=Object,he=le?function(e){return"symbol"==typeof e}:function(e){var t=ee("Symbol");return K(t)&&te(t.prototype,fe(e))},de=String,pe=function(e){try{return de(e)}catch(e){return"Object"}},ve=TypeError,ge=function(e){if(K(e))return e;throw new ve(pe(e)+" is not a function")},ye=function(e,t){var r=e[t];return H(r)?void 0:ge(r)},me=TypeError,be=!1,we=Object.defineProperty,xe=function(e,t){try{we(I,e,{value:t,configurable:!0,writable:!0})}catch(r){I[e]=t}return t},_e=x((function(e){var t="__core-js_shared__",r=e.exports=I[t]||xe(t,{});(r.versions||(r.versions=[])).push({version:"3.37.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),je=function(e,t){return _e[e]||(_e[e]=t||{})},Se=Object,Ie=function(e){return Se(Q(e))},ke=F({}.hasOwnProperty),Re=Object.hasOwn||function(e,t){return ke(Ie(e),t)},Ee=0,Oe=Math.random(),Te=F(1..toString),Ae=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Te(++Ee+Oe,36)},Pe=I.Symbol,Ne=je("wks"),Le=le?Pe.for||Pe:Pe&&Pe.withoutSetter||Ae,Ce=function(e){return Re(Ne,e)||(Ne[e]=ce&&Re(Pe,e)?Pe[e]:Le("Symbol."+e)),Ne[e]},De=TypeError,Me=Ce("toPrimitive"),Ue=function(e,t){if(!X(e)||he(e))return e;var r,n=ye(e,Me);if(n){if(void 0===t&&(t="default"),r=T(n,e,t),!X(r)||he(r))return r;throw new De("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&K(r=e.toString)&&!X(n=T(r,e)))return n;if(K(r=e.valueOf)&&!X(n=T(r,e)))return n;if("string"!==t&&K(r=e.toString)&&!X(n=T(r,e)))return n;throw new me("Can't convert object to primitive value")}(e,t)},Fe=function(e){var t=Ue(e,"string");return he(t)?t:t+""},Be=I.document,qe=X(Be)&&X(Be.createElement),ze=function(e){return qe?Be.createElement(e):{}},Je=!R&&!k((function(){return 7!==Object.defineProperty(ze("div"),"a",{get:function(){return 7}}).a})),$e=Object.getOwnPropertyDescriptor,Ge=R?$e:function(e,t){if(e=W(e),t=Fe(t),Je)try{return $e(e,t)}catch(e){}if(Re(e,t))return C(!T(L.f,e,t),e[t])},He={f:Ge},Ve=R&&k((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Qe=String,We=TypeError,Ye=function(e){if(X(e))return e;throw new We(Qe(e)+" is not an object")},Ke=TypeError,Xe=Object.defineProperty,Ze=Object.getOwnPropertyDescriptor,et="enumerable",tt="configurable",rt="writable",nt=R?Ve?function(e,t,r){if(Ye(e),t=Fe(t),Ye(r),"function"==typeof e&&"prototype"===t&&"value"in r&&rt in r&&!r.writable){var n=Ze(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:tt in r?r.configurable:n.configurable,enumerable:et in r?r.enumerable:n.enumerable,writable:!1})}return Xe(e,t,r)}:Xe:function(e,t,r){if(Ye(e),t=Fe(t),Ye(r),Je)try{return Xe(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new Ke("Accessors not supported");return"value"in r&&(e[t]=r.value),e},it={f:nt},ot=R?function(e,t,r){return it.f(e,t,C(1,r))}:function(e,t,r){return e[t]=r,e},at=Function.prototype,st=R&&Object.getOwnPropertyDescriptor,ut=Re(at,"name"),ct={EXISTS:ut,PROPER:ut&&"something"===function(){}.name,CONFIGURABLE:ut&&(!R||R&&st(at,"name").configurable)},lt=F(Function.toString);K(_e.inspectSource)||(_e.inspectSource=function(e){return lt(e)});var ft,ht,dt,pt=_e.inspectSource,vt=I.WeakMap,gt=K(vt)&&/native code/.test(String(vt)),yt=je("keys"),mt=function(e){return yt[e]||(yt[e]=Ae(e))},bt={},wt="Object already initialized",xt=I.TypeError,_t=I.WeakMap;if(gt||_e.state){var jt=_e.state||(_e.state=new _t);jt.get=jt.get,jt.has=jt.has,jt.set=jt.set,ft=function(e,t){if(jt.has(e))throw new xt(wt);return t.facade=e,jt.set(e,t),t},ht=function(e){return jt.get(e)||{}},dt=function(e){return jt.has(e)}}else{var St=mt("state");bt[St]=!0,ft=function(e,t){if(Re(e,St))throw new xt(wt);return t.facade=e,ot(e,St,t),t},ht=function(e){return Re(e,St)?e[St]:{}},dt=function(e){return Re(e,St)}}var It={set:ft,get:ht,has:dt,enforce:function(e){return dt(e)?ht(e):ft(e,{})},getterFor:function(e){return function(t){var r;if(!X(t)||(r=ht(t)).type!==e)throw new xt("Incompatible receiver, "+e+" required");return r}}},kt=x((function(e){var t=ct.CONFIGURABLE,r=It.enforce,n=It.get,i=String,o=Object.defineProperty,a=F("".slice),s=F("".replace),u=F([].join),c=R&&!k((function(){return 8!==o((function(){}),"length",{value:8}).length})),l=String(String).split("String"),f=e.exports=function(e,n,f){"Symbol("===a(i(n),0,7)&&(n="["+s(i(n),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),f&&f.getter&&(n="get "+n),f&&f.setter&&(n="set "+n),(!Re(e,"name")||t&&e.name!==n)&&(R?o(e,"name",{value:n,configurable:!0}):e.name=n),c&&f&&Re(f,"arity")&&e.length!==f.arity&&o(e,"length",{value:f.arity});try{f&&Re(f,"constructor")&&f.constructor?R&&o(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var h=r(e);return Re(h,"source")||(h.source=u(l,"string"==typeof n?n:"")),e};Function.prototype.toString=f((function(){return K(this)&&n(this).source||pt(this)}),"toString")})),Rt=function(e,t,r,n){n||(n={});var i=n.enumerable,o=void 0!==n.name?n.name:t;if(K(r)&&kt(r,o,n),n.global)i?e[t]=r:xe(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:it.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Et=Math.ceil,Ot=Math.floor,Tt=Math.trunc||function(e){var t=+e;return(t>0?Ot:Et)(t)},At=function(e){var t=+e;return t!=t||0===t?0:Tt(t)},Pt=Math.max,Nt=Math.min,Lt=function(e,t){var r=At(e);return r<0?Pt(r+t,0):Nt(r,t)},Ct=Math.min,Dt=function(e){var t=At(e);return t>0?Ct(t,9007199254740991):0},Mt=function(e){return Dt(e.length)},Ut=function(e){return function(t,r,n){var i=W(t),o=Mt(i);if(0===o)return!e&&-1;var a,s=Lt(n,o);if(e&&r!=r){for(;o>s;)if((a=i[s++])!=a)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},Ft={includes:Ut(!0),indexOf:Ut(!1)},Bt=Ft.indexOf,qt=F([].push),zt=function(e,t){var r,n=W(e),i=0,o=[];for(r in n)!Re(bt,r)&&Re(n,r)&&qt(o,r);for(;t.length>i;)Re(n,r=t[i++])&&(~Bt(o,r)||qt(o,r));return o},Jt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],$t=Jt.concat("length","prototype"),Gt=Object.getOwnPropertyNames||function(e){return zt(e,$t)},Ht={f:Gt},Vt={f:Object.getOwnPropertySymbols},Qt=F([].concat),Wt=ee("Reflect","ownKeys")||function(e){var t=Ht.f(Ye(e)),r=Vt.f;return r?Qt(t,r(e)):t},Yt=function(e,t,r){for(var n=Wt(t),i=it.f,o=He.f,a=0;a<n.length;a++){var s=n[a];Re(e,s)||r&&Re(r,s)||i(e,s,o(t,s))}},Kt=/#|\.prototype\./,Xt=function(e,t){var r=er[Zt(e)];return r===rr||r!==tr&&(K(t)?k(t):!!t)},Zt=Xt.normalize=function(e){return String(e).replace(Kt,".").toLowerCase()},er=Xt.data={},tr=Xt.NATIVE="N",rr=Xt.POLYFILL="P",nr=Xt,ir=He.f,or=function(e,t){var r,n,i,o,a,s=e.target,u=e.global,c=e.stat;if(r=u?I:c?I[s]||xe(s,{}):I[s]&&I[s].prototype)for(n in t){if(o=t[n],i=e.dontCallGetSet?(a=ir(r,n))&&a.value:r[n],!nr(u?n:s+(c?".":"#")+n,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;Yt(o,i)}(e.sham||i&&i.sham)&&ot(o,"sham",!0),Rt(r,n,o,e)}},ar=Array.isArray||function(e){return"Array"===z(e)},sr=TypeError,ur=function(e){if(e>9007199254740991)throw sr("Maximum allowed index exceeded");return e},cr=function(e,t,r){R?it.f(e,t,C(0,r)):e[t]=r},lr={};lr[Ce("toStringTag")]="z";var fr="[object z]"===String(lr),hr=Ce("toStringTag"),dr=Object,pr="Arguments"===z(function(){return arguments}()),vr=fr?z:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=dr(e),hr))?r:pr?z(t):"Object"===(n=z(t))&&K(t.callee)?"Arguments":n},gr=function(){},yr=ee("Reflect","construct"),mr=/^\s*(?:class|function)\b/,br=F(mr.exec),wr=!mr.test(gr),xr=function(e){if(!K(e))return!1;try{return yr(gr,[],e),!0}catch(e){return!1}},_r=function(e){if(!K(e))return!1;switch(vr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return wr||!!br(mr,pt(e))}catch(e){return!0}};_r.sham=!0;var jr=!yr||k((function(){var e;return xr(xr.call)||!xr(Object)||!xr((function(){e=!0}))||e}))?_r:xr,Sr=Ce("species"),Ir=Array,kr=function(e,t){return new(function(e){var t;return ar(e)&&(t=e.constructor,(jr(t)&&(t===Ir||ar(t.prototype))||X(t)&&null===(t=t[Sr]))&&(t=void 0)),void 0===t?Ir:t}(e))(0===t?0:t)},Rr=Ce("species"),Er=function(e){return se>=51||!k((function(){var t=[];return(t.constructor={})[Rr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Or=Ce("isConcatSpreadable"),Tr=se>=51||!k((function(){var e=[];return e[Or]=!1,e.concat()[0]!==e})),Ar=function(e){if(!X(e))return!1;var t=e[Or];return void 0!==t?!!t:ar(e)},Pr=!Tr||!Er("concat");or({target:"Array",proto:!0,arity:1,forced:Pr},{concat:function(e){var t,r,n,i,o,a=Ie(this),s=kr(a,0),u=0;for(t=-1,n=arguments.length;t<n;t++)if(Ar(o=-1===t?a:arguments[t]))for(i=Mt(o),ur(u+i),r=0;r<i;r++,u++)r in o&&cr(s,u,o[r]);else ur(u+1),cr(s,u++,o);return s.length=u,s}});var Nr=fr?{}.toString:function(){return"[object "+vr(this)+"]"};fr||Rt(Object.prototype,"toString",Nr,{unsafe:!0});var Lr=function(e){return{iterator:e,next:e.next,done:!1}},Cr=function(e,t,r,n){try{var i=ye(e,"return");if(i)return ee("Promise").resolve(T(i,e)).then((function(){t(r)}),(function(e){n(e)}))}catch(e){return n(e)}t(r)},Dr=ee("Promise"),Mr=TypeError;or({target:"AsyncIterator",proto:!0,real:!0},{reduce:function(e){Ye(this),ge(e);var t=Lr(this),r=t.iterator,n=t.next,i=arguments.length<2,o=i?void 0:arguments[1],a=0;return new Dr((function(t,s){var u=function(e){Cr(r,s,e,s)},c=function(){try{Dr.resolve(Ye(T(n,r))).then((function(r){try{if(Ye(r).done)i?s(new Mr("Reduce of empty iterator with no initial value")):t(o);else{var n=r.value;if(i)i=!1,o=n,c();else try{var l=e(o,n,a),f=function(e){o=e,c()};X(l)?Dr.resolve(l).then(f,u):f(l)}catch(e){u(e)}}a++}catch(e){s(e)}}),s)}catch(e){s(e)}};c()}))}});var Ur,Fr=TypeError,Br=function(e,t){if(te(t,e))return e;throw new Fr("Incorrect invocation")},qr=!k((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),zr=mt("IE_PROTO"),Jr=Object,$r=Jr.prototype,Gr=qr?Jr.getPrototypeOf:function(e){var t=Ie(e);if(Re(t,zr))return t[zr];var r=t.constructor;return K(r)&&t instanceof r?r.prototype:t instanceof Jr?$r:null},Hr=function(e,t,r){return r.get&&kt(r.get,t,{getter:!0}),r.set&&kt(r.set,t,{setter:!0}),it.f(e,t,r)},Vr=Object.keys||function(e){return zt(e,Jt)},Qr=R&&!Ve?Object.defineProperties:function(e,t){Ye(e);for(var r,n=W(t),i=Vr(t),o=i.length,a=0;o>a;)it.f(e,r=i[a++],n[r]);return e},Wr={f:Qr},Yr=ee("document","documentElement"),Kr=mt("IE_PROTO"),Xr=function(){},Zr=function(e){return"<script>"+e+"</"+"script>"},en=function(e){e.write(Zr("")),e.close();var t=e.parentWindow.Object;return e=null,t},tn=function(){try{Ur=new ActiveXObject("htmlfile")}catch(e){}var e,t;tn="undefined"!=typeof document?document.domain&&Ur?en(Ur):((t=ze("iframe")).style.display="none",Yr.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Zr("document.F=Object")),e.close(),e.F):en(Ur);for(var r=Jt.length;r--;)delete tn.prototype[Jt[r]];return tn()};bt[Kr]=!0;var rn,nn,on,an=Object.create||function(e,t){var r;return null!==e?(Xr.prototype=Ye(e),r=new Xr,Xr.prototype=null,r[Kr]=e):r=tn(),void 0===t?r:Wr.f(r,t)},sn=Ce("iterator"),un=!1;[].keys&&("next"in(on=[].keys())?(nn=Gr(Gr(on)))!==Object.prototype&&(rn=nn):un=!0);var cn=!X(rn)||k((function(){var e={};return rn[sn].call(e)!==e}));cn&&(rn={}),K(rn[sn])||Rt(rn,sn,(function(){return this}));var ln={IteratorPrototype:rn,BUGGY_SAFARI_ITERATORS:un},fn=ln.IteratorPrototype,hn="constructor",dn="Iterator",pn=Ce("toStringTag"),vn=TypeError,gn=I.Iterator,yn=!K(gn)||gn.prototype!==fn||!k((function(){gn({})})),mn=function(){if(Br(this,fn),Gr(this)===fn)throw new vn("Abstract class Iterator not directly constructable")},bn=function(e,t){R?Hr(fn,e,{configurable:!0,get:function(){return t},set:function(t){if(Ye(this),this===fn)throw new vn("You can't redefine this property");Re(this,e)?this[e]=t:cr(this,e,t)}}):fn[e]=t};Re(fn,pn)||bn(pn,dn),!yn&&Re(fn,hn)&&fn.constructor!==Object||bn(hn,mn),mn.prototype=fn,or({global:!0,constructor:!0,forced:yn},{Iterator:mn});var wn=function(e){if("Function"===z(e))return F(e)},xn=wn(wn.bind),_n=function(e,t){return ge(e),void 0===t?e:E?xn(e,t):function(){return e.apply(t,arguments)}},jn={},Sn=Ce("iterator"),In=Array.prototype,kn=function(e){return void 0!==e&&(jn.Array===e||In[Sn]===e)},Rn=Ce("iterator"),En=function(e){if(!H(e))return ye(e,Rn)||ye(e,"@@iterator")||jn[vr(e)]},On=TypeError,Tn=function(e,t){var r=arguments.length<2?En(e):t;if(ge(r))return Ye(T(r,e));throw new On(pe(e)+" is not iterable")},An=function(e,t,r){var n,i;Ye(e);try{if(!(n=ye(e,"return"))){if("throw"===t)throw r;return r}n=T(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Ye(n),r},Pn=TypeError,Nn=function(e,t){this.stopped=e,this.result=t},Ln=Nn.prototype,Cn=function(e,t,r){var n,i,o,a,s,u,c,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),v=_n(t,l),g=function(e){return n&&An(n,"normal",e),new Nn(!0,e)},y=function(e){return f?(Ye(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(h)n=e.iterator;else if(d)n=e;else{if(!(i=En(e)))throw new Pn(pe(e)+" is not iterable");if(kn(i)){for(o=0,a=Mt(e);a>o;o++)if((s=y(e[o]))&&te(Ln,s))return s;return new Nn(!1)}n=Tn(e,i)}for(u=h?e.next:n.next;!(c=T(u,n)).done;){try{s=y(c.value)}catch(e){An(n,"throw",e)}if("object"==typeof s&&s&&te(Ln,s))return s}return new Nn(!1)},Dn=TypeError;or({target:"Iterator",proto:!0,real:!0},{reduce:function(e){Ye(this),ge(e);var t=Lr(this),r=arguments.length<2,n=r?void 0:arguments[1],i=0;if(Cn(t,(function(t){r?(r=!1,n=t):n=e(n,t,i),i++}),{IS_RECORD:!0}),r)throw new Dn("Reduce of empty iterator with no initial value");return n}});var Mn=it.f,Un=Ce("toStringTag"),Fn=function(e,t,r){e&&!r&&(e=e.prototype),e&&!Re(e,Un)&&Mn(e,Un,{configurable:!0,value:t})};or({global:!0},{Reflect:{}}),Fn(I.Reflect,"Reflect",!0);var Bn=Function.prototype,qn=Bn.apply,zn=Bn.call,Jn="object"==typeof Reflect&&Reflect.apply||(E?zn.bind(qn):function(){return zn.apply(qn,arguments)}),$n=F([].slice),Gn=Function,Hn=F([].concat),Vn=F([].join),Qn={},Wn=function(e,t,r){if(!Re(Qn,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Qn[t]=Gn("C,a","return new C("+Vn(n,",")+")")}return Qn[t](e,r)},Yn=E?Gn.bind:function(e){var t=ge(this),r=t.prototype,n=$n(arguments,1),i=function(){var r=Hn(n,$n(arguments));return this instanceof i?Wn(t,r.length,r):t.apply(e,r)};return X(r)&&(i.prototype=r),i},Kn=TypeError,Xn=function(e){if(jr(e))return e;throw new Kn(pe(e)+" is not a constructor")},Zn=ee("Reflect","construct"),ei=Object.prototype,ti=[].push,ri=k((function(){function e(){}return!(Zn((function(){}),[],e)instanceof e)})),ni=!k((function(){Zn((function(){}))})),ii=ri||ni;function oi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ai(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function si(e,t){return si=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},si(e,t)}function ui(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&si(e,t)}function ci(e){return ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ci(e)}function li(e,t){if(t&&("object"==ci(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ai(e)}function fi(e){return fi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fi(e)}or({target:"Reflect",stat:!0,forced:ii,sham:ii},{construct:function(e,t){Xn(e),Ye(t);var r=arguments.length<3?e:Xn(arguments[2]);if(ni&&!ri)return Zn(e,t,r);if(e===r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return Jn(ti,n,t),new(Jn(Yn,e,n))}var i=r.prototype,o=an(X(i)?i:ei),a=Jn(e,o,t);return X(a)?a:o}});var hi=ct.EXISTS,di=Function.prototype,pi=F(di.toString),vi=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,gi=F(vi.exec);function yi(e){var t=function(e,t){if("object"!=ci(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ci(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ci(t)?t:t+""}function mi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,yi(n.key),n)}}function bi(e,t,r){return t&&mi(e.prototype,t),r&&mi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function wi(e,t,r){return(t=yi(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}R&&!hi&&Hr(di,"name",{configurable:!0,get:function(){try{return gi(vi,pi(this))[1]}catch(e){return""}}}),or({global:!0,forced:I.globalThis!==I},{globalThis:I});var xi=Object.assign,_i=Object.defineProperty,ji=F([].concat),Si=!xi||k((function(){if(R&&1!==xi({b:1},xi(_i({},"a",{enumerable:!0,get:function(){_i(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!==xi({},e)[r]||Vr(xi({},t)).join("")!==n}))?function(e,t){for(var r=Ie(e),n=arguments.length,i=1,o=Vt.f,a=L.f;n>i;)for(var s,u=G(arguments[i++]),c=o?ji(Vr(u),o(u)):Vr(u),l=c.length,f=0;l>f;)s=c[f++],R&&!T(a,u,s)||(r[s]=u[s]);return r}:xi;or({target:"Object",stat:!0,arity:2,forced:Object.assign!==Si},{assign:Si});var Ii=function(e){return void 0!==e&&(Re(e,"value")||Re(e,"writable"))};or({target:"Reflect",stat:!0},{get:function e(t,r){var n,i,o=arguments.length<3?t:arguments[2];return Ye(t)===o?t[r]:(n=He.f(t,r))?Ii(n)?n.value:void 0===n.get?void 0:T(n.get,o):X(i=Gr(t))?e(i,r,o):void 0}});var ki=k((function(){var e=function(){},t=it.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)}));or({target:"Reflect",stat:!0,forced:ki},{set:function e(t,r,n){var i,o,a,s=arguments.length<4?t:arguments[3],u=He.f(Ye(t),r);if(!u){if(X(o=Gr(t)))return e(o,r,n,s);u=C(0)}if(Ii(u)){if(!1===u.writable||!X(s))return!1;if(i=He.f(s,r)){if(i.get||i.set||!1===i.writable)return!1;i.value=n,it.f(s,r,i)}else it.f(s,r,C(0,n))}else{if(void 0===(a=u.set))return!1;T(a,s,n)}return!0}});var Ri=He.f;or({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var r=Ri(Ye(e),t);return!(r&&!r.configurable)&&delete e[t]}});var Ei=it.f,Oi=Ce("unscopables"),Ti=Array.prototype;void 0===Ti[Oi]&&Ei(Ti,Oi,{configurable:!0,value:an(null)});var Ai=function(e){Ti[Oi][e]=!0},Pi=ln.IteratorPrototype,Ni=function(){return this},Li=function(e,t,r,n){var i=t+" Iterator";return e.prototype=an(Pi,{next:C(+!n,r)}),Fn(e,i,!1),jn[i]=Ni,e},Ci=function(e,t,r){try{return F(ge(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},Di=String,Mi=TypeError,Ui=function(e){if(function(e){return X(e)||null===e}(e))return e;throw new Mi("Can't set "+Di(e)+" as a prototype")},Fi=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Ci(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Q(r),Ui(n),X(r)?(t?e(r,n):r.__proto__=n,r):r}}():void 0),Bi=ct.PROPER,qi=ct.CONFIGURABLE,zi=ln.IteratorPrototype,Ji=ln.BUGGY_SAFARI_ITERATORS,$i=Ce("iterator"),Gi="keys",Hi="values",Vi="entries",Qi=function(){return this},Wi=function(e,t,r,n,i,o,a){Li(r,t,n);var s,u,c,l=function(e){if(e===i&&v)return v;if(!Ji&&e&&e in d)return d[e];switch(e){case Gi:case Hi:case Vi:return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",h=!1,d=e.prototype,p=d[$i]||d["@@iterator"]||i&&d[i],v=!Ji&&p||l(i),g="Array"===t&&d.entries||p;if(g&&(s=Gr(g.call(new e)))!==Object.prototype&&s.next&&(Gr(s)!==zi&&(Fi?Fi(s,zi):K(s[$i])||Rt(s,$i,Qi)),Fn(s,f,!0)),Bi&&i===Hi&&p&&p.name!==Hi&&(qi?ot(d,"name",Hi):(h=!0,v=function(){return T(p,this)})),i)if(u={values:l(Hi),keys:o?v:l(Gi),entries:l(Vi)},a)for(c in u)(Ji||h||!(c in d))&&Rt(d,c,u[c]);else or({target:t,proto:!0,forced:Ji||h},u);return d[$i]!==v&&Rt(d,$i,v,{name:i}),jn[t]=v,u},Yi=function(e,t){return{value:e,done:t}},Ki=it.f,Xi="Array Iterator",Zi=It.set,eo=It.getterFor(Xi),to=Wi(Array,"Array",(function(e,t){Zi(this,{type:Xi,target:W(e),index:0,kind:t})}),(function(){var e=eo(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,Yi(void 0,!0);switch(e.kind){case"keys":return Yi(r,!1);case"values":return Yi(t[r],!1)}return Yi([r,t[r]],!1)}),"values"),ro=jn.Arguments=jn.Array;if(Ai("keys"),Ai("values"),Ai("entries"),R&&"values"!==ro.name)try{Ki(ro,"name",{value:"values"})}catch(e){}var no=Ht.f,io="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],oo={f:function(e){return io&&"Window"===z(e)?function(e){try{return no(e)}catch(e){return $n(io)}}(e):no(W(e))}},ao=k((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),so=Object.isExtensible,uo=k((function(){so(1)}))||ao?function(e){return!!X(e)&&((!ao||"ArrayBuffer"!==z(e))&&(!so||so(e)))}:so,co=!k((function(){return Object.isExtensible(Object.preventExtensions({}))})),lo=x((function(e){var t=it.f,r=!1,n=Ae("meta"),i=0,o=function(e){t(e,n,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},r=!0;var e=Ht.f,t=F([].splice),i={};i[n]=1,e(i).length&&(Ht.f=function(r){for(var i=e(r),o=0,a=i.length;o<a;o++)if(i[o]===n){t(i,o,1);break}return i},or({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:oo.f}))},fastKey:function(e,t){if(!X(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Re(e,n)){if(!uo(e))return"F";if(!t)return"E";o(e)}return e[n].objectID},getWeakData:function(e,t){if(!Re(e,n)){if(!uo(e))return!0;if(!t)return!1;o(e)}return e[n].weakData},onFreeze:function(e){return co&&r&&uo(e)&&!Re(e,n)&&o(e),e}};bt[n]=!0})),fo=Ce("iterator"),ho=!1;try{var po=0,vo={next:function(){return{done:!!po++}},return:function(){ho=!0}};vo[fo]=function(){return this},Array.from(vo,(function(){throw 2}))}catch(e){}var go=function(e,t){try{if(!t&&!ho)return!1}catch(e){return!1}var r=!1;try{var n={};n[fo]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},yo=function(e,t,r){var n,i;return Fi&&K(n=t.constructor)&&n!==r&&X(i=n.prototype)&&i!==r.prototype&&Fi(e,i),e},mo=function(e,t,r){var n=-1!==e.indexOf("Map"),i=-1!==e.indexOf("Weak"),o=n?"set":"add",a=I[e],s=a&&a.prototype,u=a,c={},l=function(e){var t=F(s[e]);Rt(s,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(i&&!X(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return i&&!X(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(i&&!X(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(nr(e,!K(a)||!(i||s.forEach&&!k((function(){(new a).entries().next()})))))u=r.getConstructor(t,e,n,o),lo.enable();else if(nr(e,!0)){var f=new u,h=f[o](i?{}:-0,1)!==f,d=k((function(){f.has(1)})),p=go((function(e){new a(e)})),v=!i&&k((function(){for(var e=new a,t=5;t--;)e[o](t,t);return!e.has(-0)}));p||((u=t((function(e,t){Br(e,s);var r=yo(new a,e,u);return H(t)||Cn(t,r[o],{that:r,AS_ENTRIES:n}),r}))).prototype=s,s.constructor=u),(d||v)&&(l("delete"),l("has"),n&&l("get")),(v||h)&&l(o),i&&s.clear&&delete s.clear}return c[e]=u,or({global:!0,constructor:!0,forced:u!==a},c),Fn(u,e),i||r.setStrong(u,e,n),u},bo=function(e,t,r){for(var n in t)Rt(e,n,t[n],r);return e},wo=Ce("species"),xo=function(e){var t=ee(e);R&&t&&!t[wo]&&Hr(t,wo,{configurable:!0,get:function(){return this}})},_o=lo.fastKey,jo=It.set,So=It.getterFor,Io={getConstructor:function(e,t,r,n){var i=e((function(e,i){Br(e,o),jo(e,{type:t,index:an(null),first:void 0,last:void 0,size:0}),R||(e.size=0),H(i)||Cn(i,e[n],{that:e,AS_ENTRIES:r})})),o=i.prototype,a=So(t),s=function(e,t,r){var n,i,o=a(e),s=u(e,t);return s?s.value=r:(o.last=s={index:i=_o(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=s),n&&(n.next=s),R?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},u=function(e,t){var r,n=a(e),i=_o(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key===t)return r};return bo(o,{clear:function(){for(var e=a(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=void 0),t=t.next;e.first=e.last=void 0,e.index=an(null),R?e.size=0:this.size=0},delete:function(e){var t=this,r=a(t),n=u(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first===n&&(r.first=i),r.last===n&&(r.last=o),R?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=_n(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),bo(o,r?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),R&&Hr(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=So(t),o=So(n);Wi(e,t,(function(e,t){jo(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?Yi("keys"===t?r.key:"values"===t?r.value:[r.key,r.value],!1):(e.target=void 0,Yi(void 0,!0))}),r?"entries":"values",!r,!0),xo(t)}};mo("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Io);var ko=String,Ro=function(e){if("Symbol"===vr(e))throw new TypeError("Cannot convert a Symbol value to a string");return ko(e)},Eo=F("".charAt),Oo=F("".charCodeAt),To=F("".slice),Ao=function(e){return function(t,r){var n,i,o=Ro(Q(t)),a=At(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=Oo(o,a))<55296||n>56319||a+1===s||(i=Oo(o,a+1))<56320||i>57343?e?Eo(o,a):n:e?To(o,a,a+2):i-56320+(n-55296<<10)+65536}},Po={codeAt:Ao(!1),charAt:Ao(!0)},No=Po.charAt,Lo="String Iterator",Co=It.set,Do=It.getterFor(Lo);Wi(String,"String",(function(e){Co(this,{type:Lo,string:Ro(e),index:0})}),(function(){var e,t=Do(this),r=t.string,n=t.index;return n>=r.length?Yi(void 0,!0):(e=No(r,n),t.index+=e.length,Yi(e,!1))}));var Mo=Set.prototype,Uo={Set:Set,add:F(Mo.add),has:F(Mo.has),remove:F(Mo.delete),proto:Mo},Fo=Uo.has,Bo=function(e){return Fo(e),e},qo=Uo.add;or({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=Bo(this),t=0,r=arguments.length;t<r;t++)qo(e,arguments[t]);return e}});var zo=Uo.remove;or({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=Bo(this),r=!0,n=0,i=arguments.length;n<i;n++)e=zo(t,arguments[n]),r=r&&e;return!!r}});var Jo=Ce("iterator"),$o=Object,Go=ee("Set"),Ho=function(e){return function(e){return X(e)&&"number"==typeof e.size&&K(e.has)&&K(e.keys)}(e)?e:function(e){if(H(e))return!1;var t=$o(e);return void 0!==t[Jo]||"@@iterator"in t||Re(jn,vr(t))}(e)?new Go(e):e},Vo=function(e,t,r){for(var n,i,o=r?e:e.iterator,a=e.next;!(n=T(a,o)).done;)if(void 0!==(i=t(n.value)))return i},Qo=Uo.Set,Wo=Uo.proto,Yo=F(Wo.forEach),Ko=F(Wo.keys),Xo=Ko(new Qo).next,Zo=function(e,t,r){return r?Vo({iterator:Ko(e),next:Xo},t):Yo(e,t)},ea=Uo.Set,ta=Uo.add,ra=function(e){var t=new ea;return Zo(e,(function(e){ta(t,e)})),t},na=Ci(Uo.proto,"size","get")||function(e){return e.size},ia="Invalid size",oa=RangeError,aa=TypeError,sa=Math.max,ua=function(e,t){this.set=e,this.size=sa(t,0),this.has=ge(e.has),this.keys=ge(e.keys)};ua.prototype={getIterator:function(){return Lr(Ye(T(this.keys,this.set)))},includes:function(e){return T(this.has,this.set,e)}};var ca=function(e){Ye(e);var t=+e.size;if(t!=t)throw new aa(ia);var r=At(t);if(r<0)throw new oa(ia);return new ua(e,r)},la=Uo.has,fa=Uo.remove,ha=function(e){var t=Bo(this),r=ca(e),n=ra(t);return na(t)<=r.size?Zo(t,(function(e){r.includes(e)&&fa(n,e)})):Vo(r.getIterator(),(function(e){la(t,e)&&fa(n,e)})),n};or({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){return T(ha,this,Ho(e))}}),or({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=Bo(this),r=_n(e,arguments.length>1?arguments[1]:void 0);return!1!==Zo(t,(function(e){if(!r(e,e,t))return!1}),!0)}});var da=Uo.Set,pa=Uo.add;or({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=Bo(this),r=_n(e,arguments.length>1?arguments[1]:void 0),n=new da;return Zo(t,(function(e){r(e,e,t)&&pa(n,e)})),n}}),or({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=Bo(this),r=_n(e,arguments.length>1?arguments[1]:void 0),n=Zo(t,(function(e){if(r(e,e,t))return{value:e}}),!0);return n&&n.value}});var va=Uo.Set,ga=Uo.add,ya=Uo.has,ma=function(e){var t=Bo(this),r=ca(e),n=new va;return na(t)>r.size?Vo(r.getIterator(),(function(e){ya(t,e)&&ga(n,e)})):Zo(t,(function(e){r.includes(e)&&ga(n,e)})),n};or({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return T(ma,this,Ho(e))}});var ba=Uo.has,wa=function(e){var t=Bo(this),r=ca(e);if(na(t)<=r.size)return!1!==Zo(t,(function(e){if(r.includes(e))return!1}),!0);var n=r.getIterator();return!1!==Vo(n,(function(e){if(ba(t,e))return An(n,"normal",!1)}))};or({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return T(wa,this,Ho(e))}});var xa=function(e){var t=Bo(this),r=ca(e);return!(na(t)>r.size)&&!1!==Zo(t,(function(e){if(!r.includes(e))return!1}),!0)};or({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return T(xa,this,Ho(e))}});var _a=Uo.has,ja=function(e){var t=Bo(this),r=ca(e);if(na(t)<r.size)return!1;var n=r.getIterator();return!1!==Vo(n,(function(e){if(!_a(t,e))return An(n,"normal",!1)}))};or({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return T(ja,this,Ho(e))}});var Sa=F([].join),Ia=F([].push);or({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=Bo(this),r=void 0===e?",":Ro(e),n=[];return Zo(t,(function(e){Ia(n,e)})),Sa(n,r)}});var ka=Uo.Set,Ra=Uo.add;or({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=Bo(this),r=_n(e,arguments.length>1?arguments[1]:void 0),n=new ka;return Zo(t,(function(e){Ra(n,r(e,e,t))})),n}});var Ea=TypeError;or({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=Bo(this),r=arguments.length<2,n=r?void 0:arguments[1];if(ge(e),Zo(t,(function(i){r?(r=!1,n=i):n=e(n,i,i,t)})),r)throw new Ea("Reduce of empty set with no initial value");return n}}),or({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=Bo(this),r=_n(e,arguments.length>1?arguments[1]:void 0);return!0===Zo(t,(function(e){if(r(e,e,t))return!0}),!0)}});var Oa=Uo.add,Ta=Uo.has,Aa=Uo.remove,Pa=function(e){var t=Bo(this),r=ca(e).getIterator(),n=ra(t);return Vo(r,(function(e){Ta(t,e)?Aa(n,e):Oa(n,e)})),n};or({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return T(Pa,this,Ho(e))}});var Na=Uo.add,La=function(e){var t=Bo(this),r=ca(e).getIterator(),n=ra(t);return Vo(r,(function(e){Na(n,e)})),n};or({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return T(La,this,Ho(e))}});var Ca={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Da=ze("span").classList,Ma=Da&&Da.constructor&&Da.constructor.prototype,Ua=Ma===Object.prototype?void 0:Ma,Fa=Ce("iterator"),Ba=to.values,qa=function(e,t){if(e){if(e[Fa]!==Ba)try{ot(e,Fa,Ba)}catch(t){e[Fa]=Ba}if(Fn(e,t,!0),Ca[t])for(var r in to)if(e[r]!==to[r])try{ot(e,r,to[r])}catch(t){e[r]=to[r]}}};for(var za in Ca)qa(I[za]&&I[za].prototype,za);qa(Ua,"DOMTokenList");var Ja=oo.f,$a=k((function(){return!Object.getOwnPropertyNames(1)}));or({target:"Object",stat:!0,forced:$a},{getOwnPropertyNames:Ja});var Ga=F([].push),Ha=function(e){var t=1===e,r=2===e,n=3===e,i=4===e,o=6===e,a=7===e,s=5===e||o;return function(u,c,l,f){for(var h,d,p=Ie(u),v=G(p),g=Mt(v),y=_n(c,l),m=0,b=f||kr,w=t?b(u,g):r||a?b(u,0):void 0;g>m;m++)if((s||m in v)&&(d=y(h=v[m],m,p),e))if(t)w[m]=d;else if(d)switch(e){case 3:return!0;case 5:return h;case 6:return m;case 2:Ga(w,h)}else switch(e){case 4:return!1;case 7:Ga(w,h)}return o?-1:n||i?i:w}},Va={forEach:Ha(0),map:Ha(1),filter:Ha(2),some:Ha(3),every:Ha(4),find:Ha(5),findIndex:Ha(6),filterReject:Ha(7)},Qa=lo.getWeakData,Wa=It.set,Ya=It.getterFor,Ka=Va.find,Xa=Va.findIndex,Za=F([].splice),es=0,ts=function(e){return e.frozen||(e.frozen=new rs)},rs=function(){this.entries=[]},ns=function(e,t){return Ka(e.entries,(function(e){return e[0]===t}))};rs.prototype={get:function(e){var t=ns(this,e);if(t)return t[1]},has:function(e){return!!ns(this,e)},set:function(e,t){var r=ns(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=Xa(this.entries,(function(t){return t[0]===e}));return~t&&Za(this.entries,t,1),!!~t}};var is,os={getConstructor:function(e,t,r,n){var i=e((function(e,i){Br(e,o),Wa(e,{type:t,id:es++,frozen:void 0}),H(i)||Cn(i,e[n],{that:e,AS_ENTRIES:r})})),o=i.prototype,a=Ya(t),s=function(e,t,r){var n=a(e),i=Qa(Ye(t),!0);return!0===i?ts(n).set(t,r):i[n.id]=r,e};return bo(o,{delete:function(e){var t=a(this);if(!X(e))return!1;var r=Qa(e);return!0===r?ts(t).delete(e):r&&Re(r,t.id)&&delete r[t.id]},has:function(e){var t=a(this);if(!X(e))return!1;var r=Qa(e);return!0===r?ts(t).has(e):r&&Re(r,t.id)}}),bo(o,r?{get:function(e){var t=a(this);if(X(e)){var r=Qa(e);return!0===r?ts(t).get(e):r?r[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),i}},as=It.enforce,ss=Object,us=Array.isArray,cs=ss.isExtensible,ls=ss.isFrozen,fs=ss.isSealed,hs=ss.freeze,ds=ss.seal,ps=!I.ActiveXObject&&"ActiveXObject"in I,vs=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},gs=mo("WeakMap",vs,os),ys=gs.prototype,ms=F(ys.set);if(gt)if(ps){is=os.getConstructor(vs,"WeakMap",!0),lo.enable();var bs=F(ys.delete),ws=F(ys.has),xs=F(ys.get);bo(ys,{delete:function(e){if(X(e)&&!cs(e)){var t=as(this);return t.frozen||(t.frozen=new is),bs(this,e)||t.frozen.delete(e)}return bs(this,e)},has:function(e){if(X(e)&&!cs(e)){var t=as(this);return t.frozen||(t.frozen=new is),ws(this,e)||t.frozen.has(e)}return ws(this,e)},get:function(e){if(X(e)&&!cs(e)){var t=as(this);return t.frozen||(t.frozen=new is),ws(this,e)?xs(this,e):t.frozen.get(e)}return xs(this,e)},set:function(e,t){if(X(e)&&!cs(e)){var r=as(this);r.frozen||(r.frozen=new is),ws(this,e)?ms(this,e,t):r.frozen.set(e,t)}else ms(this,e,t);return this}})}else co&&k((function(){var e=hs([]);return ms(new gs,e,1),!ls(e)}))&&bo(ys,{set:function(e,t){var r;return us(e)&&(ls(e)?r=hs:fs(e)&&(r=ds)),ms(this,e,t),r&&r(e),this}});var _s=WeakMap.prototype,js={WeakMap:WeakMap,set:F(_s.set),get:F(_s.get),has:F(_s.has),remove:F(_s.delete)},Ss=js.has,Is=function(e){return Ss(e),e},ks=js.remove;or({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=Is(this),r=!0,n=0,i=arguments.length;n<i;n++)e=ks(t,arguments[n]),r=r&&e;return!!r}});var Rs=js.get,Es=js.has,Os=js.set;or({target:"WeakMap",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,i=Is(this);return Es(i,e)?(r=Rs(i,e),"update"in t&&(r=t.update(r,e,i),Os(i,e,r)),r):(n=t.insert(e,i),Os(i,e,n),n)}});var Ts=Er("slice"),As=Ce("species"),Ps=Array,Ns=Math.max;or({target:"Array",proto:!0,forced:!Ts},{slice:function(e,t){var r,n,i,o=W(this),a=Mt(o),s=Lt(e,a),u=Lt(void 0===t?a:t,a);if(ar(o)&&(r=o.constructor,(jr(r)&&(r===Ps||ar(r.prototype))||X(r)&&null===(r=r[As]))&&(r=void 0),r===Ps||void 0===r))return $n(o,s,u);for(n=new(void 0===r?Ps:r)(Ns(u-s,0)),i=0;s<u;s++,i++)s in o&&cr(n,i,o[s]);return n.length=i,n}});var Ls=function(e,t,r,n){try{return n?t(Ye(r)[0],r[1]):t(r)}catch(t){An(e,"throw",t)}},Cs=Array,Ds=function(e){var t=Ie(e),r=jr(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=void 0!==i;o&&(i=_n(i,n>2?arguments[2]:void 0));var a,s,u,c,l,f,h=En(t),d=0;if(!h||this===Cs&&kn(h))for(a=Mt(t),s=r?new this(a):Cs(a);a>d;d++)f=o?i(t[d],d):t[d],cr(s,d,f);else for(s=r?new this:[],l=(c=Tn(t,h)).next;!(u=T(l,c)).done;d++)f=o?Ls(c,i,[u.value,d],!0):u.value,cr(s,d,f);return s.length=d,s},Ms=!go((function(e){Array.from(e)}));or({target:"Array",stat:!0,forced:Ms},{from:Ds});var Us=function(){var e=Ye(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Fs=I.RegExp,Bs=k((function(){var e=Fs("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),qs=Bs||k((function(){return!Fs("a","y").sticky})),zs=Bs||k((function(){var e=Fs("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),Js={BROKEN_CARET:zs,MISSED_STICKY:qs,UNSUPPORTED_Y:Bs},$s=I.RegExp,Gs=k((function(){var e=$s(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),Hs=I.RegExp,Vs=k((function(){var e=Hs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Qs=It.get,Ws=je("native-string-replace",String.prototype.replace),Ys=RegExp.prototype.exec,Ks=Ys,Xs=F("".charAt),Zs=F("".indexOf),eu=F("".replace),tu=F("".slice),ru=function(){var e=/a/,t=/b*/g;return T(Ys,e,"a"),T(Ys,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),nu=Js.BROKEN_CARET,iu=void 0!==/()??/.exec("")[1];(ru||iu||nu||Gs||Vs)&&(Ks=function(e){var t,r,n,i,o,a,s,u=this,c=Qs(u),l=Ro(e),f=c.raw;if(f)return f.lastIndex=u.lastIndex,t=T(Ks,f,l),u.lastIndex=f.lastIndex,t;var h=c.groups,d=nu&&u.sticky,p=T(Us,u),v=u.source,g=0,y=l;if(d&&(p=eu(p,"y",""),-1===Zs(p,"g")&&(p+="g"),y=tu(l,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==Xs(l,u.lastIndex-1))&&(v="(?: "+v+")",y=" "+y,g++),r=new RegExp("^(?:"+v+")",p)),iu&&(r=new RegExp("^"+v+"$(?!\\s)",p)),ru&&(n=u.lastIndex),i=T(Ys,d?r:u,y),d?i?(i.input=tu(i.input,g),i[0]=tu(i[0],g),i.index=u.lastIndex,u.lastIndex+=i[0].length):u.lastIndex=0:ru&&i&&(u.lastIndex=u.global?i.index+i[0].length:n),iu&&i&&i.length>1&&T(Ws,i[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)})),i&&h)for(i.groups=a=an(null),o=0;o<h.length;o++)a[(s=h[o])[0]]=i[s[1]];return i});var ou=Ks;or({target:"RegExp",proto:!0,forced:/./.exec!==ou},{exec:ou});var au,su,uu=(au=!1,(su=/[ac]/).exec=function(){return au=!0,/./.exec.apply(this,arguments)},!0===su.test("abc")&&au),cu=/./.test;function lu(e){if(Array.isArray(e))return e}function fu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function hu(e,t){if(e){if("string"==typeof e)return fu(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fu(e,t):void 0}}function du(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function pu(e,t){return lu(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||hu(e,t)||du()}function vu(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function gu(e){return function(e){if(Array.isArray(e))return fu(e)}(e)||vu(e)||hu(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}or({target:"RegExp",proto:!0,forced:!uu},{test:function(e){var t=Ye(this),r=Ro(e),n=t.exec;if(!K(n))return T(cu,t,r);var i=T(n,t,r);return null!==i&&(Ye(i),!0)}});var yu=x((function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),mu=x((function(e){var t=yu.default;function r(){e.exports=r=function(){return i},e.exports.__esModule=!0,e.exports.default=e.exports;var n,i={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(n){h=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),a=new P(n||[]);return s(o,"_invoke",{value:E(e,r,a)}),o}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}i.wrap=d;var v="suspendedStart",g="executing",y="completed",m={};function b(){}function w(){}function x(){}var _={};h(_,c,(function(){return this}));var j=Object.getPrototypeOf,S=j&&j(j(N([])));S&&S!==o&&a.call(S,c)&&(_=S);var I=x.prototype=b.prototype=Object.create(_);function k(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,r){function n(i,o,s,u){var c=p(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==t(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):r.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(e,t){function o(){return new r((function(r,i){n(e,t,r,i)}))}return i=i?i.then(o,o):o()}})}function E(e,t,r){var i=v;return function(o,a){if(i===g)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:n,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=O(s,r);if(u){if(u===m)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===v)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var c=p(e,t,r);if("normal"===c.type){if(i=r.done?y:"suspendedYield",c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function O(e,t){var r=t.method,i=e.iterator[r];if(i===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=n,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=p(i,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,m;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,m):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function t(){for(;++i<e.length;)if(a.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=n,t.done=!0,t};return o.next=o}}throw new TypeError(t(e)+" is not iterable")}return w.prototype=x,s(I,"constructor",{value:x,configurable:!0}),s(x,"constructor",{value:w,configurable:!0}),w.displayName=h(x,f,"GeneratorFunction"),i.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,h(e,f,"GeneratorFunction")),e.prototype=Object.create(I),e},i.awrap=function(e){return{__await:e}},k(R.prototype),h(R.prototype,l,(function(){return this})),i.AsyncIterator=R,i.async=function(e,t,r,n,o){void 0===o&&(o=Promise);var a=new R(d(e,t,r,n),o);return i.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(I),h(I,f,"Generator"),h(I,c,(function(){return this})),h(I,"toString",(function(){return"[object Generator]"})),i.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},i.values=N,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,i){return s.type="throw",s.arg=e,t.next=r,i&&(t.method="next",t.arg=n),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:N(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),m}},i}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})),bu=mu(),wu=bu;try{regeneratorRuntime=bu}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=bu:Function("r","regeneratorRuntime = r")(bu)}var xu=wu;mo("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Io);var _u=Map.prototype,ju={Map:Map,set:F(_u.set),get:F(_u.get),has:F(_u.has),remove:F(_u.delete),proto:_u},Su=ju.has,Iu=function(e){return Su(e),e},ku=ju.remove;or({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=Iu(this),r=!0,n=0,i=arguments.length;n<i;n++)e=ku(t,arguments[n]),r=r&&e;return!!r}});var Ru=ju.get,Eu=ju.has,Ou=ju.set;or({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,i=Iu(this);return Eu(i,e)?(r=Ru(i,e),"update"in t&&(r=t.update(r,e,i),Ou(i,e,r)),r):(n=t.insert(e,i),Ou(i,e,n),n)}});var Tu=ju.Map,Au=ju.proto,Pu=F(Au.forEach),Nu=F(Au.entries),Lu=Nu(new Tu).next,Cu=function(e,t,r){return r?Vo({iterator:Nu(e),next:Lu},(function(e){return t(e[1],e[0])})):Pu(e,t)};or({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=Iu(this),r=_n(e,arguments.length>1?arguments[1]:void 0);return!1!==Cu(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var Du=ju.Map,Mu=ju.set;or({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=Iu(this),r=_n(e,arguments.length>1?arguments[1]:void 0),n=new Du;return Cu(t,(function(e,i){r(e,i,t)&&Mu(n,i,e)})),n}}),or({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=Iu(this),r=_n(e,arguments.length>1?arguments[1]:void 0),n=Cu(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}}),or({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=Iu(this),r=_n(e,arguments.length>1?arguments[1]:void 0),n=Cu(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});or({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===Cu(Iu(this),(function(t){if(function(e,t){return e===t||e!=e&&t!=t}(t,e))return!0}),!0)}}),or({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=Cu(Iu(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var Uu=ju.Map,Fu=ju.set;or({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=Iu(this),r=_n(e,arguments.length>1?arguments[1]:void 0),n=new Uu;return Cu(t,(function(e,i){Fu(n,r(e,i,t),e)})),n}});var Bu=ju.Map,qu=ju.set;or({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=Iu(this),r=_n(e,arguments.length>1?arguments[1]:void 0),n=new Bu;return Cu(t,(function(e,i){qu(n,i,r(e,i,t))})),n}});var zu=ju.set;or({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=Iu(this),r=arguments.length,n=0;n<r;)Cn(arguments[n++],(function(e,r){zu(t,e,r)}),{AS_ENTRIES:!0});return t}});var Ju=TypeError;or({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=Iu(this),r=arguments.length<2,n=r?void 0:arguments[1];if(ge(e),Cu(t,(function(i,o){r?(r=!1,n=i):n=e(n,i,o,t)})),r)throw new Ju("Reduce of empty map with no initial value");return n}}),or({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=Iu(this),r=_n(e,arguments.length>1?arguments[1]:void 0);return!0===Cu(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var $u=TypeError,Gu=ju.get,Hu=ju.has,Vu=ju.set;or({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=Iu(this),n=arguments.length;ge(t);var i=Hu(r,e);if(!i&&n<3)throw new $u("Updating absent value");var o=i?Gu(r,e):ge(n>2?arguments[2]:void 0)(e,r);return Vu(r,e,t(o,e,r)),r}});var Qu=I,Wu={f:Ce},Yu=it.f,Ku=function(e){var t=Qu.Symbol||(Qu.Symbol={});Re(t,e)||Yu(t,e,{value:Wu.f(e)})};Ku("iterator");var Xu=Va.forEach,Zu=mt("hidden"),ec="Symbol",tc=It.set,rc=It.getterFor(ec),nc=Object.prototype,ic=I.Symbol,oc=ic&&ic.prototype,ac=I.RangeError,sc=I.TypeError,uc=I.QObject,cc=He.f,lc=it.f,fc=oo.f,hc=L.f,dc=F([].push),pc=je("symbols"),vc=je("op-symbols"),gc=je("wks"),yc=!uc||!uc.prototype||!uc.prototype.findChild,mc=function(e,t,r){var n=cc(nc,t);n&&delete nc[t],lc(e,t,r),n&&e!==nc&&lc(nc,t,n)},bc=R&&k((function(){return 7!==an(lc({},"a",{get:function(){return lc(this,"a",{value:7}).a}})).a}))?mc:lc,wc=function(e,t){var r=pc[e]=an(oc);return tc(r,{type:ec,tag:e,description:t}),R||(r.description=t),r},xc=function(e,t,r){e===nc&&xc(vc,t,r),Ye(e);var n=Fe(t);return Ye(r),Re(pc,n)?(r.enumerable?(Re(e,Zu)&&e[Zu][n]&&(e[Zu][n]=!1),r=an(r,{enumerable:C(0,!1)})):(Re(e,Zu)||lc(e,Zu,C(1,an(null))),e[Zu][n]=!0),bc(e,n,r)):lc(e,n,r)},_c=function(e,t){Ye(e);var r=W(t),n=Vr(r).concat(kc(r));return Xu(n,(function(t){R&&!T(jc,r,t)||xc(e,t,r[t])})),e},jc=function(e){var t=Fe(e),r=T(hc,this,t);return!(this===nc&&Re(pc,t)&&!Re(vc,t))&&(!(r||!Re(this,t)||!Re(pc,t)||Re(this,Zu)&&this[Zu][t])||r)},Sc=function(e,t){var r=W(e),n=Fe(t);if(r!==nc||!Re(pc,n)||Re(vc,n)){var i=cc(r,n);return!i||!Re(pc,n)||Re(r,Zu)&&r[Zu][n]||(i.enumerable=!0),i}},Ic=function(e){var t=fc(W(e)),r=[];return Xu(t,(function(e){Re(pc,e)||Re(bt,e)||dc(r,e)})),r},kc=function(e){var t=e===nc,r=fc(t?vc:W(e)),n=[];return Xu(r,(function(e){!Re(pc,e)||t&&!Re(nc,e)||dc(n,pc[e])})),n};ce||(ic=function(){if(te(oc,this))throw new sc("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Ro(arguments[0]):void 0,t=Ae(e),r=function(e){var n=void 0===this?I:this;n===nc&&T(r,vc,e),Re(n,Zu)&&Re(n[Zu],t)&&(n[Zu][t]=!1);var i=C(1,e);try{bc(n,t,i)}catch(e){if(!(e instanceof ac))throw e;mc(n,t,i)}};return R&&yc&&bc(nc,t,{configurable:!0,set:r}),wc(t,e)},oc=ic.prototype,Rt(oc,"toString",(function(){return rc(this).tag})),Rt(ic,"withoutSetter",(function(e){return wc(Ae(e),e)})),L.f=jc,it.f=xc,Wr.f=_c,He.f=Sc,Ht.f=oo.f=Ic,Vt.f=kc,Wu.f=function(e){return wc(Ce(e),e)},R&&(Hr(oc,"description",{configurable:!0,get:function(){return rc(this).description}}),Rt(nc,"propertyIsEnumerable",jc,{unsafe:!0}))),or({global:!0,constructor:!0,wrap:!0,forced:!ce,sham:!ce},{Symbol:ic}),Xu(Vr(gc),(function(e){Ku(e)})),or({target:ec,stat:!0,forced:!ce},{useSetter:function(){yc=!0},useSimple:function(){yc=!1}}),or({target:"Object",stat:!0,forced:!ce,sham:!R},{create:function(e,t){return void 0===t?an(e):_c(an(e),t)},defineProperty:xc,defineProperties:_c,getOwnPropertyDescriptor:Sc}),or({target:"Object",stat:!0,forced:!ce},{getOwnPropertyNames:Ic}),function(){var e=ee("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=Ce("toPrimitive");t&&!t[n]&&Rt(t,n,(function(e){return T(r,this)}),{arity:1})}(),Fn(ic,ec),bt[Zu]=!0;var Rc=ce&&!!Symbol.for&&!!Symbol.keyFor,Ec=je("string-to-symbol-registry"),Oc=je("symbol-to-string-registry");or({target:"Symbol",stat:!0,forced:!Rc},{for:function(e){var t=Ro(e);if(Re(Ec,t))return Ec[t];var r=ee("Symbol")(t);return Ec[t]=r,Oc[r]=t,r}});var Tc=je("symbol-to-string-registry");or({target:"Symbol",stat:!0,forced:!Rc},{keyFor:function(e){if(!he(e))throw new TypeError(pe(e)+" is not a symbol");if(Re(Tc,e))return Tc[e]}});var Ac=F([].push),Pc=function(e){if(K(e))return e;if(ar(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];"string"==typeof i?Ac(r,i):"number"!=typeof i&&"Number"!==z(i)&&"String"!==z(i)||Ac(r,Ro(i))}var o=r.length,a=!0;return function(e,t){if(a)return a=!1,t;if(ar(this))return t;for(var n=0;n<o;n++)if(r[n]===e)return t}}},Nc=String,Lc=ee("JSON","stringify"),Cc=F(/./.exec),Dc=F("".charAt),Mc=F("".charCodeAt),Uc=F("".replace),Fc=F(1..toString),Bc=/[\uD800-\uDFFF]/g,qc=/^[\uD800-\uDBFF]$/,zc=/^[\uDC00-\uDFFF]$/,Jc=!ce||k((function(){var e=ee("Symbol")("stringify detection");return"[null]"!==Lc([e])||"{}"!==Lc({a:e})||"{}"!==Lc(Object(e))})),$c=k((function(){return'"\\udf06\\ud834"'!==Lc("\udf06\ud834")||'"\\udead"'!==Lc("\udead")})),Gc=function(e,t){var r=$n(arguments),n=Pc(t);if(K(n)||void 0!==e&&!he(e))return r[1]=function(e,t){if(K(n)&&(t=T(n,this,Nc(e),t)),!he(t))return t},Jn(Lc,null,r)},Hc=function(e,t,r){var n=Dc(r,t-1),i=Dc(r,t+1);return Cc(qc,e)&&!Cc(zc,i)||Cc(zc,e)&&!Cc(qc,n)?"\\u"+Fc(Mc(e,0),16):e};Lc&&or({target:"JSON",stat:!0,arity:3,forced:Jc||$c},{stringify:function(e,t,r){var n=$n(arguments),i=Jn(Jc?Gc:Lc,null,n);return $c&&"string"==typeof i?Uc(i,Bc,Hc):i}});var Vc=!ce||k((function(){Vt.f(1)}));or({target:"Object",stat:!0,forced:Vc},{getOwnPropertySymbols:function(e){var t=Vt.f;return t?t(Ie(e)):[]}});var Qc=I.Symbol,Wc=Qc&&Qc.prototype;if(R&&K(Qc)&&(!("description"in Wc)||void 0!==Qc().description)){var Yc={},Kc=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Ro(arguments[0]),t=te(Wc,this)?new Qc(e):void 0===e?Qc():Qc(e);return""===e&&(Yc[t]=!0),t};Yt(Kc,Qc),Kc.prototype=Wc,Wc.constructor=Kc;var Xc="Symbol(description detection)"===String(Qc("description detection")),Zc=F(Wc.valueOf),el=F(Wc.toString),tl=/^Symbol\((.*)\)[^)]+$/,rl=F("".replace),nl=F("".slice);Hr(Wc,"description",{configurable:!0,get:function(){var e=Zc(this);if(Re(Yc,e))return"";var t=el(e),r=Xc?nl(t,7,-1):rl(t,tl,"$1");return""===r?void 0:r}}),or({global:!0,constructor:!0,forced:!0},{Symbol:Kc})}function il(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(il=function(){return!!e})()}function ol(e,t,r){if(il())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&si(i,r.prototype),i}var al=k((function(){Vr(1)}));or({target:"Object",stat:!0,forced:al},{keys:function(e){return Vr(Ie(e))}});var sl=function(e){var t=0===e,r=1===e,n=2===e,i=3===e;return function(e,o,a){Ye(e);var s=void 0!==o;!s&&t||ge(o);var u=Lr(e),c=ee("Promise"),l=u.iterator,f=u.next,h=0;return new c((function(e,u){var d=function(e){Cr(l,u,e,u)},p=function(){try{if(s)try{ur(h)}catch(e){d(e)}c.resolve(Ye(T(f,l))).then((function(f){try{if(Ye(f).done)t?(a.length=h,e(a)):e(!i&&(n||void 0));else{var v=f.value;try{if(s){var g=o(v,h),y=function(o){if(r)p();else if(n)o?p():Cr(l,e,!1,u);else if(t)try{a[h++]=o,p()}catch(e){d(e)}else o?Cr(l,e,i||v,u):p()};X(g)?c.resolve(g).then(y,d):y(g)}else a[h++]=v,p()}catch(e){d(e)}}}catch(e){u(e)}}),u)}catch(e){u(e)}};p()}))}},ul={toArray:sl(0),forEach:sl(1),every:sl(2),some:sl(3),find:sl(4)},cl=ul.some;or({target:"AsyncIterator",proto:!0,real:!0},{some:function(e){return cl(this,e)}}),or({target:"Iterator",proto:!0,real:!0},{some:function(e){Ye(this),ge(e);var t=Lr(this),r=0;return Cn(t,(function(t,n){if(e(t,r++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}});var ll=ul.forEach;or({target:"AsyncIterator",proto:!0,real:!0},{forEach:function(e){return ll(this,e)}}),or({target:"Iterator",proto:!0,real:!0},{forEach:function(e){Ye(this),ge(e);var t=Lr(this),r=0;Cn(t,(function(t){e(t,r++)}),{IS_RECORD:!0})}});var fl=function(e,t){var r=[][e];return!!r&&k((function(){r.call(null,t||function(){return 1},1)}))},hl=Va.forEach,dl=fl("forEach")?[].forEach:function(e){return hl(this,e,arguments.length>1?arguments[1]:void 0)},pl=function(e){if(e&&e.forEach!==dl)try{ot(e,"forEach",dl)}catch(t){e.forEach=dl}};for(var vl in Ca)Ca[vl]&&pl(I[vl]&&I[vl].prototype);pl(Ua);var gl=k((function(){Gr(1)}));or({target:"Object",stat:!0,forced:gl,sham:!qr},{getPrototypeOf:function(e){return Gr(Ie(e))}});var yl=L.f,ml=F(yl),bl=F([].push),wl=R&&k((function(){var e=Object.create(null);return e[2]=2,!ml(e,2)})),xl=function(e){return function(t){for(var r,n=W(t),i=Vr(n),o=wl&&null===Gr(n),a=i.length,s=0,u=[];a>s;)r=i[s++],R&&!(o?r in n:ml(n,r))||bl(u,e?[r,n[r]]:n[r]);return u}},_l={entries:xl(!0),values:xl(!1)},jl=_l.entries;or({target:"Object",stat:!0},{entries:function(e){return jl(e)}});var Sl=Va.filter,Il=Er("filter");or({target:"Array",proto:!0,forced:!Il},{filter:function(e){return Sl(this,e,arguments.length>1?arguments[1]:void 0)}});var kl,Rl,El=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Ol=Ce("asyncIterator"),Tl=I.AsyncIterator,Al=_e.AsyncIteratorPrototype;if(Al)kl=Al;else if(K(Tl))kl=Tl.prototype;else if(_e.USE_FUNCTION_CONSTRUCTOR||I.USE_FUNCTION_CONSTRUCTOR)try{Rl=Gr(Gr(Gr(Function("return async function*(){}()")()))),Gr(Rl)===Object.prototype&&(kl=Rl)}catch(e){}kl||(kl={}),K(kl[Ol])||Rt(kl,Ol,(function(){return this}));var Pl=kl,Nl=ee("Promise"),Ll=Ce("toStringTag"),Cl="AsyncIteratorHelper",Dl="WrapForValidAsyncIterator",Ml=It.set,Ul=function(e){var t=!e,r=It.getterFor(e?Dl:Cl),n=function(e){var n=El((function(){return r(e)})),i=n.error,o=n.value;return i||t&&o.done?{exit:!0,value:i?Nl.reject(o):Nl.resolve(Yi(void 0,!0))}:{exit:!1,value:o}};return bo(an(Pl),{next:function(){var e=n(this),t=e.value;if(e.exit)return t;var r=El((function(){return Ye(t.nextHandler(Nl))})),i=r.error,o=r.value;return i&&(t.done=!0),i?Nl.reject(o):Nl.resolve(o)},return:function(){var t=n(this),r=t.value;if(t.exit)return r;r.done=!0;var i,o,a=r.iterator,s=El((function(){if(r.inner)try{An(r.inner.iterator,"normal")}catch(e){return An(a,"throw",e)}return ye(a,"return")}));return i=o=s.value,s.error?Nl.reject(o):void 0===i?Nl.resolve(Yi(void 0,!0)):(o=(s=El((function(){return T(i,a)}))).value,s.error?Nl.reject(o):e?Nl.resolve(o):Nl.resolve(o).then((function(e){return Ye(e),Yi(void 0,!0)})))}})},Fl=Ul(!0),Bl=Ul(!1);ot(Bl,Ll,"Async Iterator Helper");var ql=function(e,t){var r=function(r,n){n?(n.iterator=r.iterator,n.next=r.next):n=r,n.type=t?Dl:Cl,n.nextHandler=e,n.counter=0,n.done=!1,Ml(this,n)};return r.prototype=t?Fl:Bl,r},zl=ql((function(e){var t=this,r=t.iterator,n=t.predicate;return new e((function(i,o){var a=function(e){t.done=!0,o(e)},s=function(e){Cr(r,a,e,a)},u=function(){try{e.resolve(Ye(T(t.next,r))).then((function(r){try{if(Ye(r).done)t.done=!0,i(Yi(void 0,!0));else{var o=r.value;try{var c=n(o,t.counter++),l=function(e){e?i(Yi(o,!1)):u()};X(c)?e.resolve(c).then(l,s):l(c)}catch(e){s(e)}}}catch(e){a(e)}}),a)}catch(e){a(e)}};u()}))}));or({target:"AsyncIterator",proto:!0,real:!0,forced:be},{filter:function(e){return Ye(this),ge(e),new zl(Lr(this),{predicate:e})}});var Jl=ln.IteratorPrototype,$l=Ce("toStringTag"),Gl="IteratorHelper",Hl="WrapForValidIterator",Vl=It.set,Ql=function(e){var t=It.getterFor(e?Hl:Gl);return bo(an(Jl),{next:function(){var r=t(this);if(e)return r.nextHandler();try{var n=r.done?void 0:r.nextHandler();return Yi(n,r.done)}catch(e){throw r.done=!0,e}},return:function(){var r=t(this),n=r.iterator;if(r.done=!0,e){var i=ye(n,"return");return i?T(i,n):Yi(void 0,!0)}if(r.inner)try{An(r.inner.iterator,"normal")}catch(e){return An(n,"throw",e)}return An(n,"normal"),Yi(void 0,!0)}})},Wl=Ql(!0),Yl=Ql(!1);ot(Yl,$l,"Iterator Helper");var Kl=function(e,t){var r=function(r,n){n?(n.iterator=r.iterator,n.next=r.next):n=r,n.type=t?Hl:Gl,n.nextHandler=e,n.counter=0,n.done=!1,Vl(this,n)};return r.prototype=t?Wl:Yl,r},Xl=Kl((function(){for(var e,t,r=this.iterator,n=this.predicate,i=this.next;;){if(e=Ye(T(i,r)),this.done=!!e.done)return;if(t=e.value,Ls(r,n,[t,this.counter++],!0))return t}}));or({target:"Iterator",proto:!0,real:!0,forced:be},{filter:function(e){return Ye(this),ge(e),new Xl(Lr(this),{predicate:e})}});var Zl=He.f,ef=!R||k((function(){Zl(1)}));function tf(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function rf(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){tf(o,n,i,a,s,"next",e)}function s(e){tf(o,n,i,a,s,"throw",e)}a(void 0)}))}}or({target:"Object",stat:!0,forced:ef,sham:!R},{getOwnPropertyDescriptor:function(e,t){return Zl(W(e),t)}}),or({target:"Object",stat:!0,sham:!R},{getOwnPropertyDescriptors:function(e){for(var t,r,n=W(e),i=He.f,o=Wt(n),a={},s=0;o.length>s;)void 0!==(r=i(n,t=o[s++]))&&cr(a,t,r);return a}});var nf,of,af,sf,uf="process"===z(I.process),cf=Ce("species"),lf=function(e,t){var r,n=Ye(e).constructor;return void 0===n||H(r=Ye(n)[cf])?t:Xn(r)},ff=TypeError,hf=function(e,t){if(e<t)throw new ff("Not enough arguments");return e},df=/(?:ipad|iphone|ipod).*applewebkit/i.test(re),pf=I.setImmediate,vf=I.clearImmediate,gf=I.process,yf=I.Dispatch,mf=I.Function,bf=I.MessageChannel,wf=I.String,xf=0,_f={},jf="onreadystatechange";k((function(){nf=I.location}));var Sf=function(e){if(Re(_f,e)){var t=_f[e];delete _f[e],t()}},If=function(e){return function(){Sf(e)}},kf=function(e){Sf(e.data)},Rf=function(e){I.postMessage(wf(e),nf.protocol+"//"+nf.host)};pf&&vf||(pf=function(e){hf(arguments.length,1);var t=K(e)?e:mf(e),r=$n(arguments,1);return _f[++xf]=function(){Jn(t,void 0,r)},of(xf),xf},vf=function(e){delete _f[e]},uf?of=function(e){gf.nextTick(If(e))}:yf&&yf.now?of=function(e){yf.now(If(e))}:bf&&!df?(sf=(af=new bf).port2,af.port1.onmessage=kf,of=_n(sf.postMessage,sf)):I.addEventListener&&K(I.postMessage)&&!I.importScripts&&nf&&"file:"!==nf.protocol&&!k(Rf)?(of=Rf,I.addEventListener("message",kf,!1)):of=jf in ze("script")?function(e){Yr.appendChild(ze("script")).onreadystatechange=function(){Yr.removeChild(this),Sf(e)}}:function(e){setTimeout(If(e),0)});var Ef={set:pf,clear:vf},Of=Object.getOwnPropertyDescriptor,Tf=function(e){if(!R)return I[e];var t=Of(I,e);return t&&t.value},Af=function(){this.head=null,this.tail=null};Af.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Pf,Nf,Lf,Cf,Df,Mf=Af,Uf=/ipad|iphone|ipod/i.test(re)&&"undefined"!=typeof Pebble,Ff=/web0s(?!.*chrome)/i.test(re),Bf=Ef.set,qf=I.MutationObserver||I.WebKitMutationObserver,zf=I.document,Jf=I.process,$f=I.Promise,Gf=Tf("queueMicrotask");if(!Gf){var Hf=new Mf,Vf=function(){var e,t;for(uf&&(e=Jf.domain)&&e.exit();t=Hf.get();)try{t()}catch(e){throw Hf.head&&Pf(),e}e&&e.enter()};df||uf||Ff||!qf||!zf?!Uf&&$f&&$f.resolve?((Cf=$f.resolve(void 0)).constructor=$f,Df=_n(Cf.then,Cf),Pf=function(){Df(Vf)}):uf?Pf=function(){Jf.nextTick(Vf)}:(Bf=_n(Bf,I),Pf=function(){Bf(Vf)}):(Nf=!0,Lf=zf.createTextNode(""),new qf(Vf).observe(Lf,{characterData:!0}),Pf=function(){Lf.data=Nf=!Nf}),Gf=function(e){Hf.head||Pf(),Hf.add(e)}}var Qf=Gf,Wf=I.Promise,Yf="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Kf=!Yf&&!uf&&"object"==typeof window&&"object"==typeof document;Wf&&Wf.prototype;var Xf,Zf,eh,th=Ce("species"),rh=!1,nh=K(I.PromiseRejectionEvent),ih=nr("Promise",(function(){var e=pt(Wf),t=e!==String(Wf);if(!t&&66===se)return!0;if(!se||se<51||!/native code/.test(e)){var r=new Wf((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[th]=n,!(rh=r.then((function(){}))instanceof n))return!0}return!t&&(Kf||Yf)&&!nh})),oh={CONSTRUCTOR:ih,REJECTION_EVENT:nh,SUBCLASSING:rh},ah=TypeError,sh=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new ah("Bad Promise constructor");t=e,r=n})),this.resolve=ge(t),this.reject=ge(r)},uh={f:function(e){return new sh(e)}},ch=Ef.set,lh="Promise",fh=oh.CONSTRUCTOR,hh=oh.REJECTION_EVENT,dh=oh.SUBCLASSING,ph=It.getterFor(lh),vh=It.set,gh=Wf&&Wf.prototype,yh=Wf,mh=gh,bh=I.TypeError,wh=I.document,xh=I.process,_h=uh.f,jh=_h,Sh=!!(wh&&wh.createEvent&&I.dispatchEvent),Ih="unhandledrejection",kh=function(e){var t;return!(!X(e)||!K(t=e.then))&&t},Rh=function(e,t){var r,n,i,o=t.value,a=1===t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(a||(2===t.rejection&&Ph(t),t.rejection=1),!0===s?r=o:(l&&l.enter(),r=s(o),l&&(l.exit(),i=!0)),r===e.promise?c(new bh("Promise-chain cycle")):(n=kh(r))?T(n,r,u,c):u(r)):c(o)}catch(e){l&&!i&&l.exit(),c(e)}},Eh=function(e,t){e.notified||(e.notified=!0,Qf((function(){for(var r,n=e.reactions;r=n.get();)Rh(r,e);e.notified=!1,t&&!e.rejection&&Th(e)})))},Oh=function(e,t,r){var n,i;Sh?((n=wh.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),I.dispatchEvent(n)):n={promise:t,reason:r},!hh&&(i=I["on"+e])?i(n):e===Ih&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",r)},Th=function(e){T(ch,I,(function(){var t,r=e.facade,n=e.value;if(Ah(e)&&(t=El((function(){uf?xh.emit("unhandledRejection",n,r):Oh(Ih,r,n)})),e.rejection=uf||Ah(e)?2:1,t.error))throw t.value}))},Ah=function(e){return 1!==e.rejection&&!e.parent},Ph=function(e){T(ch,I,(function(){var t=e.facade;uf?xh.emit("rejectionHandled",t):Oh("rejectionhandled",t,e.value)}))},Nh=function(e,t,r){return function(n){e(t,n,r)}},Lh=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Eh(e,!0))},Ch=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new bh("Promise can't be resolved itself");var n=kh(t);n?Qf((function(){var r={done:!1};try{T(n,t,Nh(Ch,r,e),Nh(Lh,r,e))}catch(t){Lh(r,t,e)}})):(e.value=t,e.state=1,Eh(e,!1))}catch(t){Lh({done:!1},t,e)}}};if(fh&&(mh=(yh=function(e){Br(this,mh),ge(e),T(Xf,this);var t=ph(this);try{e(Nh(Ch,t),Nh(Lh,t))}catch(e){Lh(t,e)}}).prototype,(Xf=function(e){vh(this,{type:lh,done:!1,notified:!1,parent:!1,reactions:new Mf,rejection:!1,state:0,value:void 0})}).prototype=Rt(mh,"then",(function(e,t){var r=ph(this),n=_h(lf(this,yh));return r.parent=!0,n.ok=!K(e)||e,n.fail=K(t)&&t,n.domain=uf?xh.domain:void 0,0===r.state?r.reactions.add(n):Qf((function(){Rh(n,r)})),n.promise})),Zf=function(){var e=new Xf,t=ph(e);this.promise=e,this.resolve=Nh(Ch,t),this.reject=Nh(Lh,t)},uh.f=_h=function(e){return e===yh||undefined===e?new Zf(e):jh(e)},K(Wf)&&gh!==Object.prototype)){eh=gh.then,dh||Rt(gh,"then",(function(e,t){var r=this;return new yh((function(e,t){T(eh,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete gh.constructor}catch(e){}Fi&&Fi(gh,mh)}or({global:!0,constructor:!0,wrap:!0,forced:fh},{Promise:yh}),Fn(yh,lh,!1),xo(lh);var Dh=oh.CONSTRUCTOR||!go((function(e){Wf.all(e).then(void 0,(function(){}))}));or({target:"Promise",stat:!0,forced:Dh},{all:function(e){var t=this,r=uh.f(t),n=r.resolve,i=r.reject,o=El((function(){var r=ge(t.resolve),o=[],a=0,s=1;Cn(e,(function(e){var u=a++,c=!1;s++,T(r,t,e).then((function(e){c||(c=!0,o[u]=e,--s||n(o))}),i)})),--s||n(o)}));return o.error&&i(o.value),r.promise}});var Mh=oh.CONSTRUCTOR,Uh=Wf&&Wf.prototype;if(or({target:"Promise",proto:!0,forced:Mh,real:!0},{catch:function(e){return this.then(void 0,e)}}),K(Wf)){var Fh=ee("Promise").prototype.catch;Uh.catch!==Fh&&Rt(Uh,"catch",Fh,{unsafe:!0})}or({target:"Promise",stat:!0,forced:Dh},{race:function(e){var t=this,r=uh.f(t),n=r.reject,i=El((function(){var i=ge(t.resolve);Cn(e,(function(e){T(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),or({target:"Promise",stat:!0,forced:oh.CONSTRUCTOR},{reject:function(e){var t=uh.f(this);return(0,t.reject)(e),t.promise}});var Bh=function(e,t){if(Ye(e),X(t)&&t.constructor===e)return t;var r=uh.f(e);return(0,r.resolve)(t),r.promise},qh=oh.CONSTRUCTOR;ee("Promise"),or({target:"Promise",stat:!0,forced:qh},{resolve:function(e){return Bh(this,e)}});var zh=Wf&&Wf.prototype,Jh=!!Wf&&k((function(){zh.finally.call({then:function(){}},(function(){}))}));if(or({target:"Promise",proto:!0,real:!0,forced:Jh},{finally:function(e){var t=lf(this,ee("Promise")),r=K(e);return this.then(r?function(r){return Bh(t,e()).then((function(){return r}))}:e,r?function(r){return Bh(t,e()).then((function(){throw r}))}:e)}}),K(Wf)){var $h=ee("Promise").prototype.finally;zh.finally!==$h&&Rt(zh,"finally",$h,{unsafe:!0})}var Gh=TypeError,Hh=Object.getOwnPropertyDescriptor,Vh=R&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(ar(e)&&!Hh(e,"length").writable)throw new Gh("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Qh=TypeError,Wh=function(e,t){if(!delete e[t])throw new Qh("Cannot delete property "+pe(t)+" of "+pe(e))},Yh=Er("splice"),Kh=Math.max,Xh=Math.min;or({target:"Array",proto:!0,forced:!Yh},{splice:function(e,t){var r,n,i,o,a,s,u=Ie(this),c=Mt(u),l=Lt(e,c),f=arguments.length;for(0===f?r=n=0:1===f?(r=0,n=c-l):(r=f-2,n=Xh(Kh(At(t),0),c-l)),ur(c+r-n),i=kr(u,n),o=0;o<n;o++)(a=l+o)in u&&cr(i,o,u[a]);if(i.length=n,r<n){for(o=l;o<c-n;o++)s=o+r,(a=o+n)in u?u[s]=u[a]:Wh(u,s);for(o=c;o>c-n+r;o--)Wh(u,o-1)}else if(r>n)for(o=c-n;o>l;o--)s=o+r-1,(a=o+n-1)in u?u[s]=u[a]:Wh(u,s);for(o=0;o<r;o++)u[o+l]=arguments[o+2];return Vh(u,c-n+r),i}});var Zh=Va.findIndex,ed="findIndex",td=!0;ed in[]&&Array(1).findIndex((function(){td=!1})),or({target:"Array",proto:!0,forced:td},{findIndex:function(e){return Zh(this,e,arguments.length>1?arguments[1]:void 0)}}),Ai(ed);var rd=function(e,t,r,n,i,o,a,s){for(var u,c,l=i,f=0,h=!!a&&_n(a,s);f<n;)f in r&&(u=h?h(r[f],f,t):r[f],o>0&&ar(u)?(c=Mt(u),l=rd(e,t,u,c,l,o-1)-1):(ur(l+1),e[l]=u),l++),f++;return l},nd=rd;or({target:"Array",proto:!0},{flatMap:function(e){var t,r=Ie(this),n=Mt(r);return ge(e),(t=kr(r,0)).length=nd(t,r,r,n,0,1,e,arguments.length>1?arguments[1]:void 0),t}}),Ai("flatMap");var id=ee("Promise"),od="AsyncFromSyncIterator",ad=It.set,sd=It.getterFor(od),ud=function(e,t,r){var n=e.done;id.resolve(e.value).then((function(e){t(Yi(e,n))}),r)},cd=function(e){e.type=od,ad(this,e)};cd.prototype=bo(an(Pl),{next:function(){var e=sd(this);return new id((function(t,r){var n=Ye(T(e.next,e.iterator));ud(n,t,r)}))},return:function(){var e=sd(this).iterator;return new id((function(t,r){var n=ye(e,"return");if(void 0===n)return t(Yi(void 0,!0));var i=Ye(T(n,e));ud(i,t,r)}))}});var ld=cd,fd=Ce("asyncIterator"),hd=ql((function(e){var t=this,r=t.iterator,n=t.mapper;return new e((function(i,o){var a=function(e){t.done=!0,o(e)},s=function(e){Cr(r,a,e,a)},u=function(){try{e.resolve(Ye(T(t.next,r))).then((function(r){try{if(Ye(r).done)t.done=!0,i(Yi(void 0,!0));else{var o=r.value;try{var u=n(o,t.counter++),l=function(e){try{t.inner=function(e){var t,r=Ye(e),n=!0,i=ye(r,fd);return K(i)||(i=En(r),n=!1),void 0!==i?t=T(i,r):(t=r,n=!0),Ye(t),Lr(n?t:new ld(Lr(t)))}(e),c()}catch(e){s(e)}};X(u)?e.resolve(u).then(l,s):l(u)}catch(e){s(e)}}}catch(e){a(e)}}),a)}catch(e){a(e)}},c=function(){var r=t.inner;if(r)try{e.resolve(Ye(T(r.next,r.iterator))).then((function(e){try{Ye(e).done?(t.inner=null,u()):i(Yi(e.value,!1))}catch(e){s(e)}}),s)}catch(e){s(e)}else u()};c()}))}));or({target:"AsyncIterator",proto:!0,real:!0,forced:be},{flatMap:function(e){return Ye(this),ge(e),new hd(Lr(this),{mapper:e,inner:null})}});var dd=function(e,t){t&&"string"==typeof e||Ye(e);var r=En(e);return Lr(Ye(void 0!==r?T(r,e):e))},pd=Kl((function(){for(var e,t,r=this.iterator,n=this.mapper;;){if(t=this.inner)try{if(!(e=Ye(T(t.next,t.iterator))).done)return e.value;this.inner=null}catch(e){An(r,"throw",e)}if(e=Ye(T(this.next,r)),this.done=!!e.done)return;try{this.inner=dd(n(e.value,this.counter++),!1)}catch(e){An(r,"throw",e)}}}));or({target:"Iterator",proto:!0,real:!0,forced:be},{flatMap:function(e){return Ye(this),ge(e),new pd(Lr(this),{mapper:e,inner:null})}});var vd=Va.map,gd=Er("map");or({target:"Array",proto:!0,forced:!gd},{map:function(e){return vd(this,e,arguments.length>1?arguments[1]:void 0)}});var yd=ql((function(e){var t=this,r=t.iterator,n=t.mapper;return new e((function(i,o){var a=function(e){t.done=!0,o(e)},s=function(e){Cr(r,a,e,a)};e.resolve(Ye(T(t.next,r))).then((function(r){try{if(Ye(r).done)t.done=!0,i(Yi(void 0,!0));else{var o=r.value;try{var u=n(o,t.counter++),c=function(e){i(Yi(e,!1))};X(u)?e.resolve(u).then(c,s):c(u)}catch(e){s(e)}}}catch(e){a(e)}}),a)}))}));or({target:"AsyncIterator",proto:!0,real:!0,forced:be},{map:function(e){return Ye(this),ge(e),new yd(Lr(this),{mapper:e})}});var md=Kl((function(){var e=this.iterator,t=Ye(T(this.next,e));if(!(this.done=!!t.done))return Ls(e,this.mapper,[t.value,this.counter++],!0)}));or({target:"Iterator",proto:!0,real:!0,forced:be},{map:function(e){return Ye(this),ge(e),new md(Lr(this),{mapper:e})}});var bd=F(1..valueOf),wd="\t\n\v\f\r \u2028\u2029\ufeff",xd=F("".replace),_d=RegExp("^["+wd+"]+"),jd=RegExp("(^|[^"+wd+"])["+wd+"]+$"),Sd=function(e){return function(t){var r=Ro(Q(t));return 1&e&&(r=xd(r,_d,"")),2&e&&(r=xd(r,jd,"$1")),r}},Id={start:Sd(1),end:Sd(2),trim:Sd(3)},kd=Ht.f,Rd=He.f,Ed=it.f,Od=Id.trim,Td="Number",Ad=I.Number;Qu.Number;var Pd=Ad.prototype,Nd=I.TypeError,Ld=F("".slice),Cd=F("".charCodeAt),Dd=function(e){var t=Ue(e,"number");return"bigint"==typeof t?t:Md(t)},Md=function(e){var t,r,n,i,o,a,s,u,c=Ue(e,"number");if(he(c))throw new Nd("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=Od(c),43===(t=Cd(c,0))||45===t){if(88===(r=Cd(c,2))||120===r)return NaN}else if(48===t){switch(Cd(c,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+c}for(a=(o=Ld(c,2)).length,s=0;s<a;s++)if((u=Cd(o,s))<48||u>i)return NaN;return parseInt(o,n)}return+c},Ud=nr(Td,!Ad(" 0o1")||!Ad("0b1")||Ad("+0x1")),Fd=function(e){return te(Pd,e)&&k((function(){bd(e)}))},Bd=function(e){var t=arguments.length<1?0:Ad(Dd(e));return Fd(this)?yo(Object(t),this,Bd):t};Bd.prototype=Pd,Ud&&(Pd.constructor=Bd),or({global:!0,constructor:!0,wrap:!0,forced:Ud},{Number:Bd});Ud&&function(e,t){for(var r,n=R?kd(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;n.length>i;i++)Re(t,r=n[i])&&!Re(e,r)&&Ed(e,r,Rd(t,r))}(Qu.Number,Ad),or({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991});var qd=Va.find,zd="find",Jd=!0;zd in[]&&Array(1).find((function(){Jd=!1})),or({target:"Array",proto:!0,forced:Jd},{find:function(e){return qd(this,e,arguments.length>1?arguments[1]:void 0)}}),Ai(zd);var $d=ul.find;or({target:"AsyncIterator",proto:!0,real:!0},{find:function(e){return $d(this,e)}}),or({target:"Iterator",proto:!0,real:!0},{find:function(e){Ye(this),ge(e);var t=Lr(this),r=0;return Cn(t,(function(t,n){if(e(t,r++))return n(t)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}});var Gd=Math.floor,Hd=function(e,t){var r=e.length;if(r<8)for(var n,i,o=1;o<r;){for(i=o,n=e[o];i&&t(e[i-1],n)>0;)e[i]=e[--i];i!==o++&&(e[i]=n)}else for(var a=Gd(r/2),s=Hd($n(e,0,a),t),u=Hd($n(e,a),t),c=s.length,l=u.length,f=0,h=0;f<c||h<l;)e[f+h]=f<c&&h<l?t(s[f],u[h])<=0?s[f++]:u[h++]:f<c?s[f++]:u[h++];return e},Vd=Hd,Qd=re.match(/firefox\/(\d+)/i),Wd=!!Qd&&+Qd[1],Yd=/MSIE|Trident/.test(re),Kd=re.match(/AppleWebKit\/(\d+)\./),Xd=!!Kd&&+Kd[1],Zd=[],ep=F(Zd.sort),tp=F(Zd.push),rp=k((function(){Zd.sort(void 0)})),np=k((function(){Zd.sort(null)})),ip=fl("sort"),op=!k((function(){if(se)return se<70;if(!(Wd&&Wd>3)){if(Yd)return!0;if(Xd)return Xd<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Zd.push({k:t+n,v:r})}for(Zd.sort((function(e,t){return t.v-e.v})),n=0;n<Zd.length;n++)t=Zd[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));or({target:"Array",proto:!0,forced:rp||!np||!ip||!op},{sort:function(e){void 0!==e&&ge(e);var t=Ie(this);if(op)return void 0===e?ep(t):ep(t,e);var r,n,i=[],o=Mt(t);for(n=0;n<o;n++)n in t&&tp(i,t[n]);for(Vd(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Ro(t)>Ro(r)?1:-1}}(e)),r=Mt(i),n=0;n<r;)t[n]=i[n++];for(;n<o;)Wh(t,n++);return t}});var ap=_l.values;or({target:"Object",stat:!0},{values:function(e){return ap(e)}});var sp=Ft.includes,up=k((function(){return!Array(1).includes()}));or({target:"Array",proto:!0,forced:up},{includes:function(e){return sp(this,e,arguments.length>1?arguments[1]:void 0)}}),Ai("includes");var cp=Ce("match"),lp=function(e){var t;return X(e)&&(void 0!==(t=e[cp])?!!t:"RegExp"===z(e))},fp=TypeError,hp=function(e){if(lp(e))throw new fp("The method doesn't accept regular expressions");return e},dp=Ce("match"),pp=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[dp]=!1,"/./"[e](t)}catch(e){}}return!1},vp=F("".indexOf);or({target:"String",proto:!0,forced:!pp("includes")},{includes:function(e){return!!~vp(Ro(Q(this)),Ro(hp(e)),arguments.length>1?arguments[1]:void 0)}}),or({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991});var gp=Ce("species"),yp=RegExp.prototype,mp=function(e,t,r,n){var i=Ce(e),o=!k((function(){var t={};return t[i]=function(){return 7},7!==""[e](t)})),a=o&&!k((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[gp]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!o||!a||r){var s=/./[i],u=t(i,""[e],(function(e,t,r,n,i){var a=t.exec;return a===ou||a===yp.exec?o&&!i?{done:!0,value:T(s,t,r,n)}:{done:!0,value:T(e,r,t,n)}:{done:!1}}));Rt(String.prototype,e,u[0]),Rt(yp,i,u[1])}n&&ot(yp[i],"sham",!0)},bp=Po.charAt,wp=function(e,t,r){return t+(r?bp(e,t).length:1)},xp=Math.floor,_p=F("".charAt),jp=F("".replace),Sp=F("".slice),Ip=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,kp=/\$([$&'`]|\d{1,2})/g,Rp=function(e,t,r,n,i,o){var a=r+e.length,s=n.length,u=kp;return void 0!==i&&(i=Ie(i),u=Ip),jp(o,u,(function(o,u){var c;switch(_p(u,0)){case"$":return"$";case"&":return e;case"`":return Sp(t,0,r);case"'":return Sp(t,a);case"<":c=i[Sp(u,1,-1)];break;default:var l=+u;if(0===l)return o;if(l>s){var f=xp(l/10);return 0===f?o:f<=s?void 0===n[f-1]?_p(u,1):n[f-1]+_p(u,1):o}c=n[l-1]}return void 0===c?"":c}))},Ep=TypeError,Op=function(e,t){var r=e.exec;if(K(r)){var n=T(r,e,t);return null!==n&&Ye(n),n}if("RegExp"===z(e))return T(ou,e,t);throw new Ep("RegExp#exec called on incompatible receiver")},Tp=Ce("replace"),Ap=Math.max,Pp=Math.min,Np=F([].concat),Lp=F([].push),Cp=F("".indexOf),Dp=F("".slice),Mp="$0"==="a".replace(/./,"$0"),Up=!!/./[Tp]&&""===/./[Tp]("a","$0"),Fp=!k((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));mp("replace",(function(e,t,r){var n=Up?"$":"$0";return[function(e,r){var n=Q(this),i=H(e)?void 0:ye(e,Tp);return i?T(i,e,n,r):T(t,Ro(n),e,r)},function(e,i){var o=Ye(this),a=Ro(e);if("string"==typeof i&&-1===Cp(i,n)&&-1===Cp(i,"$<")){var s=r(t,o,a,i);if(s.done)return s.value}var u=K(i);u||(i=Ro(i));var c,l=o.global;l&&(c=o.unicode,o.lastIndex=0);for(var f,h=[];null!==(f=Op(o,a))&&(Lp(h,f),l);){""===Ro(f[0])&&(o.lastIndex=wp(a,Dt(o.lastIndex),c))}for(var d,p="",v=0,g=0;g<h.length;g++){for(var y,m=Ro((f=h[g])[0]),b=Ap(Pp(At(f.index),a.length),0),w=[],x=1;x<f.length;x++)Lp(w,void 0===(d=f[x])?d:String(d));var _=f.groups;if(u){var j=Np([m],w,b,a);void 0!==_&&Lp(j,_),y=Ro(Jn(i,void 0,j))}else y=Rp(m,a,b,w,_,i);b>=v&&(p+=Dp(a,v,b)+y,v=b+m.length)}return p+Dp(a,v)}]}),!Fp||!Mp||Up);var Bp=Ce("iterator"),qp=!k((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),r.delete("a",2),r.delete("b",void 0),!t.size&&!R||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Bp]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),zp=2147483647,Jp=/[^\0-\u007E]/,$p=/[.\u3002\uFF0E\uFF61]/g,Gp="Overflow: input needs wider integers to process",Hp=RangeError,Vp=F($p.exec),Qp=Math.floor,Wp=String.fromCharCode,Yp=F("".charCodeAt),Kp=F([].join),Xp=F([].push),Zp=F("".replace),ev=F("".split),tv=F("".toLowerCase),rv=function(e){return e+22+75*(e<26)},nv=function(e,t,r){var n=0;for(e=r?Qp(e/700):e>>1,e+=Qp(e/t);e>455;)e=Qp(e/35),n+=36;return Qp(n+36*e/(e+38))},iv=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=Yp(e,r++);if(i>=55296&&i<=56319&&r<n){var o=Yp(e,r++);56320==(64512&o)?Xp(t,((1023&i)<<10)+(1023&o)+65536):(Xp(t,i),r--)}else Xp(t,i)}return t}(e);var r,n,i=e.length,o=128,a=0,s=72;for(r=0;r<e.length;r++)(n=e[r])<128&&Xp(t,Wp(n));var u=t.length,c=u;for(u&&Xp(t,"-");c<i;){var l=zp;for(r=0;r<e.length;r++)(n=e[r])>=o&&n<l&&(l=n);var f=c+1;if(l-o>Qp((zp-a)/f))throw new Hp(Gp);for(a+=(l-o)*f,o=l,r=0;r<e.length;r++){if((n=e[r])<o&&++a>zp)throw new Hp(Gp);if(n===o){for(var h=a,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(h<p)break;var v=h-p,g=36-p;Xp(t,Wp(rv(p+v%g))),h=Qp(v/g),d+=36}Xp(t,Wp(rv(h))),s=nv(a,f,c===u),a=0,c++}}a++,o++}return Kp(t,"")},ov=Ce("iterator"),av="URLSearchParams",sv="URLSearchParamsIterator",uv=It.set,cv=It.getterFor(av),lv=It.getterFor(sv),fv=Tf("fetch"),hv=Tf("Request"),dv=Tf("Headers"),pv=hv&&hv.prototype,vv=dv&&dv.prototype,gv=I.RegExp,yv=I.TypeError,mv=I.decodeURIComponent,bv=I.encodeURIComponent,wv=F("".charAt),xv=F([].join),_v=F([].push),jv=F("".replace),Sv=F([].shift),Iv=F([].splice),kv=F("".split),Rv=F("".slice),Ev=/\+/g,Ov=Array(4),Tv=function(e){return Ov[e-1]||(Ov[e-1]=gv("((?:%[\\da-f]{2}){"+e+"})","gi"))},Av=function(e){try{return mv(e)}catch(t){return e}},Pv=function(e){var t=jv(e,Ev," "),r=4;try{return mv(t)}catch(e){for(;r;)t=jv(t,Tv(r--),Av);return t}},Nv=/[!'()~]|%20/g,Lv={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Cv=function(e){return Lv[e]},Dv=function(e){return jv(bv(e),Nv,Cv)},Mv=Li((function(e,t){uv(this,{type:sv,target:cv(e).entries,index:0,kind:t})}),av,(function(){var e=lv(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,Yi(void 0,!0);var n=t[r];switch(e.kind){case"keys":return Yi(n.key,!1);case"values":return Yi(n.value,!1)}return Yi([n.key,n.value],!1)}),!0),Uv=function(e){this.entries=[],this.url=null,void 0!==e&&(X(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===wv(e,0)?Rv(e,1):e:Ro(e)))};Uv.prototype={type:av,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,o,a,s,u=this.entries,c=En(e);if(c)for(r=(t=Tn(e,c)).next;!(n=T(r,t)).done;){if(o=(i=Tn(Ye(n.value))).next,(a=T(o,i)).done||(s=T(o,i)).done||!T(o,i).done)throw new yv("Expected sequence with length 2");_v(u,{key:Ro(a.value),value:Ro(s.value)})}else for(var l in e)Re(e,l)&&_v(u,{key:l,value:Ro(e[l])})},parseQuery:function(e){if(e)for(var t,r,n=this.entries,i=kv(e,"&"),o=0;o<i.length;)(t=i[o++]).length&&(r=kv(t,"="),_v(n,{key:Pv(Sv(r)),value:Pv(xv(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],_v(r,Dv(e.key)+"="+Dv(e.value));return xv(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Fv=function(){Br(this,Bv);var e=arguments.length>0?arguments[0]:void 0,t=uv(this,new Uv(e));R||(this.size=t.entries.length)},Bv=Fv.prototype;if(bo(Bv,{append:function(e,t){var r=cv(this);hf(arguments.length,2),_v(r.entries,{key:Ro(e),value:Ro(t)}),R||this.length++,r.updateURL()},delete:function(e){for(var t=cv(this),r=hf(arguments.length,1),n=t.entries,i=Ro(e),o=r<2?void 0:arguments[1],a=void 0===o?o:Ro(o),s=0;s<n.length;){var u=n[s];if(u.key!==i||void 0!==a&&u.value!==a)s++;else if(Iv(n,s,1),void 0!==a)break}R||(this.size=n.length),t.updateURL()},get:function(e){var t=cv(this).entries;hf(arguments.length,1);for(var r=Ro(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){var t=cv(this).entries;hf(arguments.length,1);for(var r=Ro(e),n=[],i=0;i<t.length;i++)t[i].key===r&&_v(n,t[i].value);return n},has:function(e){for(var t=cv(this).entries,r=hf(arguments.length,1),n=Ro(e),i=r<2?void 0:arguments[1],o=void 0===i?i:Ro(i),a=0;a<t.length;){var s=t[a++];if(s.key===n&&(void 0===o||s.value===o))return!0}return!1},set:function(e,t){var r=cv(this);hf(arguments.length,1);for(var n,i=r.entries,o=!1,a=Ro(e),s=Ro(t),u=0;u<i.length;u++)(n=i[u]).key===a&&(o?Iv(i,u--,1):(o=!0,n.value=s));o||_v(i,{key:a,value:s}),R||(this.size=i.length),r.updateURL()},sort:function(){var e=cv(this);Vd(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=cv(this).entries,n=_n(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new Mv(this,"keys")},values:function(){return new Mv(this,"values")},entries:function(){return new Mv(this,"entries")}},{enumerable:!0}),Rt(Bv,ov,Bv.entries,{name:"entries"}),Rt(Bv,"toString",(function(){return cv(this).serialize()}),{enumerable:!0}),R&&Hr(Bv,"size",{get:function(){return cv(this).entries.length},configurable:!0,enumerable:!0}),Fn(Fv,av),or({global:!0,constructor:!0,forced:!qp},{URLSearchParams:Fv}),!qp&&K(dv)){var qv=F(vv.has),zv=F(vv.set),Jv=function(e){if(X(e)){var t,r=e.body;if(vr(r)===av)return t=e.headers?new dv(e.headers):new dv,qv(t,"content-type")||zv(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),an(e,{body:C(0,Ro(r)),headers:C(0,t)})}return e};if(K(fv)&&or({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return fv(e,arguments.length>1?Jv(arguments[1]):{})}}),K(hv)){var $v=function(e){return Br(this,pv),new hv(e,arguments.length>1?Jv(arguments[1]):{})};pv.constructor=$v,$v.prototype=pv,or({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:$v})}}var Gv,Hv={URLSearchParams:Fv,getState:cv},Vv=Po.codeAt,Qv=It.set,Wv=It.getterFor("URL"),Yv=Hv.URLSearchParams,Kv=Hv.getState,Xv=I.URL,Zv=I.TypeError,eg=I.parseInt,tg=Math.floor,rg=Math.pow,ng=F("".charAt),ig=F(/./.exec),og=F([].join),ag=F(1..toString),sg=F([].pop),ug=F([].push),cg=F("".replace),lg=F([].shift),fg=F("".split),hg=F("".slice),dg=F("".toLowerCase),pg=F([].unshift),vg="Invalid scheme",gg="Invalid host",yg="Invalid port",mg=/[a-z]/i,bg=/[\d+-.a-z]/i,wg=/\d/,xg=/^0x/i,_g=/^[0-7]+$/,jg=/^\d+$/,Sg=/^[\da-f]+$/i,Ig=/[\0\t\n\r #%/:<>?@[\\\]^|]/,kg=/[\0\t\n\r #/:<>?@[\\\]^|]/,Rg=/^[\u0000-\u0020]+/,Eg=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Og=/[\t\n\r]/g,Tg=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)pg(t,e%256),e=tg(e/256);return og(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=ag(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},Ag={},Pg=Si({},Ag,{" ":1,'"':1,"<":1,">":1,"`":1}),Ng=Si({},Pg,{"#":1,"?":1,"{":1,"}":1}),Lg=Si({},Ng,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Cg=function(e,t){var r=Vv(e,0);return r>32&&r<127&&!Re(t,e)?e:encodeURIComponent(e)},Dg={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Mg=function(e,t){var r;return 2===e.length&&ig(mg,ng(e,0))&&(":"===(r=ng(e,1))||!t&&"|"===r)},Ug=function(e){var t;return e.length>1&&Mg(hg(e,0,2))&&(2===e.length||"/"===(t=ng(e,2))||"\\"===t||"?"===t||"#"===t)},Fg=function(e){return"."===e||"%2e"===dg(e)},Bg={},qg={},zg={},Jg={},$g={},Gg={},Hg={},Vg={},Qg={},Wg={},Yg={},Kg={},Xg={},Zg={},ey={},ty={},ry={},ny={},iy={},oy={},ay={},sy=function(e,t,r){var n,i,o,a=Ro(e);if(t){if(i=this.parse(a))throw new Zv(i);this.searchParams=null}else{if(void 0!==r&&(n=new sy(r,!0)),i=this.parse(a,null,n))throw new Zv(i);(o=Kv(new Yv)).bindURL(this),this.searchParams=o}};sy.prototype={type:"URL",parse:function(e,t,r){var n,i,o,a,s,u=this,c=t||Bg,l=0,f="",h=!1,d=!1,p=!1;for(e=Ro(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=cg(e,Rg,""),e=cg(e,Eg,"$1")),e=cg(e,Og,""),n=Ds(e);l<=n.length;){switch(i=n[l],c){case Bg:if(!i||!ig(mg,i)){if(t)return vg;c=zg;continue}f+=dg(i),c=qg;break;case qg:if(i&&(ig(bg,i)||"+"===i||"-"===i||"."===i))f+=dg(i);else{if(":"!==i){if(t)return vg;f="",c=zg,l=0;continue}if(t&&(u.isSpecial()!==Re(Dg,f)||"file"===f&&(u.includesCredentials()||null!==u.port)||"file"===u.scheme&&!u.host))return;if(u.scheme=f,t)return void(u.isSpecial()&&Dg[u.scheme]===u.port&&(u.port=null));f="","file"===u.scheme?c=Zg:u.isSpecial()&&r&&r.scheme===u.scheme?c=Jg:u.isSpecial()?c=Vg:"/"===n[l+1]?(c=$g,l++):(u.cannotBeABaseURL=!0,ug(u.path,""),c=iy)}break;case zg:if(!r||r.cannotBeABaseURL&&"#"!==i)return vg;if(r.cannotBeABaseURL&&"#"===i){u.scheme=r.scheme,u.path=$n(r.path),u.query=r.query,u.fragment="",u.cannotBeABaseURL=!0,c=ay;break}c="file"===r.scheme?Zg:Gg;continue;case Jg:if("/"!==i||"/"!==n[l+1]){c=Gg;continue}c=Qg,l++;break;case $g:if("/"===i){c=Wg;break}c=ny;continue;case Gg:if(u.scheme=r.scheme,i===Gv)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=$n(r.path),u.query=r.query;else if("/"===i||"\\"===i&&u.isSpecial())c=Hg;else if("?"===i)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=$n(r.path),u.query="",c=oy;else{if("#"!==i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=$n(r.path),u.path.length--,c=ny;continue}u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=$n(r.path),u.query=r.query,u.fragment="",c=ay}break;case Hg:if(!u.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,c=ny;continue}c=Wg}else c=Qg;break;case Vg:if(c=Qg,"/"!==i||"/"!==ng(f,l+1))continue;l++;break;case Qg:if("/"!==i&&"\\"!==i){c=Wg;continue}break;case Wg:if("@"===i){h&&(f="%40"+f),h=!0,o=Ds(f);for(var v=0;v<o.length;v++){var g=o[v];if(":"!==g||p){var y=Cg(g,Lg);p?u.password+=y:u.username+=y}else p=!0}f=""}else if(i===Gv||"/"===i||"?"===i||"#"===i||"\\"===i&&u.isSpecial()){if(h&&""===f)return"Invalid authority";l-=Ds(f).length+1,f="",c=Yg}else f+=i;break;case Yg:case Kg:if(t&&"file"===u.scheme){c=ty;continue}if(":"!==i||d){if(i===Gv||"/"===i||"?"===i||"#"===i||"\\"===i&&u.isSpecial()){if(u.isSpecial()&&""===f)return gg;if(t&&""===f&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(f))return a;if(f="",c=ry,t)return;continue}"["===i?d=!0:"]"===i&&(d=!1),f+=i}else{if(""===f)return gg;if(a=u.parseHost(f))return a;if(f="",c=Xg,t===Kg)return}break;case Xg:if(!ig(wg,i)){if(i===Gv||"/"===i||"?"===i||"#"===i||"\\"===i&&u.isSpecial()||t){if(""!==f){var m=eg(f,10);if(m>65535)return yg;u.port=u.isSpecial()&&m===Dg[u.scheme]?null:m,f=""}if(t)return;c=ry;continue}return yg}f+=i;break;case Zg:if(u.scheme="file","/"===i||"\\"===i)c=ey;else{if(!r||"file"!==r.scheme){c=ny;continue}switch(i){case Gv:u.host=r.host,u.path=$n(r.path),u.query=r.query;break;case"?":u.host=r.host,u.path=$n(r.path),u.query="",c=oy;break;case"#":u.host=r.host,u.path=$n(r.path),u.query=r.query,u.fragment="",c=ay;break;default:Ug(og($n(n,l),""))||(u.host=r.host,u.path=$n(r.path),u.shortenPath()),c=ny;continue}}break;case ey:if("/"===i||"\\"===i){c=ty;break}r&&"file"===r.scheme&&!Ug(og($n(n,l),""))&&(Mg(r.path[0],!0)?ug(u.path,r.path[0]):u.host=r.host),c=ny;continue;case ty:if(i===Gv||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&Mg(f))c=ny;else if(""===f){if(u.host="",t)return;c=ry}else{if(a=u.parseHost(f))return a;if("localhost"===u.host&&(u.host=""),t)return;f="",c=ry}continue}f+=i;break;case ry:if(u.isSpecial()){if(c=ny,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==Gv&&(c=ny,"/"!==i))continue}else u.fragment="",c=ay;else u.query="",c=oy;break;case ny:if(i===Gv||"/"===i||"\\"===i&&u.isSpecial()||!t&&("?"===i||"#"===i)){if(".."===(s=dg(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"===i||"\\"===i&&u.isSpecial()||ug(u.path,"")):Fg(f)?"/"===i||"\\"===i&&u.isSpecial()||ug(u.path,""):("file"===u.scheme&&!u.path.length&&Mg(f)&&(u.host&&(u.host=""),f=ng(f,0)+":"),ug(u.path,f)),f="","file"===u.scheme&&(i===Gv||"?"===i||"#"===i))for(;u.path.length>1&&""===u.path[0];)lg(u.path);"?"===i?(u.query="",c=oy):"#"===i&&(u.fragment="",c=ay)}else f+=Cg(i,Ng);break;case iy:"?"===i?(u.query="",c=oy):"#"===i?(u.fragment="",c=ay):i!==Gv&&(u.path[0]+=Cg(i,Ag));break;case oy:t||"#"!==i?i!==Gv&&("'"===i&&u.isSpecial()?u.query+="%27":u.query+="#"===i?"%23":Cg(i,Ag)):(u.fragment="",c=ay);break;case ay:i!==Gv&&(u.fragment+=Cg(i,Pg))}l++}},parseHost:function(e){var t,r,n;if("["===ng(e,0)){if("]"!==ng(e,e.length-1))return gg;if(t=function(e){var t,r,n,i,o,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,f=0,h=function(){return ng(e,f)};if(":"===h()){if(":"!==ng(e,1))return;f+=2,l=++c}for(;h();){if(8===c)return;if(":"!==h()){for(t=r=0;r<4&&ig(Sg,h());)t=16*t+eg(h(),16),f++,r++;if("."===h()){if(0===r)return;if(f-=r,c>6)return;for(n=0;h();){if(i=null,n>0){if(!("."===h()&&n<4))return;f++}if(!ig(wg,h()))return;for(;ig(wg,h());){if(o=eg(h(),10),null===i)i=o;else{if(0===i)return;i=10*i+o}if(i>255)return;f++}u[c]=256*u[c]+i,2!=++n&&4!==n||c++}if(4!==n)return;break}if(":"===h()){if(f++,!h())return}else if(h())return;u[c++]=t}else{if(null!==l)return;f++,l=++c}}if(null!==l)for(a=c-l,c=7;0!==c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!==c)return;return u}(hg(e,1,-1)),!t)return gg;this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=ev(Zp(tv(e),$p,"."),".");for(t=0;t<i.length;t++)r=i[t],Xp(n,Vp(Jp,r)?"xn--"+iv(r):r);return Kp(n,".")}(e),ig(Ig,e))return gg;if(t=function(e){var t,r,n,i,o,a,s,u=fg(e,".");if(u.length&&""===u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(r=[],n=0;n<t;n++){if(""===(i=u[n]))return e;if(o=10,i.length>1&&"0"===ng(i,0)&&(o=ig(xg,i)?16:8,i=hg(i,8===o?1:2)),""===i)a=0;else{if(!ig(10===o?jg:8===o?_g:Sg,i))return e;a=eg(i,o)}ug(r,a)}for(n=0;n<t;n++)if(a=r[n],n===t-1){if(a>=rg(256,5-t))return null}else if(a>255)return null;for(s=sg(r),n=0;n<r.length;n++)s+=r[n]*rg(256,3-n);return s}(e),null===t)return gg;this.host=t}else{if(ig(kg,e))return gg;for(t="",r=Ds(e),n=0;n<r.length;n++)t+=Cg(r[n],Ag);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return Re(Dg,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&Mg(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=Tg(i),null!==o&&(c+=":"+o)):"file"===t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+og(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw new Zv(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new uy(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+Tg(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Ro(e)+":",Bg)},getUsername:function(){return this.username},setUsername:function(e){var t=Ds(Ro(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Cg(t[r],Lg)}},getPassword:function(){return this.password},setPassword:function(e){var t=Ds(Ro(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Cg(t[r],Lg)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Tg(e):Tg(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Yg)},getHostname:function(){var e=this.host;return null===e?"":Tg(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Kg)},getPort:function(){var e=this.port;return null===e?"":Ro(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=Ro(e))?this.port=null:this.parse(e,Xg))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+og(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,ry))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=Ro(e))?this.query=null:("?"===ng(e,0)&&(e=hg(e,1)),this.query="",this.parse(e,oy)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=Ro(e))?("#"===ng(e,0)&&(e=hg(e,1)),this.fragment="",this.parse(e,ay)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var uy=function(e){var t=Br(this,cy),r=hf(arguments.length,1)>1?arguments[1]:void 0,n=Qv(t,new sy(e,!1,r));R||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},cy=uy.prototype,ly=function(e,t){return{get:function(){return Wv(this)[e]()},set:t&&function(e){return Wv(this)[t](e)},configurable:!0,enumerable:!0}};if(R&&(Hr(cy,"href",ly("serialize","setHref")),Hr(cy,"origin",ly("getOrigin")),Hr(cy,"protocol",ly("getProtocol","setProtocol")),Hr(cy,"username",ly("getUsername","setUsername")),Hr(cy,"password",ly("getPassword","setPassword")),Hr(cy,"host",ly("getHost","setHost")),Hr(cy,"hostname",ly("getHostname","setHostname")),Hr(cy,"port",ly("getPort","setPort")),Hr(cy,"pathname",ly("getPathname","setPathname")),Hr(cy,"search",ly("getSearch","setSearch")),Hr(cy,"searchParams",ly("getSearchParams")),Hr(cy,"hash",ly("getHash","setHash"))),Rt(cy,"toJSON",(function(){return Wv(this).serialize()}),{enumerable:!0}),Rt(cy,"toString",(function(){return Wv(this).serialize()}),{enumerable:!0}),Xv){var fy=Xv.createObjectURL,hy=Xv.revokeObjectURL;fy&&Rt(uy,"createObjectURL",_n(fy,Xv)),hy&&Rt(uy,"revokeObjectURL",_n(hy,Xv))}Fn(uy,"URL"),or({global:!0,constructor:!0,forced:!qp,sham:!R},{URL:uy});var dy=Js.UNSUPPORTED_Y,py=Math.min,vy=F([].push),gy=F("".slice),yy=!k((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),my="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;mp("split",(function(e,t,r){var n="0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:T(t,this,e,r)}:t;return[function(t,r){var i=Q(this),o=H(t)?void 0:ye(t,e);return o?T(o,t,i,r):T(n,Ro(i),t,r)},function(e,i){var o=Ye(this),a=Ro(e);if(!my){var s=r(n,o,a,i,n!==t);if(s.done)return s.value}var u=lf(o,RegExp),c=o.unicode,l=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(dy?"g":"y"),f=new u(dy?"^(?:"+o.source+")":o,l),h=void 0===i?4294967295:i>>>0;if(0===h)return[];if(0===a.length)return null===Op(f,a)?[a]:[];for(var d=0,p=0,v=[];p<a.length;){f.lastIndex=dy?0:p;var g,y=Op(f,dy?gy(a,p):a);if(null===y||(g=py(Dt(f.lastIndex+(dy?p:0)),a.length))===d)p=wp(a,p,c);else{if(vy(v,gy(a,d,p)),v.length===h)return v;for(var m=1;m<=y.length-1;m++)if(vy(v,y[m]),v.length===h)return v;p=d=g}}return vy(v,gy(a,d)),v}]}),my||!yy,dy);var by=ct.PROPER,wy=function(e){return k((function(){return!!wd[e]()||"
"!=="
"[e]()||by&&wd[e].name!==e}))},xy=Id.end,_y=wy("trimEnd")?function(){return xy(this)}:"".trimEnd;or({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==_y},{trimRight:_y}),or({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==_y},{trimEnd:_y});var jy=Id.trim;or({target:"String",proto:!0,forced:wy("trim")},{trim:function(){return jy(this)}});var Sy=RangeError;or({target:"String",proto:!0},{repeat:function(e){var t=Ro(Q(this)),r="",n=At(e);if(n<0||n===1/0)throw new Sy("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r}});var Iy=F([].join),ky=G!==Object||!fl("join",",");or({target:"Array",proto:!0,forced:ky},{join:function(e){return Iy(W(this),void 0===e?",":e)}});var Ry=RegExp.prototype,Ey=function(e){var t=e.flags;return void 0!==t||"flags"in Ry||Re(e,"flags")||!te(Ry,e)?t:T(Us,e)},Oy=ct.PROPER,Ty="toString",Ay=RegExp.prototype,Py=Ay.toString,Ny=k((function(){return"/a/b"!==Py.call({source:"a",flags:"b"})})),Ly=Oy&&Py.name!==Ty;(Ny||Ly)&&Rt(Ay,Ty,(function(){var e=Ye(this);return"/"+Ro(e.source)+"/"+Ro(Ey(e))}),{unsafe:!0}),mp("match",(function(e,t,r){return[function(t){var r=Q(this),n=H(t)?void 0:ye(t,e);return n?T(n,t,r):new RegExp(t)[e](Ro(r))},function(e){var n=Ye(this),i=Ro(e),o=r(t,n,i);if(o.done)return o.value;if(!n.global)return Op(n,i);var a=n.unicode;n.lastIndex=0;for(var s,u=[],c=0;null!==(s=Op(n,i));){var l=Ro(s[0]);u[c]=l,""===l&&(n.lastIndex=wp(i,Dt(n.lastIndex),a)),c++}return 0===c?null:u}]}));var Cy=Ce("matchAll"),Dy="RegExp String",My="RegExp String Iterator",Uy=It.set,Fy=It.getterFor(My),By=RegExp.prototype,qy=TypeError,zy=wn("".indexOf),Jy=wn("".matchAll),$y=!!Jy&&!k((function(){Jy("a",/./)})),Gy=Li((function(e,t,r,n){Uy(this,{type:My,regexp:e,string:t,global:r,unicode:n,done:!1})}),Dy,(function(){var e=Fy(this);if(e.done)return Yi(void 0,!0);var t=e.regexp,r=e.string,n=Op(t,r);return null===n?(e.done=!0,Yi(void 0,!0)):e.global?(""===Ro(n[0])&&(t.lastIndex=wp(r,Dt(t.lastIndex),e.unicode)),Yi(n,!1)):(e.done=!0,Yi(n,!1))})),Hy=function(e){var t,r,n,i=Ye(this),o=Ro(e),a=lf(i,RegExp),s=Ro(Ey(i));return t=new a(a===RegExp?i.source:i,s),r=!!~zy(s,"g"),n=!!~zy(s,"u"),t.lastIndex=Dt(i.lastIndex),new Gy(t,o,r,n)};or({target:"String",proto:!0,forced:$y},{matchAll:function(e){var t,r,n,i=Q(this);if(H(e)){if($y)return Jy(i,e)}else{if(lp(e)&&(t=Ro(Q(Ey(e))),!~zy(t,"g")))throw new qy("`.matchAll` does not allow non-global regexes");if($y)return Jy(i,e);if(n=ye(e,Cy))return T(n,e,i)}return r=Ro(i),new RegExp(e,"g")[Cy](r)}}),Cy in By||Rt(By,Cy,Hy);var Vy=it.f,Qy=function(e,t,r){r in e||Vy(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},Wy=Ht.f,Yy=It.enforce,Ky=Ce("match"),Xy=I.RegExp,Zy=Xy.prototype,em=I.SyntaxError,tm=F(Zy.exec),rm=F("".charAt),nm=F("".replace),im=F("".indexOf),om=F("".slice),am=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,sm=/a/g,um=/a/g,cm=new Xy(sm)!==sm,lm=Js.MISSED_STICKY,fm=Js.UNSUPPORTED_Y,hm=R&&(!cm||lm||Gs||Vs||k((function(){return um[Ky]=!1,Xy(sm)!==sm||Xy(um)===um||"/a/i"!==String(Xy(sm,"i"))})));if(nr("RegExp",hm)){for(var dm=function(e,t){var r,n,i,o,a,s,u=te(Zy,this),c=lp(e),l=void 0===t,f=[],h=e;if(!u&&c&&l&&e.constructor===dm)return e;if((c||te(Zy,e))&&(e=e.source,l&&(t=Ey(h))),e=void 0===e?"":Ro(e),t=void 0===t?"":Ro(t),h=e,Gs&&"dotAll"in sm&&(n=!!t&&im(t,"s")>-1)&&(t=nm(t,/s/g,"")),r=t,lm&&"sticky"in sm&&(i=!!t&&im(t,"y")>-1)&&fm&&(t=nm(t,/y/g,"")),Vs&&(o=function(e){for(var t,r=e.length,n=0,i="",o=[],a=an(null),s=!1,u=!1,c=0,l="";n<=r;n++){if("\\"===(t=rm(e,n)))t+=rm(e,++n);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:tm(am,om(e,n+1))&&(n+=2,u=!0),i+=t,c++;continue;case">"===t&&u:if(""===l||Re(a,l))throw new em("Invalid capture group name");a[l]=!0,o[o.length]=[l,c],u=!1,l="";continue}u?l+=t:i+=t}return[i,o]}(e),e=o[0],f=o[1]),a=yo(Xy(e,t),u?this:Zy,dm),(n||i||f.length)&&(s=Yy(a),n&&(s.dotAll=!0,s.raw=dm(function(e){for(var t,r=e.length,n=0,i="",o=!1;n<=r;n++)"\\"!==(t=rm(e,n))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+rm(e,++n);return i}(e),r)),i&&(s.sticky=!0),f.length&&(s.groups=f)),e!==h)try{ot(a,"source",""===h?"(?:)":h)}catch(e){}return a},pm=Wy(Xy),vm=0;pm.length>vm;)Qy(dm,Xy,pm[vm++]);Zy.constructor=dm,dm.prototype=Zy,Rt(I,"RegExp",dm,{constructor:!0})}xo("RegExp");var gm=Js.MISSED_STICKY,ym=It.get,mm=RegExp.prototype,bm=TypeError;R&&gm&&Hr(mm,"sticky",{configurable:!0,get:function(){if(this!==mm){if("RegExp"===z(this))return!!ym(this).sticky;throw new bm("Incompatible receiver, RegExp required")}}});var wm,xm=He.f,_m=wn("".slice),jm=Math.min,Sm=pp("startsWith"),Im=!(Sm||(wm=xm(String.prototype,"startsWith"),!wm||wm.writable));or({target:"String",proto:!0,forced:!Im&&!Sm},{startsWith:function(e){var t=Ro(Q(this));hp(e);var r=Dt(jm(arguments.length>1?arguments[1]:void 0,t.length)),n=Ro(e);return _m(t,r,r+n.length)===n}});var km=He.f,Rm=wn("".slice),Em=Math.min,Om=pp("endsWith"),Tm=!Om&&!!function(){var e=km(String.prototype,"endsWith");return e&&!e.writable}();or({target:"String",proto:!0,forced:!Tm&&!Om},{endsWith:function(e){var t=Ro(Q(this));hp(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,i=void 0===r?n:Em(Dt(r),n),o=Ro(e);return Rm(t,i-o.length,i)===o}});var Am=("undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:window).Error,Pm=function(e){ui(JSError,Am);var t,r,n=(t=JSError,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=fi(t);if(r){var i=fi(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return li(this,e)});function JSError(e,t){var r;return oi(this,JSError),(r=n.call.apply(n,[this].concat([e,t]))).name="JSError"===(this instanceof JSError?this.constructor:void 0).name?"Error":(this instanceof JSError?this.constructor:void 0).name,Object.setPrototypeOf(ai(r),(this instanceof JSError?this.constructor:void 0).prototype),r}return JSError}(),Nm=function(){function e(){if(oi(this,e),!this.static().isConjuring())return this.static().isMagicReady()||this.static().prepareMagic(),this._proxy=this.createProxy(),this.initialize.apply(this,arguments),this._proxy.instance}return bi(e,[{key:"reserveProperty",value:function(e){Object.assign(this,wi({},e,null))}},{key:"initialize",value:function(){}},{key:"static",value:function(){return this.constructor}},{key:"__get",value:function(e){return Reflect.get(this._proxy.target,e)}},{key:"__set",value:function(e,t){Reflect.set(this._proxy.target,e,t)}},{key:"__delete",value:function(e){Reflect.deleteProperty(this._proxy.target,e)}},{key:"createProxy",value:function(){var e=this.static();return{target:this,instance:new Proxy(this,{get:function(t,r,n){return"string"!=typeof r||r in t||e.isReservedProperty(r)?Reflect.get(t,r,n):t.__get(r)},set:function(t,r,n,i){return"string"!=typeof r||r in t||e.isReservedProperty(r)?Reflect.set(t,r,n,i):(t.__set(r,n),!0)},deleteProperty:function(t,r){return"string"!=typeof r||r in t||e.isReservedProperty(r)?Reflect.deleteProperty(t,r):(t.__delete(r),!0)}})}}}],[{key:"isConjuring",value:function(){return this.__conjuring}},{key:"isMagicReady",value:function(){return this.__reservedProperties.has(this)}},{key:"prepareMagic",value:function(){this.__conjuring=!0,this.__reservedProperties.set(this,new Set(Object.getOwnPropertyNames(new this))),this.__conjuring=!1}},{key:"isReservedProperty",value:function(e){var t;return!(null===(t=this.__reservedProperties.get(this))||void 0===t||!t.has(e))}}]),e}();function Lm(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Something went wrong",t="string"==typeof e?Error:e,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];throw ol(t,gu("string"==typeof e?[e]:n))}function Cm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Dm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Dm(Object(r),!0).forEach((function(t){wi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dm(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}wi(Nm,"__conjuring",void 0),wi(Nm,"__reservedProperties",new WeakMap);var Um,Fm=Array.isArray.bind(Array);function Bm(e){return"function"==typeof(null==e?void 0:e[Symbol.iterator])}function qm(e){return"object"===ci(e)&&null!==e}function zm(e){return"string"==typeof e||e instanceof String}function Jm(e){for(var t in e=Mm({},e))$m(e,t)&&(e[t]=Jm(e[t]));return e}function $m(e,t){var r;return function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,t)&&qm(r=e[t])&&r.constructor===Object}function Gm(e,t){if("function"==typeof t){for(var r=t,n={},i=0,o=Object.entries(e);i<o.length;i++){var a=pu(o[i],2),s=a[0],u=a[1];r(u)||(n[s]=u)}return n}var c,l=Mm({},e),f=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Cm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Cm(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(Array.isArray(t)?t:[t]);try{for(f.s();!(c=f.n()).done;)delete l[c.value]}catch(e){f.e(e)}finally{f.f()}return l}function Hm(e){return Gm(e,(function(e){return null==e}))}function Vm(e){return String(e)}function Qm(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Wm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wm(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Wm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.entries.bind(Object),Um=Symbol.iterator,function(e){function t(e){oi(this,t),wi(this,"keysToItems",void 0),wi(this,"itemsToKeys",void 0),wi(this,"getKey",void 0),this.keysToItems=new Map,this.itemsToKeys=new WeakMap,this.getKey=null!=e?e:function(e){return Vm(e)}}bi(t,[{key:Um,value:xu.mark((function e(){return xu.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.keysToItems,"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"size",get:function(){return this.keysToItems.size}},{key:"items",value:function(){return this.keysToItems.values()}},{key:"keys",value:function(){return this.keysToItems.keys()}},{key:"entries",value:function(){return this.keysToItems.entries()}},{key:"add",value:function(e){var t=this.getKey(e);this.keysToItems.set(t,e),this.itemsToKeys.set(e,t)}},{key:"require",value:function(e){var t;return null!==(t=this.keysToItems.get(e))&&void 0!==t?t:Lm("Couldn't find item with '".concat(e,"' key"))}},{key:"get",value:function(e){return this.keysToItems.get(e)}},{key:"getKeys",value:function(){return gu(this.keysToItems.keys())}},{key:"getItems",value:function(){return gu(this.keysToItems.values())}},{key:"hasKey",value:function(e){return this.keysToItems.has(e)}},{key:"hasItem",value:function(e){return this.itemsToKeys.has(e)}},{key:"delete",value:function(e){var t=this.itemsToKeys.get(e);t&&(this.itemsToKeys.delete(e),this.keysToItems.delete(t))}},{key:"filter",value:function(e){var t,r=this.constructor.createFromArray([],this.getKey),n=Qm(this.entries());try{for(n.s();!(t=n.n()).done;){var i=pu(t.value,2),o=i[0],a=i[1];e(a,o)&&r.add(a)}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"clear",value:function(){this.itemsToKeys=new WeakMap,this.keysToItems.clear()}},{key:"clone",value:function(){var e=new this.constructor(this.getKey);e.keysToItems=new Map(this.keysToItems),e.itemsToKeys=new WeakMap;var t,r=Qm(e.keysToItems.entries());try{for(r.s();!(t=r.n()).done;){var n=pu(t.value,2),i=n[0],o=n[1];e.itemsToKeys.set(o,i)}}catch(e){r.e(e)}finally{r.f()}return e}}],[{key:"createFromArray",value:function(e,r){var n,i="string"==typeof r?function(e){return e[r]}:r,o=new t(i),a=Qm(e);try{for(a.s();!(n=a.n()).done;){var s=n.value;o.add(s)}}catch(e){a.e(e)}finally{a.f()}return o}}])}(),function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;oi(this,e),wi(this,"count",void 0),wi(this,"listeners",void 0),this.count=t,this.listeners=new Set}var t,r;bi(e,[{key:"acquire",value:function(){var e=this;return 0===this.count?this.waitAvailable().then((function(){return e.acquire()})):(this.count=Math.max(this.count-1,0),Promise.resolve())}},{key:"release",value:function(){this.count++,this.notifyAvailable()}},{key:"isAvailable",value:function(){return 0!==this.count}},{key:"run",value:(r=rf(xu.mark((function e(t){var r;return xu.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.acquire();case 2:return e.prev=2,e.next=5,t();case 5:return r=e.sent,e.abrupt("return",r);case 7:return e.prev=7,this.release(),e.finish(7);case 10:case"end":return e.stop()}}),e,this,[[2,,7,10]])}))),function(e){return r.apply(this,arguments)})},{key:"waitAvailable",value:(t=rf(xu.mark((function e(){var t=this;return xu.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isAvailable()){e.next=5;break}return e.next=3,new Promise((function(e){t.listeners.add((function r(){t.listeners.delete(r),e(null)}))}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"notifyAvailable",value:function(){this.listeners.forEach((function(e){return e()}))}}])}();var Ym={},Km=function(){function e(){oi(this,e)}return bi(e,[{key:"set",value:function(e,t){void 0===t&&(t="__undefined__"),localStorage.setItem(e,JSON.stringify(t))}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=localStorage.getItem(e);return null===r?t:"__undefined__"!==r?JSON.parse(r):void 0}},{key:"require",value:function(e){var t=this.get(e,Ym);if(t===Ym)throw new Error("Failed getting required key from local storage: '".concat(e,"'"));return t}},{key:"has",value:function(e){return null!==localStorage.getItem(e)}},{key:"remove",value:function(e){localStorage.removeItem(e)}},{key:"pull",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!this.has(e))return t;var r=this.get(e);return this.remove(e),r}}],[{key:"instance",get:function(){var t;return this._instance=null!==(t=this._instance)&&void 0!==t?t:new e}}]),e}();function Xm(e,t){var r=function(e,t){return null==e&&null==t?[null===e?1:0,null===t?1:0]:[null!=e?e:null,null!=t?t:null]}(e,t),n=pu(r,2),i=n[0],o=n[1];return i>o?1:o>i?-1:0}function Zm(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return eb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?eb(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function eb(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function tb(e,t){return t?e.filter(t):e.filter((function(e){return!!e}))}function rb(e,t){var r=e.indexOf(t);return-1!==r&&(e.splice(r,1),!0)}function nb(e,t,r){var n=e.indexOf(t);return-1!==n&&(e[n]=r,!0)}function ib(e,t){return t?Object.values(e.reduce((function(e,r){var n,i=t(r);return e[i]=null!==(n=e[i])&&void 0!==n?n:r,e}),{})):gu(new Set(e))}function ob(e,t){return e.map((function(e,t){return[e,t]})).filter((function(e){var r=pu(e,2);r[0];var n=r[1];return!t.includes(n)})).map((function(e){return pu(e,1)[0]}))}function ab(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=Array.isArray(e)||Bm(e)&&!zm(e)?Array.from(e):t&&null==e?[]:[e];return r}function sb(e){if(!e)return null;try{var t=new Date(e),r=t.getTime();return isNaN(r)||0===r?null:t}catch(e){return null}}function ub(e){var t=e;return(t^16*Math.random()>>t/4).toString(16)}function cb(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,ub)}function lb(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"function"!=typeof e?e.catch((function(){return t})):rf(xu.mark((function r(){var n=arguments;return xu.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,e.apply(void 0,n);case 3:return r.abrupt("return",r.sent);case 6:return r.prev=6,r.t0=r.catch(0),r.abrupt("return",null!=t?t:null);case 9:case"end":return r.stop()}}),r,null,[[0,6]])})))}function fb(e,t){return e.matchAll(t)}function hb(e){return e.split(/_|-|\s|(?=[A-Z])/)}function db(e){var t;return null!==(t=gb(e))&&void 0!==t?t:Lm("Failed getting parent directory from '".concat(e,"'"))}function pb(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n=t.shift();t.length>0;){var i=t.shift();i.startsWith("/")?n=vb(n)+i:i.match(/^[\w-]+:\/\//)?n=i:n.endsWith("/")?n+=i:n+="/"+i}return n}function vb(e){var t=e.indexOf("://")+3,r=e.substr(t).indexOf("/");return-1!==r?e.substring(0,t+r):e}function gb(e){if(e.endsWith("/")&&(e=e.substring(0,e.length-1)),vb(e)===e)return null;var t=e.lastIndexOf("/");return-1!==t?e.substr(0,t+1):null}function yb(e){var t=e.trim().match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/);if(!t)return null;var r=t[4]||"",n=pu(-1===r.indexOf(":")?[r]:r.split(":"),2),i=n[0],o=n[1];return{protocol:t[2]||void 0,domain:i||void 0,port:o||void 0,path:t[5]||void 0,query:t[7]||void 0,fragment:t[9]||void 0}}function mb(e){return function(e,t){var r,n,i=yb(e);if(!i)return e;for(var o=0,a=Object.entries(i);o<a.length;o++){var s=pu(a[o],2),u=s[0],c=s[1];i[u]=!1!==t[u]&&c||""}return[i.protocol?"".concat(i.protocol,"://"):"",null!==(r=i.domain)&&void 0!==r?r:"",i.port?":".concat(i.port):"",null!==(n=i.path)&&void 0!==n?n:"",i.query?"?".concat(i.query):"",i.fragment?"#".concat(i.fragment):""].join("")}(e,{protocol:!0,domain:!0,port:!0,path:!0,query:!1,fragment:!1})}function bb(e,t){for(var r=e.prototype,n=function(){var e=pu(o[i],2),t=e[0],n=e[1];r[t]=function(){for(var e,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var o=n.apply(void 0,[this.value].concat(r));return null===(e=this.chain)||void 0===e?void 0:e.call(this,o)}},i=0,o=Object.entries(t);i<o.length;i++)n()}function wb(e,t){for(var r=e.prototype,n=Object.getOwnPropertyDescriptors(t.prototype),i=function(){var e=pu(a[o],2),t=e[0],n=e[1];return t in r?"continue":"function"!=typeof n.value?(Object.defineProperty(r,t,{get:function(){return this.chain(this.value[t])}}),"continue"):void(r[t]=function(){for(var e,t,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=(e=n.value).call.apply(e,[this.value].concat(i));return null===(t=this.chain)||void 0===t?void 0:t.call(this,a)})},o=0,a=Object.entries(n);o<a.length;o++)i()}wi(Km,"_instance",void 0),function(){function e(){oi(this,e),wi(this,"resolveListeners",[]),wi(this,"rejectListeners",[]),wi(this,"resetListeners",[]),this.setPromiseValues()}bi(e,[{key:"value",get:function(){return this._value||null}},{key:"isResolved",value:function(){return"_value"in this}},{key:"then",value:function(e,t){return this.promise.then(e,t)}},{key:"catch",value:function(e){return this.promise.catch(e)}},{key:"finally",value:function(e){return this.promise.finally(e)}},{key:"resolve",value:function(e){this.isResolved()&&this.reset(),this._value=e,this._resolve(e),this.resolveListeners.forEach((function(t){return t(e)}))}},{key:"reject",value:function(e){this.isResolved()&&this.reset(),delete this._value,this._reject(e),this.rejectListeners.forEach((function(t){return t(e)}))}},{key:"onResolve",value:function(e){var t=this;return this.resolveListeners.push(e),function(){return rb(t.resolveListeners,e)}}},{key:"onReject",value:function(e){var t=this;return this.rejectListeners.push(e),function(){return rb(t.rejectListeners,e)}}},{key:"onReset",value:function(e){var t=this;return this.resetListeners.push(e),function(){return rb(t.resetListeners,e)}}},{key:"reset",value:function(){this.setPromiseValues(),this.rejectListeners.forEach((function(e){return e()}))}},{key:"setPromiseValues",value:function(){var e=this;this.promise=new Promise((function(t,r){e._resolve=t,e._reject=r}))}}],[{key:"from",value:function(t){var r=new e;return t.then(r.resolve.bind(r)).catch(r.reject.bind(r)),r}}])}();var xb=function(){function e(t){oi(this,e),wi(this,"value",void 0),this.value=t}return bi(e,[{key:"create",value:function(e){return new this.constructor(e)}},{key:"chain",value:function(e){return this.isPrimitive(e)?this.create(e):e}}],[{key:"isPrimitive",value:function(e){return this.prototype.isPrimitive(e)}}]),e}();var _b={clear:function(e){e.splice(0,e.length)},diff:function(e,t,r){var n,i=e.slice(0),o=[],a=r?function(e,t){return t.findIndex((function(t){return r(e,t)}))}:function(e,t){return t.indexOf(e)},s=Zm(t);try{for(s.s();!(n=s.n()).done;){var u=n.value,c=a(u,i);-1!==c?i.splice(c,1):o.push(u)}}catch(e){s.e(e)}finally{s.f()}return{added:o,removed:i}},filter:tb,first:function(e,t){var r,n=Zm(e);try{for(n.s();!(r=n.n()).done;){var i=r.value;if(t(i))return i}}catch(e){n.e(e)}finally{n.f()}return null},flatMap:function(e,t){return gu(e.entries()).flatMap((function(e){var r=pu(e,2),n=r[0],i=r[1];return t(i,n)}))},groupBy:function(e,t){var r="string"==typeof t?function(e){return Vm(e[t])}:t;return e.reduce((function(e,t){var n,i;return(null!==(i=e[n=r(t)])&&void 0!==i?i:e[n]=[]).push(t),e}),{})},isEmpty:function(e){return 0===e.length},project:function(e,t){return e.map((function(e){return e[t]}))},randomItem:function(e){return 0===e.length?null:e[Math.floor(Math.random()*e.length)]},randomItems:function(e,t){for(var r=e.slice(0),n=[];r.length>0&&n.length<t;){var i=Math.floor(Math.random()*r.length);n.push(r[i]),r.splice(i,1)}return n},remove:rb,removeIndex:function(e,t){return e.splice(Number(t),1).length>0},replace:nb,sorted:function(e,t,r){r="asc"===t||"desc"===t?t:r;var n={},i=function(t,r){var i;if(!(r in n)){var o,a=null===(o=e.find((function(e){return void 0!==e[r]&&null!==e[r]})))||void 0===o?void 0:o[r];n[r]=function(e){switch(ci(e)){case"string":return"";case"number":return Number.MIN_SAFE_INTEGER;case"boolean":return!1;default:return null}}(a)}return null!==(i=t[r])&&void 0!==i?i:n[r]};return e.slice(0).sort(function(){var e="desc"===r?function(e){return function(t,r){return Xm(i(r,e),i(t,e))}}:function(e){return function(t,r){return Xm(i(t,e),i(r,e))}};switch(ci(t)){case"function":return t;case"string":if("asc"===t)return;return"desc"===t?function(e,t){return Xm(t,e)}:e(t);case"object":var n=t.map((function(t){return e(t)}));return function(e,t){var r,i=Zm(n);try{for(i.s();!(r=i.n()).done;){var o=(0,r.value)(e,t);if(0!==o)return o}}catch(e){i.e(e)}finally{i.f()}return 0}}}())},unique:ib,where:function(e,t,r){return e.filter((function(e){var n=e[t],i="function"==typeof n?n.call(e):n;return r?i===r:!!i}))},without:function(e,t){return Array.isArray(t)?tb(e,(function(e){return-1===t.indexOf(e)})):function(e,t){return ob(e,[t])}(e,e.indexOf(t))},withoutIndexes:ob},jb=function(e,t){ui(n,e);var r=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fi(e);if(t){var i=fi(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return li(this,r)}}(n);function n(){return oi(this,n),r.apply(this,arguments)}return bi(n,[{key:t,value:xu.mark((function e(){return xu.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.value,"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"get",value:function(e){return this.value[e]}},{key:"toArray",value:function(){return this.value.slice(0)}},{key:"isPrimitive",value:function(e){return Array.isArray(e)}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.prototype;return t.create(e)}}]),n}(xb,Symbol.iterator);bb(jb,_b),wb(jb,Array);var Sb={reverse:function(e){return e.split("").reverse().join("")},toCamelCase:function(e){var t=function(e){return lu(e)||vu(e)||hu(e)||du()}(hb(e)),r=t[0],n=t.slice(1);return(null!=r?r:"").toLowerCase()+n.map((function(e){return e.slice(0,1).toUpperCase()+e.slice(1).toLowerCase()})).join("")},toSlug:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e=e.normalize("NFD").replace(/[֊־᐀‐‑‒–—―⸗⸚⸺⸻~〜〰゠︱︲﹘﹣-(){}><[\]]/g," ").replace(/[\u0300-\u036f]/g,"").replace(/[\u3000-\u303f]/g,"").replace(/['".,#!$%/\\^&*;:=`@+?]/g,"").toLowerCase().trim().replace(/\s+/g,t),t.length>0&&(e=e.replace(new RegExp("".concat(t,"+"),"g"),t)),e},toStudlyCase:function(e){return hb(e).map((function(e){return e.slice(0,1).toUpperCase()+e.slice(1).toLowerCase()})).join("")},toTitleCase:function(e){return hb(e).map((function(e){return e.slice(0,1).toUpperCase()+e.slice(1).toLowerCase()})).join(" ")}},Ib=function(e){ui(r,xb);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fi(e);if(t){var i=fi(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return li(this,r)}}(r);function r(){return oi(this,r),t.apply(this,arguments)}return bi(r,[{key:"toString",value:function(){return this.value}},{key:"isPrimitive",value:function(e){return"string"==typeof e}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.prototype;return t.create(e)}}]),r}();function kb(e,t){if(!t)return function(e){var t=new Proxy(e,{get:function(e,r,n){var i=Reflect.get(e,r,n);return"function"!=typeof i?i:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return i.call.apply(i,[e].concat(n)),t}}});return t}(e);var r=t(e);return r instanceof Promise?r.then((function(){return e})):e}function Rb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return jb.create(ab(e))}function Eb(e,t){return Array.isArray(e)?function(e,t){var r=e[t];return e.splice(t,1),r}(e,t):function(e,t){var r=e[t];return delete e[t],r}(e,t)}function Ob(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}bb(Ib,Sb),wb(Ib,String),function(){function e(t,r){oi(this,e),wi(this,"errorMessage",void 0),wi(this,"getValue",void 0),this.errorMessage=t,this.getValue=r}bi(e,[{key:"get",value:function(e,t,r){var n,i=null!==(n=this.getValue())&&void 0!==n?n:Lm(this.errorMessage),o=Reflect.get(i,t,r);return"function"==typeof o?o.bind(i):o}},{key:"set",value:function(e,t,r,n){var i,o=null!==(i=this.getValue())&&void 0!==i?i:Lm(this.errorMessage);return Reflect.set(o,t,r,n)}},{key:"getPrototypeOf",value:function(){var e,t=null!==(e=this.getValue())&&void 0!==e?e:Lm(this.errorMessage);return Object.getPrototypeOf(t)}}])}();var Tb=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200;oi(this,e),wi(this,"body",void 0),wi(this,"bodyUsed",void 0),wi(this,"headers",void 0),wi(this,"ok",void 0),wi(this,"redirected",void 0),wi(this,"status",void 0),wi(this,"statusText",void 0),wi(this,"trailer",void 0),wi(this,"type",void 0),wi(this,"url",void 0),wi(this,"rawBody",void 0),this.rawBody=t,this.headers=new Headers(r),this.status=n}var t,r,n,i,o,a;return bi(e,[{key:"arrayBuffer",value:(a=rf(xu.mark((function e(){return xu.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("FakeResponse.arrayBuffer() is not implemented");case 1:case"end":return e.stop()}}),e)}))),function(){return a.apply(this,arguments)})},{key:"blob",value:(o=rf(xu.mark((function e(){return xu.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("FakeResponse.blob() is not implemented");case 1:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)})},{key:"bytes",value:(i=rf(xu.mark((function e(){return xu.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("FakeResponse.bytes() is not implemented");case 1:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})},{key:"formData",value:(n=rf(xu.mark((function e(){return xu.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("FakeResponse.formData() is not implemented");case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"json",value:(r=rf(xu.mark((function e(){return xu.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",JSON.parse(this.rawBody));case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"text",value:(t=rf(xu.mark((function e(){return xu.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.rawBody);case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"clone",value:function(){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ob(Object(r),!0).forEach((function(t){wi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ob(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},this)}}],[{key:"created",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new e(t,r,201)}},{key:"success",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new e(t,r)}},{key:"notFound",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new e(t,r,404)}}]),e}();!function(){function e(){var t=this;oi(this,e),wi(this,"fetch",void 0),wi(this,"fetchSpy",null),wi(this,"requests",[]),wi(this,"responses",{});var r,n=function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i,o,a,s,u,c,l=r[0],f=r[1];return"string"==typeof l?{url:l,method:null!==(i=null==f?void 0:f.method)&&void 0!==i?i:"GET",headers:null!==(o=null==f?void 0:f.headers)&&void 0!==o?o:{},body:Vm(null!==(a=null==f?void 0:f.body)&&void 0!==a?a:"")}:"href"in l?{url:Vm(l),method:null!==(s=null==f?void 0:f.method)&&void 0!==s?s:"GET",headers:null!==(u=null==f?void 0:f.headers)&&void 0!==u?u:{},body:Vm(null!==(c=null==f?void 0:f.body)&&void 0!==c?c:"")}:{url:l.url,method:l.method,headers:null!==(e=null==l?void 0:l.headers)&&void 0!==e?e:{},body:Vm(l.body)}};this.fetch=(r=rf(xu.mark((function e(r,i){var o,a,s;return xu.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n(r,i),e.next=3,t.matchResponse(a);case 3:return s=e.sent,a.response=s,t.requests.push(a),null===(o=t.fetchSpy)||void 0===o||o.call(t,a),e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)}))),function(e,t){return r.apply(this,arguments)})}var t;bi(e,[{key:"spy",value:function(e){this.fetchSpy=e}},{key:"getRequest",value:function(e,t){var r,n,i="string"==typeof t&&e;return t=null!==(r=t)&&void 0!==r?r:e,null!==(n=this.requests.find((function(e){return e.url===t&&(!i||e.method===i)})))&&void 0!==n?n:null}},{key:"getRequests",value:function(e,t){var r;if(!e)return this.requests;var n="string"==typeof t&&e;return t=null!==(r=t)&&void 0!==r?r:e,this.requests.filter((function(e){return e.url===t&&(!n||e.method===n)}))}},{key:"respond",value:function(e,t){var r,n,i;null!==(n=(r=this.responses)[e])&&void 0!==n||(r[e]=[]),null===(i=this.responses[e])||void 0===i||i.push("response"in t?t:{response:t})}},{key:"respondOnce",value:function(e,t){this.respond(e,{response:t,times:1})}},{key:"reset",value:function(){this.requests=[],this.responses={}}},{key:"matchResponse",value:(t=rf(xu.mark((function e(t){var r,n;return xu.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.responses[t.url],n=null==r?void 0:r.find((function(e){return!e.method||e.method===t.method})),r&&n){e.next=4;break}return e.abrupt("return",Tb.notFound());case 4:return n.times&&(n.times--,0===n.times&&rb(r,n)),e.abrupt("return",n.response);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}])}(),e.SolidDocumentFormat=void 0,(e.SolidDocumentFormat||(e.SolidDocumentFormat={})).Turtle="Turtle";var Ab=function(e){c(MalformedSolidDocumentError,e);var t=p(MalformedSolidDocumentError);function MalformedSolidDocumentError(e,r,n){var i;return o(this,MalformedSolidDocumentError),i=t.call(this,function(e,t,r){return e?"Malformed ".concat(t," document found at ").concat(e," - ").concat(r):"Malformed ".concat(t," document - ").concat(r)}(e,r,n)),u(h(i),"documentUrl",void 0),u(h(i),"documentFormat",void 0),u(h(i),"malformationDetails",void 0),i.documentUrl=e,i.documentFormat=r,i.malformationDetails=n,i}return MalformedSolidDocumentError}(Pm),Pb=function(e){c(NetworkRequestError,e);var t=p(NetworkRequestError);function NetworkRequestError(e,r){var n;return o(this,NetworkRequestError),u(h(n=t.call(this,"Request failed trying to fetch ".concat(e),r)),"url",void 0),n.url=e,n}return NetworkRequestError}(Pm),Nb=function(e){c(NotFoundError,e);var t=p(NotFoundError);function NotFoundError(e){var r;return o(this,NotFoundError),u(h(r=t.call(this,"Document with '".concat(e,"' url not found"))),"url",void 0),r.url=e,r}return NotFoundError}(Pm);var Lb=function(e){c(UnauthorizedError,e);var t=p(UnauthorizedError);function UnauthorizedError(e,r){var n;return o(this,UnauthorizedError),n=t.call(this,function(e,t){return"Unauthorized".concat(403===t?" (Forbidden)":"",": ").concat(e)}(e,r)),u(h(n),"url",void 0),u(h(n),"responseStatus",void 0),n.url=e,n.responseStatus=r,n}return s(UnauthorizedError,[{key:"forbidden",get:function(){return void 0!==this.responseStatus?403===this.responseStatus:void 0}}]),UnauthorizedError}(Pm);var Cb=function(e){c(UnsuccessfulRequestError,e);var t=p(UnsuccessfulRequestError);function UnsuccessfulRequestError(e,r){var n;return o(this,UnsuccessfulRequestError),n=t.call(this,function(e,t){var r;return t=null!==(r=t)&&void 0!==r?r:e,"string"==typeof e?"".concat(e," (returned ").concat(t.status," status code)"):"Request to ".concat(t.url," returned ").concat(t.status," status code")}(e,r)),u(h(n),"response",void 0),n.response=null!=r?r:e,n}return UnsuccessfulRequestError}(Pm),Db=function(e){c(UnsupportedAuthorizationProtocolError,e);var t=p(UnsupportedAuthorizationProtocolError);function UnsupportedAuthorizationProtocolError(e,r,n){var i;return o(this,UnsupportedAuthorizationProtocolError),u(h(i=t.call(this,"The resource at ".concat(e," is using an unsupported authorization protocol (").concat(r,")"),n)),"url",void 0),u(h(i),"protocol",void 0),i.url=e,i.protocol=r,i}return UnsupportedAuthorizationProtocolError}(Pm);x((function(e){var t=function(e){var t,r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new O(n||[]);return i(a,"_invoke",{value:I(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var h="suspendedStart",d="executing",p="completed",v={};function g(){}function y(){}function m(){}var b={};c(b,a,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(T([])));x&&x!==r&&n.call(x,a)&&(b=x);var _=m.prototype=g.prototype=Object.create(b);function j(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function r(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function I(e,r,n){var i=h;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=k(s,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=d;var c=f(e,r,n);if("normal"===c.type){if(i=n.done?p:"suspendedYield",c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function k(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=f(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function R(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function T(e){if(null!=e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return y.prototype=m,i(_,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:y,configurable:!0}),y.displayName=c(m,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,c(e,u,"GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},j(S.prototype),c(S.prototype,s,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new S(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(_),c(_,u,"Generator"),c(_,a,(function(){return this})),c(_,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=T,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}));var Mb={acl:"http://www.w3.org/ns/auth/acl#",foaf:"http://xmlns.com/foaf/0.1/",ldp:"http://www.w3.org/ns/ldp#",pim:"http://www.w3.org/ns/pim/space#",purl:"http://purl.org/dc/terms/",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",schema:"https://schema.org/",solid:"http://www.w3.org/ns/solid/terms#",vcard:"http://www.w3.org/2006/vcard/ns#"};function Ub(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.startsWith("http"))return e;var r=e.split(":"),n=v(r,2),i=n[0],o=n[1];if(i&&o){var a,s,u,c=null!==(a=null!==(s=Mb[i])&&void 0!==s?s:null===(u=t.extraContext)||void 0===u?void 0:u[i])&&void 0!==a?a:null;if(!c)throw new Error("Can't expand IRI with unknown prefix: '".concat(e,"'"));return c+o}if(!t.defaultPrefix)throw new Error("Can't expand IRI without a default prefix: '".concat(e,"'"));return t.defaultPrefix+i}var Fb=function(){function e(t,r){o(this,e),u(this,"url",void 0),u(this,"quads",void 0),this.url=t,this.quads=r}return s(e,[{key:"value",value:function(e){var t;return null===(t=this.quads.find((function(t){return t.predicate.value===Ub(e)})))||void 0===t?void 0:t.object.value}},{key:"values",value:function(e){return this.quads.filter((function(t){return t.predicate.value===Ub(e)})).map((function(e){return e.object.value}))}}]),e}(),Bb=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];o(this,e),u(this,"quads",void 0),this.quads=t}return s(e,[{key:"isEmpty",value:function(){return 0===this.statements.length}},{key:"getQuads",value:function(){return this.quads.slice(0)}},{key:"addQuads",value:function(e){var t;(t=this.quads).push.apply(t,g(e))}},{key:"statements",value:function(e,t,r){var n=this;return this.quads.filter((function(i){return!(r&&i.object.value!==n.expandIRI(r)||e&&i.subject.value!==n.expandIRI(e)||t&&i.predicate.value!==n.expandIRI(t))}))}},{key:"statement",value:function(e,t,r){var n=this,i=this.quads.find((function(i){return!(r&&i.object.value!==n.expandIRI(r)||e&&i.subject.value!==n.expandIRI(e)||t&&i.predicate.value!==n.expandIRI(t))}));return null!=i?i:null}},{key:"contains",value:function(e,t,r){return null!==this.statement(e,t,r)}},{key:"getThing",value:function(e){var t=this.statements(e);return new Fb(e,t)}},{key:"expandIRI",value:function(e){return Ub(e)}}]),e}();or({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=Ie(this),r=Mt(t),n=kr(t,0);return n.length=nd(n,t,t,r,0,void 0===e?1:At(e)),n}}),Ai("flat");var qb=x((function(e){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},bytesToBase64:function(e){for(var r=[],n=0;n<e.length;n+=3)for(var i=e[n]<<16|e[n+1]<<8|e[n+2],o=0;o<4;o++)8*n+6*o<=8*e.length?r.push(t.charAt(i>>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,i=0;n<e.length;i=++n%4)0!=i&&r.push((t.indexOf(e.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|t.indexOf(e.charAt(n))>>>6-2*i);return r}};e.exports=r}()})),zb={utf8:{stringToBytes:function(e){return zb.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(zb.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t},bytesToString:function(e){for(var t=[],r=0;r<e.length;r++)t.push(String.fromCharCode(e[r]));return t.join("")}}},Jb=zb,$b=function(e){return null!=e&&(Gb(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Gb(e.slice(0,0))}(e)||!!e._isBuffer)};function Gb(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Hb,Vb=x((function(e){!function(){var t=qb,r=Jb.utf8,n=$b,i=Jb.bin,o=function(e,a){e.constructor==String?e=a&&"binary"===a.encoding?i.stringToBytes(e):r.stringToBytes(e):n(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var s=t.bytesToWords(e),u=8*e.length,c=1732584193,l=-271733879,f=-1732584194,h=271733878,d=0;d<s.length;d++)s[d]=16711935&(s[d]<<8|s[d]>>>24)|4278255360&(s[d]<<24|s[d]>>>8);s[u>>>5]|=128<<u%32,s[14+(u+64>>>9<<4)]=u;var p=o._ff,v=o._gg,g=o._hh,y=o._ii;for(d=0;d<s.length;d+=16){var m=c,b=l,w=f,x=h;c=p(c,l,f,h,s[d+0],7,-680876936),h=p(h,c,l,f,s[d+1],12,-389564586),f=p(f,h,c,l,s[d+2],17,606105819),l=p(l,f,h,c,s[d+3],22,-1044525330),c=p(c,l,f,h,s[d+4],7,-176418897),h=p(h,c,l,f,s[d+5],12,1200080426),f=p(f,h,c,l,s[d+6],17,-1473231341),l=p(l,f,h,c,s[d+7],22,-45705983),c=p(c,l,f,h,s[d+8],7,1770035416),h=p(h,c,l,f,s[d+9],12,-1958414417),f=p(f,h,c,l,s[d+10],17,-42063),l=p(l,f,h,c,s[d+11],22,-1990404162),c=p(c,l,f,h,s[d+12],7,1804603682),h=p(h,c,l,f,s[d+13],12,-40341101),f=p(f,h,c,l,s[d+14],17,-1502002290),c=v(c,l=p(l,f,h,c,s[d+15],22,1236535329),f,h,s[d+1],5,-165796510),h=v(h,c,l,f,s[d+6],9,-1069501632),f=v(f,h,c,l,s[d+11],14,643717713),l=v(l,f,h,c,s[d+0],20,-373897302),c=v(c,l,f,h,s[d+5],5,-701558691),h=v(h,c,l,f,s[d+10],9,38016083),f=v(f,h,c,l,s[d+15],14,-660478335),l=v(l,f,h,c,s[d+4],20,-405537848),c=v(c,l,f,h,s[d+9],5,568446438),h=v(h,c,l,f,s[d+14],9,-1019803690),f=v(f,h,c,l,s[d+3],14,-187363961),l=v(l,f,h,c,s[d+8],20,1163531501),c=v(c,l,f,h,s[d+13],5,-1444681467),h=v(h,c,l,f,s[d+2],9,-51403784),f=v(f,h,c,l,s[d+7],14,1735328473),c=g(c,l=v(l,f,h,c,s[d+12],20,-1926607734),f,h,s[d+5],4,-378558),h=g(h,c,l,f,s[d+8],11,-2022574463),f=g(f,h,c,l,s[d+11],16,1839030562),l=g(l,f,h,c,s[d+14],23,-35309556),c=g(c,l,f,h,s[d+1],4,-1530992060),h=g(h,c,l,f,s[d+4],11,1272893353),f=g(f,h,c,l,s[d+7],16,-155497632),l=g(l,f,h,c,s[d+10],23,-1094730640),c=g(c,l,f,h,s[d+13],4,681279174),h=g(h,c,l,f,s[d+0],11,-358537222),f=g(f,h,c,l,s[d+3],16,-722521979),l=g(l,f,h,c,s[d+6],23,76029189),c=g(c,l,f,h,s[d+9],4,-640364487),h=g(h,c,l,f,s[d+12],11,-421815835),f=g(f,h,c,l,s[d+15],16,530742520),c=y(c,l=g(l,f,h,c,s[d+2],23,-995338651),f,h,s[d+0],6,-198630844),h=y(h,c,l,f,s[d+7],10,1126891415),f=y(f,h,c,l,s[d+14],15,-1416354905),l=y(l,f,h,c,s[d+5],21,-57434055),c=y(c,l,f,h,s[d+12],6,1700485571),h=y(h,c,l,f,s[d+3],10,-1894986606),f=y(f,h,c,l,s[d+10],15,-1051523),l=y(l,f,h,c,s[d+1],21,-2054922799),c=y(c,l,f,h,s[d+8],6,1873313359),h=y(h,c,l,f,s[d+15],10,-30611744),f=y(f,h,c,l,s[d+6],15,-1560198380),l=y(l,f,h,c,s[d+13],21,1309151649),c=y(c,l,f,h,s[d+4],6,-145523070),h=y(h,c,l,f,s[d+11],10,-1120210379),f=y(f,h,c,l,s[d+2],15,718787259),l=y(l,f,h,c,s[d+9],21,-343485551),c=c+m>>>0,l=l+b>>>0,f=f+w>>>0,h=h+x>>>0}return t.endian([c,l,f,h])};o._ff=function(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+(i>>>0)+a;return(s<<o|s>>>32-o)+t},o._gg=function(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+(i>>>0)+a;return(s<<o|s>>>32-o)+t},o._hh=function(e,t,r,n,i,o,a){var s=e+(t^r^n)+(i>>>0)+a;return(s<<o|s>>>32-o)+t},o._ii=function(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+(i>>>0)+a;return(s<<o|s>>>32-o)+t},o._blocksize=16,o._digestsize=16,e.exports=function(e,r){if(null==e)throw new Error("Illegal argument "+e);var n=t.wordsToBytes(o(e,r));return r&&r.asBytes?n:r&&r.asString?i.bytesToString(n):t.bytesToHex(n)}}()})),Qb=x((function(e,t){window,e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=49)}([function(e,t,r){const n="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i="http://www.w3.org/2001/XMLSchema#",o="http://www.w3.org/2000/10/swap/";t.a={xsd:{decimal:i+"decimal",boolean:i+"boolean",double:i+"double",integer:i+"integer",string:i+"string"},rdf:{type:n+"type",nil:n+"nil",first:n+"first",rest:n+"rest",langString:n+"langString"},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:o+"reify#forSome",forAll:o+"reify#forAll"},log:{implies:o+"log#implies"}}},function(e,t,r){const n={};e.exports=n,n.isArray=Array.isArray,n.isBoolean=e=>"boolean"==typeof e||"[object Boolean]"===Object.prototype.toString.call(e),n.isDouble=e=>n.isNumber(e)&&(-1!==String(e).indexOf(".")||Math.abs(e)>=1e21),n.isEmptyObject=e=>n.isObject(e)&&0===Object.keys(e).length,n.isNumber=e=>"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e),n.isNumeric=e=>!isNaN(parseFloat(e))&&isFinite(e),n.isObject=e=>"[object Object]"===Object.prototype.toString.call(e),n.isString=e=>"string"==typeof e||"[object String]"===Object.prototype.toString.call(e),n.isUndefined=e=>void 0===e},function(e,t,r){const n=r(4),i=r(1),o=r(11).IdentifierIssuer,a=r(3),s=/(?:<[^>]*?>|"[^"]*?"|[^,])+/g,u=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/,c=/(.*?)=(?:(?:"([^"]*?)")|([^"]*?))\s*(?:(?:;\s*)|$)/g,l={accept:"application/ld+json, application/json"},f={};e.exports=f,f.IdentifierIssuer=o,f.clone=function(e){if(e&&"object"==typeof e){let t;if(i.isArray(e)){t=[];for(let r=0;r<e.length;++r)t[r]=f.clone(e[r])}else if(e instanceof Map){t=new Map;for(const[r,n]of e)t.set(r,f.clone(n))}else if(e instanceof Set){t=new Set;for(const r of e)t.add(f.clone(r))}else if(i.isObject(e)){t={};for(const r in e)t[r]=f.clone(e[r])}else t=e.toString();return t}return e},f.asArray=function(e){return Array.isArray(e)?e:[e]},f.buildHeaders=(e={})=>{if(Object.keys(e).some((e=>"accept"===e.toLowerCase())))throw new RangeError('Accept header may not be specified; only "'+l.accept+'" is supported.');return Object.assign({Accept:l.accept},e)},f.parseLinkHeader=e=>{const t={},r=e.match(s);for(let e=0;e<r.length;++e){let n=r[e].match(u);if(!n)continue;const i={target:n[1]},o=n[2];for(;n=c.exec(o);)i[n[1]]=void 0===n[2]?n[3]:n[2];const a=i.rel||"";Array.isArray(t[a])?t[a].push(i):t.hasOwnProperty(a)?t[a]=[t[a],i]:t[a]=i}return t},f.validateTypeValue=(e,t)=>{if(!(i.isString(e)||i.isArray(e)&&e.every((e=>i.isString(e))))){if(t&&i.isObject(e))switch(Object.keys(e).length){case 0:return;case 1:if("@default"in e&&f.asArray(e["@default"]).every((e=>i.isString(e))))return}throw new a('Invalid JSON-LD syntax; "@type" value must a string, an array of strings, an empty object, or a default object.',"jsonld.SyntaxError",{code:"invalid type value",value:e})}},f.hasProperty=(e,t)=>{if(e.hasOwnProperty(t)){const r=e[t];return!i.isArray(r)||r.length>0}return!1},f.hasValue=(e,t,r)=>{if(f.hasProperty(e,t)){let o=e[t];const a=n.isList(o);if(i.isArray(o)||a){a&&(o=o["@list"]);for(let e=0;e<o.length;++e)if(f.compareValues(r,o[e]))return!0}else if(!i.isArray(r))return f.compareValues(r,o)}return!1},f.addValue=(e,t,r,n)=>{if("propertyIsArray"in(n=n||{})||(n.propertyIsArray=!1),"valueIsArray"in n||(n.valueIsArray=!1),"allowDuplicate"in n||(n.allowDuplicate=!0),"prependValue"in n||(n.prependValue=!1),n.valueIsArray)e[t]=r;else if(i.isArray(r)){0===r.length&&n.propertyIsArray&&!e.hasOwnProperty(t)&&(e[t]=[]),n.prependValue&&(r=r.concat(e[t]),e[t]=[]);for(let i=0;i<r.length;++i)f.addValue(e,t,r[i],n)}else if(e.hasOwnProperty(t)){const o=!n.allowDuplicate&&f.hasValue(e,t,r);i.isArray(e[t])||o&&!n.propertyIsArray||(e[t]=[e[t]]),o||(n.prependValue?e[t].unshift(r):e[t].push(r))}else e[t]=n.propertyIsArray?[r]:r},f.getValues=(e,t)=>[].concat(e[t]||[]),f.removeProperty=(e,t)=>{delete e[t]},f.removeValue=(e,t,r,n)=>{"propertyIsArray"in(n=n||{})||(n.propertyIsArray=!1);const i=f.getValues(e,t).filter((e=>!f.compareValues(e,r)));0===i.length?f.removeProperty(e,t):1!==i.length||n.propertyIsArray?e[t]=i:e[t]=i[0]},f.relabelBlankNodes=(e,t)=>function e(t,r){if(i.isArray(r))for(let n=0;n<r.length;++n)r[n]=e(t,r[n]);else if(n.isList(r))r["@list"]=e(t,r["@list"]);else if(i.isObject(r)){n.isBlankNode(r)&&(r["@id"]=t.getId(r["@id"]));const i=Object.keys(r).sort();for(let n=0;n<i.length;++n){const o=i[n];"@id"!==o&&(r[o]=e(t,r[o]))}}return r}((t=t||{}).issuer||new o("_:b"),e),f.compareValues=(e,t)=>e===t||!(!n.isValue(e)||!n.isValue(t)||e["@value"]!==t["@value"]||e["@type"]!==t["@type"]||e["@language"]!==t["@language"]||e["@index"]!==t["@index"])||!!(i.isObject(e)&&"@id"in e&&i.isObject(t)&&"@id"in t)&&e["@id"]===t["@id"],f.compareShortestLeast=(e,t)=>e.length<t.length?-1:t.length<e.length?1:e===t?0:e<t?-1:1},function(e,t,r){e.exports=class extends Error{constructor(e="An unspecified JSON-LD error occurred.",t="jsonld.Error",r={}){super(e),this.name=t,this.message=e,this.details=r}}},function(e,t,r){const n=r(1),i={};e.exports=i,i.isSubject=e=>!(!n.isObject(e)||"@value"in e||"@set"in e||"@list"in e)&&(Object.keys(e).length>1||!("@id"in e)),i.isSubjectReference=e=>n.isObject(e)&&1===Object.keys(e).length&&"@id"in e,i.isValue=e=>n.isObject(e)&&"@value"in e,i.isList=e=>n.isObject(e)&&"@list"in e,i.isGraph=e=>n.isObject(e)&&"@graph"in e&&1===Object.keys(e).filter((e=>"@id"!==e&&"@index"!==e)).length,i.isSimpleGraph=e=>i.isGraph(e)&&!("@id"in e),i.isBlankNode=e=>!!n.isObject(e)&&("@id"in e?0===e["@id"].indexOf("_:"):0===Object.keys(e).length||!("@value"in e||"@set"in e||"@list"in e))},function(e,t,r){const n=r(1),i={};e.exports=i,i.parsers={simple:{keys:["href","scheme","authority","path","query","fragment"],regex:/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/},full:{keys:["href","protocol","scheme","authority","auth","user","password","hostname","port","path","directory","file","query","fragment"],regex:/^(([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}},i.parse=(e,t)=>{const r={},n=i.parsers[t||"full"],o=n.regex.exec(e);let a=n.keys.length;for(;a--;)r[n.keys[a]]=void 0===o[a]?null:o[a];return("https"===r.scheme&&"443"===r.port||"http"===r.scheme&&"80"===r.port)&&(r.href=r.href.replace(":"+r.port,""),r.authority=r.authority.replace(":"+r.port,""),r.port=null),r.normalizedPath=i.removeDotSegments(r.path),r},i.prependBase=(e,t)=>{if(null===e)return t;if(i.isAbsolute(t))return t;e&&!n.isString(e)||(e=i.parse(e||""));const r=i.parse(t),o={protocol:e.protocol||""};if(null!==r.authority)o.authority=r.authority,o.path=r.path,o.query=r.query;else if(o.authority=e.authority,""===r.path)o.path=e.path,null!==r.query?o.query=r.query:o.query=e.query;else{if(0===r.path.indexOf("/"))o.path=r.path;else{let t=e.path;t=t.substr(0,t.lastIndexOf("/")+1),(t.length>0||e.authority)&&"/"!==t.substr(-1)&&(t+="/"),t+=r.path,o.path=t}o.query=r.query}""!==r.path&&(o.path=i.removeDotSegments(o.path));let a=o.protocol;return null!==o.authority&&(a+="//"+o.authority),a+=o.path,null!==o.query&&(a+="?"+o.query),null!==r.fragment&&(a+="#"+r.fragment),""===a&&(a="./"),a},i.removeBase=(e,t)=>{if(null===e)return t;e&&!n.isString(e)||(e=i.parse(e||""));let r="";if(""!==e.href?r+=(e.protocol||"")+"//"+(e.authority||""):t.indexOf("//")&&(r+="//"),0!==t.indexOf(r))return t;const o=i.parse(t.substr(r.length)),a=e.normalizedPath.split("/"),s=o.normalizedPath.split("/"),u=o.fragment||o.query?0:1;for(;a.length>0&&s.length>u&&a[0]===s[0];)a.shift(),s.shift();let c="";if(a.length>0){a.pop();for(let e=0;e<a.length;++e)c+="../"}return c+=s.join("/"),null!==o.query&&(c+="?"+o.query),null!==o.fragment&&(c+="#"+o.fragment),""===c&&(c="./"),c},i.removeDotSegments=e=>{if(0===e.length)return"";const t=e.split("/"),r=[];for(;t.length>0;){const e=t.shift(),n=0===t.length;"."!==e?".."!==e?r.push(e):(r.pop(),n&&r.push("")):n&&r.push("")}return"/"===e[0]&&r.length>0&&""!==r[0]&&r.unshift(""),1===r.length&&""===r[0]?"/":r.join("/")};const o=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;i.isAbsolute=e=>n.isString(e)&&o.test(e),i.isRelative=e=>n.isString(e)},function(e,t,r){const n=r(2),i=r(3),{isArray:o,isObject:a,isString:s,isUndefined:u}=r(1),{isAbsolute:c,isRelative:l,prependBase:f}=r(5),{asArray:h,compareShortestLeast:d}=r(2),p=new Map,v=/^@[a-zA-Z]+$/,g={};function y(e,t,r,n,i,o){if(null===t||!s(t)||g.isKeyword(t))return t;if(t.match(v))return null;if(n&&n.hasOwnProperty(t)&&!0!==i.get(t)&&g.createTermDefinition({activeCtx:e,localCtx:n,term:t,defined:i,options:o}),(r=r||{}).vocab){const r=e.mappings.get(t);if(null===r)return null;if(a(r)&&"@id"in r)return r["@id"]}const u=t.indexOf(":");if(u>0){const r=t.substr(0,u),a=t.substr(u+1);if("_"===r||0===a.indexOf("//"))return t;n&&n.hasOwnProperty(r)&&g.createTermDefinition({activeCtx:e,localCtx:n,term:r,defined:i,options:o});const s=e.mappings.get(r);if(s&&s._prefix)return s["@id"]+a;if(c(t))return t}if(r.vocab&&"@vocab"in e)return e["@vocab"]+t;if(r.base&&"@base"in e){if(e["@base"])return f(f(o.base,e["@base"]),t)}else if(r.base)return f(o.base,t);return t}e.exports=g,g.process=async({activeCtx:e,localCtx:t,options:r,propagate:u=!0,overrideProtected:d=!1,cycles:p=new Set})=>{if(a(t)&&"@context"in t&&o(t["@context"])&&(t=t["@context"]),0===h(t).length)return e;const v=await r.contextResolver.resolve({activeCtx:e,context:t,documentLoader:r.documentLoader,base:r.base});a(v[0].document)&&"boolean"==typeof v[0].document["@propagate"]&&(u=v[0].document["@propagate"]);let m=e;u||m.previousContext||(m=m.clone(),m.previousContext=e);for(const o of v){let{document:u}=o;if(e=m,null===u){if(!d&&0!==Object.keys(e.protected).length){const a=r&&r.protectedMode||"error";if("error"===a)throw new i("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"});if("warn"===a){console.warn("WARNING: invalid context nullification");const t=o.getProcessed(e);if(t){m=e=t;continue}const i=e;m=e=g.getInitialContext(r).clone();for(const[t,r]of Object.entries(i.protected))r&&(e.mappings[t]=n.clone(i.mappings[t]));e.protected=n.clone(i.protected),o.setProcessed(i,m);continue}throw new i("Invalid protectedMode.","jsonld.SyntaxError",{code:"invalid protected mode",context:t,protectedMode:a})}m=e=g.getInitialContext(r).clone();continue}const h=o.getProcessed(e);if(h){m=e=h;continue}if(a(u)&&"@context"in u&&(u=u["@context"]),!a(u))throw new i("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:u});m=m.clone();const v=new Map;if("@version"in u){if(1.1!==u["@version"])throw new i("Unsupported JSON-LD version: "+u["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:u});if(e.processingMode&&"json-ld-1.0"===e.processingMode)throw new i("@version: "+u["@version"]+" not compatible with "+e.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:u});m.processingMode="json-ld-1.1",m["@version"]=u["@version"],v.set("@version",!0)}if(m.processingMode=m.processingMode||e.processingMode,"@base"in u){let e=u["@base"];if(null===e||c(e));else{if(!l(e))throw new i('Invalid JSON-LD syntax; the value of "@base" in a @context must be an absolute IRI, a relative IRI, or null.',"jsonld.SyntaxError",{code:"invalid base IRI",context:u});e=f(m["@base"],e)}m["@base"]=e,v.set("@base",!0)}if("@vocab"in u){const e=u["@vocab"];if(null===e)delete m["@vocab"];else{if(!s(e))throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:u});if(!c(e)&&g.processingMode(m,1))throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:u});m["@vocab"]=y(m,e,{vocab:!0,base:!0},void 0,void 0,r)}v.set("@vocab",!0)}if("@language"in u){const e=u["@language"];if(null===e)delete m["@language"];else{if(!s(e))throw new i('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:u});m["@language"]=e.toLowerCase()}v.set("@language",!0)}if("@direction"in u){const t=u["@direction"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @direction not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:u});if(null===t)delete m["@direction"];else{if("ltr"!==t&&"rtl"!==t)throw new i('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:u});m["@direction"]=t}v.set("@direction",!0)}if("@propagate"in u){const r=u["@propagate"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @propagate not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:u});if("boolean"!=typeof r)throw new i("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:t});v.set("@propagate",!0)}if("@import"in u){const n=u["@import"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @import not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:u});if(!s(n))throw new i("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:t});const o=await r.contextResolver.resolve({activeCtx:e,context:n,documentLoader:r.documentLoader,base:r.base});if(1!==o.length)throw new i("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:t});const a=o[0].getProcessed(e);if(a)u=a;else{const r=o[0].document;if("@import"in r)throw new i("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:t});for(const e in r)u.hasOwnProperty(e)||(u[e]=r[e]);o[0].setProcessed(e,u)}v.set("@import",!0)}v.set("@protected",u["@protected"]||!1);for(const e in u)if(g.createTermDefinition({activeCtx:m,localCtx:u,term:e,defined:v,options:r,overrideProtected:d}),a(u[e])&&"@context"in u[e]){const n=u[e]["@context"];let o=!0;if(s(n)){const e=f(r.base,n);p.has(e)?o=!1:p.add(e)}if(o)try{await g.process({activeCtx:m.clone(),localCtx:u[e]["@context"],overrideProtected:!0,options:r,cycles:p})}catch(t){throw new i("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:u[e]["@context"],term:e})}}o.setProcessed(e,m)}return m},g.createTermDefinition=({activeCtx:e,localCtx:t,term:r,defined:n,options:u,overrideProtected:l=!1})=>{if(n.has(r)){if(n.get(r))return;throw new i("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:t,term:r})}let f;if(n.set(r,!1),t.hasOwnProperty(r)&&(f=t[r]),"@type"===r&&a(f)&&"@set"===(f["@container"]||"@set")&&g.processingMode(e,1.1)){const e=["@container","@id","@protected"],n=Object.keys(f);if(0===n.length||n.some((t=>!e.includes(t))))throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:r})}else{if(g.isKeyword(r))throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:r});if(r.match(v))return void console.warn('WARNING: terms beginning with "@" are reserved for future use and ignored',{term:r});if(""===r)throw new i("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:t})}const h=e.mappings.get(r);e.mappings.has(r)&&e.mappings.delete(r);let d=!1;if((s(f)||null===f)&&(d=!0,f={"@id":f}),!a(f))throw new i("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:t});const p={};e.mappings.set(r,p),p.reverse=!1;const m=["@container","@id","@language","@reverse","@type"];g.processingMode(e,1.1)&&m.push("@context","@direction","@index","@nest","@prefix","@protected");for(const e in f)if(!m.includes(e))throw new i("Invalid JSON-LD syntax; a term definition must not contain "+e,"jsonld.SyntaxError",{code:"invalid term definition",context:t});const b=r.indexOf(":");if(p._termHasColon=b>0,"@reverse"in f){if("@id"in f)throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});if("@nest"in f)throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});const o=f["@reverse"];if(!s(o))throw new i("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(!g.isKeyword(o)&&o.match(v))return console.warn('WARNING: values beginning with "@" are reserved for future use and ignored',{reverse:o}),void(h?e.mappings.set(r,h):e.mappings.delete(r));const a=y(e,o,{vocab:!0,base:!1},t,n,u);if(!c(a))throw new i("Invalid JSON-LD syntax; a @context @reverse value must be an absolute IRI or a blank node identifier.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});p["@id"]=a,p.reverse=!0}else if("@id"in f){let o=f["@id"];if(o&&!s(o))throw new i("Invalid JSON-LD syntax; a @context @id value must be an array of strings or a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(null===o)p["@id"]=null;else{if(!g.isKeyword(o)&&o.match(v))return console.warn('WARNING: values beginning with "@" are reserved for future use and ignored',{id:o}),void(h?e.mappings.set(r,h):e.mappings.delete(r));if(o!==r){if(o=y(e,o,{vocab:!0,base:!1},t,n,u),!c(o)&&!g.isKeyword(o))throw new i("Invalid JSON-LD syntax; a @context @id value must be an absolute IRI, a blank node identifier, or a keyword.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(r.match(/(?::[^:])|\//)&&y(e,r,{vocab:!0,base:!1},t,new Map(n).set(r,!0),u)!==o)throw new i("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});p["@id"]=o,p._prefix=d&&!p._termHasColon&&o.match(/[:\/\?#\[\]@]$/)}}}if(!("@id"in p))if(p._termHasColon){const i=r.substr(0,b);if(t.hasOwnProperty(i)&&g.createTermDefinition({activeCtx:e,localCtx:t,term:i,defined:n,options:u}),e.mappings.has(i)){const t=r.substr(b+1);p["@id"]=e.mappings.get(i)["@id"]+t}else p["@id"]=r}else if("@type"===r)p["@id"]=r;else{if(!("@vocab"in e))throw new i("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t,term:r});p["@id"]=e["@vocab"]+r}if((!0===f["@protected"]||!0===n.get("@protected")&&!1!==f["@protected"])&&(e.protected[r]=!0,p.protected=!0),n.set(r,!0),"@type"in f){let r=f["@type"];if(!s(r))throw new i("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if("@json"===r||"@none"===r){if(g.processingMode(e,1))throw new i(`Invalid JSON-LD syntax; an @context @type value must not be "${r}" in JSON-LD 1.0 mode.`,"jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else if("@id"!==r&&"@vocab"!==r){if(r=y(e,r,{vocab:!0,base:!1},t,n,u),!c(r))throw new i("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if(0===r.indexOf("_:"))throw new i("Invalid JSON-LD syntax; an @context @type value must be an IRI, not a blank node identifier.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}p["@type"]=r}if("@container"in f){const r=s(f["@container"])?[f["@container"]]:f["@container"]||[],n=["@list","@set","@index","@language"];let a=!0;const u=r.includes("@set");if(g.processingMode(e,1.1)){if(n.push("@graph","@id","@type"),r.includes("@list")){if(1!==r.length)throw new i("Invalid JSON-LD syntax; @context @container with @list must have no other values","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else if(r.includes("@graph")){if(r.some((e=>"@graph"!==e&&"@id"!==e&&"@index"!==e&&"@set"!==e)))throw new i("Invalid JSON-LD syntax; @context @container with @graph must have no other values other than @id, @index, and @set","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else a&=r.length<=(u?2:1);if(r.includes("@type")&&(p["@type"]=p["@type"]||"@id",!["@id","@vocab"].includes(p["@type"])))throw new i("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else a&=!o(f["@container"]),a&=r.length<=1;if(a&=r.every((e=>n.includes(e))),a&=!(u&&r.includes("@list")),!a)throw new i("Invalid JSON-LD syntax; @context @container value must be one of the following: "+n.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:t});if(p.reverse&&!r.every((e=>["@index","@set"].includes(e))))throw new i("Invalid JSON-LD syntax; @context @container value for a @reverse type definition must be @index or @set.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});p["@container"]=r}if("@index"in f){if(!("@container"in f)||!p["@container"].includes("@index"))throw new i(`Invalid JSON-LD syntax; @index without @index in @container: "${f["@index"]}" on term "${r}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});if(!s(f["@index"])||0===f["@index"].indexOf("@"))throw new i(`Invalid JSON-LD syntax; @index must expand to an IRI: "${f["@index"]}" on term "${r}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});p["@index"]=f["@index"]}if("@context"in f&&(p["@context"]=f["@context"]),"@language"in f&&!("@type"in f)){let e=f["@language"];if(null!==e&&!s(e))throw new i("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:t});null!==e&&(e=e.toLowerCase()),p["@language"]=e}if("@prefix"in f){if(r.match(/:|\//))throw new i("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:t});if(g.isKeyword(p["@id"]))throw new i("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:t});if("boolean"!=typeof f["@prefix"])throw new i("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:t});p._prefix=!0===f["@prefix"]}if("@direction"in f){const e=f["@direction"];if(null!==e&&"ltr"!==e&&"rtl"!==e)throw new i('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:t});p["@direction"]=e}if("@nest"in f){const e=f["@nest"];if(!s(e)||"@nest"!==e&&0===e.indexOf("@"))throw new i("Invalid JSON-LD syntax; @context @nest value must be a string which is not a keyword other than @nest.","jsonld.SyntaxError",{code:"invalid @nest value",context:t});p["@nest"]=e}
|
|
2
|
-
// disallow aliasing @context and @preserve
|
|
3
|
-
const w=p["@id"];if("@context"===w||"@preserve"===w)throw new i("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:t});if(h&&h.protected&&!l&&(e.protected[r]=!0,p.protected=!0,!function e(t,r){if(!t||"object"!=typeof t||!r||"object"!=typeof r)return t===r;const n=Array.isArray(t);if(n!==Array.isArray(r))return!1;if(n){if(t.length!==r.length)return!1;for(let n=0;n<t.length;++n)if(!e(t[n],r[n]))return!1;return!0}const i=Object.keys(t),o=Object.keys(r);if(i.length!==o.length)return!1;for(const n in t){let i=t[n],o=r[n];if("@container"===n&&Array.isArray(i)&&Array.isArray(o)&&(i=i.slice().sort(),o=o.slice().sort()),!e(i,o))return!1}return!0}(h,p))){const e=u&&u.protectedMode||"error";if("error"===e)throw new i(`Invalid JSON-LD syntax; tried to redefine "${r}" which is a protected term.`,"jsonld.SyntaxError",{code:"protected term redefinition",context:t,term:r});if("warn"===e)return void console.warn("WARNING: protected term redefinition",{term:r});throw new i("Invalid protectedMode.","jsonld.SyntaxError",{code:"invalid protected mode",context:t,term:r,protectedMode:e})}},g.expandIri=(e,t,r,n)=>y(e,t,r,void 0,void 0,n),g.getInitialContext=e=>{const t=JSON.stringify({processingMode:e.processingMode}),r=p.get(t);if(r)return r;const i={processingMode:e.processingMode,mappings:new Map,inverse:null,getInverse:function(){const e=this;if(e.inverse)return e.inverse;const t=e.inverse={},r=e.fastCurieMap={},n={},i=(e["@language"]||"@none").toLowerCase(),s=e["@direction"],u=e.mappings,c=[...u.keys()].sort(d);for(const e of c){const o=u.get(e);if(null===o)continue;let c=o["@container"]||"@none";if(c=[].concat(c).sort().join(""),null===o["@id"])continue;const l=h(o["@id"]);for(const u of l){let l=t[u];const f=g.isKeyword(u);if(l)f||o._termHasColon||n[u].push(e);else if(t[u]=l={},!f&&!o._termHasColon){n[u]=[e];const t={iri:u,terms:n[u]};u[0]in r?r[u[0]].push(t):r[u[0]]=[t]}if(l[c]||(l[c]={"@language":{},"@type":{},"@any":{}}),l=l[c],a(e,l["@any"],"@none"),o.reverse)a(e,l["@type"],"@reverse");else if("@none"===o["@type"])a(e,l["@any"],"@none"),a(e,l["@language"],"@none"),a(e,l["@type"],"@none");else if("@type"in o)a(e,l["@type"],o["@type"]);else if("@language"in o&&"@direction"in o){const t=o["@language"],r=o["@direction"];a(e,l["@language"],t&&r?`${t}_${r}`.toLowerCase():t?t.toLowerCase():r?"_"+r:"@null")}else"@language"in o?a(e,l["@language"],(o["@language"]||"@null").toLowerCase()):"@direction"in o?o["@direction"]?a(e,l["@language"],"_"+o["@direction"]):a(e,l["@language"],"@none"):s?(a(e,l["@language"],"_"+s),a(e,l["@language"],"@none"),a(e,l["@type"],"@none")):(a(e,l["@language"],i),a(e,l["@language"],"@none"),a(e,l["@type"],"@none"))}}for(const e in r)o(r,e,1);return t},clone:function(){const e={};return e.mappings=n.clone(this.mappings),e.clone=this.clone,e.inverse=null,e.getInverse=this.getInverse,e.protected=n.clone(this.protected),this.previousContext&&(e.previousContext=this.previousContext.clone()),e.revertToPreviousContext=this.revertToPreviousContext,"@base"in this&&(e["@base"]=this["@base"]),"@language"in this&&(e["@language"]=this["@language"]),"@vocab"in this&&(e["@vocab"]=this["@vocab"]),e},revertToPreviousContext:function(){return this.previousContext?this.previousContext.clone():this},protected:{}};return 1e4===p.size&&p.clear(),p.set(t,i),i;function o(e,t,r){const n=e[t],i=e[t]={};let a,s;for(const e of n)a=e.iri,s=r>=a.length?"":a[r],s in i?i[s].push(e):i[s]=[e];for(const e in i)""!==e&&o(i,e,r+1)}function a(e,t,r){t.hasOwnProperty(r)||(t[r]=e)}},g.getContextValue=(e,t,r)=>{if(null===t){if("@context"===r)return;return null}if(e.mappings.has(t)){const n=e.mappings.get(t);if(u(r))return n;if(n.hasOwnProperty(r))return n[r]}return"@language"===r&&r in e||"@direction"===r&&r in e?e[r]:"@context"!==r?null:void 0},g.processingMode=(e,t)=>t.toString()>="1.1"?!e.processingMode||e.processingMode>="json-ld-"+t.toString():"json-ld-1.0"===e.processingMode,g.isKeyword=e=>{if(!s(e)||"@"!==e[0])return!1;switch(e){case"@base":case"@container":case"@context":case"@default":case"@direction":case"@embed":case"@explicit":case"@graph":case"@id":case"@included":case"@index":case"@json":case"@language":case"@list":case"@nest":case"@none":case"@omitDefault":case"@prefix":case"@preserve":case"@protected":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@version":case"@vocab":return!0}return!1}},function(e,t,r){
|
|
4
|
-
/**
|
|
5
|
-
* A JavaScript implementation of the JSON-LD API.
|
|
6
|
-
*
|
|
7
|
-
* @author Dave Longley
|
|
8
|
-
*
|
|
9
|
-
* @license BSD 3-Clause License
|
|
10
|
-
* Copyright (c) 2011-2019 Digital Bazaar, Inc.
|
|
11
|
-
* All rights reserved.
|
|
12
|
-
*
|
|
13
|
-
* Redistribution and use in source and binary forms, with or without
|
|
14
|
-
* modification, are permitted provided that the following conditions are met:
|
|
15
|
-
*
|
|
16
|
-
* Redistributions of source code must retain the above copyright notice,
|
|
17
|
-
* this list of conditions and the following disclaimer.
|
|
18
|
-
*
|
|
19
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
20
|
-
* notice, this list of conditions and the following disclaimer in the
|
|
21
|
-
* documentation and/or other materials provided with the distribution.
|
|
22
|
-
*
|
|
23
|
-
* Neither the name of the Digital Bazaar, Inc. nor the names of its
|
|
24
|
-
* contributors may be used to endorse or promote products derived from
|
|
25
|
-
* this software without specific prior written permission.
|
|
26
|
-
*
|
|
27
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
28
|
-
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
29
|
-
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
30
|
-
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
31
|
-
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
32
|
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
|
33
|
-
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
34
|
-
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
35
|
-
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
36
|
-
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
37
|
-
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
38
|
-
*/
|
|
39
|
-
const n=r(11),i=r(30),o=r(2),a=r(32),s=o.IdentifierIssuer,u=r(3),c=r(20),l=r(36),{expand:f}=r(37),{flatten:h}=r(38),{fromRDF:d}=r(39),{toRDF:p}=r(40),{frameMergedOrDefault:v,cleanupNull:g}=r(42),{isArray:y,isObject:m,isString:b}=r(1),{isSubjectReference:w}=r(4),{expandIri:x,getInitialContext:_,process:j,processingMode:S}=r(6),{compact:I,compactIri:k}=r(43),{createNodeMap:R,createMergedNodeMap:E,mergeNodeMaps:O}=r(10),T=function(e){const t={},T=new c({max:100});function A(t,{documentLoader:r=e.documentLoader,...n}){return Object.assign({},{documentLoader:r},n,t)}return e.compact=async function(t,r,n){if(arguments.length<2)throw new TypeError("Could not compact, too few arguments.");if(null===r)throw new u("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"});if(null===t)return null;let i;(n=A(n,{base:b(t)?t:"",compactArrays:!0,compactToRelative:!0,graph:!1,skipExpansion:!1,link:!1,issuer:new s("_:b"),contextResolver:new a({sharedCache:T})})).link&&(n.skipExpansion=!0),n.compactToRelative||delete n.base,i=n.skipExpansion?t:await e.expand(t,n);const c=await e.processContext(_(n),r,n);let l=await I({activeCtx:c,element:i,options:n,compactionMap:n.compactionMap});n.compactArrays&&!n.graph&&y(l)?1===l.length?l=l[0]:0===l.length&&(l={}):n.graph&&m(l)&&(l=[l]),m(r)&&"@context"in r&&(r=r["@context"]),r=o.clone(r),y(r)||(r=[r]);const f=r;r=[];for(let e=0;e<f.length;++e)(!m(f[e])||Object.keys(f[e]).length>0)&&r.push(f[e]);const h=r.length>0;if(1===r.length&&(r=r[0]),y(l)){const e=k({activeCtx:c,iri:"@graph",relativeTo:{vocab:!0}}),t=l;l={},h&&(l["@context"]=r),l[e]=t}else if(m(l)&&h){const e=l;l={"@context":r};for(const t in e)l[t]=e[t]}return l},e.expand=async function(t,r){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");!1===(r=A(r,{keepFreeFloatingNodes:!1,contextResolver:new a({sharedCache:T})})).expansionMap&&(r.expansionMap=void 0);const n={},i=[];if("expandContext"in r){const e=o.clone(r.expandContext);m(e)&&"@context"in e?n.expandContext=e:n.expandContext={"@context":e},i.push(n.expandContext)}let s;if(b(t)){const o=await e.get(t,r);s=o.documentUrl,n.input=o.document,o.contextUrl&&(n.remoteContext={"@context":o.contextUrl},i.push(n.remoteContext))}else n.input=o.clone(t);"base"in r||(r.base=s||"");let u=_(r);for(const e of i)u=await j({activeCtx:u,localCtx:e,options:r});let c=await f({activeCtx:u,element:n.input,options:r,expansionMap:r.expansionMap});return m(c)&&"@graph"in c&&1===Object.keys(c).length?c=c["@graph"]:null===c&&(c=[]),y(c)||(c=[c]),c},e.flatten=async function(t,r,n){if(arguments.length<1)return new TypeError("Could not flatten, too few arguments.");r="function"==typeof r?null:r||null,n=A(n,{base:b(t)?t:"",contextResolver:new a({sharedCache:T})});const i=await e.expand(t,n),o=h(i);return null===r?o:(n.graph=!0,n.skipExpansion=!0,await e.compact(o,r,n))},e.frame=async function(t,r,n){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");if(n=A(n,{base:b(t)?t:"",embed:"@once",explicit:!1,requireAll:!1,omitDefault:!1,bnodesToClear:[],contextResolver:new a({sharedCache:T})}),b(r)){const t=await e.get(r,n);if(r=t.document,t.contextUrl){let e=r["@context"];e?y(e)?e.push(t.contextUrl):e=[e,t.contextUrl]:e=t.contextUrl,r["@context"]=e}}const i=r&&r["@context"]||{},o=await e.processContext(_(n),i,n);n.hasOwnProperty("omitGraph")||(n.omitGraph=S(o,1.1)),n.hasOwnProperty("pruneBlankNodeIdentifiers")||(n.pruneBlankNodeIdentifiers=S(o,1.1));const s=await e.expand(t,n),u={...n};u.isFrame=!0,u.keepFreeFloatingNodes=!0;const c=await e.expand(r,u),l=Object.keys(r).map((e=>x(o,e,{vocab:!0})));u.merged=!l.includes("@graph"),u.is11=S(o,1.1);const f=v(s,c,u);u.graph=!n.omitGraph,u.skipExpansion=!0,u.link={},u.framing=!0;let h=await e.compact(f,i,u);return u.link={},h=g(h,u),h},e.link=async function(t,r,n){const i={};return r&&(i["@context"]=r),i["@embed"]="@link",e.frame(t,i,n)},e.normalize=e.canonize=async function(t,r){if(arguments.length<1)throw new TypeError("Could not canonize, too few arguments.");if("inputFormat"in(r=A(r,{base:b(t)?t:"",algorithm:"URDNA2015",skipExpansion:!1,contextResolver:new a({sharedCache:T})}))){if("application/n-quads"!==r.inputFormat&&"application/nquads"!==r.inputFormat)throw new u("Unknown canonicalization input format.","jsonld.CanonizeError");const e=l.parse(t);return n.canonize(e,r)}const i={...r};delete i.format,i.produceGeneralizedRdf=!1;const o=await e.toRDF(t,i);return n.canonize(o,r)},e.fromRDF=async function(e,r){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");r=A(r,{format:b(e)?"application/n-quads":void 0});const{format:n}=r;let{rdfParser:i}=r;if(n){if(i=i||t[n],!i)throw new u("Unknown input format.","jsonld.UnknownFormat",{format:n})}else i=()=>e;const o=await i(e);return d(o,r)},e.toRDF=async function(t,r){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");let n;n=(r=A(r,{base:b(t)?t:"",skipExpansion:!1,contextResolver:new a({sharedCache:T})})).skipExpansion?t:await e.expand(t,r);const i=p(n,r);if(r.format){if("application/n-quads"===r.format||"application/nquads"===r.format)return l.serialize(i);throw new u("Unknown output format.","jsonld.UnknownFormat",{format:r.format})}return i},e.createNodeMap=async function(t,r){if(arguments.length<1)throw new TypeError("Could not create node map, too few arguments.");r=A(r,{base:b(t)?t:"",contextResolver:new a({sharedCache:T})});const n=await e.expand(t,r);return E(n,r)},e.merge=async function(t,r,n){if(arguments.length<1)throw new TypeError("Could not merge, too few arguments.");if(!y(t))throw new TypeError('Could not merge, "docs" must be an array.');r="function"==typeof r?null:r||null,n=A(n,{contextResolver:new a({sharedCache:T})});const i=await Promise.all(t.map((t=>{const r={...n};return e.expand(t,r)})));let u=!0;"mergeNodes"in n&&(u=n.mergeNodes);const c=n.issuer||new s("_:b"),l={"@default":{}};for(let e=0;e<i.length;++e){const t=o.relabelBlankNodes(i[e],{issuer:new s("_:b"+e+"-")}),r=u||0===e?l:{"@default":{}};if(R(t,r,"@default",c),r!==l)for(const e in r){const t=r[e];if(!(e in l)){l[e]=t;continue}const n=l[e];for(const e in t)e in n||(n[e]=t[e])}}const f=O(l),h=[],d=Object.keys(f).sort();for(let e=0;e<d.length;++e){const t=f[d[e]];w(t)||h.push(t)}return null===r?h:(n.graph=!0,n.skipExpansion=!0,await e.compact(h,r,n))},Object.defineProperty(e,"documentLoader",{get:()=>e._documentLoader,set:t=>e._documentLoader=t}),e.documentLoader=async e=>{throw new u("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:e})},e.get=async function(t,r){let n;n="function"==typeof r.documentLoader?r.documentLoader:e.documentLoader;const i=await n(t);try{if(!i.document)throw new u("No remote document found at the given URL.","jsonld.NullRemoteDocument");b(i.document)&&(i.document=JSON.parse(i.document))}catch(e){throw new u("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:e,remoteDoc:i})}return i},e.processContext=async function(e,t,r){return r=A(r,{base:"",contextResolver:new a({sharedCache:T})}),null===t?_(r):(t=o.clone(t),m(t)&&"@context"in t||(t={"@context":t}),j({activeCtx:e,localCtx:t,options:r}))},e.getContextValue=r(6).getContextValue,e.documentLoaders={},e.useDocumentLoader=function(t){if(!(t in e.documentLoaders))throw new u('Unknown document loader type: "'+t+'"',"jsonld.UnknownDocumentLoader",{type:t});e.documentLoader=e.documentLoaders[t].apply(e,Array.prototype.slice.call(arguments,1))},e.registerRDFParser=function(e,r){t[e]=r},e.unregisterRDFParser=function(e){delete t[e]},e.registerRDFParser("application/n-quads",l.parse),e.registerRDFParser("application/nquads",l.parse),e.url=r(5),e.util=o,Object.assign(e,o),e.promises=e,e.RequestQueue=r(19),e.JsonLdProcessor=r(44)(e),i.setupGlobals(e),i.setupDocumentLoaders(e),e},A=function(){return T((function(){return A()}))};T(A),e.exports=A},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){
|
|
40
|
-
/*!
|
|
41
|
-
* Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
|
|
42
|
-
*/
|
|
43
|
-
r(16);const n=self.crypto||self.msCrypto;e.exports=class{constructor(e){if(!n||!n.subtle)throw new Error("crypto.subtle not found.");if("sha256"===e)this.algorithm={name:"SHA-256"};else{if("sha1"!==e)throw new Error(`Unsupported algorithm "${e}".`);this.algorithm={name:"SHA-1"}}this._content=""}update(e){this._content+=e}async digest(){const e=(new TextEncoder).encode(this._content),t=new Uint8Array(await n.subtle.digest(this.algorithm,e));let r="";for(let e=0;e<t.length;++e)r+=t[e].toString(16).padStart(2,"0");return r}}},function(e,t,r){const{isKeyword:n}=r(6),i=r(4),o=r(1),a=r(2),s=r(3),u={};e.exports=u,u.createMergedNodeMap=(e,t)=>{const r=(t=t||{}).issuer||new a.IdentifierIssuer("_:b"),n={"@default":{}};return u.createNodeMap(e,n,"@default",r),u.mergeNodeMaps(n)},u.createNodeMap=(e,t,r,c,l,f)=>{if(o.isArray(e)){for(const n of e)u.createNodeMap(n,t,r,c,void 0,f);return}if(!o.isObject(e))return void(f&&f.push(e));if(i.isValue(e)){if("@type"in e){let t=e["@type"];0===t.indexOf("_:")&&(e["@type"]=t=c.getId(t))}return void(f&&f.push(e))}if(f&&i.isList(e)){const n=[];return u.createNodeMap(e["@list"],t,r,c,l,n),void f.push({"@list":n})}if("@type"in e){const t=e["@type"];for(const e of t)0===e.indexOf("_:")&&c.getId(e)}o.isUndefined(l)&&(l=i.isBlankNode(e)?c.getId(e["@id"]):e["@id"]),f&&f.push({"@id":l});const h=t[r],d=h[l]=h[l]||{};d["@id"]=l;const p=Object.keys(e).sort();for(let o of p){if("@id"===o)continue;if("@reverse"===o){const n={"@id":l},o=e["@reverse"];for(const e in o){const s=o[e];for(const o of s){let s=o["@id"];i.isBlankNode(o)&&(s=c.getId(s)),u.createNodeMap(o,t,r,c,s),a.addValue(h[s],e,n,{propertyIsArray:!0,allowDuplicate:!1})}}continue}if("@graph"===o){l in t||(t[l]={}),u.createNodeMap(e[o],t,l,c);continue}if("@included"===o){u.createNodeMap(e[o],t,r,c);continue}if("@type"!==o&&n(o)){if("@index"===o&&o in d&&(e[o]!==d[o]||e[o]["@id"]!==d[o]["@id"]))throw new s("Invalid JSON-LD syntax; conflicting @index property detected.","jsonld.SyntaxError",{code:"conflicting indexes",subject:d});d[o]=e[o];continue}const f=e[o];if(0===o.indexOf("_:")&&(o=c.getId(o)),0!==f.length)for(let e of f)if("@type"===o&&(e=0===e.indexOf("_:")?c.getId(e):e),i.isSubject(e)||i.isSubjectReference(e)){if("@id"in e&&!e["@id"])continue;const n=i.isBlankNode(e)?c.getId(e["@id"]):e["@id"];a.addValue(d,o,{"@id":n},{propertyIsArray:!0,allowDuplicate:!1}),u.createNodeMap(e,t,r,c,n)}else if(i.isValue(e))a.addValue(d,o,e,{propertyIsArray:!0,allowDuplicate:!1});else if(i.isList(e)){const n=[];u.createNodeMap(e["@list"],t,r,c,l,n),e={"@list":n},a.addValue(d,o,e,{propertyIsArray:!0,allowDuplicate:!1})}else u.createNodeMap(e,t,r,c,l),a.addValue(d,o,e,{propertyIsArray:!0,allowDuplicate:!1});else a.addValue(d,o,[],{propertyIsArray:!0})}},u.mergeNodeMapGraphs=e=>{const t={};for(const r of Object.keys(e).sort())for(const i of Object.keys(e[r]).sort()){const o=e[r][i];i in t||(t[i]={"@id":i});const s=t[i];for(const e of Object.keys(o).sort())if(n(e)&&"@type"!==e)s[e]=a.clone(o[e]);else for(const t of o[e])a.addValue(s,e,a.clone(t),{propertyIsArray:!0,allowDuplicate:!1})}return t},u.mergeNodeMaps=e=>{const t=e["@default"],r=Object.keys(e).sort();for(const n of r){if("@default"===n)continue;const r=e[n];let o=t[n];o?"@graph"in o||(o["@graph"]=[]):t[n]=o={"@id":n,"@graph":[]};const a=o["@graph"];for(const e of Object.keys(r).sort()){const t=r[e];i.isSubjectReference(t)||a.push(t)}}return t}},function(e,t,r){e.exports=r(24)},function(e,t,r){e.exports=class e{constructor(e,t=new Map,r=0){this.prefix=e,this._existing=t,this.counter=r}clone(){const{prefix:t,_existing:r,counter:n}=this;return new e(t,new Map(r),n)}getId(e){const t=e&&this._existing.get(e);if(t)return t;const r=this.prefix+this.counter;return this.counter++,e&&this._existing.set(e,r),r}hasId(e){return this._existing.has(e)}getOldIds(){return[...this._existing.keys()]}}},function(e,t,r){
|
|
44
|
-
/*!
|
|
45
|
-
* Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
|
|
46
|
-
*/
|
|
47
|
-
const n="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",i="http://www.w3.org/2001/XMLSchema#string",o={};function a(e,t){return e.subject.termType===t.subject.termType&&e.object.termType===t.object.termType&&e.subject.value===t.subject.value&&e.predicate.value===t.predicate.value&&e.object.value===t.object.value&&("Literal"!==e.object.termType||e.object.datatype.termType===t.object.datatype.termType&&e.object.language===t.object.language&&e.object.datatype.value===t.object.datatype.value)}o.eoln=/(?:\r\n)|(?:\n)|(?:\r)/g,o.empty=new RegExp("^[ \\t]*$"),o.quad=new RegExp('^[ \\t]*(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�_0-9])(?:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀.])*(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀]))?))[ \\t]+(?:<([^:]+:[^>]*)>)[ \\t]+(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�_0-9])(?:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀.])*(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀]))?)|(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"(?:(?:\\^\\^(?:<([^:]+:[^>]*)>))|(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)))?))[ \\t]*(?:\\.|(?:(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�_0-9])(?:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀.])*(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀]))?))[ \\t]*\\.))[ \\t]*$'),e.exports=class e{static parse(e){const t=[],r={},s=e.split(o.eoln);let c=0;for(const e of s){if(c++,o.empty.test(e))continue;const s=e.match(o.quad);if(null===s)throw new Error("N-Quads parse error on line "+c+".");const l={subject:null,predicate:null,object:null,graph:null};if(void 0!==s[1]?l.subject={termType:"NamedNode",value:s[1]}:l.subject={termType:"BlankNode",value:s[2]},l.predicate={termType:"NamedNode",value:s[3]},void 0!==s[4]?l.object={termType:"NamedNode",value:s[4]}:void 0!==s[5]?l.object={termType:"BlankNode",value:s[5]}:(l.object={termType:"Literal",value:void 0,datatype:{termType:"NamedNode"}},void 0!==s[7]?l.object.datatype.value=s[7]:void 0!==s[8]?(l.object.datatype.value=n,l.object.language=s[8]):l.object.datatype.value=i,l.object.value=s[6].replace(u,(function(e,t,r,n){if(t)switch(t){case"t":return"\t";case"b":return"\b";case"n":return"\n";case"r":return"\r";case"f":return"\f";case'"':return'"';case"'":return"'";case"\\":return"\\"}if(r)return String.fromCharCode(parseInt(r,16));if(n)throw new Error("Unsupported U escape")}))),void 0!==s[9]?l.graph={termType:"NamedNode",value:s[9]}:void 0!==s[10]?l.graph={termType:"BlankNode",value:s[10]}:l.graph={termType:"DefaultGraph",value:""},l.graph.value in r){let e=!0;const n=r[l.graph.value];for(const t of n)if(a(t,l)){e=!1;break}e&&(n.push(l),t.push(l))}else r[l.graph.value]=[l],t.push(l)}return t}static serialize(t){Array.isArray(t)||(t=e.legacyDatasetToQuads(t));const r=[];for(const n of t)r.push(e.serializeQuad(n));return r.sort().join("")}static serializeQuadComponents(e,t,r,o){let a="";return"NamedNode"===e.termType?a+=`<${e.value}>`:a+=""+e.value,a+=` <${t.value}> `,"NamedNode"===r.termType?a+=`<${r.value}>`:"BlankNode"===r.termType?a+=r.value:(a+=`"${function(e){return e.replace(s,(function(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r"}}))}(r.value)}"`,r.datatype.value===n?r.language&&(a+="@"+r.language):r.datatype.value!==i&&(a+=`^^<${r.datatype.value}>`)),"NamedNode"===o.termType?a+=` <${o.value}>`:"BlankNode"===o.termType&&(a+=" "+o.value),a+=" .\n",a}static serializeQuad(t){return e.serializeQuadComponents(t.subject,t.predicate,t.object,t.graph)}static legacyDatasetToQuads(e){const t=[],r={"blank node":"BlankNode",IRI:"NamedNode",literal:"Literal"};for(const o in e)e[o].forEach((e=>{const a={};for(const t in e){const o=e[t],s={termType:r[o.type],value:o.value};"Literal"===s.termType&&(s.datatype={termType:"NamedNode"},"datatype"in o&&(s.datatype.value=o.datatype),"language"in o?("datatype"in o||(s.datatype.value=n),s.language=o.language):"datatype"in o||(s.datatype.value=i)),a[t]=s}a.graph="@default"===o?{termType:"DefaultGraph",value:""}:{termType:o.startsWith("_:")?"BlankNode":"NamedNode",value:o},t.push(a)}));return t}};const s=/["\\\n\r]/g,u=/(?:\\([tbnrf"'\\]))|(?:\\u([0-9A-Fa-f]{4}))|(?:\\U([0-9A-Fa-f]{8}))/g},function(e,t,r){const n="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i="http://www.w3.org/2001/XMLSchema#";e.exports={LINK_HEADER_REL:"http://www.w3.org/ns/json-ld#context",LINK_HEADER_CONTEXT:"http://www.w3.org/ns/json-ld#context",RDF:n,RDF_LIST:n+"List",RDF_FIRST:n+"first",RDF_REST:n+"rest",RDF_NIL:n+"nil",RDF_TYPE:n+"type",RDF_PLAIN_LITERAL:n+"PlainLiteral",RDF_XML_LITERAL:n+"XMLLiteral",RDF_JSON_LITERAL:n+"JSON",RDF_OBJECT:n+"object",RDF_LANGSTRING:n+"langString",XSD:i,XSD_BOOLEAN:i+"boolean",XSD_DOUBLE:i+"double",XSD_INTEGER:i+"integer",XSD_STRING:i+"string"}},function(e,t,r){(function(t){
|
|
48
|
-
/*!
|
|
49
|
-
* Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
|
|
50
|
-
*/
|
|
51
|
-
const n=r(12),i=r(9),o=r(17),a=r(13);function s(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}e.exports=class{constructor({createMessageDigest:e=(()=>new i("sha256")),maxDeepIterations:t=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new n("_:c14n"),this.createMessageDigest=e,this.maxDeepIterations=t,this.quads=null,this.deepIterations=null}async main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,r=[...this.blankNodeInfo.keys()];let i=0;for(const e of r)++i%100==0&&await this._yield(),await this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const o=[...t.keys()].sort(),u=[];for(const e of o){const r=t.get(e);if(r.length>1){u.push(r);continue}const n=r[0];this.canonicalIssuer.getId(n)}for(const e of u){const t=[];for(const r of e){if(this.canonicalIssuer.hasId(r))continue;const e=new n("_:b");e.getId(r);const i=await this.hashNDegreeQuads(r,e);t.push(i)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const c=[];for(const e of this.quads){const t=a.serializeQuadComponents(this._componentWithCanonicalId(e.subject),e.predicate,this._componentWithCanonicalId(e.object),this._componentWithCanonicalId(e.graph));c.push(t)}return c.sort(),c.join("")}async hashFirstDegreeQuads(e){const t=[],r=this.blankNodeInfo.get(e),n=r.quads;for(const r of n){const n={subject:null,predicate:r.predicate,object:null,graph:null};n.subject=this.modifyFirstDegreeComponent(e,r.subject,"subject"),n.object=this.modifyFirstDegreeComponent(e,r.object,"object"),n.graph=this.modifyFirstDegreeComponent(e,r.graph,"graph"),t.push(a.serializeQuad(n))}t.sort();const i=this.createMessageDigest();for(const e of t)i.update(e);return r.hash=await i.digest(),r.hash}async hashRelatedBlankNode(e,t,r,n){let i;i=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):r.hasId(e)?r.getId(e):this.blankNodeInfo.get(e).hash;const o=this.createMessageDigest();return o.update(n),"g"!==n&&o.update(this.getRelatedPredicate(t)),o.update(i),o.digest()}async hashNDegreeQuads(e,t){const r=this.deepIterations.get(e)||0;if(r>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,r+1);const n=this.createMessageDigest(),i=await this.createHashToRelated(e,t),a=[...i.keys()].sort();for(const e of a){n.update(e);let r,a="";const s=new o(i.get(e));let u=0;for(;s.hasNext();){const e=s.next();++u%3==0&&await this._yield();let n=t.clone(),i="";const o=[];let c=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?i+=this.canonicalIssuer.getId(t):(n.hasId(t)||o.push(t),i+=n.getId(t)),0!==a.length&&i>a){c=!0;break}if(!c){for(const e of o){const t=await this.hashNDegreeQuads(e,n);if(i+=n.getId(e),i+=`<${t.hash}>`,n=t.issuer,0!==a.length&&i>a){c=!0;break}}c||(0===a.length||i<a)&&(a=i,r=n)}}n.update(a),t=r}return{hash:await n.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){return"BlankNode"!==t.termType?t:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}async createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;let i=0;for(const o of n)++i%100==0&&await this._yield(),await Promise.all([this._addRelatedBlankNodeHash({quad:o,component:o.subject,position:"s",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:o,component:o.object,position:"o",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:o,component:o.graph,position:"g",id:e,issuer:t,hashToRelated:r})]);return r}async _hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const r=await this.hashFirstDegreeQuads(e),n=t.get(r);n?n.push(e):t.set(r,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const r=t.value,n=this.blankNodeInfo.get(r);n?n.quads.add(e):this.blankNodeInfo.set(r,{quads:new Set([e]),hash:null})}async _addRelatedBlankNodeHash({quad:e,component:t,position:r,id:n,issuer:i,hashToRelated:o}){if("BlankNode"!==t.termType||t.value===n)return;const a=t.value,s=await this.hashRelatedBlankNode(a,e,i,r),u=o.get(s);u?u.push(a):o.set(s,[a])}_componentWithCanonicalId(e){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}async _yield(){return new Promise((e=>t(e)))}}}).call(this,r(25).setImmediate)},function(e,t,r){(function(e,t){!function(e,r){if(!e.setImmediate){var n,i,o,a,s,u=1,c={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){p(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){o.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,n=function(e){var t=f.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(p,0,e)},h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var i={callback:e,args:t};return c[u]=i,n(u),u++},h.clearImmediate=d}function d(e){delete c[e]}function p(e){if(l)setTimeout(p,0,e);else{var t=c[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{d(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(8),r(26))},function(e,t,r){
|
|
52
|
-
/*!
|
|
53
|
-
* Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
|
|
54
|
-
*/
|
|
55
|
-
e.exports=class{constructor(e){this.current=e.sort(),this.done=!1,this.dir=new Map;for(let t=0;t<e.length;++t)this.dir.set(e[t],!0)}hasNext(){return!this.done}next(){const{current:e,dir:t}=this,r=e.slice();let n=null,i=0;const o=e.length;for(let r=0;r<o;++r){const a=e[r],s=t.get(a);(null===n||a>n)&&(s&&r>0&&a>e[r-1]||!s&&r<o-1&&a>e[r+1])&&(n=a,i=r)}if(null===n)this.done=!0;else{const r=t.get(n)?i-1:i+1;e[i]=e[r],e[r]=n;for(const r of e)r>n&&t.set(r,!t.get(r))}return r}}},function(e,t,r){
|
|
56
|
-
/*!
|
|
57
|
-
* Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
|
|
58
|
-
*/
|
|
59
|
-
const n=r(12),i=r(9),o=r(17),a=r(13);function s(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}e.exports=class{constructor({createMessageDigest:e=(()=>new i("sha256")),maxDeepIterations:t=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new n("_:c14n"),this.createMessageDigest=e,this.maxDeepIterations=t,this.quads=null,this.deepIterations=null}main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,r=[...this.blankNodeInfo.keys()];for(const e of r)this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const i=[...t.keys()].sort(),o=[];for(const e of i){const r=t.get(e);if(r.length>1){o.push(r);continue}const n=r[0];this.canonicalIssuer.getId(n)}for(const e of o){const t=[];for(const r of e){if(this.canonicalIssuer.hasId(r))continue;const e=new n("_:b");e.getId(r);const i=this.hashNDegreeQuads(r,e);t.push(i)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const u=[];for(const e of this.quads){const t=a.serializeQuadComponents(this._componentWithCanonicalId({component:e.subject}),e.predicate,this._componentWithCanonicalId({component:e.object}),this._componentWithCanonicalId({component:e.graph}));u.push(t)}return u.sort(),u.join("")}hashFirstDegreeQuads(e){const t=[],r=this.blankNodeInfo.get(e),n=r.quads;for(const r of n){const n={subject:null,predicate:r.predicate,object:null,graph:null};n.subject=this.modifyFirstDegreeComponent(e,r.subject,"subject"),n.object=this.modifyFirstDegreeComponent(e,r.object,"object"),n.graph=this.modifyFirstDegreeComponent(e,r.graph,"graph"),t.push(a.serializeQuad(n))}t.sort();const i=this.createMessageDigest();for(const e of t)i.update(e);return r.hash=i.digest(),r.hash}hashRelatedBlankNode(e,t,r,n){let i;i=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):r.hasId(e)?r.getId(e):this.blankNodeInfo.get(e).hash;const o=this.createMessageDigest();return o.update(n),"g"!==n&&o.update(this.getRelatedPredicate(t)),o.update(i),o.digest()}hashNDegreeQuads(e,t){const r=this.deepIterations.get(e)||0;if(r>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,r+1);const n=this.createMessageDigest(),i=this.createHashToRelated(e,t),a=[...i.keys()].sort();for(const e of a){n.update(e);let r,a="";const s=new o(i.get(e));for(;s.hasNext();){const e=s.next();let n=t.clone(),i="";const o=[];let u=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?i+=this.canonicalIssuer.getId(t):(n.hasId(t)||o.push(t),i+=n.getId(t)),0!==a.length&&i>a){u=!0;break}if(!u){for(const e of o){const t=this.hashNDegreeQuads(e,n);if(i+=n.getId(e),i+=`<${t.hash}>`,n=t.issuer,0!==a.length&&i>a){u=!0;break}}u||(0===a.length||i<a)&&(a=i,r=n)}}n.update(a),t=r}return{hash:n.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){return"BlankNode"!==t.termType?t:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;for(const i of n)this._addRelatedBlankNodeHash({quad:i,component:i.subject,position:"s",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:i,component:i.object,position:"o",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:i,component:i.graph,position:"g",id:e,issuer:t,hashToRelated:r});return r}_hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const r=this.hashFirstDegreeQuads(e),n=t.get(r);n?n.push(e):t.set(r,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const r=t.value,n=this.blankNodeInfo.get(r);n?n.quads.add(e):this.blankNodeInfo.set(r,{quads:new Set([e]),hash:null})}_addRelatedBlankNodeHash({quad:e,component:t,position:r,id:n,issuer:i,hashToRelated:o}){if("BlankNode"!==t.termType||t.value===n)return;const a=t.value,s=this.hashRelatedBlankNode(a,e,i,r),u=o.get(s);u?u.push(a):o.set(s,[a])}_componentWithCanonicalId({component:e}){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}}},function(e,t,r){e.exports=class{constructor(){this._requests={}}wrapLoader(e){const t=this;return t._loader=e,function(){return t.add.apply(t,arguments)}}async add(e){let t=this._requests[e];if(t)return Promise.resolve(t);t=this._requests[e]=this._loader(e);try{return await t}finally{delete this._requests[e]}}}},function(e,t,r){const n=r(34),i=Symbol("max"),o=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),d=Symbol("updateAgeOnGet"),p=()=>1,v=(e,t,r)=>{const n=e[h].get(t);if(n){const t=n.value;if(g(e,t)){if(m(e,n),!e[s])return}else r&&(e[d]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[u]&&r>e[u]},y=e=>{if(e[o]>e[i])for(let t=e[f].tail;e[o]>e[i]&&null!==t;){const r=t.prev;m(e,t),t=r}},m=(e,t)=>{if(t){const r=t.value;e[c]&&e[c](r.key,r.value),e[o]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}};class b{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const w=(e,t,r,n)=>{let i=r.value;g(e,i)&&(m(e,r),e[s]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||p;if(this[a]="function"!=typeof t?p:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[d]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,y(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,y(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[a]&&(this[a]=e,this[o]=0,this[f].forEach((e=>{e.length=this[a](e.value,e.key),this[o]+=e.length}))),y(this)}get lengthCalculator(){return this[a]}get length(){return this[o]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;null!==r;){const n=r.prev;w(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;null!==r;){const n=r.next;w(this,e,r,t),r=n}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){this[c]&&this[f]&&this[f].length&&this[f].forEach((e=>this[c](e.key,e.value))),this[h]=new Map,this[f]=new n,this[o]=0}dump(){return this[f].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,r){if((r=r||this[u])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,s=this[a](t,e);if(this[h].has(e)){if(s>this[i])return m(this,this[h].get(e)),!1;const a=this[h].get(e).value;return this[c]&&(this[l]||this[c](e,a.value)),a.now=n,a.maxAge=r,a.value=t,this[o]+=s-a.length,a.length=s,this.get(e),y(this),!0}const d=new b(e,t,s,n,r);return d.length>this[i]?(this[c]&&this[c](e,t),!1):(this[o]+=d.length,this[f].unshift(d),this[h].set(e,this[f].head),y(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!g(this,t)}get(e){return v(this,e,!0)}peek(e){return v(this,e,!1)}pop(){const e=this[f].tail;return e?(m(this,e),e.value):null}del(e){m(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[h].forEach(((e,t)=>v(this,t,!1)))}}},function(e,t,r){(function(e){r.d(t,"a",(function(){return h}));var n=r(0),i=r(22),o=r.n(i);const{xsd:a}=n.a,s=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,u={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},c=/[\x00-\x20<>\\"\{\}\|\^\`]/,l={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},f=/$0^/;class h{constructor(e){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._keyword=/^@[a-z]+(?=[\s#<:])/i,this._sparqlKeyword=/^(?:PREFIX|BASE|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,e=e||{},this._lineMode=!!e.lineMode){this._n3Mode=!1;for(const e in this)!(e in l)&&this[e]instanceof RegExp&&(this[e]=f)}else this._n3Mode=!1!==e.n3;this._comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,t){let r=this._input;const n=this._comments;for(;;){let o,s;for(;o=this._newline.exec(r);)n&&(s=this._comment.exec(o[0]))&&e(null,{line:this._line,type:"comment",value:s[1],prefix:""}),r=r.substr(o[0].length,r.length),this._line++;if(!o&&(o=this._whitespace.exec(r))&&(r=r.substr(o[0].length,r.length)),this._endOfFile.test(r))return t&&(n&&(s=this._comment.exec(r))&&e(null,{line:this._line,type:"comment",value:s[1],prefix:""}),e(r=null,{line:this._line,type:"eof",value:"",prefix:""})),this._input=r;const u=this._line,l=r[0];let f="",h="",d="",p=null,v=0,g=!1;switch(l){case"^":if(r.length<3)break;if("^"!==r[1]){this._n3Mode&&(v=1,f="^");break}if(this._previousMarker="^^",r=r.substr(2),"<"!==r[0]){g=!0;break}case"<":if(p=this._unescapedIri.exec(r))f="IRI",h=p[1];else if(p=this._iri.exec(r)){if(h=this._unescape(p[1]),null===h||c.test(h))return i(this);f="IRI"}else r.length>1&&"<"===r[1]?(f="<<",v=2):this._n3Mode&&r.length>1&&"="===r[1]&&(f="inverse",v=2,h=">");break;case">":r.length>1&&">"===r[1]&&(f=">>",v=2);break;case"_":((p=this._blank.exec(r))||t&&(p=this._blank.exec(r+" ")))&&(f="blank",d="_",h=p[1]);break;case'"':if(p=this._simpleQuotedString.exec(r))h=p[1];else if(({value:h,matchLength:v}=this._parseLiteral(r)),null===h)return i(this);null===p&&0===v||(f="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(p=this._simpleApostropheString.exec(r))h=p[1];else if(({value:h,matchLength:v}=this._parseLiteral(r)),null===h)return i(this);null===p&&0===v||(f="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(p=this._variable.exec(r))&&(f="var",h=p[0]);break;case"@":"literal"===this._previousMarker&&(p=this._langcode.exec(r))?(f="langcode",h=p[1]):(p=this._keyword.exec(r))&&(f=p[0]);break;case".":if(1===r.length?t:r[1]<"0"||r[1]>"9"){f=".",v=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(p=this._number.exec(r)||t&&(p=this._number.exec(r+" ")))&&(f="literal",h=p[0],d="string"==typeof p[1]?a.double:"string"==typeof p[2]?a.decimal:a.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(p=this._sparqlKeyword.exec(r))?f=p[0].toUpperCase():g=!0;break;case"f":case"t":(p=this._boolean.exec(r))?(f="literal",h=p[0],d=a.boolean):g=!0;break;case"a":(p=this._shortPredicates.exec(r))?(f="abbreviation",h="a"):g=!0;break;case"=":this._n3Mode&&r.length>1&&(f="abbreviation",">"!==r[1]?(v=1,h="="):(v=2,h=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"{":case"}":this._lineMode||(v=1,f=l);break;default:g=!0}if(g&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(p=this._prefix.exec(r))?((p=this._prefixed.exec(r))||t&&(p=this._prefixed.exec(r+" ")))&&(f="prefixed",d=p[1]||"",h=this._unescape(p[2])):(f="prefix",h=p[1]||"")),"^^"===this._previousMarker)switch(f){case"prefixed":f="type";break;case"IRI":f="typeIRI";break;default:f=""}if(!f)return t||!/^'''|^"""/.test(r)&&/\n|\r/.test(r)?i(this):this._input=r;const y={line:u,type:f,value:h,prefix:d};e(null,y),this.previousToken=y,this._previousMarker=f,r=r.substr(v||p[0].length,r.length)}function i(t){e(t._syntaxError(/^\S*/.exec(r)[0]))}}_unescape(e){let t=!1;const r=e.replace(s,((e,r,n,i)=>{if("string"==typeof r)return String.fromCharCode(Number.parseInt(r,16));if("string"==typeof n){let e=Number.parseInt(n,16);return e<=65535?String.fromCharCode(Number.parseInt(n,16)):String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e))}return i in u?u[i]:(t=!0,"")}));return t?null:r}_parseLiteral(e){if(e.length>=3){const t=e.match(/^(?:"""|"|'''|'|)/)[0],r=t.length;let n=Math.max(this._literalClosingPos,r);for(;(n=e.indexOf(t,n))>0;){let t=0;for(;"\\"===e[n-t-1];)t++;if(t%2==0){const t=e.substring(r,n),i=t.split(/\r\n|\r|\n/).length-1,o=n+r;if(1===r&&0!==i||3===r&&this._lineMode)break;return this._line+=i,{value:this._unescape(t),matchLength:o}}n++}this._literalClosingPos=e.length-r+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const t=new Error(`Unexpected "${e}" on line ${this._line}.`);return t.context={token:void 0,line:this._line,previousToken:this.previousToken},t}tokenize(t,r){if(this._line=1,"string"==typeof t){if(this._input=t,"function"!=typeof r){const e=[];let t;if(this._tokenizeToEnd(((r,n)=>r?t=r:e.push(n)),!0),t)throw t;return e}o()((()=>this._tokenizeToEnd(r,!0)))}else this._input="",this._pendingBuffer=null,"function"==typeof t.setEncoding&&t.setEncoding("utf8"),t.on("data",(t=>{null!==this._input&&0!==t.length&&(this._pendingBuffer&&(t=e.concat([this._pendingBuffer,t]),this._pendingBuffer=null),128&t[t.length-1]?this._pendingBuffer=t:(this._input+=t,this._tokenizeToEnd(r,!1)))})),t.on("end",(()=>{null!==this._input&&this._tokenizeToEnd(r,!0)})),t.on("error",r)}}}).call(this,r(45).Buffer)},function(e,t,r){(function(t){/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
60
|
-
let r;e.exports="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:t):e=>(r||(r=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)))}).call(this,r(8))},,function(e,t,r){const n=r(15),i=r(27),o=r(18),a=r(28);let s;try{s=r(29)}catch(e){}t.NQuads=r(13),t.IdentifierIssuer=r(12),t._rdfCanonizeNative=function(e){return e&&(s=e),s},t.canonize=async function(e,r){if(Array.isArray(e)||(e=t.NQuads.legacyDatasetToQuads(e)),r.useNative){if(!s)throw new Error("rdf-canonize-native not available");if(r.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return new Promise(((t,n)=>s.canonize(e,r,((e,r)=>e?n(e):t(r)))))}if("URDNA2015"===r.algorithm)return new n(r).main(e);if("URGNA2012"===r.algorithm){if(r.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new i(r).main(e)}if(!("algorithm"in r))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+r.algorithm)},t._canonizeSync=function(e,r){if(Array.isArray(e)||(e=t.NQuads.legacyDatasetToQuads(e)),r.useNative){if(!s)throw new Error("rdf-canonize-native not available");if(r.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return s.canonizeSync(e,r)}if("URDNA2015"===r.algorithm)return new o(r).main(e);if("URGNA2012"===r.algorithm){if(r.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new a(r).main(e)}if(!("algorithm"in r))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+r.algorithm)}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(16),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(8))},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=s(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function v(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new p(e,t)),1!==c.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){
|
|
61
|
-
/*!
|
|
62
|
-
* Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
|
|
63
|
-
*/
|
|
64
|
-
const n=r(9),i=r(15);e.exports=class extends i{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,r){return"BlankNode"!==t.termType?t:"graph"===r?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}async createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;let i=0;for(const o of n){let n,a;if("BlankNode"===o.subject.termType&&o.subject.value!==e)a=o.subject.value,n="p";else{if("BlankNode"!==o.object.termType||o.object.value===e)continue;a=o.object.value,n="r"}++i%100==0&&await this._yield();const s=await this.hashRelatedBlankNode(a,o,t,n),u=r.get(s);u?u.push(a):r.set(s,[a])}return r}}},function(e,t,r){
|
|
65
|
-
/*!
|
|
66
|
-
* Copyright (c) 2016-2021 Digital Bazaar, Inc. All rights reserved.
|
|
67
|
-
*/
|
|
68
|
-
const n=r(9),i=r(18);e.exports=class extends i{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,r){return"BlankNode"!==t.termType?t:"graph"===r?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;for(const i of n){let n,o;if("BlankNode"===i.subject.termType&&i.subject.value!==e)o=i.subject.value,n="p";else{if("BlankNode"!==i.object.termType||i.object.value===e)continue;o=i.object.value,n="r"}const a=this.hashRelatedBlankNode(o,i,t,n),s=r.get(a);s?s.push(o):r.set(a,[o])}return r}}},function(e,t){},function(e,t,r){const n=r(31),i={};e.exports=i,i.setupDocumentLoaders=function(e){"undefined"!=typeof XMLHttpRequest&&(e.documentLoaders.xhr=n,e.useDocumentLoader("xhr"))},i.setupGlobals=function(e){void 0===globalThis.JsonLdProcessor&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e.JsonLdProcessor})}},function(e,t,r){const{parseLinkHeader:n,buildHeaders:i}=r(2),{LINK_HEADER_CONTEXT:o}=r(14),a=r(3),s=r(19),{prependBase:u}=r(5),c=/(^|(\r\n))link:/i;e.exports=({secure:e,headers:t={},xhr:r}={headers:{}})=>(t=i(t),(new s).wrapLoader((async function i(s){if(0!==s.indexOf("http:")&&0!==s.indexOf("https:"))throw new a('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:s});if(e&&0!==s.indexOf("https"))throw new a('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:s});let l;try{l=await function(e,t,r){const n=new(e=e||XMLHttpRequest);return new Promise(((e,i)=>{n.onload=()=>e(n),n.onerror=e=>i(e),n.open("GET",t,!0);for(const e in r)n.setRequestHeader(e,r[e]);n.send()}))}(r,s,t)}catch(e){throw new a("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:s,cause:e})}if(l.status>=400)throw new a("URL could not be dereferenced: "+l.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:s,httpStatusCode:l.status});let f={contextUrl:null,documentUrl:s,document:l.response},h=null;const d=l.getResponseHeader("Content-Type");let p;if(c.test(l.getAllResponseHeaders())&&(p=l.getResponseHeader("Link")),p&&"application/ld+json"!==d){const e=n(p),t=e[o];if(Array.isArray(t))throw new a("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:s});t&&(f.contextUrl=t.target),h=e.alternate,h&&"application/ld+json"==h.type&&!(d||"").match(/^application\/(\w*\+)?json$/)&&(f=await i(u(s,h.target)))}return f})))},function(e,t,r){const{isArray:n,isObject:i,isString:o}=r(1),{asArray:a}=r(2),{prependBase:s}=r(5),u=r(3),c=r(33);function l(e){throw new u("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:e})}e.exports=class{constructor({sharedCache:e}){this.perOpCache=new Map,this.sharedCache=e}async resolve({activeCtx:e,context:t,documentLoader:r,base:s,cycles:u=new Set}){t&&i(t)&&t["@context"]&&(t=t["@context"]),t=a(t);const f=[];for(const a of t){if(o(a)){let t=this._get(a);t||(t=await this._resolveRemoteContext({activeCtx:e,url:a,documentLoader:r,base:s,cycles:u})),n(t)?f.push(...t):f.push(t);continue}if(null===a){f.push(new c({document:null}));continue}i(a)||l(t);const h=JSON.stringify(a);let d=this._get(h);d||(d=new c({document:a}),this._cacheResolvedContext({key:h,resolved:d,tag:"static"})),f.push(d)}return f}_get(e){let t=this.perOpCache.get(e);if(!t){const r=this.sharedCache.get(e);r&&(t=r.get("static"),t&&this.perOpCache.set(e,t))}return t}_cacheResolvedContext({key:e,resolved:t,tag:r}){if(this.perOpCache.set(e,t),void 0!==r){let n=this.sharedCache.get(e);n||(n=new Map,this.sharedCache.set(e,n)),n.set(r,t)}return t}async _resolveRemoteContext({activeCtx:e,url:t,documentLoader:r,base:a,cycles:u}){t=s(a,t);const{context:c,remoteDoc:l}=await this._fetchContext({activeCtx:e,url:t,documentLoader:r,cycles:u});!function e({context:t,base:r}){if(!t)return;const a=t["@context"];if(o(a))t["@context"]=s(r,a);else if(n(a))for(let t=0;t<a.length;++t){const n=a[t];o(n)?a[t]=s(r,n):i(n)&&e({context:{"@context":n},base:r})}else if(i(a))for(const t in a)e({context:a[t],base:r})}({context:c,base:a=l.documentUrl||t});const f=await this.resolve({activeCtx:e,context:c,documentLoader:r,base:a,cycles:u});return this._cacheResolvedContext({key:t,resolved:f,tag:l.tag}),f}async _fetchContext({activeCtx:e,url:t,documentLoader:r,cycles:a}){if(a.size>10)throw new u("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"loading remote context failed":"context overflow",max:10});if(a.has(t))throw new u("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"recursive context inclusion":"context overflow",url:t});let s,c;a.add(t);try{c=await r(t),s=c.document||null,o(s)&&(s=JSON.parse(s))}catch(e){throw new u("Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.","jsonld.InvalidUrl",{code:"loading remote context failed",url:t,cause:e})}if(!i(s))throw new u("Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.","jsonld.InvalidUrl",{code:"invalid remote context",url:t});return s="@context"in s?{"@context":s["@context"]}:{"@context":{}},c.contextUrl&&(n(s["@context"])||(s["@context"]=[s["@context"]]),s["@context"].push(c.contextUrl)),{context:s,remoteDoc:c}}}},function(e,t,r){const n=r(20);e.exports=class{constructor({document:e}){this.document=e,this.cache=new n({max:10})}getProcessed(e){return this.cache.get(e)}setProcessed(e,t){this.cache.set(e,t)}}},function(e,t,r){function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new s(r,null,t,e):new s(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new s(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function a(e,t){e.head=new s(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function s(e,t,r,n){if(!(this instanceof s))return new s(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=s,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)a(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,o=this.head;null!==o&&n<e;n++)o=o.next;var a=[];for(n=0;o&&n<t;n++)a.push(o.value),o=this.removeNode(o);for(null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev),n=0;n<r.length;n++)o=i(this,o,r[n]);return a},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(35)(n)}catch(e){}},function(e,t,r){e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},function(e,t,r){e.exports=r(11).NQuads},function(e,t,r){const n=r(3),{isArray:i,isObject:o,isEmptyObject:a,isString:s,isUndefined:u}=r(1),{isList:c,isValue:l,isGraph:f,isSubject:h}=r(4),{expandIri:d,getContextValue:p,isKeyword:v,process:g,processingMode:y}=r(6),{isAbsolute:m}=r(5),{addValue:b,asArray:w,getValues:x,validateTypeValue:_}=r(2),j={};e.exports=j;const S=/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/;function I({activeCtx:e,activeProperty:t,value:r,options:n}){if(null==r)return null;const i=d(e,t,{vocab:!0},n);if("@id"===i)return d(e,r,{base:!0},n);if("@type"===i)return d(e,r,{vocab:!0,base:!0},n);const o=p(e,t,"@type");if(("@id"===o||"@graph"===i)&&s(r))return{"@id":d(e,r,{base:!0},n)};if("@vocab"===o&&s(r))return{"@id":d(e,r,{vocab:!0,base:!0},n)};if(v(i))return r;const a={};if(o&&!["@id","@vocab","@none"].includes(o))a["@type"]=o;else if(s(r)){const r=p(e,t,"@language");null!==r&&(a["@language"]=r);const n=p(e,t,"@direction");null!==n&&(a["@direction"]=n)}return["boolean","number","string"].includes(typeof r)||(r=r.toString()),a["@value"]=r,a}function k(e,t,r,o){const a=[],u=Object.keys(t).sort();for(const c of u){const u=d(e,c,{vocab:!0},o);let l=t[c];i(l)||(l=[l]);for(const e of l){if(null===e)continue;if(!s(e))throw new n("Invalid JSON-LD syntax; language map values must be strings.","jsonld.SyntaxError",{code:"invalid language map value",languageMap:t});const i={"@value":e};"@none"!==u&&(i["@language"]=c.toLowerCase()),r&&(i["@direction"]=r),a.push(i)}}return a}async function R({activeCtx:e,options:t,activeProperty:r,value:o,expansionMap:a,asGraph:s,indexKey:c,propertyIndex:h}){const v=[],y=Object.keys(o).sort(),m="@type"===c;for(let w of y){if(m){const r=p(e,w,"@context");u(r)||(e=await g({activeCtx:e,localCtx:r,propagate:!1,options:t}))}let y,x=o[w];i(x)||(x=[x]),x=await j.expand({activeCtx:e,activeProperty:r,element:x,options:t,insideList:!1,insideIndex:!0,expansionMap:a}),y=h?"@none"===w?"@none":I({activeCtx:e,activeProperty:c,value:w,options:t}):d(e,w,{vocab:!0},t),"@id"===c?w=d(e,w,{base:!0},t):m&&(w=y);for(let e of x){if(s&&!f(e)&&(e={"@graph":[e]}),"@type"===c)"@none"===y||(e["@type"]?e["@type"]=[w].concat(e["@type"]):e["@type"]=[w]);else{if(l(e)&&!["@language","@type","@index"].includes(c))throw new n(`Invalid JSON-LD syntax; Attempt to add illegal key to value object: "${c}".`,"jsonld.SyntaxError",{code:"invalid value object",value:e});h?"@none"!==y&&b(e,h,y,{propertyIsArray:!0,prependValue:!0}):"@none"===y||c in e||(e[c]=w)}v.push(e)}}return v}j.expand=async({activeCtx:e,activeProperty:t=null,element:r,options:f={},insideList:E=!1,insideIndex:O=!1,typeScopedContext:T=null,expansionMap:A=(()=>{})})=>{if(null==r)return null;if("@default"===t&&(f=Object.assign({},f,{isFrame:!1})),!i(r)&&!o(r)){if(!E&&(null===t||"@graph"===d(e,t,{vocab:!0},f))){const n=await A({unmappedValue:r,activeCtx:e,activeProperty:t,options:f,insideList:E});return void 0===n?null:n}return I({activeCtx:e,activeProperty:t,value:r,options:f})}if(i(r)){let n=[];const o=p(e,t,"@container")||[];E=E||o.includes("@list");for(let o=0;o<r.length;++o){let a=await j.expand({activeCtx:e,activeProperty:t,element:r[o],options:f,expansionMap:A,insideIndex:O,typeScopedContext:T});E&&i(a)&&(a={"@list":a}),null===a&&(a=await A({unmappedValue:r[o],activeCtx:e,activeProperty:t,parent:r,index:o,options:f,expandedParent:n,insideList:E}),void 0===a)||(i(a)?n=n.concat(a):n.push(a))}return n}const P=d(e,t,{vocab:!0},f),N=p(e,t,"@context");T=T||(e.previousContext?e:null);let L=Object.keys(r).sort(),C=!O;if(C&&T&&L.length<=2&&!L.includes("@context"))for(const t of L){const r=d(T,t,{vocab:!0},f);if("@value"===r){C=!1,e=T;break}if("@id"===r&&1===L.length){C=!1;break}}C&&(e=e.revertToPreviousContext()),u(N)||(e=await g({activeCtx:e,localCtx:N,propagate:!0,overrideProtected:!0,options:f})),"@context"in r&&(e=await g({activeCtx:e,localCtx:r["@context"],options:f})),T=e;let D=null;for(const t of L)if("@type"===d(e,t,{vocab:!0},f)){D=D||t;const n=r[t],i=Array.isArray(n)?n.length>1?n.slice().sort():n:[n];for(const t of i){const r=p(T,t,"@context");u(r)||(e=await g({activeCtx:e,localCtx:r,options:f,propagate:!1}))}}let M={};await async function e({activeCtx:t,activeProperty:r,expandedActiveProperty:f,element:x,expandedParent:I,options:E={},insideList:O,typeKey:T,typeScopedContext:A,expansionMap:P}){const N=Object.keys(x).sort(),L=[];let C;const D=x[T]&&"@json"===d(t,i(x[T])?x[T][0]:x[T],{vocab:!0},E);for(const e of N){let T,N=x[e];if("@context"===e)continue;let M=d(t,e,{vocab:!0},E);if((null===M||!m(M)&&!v(M))&&(M=P({unmappedProperty:e,activeCtx:t,activeProperty:r,parent:x,options:E,insideList:O,value:N,expandedParent:I}),void 0===M))continue;if(v(M)){if("@reverse"===f)throw new n("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:N});if(M in I&&"@included"!==M&&"@type"!==M)throw new n("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:M})}if("@id"===M){if(!s(N)){if(!E.isFrame)throw new n('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:N});if(o(N)){if(!a(N))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:N})}else{if(!i(N))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:N});if(!N.every((e=>s(e))))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:N})}}b(I,"@id",w(N).map((e=>s(e)?d(t,e,{base:!0},E):e)),{propertyIsArray:E.isFrame});continue}if("@type"===M){o(N)&&(N=Object.fromEntries(Object.entries(N).map((([e,t])=>[d(A,e,{vocab:!0}),w(t).map((e=>d(A,e,{base:!0,vocab:!0})))])))),_(N,E.isFrame),b(I,"@type",w(N).map((e=>s(e)?d(A,e,{base:!0,vocab:!0},E):e)),{propertyIsArray:E.isFrame});continue}if("@included"===M&&y(t,1.1)){const e=w(await j.expand({activeCtx:t,activeProperty:r,element:N,options:E,expansionMap:P}));if(!e.every((e=>h(e))))throw new n("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:N});b(I,"@included",e,{propertyIsArray:!0});continue}if("@graph"===M&&!o(N)&&!i(N))throw new n('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:N});if("@value"===M){C=N,D&&y(t,1.1)?I["@value"]=N:b(I,"@value",N,{propertyIsArray:E.isFrame});continue}if("@language"===M){if(null===N)continue;if(!s(N)&&!E.isFrame)throw new n('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:N});N=w(N).map((e=>s(e)?e.toLowerCase():e));for(const e of N)s(e)&&!e.match(S)&&console.warn("@language must be valid BCP47: "+e);b(I,"@language",N,{propertyIsArray:E.isFrame});continue}if("@direction"===M){if(!s(N)&&!E.isFrame)throw new n('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:N});N=w(N);for(const e of N)if(s(e)&&"ltr"!==e&&"rtl"!==e)throw new n('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:N});b(I,"@direction",N,{propertyIsArray:E.isFrame});continue}if("@index"===M){if(!s(N))throw new n('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:N});b(I,"@index",N);continue}if("@reverse"===M){if(!o(N))throw new n('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:N});if(T=await j.expand({activeCtx:t,activeProperty:"@reverse",element:N,options:E,expansionMap:P}),"@reverse"in T)for(const e in T["@reverse"])b(I,e,T["@reverse"][e],{propertyIsArray:!0});let e=I["@reverse"]||null;for(const t in T){if("@reverse"===t)continue;null===e&&(e=I["@reverse"]={}),b(e,t,[],{propertyIsArray:!0});const r=T[t];for(let i=0;i<r.length;++i){const o=r[i];if(l(o)||c(o))throw new n('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:T});b(e,t,o,{propertyIsArray:!0})}}continue}if("@nest"===M){L.push(e);continue}let U=t;const F=p(t,e,"@context");u(F)||(U=await g({activeCtx:t,localCtx:F,propagate:!0,overrideProtected:!0,options:E}));const B=p(U,e,"@container")||[];if(B.includes("@language")&&o(N))T=k(U,N,p(U,e,"@direction"),E);else if(B.includes("@index")&&o(N)){const r=B.includes("@graph"),n=p(U,e,"@index")||"@index",i="@index"!==n&&d(t,n,{vocab:!0},E);T=await R({activeCtx:U,options:E,activeProperty:e,value:N,expansionMap:P,asGraph:r,indexKey:n,propertyIndex:i})}else if(B.includes("@id")&&o(N)){const t=B.includes("@graph");T=await R({activeCtx:U,options:E,activeProperty:e,value:N,expansionMap:P,asGraph:t,indexKey:"@id"})}else if(B.includes("@type")&&o(N))T=await R({activeCtx:U.revertToPreviousContext(),options:E,activeProperty:e,value:N,expansionMap:P,asGraph:!1,indexKey:"@type"});else{const n="@list"===M;if(n||"@set"===M){let e=r;n&&"@graph"===f&&(e=null),T=await j.expand({activeCtx:U,activeProperty:e,element:N,options:E,insideList:n,expansionMap:P})}else T="@json"===p(t,e,"@type")?{"@type":"@json","@value":N}:await j.expand({activeCtx:U,activeProperty:e,element:N,options:E,insideList:!1,expansionMap:P})}if(null!==T||"@value"===M||(T=P({unmappedValue:N,expandedProperty:M,activeCtx:U,activeProperty:r,parent:x,options:E,insideList:O,key:e,expandedParent:I}),void 0!==T))if("@list"!==M&&!c(T)&&B.includes("@list")&&(T={"@list":w(T)}),B.includes("@graph")&&!B.some((e=>"@id"===e||"@index"===e))&&(T=w(T).map((e=>({"@graph":w(e)})))),U.mappings.has(e)&&U.mappings.get(e).reverse){const e=I["@reverse"]=I["@reverse"]||{};T=w(T);for(let t=0;t<T.length;++t){const r=T[t];if(l(r)||c(r))throw new n('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:T});b(e,M,r,{propertyIsArray:!0})}}else b(I,M,T,{propertyIsArray:!0})}if("@value"in I)if("@json"===I["@type"]&&y(t,1.1));else if((o(C)||i(C))&&!E.isFrame)throw new n('Invalid JSON-LD syntax; "@value" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid value object value",value:C});for(const a of L){const s=i(x[a])?x[a]:[x[a]];for(const i of s){if(!o(i)||Object.keys(i).some((e=>"@value"===d(t,e,{vocab:!0},E))))throw new n("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:i});await e({activeCtx:t,activeProperty:r,expandedActiveProperty:f,element:i,expandedParent:I,options:E,insideList:O,typeScopedContext:A,typeKey:T,expansionMap:P})}}}({activeCtx:e,activeProperty:t,expandedActiveProperty:P,element:r,expandedParent:M,options:f,insideList:E,typeKey:D,typeScopedContext:T,expansionMap:A}),L=Object.keys(M);let U=L.length;if("@value"in M){if("@type"in M&&("@language"in M||"@direction"in M))throw new n('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:M});let i=U-1;if("@type"in M&&(i-=1),"@index"in M&&(i-=1),"@language"in M&&(i-=1),"@direction"in M&&(i-=1),0!==i)throw new n('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:M});const o=null===M["@value"]?[]:w(M["@value"]),u=x(M,"@type");if(y(e,1.1)&&u.includes("@json")&&1===u.length);else if(0===o.length){const n=await A({unmappedValue:M,activeCtx:e,activeProperty:t,element:r,options:f,insideList:E});M=void 0!==n?n:null}else{if(!o.every((e=>s(e)||a(e)))&&"@language"in M)throw new n("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:M});if(!u.every((e=>m(e)&&!(s(e)&&0===e.indexOf("_:"))||a(e))))throw new n('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:M})}}else if("@type"in M&&!i(M["@type"]))M["@type"]=[M["@type"]];else if("@set"in M||"@list"in M){if(U>1&&(2!==U||!("@index"in M)))throw new n('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:M});"@set"in M&&(M=M["@set"],L=Object.keys(M),U=L.length)}else if(1===U&&"@language"in M){const n=await A(M,{unmappedValue:M,activeCtx:e,activeProperty:t,element:r,options:f,insideList:E});M=void 0!==n?n:null}if(o(M)&&!f.keepFreeFloatingNodes&&!E&&(null===t||"@graph"===P)&&(0===U||"@value"in M||"@list"in M||1===U&&"@id"in M)){const n=await A({unmappedValue:M,activeCtx:e,activeProperty:t,element:r,options:f,insideList:E});M=void 0!==n?n:null}return M}},function(e,t,r){const{isSubjectReference:n}=r(4),{createMergedNodeMap:i}=r(10),o={};e.exports=o,o.flatten=e=>{const t=i(e),r=[],o=Object.keys(t).sort();for(let e=0;e<o.length;++e){const i=t[o[e]];n(i)||r.push(i)}return r}},function(e,t,r){const n=r(3),i=r(4),o=r(1),a=r(2),{RDF_LIST:s,RDF_FIRST:u,RDF_REST:c,RDF_NIL:l,RDF_TYPE:f,RDF_JSON_LITERAL:h,XSD_BOOLEAN:d,XSD_DOUBLE:p,XSD_INTEGER:v,XSD_STRING:g}=r(14),y=/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/,m={};function b(e,t,r){if(e.termType.endsWith("Node"))return{"@id":e.value};const i={"@value":e.value};if(e.language)i["@language"]=e.language;else{let a=e.datatype.value;if(a||(a=g),a===h){a="@json";try{i["@value"]=JSON.parse(i["@value"])}catch(e){throw new n("JSON literal could not be parsed.","jsonld.InvalidJsonLiteral",{code:"invalid JSON literal",value:i["@value"],cause:e})}}if(t){if(a===d)"true"===i["@value"]?i["@value"]=!0:"false"===i["@value"]&&(i["@value"]=!1);else if(o.isNumeric(i["@value"]))if(a===v){const e=parseInt(i["@value"],10);e.toFixed(0)===i["@value"]&&(i["@value"]=e)}else a===p&&(i["@value"]=parseFloat(i["@value"]));[d,v,p,g].includes(a)||(i["@type"]=a)}else if("i18n-datatype"===r&&a.startsWith("https://www.w3.org/ns/i18n#")){const[,e,t]=a.split(/[#_]/);e.length>0&&(i["@language"]=e,e.match(y)||console.warn("@language must be valid BCP47: "+e)),i["@direction"]=t}else a!==g&&(i["@type"]=a)}return i}e.exports=m,m.fromRDF=async(e,{useRdfType:t=!1,useNativeTypes:r=!1,rdfDirection:n=null})=>{const h={},d={"@default":h},p={};for(const i of e){const e="DefaultGraph"===i.graph.termType?"@default":i.graph.value;e in d||(d[e]={}),"@default"===e||e in h||(h[e]={"@id":e});const o=d[e],s=i.subject.value,u=i.predicate.value,c=i.object;s in o||(o[s]={"@id":s});const v=o[s],g=c.termType.endsWith("Node");if(g&&!(c.value in o)&&(o[c.value]={"@id":c.value}),u===f&&!t&&g){a.addValue(v,"@type",c.value,{propertyIsArray:!0});continue}const y=b(c,r,n);if(a.addValue(v,u,y,{propertyIsArray:!0}),g)if(c.value===l){const e=o[c.value];"usages"in e||(e.usages=[]),e.usages.push({node:v,property:u,value:y})}else c.value in p?p[c.value]=!1:p[c.value]={node:v,property:u,value:y}}for(const e in d){const t=d[e];if(!(l in t))continue;const r=t[l];if(r.usages){for(let e of r.usages){let r=e.node,n=e.property,a=e.value;const l=[],f=[];let h=Object.keys(r).length;for(;n===c&&o.isObject(p[r["@id"]])&&o.isArray(r[u])&&1===r[u].length&&o.isArray(r[c])&&1===r[c].length&&(3===h||4===h&&o.isArray(r["@type"])&&1===r["@type"].length&&r["@type"][0]===s)&&(l.push(r[u][0]),f.push(r["@id"]),e=p[r["@id"]],r=e.node,n=e.property,a=e.value,h=Object.keys(r).length,i.isBlankNode(r)););delete a["@id"],a["@list"]=l.reverse();for(const e of f)delete t[e]}delete r.usages}}const v=[],g=Object.keys(h).sort();for(const e of g){const t=h[e];if(e in d){const r=t["@graph"]=[],n=d[e],o=Object.keys(n).sort();for(const e of o){const t=n[e];i.isSubjectReference(t)||r.push(t)}}i.isSubjectReference(t)||v.push(t)}return v}},function(e,t,r){const{createNodeMap:n}=r(10),{isKeyword:i}=r(6),o=r(4),a=r(41),s=r(1),u=r(2),{RDF_FIRST:c,RDF_REST:l,RDF_NIL:f,RDF_TYPE:h,RDF_JSON_LITERAL:d,RDF_LANGSTRING:p,XSD_BOOLEAN:v,XSD_DOUBLE:g,XSD_INTEGER:y,XSD_STRING:m}=r(14),{isAbsolute:b}=r(5),w={};function x(e,t,r,n,o){const a=Object.keys(t).sort();for(const s of a){const a=t[s],u=Object.keys(a).sort();for(let t of u){const u=a[t];if("@type"===t)t=h;else if(i(t))continue;for(const i of u){const a={termType:s.startsWith("_:")?"BlankNode":"NamedNode",value:s};if(!b(s))continue;const u={termType:t.startsWith("_:")?"BlankNode":"NamedNode",value:t};if(!b(t))continue;if("BlankNode"===u.termType&&!o.produceGeneralizedRdf)continue;const c=_(i,n,e,r,o.rdfDirection);c&&e.push({subject:a,predicate:u,object:c,graph:r})}}}}function _(e,t,r,n,i){const u={};if(o.isValue(e)){u.termType="Literal",u.value=void 0,u.datatype={termType:"NamedNode"};let t=e["@value"];const r=e["@type"]||null;if("@json"===r)u.value=a(t),u.datatype.value=d;else if(s.isBoolean(t))u.value=t.toString(),u.datatype.value=r||v;else if(s.isDouble(t)||r===g)s.isDouble(t)||(t=parseFloat(t)),u.value=t.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),u.datatype.value=r||g;else if(s.isNumber(t))u.value=t.toFixed(0),u.datatype.value=r||y;else if("i18n-datatype"===i&&"@direction"in e){const r="https://www.w3.org/ns/i18n#"+(e["@language"]||"")+"_"+e["@direction"];u.datatype.value=r,u.value=t}else"@language"in e?(u.value=t,u.datatype.value=r||p,u.language=e["@language"]):(u.value=t,u.datatype.value=r||m)}else if(o.isList(e)){const o=function(e,t,r,n,i){const o={termType:"NamedNode",value:c},a={termType:"NamedNode",value:l},s={termType:"NamedNode",value:f},u=e.pop(),h=u?{termType:"BlankNode",value:t.getId()}:s;let d=h;for(const s of e){const e=_(s,t,r,n,i),u={termType:"BlankNode",value:t.getId()};r.push({subject:d,predicate:o,object:e,graph:n}),r.push({subject:d,predicate:a,object:u,graph:n}),d=u}if(u){const e=_(u,t,r,n,i);r.push({subject:d,predicate:o,object:e,graph:n}),r.push({subject:d,predicate:a,object:s,graph:n})}return h}(e["@list"],t,r,n,i);u.termType=o.termType,u.value=o.value}else{const t=s.isObject(e)?e["@id"]:e;u.termType=t.startsWith("_:")?"BlankNode":"NamedNode",u.value=t}return"NamedNode"!==u.termType||b(u.value)?u:null}e.exports=w,w.toRDF=(e,t)=>{const r=new u.IdentifierIssuer("_:b"),i={"@default":{}};n(e,i,"@default",r);const o=[],a=Object.keys(i).sort();for(const e of a){let n;if("@default"===e)n={termType:"DefaultGraph",value:""};else{if(!b(e))continue;n=e.startsWith("_:")?{termType:"BlankNode"}:{termType:"NamedNode"},n.value=e}x(o,i[e],n,r,t)}return o}},function(e,t,r){e.exports=function e(t){return null===t||"object"!=typeof t||null!=t.toJSON?JSON.stringify(t):Array.isArray(t)?"["+t.reduce(((t,r,n)=>t+(0===n?"":",")+e(void 0===r||"symbol"==typeof r?null:r)),"")+"]":"{"+Object.keys(t).sort().reduce(((r,n,i)=>void 0===t[n]||"symbol"==typeof t[n]?r:r+(0===r.length?"":",")+e(n)+":"+e(t[n])),"")+"}"}},function(e,t,r){const{isKeyword:n}=r(6),i=r(4),o=r(1),a=r(2),s=r(5),u=r(3),{createNodeMap:c,mergeNodeMapGraphs:l}=r(10),f={};function h(e){const t={};for(const r in e)void 0!==e[r]&&(t["@"+r]=[e[r]]);return[t]}function d(e,t,r){for(let n=r.length-1;n>=0;--n){const i=r[n];if(i.graph===t&&i.subject["@id"]===e["@id"])return!0}return!1}function p(e,t,r){const n="@"+r;let i=n in e?e[n][0]:t[r];if("embed"===r)if(!0===i)i="@once";else if(!1===i)i="@never";else if("@always"!==i&&"@never"!==i&&"@link"!==i&&"@first"!==i&&"@last"!==i&&"@once"!==i)throw new u("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:e});return i}function v(e){if(!o.isArray(e)||1!==e.length||!o.isObject(e[0]))throw new u("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:e});if("@id"in e[0])for(const t of a.asArray(e[0]["@id"]))if(!o.isObject(t)&&!s.isAbsolute(t)||o.isString(t)&&0===t.indexOf("_:"))throw new u("Invalid JSON-LD syntax; invalid @id in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e});if("@type"in e[0])for(const t of a.asArray(e[0]["@type"]))if(!o.isObject(t)&&!s.isAbsolute(t)||o.isString(t)&&0===t.indexOf("_:"))throw new u("Invalid JSON-LD syntax; invalid @type in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e})}function g(e,t,r,s){let u=!0,c=!1;for(const l in r){let f=!1;const h=a.getValues(t,l),d=0===a.getValues(r,l).length;if("@id"===l){if(o.isEmptyObject(r["@id"][0]||{})?f=!0:r["@id"].length>=0&&(f=r["@id"].includes(h[0])),!s.requireAll)return f}else if("@type"===l){if(u=!1,d){if(h.length>0)return!1;f=!0}else if(1===r["@type"].length&&o.isEmptyObject(r["@type"][0]))f=h.length>0;else for(const e of r["@type"])f=!(!o.isObject(e)||!("@default"in e))||f||h.some((t=>t===e));if(!s.requireAll)return f}else{if(n(l))continue;{const t=a.getValues(r,l)[0];let n=!1;if(t&&(v([t]),n="@default"in t),u=!1,0===h.length&&n)continue;if(h.length>0&&d)return!1;if(void 0===t){if(h.length>0)return!1;f=!0}else if(i.isList(t)){const r=t["@list"][0];if(i.isList(h[0])){const t=h[0]["@list"];i.isValue(r)?f=t.some((e=>w(r,e))):(i.isSubject(r)||i.isSubjectReference(r))&&(f=t.some((t=>b(e,r,t,s))))}}else f=i.isValue(t)?h.some((e=>w(t,e))):i.isSubjectReference(t)?h.some((r=>b(e,t,r,s))):!!o.isObject(t)&&h.length>0}}if(!f&&s.requireAll)return!1;c=c||f}return u||c}function y(e,t){const r=e.uniqueEmbeds[e.graph],n=r[t],i=n.parent,s=n.property,u={"@id":t};if(o.isArray(i)){for(let e=0;e<i.length;++e)if(a.compareValues(i[e],u)){i[e]=u;break}}else{const e=o.isArray(i[s]);a.removeValue(i,s,u,{propertyIsArray:e}),a.addValue(i,s,u,{propertyIsArray:e})}const c=e=>{const t=Object.keys(r);for(const n of t)n in r&&o.isObject(r[n].parent)&&r[n].parent["@id"]===e&&(delete r[n],c(n))};c(t)}
|
|
69
|
-
/**
|
|
70
|
-
* Removes the @preserve keywords from expanded result of framing.
|
|
71
|
-
*
|
|
72
|
-
* @param input the framed, framed output.
|
|
73
|
-
* @param options the framing options used.
|
|
74
|
-
*
|
|
75
|
-
* @return the resulting output.
|
|
76
|
-
*/function m(e,t,r){o.isObject(e)?a.addValue(e,t,r,{propertyIsArray:!0}):e.push(r)}function b(e,t,r,n){if(!("@id"in r))return!1;const i=e.subjects[r["@id"]];return i&&g(e,i,t,n)}function w(e,t){const r=t["@value"],n=t["@type"],i=t["@language"],a=e["@value"]?o.isArray(e["@value"])?e["@value"]:[e["@value"]]:[],s=e["@type"]?o.isArray(e["@type"])?e["@type"]:[e["@type"]]:[],u=e["@language"]?o.isArray(e["@language"])?e["@language"]:[e["@language"]]:[];return 0===a.length&&0===s.length&&0===u.length||!(!a.includes(r)&&!o.isEmptyObject(a[0]))&&!!(!n&&0===s.length||s.includes(n)||n&&o.isEmptyObject(s[0]))&&!!(!i&&0===u.length||u.includes(i)||i&&o.isEmptyObject(u[0]))}e.exports=f,f.frameMergedOrDefault=(e,t,r)=>{const n={options:r,embedded:!1,graph:"@default",graphMap:{"@default":{}},subjectStack:[],link:{},bnodeMap:{}},s=new a.IdentifierIssuer("_:b");c(e,n.graphMap,"@default",s),r.merged&&(n.graphMap["@merged"]=l(n.graphMap),n.graph="@merged"),n.subjects=n.graphMap[n.graph];const u=[];return f.frame(n,Object.keys(n.subjects).sort(),t,u),r.pruneBlankNodeIdentifiers&&(r.bnodesToClear=Object.keys(n.bnodeMap).filter((e=>1===n.bnodeMap[e].length))),
|
|
77
|
-
// remove @preserve from results
|
|
78
|
-
r.link={},function e(t,r){if(o.isArray(t))return t.map((t=>e(t,r)));if(o.isObject(t)){
|
|
79
|
-
// remove @preserve
|
|
80
|
-
if("@preserve"in t)return t["@preserve"][0];if(i.isValue(t))return t;if(i.isList(t))return t["@list"]=e(t["@list"],r),t;if("@id"in t){const e=t["@id"];if(r.link.hasOwnProperty(e)){const n=r.link[e].indexOf(t);if(-1!==n)return r.link[e][n];r.link[e].push(t)}else r.link[e]=[t]}for(const n in t)"@id"===n&&r.bnodesToClear.includes(t[n])?delete t["@id"]:t[n]=e(t[n],r)}return t}(u,r)},f.frame=(e,t,r,s,c=null)=>{v(r),r=r[0];const l=e.options,b={embed:p(r,l,"embed"),explicit:p(r,l,"explicit"),requireAll:p(r,l,"requireAll")};e.link.hasOwnProperty(e.graph)||(e.link[e.graph]={});const x=e.link[e.graph],_=function(e,t,r,n){const i={};for(const o of t){const t=e.graphMap[e.graph][o];g(e,t,r,n)&&(i[o]=t)}return i}(e,t,r,b),j=Object.keys(_).sort();for(const v of j){const g=_[v];if(null===c?e.uniqueEmbeds={[e.graph]:{}}:e.uniqueEmbeds[e.graph]=e.uniqueEmbeds[e.graph]||{},"@link"===b.embed&&v in x){m(s,c,x[v]);continue}const j={"@id":v};if(0===v.indexOf("_:")&&a.addValue(e.bnodeMap,v,j,{propertyIsArray:!0}),x[v]=j,("@first"===b.embed||"@last"===b.embed)&&e.is11)throw new u("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:r});if(e.embedded||!e.uniqueEmbeds[e.graph].hasOwnProperty(v))if(!e.embedded||"@never"!==b.embed&&!d(g,e.graph,e.subjectStack))if(!e.embedded||"@first"!=b.embed&&"@once"!=b.embed||!e.uniqueEmbeds[e.graph].hasOwnProperty(v)){if("@last"===b.embed&&v in e.uniqueEmbeds[e.graph]&&y(e,v),e.uniqueEmbeds[e.graph][v]={parent:s,property:c},e.subjectStack.push({subject:g,graph:e.graph}),v in e.graphMap){let t=!1,n=null;"@graph"in r?(n=r["@graph"][0],t=!("@merged"===v||"@default"===v),o.isObject(n)||(n={})):(t="@merged"!==e.graph,n={}),t&&f.frame({...e,graph:v,embedded:!1},Object.keys(e.graphMap[v]).sort(),[n],j,"@graph")}"@included"in r&&f.frame({...e,embedded:!1},t,r["@included"],j,"@included");for(const t of Object.keys(g).sort())if(n(t)){if(j[t]=a.clone(g[t]),"@type"===t)for(const t of g["@type"])0===t.indexOf("_:")&&a.addValue(e.bnodeMap,t,j,{propertyIsArray:!0})}else if(!b.explicit||t in r)for(const n of g[t]){const o=t in r?r[t]:h(b);if(i.isList(n)){const o=r[t]&&r[t][0]&&r[t][0]["@list"]?r[t][0]["@list"]:h(b),s={"@list":[]};m(j,t,s);const u=n["@list"];for(const t of u)i.isSubjectReference(t)?f.frame({...e,embedded:!0},[t["@id"]],o,s,"@list"):m(s,"@list",a.clone(t))}else i.isSubjectReference(n)?f.frame({...e,embedded:!0},[n["@id"]],o,j,t):w(o[0],n)&&m(j,t,a.clone(n))}for(const e of Object.keys(r).sort()){if("@type"===e){if(!o.isObject(r[e][0])||!("@default"in r[e][0]))continue}else if(n(e))continue;const t=r[e][0]||{};if(!p(t,l,"omitDefault")&&!(e in j)){let r="@null";"@default"in t&&(r=a.clone(t["@default"])),o.isArray(r)||(r=[r]),j[e]=[{"@preserve":r}]}}for(const t of Object.keys(r["@reverse"]||{}).sort()){const n=r["@reverse"][t];for(const r of Object.keys(e.subjects))a.getValues(e.subjects[r],t).some((e=>e["@id"]===v))&&(j["@reverse"]=j["@reverse"]||{},a.addValue(j["@reverse"],t,[],{propertyIsArray:!0}),f.frame({...e,embedded:!0},[r],n,j["@reverse"][t],c))}m(s,c,j),e.subjectStack.pop()}else m(s,c,j);else m(s,c,j)}},f.cleanupNull=(e,t)=>{if(o.isArray(e))return e.map((e=>f.cleanupNull(e,t))).filter((e=>e));if("@null"===e)return null;if(o.isObject(e)){if("@id"in e){const r=e["@id"];if(t.link.hasOwnProperty(r)){const n=t.link[r].indexOf(e);if(-1!==n)return t.link[r][n];t.link[r].push(e)}else t.link[r]=[e]}for(const r in e)e[r]=f.cleanupNull(e[r],t)}return e}},function(e,t,r){const n=r(3),{isArray:i,isObject:o,isString:a,isUndefined:s}=r(1),{isList:u,isValue:c,isGraph:l,isSimpleGraph:f,isSubjectReference:h}=r(4),{expandIri:d,getContextValue:p,isKeyword:v,process:g,processingMode:y}=r(6),{removeBase:m,prependBase:b}=r(5),{addValue:w,asArray:x,compareShortestLeast:_}=r(2),j={};function S(e,t,r){if("@nest"!==d(e,t,{vocab:!0},r))throw new n("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}e.exports=j,j.compact=async({activeCtx:e,activeProperty:t=null,element:r,options:d={},compactionMap:m=(()=>{})})=>{if(i(r)){let n=[];for(let i=0;i<r.length;++i){let o=await j.compact({activeCtx:e,activeProperty:t,element:r[i],options:d,compactionMap:m});null===o&&(o=await m({unmappedValue:r[i],activeCtx:e,activeProperty:t,parent:r,index:i,options:d}),void 0===o)||n.push(o)}return d.compactArrays&&1===n.length&&0===(p(e,t,"@container")||[]).length&&(n=n[0]),n}const b=p(e,t,"@context");if(s(b)||(e=await g({activeCtx:e,localCtx:b,propagate:!0,overrideProtected:!0,options:d})),o(r)){if(d.link&&"@id"in r&&d.link.hasOwnProperty(r["@id"])){const e=d.link[r["@id"]];for(let t=0;t<e.length;++t)if(e[t].expanded===r)return e[t].compacted}if(c(r)||h(r)){const n=j.compactValue({activeCtx:e,activeProperty:t,value:r,options:d});return d.link&&h(r)&&(d.link.hasOwnProperty(r["@id"])||(d.link[r["@id"]]=[]),d.link[r["@id"]].push({expanded:r,compacted:n})),n}if(u(r)&&(p(e,t,"@container")||[]).includes("@list"))return j.compact({activeCtx:e,activeProperty:t,element:r["@list"],options:d,compactionMap:m});const b="@reverse"===t,_={},I=e;c(r)||h(r)||(e=e.revertToPreviousContext());const k=p(I,t,"@context");s(k)||(e=await g({activeCtx:e,localCtx:k,propagate:!0,overrideProtected:!0,options:d})),d.link&&"@id"in r&&(d.link.hasOwnProperty(r["@id"])||(d.link[r["@id"]]=[]),d.link[r["@id"]].push({expanded:r,compacted:_}));let R=r["@type"]||[];R.length>1&&(R=Array.from(R).sort());const E=e;for(const t of R){const r=j.compactIri({activeCtx:E,iri:t,relativeTo:{vocab:!0}}),n=p(I,r,"@context");s(n)||(e=await g({activeCtx:e,localCtx:n,options:d,propagate:!1}))}const O=Object.keys(r).sort();for(const s of O){const h=r[s];if("@id"!==s)if("@type"!==s)if("@reverse"!==s)if("@preserve"!==s)if("@index"!==s)if("@graph"!==s&&"@list"!==s&&"@included"!==s&&v(s)){const t=j.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(_,t,h)}else{if(!i(h))throw new n("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError");if(0===h.length){const t=j.compactIri({activeCtx:e,iri:s,value:h,relativeTo:{vocab:!0},reverse:b}),r=e.mappings.has(t)?e.mappings.get(t)["@nest"]:null;let n=_;r&&(S(e,r,d),o(_[r])||(_[r]={}),n=_[r]),w(n,t,h,{propertyIsArray:!0})}for(const t of h){const r=j.compactIri({activeCtx:e,iri:s,value:t,relativeTo:{vocab:!0},reverse:b}),n=e.mappings.has(r)?e.mappings.get(r)["@nest"]:null;let h=_;n&&(S(e,n,d),o(_[n])||(_[n]={}),h=_[n]);const v=p(e,r,"@container")||[],g=l(t),y=u(t);let I;y?I=t["@list"]:g&&(I=t["@graph"]);let k=await j.compact({activeCtx:e,activeProperty:r,element:y||g?I:t,options:d,compactionMap:m});if(y){if(i(k)||(k=[k]),v.includes("@list")){w(h,r,k,{valueIsArray:!0,allowDuplicate:!0});continue}k={[j.compactIri({activeCtx:e,iri:"@list",relativeTo:{vocab:!0}})]:k},"@index"in t&&(k[j.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"])}if(g)if(v.includes("@graph")&&(v.includes("@id")||v.includes("@index")&&f(t))){let n;h.hasOwnProperty(r)?n=h[r]:h[r]=n={};const i=(v.includes("@id")?t["@id"]:t["@index"])||j.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}});w(n,i,k,{propertyIsArray:!d.compactArrays||v.includes("@set")})}else v.includes("@graph")&&f(t)?(i(k)&&k.length>1&&(k={"@included":k}),w(h,r,k,{propertyIsArray:!d.compactArrays||v.includes("@set")})):(i(k)&&1===k.length&&d.compactArrays&&(k=k[0]),k={[j.compactIri({activeCtx:e,iri:"@graph",relativeTo:{vocab:!0}})]:k},"@id"in t&&(k[j.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t["@id"]),"@index"in t&&(k[j.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"]),w(h,r,k,{propertyIsArray:!d.compactArrays||v.includes("@set")}));else if(v.includes("@language")||v.includes("@index")||v.includes("@id")||v.includes("@type")){let n,i;if(h.hasOwnProperty(r)?n=h[r]:h[r]=n={},v.includes("@language"))c(k)&&(k=k["@value"]),i=t["@language"];else if(v.includes("@index")){const n=p(e,r,"@index")||"@index",o=j.compactIri({activeCtx:e,iri:n,relativeTo:{vocab:!0}});if("@index"===n)i=t["@index"],delete k[o];else{let e;if([i,...e]=x(k[n]||[]),a(i))switch(e.length){case 0:delete k[n];break;case 1:k[n]=e[0];break;default:k[n]=e}else i=null}}else if(v.includes("@id")){const t=j.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}});i=k[t],delete k[t]}else if(v.includes("@type")){const n=j.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}});let o;switch([i,...o]=x(k[n]||[]),o.length){case 0:delete k[n];break;case 1:k[n]=o[0];break;default:k[n]=o}1===Object.keys(k).length&&"@id"in t&&(k=await j.compact({activeCtx:e,activeProperty:r,element:{"@id":t["@id"]},options:d,compactionMap:m}))}i||(i=j.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}})),w(n,i,k,{propertyIsArray:v.includes("@set")})}else{const e=!d.compactArrays||v.includes("@set")||v.includes("@list")||i(k)&&0===k.length||"@list"===s||"@graph"===s;w(h,r,k,{propertyIsArray:e})}}}else{if((p(e,t,"@container")||[]).includes("@index"))continue;const r=j.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(_,r,h)}else{const r=await j.compact({activeCtx:e,activeProperty:t,element:h,options:d,compactionMap:m});i(r)&&0===r.length||w(_,s,r)}else{const t=await j.compact({activeCtx:e,activeProperty:"@reverse",element:h,options:d,compactionMap:m});for(const r in t)if(e.mappings.has(r)&&e.mappings.get(r).reverse){const n=t[r],i=(p(e,r,"@container")||[]).includes("@set")||!d.compactArrays;w(_,r,n,{propertyIsArray:i}),delete t[r]}if(Object.keys(t).length>0){const r=j.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(_,r,t)}}else{let t=x(h).map((e=>j.compactIri({activeCtx:I,iri:e,relativeTo:{vocab:!0}})));1===t.length&&(t=t[0]);const r=j.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}}),n=(p(e,r,"@container")||[]).includes("@set")&&y(e,1.1)||i(t)&&0===h.length;w(_,r,t,{propertyIsArray:n})}else{let t=x(h).map((t=>j.compactIri({activeCtx:e,iri:t,relativeTo:{vocab:!1},base:d.base})));1===t.length&&(t=t[0]),_[j.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t}}return _}return r},j.compactIri=({activeCtx:e,iri:t,value:r=null,relativeTo:i={vocab:!1},reverse:a=!1,base:s=null})=>{if(null===t)return t;e.isPropertyTermScoped&&e.previousContext&&(e=e.previousContext);const f=e.getInverse();if(v(t)&&t in f&&"@none"in f[t]&&"@type"in f[t]["@none"]&&"@none"in f[t]["@none"]["@type"])return f[t]["@none"]["@type"]["@none"];if(i.vocab&&t in f){const n=e["@language"]||"@none",i=[];o(r)&&"@index"in r&&!("@graph"in r)&&i.push("@index","@index@set"),o(r)&&"@preserve"in r&&(r=r["@preserve"][0]),l(r)?("@index"in r&&i.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in r&&i.push("@graph@id","@graph@id@set"),i.push("@graph","@graph@set","@set"),"@index"in r||i.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in r||i.push("@graph@id","@graph@id@set")):o(r)&&!c(r)&&i.push("@id","@id@set","@type","@set@type");let s="@language",f="@null";if(a)s="@type",f="@reverse",i.push("@set");else if(u(r)){"@index"in r||i.push("@list");const e=r["@list"];if(0===e.length)s="@any",f="@none";else{let t=0===e.length?n:null,r=null;for(let n=0;n<e.length;++n){const i=e[n];let o="@none",a="@none";if(c(i)?"@direction"in i?o=`${(i["@language"]||"").toLowerCase()}_${i["@direction"]}`:"@language"in i?o=i["@language"].toLowerCase():"@type"in i?a=i["@type"]:o="@null":a="@id",null===t?t=o:o!==t&&c(i)&&(t="@none"),null===r?r=a:a!==r&&(r="@none"),"@none"===t&&"@none"===r)break}t=t||"@none",r=r||"@none","@none"!==r?(s="@type",f=r):f=t}}else{if(c(r))if("@language"in r&&!("@index"in r)){i.push("@language","@language@set"),f=r["@language"];const e=r["@direction"];e&&(f=`${f}_${e}`)}else"@direction"in r&&!("@index"in r)?f="_"+r["@direction"]:"@type"in r&&(s="@type",f=r["@type"]);else s="@type",f="@id";i.push("@set")}i.push("@none"),o(r)&&!("@index"in r)&&i.push("@index","@index@set"),c(r)&&1===Object.keys(r).length&&i.push("@language","@language@set");const h=function(e,t,r,n,i,a){null===a&&(a="@null");const s=[];if(("@id"===a||"@reverse"===a)&&o(r)&&"@id"in r){"@reverse"===a&&s.push("@reverse");const t=j.compactIri({activeCtx:e,iri:r["@id"],relativeTo:{vocab:!0}});e.mappings.has(t)&&e.mappings.get(t)&&e.mappings.get(t)["@id"]===r["@id"]?s.push.apply(s,["@vocab","@id"]):s.push.apply(s,["@id","@vocab"])}else{s.push(a);const e=s.find((e=>e.includes("_")));e&&s.push(e.replace(/^[^_]+_/,"_"))}s.push("@none");const u=e.inverse[t];for(const e of n){if(!(e in u))continue;const t=u[e][i];for(const e of s)if(e in t)return t[e]}return null}(e,t,r,i,s,f);if(null!==h)return h}if(i.vocab&&"@vocab"in e){const r=e["@vocab"];if(0===t.indexOf(r)&&t!==r){const n=t.substr(r.length);if(!e.mappings.has(n))return n}}let h=null;const d=[];let p=e.fastCurieMap;const g=t.length-1;for(let e=0;e<g&&t[e]in p;++e)p=p[t[e]],""in p&&d.push(p[""][0]);for(let n=d.length-1;n>=0;--n){const i=d[n],o=i.terms;for(const n of o){const o=n+":"+t.substr(i.iri.length);e.mappings.get(n)._prefix&&(!e.mappings.has(o)||null===r&&e.mappings.get(o)["@id"]===t)&&(null===h||_(o,h)<0)&&(h=o)}}if(null!==h)return h;for(const[r,i]of e.mappings)if(i&&i._prefix&&t.startsWith(r+":"))throw new n(`Absolute IRI "${t}" confused with prefix "${r}".`,"jsonld.SyntaxError",{code:"IRI confused with prefix",context:e});return i.vocab?t:"@base"in e?e["@base"]?m(b(s,e["@base"]),t):t:m(s,t)},j.compactValue=({activeCtx:e,activeProperty:t,value:r,options:n})=>{if(c(r)){const n=p(e,t,"@type"),i=p(e,t,"@language"),o=p(e,t,"@direction"),s=p(e,t,"@container")||[],u="@index"in r&&!s.includes("@index");if(!u&&"@none"!==n){if(r["@type"]===n)return r["@value"];if("@language"in r&&r["@language"]===i&&"@direction"in r&&r["@direction"]===o)return r["@value"];if("@language"in r&&r["@language"]===i)return r["@value"];if("@direction"in r&&r["@direction"]===o)return r["@value"]}const c=Object.keys(r).length,l=1===c||2===c&&"@index"in r&&!u,f="@language"in e,h=a(r["@value"]),d=e.mappings.has(t)&&null===e.mappings.get(t)["@language"];if(l&&"@none"!==n&&(!f||!h||d))return r["@value"];const v={};return u&&(v[j.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=r["@index"]),"@type"in r?v[j.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}})]=j.compactIri({activeCtx:e,iri:r["@type"],relativeTo:{vocab:!0}}):"@language"in r&&(v[j.compactIri({activeCtx:e,iri:"@language",relativeTo:{vocab:!0}})]=r["@language"]),"@direction"in r&&(v[j.compactIri({activeCtx:e,iri:"@direction",relativeTo:{vocab:!0}})]=r["@direction"]),v[j.compactIri({activeCtx:e,iri:"@value",relativeTo:{vocab:!0}})]=r["@value"],v}const i=d(e,t,{vocab:!0},n),o=p(e,t,"@type"),s=j.compactIri({activeCtx:e,iri:r["@id"],relativeTo:{vocab:"@vocab"===o},base:n.base});return"@id"===o||"@vocab"===o||"@graph"===i?s:{[j.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]:s}}},function(e,t,r){e.exports=e=>{class t{toString(){return"[object JsonLdProcessor]"}}return Object.defineProperty(t,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(t.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:t}),t.compact=function(t,r){return arguments.length<2?Promise.reject(new TypeError("Could not compact, too few arguments.")):e.compact(t,r)},t.expand=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not expand, too few arguments.")):e.expand(t)},t.flatten=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not flatten, too few arguments.")):e.flatten(t)},t}},function(e,t,r){(function(e){
|
|
81
|
-
/*!
|
|
82
|
-
* The buffer module from node.js, for the browser.
|
|
83
|
-
*
|
|
84
|
-
* @author Feross Aboukhadijeh <http://feross.org>
|
|
85
|
-
* @license MIT
|
|
86
|
-
*/
|
|
87
|
-
var n=r(46),i=r(47),o=r(48);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t),e}(e,t,r,n):"string"==typeof t?function(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(t,r),i=(e=s(e,n)).write(t,r);return i!==n&&(e=e.slice(0,i)),e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|d(t.length);return 0===(e=s(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?s(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|d(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function h(e,t){var r=t.length<0?0:0|d(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(n)return B(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return E(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){f=!1;break}if(f)return o}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function w(e,t,r,n){return z(B(t,e.length-r),e,r,n)}function x(e,t,r,n){return z(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function _(e,t,r,n){return x(e,t,r,n)}function j(e,t,r,n){return z(q(t),e,r,n)}function S(e,t,r,n){return z(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function R(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function E(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function O(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=F(e[o]);return i}function T(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function A(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function L(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function C(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,o){return o||C(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function M(e,t,r,n,o){return o||C(e,0,r,8),i.write(e,t,r,n,52,8),r+8}t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return l(t),t<=0?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?k(this,0,e):v.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),l=e.slice(t,r),f=0;f<s;++f)if(c[f]!==l[f]){o=c[f],a=l[f];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return x(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return j(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||A(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||A(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||A(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||A(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||P(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||P(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=u.isBuffer(e)?e:B(new u(e,n).toString()),s=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function B(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(8))},function(e,t,r){t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=c(e),a=n[0],s=n[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),l=0,f=s>0?a-4:a;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=0,s=r-i;a<s;a+=16383)o.push(l(e,a,a+16383>s?s:a+16383));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var i,o,a=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
|
|
88
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
89
|
-
t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*v}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){r.r(t),r.d(t,"createBlankNode",(function(){return N})),r.d(t,"createQuad",(function(){return L})),r.d(t,"jsonLDFromRDF",(function(){return m.fromRDF})),r.d(t,"jsonLDToRDF",(function(){return m.toRDF})),r.d(t,"compactJsonLD",(function(){return m.compact})),r.d(t,"TurtleParser",(function(){return x})),r.d(t,"TurtleWriter",(function(){return A}));var n=r(0);function i(e){return!!e&&"DefaultGraph"===e.termType}const{rdf:o,xsd:a}=n.a;let s,u=0;const c={namedNode:function(e){return new h(e)},blankNode:function(e){return new p(e||"n3-"+u++)},variable:function(e){return new v(e)},literal:function(e,t){if("string"==typeof t)return new d(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";return""===r&&("boolean"==typeof e?r=a.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?a.integer:a.double:(r=a.double,Number.isNaN(e)||(e=e>0?"INF":"-INF")))),""===r||r===a.string?new d(`"${e}"`):new d(`"${e}"^^${r}`)},defaultGraph:function(){return s},quad:y,triple:y};var l=c;class f{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof f?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}toJSON(){return{termType:this.termType,value:this.value}}}class h extends f{get termType(){return"NamedNode"}}class d extends f{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let t=e.lastIndexOf('"')+1;return t<e.length&&"@"===e[t++]?e.substr(t).toLowerCase():""}get datatype(){return new h(this.datatypeString)}get datatypeString(){const e=this.id,t=e.lastIndexOf('"')+1,r=t<e.length?e[t]:"";return"^"===r?e.substr(t+2):"@"!==r?a.string:o.langString}equals(e){return e instanceof d?this.id===e.id:!!e&&!!e.datatype&&this.termType===e.termType&&this.value===e.value&&this.language===e.language&&this.datatype.value===e.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class p extends f{constructor(e){super("_:"+e)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class v extends f{constructor(e){super("?"+e)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}s=new class extends f{constructor(){return super(""),s||this}get termType(){return"DefaultGraph"}equals(e){return this===e||!!e&&this.termType===e.termType}};class g extends f{constructor(e,t,r,n){super(""),this._subject=e,this._predicate=t,this._object=r,this._graph=n||s}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(e){return!!e&&this._subject.equals(e.subject)&&this._predicate.equals(e.predicate)&&this._object.equals(e.object)&&this._graph.equals(e.graph)}}function y(e,t,r,n){return new g(e,t,r,n)}var m=r(7),b=r(21);let w=0;class x{constructor(e){this._contextStack=[],this._graph=null,e=e||{},this._setBase(e.baseIRI),e.factory&&j(this,e.factory);const t="string"==typeof e.format?e.format.match(/\w*$/)[0].toLowerCase():"",r=/turtle/.test(t),n=/trig/.test(t),i=/triple/.test(t),o=/quad/.test(t),a=this._n3Mode=/n3/.test(t),s=i||o;(this._supportsNamedGraphs=!(r||a))||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(r||n||i||a),this._supportsRDFStar=""===t||/star|\*$/.test(t),s&&(this._resolveRelativeIRI=e=>null),this._blankNodePrefix="string"!=typeof e.blankNodePrefix?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new b.a({lineMode:s,n3:a}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){w=0}_setBase(e){if(e){const t=e.indexOf("#");t>=0&&(e=e.substr(0,t)),this._base=e,this._basePath=e.indexOf("/")<0?e:e.replace(/[^\/?]*(?:\?.*)?$/,""),e=e.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=e[0],this._baseScheme=e[1]}else this._base="",this._basePath=""}_saveContext(e,t,r,n,i){const o=this._n3Mode;this._contextStack.push({subject:r,predicate:n,object:i,graph:t,type:e,inverse:!!o&&this._inversePredicate,blankPrefix:o?this._prefixes._:"",quantified:o?this._quantified:null}),o&&(this._inversePredicate=!1,this._prefixes._=this._graph?this._graph.id.substr(2)+".":".",this._quantified=Object.create(this._quantified))}_restoreContext(){const e=this._contextStack.pop(),t=this._n3Mode;this._subject=e.subject,this._predicate=e.predicate,this._object=e.object,this._graph=e.graph,t&&(this._inversePredicate=e.inverse,this._prefixes._=e.blankPrefix,this._quantified=e.quantified)}_readInTopContext(e){switch(e.type){case"eof":return null!==this._graph?this._error("Unclosed graph",e):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(e)}}_readEntity(e,t){let r;switch(e.type){case"IRI":case"typeIRI":const t=this._resolveIRI(e.value);if(null===t)return this._error("Invalid IRI",e);r=this._namedNode(t);break;case"type":case"prefixed":const n=this._prefixes[e.prefix];if(void 0===n)return this._error(`Undefined prefix "${e.prefix}:"`,e);r=this._namedNode(n+e.value);break;case"blank":r=this._blankNode(this._prefixes[e.prefix]+e.value);break;case"var":r=this._variable(e.value.substr(1));break;default:return this._error("Expected entity but got "+e.type,e)}return!t&&this._n3Mode&&r.id in this._quantified&&(r=this._quantified[r.id]),r}_readSubject(e){switch(this._predicate=null,e.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._blankNode(),null,null),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._blankNode(),null,null),this._readSubject):this._error("Unexpected graph",e);case"}":return this._readPunctuation(e);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier=this._blankNode,this._readQuantifierList):this._error('Unexpected "@forSome"',e);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier=this._variable,this._readQuantifierList):this._error('Unexpected "@forAll"',e);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",e);if(0===e.prefix.length)return this._literalValue=e.value,this._completeSubjectLiteral;this._subject=this._literal(e.value,this._namedNode(e.prefix));break;case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._subject=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(e){const t=e.type;switch(t){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[e.value];break;case".":case"]":case"}":return null===this._predicate?this._error("Unexpected "+t,e):(this._subject=null,"]"===t?this._readBlankNodeTail(e):this._readPunctuation(e));case";":return null!==this._predicate?this._readPredicate:this._error("Expected predicate but got ;",e);case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",e);default:if(void 0===(this._predicate=this._readEntity(e)))return}return this._readObject}_readObject(e){switch(e.type){case"literal":if(0===e.prefix.length)return this._literalValue=e.value,this._readDataTypeOrLang;this._object=this._literal(e.value,this._namedNode(e.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._blankNode()),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._object=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(e){return"{"===e.type?this._readGraph(e):this._readPredicate(e)}_readGraph(e){return"{"!==e.type?this._error("Expected graph but got "+e.type,e):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(e){return"]"===e.type?(this._subject=null,this._readBlankNodeTail(e)):(this._predicate=null,this._readPredicate(e))}_readBlankNodeTail(e){if("]"!==e.type)return this._readBlankNodePunctuation(e);null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph);const t=null===this._predicate;return this._restoreContext(),null===this._object?t?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank:this._getContextEndReader()}_readPredicateAfterBlank(e){switch(e.type){case".":case"}":return this._subject=null,this._readPunctuation(e);default:return this._readPredicate(e)}}_readListItem(e){let t=null,r=null,n=this._readListItem;const i=this._subject,o=this._contextStack,a=o[o.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,r=this._blankNode(),this.RDF_FIRST,this._subject=t=this._blankNode()),n=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,r=this._blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext(),0!==o.length&&"list"===o[o.length-1].type&&this._emit(this._subject,this._predicate,this._object,this._graph),null===this._predicate){if(n=this._readPredicate,this._subject===this.RDF_NIL)return n}else if(n=this._getContextEndReader(),this._object===this.RDF_NIL)return n;r=this.RDF_NIL;break;case"literal":0===e.prefix.length?(this._literalValue=e.value,n=this._readListItemDataTypeOrLang):(t=this._literal(e.value,this._namedNode(e.prefix)),n=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);default:if(void 0===(t=this._readEntity(e)))return}if(null===r&&(this._subject=r=this._blankNode()),null===i?null===a.predicate?a.subject=r:a.object=r:this._emit(i,this.RDF_REST,r,this._graph),null!==t){if(this._n3Mode&&("IRI"===e.type||"prefixed"===e.type))return this._saveContext("item",this._graph,r,this.RDF_FIRST,t),this._subject=t,this._predicate=null,this._getPathReader(this._readListItem);this._emit(r,this.RDF_FIRST,t,this._graph)}return n}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e){let t=this._literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const r=this._readEntity(e);if(void 0===r)return;t=this._literal(this._literalValue,r),e=null;break;case"langcode":t=this._literal(this._literalValue,e.value),e=null}return{token:e,literal:t}}_completeSubjectLiteral(e){return this._subject=this._completeLiteral(e).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(e,t){const r=this._completeLiteral(e);if(r)return this._object=r.literal,t&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),null===r.token?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(r.token))}_readFormulaTail(e){return"}"!==e.type?this._readPunctuation(e):(null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext(),null===this._object?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let t,r=this._graph;const n=this._subject,i=this._inversePredicate;switch(e.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,t=this._contextStack.length?this._readSubject:this._readInTopContext,i&&(this._inversePredicate=!1);break;case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:if(this._supportsQuads&&null===this._graph&&void 0!==(r=this._readEntity(e))){t=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(null!==n){const e=this._predicate,t=this._object;i?this._emit(t,e,n,r):this._emit(n,e,t,r)}return t}_readBlankNodePunctuation(e){let t;switch(e.type){case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}return this._emit(this._subject,this._predicate,this._object,this._graph),t}_readQuadPunctuation(e){return"."!==e.type?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return"prefix"!==e.type?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if("IRI"!==e.type)return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const t=this._readEntity(e);return this._prefixes[this._prefix]=t.value,this._prefixCallback(this._prefix,t),this._readDeclarationPunctuation}_readBaseIRI(e){const t="IRI"===e.type&&this._resolveIRI(e.value);return t?(this._setBase(t),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",e)}_readNamedGraphLabel(e){switch(e.type){case"IRI":case"blank":case"prefixed":return this._readSubject(e),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",e)}}_readNamedGraphBlankLabel(e){return"]"!==e.type?this._error("Invalid graph label",e):(this._subject=this._blankNode(),this._readGraph)}_readDeclarationPunctuation(e){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(e)):"."!==e.type?this._error("Expected declaration to end with a dot",e):this._readInTopContext}_readQuantifierList(e){let t;switch(e.type){case"IRI":case"prefixed":if(void 0!==(t=this._readEntity(e,!0)))break;default:return this._error("Unexpected "+e.type,e)}return this._explicitQuantifiers?(null===this._subject?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,t,this.QUANTIFIERS_GRAPH)):this._quantified[t.id]=this._quantifier(this._blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(e){return","===e.type?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(e))}_getPathReader(e){return this._afterPath=e,this._readPath}_readPath(e){switch(e.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const t=this._contextStack,r=t.length&&t[t.length-1];if(r&&"item"===r.type){const e=this._subject;this._restoreContext(),this._emit(this._subject,this.RDF_FIRST,e,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let t,r;const n=this._blankNode();if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(t=this._subject,this._subject=n):(t=this._object,this._object=n),this._emit(t,r,n,this._graph),this._readPath}_readBackwardPath(e){const t=this._blankNode();let r,n;if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(n=this._subject,this._subject=t):(n=this._object,this._object=t),this._emit(t,r,n,this._graph),this._readPath}_readRDFStarTailOrGraph(e){return">>"!==e.type?this._supportsQuads&&null===this._graph&&void 0!==(this._graph=this._readEntity(e))?this._readRDFStarTail:this._error(`Expected >> to follow "${this._object.id}"`,e):this._readRDFStarTail(e)}_readRDFStarTail(e){if(">>"!==e.type)return this._error("Expected >> but got "+e.type,e);const t=this._quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext(),null===this._subject?(this._subject=t,this._readPredicate):(this._object=t,this._getContextEndReader())}_getContextEndReader(){const e=this._contextStack;if(!e.length)return this._readPunctuation;switch(e[e.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<":return this._readRDFStarTailOrGraph}}_emit(e,t,r,n){this._callback(null,this._quad(e,t,r,n||this.DEFAULTGRAPH))}_error(e,t){const r=new Error(`${e} on line ${t.line}.`);r.context={token:t,line:t.line,previousToken:this._lexer.previousToken},this._callback(r),this._callback=_}_resolveIRI(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)?e:this._resolveRelativeIRI(e)}_resolveRelativeIRI(e){if(!e.length)return this._base;switch(e[0]){case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return/^[^/:]*:/.test(e)?null:this._removeDotSegments(this._basePath+e)}}_removeDotSegments(e){if(!/(^|\/)\.\.?($|[/#?])/.test(e))return e;const t=e.length;let r="",n=-1,i=-1,o=0,a="/";for(;n<t;){switch(a){case":":if(i<0&&"/"===e[++n]&&"/"===e[++n])for(;(i=n+1)<t&&"/"!==e[i];)n=i;break;case"?":case"#":n=t;break;case"/":if("."===e[n+1])switch(a=e[1+ ++n],a){case"/":r+=e.substring(o,n-1),o=n+1;break;case void 0:case"?":case"#":return r+e.substring(o,n)+e.substr(n+1);case".":if(a=e[1+ ++n],void 0===a||"/"===a||"?"===a||"#"===a){if(r+=e.substring(o,n-2),(o=r.lastIndexOf("/"))>=i&&(r=r.substr(0,o)),"/"!==a)return`${r}/${e.substr(n+1)}`;o=n+1}}}a=e[++n]}return r+e.substring(o)}parse(e,t,r){if(this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${w++}_`,this._prefixCallback=r||_,this._inversePredicate=!1,this._quantified=Object.create(null),!t){const t=[];let r;if(this._callback=(e,n)=>{e?r=e:n&&t.push(n)},this._lexer.tokenize(e).every((e=>this._readCallback=this._readCallback(e))),r)throw r;return t}this._callback=t,this._lexer.tokenize(e,((e,t)=>{null!==e?(this._callback(e),this._callback=_):this._readCallback&&(this._readCallback=this._readCallback(t))}))}}function _(){}function j(e,t){const r=t.namedNode;e._namedNode=r,e._blankNode=t.blankNode,e._literal=t.literal,e._variable=t.variable,e._quad=t.quad,e.DEFAULTGRAPH=t.defaultGraph(),e.RDF_FIRST=r(n.a.rdf.first),e.RDF_REST=r(n.a.rdf.rest),e.RDF_NIL=r(n.a.rdf.nil),e.N3_FORALL=r(n.a.r.forAll),e.N3_FORSOME=r(n.a.r.forSome),e.ABBREVIATIONS={a:r(n.a.rdf.type),"=":r(n.a.owl.sameAs),">":r(n.a.log.implies)},e.QUANTIFIERS_GRAPH=r("urn:n3:quantifiers")}j(x.prototype,l);const S=l.defaultGraph(),{rdf:I,xsd:k}=n.a,R=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,E=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,O={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class T extends f{equals(){return!1}}class A{constructor(e,t){if(this._prefixRegex=/$0^/,e&&"function"!=typeof e.write&&(t=e,e=null),t=t||{},this._lists=t.lists,e)this._outputStream=e,this._endStream=void 0===t.end||!!t.end;else{let e="";this._outputStream={write(t,r,n){e+=t,n&&n()},end:t=>{t&&t(null,e)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(t.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=S,this._baseIRI=t.baseIRI,this._prefixIRIs=Object.create(null),t.prefixes&&this.addPrefixes(t.prefixes))}get _inDefaultGraph(){return S.equals(this._graph)}_write(e,t){this._outputStream.write(e,"utf8",t)}_writeQuad(e,t,r,n,i){try{n.equals(this._graph)||(this._write((null===this._subject?"":this._inDefaultGraph?".\n":"\n}\n")+(S.equals(n)?"":this._encodeIriOrBlank(n)+" {\n")),this._graph=n,this._subject=null),e.equals(this._subject)?t.equals(this._predicate)?this._write(", "+this._encodeObject(r),i):this._write(`;\n ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i):this._write(`${(null===this._subject?"":".\n")+this._encodeSubject(this._subject=e)} ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i)}catch(e){i&&i(e)}}_writeQuadLine(e,t,r,n,i){delete this._prefixMatch,this._write(this.quadToString(e,t,r,n),i)}quadToString(e,t,r,n){return`${this._encodeSubject(e)} ${this._encodeIriOrBlank(t)} ${this._encodeObject(r)}${n&&n.value?` ${this._encodeIriOrBlank(n)} .\n`:" .\n"}`}quadsToString(e){return e.map((e=>this.quadToString(e.subject,e.predicate,e.object,e.graph))).join("")}_encodeSubject(e){return"Quad"===e.termType?this._encodeQuad(e):this._encodeIriOrBlank(e)}_encodeIriOrBlank(e){if("NamedNode"!==e.termType)return this._lists&&e.value in this._lists&&(e=this.list(this._lists[e.value])),"id"in e?e.id:"_:"+e.value;let t=e.value;this._baseIRI&&t.startsWith(this._baseIRI)&&(t=t.substr(this._baseIRI.length)),R.test(t)&&(t=t.replace(E,P));const r=this._prefixRegex.exec(t);return r?r[1]?this._prefixIRIs[r[1]]+r[2]:t:`<${t}>`}_encodeLiteral(e){let t=e.value;if(R.test(t)&&(t=t.replace(E,P)),e.language)return`"${t}"@${e.language}`;if(this._lineMode){if(e.datatype.value===k.string)return`"${t}"`}else switch(e.datatype.value){case k.string:return`"${t}"`;case k.boolean:if("true"===t||"false"===t)return t;break;case k.integer:if(/^[+-]?\d+$/.test(t))return t;break;case k.decimal:if(/^[+-]?\d*\.\d+$/.test(t))return t;break;case k.double:if(/^[+-]?(?:\d+\.\d*|\.?\d+)[eE][+-]?\d+$/.test(t))return t}return`"${t}"^^${this._encodeIriOrBlank(e.datatype)}`}_encodePredicate(e){return e.value===I.type?"a":this._encodeIriOrBlank(e)}_encodeObject(e){switch(e.termType){case"Quad":return this._encodeQuad(e);case"Literal":return this._encodeLiteral(e);default:return this._encodeIriOrBlank(e)}}_encodeQuad({subject:e,predicate:t,object:r,graph:n}){return`<<${this._encodeSubject(e)} ${this._encodePredicate(t)} ${this._encodeObject(r)}${i(n)?"":" "+this._encodeIriOrBlank(n)}>>`}_blockedWrite(){throw new Error("Cannot write because the writer has been closed.")}addQuad(e,t,r,n,i){void 0===r?this._writeQuad(e.subject,e.predicate,e.object,e.graph,t):"function"==typeof n?this._writeQuad(e,t,r,S,n):this._writeQuad(e,t,r,n||S,i)}addQuads(e){for(let t=0;t<e.length;t++)this.addQuad(e[t])}addPrefix(e,t,r){const n={};n[e]=t,this.addPrefixes(n,r)}addPrefixes(e,t){if(!this._prefixIRIs)return t&&t();let r=!1;for(let t in e){let n=e[t];"string"!=typeof n&&(n=n.value),r=!0,null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null,this._graph=""),this._prefixIRIs[n]=t+=":",this._write(`@prefix ${t} <${n}>.\n`)}if(r){let e="",t="";for(const r in this._prefixIRIs)e+=e?"|"+r:r,t+=(t?"|":"")+this._prefixIRIs[r];e=e.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&"),this._prefixRegex=new RegExp(`^(?:${t})[^/]*$|^(${e})([a-zA-Z][\\-_a-zA-Z0-9]*)$`)}this._write(r?"\n":"",t)}blank(e,t){let r,n,i=e;switch(void 0===e?i=[]:e.termType?i=[{predicate:e,object:t}]:"length"in e||(i=[e]),n=i.length){case 0:return new T("[]");case 1:if(r=i[0],!(r.object instanceof T))return new T(`[ ${this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)} ]`);default:let t="[";for(let o=0;o<n;o++)r=i[o],r.predicate.equals(e)?t+=", "+this._encodeObject(r.object):(t+=`${(o?";\n ":"\n ")+this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)}`,e=r.predicate);return new T(t+"\n]")}}list(e){const t=e&&e.length||0,r=new Array(t);for(let n=0;n<t;n++)r[n]=this._encodeObject(e[n]);return new T(`(${r.join(" ")})`)}end(e){null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null),this._write=this._blockedWrite;let t=e&&((r,n)=>{t=null,e(r,n)});if(this._endStream)try{return this._outputStream.end(t)}catch(e){}t&&t()}}function P(e){let t=O[e];return void 0===t&&(1===e.length?(t=e.charCodeAt(0).toString(16),t="\\u0000".substr(0,6-t.length)+t):(t=(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)+9216).toString(16),t="\\U00000000".substr(0,10-t.length)+t)),t}function N(e){return new p(e)}function L(e,t,r,n){return new g(e,t,r,n)}}])}));e.SolidDocumentPermission=void 0,(Hb=e.SolidDocumentPermission||(e.SolidDocumentPermission={})).Read="read",Hb.Write="write",Hb.Append="append",Hb.Control="control";var Wb=function(t){c(n,t);var r=p(n);function n(e,t,i){var a;return o(this,n),u(h(a=r.call(this,t)),"url",void 0),u(h(a),"headers",void 0),a.url=e,a.headers=i,a}return s(n,[{key:"isACPResource",value:function(){var e;return!(null===(e=this.headers.get("Link"))||void 0===e||!e.match(/<http:\/\/www\.w3\.org\/ns\/solid\/acp#AccessControlResource>;[^,]+rel="type"/))}},{key:"isPersonalProfile",value:function(){return!!this.statement(this.url,Ub("rdf:type"),Ub("foaf:PersonalProfileDocument"))}},{key:"isStorage",value:function(){var e;return!(null===(e=this.headers.get("Link"))||void 0===e||!e.match(/<http:\/\/www\.w3\.org\/ns\/pim\/space#Storage>;[^,]+rel="type"/))}},{key:"isUserWritable",value:function(){return this.getUserPermissions().includes(e.SolidDocumentPermission.Write)}},{key:"getUserPermissions",value:function(){return this.getPermissionsFromWAC("user")}},{key:"getPublicPermissions",value:function(){return this.getPermissionsFromWAC("public")}},{key:"getLastModified",value:function(){var e,t,r,n;return null!==(e=null!==(t=null!==(r=sb(this.headers.get("last-modified")))&&void 0!==r?r:sb(null===(n=this.statement(this.url,"purl:modified"))||void 0===n?void 0:n.object.value))&&void 0!==t?t:this.getLatestDocumentDate())&&void 0!==e?e:null}},{key:"expandIRI",value:function(e){return Ub(e,{defaultPrefix:this.url})}},{key:"getLatestDocumentDate",value:function(){var e=[].concat(g(this.statements(void 0,"purl:modified")),g(this.statements(void 0,"purl:created"))).map((function(e){return sb(e.object.value)})).filter((function(e){return null!==e}));return e.length>0?e.reduce((function(e,t){return e>t?e:t})):null}},{key:"getPermissionsFromWAC",value:function(t){var r,n,i,o,a,s=null!==(r=this.headers.get("WAC-Allow"))&&void 0!==r?r:"",u=null!==(n=null===(o=s,a=new RegExp("".concat(t,'="([^"]+)"')),i=o.match(a))||void 0===i?void 0:i[1])&&void 0!==n?n:"";return tb([u.includes("read")&&e.SolidDocumentPermission.Read,u.includes("write")&&e.SolidDocumentPermission.Write,u.includes("append")&&e.SolidDocumentPermission.Append,u.includes("control")&&e.SolidDocumentPermission.Control])}}]),n}(Bb);function Yb(){return(Yb=i(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qb.compactJsonLD(t,{});case 2:if(!("@graph"in(r=e.sent))){e.next=5;break}return e.abrupt("return",r);case 5:if(!("@id"in r)){e.next=7;break}return e.abrupt("return",{"@graph":[r]});case 7:return e.abrupt("return",{"@graph":[]});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Kb(e){return"@graph"in e}var Xb="anonymous://",Zb=Xb.length;function ew(e,t){return tw.apply(this,arguments)}function tw(){return(tw=i(regeneratorRuntime.mark((function e(t,r){var n,i,o,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={headers:{Accept:"text/turtle"}},null!=r&&r.cache&&(n.cache=r.cache),e.prev=2,o=null!==(i=null==r?void 0:r.fetch)&&void 0!==i?i:window.fetch,e.next=6,o(t,n);case 6:if(404!==(a=e.sent).status){e.next=9;break}throw new Nb(t);case 9:if(![401,403].includes(a.status)){e.next=11;break}throw new Lb(t,a.status);case 11:return e.next=13,a.text();case 13:return s=e.sent,e.abrupt("return",{body:s,headers:a.headers});case 17:if(e.prev=17,e.t0=e.catch(2),!(e.t0 instanceof Lb)){e.next=21;break}throw e.t0;case 21:if(!(e.t0 instanceof Nb)){e.next=23;break}throw e.t0;case 23:throw new Pb(t,{cause:e.t0});case 24:case"end":return e.stop()}}),e,null,[[2,17]])})))).apply(this,arguments)}function rw(e){var t,r=e.slice(0),n={},i=Rb(e).flatMap((function(e,t){return kb(tb(["BlankNode"===e.object.termType?e.object.value:null,"BlankNode"===e.subject.termType?e.subject.value:null]),(function(e){return e.forEach((function(e){var r;return(null!==(r=n[e])&&void 0!==r?r:n[e]=new Set).add(t)}))}))})).filter().unique(),o=b(i);try{var a=function(){var i,o=t.value,a=n[o],s=Vb(Rb(a).map((function(t){return e[t]})).filter((function(e){var t=e.subject,r=t.termType,n=t.value;return"BlankNode"===r&&n===o})).map((function(e){var t=e.predicate,r=e.object;return"BlankNode"===r.termType?t.value:t.value+r.value})).sorted().join()),u=b(a);try{for(u.s();!(i=u.n()).done;){for(var c=i.value,l=r[c],f={subject:l.subject,object:l.object},h=0,d=Object.entries(f);h<d.length;h++){var p=v(d[h],2),g=p[0],y=p[1];"BlankNode"===y.termType&&y.value===o&&(f[g]=Qb.createBlankNode(s))}nb(r,l,Qb.createQuad(f.subject,l.predicate,f.object))}}catch(e){u.e(e)}finally{u.f()}};for(o.s();!(t=o.n()).done;)a()}catch(e){o.e(e)}finally{o.f()}return r}function nw(e){return e.map((function(e){return" "+bw(e)})).sort().join("\n")}function iw(e){var t;null!==(t=e["@id"])&&void 0!==t&&t.startsWith("#")&&(e["@id"]=Xb+e["@id"])}function ow(e){var t,r=b(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.subject.value.startsWith(Xb)&&(n.subject.value=n.subject.value.slice(Zb))}}catch(e){r.e(e)}finally{r.f()}}function aw(e,t,r){return sw.apply(this,arguments)}function sw(){return(sw=i(regeneratorRuntime.mark((function e(t,r,n){var i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null!==(i=n)&&void 0!==i?i:window.fetch.bind(window),e.next=3,Sw(r);case 3:return o=e.sent,e.next=6,n(t,{method:"PUT",headers:{"Content-Type":"text/turtle"},body:r});case 6:return e.abrupt("return",new Wb(t,o,new Headers({})));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function uw(e,t){return cw.apply(this,arguments)}function cw(){return cw=i(regeneratorRuntime.mark((function e(t,r){var n,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ew(t,r);case 2:return n=e.sent,i=n.body,o=n.headers,e.next=7,Sw(i,{baseIRI:t});case 7:return a=e.sent,e.abrupt("return",new Wb(t,a,o));case 9:case"end":return e.stop()}}),e)}))),cw.apply(this,arguments)}function lw(e,t){return fw.apply(this,arguments)}function fw(){return(fw=i(regeneratorRuntime.mark((function e(t,r){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,uw(t,r);case 3:return n=e.sent,e.abrupt("return",n);case 7:if(e.prev=7,e.t0=e.catch(0),e.t0 instanceof Nb){e.next=11;break}throw e.t0;case 11:return e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function hw(e,t){return dw.apply(this,arguments)}function dw(){return(dw=i(regeneratorRuntime.mark((function e(t,r){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Kb(t)){e.next=5;break}return e.next=3,Promise.all(t["@graph"].map((function(e){return hw(e,r)})));case 3:return n=e.sent,e.abrupt("return",n.flat());case 5:return iw(t),e.next=8,Qb.jsonLDToRDF(t,{base:r});case 8:return ow(i=e.sent),e.abrupt("return",i);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pw(e){var t=jw(e);return Object.entries(t).reduce((function(e,t){var r=v(t,2),n=r[0],i=nw(r[1]);return e.concat("".concat(n.toUpperCase()," DATA {\n").concat(i,"\n}"))}),[]).join(" ;\n")}function vw(e){return nw(kw(e))}function gw(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Hm({baseIRI:r.baseIRI}),i=new Qb.TurtleParser(n),o={quads:[],containsRelativeIRIs:!1};return new Promise((function(n,a){var s=i._resolveRelativeIRI;i._resolveRelativeIRI=function(){return o.containsRelativeIRIs=!0,i._resolveRelativeIRI=s,i._resolveRelativeIRI.apply(i,arguments)},i.parse(t,(function(t,i){var s;t?a(new Ab(null!==(s=r.baseIRI)&&void 0!==s?s:null,e.SolidDocumentFormat.Turtle,t.message)):i?o.quads.push(i):n(o)}))}))}function yw(){return(yw=i(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qb.jsonLDFromRDF(t);case 2:return r=e.sent,e.abrupt("return",{"@graph":r});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mw(e){return(new Qb.TurtleWriter).quadsToString(e)}function bw(e){return(new Qb.TurtleWriter).quadsToString([e]).slice(0,-1)}function ww(e,t){return xw.apply(this,arguments)}function xw(){return(xw=i(regeneratorRuntime.mark((function e(t,r){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,uw(t,r);case 3:return n=e.sent,e.abrupt("return",!n.isEmpty());case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function _w(){return _w=i(regeneratorRuntime.mark((function e(t){var r,n,o,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},n=fb(t,/(\w+) DATA {([^}]+)}/g),o={},e.next=5,Promise.all(g(n).map(function(){var e=i(regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t[1].toLowerCase(),i=t[2],e.next=4,Sw(i,r);case 4:o[n]=e.sent;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:return e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)}))),_w.apply(this,arguments)}function jw(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=fb(e,/(\w+) DATA {([^}]+)}/g),i={},o=b(n);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=a[1].toLowerCase(),u=a[2];i[s]=kw(u,r)}}catch(e){o.e(e)}finally{o.f()}return i}function Sw(e){return Iw.apply(this,arguments)}function Iw(){return Iw=i(regeneratorRuntime.mark((function e(t){var r,n,i,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,gw(t,r);case 3:return n=e.sent,i=n.quads,e.abrupt("return",i);case 6:case"end":return e.stop()}}),e)}))),Iw.apply(this,arguments)}function kw(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Hm({baseIRI:r.baseIRI}),i=new Qb.TurtleParser(n);try{var o=i.parse(t);return r.normalizeBlankNodes?rw(o):o}catch(t){var a,s;throw new Ab(null!==(a=r.baseIRI)&&void 0!==a?a:null,e.SolidDocumentFormat.Turtle,null!==(s=t.message)&&void 0!==s?s:"")}}function Rw(e,t,r){return Ew.apply(this,arguments)}function Ew(){return(Ew=i(regeneratorRuntime.mark((function e(t,r,n){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null!==(i=n)&&void 0!==i?i:window.fetch.bind(window),e.next=3,n(t,{method:"PATCH",headers:{"Content-Type":"application/sparql-update"},body:r});case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ow(e,t){return Tw.apply(this,arguments)}function Tw(){return Tw=i(regeneratorRuntime.mark((function e(t,r){var n,o,a,s,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=new Bb(t.getQuads()),s=u({},t.url,t),c=function(e){e.statements(void 0,"foaf:isPrimaryTopicOf").map((function(e){return e.object.value})).forEach((function(e){var t;return s[e]=null!==(t=s[e])&&void 0!==t?t:null})),e.statements(void 0,"foaf:primaryTopic").map((function(e){return e.subject.value})).forEach((function(e){var t;return s[e]=null!==(t=s[e])&&void 0!==t?t:null}))},l=function(){var e=i(regeneratorRuntime.mark((function e(){var t,n,i,o,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0,n=Object.entries(s);case 1:if(!(t<n.length)){e.next=23;break}if(i=v(n[t],2),o=i[0],null===i[1]){e.next=5;break}return e.abrupt("continue",20);case 5:return e.prev=5,e.next=8,uw(o,r);case 8:u=e.sent,s[o]=u,a.addQuads(u.getQuads()),c(u),e.next=20;break;case 14:if(e.prev=14,e.t0=e.catch(5),!(e.t0 instanceof Lb)){e.next=19;break}return s[o]=!1,e.abrupt("continue",20);case 19:throw e.t0;case 20:t++,e.next=1;break;case 23:case"end":return e.stop()}}),e,null,[[5,14]])})));return function(){return e.apply(this,arguments)}}(),c(t);case 5:return e.next=7,l();case 7:if(Object.values(s).some((function(e){return null===e}))){e.next=5;break}case 8:return e.abrupt("return",{store:a,cloaked:Object.values(s).some((function(e){return!1===e})),writableProfileUrl:t.isUserWritable()?t.url:null!==(n=null===(o=Object.values(s).find((function(e){return!!e&&e.isUserWritable()})))||void 0===o?void 0:o.url)&&void 0!==n?n:null});case 9:case"end":return e.stop()}}),e)}))),Tw.apply(this,arguments)}function Aw(e){return Pw.apply(this,arguments)}function Pw(){return Pw=i(regeneratorRuntime.mark((function e(t){var n,i,o,a,s,u,c,l,f,h,d,p,v,g,y,m,b,w,x,_,j,S=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f=S.length>1&&void 0!==S[1]?S[1]:{},h={fetch:f.fetch,cache:"no-store"},d=mb(t),e.next=5,uw(d,h);case 5:if((p=e.sent).isPersonalProfile()||p.contains(t,"solid:oidcIssuer")){e.next=8;break}throw new Error("".concat(t," is not a valid webId."));case 8:return e.next=10,Ow(p,f);case 10:v=e.sent,g=v.store,y=v.writableProfileUrl,m=v.cloaked,b=g.statements(t,"pim:storage").map((function(e){return e.object.value})),w=g.statement(t,"solid:publicTypeIndex"),x=g.statement(t,"solid:privateTypeIndex"),_=gb(d);case 18:if(!_||0!==b.length){e.next=28;break}return e.next=21,lb(uw(_,h));case 21:if(null==(j=e.sent)||!j.isStorage()){e.next=25;break}return b.push(_),e.abrupt("break",28);case 25:_=gb(_),e.next=18;break;case 28:if(0!==b.length){e.next=30;break}throw new Error("Could not find any storage for ".concat(t,"."));case 30:return e.next=32,null===(n=f.onLoaded)||void 0===n?void 0:n.call(f,new Bb(g.statements(t)));case 32:return e.abrupt("return",r({webId:t,cloaked:m,writableProfileUrl:y,storageUrls:ib(b)},Hm({name:null!==(i=null===(o=g.statement(t,"vcard:fn"))||void 0===o?void 0:o.object.value)&&void 0!==i?i:null===(a=g.statement(t,"foaf:name"))||void 0===a?void 0:a.object.value,avatarUrl:null!==(s=null===(u=g.statement(t,"vcard:hasPhoto"))||void 0===u?void 0:u.object.value)&&void 0!==s?s:null===(c=g.statement(t,"foaf:img"))||void 0===c?void 0:c.object.value,oidcIssuerUrl:null===(l=g.statement(t,"solid:oidcIssuer"))||void 0===l?void 0:l.object.value,publicTypeIndexUrl:null==w?void 0:w.object.value,privateTypeIndexUrl:null==x?void 0:x.object.value})));case 33:case"end":return e.stop()}}),e)}))),Pw.apply(this,arguments)}function Nw(){return Nw=i(regeneratorRuntime.mark((function e(t){var r,n,i,o,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(i=a.length>1&&void 0!==a[1]?a[1]:{}).required){e.next=3;break}return e.abrupt("return",Aw(t,i));case 3:return o=lb((function(e){return Aw(e,i)})),e.next=6,o(t);case 6:if(e.t2=n=e.sent,e.t1=null!==e.t2,!e.t1){e.next=10;break}e.t1=void 0!==n;case 10:if(!e.t1){e.next=14;break}e.t3=n,e.next=17;break;case 14:return e.next=16,o(t.replace(/\/$/,"").concat("/profile/card#me"));case 16:e.t3=e.sent;case 17:if(e.t4=r=e.t3,e.t0=null!==e.t4,!e.t0){e.next=21;break}e.t0=void 0!==r;case 21:if(!e.t0){e.next=25;break}e.t5=r,e.next=28;break;case 25:return e.next=27,o(vb(t).concat("/profile/card#me"));case 27:e.t5=e.sent;case 28:return e.abrupt("return",e.t5);case 29:case"end":return e.stop()}}),e)}))),Nw.apply(this,arguments)}function Lw(e){var t=function(e){return e.path&&e.path.startsWith("/")?e.path.match(/^\/[^/]*$/)?"/":"/".concat(Rb(e.path.split("/")).filter().slice(0,-1).join("/"),"/").replace("//","/"):null}(e);return e.protocol&&e.domain?"".concat(e.protocol,"://").concat(e.domain).concat(null!=t?t:"/"):t}function Cw(e){var t;if("@type"in e&&!("@value"in e)){e["@id"]=null!==(t=e["@id"])&&void 0!==t?t:cb();for(var r=0,n=Object.values(e);r<n.length;r++){var i=n[r];qm(i)&&Cw(i),Fm(i)&&i.forEach((function(e){return qm(e)&&Cw(e)}))}}}function Dw(e,t,r){return Mw.apply(this,arguments)}function Mw(){return(Mw=i(regeneratorRuntime.mark((function e(t,r,n){var i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null!==(i=n)&&void 0!==i?i:window.fetch.bind(n),o=t.storageUrls[0],a="".concat(o,"settings/").concat(r,"TypeIndex"),e.next=5,ww(a,{fetch:n});case 5:if(!e.sent){e.next=9;break}e.t0="".concat(o,"settings/").concat(r,"TypeIndex-").concat(cb()),e.next=10;break;case 9:e.t0=a;case 10:return e.abrupt("return",e.t0);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Uw(e,t,r){return Fw.apply(this,arguments)}function Fw(){return(Fw=i(regeneratorRuntime.mark((function e(t,r,n){var i,o,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==t.writableProfileUrl){e.next=2;break}throw new Error("Can't create type index without a writable profile document");case 2:return n=null!==(i=n)&&void 0!==i?i:window.fetch.bind(n),e.next=5,Dw(t,r,n);case 5:return o=e.sent,a="public"===r?"<> a <http://www.w3.org/ns/solid/terms#TypeIndex> .":"\n <> a\n <http://www.w3.org/ns/solid/terms#TypeIndex>,\n <http://www.w3.org/ns/solid/terms#UnlistedDocument> .\n ",s="\n INSERT DATA {\n <".concat(t.webId,"> <http://www.w3.org/ns/solid/terms#").concat(r,"TypeIndex> <").concat(o,"> .\n }\n "),e.next=10,aw(o,a,n);case 10:return e.next=12,Rw(t.writableProfileUrl,s,n);case 12:return e.abrupt("return",o);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Bw(e,t,r,n){return qw.apply(this,arguments)}function qw(){return(qw=i(regeneratorRuntime.mark((function e(t,r,n,i){var o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,uw(t,{fetch:i});case 2:return o=e.sent,a=Array.isArray(r)?r:[r],e.abrupt("return",a.map((function(e){return o.statements(void 0,"rdf:type","solid:TypeRegistration").filter((function(t){return o.contains(t.subject.value,"solid:forClass",e)})).map((function(e){return o.statements(e.subject.value,n)})).flat().map((function(e){return e.object.value})).filter((function(e){return!!e}))})).flat());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zw(){return(zw=i(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Uw(t,"public",r));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Jw(){return(Jw=i(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Uw(t,"private",r));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $w(){return($w=i(regeneratorRuntime.mark((function e(t,r,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Bw(t,r,"solid:instanceContainer",n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gw(){return(Gw=i(regeneratorRuntime.mark((function e(t,r,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Bw(t,r,"solid:instance",n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Hw={},Vw={"%uuid%":"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"},Qw=function(e){c(ExpectedQuadAssertionError,e);var t=p(ExpectedQuadAssertionError);function ExpectedQuadAssertionError(e){var r;return o(this,ExpectedQuadAssertionError),u(h(r=t.call(this,"Couldn't find the following triple: ".concat(bw(e)))),"expectedQuad",void 0),r.expectedQuad=e,r}return ExpectedQuadAssertionError}(Pm);function Ww(e,t){var r,n=b(e);try{var i=function(){var e=r.value,n=t.find((function(t){return n=t,function(e,t){if(e.termType!==t.termType)return!1;if("Literal"===e.termType&&"Literal"===t.termType){if(e.datatype.value!==t.datatype.value)return!1;if(!Yw(e.value))return"http://www.w3.org/2001/XMLSchema#dateTime"===e.datatype.value?new Date(e.value).getTime()===new Date(t.value).getTime():e.value===t.value}return Kw(e.value,t.value)}((r=e).object,n.object)&&Kw(r.subject.value,n.subject.value)&&Kw(r.predicate.value,n.predicate.value);var r,n}));if(!n)throw new Qw(e);rb(t,n)};for(n.s();!(r=n.n()).done;)i()}catch(e){n.e(e)}finally{n.f()}}function Yw(e){return/\[\[(.*\]\[)?([^\]]+)\]\]/.test(e)}function Kw(e,t){var r,n;return Yw(e)?(null!==(n=(r=Hw)[e])&&void 0!==n?n:r[e]=function(e){var t,r=[],n=[],i=e,o=b(fb(e,/\[\[((.*?)\]\[)?([^\]]+)\]\]/g));try{for(o.s();!(t=o.n()).done;){var a=t.value;a[2]&&r.push(a[2]),n.push(a[3]),i=i.replace(a[0],"%PATTERN".concat(n.length-1,"%"))}}catch(e){o.e(e)}finally{o.f()}i=i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");for(var s=0,u=Object.entries(n);s<u.length;s++){var c,l=v(u[s],2),f=l[0],h=l[1];i=i.replace("%PATTERN".concat(f,"%"),null!==(c=Vw[h])&&void 0!==c?c:h)}return new RegExp(i)}(e)).test(t):e===t}function Xw(){Hw={}}function Zw(e,t){return ex.apply(this,arguments)}function ex(){return(ex=i(regeneratorRuntime.mark((function e(t,r){var n,i,o,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Xw(),e.next=3,hw(t);case 3:return n=e.sent,e.next=6,hw(r);case 6:if(i=e.sent,o=mw(n),a=mw(i),s=function(e,t){return{success:e,message:t,expected:o,actual:a}},n.length===i.length){e.next=12;break}return e.abrupt("return",s(!1,"Expected ".concat(n.length," triples, found ").concat(i.length,".")));case 12:e.prev=12,Ww(n,i),e.next=21;break;case 16:if(e.prev=16,e.t0=e.catch(12),e.t0 instanceof Qw){e.next=20;break}throw e.t0;case 20:return e.abrupt("return",s(!1,e.t0.message));case 21:return e.abrupt("return",s(!0,"jsonld matches"));case 22:case"end":return e.stop()}}),e,null,[[12,16]])})))).apply(this,arguments)}function tx(e,t){var r;Xw();for(var n=jw(e,{normalizeBlankNodes:!0}),i=jw(t,{normalizeBlankNodes:!0}),o=function(r,n){return{success:r,message:n,expected:e,actual:t}},a=0,s=Object.keys(n);a<s.length;a++){var u=s[a];if(!(u in i))return o(!1,"Couldn't find expected ".concat(u," operation."));var c=Eb(n,u),l=Eb(i,u);if(c.length!==l.length)return o(!1,"Expected ".concat(c.length," ").concat(u," triples, found ").concat(l.length,"."));try{Ww(c,l)}catch(e){if(!(e instanceof Qw))throw e;return o(!1,"Couldn't find the following ".concat(u," triple: ").concat(bw(e.expectedQuad)))}}var f=null!==(r=Object.keys(i)[0])&&void 0!==r?r:null;return f?o(!1,"Did not expect to find ".concat(f," triples.")):o(!0,"sparql matches")}function rx(e,t){Xw();var r=kw(e,{normalizeBlankNodes:!0}),n=kw(t,{normalizeBlankNodes:!0}),i=function(r,n){return{success:r,message:n,expected:e,actual:t}};if(r.length!==n.length)return i(!1,"Expected ".concat(r.length," triples, found ").concat(n.length,"."));try{Ww(r,n)}catch(e){if(!(e instanceof Qw))throw e;return i(!1,e.message)}return i(!0,"turtle matches")}function nx(e,t){return ix.apply(this,arguments)}function ix(){return(ix=i(regeneratorRuntime.mark((function e(t,r){var n,i,o,a,s,u,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=null!==(n=r)&&void 0!==n?n:window.fetch.bind(window),e.next=3,r(t,{method:"HEAD"});case 3:if(s=e.sent,u=null!==(i=s.headers.get("Link"))&&void 0!==i?i:"",c=null!==(o=null===(a=u.match(/<([^>]+)>;\s*rel="acl"/))||void 0===a?void 0:a[1])&&void 0!==o?o:null){e.next=8;break}throw new Error("Could not find ACL Resource for '".concat(t,"'"));case 8:return e.abrupt("return",pb(db(t),c));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ox(e,t,r){return ax.apply(this,arguments)}function ax(){return(ax=i(regeneratorRuntime.mark((function e(t,r,n){var i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(i=n)||void 0===i){e.next=4;break}e.t0=i,e.next=7;break;case 4:return e.next=6,nx(t,r);case 6:e.t0=e.sent;case 7:return n=e.t0,e.next=10,lw(null!==(o=n)&&void 0!==o?o:"",{fetch:r});case 10:if(a=e.sent){e.next=13;break}return e.abrupt("return",ox(db(t),r));case 13:if(!a.isACPResource()){e.next=15;break}throw new Db(t,"ACP");case 15:return e.abrupt("return",a);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function sx(){return(sx=i(regeneratorRuntime.mark((function e(t,r){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nx(t,r);case 2:return n=e.sent,e.next=5,ox(t,r,n);case 5:return i=e.sent,e.abrupt("return",Hm({url:n,effectiveUrl:i.url,document:i}));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ux={turtle:function(e){var t=this._obj,r=this.assert.bind(this),n=rx(e,t);r(n.success,n.message,"",n.expected,n.actual)},sparql:function(e){var t=this._obj,r=this.assert.bind(this),n=tx(e,t);r(n.success,n.message,"",n.expected,n.actual)}};function cx(e,t){var r=e.success,n=t.context.utils;return{pass:r,message:r?function(){return[e.message,n.matcherHint(t.hint)].join("\n\n")}:function(){return[e.message,n.matcherHint(t.hint),["Expected: not ".concat(n.printExpected(t.expected)),"Received: ".concat(n.printReceived(t.received))].join("\n")].join("\n\n")}}}var lx={toEqualJsonLD:function(e,t){var r=this;return i(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Zw(t,e);case 2:return i=n.sent,n.abrupt("return",cx(i,{context:r,hint:"toEqualJsonLD",expected:t,received:e}));case 4:case"end":return n.stop()}}),n)})))()},toEqualSparql:function(e,t){return cx(tx(t,e),{context:this,hint:"toEqualSparql",expected:pw(t),received:pw(e)})},toEqualTurtle:function(e,t){return cx(rx(t,e),{context:this,hint:"toEqualTurtle",expected:vw(t),received:vw(e)})}};var fx=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200;o(this,e),u(this,"rawBody",void 0),u(this,"body",void 0),u(this,"bodyUsed",void 0),u(this,"headers",void 0),u(this,"ok",void 0),u(this,"redirected",void 0),u(this,"status",void 0),u(this,"statusText",void 0),u(this,"trailer",void 0),u(this,"type",void 0),u(this,"url",void 0),this.rawBody=t,this.headers=new Headers(r),this.status=n}var t,n,a,c,l;return s(e,[{key:"arrayBuffer",value:(l=i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("ResponseStub.arrayBuffer is not implemented");case 1:case"end":return e.stop()}}),e)}))),function(){return l.apply(this,arguments)})},{key:"blob",value:(c=i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("ResponseStub.blob is not implemented");case 1:case"end":return e.stop()}}),e)}))),function(){return c.apply(this,arguments)})},{key:"formData",value:(a=i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("ResponseStub.formData is not implemented");case 1:case"end":return e.stop()}}),e)}))),function(){return a.apply(this,arguments)})},{key:"json",value:(n=i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",JSON.parse(this.rawBody));case 1:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"text",value:(t=i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.rawBody);case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"clone",value:function(){return r({},this)}}]),e}();e.MalformedSolidDocumentError=Ab,e.NetworkRequestError=Pb,e.NotFoundError=Nb,e.ResponseStub=fx,e.SolidDocument=Wb,e.SolidStore=Bb,e.SolidThing=Fb,e.UnauthorizedError=Lb,e.UnsuccessfulNetworkRequestError=Cb,e.UnsupportedAuthorizationProtocolError=Db,e.compactJsonLDGraph=function(e){return Yb.apply(this,arguments)},e.createPrivateTypeIndex=function(e,t){return Jw.apply(this,arguments)},e.createPublicTypeIndex=function(e,t){return zw.apply(this,arguments)},e.createSolidDocument=aw,e.defineIRIPrefix=function(e,t){Mb[e]=t},e.expandIRI=Ub,e.fetchLoginUserProfile=function(e){return Nw.apply(this,arguments)},e.fetchSolidDocument=uw,e.fetchSolidDocumentACL=function(e,t){return sx.apply(this,arguments)},e.fetchSolidDocumentIfFound=lw,e.findContainerRegistrations=function(e,t,r){return $w.apply(this,arguments)},e.findInstanceRegistrations=function(e,t,r){return Gw.apply(this,arguments)},e.installChaiPlugin=function(){chai.use((function(e){return Object.entries(ux).forEach((function(t){var r=v(t,2),n=r[0],i=r[1];return e.Assertion.addMethod(n,i)}))}))},e.installJestPlugin=function(){expect.extend(lx)},e.isJsonLDGraph=Kb,e.jsonldEquals=Zw,e.jsonldToQuads=hw,e.mintJsonLDIdentifiers=function(e){return kb(Jm(e),(function(e){return Cw(e)}))},e.mockFetch=function(){var e=[],t={mockResponse:function(t,r,n){e.push(new fx(t,r,n))},mockNotFoundResponse:function(){e.push(new fx("",{},404))}},r=jest.fn(i(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",null!==(r=e.shift())&&void 0!==r?r:Lm("fetch mock called without response"));case 1:case"end":return t.stop()}}),t)}))));return Object.assign(r,t),r},e.normalizeSparql=pw,e.normalizeTurtle=vw,e.parseResourceSubject=function(e){var t=yb(e);return t?Hm({containerUrl:Lw(t),documentName:t.path?t.path.split("/").pop():null,resourceHash:t.fragment}):{}},e.parseTurtle=gw,e.quadToTurtle=bw,e.quadsToJsonLD=function(e){return yw.apply(this,arguments)},e.quadsToTurtle=mw,e.solidDocumentExists=ww,e.sparqlEquals=tx,e.sparqlToQuads=function(e){return _w.apply(this,arguments)},e.sparqlToQuadsSync=jw,e.turtleEquals=rx,e.turtleToQuads=Sw,e.turtleToQuadsSync=kw,e.updateSolidDocument=Rw,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
90
|
-
//# sourceMappingURL=noeldemartin-solid-utils.umd.js.map
|