meeting-pane 2.5.1-fa7f4e11 → 2.5.1-ffc0ff92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1 @@
1
- /*! For license information please see meetingPane.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.MeetingPane=t():e.MeetingPane=t()}(this,()=>(()=>{var e,t,r,n,i={46:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),a=0;a<r.length;a++)"default"!==r[a]&&i(t,e,r[a]);return o(t,e),t}),s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},c=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.solidLogicSingleton=void 0;var u=a(r(8339)),l=r(4208),d=(0,r(7939).createSolidLogic)({fetch:function(e,t){return s(void 0,void 0,void 0,function(){var r;return c(this,function(n){return r=t&&t.credentials&&"omit"==t.credentials,l.authSession.info.webId&&!r?[2,l.authSession.fetch(e,t)]:[2,window.fetch(e,t)]})})}},l.authSession);t.solidLogicSingleton=d,u.log("Unique quadstore initialized.")},79:e=>{e.exports=function(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},e.exports.__esModule=!0,e.exports.default=e.exports},149:(e,t,r)=>{"use strict";function n(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let r=e;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}r.d(t,{A:()=>n})},166:e=>{e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.__esModule=!0,e.exports.default=e.exports},182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.validate=t.v7=t.v6ToV1=t.v6=t.v5=t.v4=t.v3=t.v1ToV6=t.v1=t.stringify=t.parse=t.NIL=t.MAX=void 0;var n=r(2196);Object.defineProperty(t,"MAX",{enumerable:!0,get:function(){return n.default}});var i=r(3465);Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return i.default}});var o=r(1797);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return o.default}});var a=r(6011);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return a.default}});var s=r(1425);Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return s.default}});var c=r(6568);Object.defineProperty(t,"v1ToV6",{enumerable:!0,get:function(){return c.default}});var u=r(591);Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return u.default}});var l=r(8286);Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return l.default}});var d=r(4557);Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return d.default}});var p=r(6356);Object.defineProperty(t,"v6",{enumerable:!0,get:function(){return p.default}});var f=r(268);Object.defineProperty(t,"v6ToV1",{enumerable:!0,get:function(){return f.default}});var h=r(4299);Object.defineProperty(t,"v7",{enumerable:!0,get:function(){return h.default}});var m=r(9746);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return m.default}});var g=r(2770);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return g.default}})},251:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,c=(1<<s)-1,u=c>>1,l=-7,d=r?i-1:0,p=r?-1:1,f=e[t+d];for(d+=p,o=f&(1<<-l)-1,f>>=-l,l+=s;l>0;o=256*o+e[t+d],d+=p,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=p,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,c,u=8*o-i-1,l=(1<<u)-1,d=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,h=n?1:-1,m=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*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?p/c:p*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*c-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&s,f+=h,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[r+f]=255&a,f+=h,a/=256,u-=8);e[r+f-h]|=128*m}},268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1797),i=r(6011);t.default=function(e){const t=(r="string"==typeof e?(0,n.default)(e):e,Uint8Array.of((15&r[3])<<4|r[4]>>4&15,(15&r[4])<<4|(240&r[5])>>4,(15&r[5])<<4|15&r[6],r[7],(15&r[1])<<4|(240&r[2])>>4,(15&r[2])<<4|(240&r[3])>>4,16|(240&r[0])>>4,(15&r[0])<<4|(240&r[1])>>4,r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]));var r;return"string"==typeof e?(0,i.unsafeStringify)(t):t}},338:(e,t)=>{"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function i(e,t,r,i,o,a){return n((s=n(n(t,e),n(i,a)))<<(c=o)|s>>>32-c,r);var s,c}function o(e,t,r,n,o,a,s){return i(t&r|~t&n,e,t,o,a,s)}function a(e,t,r,n,o,a,s){return i(t&n|r&~n,e,t,o,a,s)}function s(e,t,r,n,o,a,s){return i(t^r^n,e,t,o,a,s)}function c(e,t,r,n,o,a,s){return i(r^(t|~n),e,t,o,a,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){const t=new Uint8Array(4*e.length);for(let r=0;r<4*e.length;r++)t[r]=e[r>>2]>>>r%4*8&255;return t}(function(e,t){const i=new Uint32Array(r(t)).fill(0);i.set(e),i[t>>5]|=128<<t%32,i[i.length-1]=t,e=i;let u=1732584193,l=-271733879,d=-1732584194,p=271733878;for(let t=0;t<e.length;t+=16){const r=u,i=l,f=d,h=p;u=o(u,l,d,p,e[t],7,-680876936),p=o(p,u,l,d,e[t+1],12,-389564586),d=o(d,p,u,l,e[t+2],17,606105819),l=o(l,d,p,u,e[t+3],22,-1044525330),u=o(u,l,d,p,e[t+4],7,-176418897),p=o(p,u,l,d,e[t+5],12,1200080426),d=o(d,p,u,l,e[t+6],17,-1473231341),l=o(l,d,p,u,e[t+7],22,-45705983),u=o(u,l,d,p,e[t+8],7,1770035416),p=o(p,u,l,d,e[t+9],12,-1958414417),d=o(d,p,u,l,e[t+10],17,-42063),l=o(l,d,p,u,e[t+11],22,-1990404162),u=o(u,l,d,p,e[t+12],7,1804603682),p=o(p,u,l,d,e[t+13],12,-40341101),d=o(d,p,u,l,e[t+14],17,-1502002290),l=o(l,d,p,u,e[t+15],22,1236535329),u=a(u,l,d,p,e[t+1],5,-165796510),p=a(p,u,l,d,e[t+6],9,-1069501632),d=a(d,p,u,l,e[t+11],14,643717713),l=a(l,d,p,u,e[t],20,-373897302),u=a(u,l,d,p,e[t+5],5,-701558691),p=a(p,u,l,d,e[t+10],9,38016083),d=a(d,p,u,l,e[t+15],14,-660478335),l=a(l,d,p,u,e[t+4],20,-405537848),u=a(u,l,d,p,e[t+9],5,568446438),p=a(p,u,l,d,e[t+14],9,-1019803690),d=a(d,p,u,l,e[t+3],14,-187363961),l=a(l,d,p,u,e[t+8],20,1163531501),u=a(u,l,d,p,e[t+13],5,-1444681467),p=a(p,u,l,d,e[t+2],9,-51403784),d=a(d,p,u,l,e[t+7],14,1735328473),l=a(l,d,p,u,e[t+12],20,-1926607734),u=s(u,l,d,p,e[t+5],4,-378558),p=s(p,u,l,d,e[t+8],11,-2022574463),d=s(d,p,u,l,e[t+11],16,1839030562),l=s(l,d,p,u,e[t+14],23,-35309556),u=s(u,l,d,p,e[t+1],4,-1530992060),p=s(p,u,l,d,e[t+4],11,1272893353),d=s(d,p,u,l,e[t+7],16,-155497632),l=s(l,d,p,u,e[t+10],23,-1094730640),u=s(u,l,d,p,e[t+13],4,681279174),p=s(p,u,l,d,e[t],11,-358537222),d=s(d,p,u,l,e[t+3],16,-722521979),l=s(l,d,p,u,e[t+6],23,76029189),u=s(u,l,d,p,e[t+9],4,-640364487),p=s(p,u,l,d,e[t+12],11,-421815835),d=s(d,p,u,l,e[t+15],16,530742520),l=s(l,d,p,u,e[t+2],23,-995338651),u=c(u,l,d,p,e[t],6,-198630844),p=c(p,u,l,d,e[t+7],10,1126891415),d=c(d,p,u,l,e[t+14],15,-1416354905),l=c(l,d,p,u,e[t+5],21,-57434055),u=c(u,l,d,p,e[t+12],6,1700485571),p=c(p,u,l,d,e[t+3],10,-1894986606),d=c(d,p,u,l,e[t+10],15,-1051523),l=c(l,d,p,u,e[t+1],21,-2054922799),u=c(u,l,d,p,e[t+8],6,1873313359),p=c(p,u,l,d,e[t+15],10,-30611744),d=c(d,p,u,l,e[t+6],15,-1560198380),l=c(l,d,p,u,e[t+13],21,1309151649),u=c(u,l,d,p,e[t+4],6,-145523070),p=c(p,u,l,d,e[t+11],10,-1120210379),d=c(d,p,u,l,e[t+2],15,718787259),l=c(l,d,p,u,e[t+9],21,-343485551),u=n(u,r),l=n(l,i),d=n(d,f),p=n(p,h)}return Uint32Array.of(u,l,d,p)}(function(e){if(0===e.length)return new Uint32Array;const t=new Uint32Array(r(8*e.length)).fill(0);for(let r=0;r<e.length;r++)t[r>>2]|=(255&e[r])<<r%4*8;return t}(e),8*e.length))}},437:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r(8921),i=r(8616),o=r(5108),a=r(9755),s=r(6320),c=r(9403),u=r(3078),l=r(7037),d=r(2915);const p=new u.A,f={supports:{[l.X.collections]:!1,[l.X.defaultGraphType]:!1,[l.X.equalsMethod]:!0,[l.X.identity]:!1,[l.X.id]:!0,[l.X.reversibleId]:!1,[l.X.variableType]:!0},blankNode:e=>new n.A(e),defaultGraph:()=>p,equals(e,t){return e===t||!e||!t||((0,d.aF)(e)||(0,d.aF)(t)?!(!(0,d.aF)(e)||!(0,d.aF)(t))&&this.equals(e.subject,t.subject)&&this.equals(e.predicate,t.predicate)&&this.equals(e.object,t.object)&&this.equals(e.graph,t.graph):!(!(0,d.D0)(e)||!(0,d.D0)(t))&&this.id(e)===this.id(t))},id(e){if(!e)return"undefined";if((0,d.aF)(e))return this.quadToNQ(e);switch(e.termType){case c.ic:return"defaultGraph";case c.P2:return s.A.toString(e);default:const t=this.termToNQ(e);if(t)return t;throw new Error(`Can't id term with type '${e.termType}'`)}},isQuad:e=>e instanceof a.A,literal(e,t){if("string"!=typeof e&&!t)return i.A.fromValue(e);const r="string"==typeof e?e:""+e;return"string"==typeof t?-1===t.indexOf(":")?new i.A(r,t):new i.A(r,null,this.namedNode(t)):new i.A(r,null,t)},namedNode:e=>new o.A(e),quad:(e,t,r,n)=>new a.A(e,t,r,n||p),triple(e,t,r,n){return this.quad(e,t,r,n)},quadToNQ(e){return`${this.termToNQ(e.subject)} ${this.termToNQ(e.predicate)} ${this.termToNQ(e.object)} ${this.termToNQ(e.graph)} .`},termToNQ(e){switch(e.termType){case c.$Q:return"_:"+e.value;case c.ic:return"";case c.S:return"<http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>";case c.QW:return i.A.toNT(e);case c.bD:case c.Kk:return"<"+e.value+">";case c.r0:return"("+e.elements.map(e=>this.termToNQ(e)).join(" ")+")";default:throw new Error(`Can't serialize nonstandard term type (was '${e.termType}')`)}},toNQ(e){return this.isQuad(e)?this.quadToNQ(e):this.termToNQ(e)},variable:e=>new s.A(e)}},458:(e,t,r)=>{"use strict";r.d(t,{w:()=>l});var n=r(8278),i=r(7493),o=r(149);function a(e){return(0,o.A)(e)}function s(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}class c{constructor(e){if(this._cached=new WeakMap,!function(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(a)}(e))throw new i.JWKSInvalid("JSON Web Key Set malformed");this._jwks=s(e)}async getKey(e,t){const{alg:r,kid:n}={...e,...t?.header},o=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new i.JOSENotSupported('Unsupported "alg" value for a JSON Web Key Set')}}(r),a=this._jwks.keys.filter(e=>{let t=o===e.kty;if(t&&"string"==typeof n&&(t=n===e.kid),t&&"string"==typeof e.alg&&(t=r===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t)switch(r){case"ES256":t="P-256"===e.crv;break;case"ES256K":t="secp256k1"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv;break;case"Ed25519":t="Ed25519"===e.crv;break;case"EdDSA":t="Ed25519"===e.crv||"Ed448"===e.crv}return t}),{0:s,length:c}=a;if(0===c)throw new i.JWKSNoMatchingKey;if(1!==c){const e=new i.JWKSMultipleMatchingKeys,{_cached:t}=this;throw e[Symbol.asyncIterator]=async function*(){for(const e of a)try{yield await u(t,e,r)}catch{}},e}return u(this._cached,s,r)}}async function u(e,t,r){const o=e.get(t)||e.set(t,{}).get(t);if(void 0===o[r]){const e=await(0,n.Og)({...t,ext:!0},r);if(e instanceof Uint8Array||"public"!==e.type)throw new i.JWKSInvalid("JSON Web Key Set members must be public keys");o[r]=e}return o[r]}function l(e){const t=new c(e),r=async(e,r)=>t.getKey(e,r);return Object.defineProperties(r,{jwks:{value:()=>s(t._jwks),enumerable:!0,configurable:!1,writable:!1}}),r}},471:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={highlightColor:"#7C4DFF",formBorderColor:"#888888",formHeadingColor:"#888888",lowProfileLinkColor:"#3B5998",formFieldNameBoxWidth:"8em",mediaModuleCanvasWidth:"640",mediaModuleCanvasHeight:"480",textInputSize:20,tabBorderRadius:"0.2em",textInputBackgroundColor:"#eef",textInputBackgroundColorUneditable:"#fff",textInputColor:"#000",textInputColorPending:"#888",defaultErrorBackgroundColor:"#fee",participationDefaultBackground:"white",basicMaxLength:"4096"}},506:(e,t,r)=>{"use strict";var n=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.matrixForQuery=function(e,t,r,n,a,c,u){var l=e.createElement("table"),d=e.createElement("tr");d.appendChild(e.createElement("td")).setAttribute("class","MatrixCorner"),l.appendChild(d),l.lastHeader=d;var p=[],f=[],h=function(e,t,r,n){for(;e.firstChild;)e.removeChild(e.firstChild);e.setAttribute("style",""),e.style.textAlign="center",c.cellFunction?c.cellFunction(e,t,r,n):(e.textContent=i.label(n),e.setAttribute("style","padding: 0.3em")),delete e.old},m=function(t){var r=t.toNT();if(f[r])return f[r];var n=e.createElement("tr"),a=n.appendChild(e.createElement("td"));a.setAttribute("style","padding: 0.3em;"),a.textContent=i.label(t),"NamedNode"===t.termType&&s.fetcher.nowOrWhenFetched(t.uri.split("#")[0],void 0,function(e,r,n){e&&(a.textContent=i.label(t))});for(var u=0;u<p.length;u++)h(n.appendChild(e.createElement("td")),o.fromNT(p[u]),t,null);n.dataValueNT=r,f[r]=n;for(var d=l.lastHeader.nextSibling;d;d=d.nextSibling)if(r>d.dataValueNT&&c&&c.yDecreasing||r<d.dataValueNT&&(!c||!c.yDecreasing))return l.insertBefore(n,d);return l.appendChild(n)},g=function(t){for(var r=t.toNT(),n=null,a=0;a<p.length;a++){if(p[a]===r)return a;if(r>p[a]&&c.xDecreasing||r<p[a]&&!c.xDecreasing){p=p.slice(0,a).concat([r]).concat(p.slice(a)),n=a;break}}null===n&&(n=p.length,p.push(r));for(var s=l.firstChild;s;s=s.nextSibling){var u=s.dataValueNT,d=e.createElement("td");if(d.style.textAlign="center",s===l.firstChild?d.textContent=i.label(t):h(d,t,o.fromNT(u),null),n===p.length-1)s.appendChild(d);else{for(var f=s.firstChild,m=0;m<n+1;m++)f=f.nextSibling;s.insertBefore(d,f)}}return n},v=function(){var e,t,r=[],n=[];if(c.set_y)for(var i=0;i<c.set_y.length;i++)n[c.set_y[i]]=!0;if(c.set_x)for(var a=0;a<c.set_x.length;a++)r[g(c.set_x[a])+1]=!0;for(var s=1;s<l.children.length;s++){e=l.children[s];for(var u=1;u<e.children.length;u++)if((t=e.children[u]).old){var d=o.fromNT(e.dataValueNT),m=o.fromNT(p[u-1]);h(t,m,d,null)}else n[e.dataValueNT]=!0,r[u]=!0}for(var v=0;v<l.children.length;v++)if(e=l.children[v],v>0&&!n[e.dataValueNT])delete f[e.dataValueNT],l.removeChild(e);else for(var y=e.children.length-1;y>0;y--){var b=e.children[y];r[y]||e.removeChild(b)}for(var w=[],x=0;x<p.length;x++)r[x+1]&&w.push(p[x]);p=w};l.refresh=function(){!function(){for(var e=1;e<l.children.length;e++)for(var t=l.children[e],r=1;r<t.children.length;r++)t.children[r].old=!0}(),s.query(t,y,void 0,v)};var y=function(e){var t=e[r.toString()],i=e[n.toString()],o=e[a.toString()],s=m(i),c=g(t),u=s.children[c+1];h(u,t,i,o)};if(c.set_y)for(var b=0;b<c.set_y.length;b++)m(c.set_y[b]);if(c.set_x)for(var w=0;w<c.set_x.length;w++)g(c.set_x[w]);return s.query(t,y,void 0,u),l};var i=a(r(7499)),o=a(r(2209));function a(e,t){if("function"==typeof WeakMap)var r=new WeakMap,i=new WeakMap;return(a=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return s;if(o=t?i:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var s=r(3451).solidLogicSingleton.store},579:(e,t,r)=>{var n=r(3738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},580:e=>{"use strict";var t=/["'&<>]/;e.exports=function(e){var r,n=""+e,i=t.exec(n);if(!i)return n;var o="",a=0,s=0;for(a=i.index;a<n.length;a++){switch(n.charCodeAt(a)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#39;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}s!==a&&(o+=n.substring(s,a)),s=a+1,o+=r}return s!==a?o+n.substring(s,a):o}},591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const n=r(338),i=r(2988);var o=r(2988);function a(e,t,r,o){return(0,i.default)(48,n.default,e,t,r,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),a.DNS=i.DNS,a.URL=i.URL,t.default=a},610:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(7991);const i=async(e,t)=>{const r=`SHA-${e.slice(-3)}`;return new Uint8Array(await n.A.subtle.digest(r,t))}},676:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(7991),i=r(2698),o=r(1575),a=r(5994),s=r(3139);async function c(e,t,r){if("sign"===r&&(t=await s.A.normalizePrivateKey(t,e)),"verify"===r&&(t=await s.A.normalizePublicKey(t,e)),(0,n.R)(t))return(0,i.Y)(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError((0,o.A)(t,...a.g));return n.A.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError((0,o.A)(t,...a.g,"Uint8Array","JSON Web Key"))}},691:e=>{e.exports=function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}},e.exports.__esModule=!0,e.exports.default=e.exports},733:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),a=0;a<r.length;a++)"default"!==r[a]&&i(t,e,r[a]);return o(t,e),t}),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ns=void 0;var c=s(r(5386)),u=a(r(2209));t.ns=(0,c.default)(u)},760:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.getExistingPrivateKey=function(e,t){return f.apply(this,arguments)},t.getExistingPublicKey=function(e,t){return p.apply(this,arguments)},t.getKeyIfExists=h,t.pubKeyUrl=t.privKeyUrl=void 0;var o=n(r(4756)),a=n(r(9293)),s=d(r(2902)),c=r(3451),u=d(r(2054)),l=r(4757);function d(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(d=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}function p(){return(p=(0,a.default)(o.default.mark(function e(t,r){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,h(t,r,"publicKey");case 1:return e.abrupt("return",e.sent);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function f(){return(f=(0,a.default)(o.default.mark(function e(t,r){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,h(t,r,"privateKey");case 1:return e.abrupt("return",e.sent);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function h(e,t,r){return m.apply(this,arguments)}function m(){return(m=(0,a.default)(o.default.mark(function e(t,r,n){var i,a,l;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,c.store.fetcher.load(r);case 1:return i=c.store.any(t,u.solid(n)),e.abrupt("return",null==i?void 0:i.value);case 2:if(e.prev=2,404!==(a=e.catch(0)).response.status){e.next=7;break}return s.log("createIfNotExists: doc does NOT exist, will create... "+r),e.prev=3,e.next=4,c.store.fetcher.webOperation("PUT",r,{data:"",contentType:"text/turtle"});case 4:e.next=6;break;case 5:throw e.prev=5,l=e.catch(3),s.log("createIfNotExists doc FAILED: "+r+": "+l),l;case 6:return delete c.store.fetcher.requested[r],e.abrupt("return",void 0);case 7:throw s.log("createIfNotExists doc FAILED: "+r+": "+a),a;case 8:case"end":return e.stop()}},e,null,[[0,2],[3,5]])}))).apply(this,arguments)}t.pubKeyUrl=function(e){var t;try{var r=(0,l.getRootIfPreferencesExist)(e);t="".concat(r,"/profile/keys/publicKey.ttl")}catch(e){s.error(e)}return t},t.privKeyUrl=function(e){var t;try{var r=(0,l.getRootIfPreferencesExist)(e);t="".concat(r,"/settings/keys/privateKey.ttl")}catch(e){s.error(e)}return t}},887:(e,t,r)=>{var n=r(6993),i=r(1791);e.exports=function(e,t,r,o,a){return new i(n().w(e,t,r,o),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},979:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.AccessController=void 0;var o=n(r(4756)),a=n(r(9293)),s=n(r(7383)),c=n(r(4579)),u=n(r(3693)),l=r(9922),d=r(2209),p=r(6971),f=r(4122),h=v(r(7499)),m=v(r(2902)),g=v(r(5148));function v(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(v=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}t.AccessController=function(){return(0,c.default)(function e(t,r,n,i,o,a,c,d,f,h,m,v){if((0,s.default)(this,e),this.subject=t,this.noun=r,this.context=n,this.statusElement=i,this.targetIsProtected=o,this.targetDoc=a,this.targetACLDoc=c,this.defaultHolder=d,this.defaultACLDoc=f,this.prospectiveDefaultHolder=h,this.store=m,this.dom=v,(0,u.default)(this,"mainCombo",void 0),(0,u.default)(this,"defaultsCombo",void 0),(0,u.default)(this,"isContainer",void 0),(0,u.default)(this,"defaultsDiffer",void 0),(0,u.default)(this,"rootElement",void 0),(0,u.default)(this,"isUsingDefaults",void 0),this.rootElement=v.createElement("div"),this.rootElement.setAttribute("style",g.aclGroupContent),this.isContainer="/"===a.uri.slice(-1),d&&f){this.isUsingDefaults=!0;var y=(0,l.adoptACLDefault)(this.targetDoc,c,d,f);this.mainCombo=new p.AccessGroups(a,c,this,y,{defaults:this.isContainer}),this.defaultsCombo=null,this.defaultsDiffer=!1}else this.isUsingDefaults=!1,this.mainCombo=new p.AccessGroups(a,c,this,m),this.defaultsCombo=new p.AccessGroups(a,c,this,m,{defaults:this.isContainer}),this.defaultsDiffer=!(0,l.sameACL)(this.mainCombo.aclMap,this.defaultsCombo.aclMap)},[{key:"isEditable",get:function(){return!this.isUsingDefaults}},{key:"render",value:function(){if(this.rootElement.innerHTML="",this.isUsingDefaults){if(this.renderStatus("The sharing for this ".concat(this.noun," is the default for folder ")),this.defaultHolder){var e=this.statusElement.appendChild(this.dom.createElement("a"));e.href=this.defaultHolder.uri,e.innerText=(0,f.shortNameForFolder)(this.defaultHolder)}}else!this.defaultsDiffer&&this.isContainer?this.renderStatus("This is also the default for things in this folder."):this.renderStatus("");return this.rootElement.appendChild(this.mainCombo.render()),this.defaultsCombo&&this.defaultsDiffer?(this.rootElement.appendChild(this.renderRemoveDefaultsController()),this.rootElement.appendChild(this.defaultsCombo.render())):this.isEditable&&this.isContainer&&this.rootElement.appendChild(this.renderAddDefaultsController()),!this.targetIsProtected&&this.isUsingDefaults?this.rootElement.appendChild(this.renderAddAclsController()):this.targetIsProtected||this.rootElement.appendChild(this.renderRemoveAclsController()),this.rootElement}},{key:"renderRemoveAclsController",value:function(){var e=this,t=this.dom.createElement("button");return t.innerText="Remove custom sharing settings for this ".concat(this.noun," -- just use default").concat(this.prospectiveDefaultHolder?" for ".concat(h.label(this.prospectiveDefaultHolder)):""),t.setAttribute("style",g.bigButton),t.addEventListener("click",function(){return e.removeAcls().then(function(){return e.render()}).catch(function(t){return e.renderStatus(t)})}),t}},{key:"renderAddAclsController",value:function(){var e=this,t=this.dom.createElement("button");return t.innerText="Set specific sharing for this ".concat(this.noun),t.setAttribute("style",g.bigButton),t.addEventListener("click",function(){return e.addAcls().then(function(){return e.render()}).catch(function(t){return e.renderStatus(t)})}),t}},{key:"renderAddDefaultsController",value:function(){var e=this,t=this.dom.createElement("div");t.setAttribute("style",g.defaultsController);var r=t.appendChild(this.dom.createElement("div"));r.innerText="Sharing for things within the folder currently tracks sharing for the folder.",r.setAttribute("style",g.defaultsControllerNotice);var n=t.appendChild(this.dom.createElement("button"));return n.innerText="Set the sharing of folder contents separately from the sharing for the folder",n.setAttribute("style",g.bigButton),n.addEventListener("click",function(){return e.addDefaults().then(function(){return e.render()})}),t}},{key:"renderRemoveDefaultsController",value:function(){var e=this,t=this.dom.createElement("div");t.setAttribute("style",g.defaultsController);var r=t.appendChild(this.dom.createElement("div"));r.innerText="Access to things within this folder:",r.setAttribute("style",g.defaultsControllerNotice);var n=t.appendChild(this.dom.createElement("button"));return n.innerText="Set default for folder contents to just track the sharing for the folder",n.setAttribute("style",g.bigButton),n.addEventListener("click",function(){return e.removeDefaults().then(function(){return e.render()}).catch(function(t){return e.renderStatus(t)})}),t}},{key:"renderTemporaryStatus",value:function(e){var t=this;this.statusElement.setAttribute("style",g.aclControlBoxStatusRevealed),this.statusElement.innerText=e,this.statusElement.setAttribute("style",g.temporaryStatusInit),setTimeout(function(){t.statusElement.setAttribute("style",g.temporaryStatusEnd)}),setTimeout(function(){t.statusElement.innerText=""},5e3)}},{key:"renderStatus",value:function(e){e||this.statusElement.setAttribute("style",g.aclControlBoxStatusRevealed),this.statusElement.innerText=e}},{key:"addAcls",value:(n=(0,a.default)(o.default.mark(function e(){var t,r,n,i=this;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.defaultHolder&&this.defaultACLDoc){e.next=1;break}return t="Unable to find defaults to copy",m.error(t),e.abrupt("return",Promise.reject(t));case 1:return(0,l.adoptACLDefault)(this.targetDoc,this.targetACLDoc,this.defaultHolder,this.defaultACLDoc).statements.forEach(function(e){return i.store.add(e.subject,e.predicate,e.object,i.targetACLDoc)}),e.prev=2,e.next=3,this.store.fetcher.putBack(this.targetACLDoc);case 3:return this.isUsingDefaults=!1,e.abrupt("return",Promise.resolve());case 4:return e.prev=4,n=e.catch(2),r=" Error writing back access control file! ".concat(n),m.error(r),e.abrupt("return",Promise.reject(r));case 5:case"end":return e.stop()}},e,this,[[2,4]])})),function(){return n.apply(this,arguments)})},{key:"addDefaults",value:(r=(0,a.default)(o.default.mark(function e(){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.defaultsCombo=new p.AccessGroups(this.targetDoc,this.targetACLDoc,this,this.store,{defaults:!0}),this.defaultsDiffer=!0;case 1:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})},{key:"removeAcls",value:(t=(0,a.default)(o.default.mark(function e(){var t,r,n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,this.store.fetcher.delete(this.targetACLDoc.uri,{});case 1:return this.isUsingDefaults=!0,e.prev=2,e.next=3,(0,l.getProspectiveHolder)(this.targetDoc.uri);case 3:this.prospectiveDefaultHolder=e.sent,e.next=5;break;case 4:e.prev=4,r=e.catch(2),m.warn(r);case 5:e.next=7;break;case 6:return e.prev=6,n=e.catch(0),t="Error deleting access control file: ".concat(this.targetACLDoc,": ").concat(n),m.error(t),e.abrupt("return",Promise.reject(t));case 7:case"end":return e.stop()}},e,this,[[0,6],[2,4]])})),function(){return t.apply(this,arguments)})},{key:"removeDefaults",value:(e=(0,a.default)(o.default.mark(function e(){var t,r;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.defaultsCombo,e.prev=1,this.defaultsCombo=null,this.defaultsDiffer=!1,e.next=2,this.save();case 2:e.next=4;break;case 3:return e.prev=3,r=e.catch(1),this.defaultsCombo=t,this.defaultsDiffer=!0,m.error(r),e.abrupt("return",Promise.reject(r));case 4:case"end":return e.stop()}},e,this,[[1,3]])})),function(){return e.apply(this,arguments)})},{key:"save",value:function(){var e=this,t=(0,d.graph)();this.isContainer?this.defaultsCombo&&this.defaultsDiffer?((0,l.makeACLGraphbyCombo)(t,this.targetDoc,this.mainCombo.byCombo,this.targetACLDoc,!0),(0,l.makeACLGraphbyCombo)(t,this.targetDoc,this.defaultsCombo.byCombo,this.targetACLDoc,!1,!0)):(0,l.makeACLGraphbyCombo)(t,this.targetDoc,this.mainCombo.byCombo,this.targetACLDoc,!0,!0):(0,l.makeACLGraphbyCombo)(t,this.targetDoc,this.mainCombo.byCombo,this.targetACLDoc,!0),t.fetcher=(0,d.fetcher)(t,{fetch:this.store.fetcher._fetch});var r=t.updater||new d.UpdateManager(t);return new Promise(function(n,i){r.put(e.targetACLDoc,t.statementsMatching(void 0,void 0,void 0,e.targetACLDoc),"text/turtle",function(r,o,a){if(!o)return i(new Error("ACL file save failed: ".concat(a)));e.store.fetcher.unload(e.targetACLDoc),e.store.add(t.statements),e.store.fetcher.requested[e.targetACLDoc.uri]="done",e.mainCombo.store=e.store,e.defaultsCombo&&(e.defaultsCombo.store=e.store),e.defaultsDiffer=!!e.defaultsCombo&&!(0,l.sameACL)(e.mainCombo.aclMap,e.defaultsCombo.aclMap),m.log("ACL modification: success!"),n()})})}}]);var e,t,r,n}()},983:e=>{var t={"prs.":100,"x-":200,"x.":300,"vnd.":400,default:900},r={nginx:10,apache:20,iana:40,default:30},n={application:1,font:2,default:0};e.exports=function(e,i="default"){if("application/octet-stream"===e)return 0;const[o,a]=e.split("/"),s=a.replace(/(\.|x-).*/,"$1");return(t[s]||t.default)+(r[i]||r.default)+(n[o]||n.default)+(1-e.length/100)}},1020:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(7493);function i(e,t){const r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"Ed25519":return{name:"Ed25519"};case"EdDSA":return{name:t.name};default:throw new n.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}},1033:function(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.FetchError=t.WebOperationError=t.NotEditableError=t.NotFoundError=t.SameOriginForbiddenError=t.CrossOriginForbiddenError=t.UnauthorizedError=void 0;var i=function(e){function t(t){var r=this.constructor,n=e.call(this,t)||this;return Object.setPrototypeOf(n,r.prototype),n.name=r.name,n}return n(t,e),t}(Error),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i);t.UnauthorizedError=o;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i);t.CrossOriginForbiddenError=a;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i);t.SameOriginForbiddenError=s;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i);t.NotFoundError=c;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i);t.NotEditableError=u;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i);t.WebOperationError=l;var d=function(e){function t(t,r){var n=e.call(this,r)||this;return n.status=t,n}return n(t,e),t}(i);t.FetchError=d},1041:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={buildTime:"2025-09-23T13:51:05Z",commit:"16dc9f9a75cc0bfc125ae8579a7cdab86a8f2536",npmInfo:{"'solid-ui'":"'2.6.1',",npm:"'10.8.2',",node:"'20.19.5',",acorn:"'8.15.0',",ada:"'2.9.2',",ares:"'1.34.5',",brotli:"'1.1.0',",cjs_module_lexer:"'2.1.0',",cldr:"'47.0',",icu:"'77.1',",llhttp:"'9.3.0',",modules:"'115',",napi:"'9',",nghttp2:"'1.61.0',",openssl:"'3.0.16',",simdutf:"'6.4.2',",tz:"'2025b',",undici:"'6.21.2',",unicode:"'16.0',",uv:"'1.46.0',",uvwasi:"'0.0.21',",v8:"'11.3.244.8-node.30',",zlib:"'1.3.1-470d3a2'","}":"}"}}},1059:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={Literal:1,Collection:3,Graph:4,NamedNode:5,BlankNode:6,Variable:7}},1085:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),a=0;a<r.length;a++)"default"!==r[a]&&i(t,e,r[a]);return o(t,e),t}),s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},c=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.SolidAuthnLogic=void 0;var u=r(2209),l=r(9288),d=a(r(8339)),p=r(2452),f=function(){function e(e){this.session=e}return Object.defineProperty(e.prototype,"authSession",{get:function(){return this.session},enumerable:!1,configurable:!0}),e.prototype.currentUser=function(){var e=(0,l.appContext)();return e.viewingNoAuthPage?(0,u.sym)(e.webId):this&&this.session&&this.session.info&&this.session.info.webId&&this.session.info.isLoggedIn?(0,u.sym)(this.session.info.webId):(0,l.offlineTestID)()},e.prototype.checkUser=function(e){return s(this,void 0,void 0,function(){var t,r,n,i,o,a;return c(this,function(s){switch(s.label){case 0:return(t=new URL(window.location.href).hash)&&window.localStorage.setItem("preLoginRedirectHash",t),this.session.events.on(p.EVENTS.SESSION_RESTORED,function(e){d.log("Session restored to ".concat(e)),document.location.toString()!==e&&history.replaceState(null,"",e)}),(r=new URL(window.location.href)).hash="",[4,this.session.handleIncomingRedirect({restorePreviousSession:!0,url:r.href})];case 1:return s.sent(),(n=window.localStorage.getItem("preLoginRedirectHash"))&&((i=new URL(window.location.href)).hash!==n&&(history.pushState?history.pushState(null,document.title,n):location.hash=n,i.hash=n),window.localStorage.setItem("preLoginRedirectHash","")),(o=(0,l.offlineTestID)())||((a=this.webIdFromSession(this.session.info))&&(o=this.saveUser(a)),o&&d.log("(Logged in as ".concat(o," by authentication)"))),[2,Promise.resolve(e?e(o):o)]}})})},e.prototype.saveUser=function(e,t){var r;if(e){r="string"==typeof e?e:e.uri;var n=(0,u.namedNode)(r);return t&&(t.me=n),n}return null},e.prototype.webIdFromSession=function(e){return(null==e?void 0:e.webId)&&e.isLoggedIn?e.webId:null},e}();t.SolidAuthnLogic=f},1132:(e,t,r)=>{var n=r(5901),i=r(9291),o=r(7122),a=r(1869);e.exports=function(e){return n(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},1156:e=>{e.exports=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=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},1255:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.creatorAndDate=j,t.creatorAndDateHorizontal=L,t.elementForImageURI=N,t.renderMessageEditor=M,t.renderMessageRow=function(e,t,r,n,i){return D.apply(this,arguments)},t.switchToEditor=function(e,t,r,n){return U.apply(this,arguments)};var o=n(r(4756)),a=n(r(3693)),s=n(r(9293)),c=r(4426),u=r(9552),l=r(3909),d=r(6472),p=S(r(2902)),f=r(4901),h=r(3451),m=r(7822),g=r(8406),v=S(r(2054)),y=S(r(1712)),b=S(r(5148)),w=S(r(7499)),x=S(r(1939)),_=r(1546),E=r(3565);function S(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(S=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}function A(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 k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach(function(t){(0,a.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function C(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 T(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)?T(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 T(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}var I=window.document,F=b.messageBodyStyle,P=w.label;function N(e,t){var r=I.createElement("img"),n="10";t.inlineImageHeightEms&&(n=(""+t.inlineImageHeightEms).trim()),r.setAttribute("style","max-height: "+n+"em; border-radius: 1em; margin: 0.7em;"),e&&r.setAttribute("src",e);var i=I.createElement("a");return i.setAttribute("href",e),i.setAttribute("target","images"),i.appendChild(r),x.makeDraggable(r,$rdf.sym(e)),i}var O=function(e,t){var r=I.createElement("a");return t&&t.uri&&(r.setAttribute("href",t.uri),r.addEventListener("click",x.openHrefInOutlineMode,!0),r.setAttribute("style","color: #3B5998; text-decoration: none; ")),r.textContent=e,r};function R(e){var t=h.store.any(e,v.foaf("nick"));return t?""+t.value:""+P(e)}function j(e,t,r,n){var i=e.appendChild(O(R(t),t));t.uri&&h.store.fetcher.nowOrWhenFetched(t.doc(),void 0,function(e,r){i.textContent=R(t)}),e.appendChild(I.createElement("br")),e.appendChild(O(r,n))}function L(e,t,r,n){var i=e.appendChild(O(P(t),t));t.uri&&h.store.fetcher.nowOrWhenFetched(t.doc(),void 0,function(e,r){i.textContent=R(t)});var o=e.appendChild(O(r,n));o.style.fontSize="80%",o.style.marginLeft="1em",e.appendChild(I.createElement("br"))}function D(){return D=(0,s.default)(o.default.mark(function e(t,r,n,i,a){var c,l,m,g,b,w,S,A,T,P,O,R,D,U,M,B,H,q,W,V,K,J,z,$,G,X,Y,Q,Z,ee,te,re,ne,ie,oe;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return re=function(e){return e?"#e8ffe8":"white"},c=!1,l="1"===i.colorizeByAuthor||!0===i.colorizeByAuthor,m=h.store.any(r,v.foaf("maker")),g=h.store.any(r,v.dct("created")),e.next=1,(0,d.mostRecentVersion)(r);case 1:return b=e.sent,w=h.store.any(b,v.foaf("maker")),S=m.uri===(null==w?void 0:w.uri)?b:r,A=h.store.any(S,v.sioc("content")),e.next=2,(0,d.allVersions)(S);case 2:(T=e.sent).length>1&&p.log("renderMessageRow versions: ",T.join(", ")),P=T.map(function(e){return h.store.each(e,v.sioc("has_reply"))}).flat(),O=null,R=[],D=C(P);try{for(D.s();!(U=D.n()).done;)M=U.value,h.store.holds(M,v.rdf("type"),v.sioc("Thread"))?(O=M,p.log("renderMessageRow: found thread: "+O)):R.push(M)}catch(e){D.e(e)}finally{D.f()}return R.length>1&&p.log("renderMessageRow: found normal replies: ",R),O||(O=h.store.any(null,v.sioc("has_member"),r)),B=h.store.any(S,$rdf.sym("".concat(_.SEC,"proofValue"))),(H=(0,_.getBlankMsg)()).id=S.uri,H.created=h.store.any(S,v.dct("created")).value,H.content=A.value,H.maker=m.uri,null!=B&&B.value?(0,E.getPublicKey)(m).then(function(e){e||p.warn("message is signed but "+m.uri+" is missing publicKey"),null!=e&&e.match(/[0-9A-Fa-f]{6}/g)?null!=B&&B.value&&!(0,_.verifySignature)(null==B?void 0:B.value,H,e)&&p.warn("invalid signature\n"+H.id):p.warn("invalid publicKey hex string\n"+m.uri+"\n"+e)}):(c=!0,p.warn(S.uri+" is unsigned")),e.next=3,(0,d.originalVersion)(r);case 3:return q=e.sent,W=!r.sameTerm(q),V=h.store.the(q,v.dct("created"),null,q.doc())||h.store.the(r,v.dct("created"),null,r.doc()),K=I.createElement("tr"),c&&K.setAttribute("style","background-color: red"),K.AJAR_date=V.value,K.AJAR_subject=r,J=I.createElement("td"),K.appendChild(J),i.authorDateOnLeft?j(J,m,x.shortDate(V.value),r):((z=I.createElement("img")).setAttribute("style","max-height: 2.5em; max-width: 2.5em; border-radius: 0.5em; margin: auto;"),x.setImage(z,m),J.appendChild(z)),$=x.shortDate(V.value),W&&($+=" ... "+x.shortDate(g.value)),G=K.appendChild(I.createElement("td")),i.authorDateOnLeft||L(G,m,$,r),X=A?A.value.trim():"??? no content?",Y=/^https?:\/[^ <>]*$/i.test(X),Q=null,Y?/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)&&i.expandImagesInline?(Z=N(X,i),G.appendChild(Z)):(ee=G.appendChild(I.createElement("a")),Q=ee.appendChild(I.createElement("p")),ee.href=X,Q.textContent=X,G.appendChild(ee)):(Q=I.createElement("p"),G.appendChild(Q),Q.textContent=X),Q&&(te=l?y.lightColorHash(m):re(n),Q.setAttribute("style",F+"background-color: "+te+";")),e.next=4,(0,u.sentimentStripLinked)(r,r.doc());case 4:return(ne=e.sent).children.length&&(G.appendChild(I.createElement("br")),G.appendChild(ne)),ie=I.createElement("td"),K.appendChild(ie),oe=x.button(I,f.icons.iconBase+"noun_243787.svg","..."),ie.appendChild(oe),oe.addEventListener("click",function(){var e=(0,s.default)(o.default.mark(function e(n){var s,c,l;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!K.toolTR){e.next=1;break}return K.parentNode.removeChild(K.toolTR),delete K.toolTR,e.abrupt("return");case 1:return s=I.createElement("tr"),e.next=2,(0,u.messageToolbar)(r,K,k(k({},a),{},{chatOptions:i}),t);case 2:(c=e.sent).style="border: 0.05em solid #888; border-radius: 0 0 0.7em 0.7em; border-top: 0; height:3.5em; background-color: #fff;",K.nextSibling?K.parentElement.insertBefore(s,K.nextSibling):K.parentElement.appendChild(s),K.toolTR=s,s.appendChild(I.createElement("td")),l=s.appendChild(I.createElement("td")),s.appendChild(I.createElement("td")),l.appendChild(c);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),O&&i.showThread&&ie.appendChild(x.button(I,f.icons.iconBase+"noun_1180164.svg","see thread",function(e){i.showThread(O,i)})),e.abrupt("return",K);case 5:case"end":return e.stop()}},e)})),D.apply(this,arguments)}function U(){return(U=(0,s.default)(o.default.mark(function e(t,r,n,i){var a,s,c,u,l,p,f;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.parentNode,c=M,u=n,l=a,p=i,f=n.options,e.next=1,(0,d.mostRecentVersion)(r);case 1:s=c(u,l,p,f,e.sent),a.insertBefore(s,t),s.originalRow=t,t.style.visibility="hidden";case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function M(e,t,r,n,i){function a(e){return u.apply(this,arguments)}function u(){return(u=(0,s.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,d(k.value,!0);case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function d(e,t){return w.apply(this,arguments)}function w(){return w=(0,s.default)(o.default.mark(function a(u,l){var d,f,h,m;return o.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return f=function(){return f=(0,s.default)(o.default.mark(function a(s,u){var d;return o.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=1,(0,c.insertMessageIntoTable)(e,t,s,!1,n,r);case 1:i?((d=P.originalRow).parentNode?d.parentNode.removeChild(d):(p.warn("No parentNode on old message "+d.textContent),d.style.backgroundColor="#fee",d.style.visibility="hidden"),P.parentNode.removeChild(P)):l&&(k.value="",k.setAttribute("style",F),k.disabled=!1,k.scrollIntoView(n.newestFirst),k.focus(),k.select());case 2:case"end":return o.stop()}},a)})),f.apply(this,arguments)},d=function(e,t){return f.apply(this,arguments)},l&&(k.setAttribute("style",F+"color: #bbb;"),k.disabled=!0),a.prev=1,a.next=2,e.updateMessage(u,i,null,n.thread);case 2:h=a.sent,a.next=4;break;case 3:return a.prev=3,m=a.catch(1),(r.statusArea||P).appendChild(x.errorMessageBlock(I,"Error writing message: "+m)),a.abrupt("return");case 4:return a.next=5,d(h,u);case 5:case"end":return a.stop()}},a,null,[[1,3]])})),w.apply(this,arguments)}function _(e){var r=t.chatDocument.dir().uri;x.uploadFiles(h.store.fetcher,e,r+"Files",r+"Pictures",function(){var e=(0,s.default)(o.default.mark(function e(t,r){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,d(r);case 1:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}())}var E,S,A=function(){var e=(0,s.default)(o.default.mark(function e(t){var r,n,i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=C(t),e.prev=1,r.s();case 2:if((n=r.n()).done){e.next=4;break}return i=n.value,e.next=3,d(i);case 3:e.next=2;break;case 4:e.next=6;break;case 5:e.prev=5,a=e.catch(1),r.e(a);case 6:return e.prev=6,r.f(),e.finish(6);case 7:case"end":return e.stop()}},e,null,[[1,5,6,7]])}));return function(t){return e.apply(this,arguments)}}();i?(E=h.store.anyValue(i,v.dct("created"),null,i.doc()),S=f.icons.iconBase+"noun_1180158.svg"):(S=f.icons.iconBase+"noun_383448.svg",E="9999-01-01T00:00:00Z");var k,T,P=I.createElement("tr"),N=I.createElement("td"),O=I.createElement("td"),R=I.createElement("td");P.appendChild(N),P.appendChild(O),P.appendChild(R),P.AJAR_date=E;var L={div:O,dom:I};return(0,m.ensureLoggedIn)(L).then(function(t){!function(){function t(){return(t=(0,s.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=1;break}return e.next=1,d(t.uri);case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}if(n.menuHandler){var r=x.button(I,f.icons.iconBase+"noun_243787.svg","More");r.setAttribute("style",b.buttonStyle+"float: right;"),R.appendChild(r)}n.menuHandler;var c=h.authn.currentUser();if(j(N,c,"",null),k=I.createElement("textarea"),O.innerHTML="",O.appendChild(k),k.rows=3,i&&(k.value=h.store.anyValue(i,v.sioc("content"),null,i.doc())),k.setAttribute("style",F+"background-color: #eef;"),k.addEventListener("keydown",function(){var e=(0,s.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("Enter"!==t.code){e.next=1;break}if(!(!t.shiftKey&&!n.shiftEnterSendsMessage||t.shiftKey&&n.shiftEnterSendsMessage)){e.next=1;break}return e.next=1,a(t);case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),!1),x.makeDropTarget(k,A,_),R.innerHTML="",(T=x.button(I,S,"Send")).style.float="right",T.addEventListener("click",function(e){return a()},!1),R.appendChild(T),i){var u=R.appendChild(x.cancelButton(I));u.style.float="left",u.addEventListener("click",function(e){return function(e){e.originalRow.style.visibility="visible",e.parentNode.removeChild(e)}(P)},!1),R.appendChild(u)}var l=e.dateFolder.leafDocumentFromDate(new Date);O.appendChild(g.media.cameraButton(I,h.store,function(){return $rdf.sym(l.dir().uri+"Image_"+Date.now()+".png")},function(e){return t.apply(this,arguments)})),y.recordParticipation(e.channel,e.channel.doc())}(),Object.assign(t,r),(0,l.findBookmarkDocument)(t).then(function(e){})}),P}},1297:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.cameraButton=function(e,t,r,n){var i,s=e.createElement("div"),c=l.button(e,p,"Take picture");function u(e){return d.apply(this,arguments)}function d(){return(d=(0,a.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:s.removeChild(i),s.appendChild(c),n(t);case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}return s.appendChild(c),c.addEventListener("click",function(n){s.removeChild(c),i=m(e,t,r,u),s.appendChild(i)}),s},t.cameraCaptureControl=m;var o=n(r(4756)),a=n(r(9293)),s=d(r(2902)),c=r(4901),u=d(r(5148)),l=d(r(1939));function d(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(d=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var p=c.icons.iconBase+"noun_Camera_1618446_000000.svg",f=c.icons.iconBase+"noun_479395.svg",h="image/png";function m(e,t,r,n){var i,o,a,d,p=e.createElement("div"),m=p.appendChild(e.createElement("table")),g=m.appendChild(e.createElement("tr")).appendChild(e.createElement("td"));g.setAttribute("colspan","4");var v=m.appendChild(e.createElement("tr"));v.appendChild(e.createElement("td")).appendChild(l.cancelButton(e)).addEventListener("click",function(e){E(),n(null)});var y=v.appendChild(e.createElement("td")).appendChild(l.button(e,f,"Retake"));y.addEventListener("click",function(e){g.removeChild(d),x()}),y.style.visibility="collapse";var b=v.appendChild(e.createElement("td")).appendChild(l.button(e,c.icons.iconBase+"noun_10636.svg","Snap"));b.addEventListener("click",function(){(d=e.createElement("canvas")).setAttribute("width",u.canvasWidth),d.setAttribute("height",u.canvasHeight),d.setAttribute("style",u.controlStyle),g.appendChild(d),d.getContext("2d").drawImage(a,0,0,d.width,d.height),a.parentNode.removeChild(a),d.toBlob(function(e){var t="got blob type ".concat(e.type," size ").concat(e.size);s.log(t),i=r(),o=e,w.style.visibility="visible",y.style.visibility="visible",b.style.visibility="collapse"},h)}),b.style.visibility="collapse";var w=v.appendChild(e.createElement("td")).appendChild(l.continueButton(e));function x(){if((a=g.appendChild(e.createElement("video"))).setAttribute("controls","1"),a.setAttribute("autoplay","1"),a.setAttribute("style",u.controlStyle),!navigator.mediaDevices)throw new Error("navigator.mediaDevices not available");navigator.mediaDevices.getUserMedia(_).then(function(e){a.srcObject=e,b.style.visibility="visible",w.style.visibility="collapse",y.style.visibility="collapse"})}w.addEventListener("click",function(e){!function(e,r){var i=e.type;s.log("Putting "+e.size+" bytes of "+i+" to "+r),t.fetcher.webOperation("PUT",r.uri,{data:e,contentType:i}).then(function(e){s.log("ok saved "+r),E(),n(r)},function(e){E(),alert(e)})}(o,i)}),w.style.visibility="collapse";var _={video:!0};function E(){a&&a.srcObject&&a.srcObject.getVideoTracks().forEach(function(e){return e.stop()})}return x(),p}},1302:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.errorMessageBlock=function(e,t,r,n){var i=e.createElement("div"),c=n||t instanceof Error?t:null;return c?(console.error("errorMessageBlock: ".concat(c," at: ").concat(c.stack||"??"),c),i.textContent=c.message):i.textContent=t,i.appendChild((0,o.cancelButton)(e,function(){i.parentNode&&i.parentNode.removeChild(i)})).style=a.errorCancelButton,i.setAttribute("style",a.errorMessageBlockStyle),i.style.backgroundColor=r||s.default.defaultErrorBackgroundColor,i};var o=r(1939),a=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var r,n,o={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return o;if(r=t){if(r.has(e))return r.get(e);r.set(e,o)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(n.get||n.set)?r(o,a,n):o[a]=e[a]);return o}(e)}(r(5148)),s=n(r(471))},1425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV1State=void 0;const n=r(2291),i=r(6011),o={};function a(e,t,r){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t<e.msecs&&(e.node=void 0),e.node||(e.node=r.slice(10,16),e.node[0]|=1,e.clockseq=16383&(r[8]<<8|r[9])),e.msecs=t,e}function s(e,t,r,n,i,o,a=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(o){if(a<0||a+16>o.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`)}else o=new Uint8Array(16),a=0;t??=Date.now(),r??=0,n??=16383&(e[8]<<8|e[9]),i??=e.slice(10,16);const s=(1e4*(268435455&(t+=122192928e5))+r)%4294967296;o[a++]=s>>>24&255,o[a++]=s>>>16&255,o[a++]=s>>>8&255,o[a++]=255&s;const c=t/4294967296*1e4&268435455;o[a++]=c>>>8&255,o[a++]=255&c,o[a++]=c>>>24&15|16,o[a++]=c>>>16&255,o[a++]=n>>>8|128,o[a++]=255&n;for(let e=0;e<6;++e)o[a++]=i[e];return o}t.updateV1State=a,t.default=function(e,t,r){let c;const u=e?._v6??!1;if(e){const t=Object.keys(e);1===t.length&&"_v6"===t[0]&&(e=void 0)}if(e)c=s(e.random??e.rng?.()??(0,n.default)(),e.msecs,e.nsecs,e.clockseq,e.node,t,r);else{const e=Date.now(),i=(0,n.default)();a(o,e,i),c=s(i,o.msecs,o.nsecs,u?void 0:o.clockseq,u?void 0:o.node,t,r)}return t??(0,i.unsafeStringify)(c)}},1436:(e,t,r)=>{"use strict";r.d(t,{D4:()=>s,WG:()=>i,lF:()=>o,y4:()=>a});var n=r(9095);const i=e=>{let t=e;"string"==typeof t&&(t=n.Rd.encode(t));const r=[];for(let e=0;e<t.length;e+=32768)r.push(String.fromCharCode.apply(null,t.subarray(e,e+32768)));return btoa(r.join(""))},o=e=>i(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),a=e=>{const t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r},s=e=>{let t=e;t instanceof Uint8Array&&(t=n.D0.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return a(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}}},1542:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(7991),i=r(7493);const o=async e=>{if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:t,keyUsages:r}=function(e){let t,r;switch(e.kty){case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new i.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new i.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"Ed25519":t={name:"Ed25519"},r=e.d?["sign"]:["verify"];break;case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new i.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new i.JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(e),o=[t,e.ext??!1,e.key_ops??r],a={...e};return delete a.alg,delete a.use,n.A.subtle.importKey("jwk",a,...o)}},1546:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SEC=void 0,t.getBlankMsg=function(){return{id:"",created:"",dateDeleted:"",content:"",maker:"",sig:""}},t.getMsgHash=c,t.serializeMsg=s,t.signMsg=function(e,t){return(0,i.bytesToHex)(n.schnorr.sign(c(e),t))},t.utf8Encoder=t.utf8Decoder=void 0,t.verifySignature=function(e,t,r){return n.schnorr.verify(e,c(t),r)};var n=r(8510),i=r(9175),o=r(2623),a=(t.utf8Decoder=new TextDecoder("utf-8"),t.utf8Encoder=new TextEncoder);function s(e){return JSON.stringify(e)}function c(e){var t=(0,o.sha256)(a.encode(s(e)));return(0,i.bytesToHex)(t)}t.SEC="https://w3id.org/security#"},1552:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.AUTOCOMPLETE_LIMIT=void 0,t.ESCOResultToBindings=_,t.bindingToTerm=function(e){var t=e.type.toLowerCase();if("uri"===t||"iri"===t)return c.store.sym(e.value);if("literal"===t)return e["xml:lang"]?new s.Literal(e.value,e["xml:lang"]):new s.Literal(e.value);throw new Error('bindingToTerm: Unexpected type "'.concat(e.type,'" in sparql binding}'))},t.fetcherOptionsJsonPublicData=t.escoParameters=t.dbpediaParameters=t.dbPediaTypeMap=void 0,t.getDbpediaDetails=j,t.getWikidataDetails=P,t.getWikidataDetailsOld=function(e,t,r){return O.apply(this,arguments)},t.getWikidataLocation=function(e,t,r){return R.apply(this,arguments)},t.instituteDetailsWikidataQuery=void 0,t.loadFromBindings=x,t.loadPublicDataThing=function(e,t,r){return F.apply(this,arguments)},t.queryESCODataByName=function(e,t,r){return E.apply(this,arguments)},t.queryPublicDataByName=function(e,t,r,n){return A.apply(this,arguments)},t.queryPublicDataConstruct=T,t.queryPublicDataSelect=k,t.wikidataParameters=t.wikidataOutgoingClassMap=t.wikidataIncomingClassMap=t.wikidataClasses=t.variableNameToPredicateMap=void 0;var o=n(r(4756)),a=n(r(9293)),s=r(2209),c=r(3451),u=p(r(2902)),l=p(r(2054)),d=r(7532);function p(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(p=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var f=t.AUTOCOMPLETE_LIMIT=200,h=/\$\(subject\)/g,m=(t.wikidataClasses={Corporation:"http://www.wikidata.org/entity/Q6881511",EducationalOrganization:"http://www.wikidata.org/entity/Q178706",GovernmentOrganization:"http://www.wikidata.org/entity/Q327333",MedicalOrganization:"http://www.wikidata.org/entity/Q4287745",MusicGroup:"http://www.wikidata.org/entity/Q32178211",NGO:"http://www.wikidata.org/entity/Q163740",Occupation:"http://www.wikidata.org/entity/Q28640",Project:"http://www.wikidata.org/entity/Q170584",ResearchOrganization:"http://www.wikidata.org/entity/Q31855",SportsOrganization:"http://www.wikidata.org/entity/Q4438121"},t.instituteDetailsWikidataQuery='prefix vcard: <http://www.w3.org/2006/vcard/ns#>\nCONSTRUCT\n{ wd:Q49108 vcard:fn ?itemLabel.\nwd:Q49108 rdf:type ?klass. ?klass rdfs:label ?klassLabel; rdfs:comment ?klassDescription .\nwd:Q49108 schema:logo ?logo;\n schema:image ?image;\n schema:logo ?sealImage;\n schema:subOrganization ?subsidiary .\n ?subsidiary rdfs:label ?subsidiaryLabel .\n ?supersidiary schema:subOrganization wd:Q49108 .\n ?supersidiary rdfs:label ?supersidiaryLabel .\n wd:Q49108 schema:location ?location .\n ?location schema:elevation ?elevation .\n ?location wdt:P131 ?region . ?region rdfs:label ?regionLabel .\n ?location wdt:P625 ?coordinates .\n ?location schema:country ?country . ?country rdfs:label ?countryLabel .\n}\nWHERE\n{ optional {wd:Q49108 rdfs:label ?itemLabel} .\n optional {wd:Q49108 wdt:P154 ?logo .}\n optional {wd:Q49108 wdt:P31 ?klass .}\n optional {wd:Q49108 wdt:P158 ?sealImage .}\n optional {wd:Q49108 wdt:P18 ?image .}\n\n optional { wd:Q49108 wdt:P355 ?subsidiary . }\n optional { ?supersidiary wdt:P355 wd:Q49108. }\n\n optional { wd:Q49108 wdt:P276 ?location .\n\n optional { ?location schema:eleveation ?elevation }\n optional { ?location wdt:P131 ?region }\n optional { ?location wdt:P625 ?coordinates }\n optional { ?location wdt:P17 ?country }\n }\n SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en,de,it". }\n}'),g=t.fetcherOptionsJsonPublicData={credentials:"omit",headers:new Headers({Accept:"application/json"})},v=(t.escoParameters={label:"ESCO",logo:c.store.sym("https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif"),searchByNameURI:"https://ec.europa.eu/esco/api/search?language=$(language)&type=occupation&text=$(name)"},t.dbpediaParameters={label:"DBPedia",logo:c.store.sym("https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/DBpediaLogo.svg/263px-DBpediaLogo.svg.png"),searchByNameQuery:'select distinct ?subject, ?name where {\n ?subject a $(targetClass); rdfs:label ?name\n FILTER regex(?name, "$(name)", "i")\n } LIMIT $(limit)',endpoint:"https://dbpedia.org/sparql/"}),y=(t.dbPediaTypeMap={AcademicInsitution:"http://umbel.org/umbel/rc/EducationalOrganization"},t.wikidataOutgoingClassMap={AcademicInsitution:"http://www.wikidata.org/entity/Q4671277",Enterprise:"http://www.wikidata.org/entity/Q6881511",Business:"http://www.wikidata.org/entity/Q4830453",NGO:"http://www.wikidata.org/entity/Q79913",CharitableOrganization:"http://www.wikidata.org/entity/Q708676",Insitute:"http://www.wikidata.org/entity/Q1664720"},t.wikidataParameters={label:"WikiData",limit:3e3,logo:c.store.sym("https://www.wikimedia.org/static/images/project-logos/wikidatawiki.png"),endpoint:"https://query.wikidata.org/sparql",searchByNameQuery:'SELECT ?subject ?name\n WHERE {\n ?klass wdt:P279* $(targetClass) .\n ?subject wdt:P31 ?klass .\n ?subject rdfs:label ?name.\n FILTER regex(?name, "$(name)", "i")\n } LIMIT $(limit) ',insitituteDetailsQuery:'CONSTRUCT\n{ wd:Q49108 schema:name ?itemLabel;\n schema:logo ?logo;\n schema:logo ?sealImage;\n schema:subOrganization ?subsidiary .\n ?subsidiary schema:name ?subsidiaryLabel .\n}\nWHERE\n{\n wd:Q49108 # rdfs:label ?itemLabel ;\n wdt:P154 ?logo;\n wdt:P158 ?sealImage ;\n wdt:P355 ?subsidiary .\n # ?subsidiary rdfs:label ?subsidiaryLabel .\n\n SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], fr". }\n}'}),b=t.wikidataIncomingClassMap={"http://www.wikidata.org/entity/Q15936437":l.schema("CollegeOrUniversity"),"http://www.wikidata.org/entity/Q1664720":l.schema("EducationalOrganization"),"http://www.wikidata.org/entity/Q43229":l.schema("Organization"),"http://www.wikidata.org/entity/Q3918":l.schema("CollegeOrUniversity"),"http://www.wikidata.org/entity/Q170584":l.schema("Project"),"http://www.wikidata.org/entity/Q327333":l.schema("GovernmentOrganization"),"http://www.wikidata.org/entity/Q2221906":l.schema("Place"),"http://www.wikidata.org/entity/Q167037":l.schema("Corporation")},w=t.variableNameToPredicateMap={targetClass:l.rdf("type"),sealImage:l.schema("logo"),shortName:l.foaf("nick"),subsidiary:l.schema("subOrganization"),city:l.vcard("locality"),state:l.vcard("region"),country:l.vcard("country-name"),homepage:l.foaf("homepage"),lat:l.schema("latitude"),long:l.schema("longitude")};function x(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:w,o={};u.log("loadFromBindings: subject: ".concat(t)),u.log(" doc: ".concat(n)),r.forEach(function(e){for(var t in e){var r=e[t],n=JSON.stringify(r);o[t]=o[t]||new Set,o[t].add(n)}});var a=function(r){var a=o[r];u.log(" results ".concat(r," -> ").concat(a)),a.forEach(function(o){var a,c=JSON.parse(o),d=c.type,p=c.value;if("uri"===d)a=e.sym(p);else{if("literal"!==d)throw new Error("loadFromBindings: unexpected type: ".concat(d));a=new s.Literal(p,c.language,c.datatype)}if("type"===r)b[p]?a=b[p]:u.warn("Unmapped Wikidata Class: "+p);else if("coordinates"===r){u.log(" @@@ hey a point: "+p);var f=/.*\(([-0-9.-]*) ([-0-9.-]*)\)/.exec(p);if(f){var h=l.xsd("float"),m=new s.Literal(f[1],null,h),g=new s.Literal(f[2],null,h);e.add(t,l.schema("longitude"),g,n),e.add(t,l.schema("latitude"),m,n)}else u.log("Bad coordinates syntax: "+p)}else{var v=i[r]||l.schema(r);e.add(t,v,a,n),u.log(" public data ".concat(v," ").concat(a,"."))}})};for(var c in o)a(c)}function _(e){return e._embedded.results.map(function(e){return{name:{value:e.title,type:"literal"},subject:{type:"IRI",value:e.uri}}})}function E(){return(E=(0,a.default)(o.default.mark(function e(t,r,n){var i,a,s,l,d,p;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n.searchByNameURI){e.next=1;break}throw new Error("Missing queryTarget.searchByNameURI on queryESCODataByName");case 1:return a=n.limit||f,s=n.searchByNameURI.replace("$(name)",t).replace("$(limit)",""+a).replace("$(targetClass)",r.toNT()),u.log("Querying ESCO data - uri: "+s),e.next=2,null===(i=c.store.fetcher)||void 0===i?void 0:i.webOperation("GET",s,g);case 2:if(l=e.sent,d=(null==l?void 0:l.responseText)||"",u.log(" Query result text"+d.slice(0,500)+"..."),0!==d.length){e.next=3;break}throw new Error("Wot no text back from ESCO query "+s);case 3:return p=JSON.parse(d),u.log(" ESCO Query result JSON"+JSON.stringify(p,null,4).slice(0,500)+"..."),e.abrupt("return",_(p));case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function S(e){var t=e.indexOf("SPARQL-QUERY");if(t<0)return e;u.warn(" ### Fixing JSON with wikidata error code injection "+e.slice(t,t+200));var r=e.lastIndexOf("}, {");return e.slice(0,r)+" } ] } } "}function A(){return(A=(0,a.default)(o.default.mark(function e(t,r,n,i){var a,s,l,p,h,m,v,y,b,w,x,E;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=function(e){var n=i.limit||f;return e.replace("$(name)",t).replace("$(limit)",""+n).replace("$(language)",s).replace("$(targetClass)",r.toNT())},r){e.next=1;break}throw new Error("queryPublicDataByName: No class provided");case 1:return e.next=2,(0,d.getPreferredLanguages)();case 2:if(x=e.sent){e.next=3;break}x=d.defaultPreferredLanguages;case 3:if(s=x[0]||"en",!i.searchByNameQuery){e.next=4;break}return l=a(i.searchByNameQuery),u.log("Querying public data - sparql: "+l),e.abrupt("return",k(l,i));case 4:if(!i.searchByNameURI){e.next=13;break}return p=a(i.searchByNameURI),e.prev=5,e.next=6,null===(m=c.store.fetcher)||void 0===m?void 0:m.webOperation("GET",p,g);case 6:h=e.sent,e.next=8;break;case 7:throw e.prev=7,E=e.catch(5),new Error("Exception when trying to fetch ".concat(p," \n ").concat(E));case 8:if(v=h.responseText||"",200===h.status){e.next=9;break}throw new Error("HTTP error status ".concat(h.status," trying to fetch ").concat(p," "));case 9:if(u.log(" Query result text"+v.slice(0,500)+"..."),0!==v.length){e.next=10;break}throw new Error("queryPublicDataByName: No text back from public data query "+p);case 10:if(y=S(v),b=JSON.parse(y),u.log(" API Query result JSON"+JSON.stringify(b,null,4).slice(0,500)+"..."),!b._embedded){e.next=11;break}return u.log(" Looks like ESCO"),w=_(b),e.abrupt("return",w);case 11:throw alert("Code me: unrecognized API return format"),new Error("*** Need to add code to parse unrecognized API JSON return\n".concat(JSON.stringify(b,null,4)));case 12:e.next=14;break;case 13:throw new Error("Query source must have either rest API or SPARQL endpoint.");case 14:case"end":return e.stop()}},e,null,[[5,7]])}))).apply(this,arguments)}function k(e,t){return C.apply(this,arguments)}function C(){return(C=(0,a.default)(o.default.mark(function e(t,r){var n,i,a,s,l,d,p,f,h,m;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r.endpoint){e.next=1;break}throw new Error("Missing queryTarget.endpoint required for queryPublicDataSelect");case 1:return(i=new URL(r.endpoint)).searchParams.append("query",t),a=i.href,u.log(" queryPublicDataSelect uri: "+a),(s=new Headers).append("Accept","application/json"),l={credentials:"omit",headers:s},e.next=2,null===(n=c.store.fetcher)||void 0===n?void 0:n.webOperation("GET",a,l);case 2:if(d=e.sent,0!==(p=(null==d?void 0:d.responseText)||"").length){e.next=3;break}throw new Error("No text back from query "+a);case 3:return f=S(p),h=JSON.parse(f),u.log(" Query result JSON"+JSON.stringify(h,null,4).slice(0,100)+"..."),m=h.results.bindings,e.abrupt("return",m);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function T(e,t,r){return I.apply(this,arguments)}function I(){return(I=(0,a.default)(o.default.mark(function e(t,r,n){var i,a,l,d,p,f,h,m;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u.log("queryPublicDataConstruct: sparql:",t),n.endpoint){e.next=1;break}throw new Error("Missing queryTarget.endpoint required for queryPublicDataConstruct");case 1:return(a=new URL(n.endpoint)).searchParams.append("query",t),l=a.href,u.log(" queryPublicDataConstruct uri: "+l),(d=new Headers).append("Accept","text/turtle"),p={credentials:"omit",headers:d},e.next=2,null===(i=c.store.fetcher)||void 0===i?void 0:i.webOperation("GET",l,p);case 2:if(f=e.sent,h=(null==f?void 0:f.responseText)||"No response text?",m=h.length>500?h.slice(0,200)+" ... "+h.slice(-200):h,u.log(" queryPublicDataConstruct result text:"+m),0!==h.length){e.next=3;break}throw new Error("queryPublicDataConstruct: No text back from construct query:"+l);case 3:(0,s.parse)(h,c.store,r.uri,"text/turtle");case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function F(){return(F=(0,a.default)(o.default.mark(function e(t,r,n){var i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.uri.startsWith("https://dbpedia.org/resource/")){e.next=1;break}return e.abrupt("return",j(t,r,n));case 1:if(!n.uri.match(/^https?:\/\/www\.wikidata\.org\/entity\/.*/)){e.next=3;break}return e.next=2,P(t,r,n);case 2:e.next=4;break;case 3:return i=n.uri.startsWith("http:")?t.sym("https:"+n.uri.slice(5)):n,(a=new Headers).append("Accept","text/turtle"),e.abrupt("return",t.fetcher.load(i,{credentials:"omit",headers:a}));case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function P(e,t,r){return N.apply(this,arguments)}function N(){return(N=(0,a.default)(o.default.mark(function e(t,r,n){var i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=/wd:Q49108/g,a=m.replace(i,n.toNT()),e.next=1,T(a,n,y);case 1:u.log("getWikidataDetails: loaded.",n);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function O(){return(O=(0,a.default)(o.default.mark(function e(t,r,n){var i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i='select distinct * where {\n optional { $(subject) wdt:P31 ?targetClass } # instance of\n optional { $(subject) wdt:P154 ?logo }\n optional { $(subject) wdt:P158 ?sealImage }\n# optional { $(subject) wdt:P159 ?headquartersLocation }\n\noptional { $(subject) wdt:P17 ?country }\noptional { $(subject) wdt:P18 ?image }\noptional { $(subject) wdt:P1813 ?shortName }\n\noptional { $(subject) wdt:P355 ?subsidiary }\n# SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en,de,it" }\n}'.replace(h,n.toNT()),e.next=1,k(i,y);case 1:a=e.sent,x(t,n,a,n.doc());case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function R(){return(R=(0,a.default)(o.default.mark(function e(t,r,n){var i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i='select distinct * where {\n\n $(subject) wdt:P276 ?location .\n\n optional { ?location wdt:P2044 ?elevation }\n optional { ?location wdt:P131 ?region }\n optional { ?location wdt:P625 ?coordinates }\noptional { ?location wdt:P17 ?country }\n\n# SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en,de,it" }\n}'.replace(h,n.toNT()),u.log(" location query sparql:"+i),e.next=1,k(i,y);case 1:a=e.sent,u.log(" location query bindings:",a),x(t,n,a,n.doc());case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function j(e,t,r){return L.apply(this,arguments)}function L(){return(L=(0,a.default)(o.default.mark(function e(t,r,n){var i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i="select distinct ?city, ?state, ?country, ?homepage, ?logo, ?lat, ?long, WHERE {\n OPTIONAL { <".concat(n,"> <http://dbpedia.org/ontology/city> ?city }\n OPTIONAL { ").concat(n," <http://dbpedia.org/ontology/state> ?state }\n OPTIONAL { ").concat(n," <http://dbpedia.org/ontology/country> ?country }\n OPTIONAL { ").concat(n," foaf:homepage ?homepage }\n OPTIONAL { ").concat(n," foaf:lat ?lat; foaf:long ?long }\n OPTIONAL { ").concat(n," <http://dbpedia.org/ontology/country> ?country }\n }"),e.next=1,k(i,v);case 1:a=e.sent,x(t,n,a,n.doc()),u.log("Finished getDbpediaDetails.");case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}},1575:(e,t,r)=>{"use strict";function n(e,t,...r){if((r=r.filter(Boolean)).length>2){const t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}r.d(t,{A:()=>i,t:()=>o});const i=(e,...t)=>n("Key must be ",e,...t);function o(e,t,...r){return n(`Key for the ${e} algorithm must be `,t,...r)}},1705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DER=t.DERErr=void 0,t._splitEndoScalar=u,t._normFnElement=y,t.weierstrassN=b,t.SWUFpSqrtRatio=x,t.mapToCurveSimpleSWU=function(e,t){(0,s.validateField)(e);const{A:r,B:n,Z:i}=t;if(!e.isValid(r)||!e.isValid(n)||!e.isValid(i))throw new Error("mapToCurveSimpleSWU: invalid opts");const o=x(e,i);if(!e.isOdd)throw new Error("Field does not have .isOdd()");return t=>{let a,c,u,l,d,p,f,h;a=e.sqr(t),a=e.mul(a,i),c=e.sqr(a),c=e.add(c,a),u=e.add(c,e.ONE),u=e.mul(u,n),l=e.cmov(i,e.neg(c),!e.eql(c,e.ZERO)),l=e.mul(l,r),c=e.sqr(u),p=e.sqr(l),d=e.mul(p,r),c=e.add(c,d),c=e.mul(c,u),p=e.mul(p,l),d=e.mul(p,n),c=e.add(c,d),f=e.mul(a,u);const{isValid:m,value:g}=o(c,p);h=e.mul(a,t),h=e.mul(h,g),f=e.cmov(f,u,m),h=e.cmov(h,g,m);const v=e.isOdd(t)===e.isOdd(h);h=e.cmov(e.neg(h),h,v);const y=(0,s.FpInvertBatch)(e,[l],!0)[0];return f=e.mul(f,y),{x:f,y:h}}},t.ecdh=E,t.ecdsa=S,t.weierstrassPoints=function(e){const{CURVE:t,curveOpts:r}=A(e);return function(e,t){const{Fp:r,Fn:n}=t;const i=k(r,e.a,e.b);return Object.assign({},{CURVE:e,Point:t,ProjectivePoint:t,normPrivateKeyToScalar:e=>y(n,e),weierstrassEquation:i,isWithinCurveOrder:function(e){return(0,o.inRange)(e,h,n.ORDER)}})}(e,b(t,r))},t._legacyHelperEquat=k,t.weierstrass=function(e){const{CURVE:t,curveOpts:r,hash:n,ecdsaOpts:i}=function(e){const{CURVE:t,curveOpts:r}=A(e),n={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:r,hash:e.hash,ecdsaOpts:n}}(e);return function(e,t){const r=t.Point;return Object.assign({},t,{ProjectivePoint:r,CURVE:Object.assign({},e,(0,s.nLength)(r.Fn.ORDER,r.Fn.BITS))})}(e,S(b(t,r),n,i))};const n=r(9615),i=r(9175),o=r(8627),a=r(2422),s=r(4967),c=(e,t)=>(e+(e>=0?t:-t)/m)/t;function u(e,t,r){const[[n,i],[a,s]]=t,u=c(s*e,r),l=c(-i*e,r);let d=e-u*n-l*a,p=-u*i-l*s;const m=d<f,g=p<f;m&&(d=-d),g&&(p=-p);const v=(0,o.bitMask)(Math.ceil((0,o.bitLen)(r)/2))+h;if(d<f||d>=v||p<f||p>=v)throw new Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:m,k1:d,k2neg:g,k2:p}}function l(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function d(e,t){const r={};for(let n of Object.keys(t))r[n]=void 0===e[n]?t[n]:e[n];return(0,o._abool2)(r.lowS,"lowS"),(0,o._abool2)(r.prehash,"prehash"),void 0!==r.format&&l(r.format),r}class p extends Error{constructor(e=""){super(e)}}t.DERErr=p,t.DER={Err:p,_tlv:{encode:(e,r)=>{const{Err:n}=t.DER;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&r.length)throw new n("tlv.encode: unpadded data");const i=r.length/2,a=(0,o.numberToHexUnpadded)(i);if(a.length/2&128)throw new n("tlv.encode: long form length too big");const s=i>127?(0,o.numberToHexUnpadded)(a.length/2|128):"";return(0,o.numberToHexUnpadded)(e)+s+a+r},decode(e,r){const{Err:n}=t.DER;let i=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(r.length<2||r[i++]!==e)throw new n("tlv.decode: wrong tlv");const o=r[i++];let a=0;if(128&o){const e=127&o;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");const t=r.subarray(i,i+e);if(t.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===t[0])throw new n("tlv.decode(long): zero leftmost byte");for(const e of t)a=a<<8|e;if(i+=e,a<128)throw new n("tlv.decode(long): not minimal encoding")}else a=o;const s=r.subarray(i,i+a);if(s.length!==a)throw new n("tlv.decode: wrong value length");return{v:s,l:r.subarray(i+a)}}},_int:{encode(e){const{Err:r}=t.DER;if(e<f)throw new r("integer: negative integers are not allowed");let n=(0,o.numberToHexUnpadded)(e);if(8&Number.parseInt(n[0],16)&&(n="00"+n),1&n.length)throw new r("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:r}=t.DER;if(128&e[0])throw new r("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new r("invalid signature integer: unnecessary leading zero");return(0,o.bytesToNumberBE)(e)}},toSig(e){const{Err:r,_int:n,_tlv:i}=t.DER,a=(0,o.ensureBytes)("signature",e),{v:s,l:c}=i.decode(48,a);if(c.length)throw new r("invalid signature: left bytes after parsing");const{v:u,l}=i.decode(2,s),{v:d,l:p}=i.decode(2,l);if(p.length)throw new r("invalid signature: left bytes after parsing");return{r:n.decode(u),s:n.decode(d)}},hexFromSig(e){const{_tlv:r,_int:n}=t.DER,i=r.encode(2,n.encode(e.r))+r.encode(2,n.encode(e.s));return r.encode(48,i)}};const f=BigInt(0),h=BigInt(1),m=BigInt(2),g=BigInt(3),v=BigInt(4);function y(e,t){const{BYTES:r}=e;let n;if("bigint"==typeof t)n=t;else{let i=(0,o.ensureBytes)("private key",t);try{n=e.fromBytes(i)}catch(e){throw new Error(`invalid private key: expected ui8a of size ${r}, got ${typeof t}`)}}if(!e.isValidNot0(n))throw new Error("invalid private key: out of range [1..N-1]");return n}function b(e,t={}){const r=(0,a._createCurveFields)("weierstrass",e,t),{Fp:n,Fn:i}=r;let s=r.CURVE;const{h:c,n:l}=s;(0,o._validateObject)(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:d}=t;if(d&&(!n.is0(s.a)||"bigint"!=typeof d.beta||!Array.isArray(d.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const p=_(n,i);function m(){if(!n.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}const b=t.toBytes||function(e,t,r){const{x:i,y:a}=t.toAffine(),s=n.toBytes(i);if((0,o._abool2)(r,"isCompressed"),r){m();const e=!n.isOdd(a);return(0,o.concatBytes)(w(e),s)}return(0,o.concatBytes)(Uint8Array.of(4),s,n.toBytes(a))},x=t.fromBytes||function(e){(0,o._abytes2)(e,void 0,"Point");const{publicKey:t,publicKeyUncompressed:r}=p,i=e.length,a=e[0],s=e.subarray(1);if(i!==t||2!==a&&3!==a){if(i===r&&4===a){const e=n.BYTES,t=n.fromBytes(s.subarray(0,e)),r=n.fromBytes(s.subarray(e,2*e));if(!S(t,r))throw new Error("bad point: is not on curve");return{x:t,y:r}}throw new Error(`bad point: got length ${i}, expected compressed=${t} or uncompressed=${r}`)}{const e=n.fromBytes(s);if(!n.isValid(e))throw new Error("bad point: is not on curve, wrong x");const t=E(e);let r;try{r=n.sqrt(t)}catch(e){const t=e instanceof Error?": "+e.message:"";throw new Error("bad point: is not on curve, sqrt error"+t)}return m(),!(1&~a)!==n.isOdd(r)&&(r=n.neg(r)),{x:e,y:r}}};function E(e){const t=n.sqr(e),r=n.mul(t,e);return n.add(n.add(r,n.mul(e,s.a)),s.b)}function S(e,t){const r=n.sqr(t),i=E(e);return n.eql(r,i)}if(!S(s.Gx,s.Gy))throw new Error("bad curve params: generator point");const A=n.mul(n.pow(s.a,g),v),k=n.mul(n.sqr(s.b),BigInt(27));if(n.is0(n.add(A,k)))throw new Error("bad curve params: a or b");function C(e,t,r=!1){if(!n.isValid(t)||r&&n.is0(t))throw new Error(`bad point coordinate ${e}`);return t}function T(e){if(!(e instanceof O))throw new Error("ProjectivePoint expected")}function I(e){if(!d||!d.basises)throw new Error("no endo");return u(e,d.basises,i.ORDER)}const F=(0,o.memoized)((e,t)=>{const{X:r,Y:i,Z:o}=e;if(n.eql(o,n.ONE))return{x:r,y:i};const a=e.is0();null==t&&(t=a?n.ONE:n.inv(o));const s=n.mul(r,t),c=n.mul(i,t),u=n.mul(o,t);if(a)return{x:n.ZERO,y:n.ZERO};if(!n.eql(u,n.ONE))throw new Error("invZ was invalid");return{x:s,y:c}}),P=(0,o.memoized)(e=>{if(e.is0()){if(t.allowInfinityPoint&&!n.is0(e.Y))return;throw new Error("bad point: ZERO")}const{x:r,y:i}=e.toAffine();if(!n.isValid(r)||!n.isValid(i))throw new Error("bad point: x or y not field elements");if(!S(r,i))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function N(e,t,r,i,o){return r=new O(n.mul(r.X,e),r.Y,r.Z),t=(0,a.negateCt)(i,t),r=(0,a.negateCt)(o,r),t.add(r)}class O{constructor(e,t,r){this.X=C("x",e),this.Y=C("y",t,!0),this.Z=C("z",r),Object.freeze(this)}static CURVE(){return s}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw new Error("invalid affine point");if(e instanceof O)throw new Error("projective point not allowed");return n.is0(t)&&n.is0(r)?O.ZERO:new O(t,r,n.ONE)}static fromBytes(e){const t=O.fromAffine(x((0,o._abytes2)(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return O.fromBytes((0,o.ensureBytes)("pointHex",e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return j.createCache(this,e),t||this.multiply(g),this}assertValidity(){P(this)}hasEvenY(){const{y:e}=this.toAffine();if(!n.isOdd)throw new Error("Field doesn't support isOdd");return!n.isOdd(e)}equals(e){T(e);const{X:t,Y:r,Z:i}=this,{X:o,Y:a,Z:s}=e,c=n.eql(n.mul(t,s),n.mul(o,i)),u=n.eql(n.mul(r,s),n.mul(a,i));return c&&u}negate(){return new O(this.X,n.neg(this.Y),this.Z)}double(){const{a:e,b:t}=s,r=n.mul(t,g),{X:i,Y:o,Z:a}=this;let c=n.ZERO,u=n.ZERO,l=n.ZERO,d=n.mul(i,i),p=n.mul(o,o),f=n.mul(a,a),h=n.mul(i,o);return h=n.add(h,h),l=n.mul(i,a),l=n.add(l,l),c=n.mul(e,l),u=n.mul(r,f),u=n.add(c,u),c=n.sub(p,u),u=n.add(p,u),u=n.mul(c,u),c=n.mul(h,c),l=n.mul(r,l),f=n.mul(e,f),h=n.sub(d,f),h=n.mul(e,h),h=n.add(h,l),l=n.add(d,d),d=n.add(l,d),d=n.add(d,f),d=n.mul(d,h),u=n.add(u,d),f=n.mul(o,a),f=n.add(f,f),d=n.mul(f,h),c=n.sub(c,d),l=n.mul(f,p),l=n.add(l,l),l=n.add(l,l),new O(c,u,l)}add(e){T(e);const{X:t,Y:r,Z:i}=this,{X:o,Y:a,Z:c}=e;let u=n.ZERO,l=n.ZERO,d=n.ZERO;const p=s.a,f=n.mul(s.b,g);let h=n.mul(t,o),m=n.mul(r,a),v=n.mul(i,c),y=n.add(t,r),b=n.add(o,a);y=n.mul(y,b),b=n.add(h,m),y=n.sub(y,b),b=n.add(t,i);let w=n.add(o,c);return b=n.mul(b,w),w=n.add(h,v),b=n.sub(b,w),w=n.add(r,i),u=n.add(a,c),w=n.mul(w,u),u=n.add(m,v),w=n.sub(w,u),d=n.mul(p,b),u=n.mul(f,v),d=n.add(u,d),u=n.sub(m,d),d=n.add(m,d),l=n.mul(u,d),m=n.add(h,h),m=n.add(m,h),v=n.mul(p,v),b=n.mul(f,b),m=n.add(m,v),v=n.sub(h,v),v=n.mul(p,v),b=n.add(b,v),h=n.mul(m,b),l=n.add(l,h),h=n.mul(w,b),u=n.mul(y,u),u=n.sub(u,h),h=n.mul(y,m),d=n.mul(w,d),d=n.add(d,h),new O(u,l,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(O.ZERO)}multiply(e){const{endo:r}=t;if(!i.isValidNot0(e))throw new Error("invalid scalar: out of range");let n,o;const s=e=>j.cached(this,e,e=>(0,a.normalizeZ)(O,e));if(r){const{k1neg:t,k1:i,k2neg:a,k2:c}=I(e),{p:u,f:l}=s(i),{p:d,f:p}=s(c);o=l.add(p),n=N(r.beta,u,d,t,a)}else{const{p:t,f:r}=s(e);n=t,o=r}return(0,a.normalizeZ)(O,[n,o])[0]}multiplyUnsafe(e){const{endo:r}=t,n=this;if(!i.isValid(e))throw new Error("invalid scalar: out of range");if(e===f||n.is0())return O.ZERO;if(e===h)return n;if(j.hasCache(this))return this.multiply(e);if(r){const{k1neg:t,k1:i,k2neg:o,k2:s}=I(e),{p1:c,p2:u}=(0,a.mulEndoUnsafe)(O,n,i,s);return N(r.beta,c,u,t,o)}return j.unsafe(n,e)}multiplyAndAddUnsafe(e,t,r){const n=this.multiplyUnsafe(t).add(e.multiplyUnsafe(r));return n.is0()?void 0:n}toAffine(e){return F(this,e)}isTorsionFree(){const{isTorsionFree:e}=t;return c===h||(e?e(O,this):j.unsafe(this,l).is0())}clearCofactor(){const{clearCofactor:e}=t;return c===h?this:e?e(O,this):this.multiplyUnsafe(c)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}toBytes(e=!0){return(0,o._abool2)(e,"isCompressed"),this.assertValidity(),b(O,this,e)}toHex(e=!0){return(0,o.bytesToHex)(this.toBytes(e))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(e=!0){return this.toBytes(e)}_setWindowSize(e){this.precompute(e)}static normalizeZ(e){return(0,a.normalizeZ)(O,e)}static msm(e,t){return(0,a.pippenger)(O,i,e,t)}static fromPrivateKey(e){return O.BASE.multiply(y(i,e))}}O.BASE=new O(s.Gx,s.Gy,n.ONE),O.ZERO=new O(n.ZERO,n.ONE,n.ZERO),O.Fp=n,O.Fn=i;const R=i.BITS,j=new a.wNAF(O,t.endo?Math.ceil(R/2):R);return O.BASE.precompute(8),O}function w(e){return Uint8Array.of(e?2:3)}function x(e,t){const r=e.ORDER;let n=f;for(let e=r-h;e%m===f;e/=m)n+=h;const i=n,o=m<<i-h-h,a=o*m,s=(r-h)/a,c=(s-h)/m,u=a-h,l=o,d=e.pow(t,s),p=e.pow(t,(s+h)/m);let y=(t,r)=>{let n=d,o=e.pow(r,u),a=e.sqr(o);a=e.mul(a,r);let s=e.mul(t,a);s=e.pow(s,c),s=e.mul(s,o),o=e.mul(s,r),a=e.mul(s,t);let f=e.mul(a,o);s=e.pow(f,l);let g=e.eql(s,e.ONE);o=e.mul(a,p),s=e.mul(f,n),a=e.cmov(o,a,g),f=e.cmov(s,f,g);for(let t=i;t>h;t--){let r=t-m;r=m<<r-h;let i=e.pow(f,r);const s=e.eql(i,e.ONE);o=e.mul(a,n),n=e.mul(n,n),i=e.mul(f,n),a=e.cmov(o,a,s),f=e.cmov(i,f,s)}return{isValid:g,value:a}};if(e.ORDER%v===g){const r=(e.ORDER-g)/v,n=e.sqrt(e.neg(t));y=(t,i)=>{let o=e.sqr(i);const a=e.mul(t,i);o=e.mul(o,a);let s=e.pow(o,r);s=e.mul(s,a);const c=e.mul(s,n),u=e.mul(e.sqr(s),i),l=e.eql(u,t);return{isValid:l,value:e.cmov(c,s,l)}}}return y}function _(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function E(e,t={}){const{Fn:r}=e,n=t.randomBytes||o.randomBytes,i=Object.assign(_(e.Fp,r),{seed:(0,s.getMinHashLength)(r.ORDER)});function a(e){try{return!!y(r,e)}catch(e){return!1}}function c(e=n(i.seed)){return(0,s.mapHashToField)((0,o._abytes2)(e,i.seed,"seed"),r.ORDER)}function u(t,n=!0){return e.BASE.multiply(y(r,t)).toBytes(n)}function l(t){if("bigint"==typeof t)return!1;if(t instanceof e)return!0;const{secretKey:n,publicKey:a,publicKeyUncompressed:s}=i;if(r.allowedLengths||n===a)return;const c=(0,o.ensureBytes)("key",t).length;return c===a||c===s}const d={isValidSecretKey:a,isValidPublicKey:function(t,r){const{publicKey:n,publicKeyUncompressed:o}=i;try{const i=t.length;return!(!0===r&&i!==n||!1===r&&i!==o||!e.fromBytes(t))}catch(e){return!1}},randomSecretKey:c,isValidPrivateKey:a,randomPrivateKey:c,normPrivateKeyToScalar:e=>y(r,e),precompute:(t=8,r=e.BASE)=>r.precompute(t,!1)};return Object.freeze({getPublicKey:u,getSharedSecret:function(t,n,i=!0){if(!0===l(t))throw new Error("first arg must be private key");if(!1===l(n))throw new Error("second arg must be public key");const o=y(r,t);return e.fromHex(n).multiply(o).toBytes(i)},keygen:function(e){const t=c(e);return{secretKey:t,publicKey:u(t)}},Point:e,utils:d,lengths:i})}function S(e,r,a={}){(0,i.ahash)(r),(0,o._validateObject)(a,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const s=a.randomBytes||o.randomBytes,c=a.hmac||((e,...t)=>(0,n.hmac)(r,e,(0,o.concatBytes)(...t))),{Fp:u,Fn:p}=e,{ORDER:g,BITS:v}=p,{keygen:b,getPublicKey:x,getSharedSecret:_,utils:S,lengths:A}=E(e,a),k={prehash:!1,lowS:"boolean"==typeof a.lowS&&a.lowS,format:void 0,extraEntropy:!1},C="compact";function T(e){return e>g>>h}function I(e,t){if(!p.isValidNot0(t))throw new Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}class F{constructor(e,t,r){this.r=I("r",e),this.s=I("s",t),null!=r&&(this.recovery=r),Object.freeze(this)}static fromBytes(e,r=C){let n;if(function(e,t){l(t);const r=A.signature,n="compact"===t?r:"recovered"===t?r+1:void 0;(0,o._abytes2)(e,n,`${t} signature`)}(e,r),"der"===r){const{r,s:n}=t.DER.toSig((0,o._abytes2)(e));return new F(r,n)}"recovered"===r&&(n=e[0],r="compact",e=e.subarray(1));const i=p.BYTES,a=e.subarray(0,i),s=e.subarray(i,2*i);return new F(p.fromBytes(a),p.fromBytes(s),n)}static fromHex(e,t){return this.fromBytes((0,o.hexToBytes)(e),t)}addRecoveryBit(e){return new F(this.r,this.s,e)}recoverPublicKey(t){const r=u.ORDER,{r:n,s:i,recovery:a}=this;if(null==a||![0,1,2,3].includes(a))throw new Error("recovery id invalid");if(g*m<r&&a>1)throw new Error("recovery id is ambiguous for h>1 curve");const s=2===a||3===a?n+g:n;if(!u.isValid(s))throw new Error("recovery id 2 or 3 invalid");const c=u.toBytes(s),l=e.fromBytes((0,o.concatBytes)(w(!(1&a)),c)),d=p.inv(s),f=N((0,o.ensureBytes)("msgHash",t)),h=p.create(-f*d),v=p.create(i*d),y=e.BASE.multiplyUnsafe(h).add(l.multiplyUnsafe(v));if(y.is0())throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return T(this.s)}toBytes(e=C){if(l(e),"der"===e)return(0,o.hexToBytes)(t.DER.hexFromSig(this));const r=p.toBytes(this.r),n=p.toBytes(this.s);if("recovered"===e){if(null==this.recovery)throw new Error("recovery bit must be present");return(0,o.concatBytes)(Uint8Array.of(this.recovery),r,n)}return(0,o.concatBytes)(r,n)}toHex(e){return(0,o.bytesToHex)(this.toBytes(e))}assertValidity(){}static fromCompact(e){return F.fromBytes((0,o.ensureBytes)("sig",e),"compact")}static fromDER(e){return F.fromBytes((0,o.ensureBytes)("sig",e),"der")}normalizeS(){return this.hasHighS()?new F(this.r,p.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return(0,o.bytesToHex)(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return(0,o.bytesToHex)(this.toBytes("compact"))}}const P=a.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const t=(0,o.bytesToNumberBE)(e),r=8*e.length-v;return r>0?t>>BigInt(r):t},N=a.bits2int_modN||function(e){return p.create(P(e))},O=(0,o.bitMask)(v);function R(e){return(0,o.aInRange)("num < 2^"+v,e,f,O),p.toBytes(e)}function j(e,t){return(0,o._abytes2)(e,void 0,"message"),t?(0,o._abytes2)(r(e),void 0,"prehashed message"):e}return Object.freeze({keygen:b,getPublicKey:x,getSharedSecret:_,utils:S,lengths:A,Point:e,sign:function(t,n,i={}){t=(0,o.ensureBytes)("message",t);const{seed:a,k2sig:u}=function(t,r,n){if(["recovered","canonical"].some(e=>e in n))throw new Error("sign() legacy options not supported");const{lowS:i,prehash:a,extraEntropy:c}=d(n,k);t=j(t,a);const u=N(t),l=y(p,r),m=[R(l),R(u)];if(null!=c&&!1!==c){const e=!0===c?s(A.secretKey):c;m.push((0,o.ensureBytes)("extraEntropy",e))}const g=(0,o.concatBytes)(...m),v=u;return{seed:g,k2sig:function(t){const r=P(t);if(!p.isValidNot0(r))return;const n=p.inv(r),o=e.BASE.multiply(r).toAffine(),a=p.create(o.x);if(a===f)return;const s=p.create(n*p.create(v+a*l));if(s===f)return;let c=(o.x===a?0:2)|Number(o.y&h),u=s;return i&&T(s)&&(u=p.neg(s),c^=1),new F(a,u,c)}}}(t,n,i);return(0,o.createHmacDrbg)(r.outputLen,p.BYTES,c)(a,u)},verify:function(r,n,i,a={}){const{lowS:s,prehash:c,format:u}=d(a,k);if(i=(0,o.ensureBytes)("publicKey",i),n=j((0,o.ensureBytes)("message",n),c),"strict"in a)throw new Error("options.strict was renamed to lowS");const l=void 0===u?function(e){let r;const n="string"==typeof e||(0,o.isBytes)(e),i=!n&&null!==e&&"object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!n&&!i)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(i)r=new F(e.r,e.s);else if(n){try{r=F.fromBytes((0,o.ensureBytes)("sig",e),"der")}catch(e){if(!(e instanceof t.DER.Err))throw e}if(!r)try{r=F.fromBytes((0,o.ensureBytes)("sig",e),"compact")}catch(e){return!1}}return r||!1}(r):F.fromBytes((0,o.ensureBytes)("sig",r),u);if(!1===l)return!1;try{const t=e.fromBytes(i);if(s&&l.hasHighS())return!1;const{r,s:o}=l,a=N(n),c=p.inv(o),u=p.create(a*c),d=p.create(r*c),f=e.BASE.multiplyUnsafe(u).add(t.multiplyUnsafe(d));return!f.is0()&&p.create(f.x)===r}catch(e){return!1}},recoverPublicKey:function(e,t,r={}){const{prehash:n}=d(r,k);return t=j(t,n),F.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:F,hash:r})}function A(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},r=e.Fp;let n=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0;return{CURVE:t,curveOpts:{Fp:r,Fn:(0,s.Field)(t.n,{BITS:e.nBitLength,allowedLengths:n,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes}}}function k(e,t,r){return function(n){const i=e.sqr(n),o=e.mul(i,n);return e.add(e.add(o,e.mul(n,t)),r)}}},1712:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.getChunks=v,t.lightColorHash=g,Object.defineProperty(t,"manageParticipation",{enumerable:!0,get:function(){return p.manageParticipation}}),t.notepad=function(e,t,r,n,i){var l=(i=i||{}).exists,p=e.createElement("table"),f=h;if(n&&!n.uri)throw new Error("UI.pad.notepad: Invalid userid");var m=h.updater,v=(0,a.Namespace)("http://www.w3.org/ns/pim/pad#");p.setAttribute("style",d.notepadStyle);var y=null,b=null;if(i.statusArea){var w=i.statusArea.appendChild(e.createElement("table")).appendChild(e.createElement("tr"));y=w.appendChild(e.createElement("td")),b=w.appendChild(e.createElement("td")),y&&y.setAttribute("style",d.upstreamStatus),b&&b.setAttribute("style",d.downstreamStatus)}var x=function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,u.log)(t),i.statusArea&&(r?y:b).appendChild((0,s.errorMessageBlock)(e,t,"pink"))},_=function(e){i.statusArea&&(i.statusArea.innerHTML="")},E=function(e,t,r){var n=e.subject;t=t||"";var i=d.baseStyle,a=d.headingCore,s=d.headingStyle,c=f.any(n,o.dc("author"));!t&&c&&(t="color: "+(r?"#888":"black")+"; background-color: "+g(c)+";");var u=f.any(n,v("indent")),l=(u=u?u.value:0)>=0?i+"text-indent: "+3*u+"em;":a+s[-1-u];e.setAttribute("style",l+t)},S=function(e){var n=e.subject;if(!n)throw new Error("No chunk for line to be deleted!");var i=f.any(void 0,v("next"),n),o=f.any(n,v("next"));if(i.sameTerm(r)&&o.sameTerm(r))(0,u.log)("You can't delete the only line.");else{var s=f.statementsMatching(n,void 0,void 0,t).concat(f.statementsMatching(void 0,void 0,n,t)),l=[(0,a.st)(i,v("next"),o,t)];if(n instanceof a.NamedNode){var d=n.uri.slice(-4);(0,u.log)("Deleting line "+d)}if(!m)throw new Error("have no updater");m.update(s,l,function(t,r,i,o){if(r){var a=e.parentNode;if(a){var l=a.previousSibling;a.parentNode&&a.parentNode.removeChild(a),l&&l.firstChild&&l.firstChild.focus()}}else if(o&&409===o.status)E(e,"color: black; background-color: #ffd;"),e.state=0,(0,c.beep)(.5,512),setTimeout(function(){P()},1e3);else{(0,u.log)(" removePart FAILED "+n+": "+i),(0,u.log)(" removePart was deleteing :'"+s),E(e,"color: black; background-color: #fdd;");var d=o?o.status:" [no response field] ";x("Error "+d+" saving changes: "+i.true)}})}},A=function(r,i,s){var l=f.any(i,o.sioc("content"));l=l?l.value:"";var d=e.createElement("tr");s?p.insertBefore(d,r):r&&r.nextSibling?p.insertBefore(d,r.nextSibling):p.appendChild(d);var h=d.appendChild(e.createElement("input"));return h.subject=i,h.setAttribute("type","text"),h.value=l,n?(E(h,""),function(e,r){e.addEventListener("keydown",function(n){if(!m)throw new Error("no updater");var i,o;switch(n.keyCode){case 13:var s=n.shiftKey;if((0,u.log)("enter"),s?(o=f.any(void 0,v("next"),r),i="newlinesAfter"):(o=f.any(r,v("next")),i="newlinesBefore"),o[i]=o[i]||0,o[i]+=1,o[i]>1)return void(0,u.log)(" queueing newline queue = "+o[i]);(0,u.log)(" go ahead line before "+o[i]),k(e,s);break;case 8:if(0===e.value.length)switch((0,u.log)("Delete key line "+r.uri.slice(-4)+" state "+e.state),e.state){case 1:case 2:return void(e.state=4);case 3:case 4:return;case void 0:case 0:e.state=3,S(e),n.preventDefault();break;default:throw new Error("pad: Unexpected state "+e)}break;case 9:var c=n.shiftKey?-1:1;!function(e,r,n){var i=f.statementsMatching(r,v("indent")),o=i.length?Number(i[0].object.value):0;if(!(o+n<-3)){var s=o+n,c=(0,a.st)(r,v("indent"),s,t);if(!m)throw new Error("no updater");m.update(i,c,function(r,n,i){n?E(e):((0,u.log)("Indent change FAILED '"+s+"' for "+t+": "+i),E(e,"color: black; background-color: #fdd;"),m.requestDownstreamAction(t,P))})}}(e,r,c),n.preventDefault();break;case 27:(0,u.log)("escape"),m.requestDownstreamAction(t,P),n.preventDefault();break;case 38:e.parentNode.previousSibling&&(e.parentNode.previousSibling.firstChild.focus(),n.preventDefault());break;case 40:e.parentNode.nextSibling&&(e.parentNode.nextSibling.firstChild.focus(),n.preventDefault())}});var n=function(e){var r=e.subject;E(e,void 0,!0);var i,s=f.any(r,o.sioc("content")).value,l=[(0,a.st)(r,o.sioc("content"),s,t)];e.value&&(i=[(0,a.st)(r,o.sioc("content"),e.value,t)]);var d=e.value;if(e.lastSent&&s!==e.lastSent)throw new Error("Out of order, last sent expected '"+s+"' but found '"+e.lastSent+"'");if(e.lastSent=d,!m)throw new Error("no updater");m.update(l,i,function(r,i,o,a){i?(_(),E(e),(0,u.log)(" Patch ok '"+s+"' -> '"+d+"' "),4===e.state?(e.state=3,S(e)):3===e.state||(2===e.state?(e.state=1,n(e)):e.state=0)):((0,u.log)(" patch FAILED "+a.status+" for '"+s+"' -> '"+d+"': "+o),409===a.status?(E(e,"color: black; background-color: #fdd;"),e.state=0,(0,c.beep)(.5,512),setTimeout(function(){m.requestDownstreamAction(t,P)},1e3)):(E(e,"color: black; background-color: #fdd;"),e.state=0,x(" Error "+a.status+" sending data: "+o,!0),(0,c.beep)(1,128)))})};e.addEventListener("input",function(t){switch(E(e,void 0,!0),(0,u.log)("Input event state "+e.state+" value '"+e.value+"'"),e.state){case 3:case 4:case 2:return;case 1:return void(e.state=2);case 0:case void 0:e.state=1,n(e)}})}(h,i)):(E(h,"color: #222; background-color: #fff"),(0,u.log)("Note can't add listeners - not logged in")),h},k=function(e,i){var c,l,d,p,f,g=h,y=0,b=null;e?("input"!==e.tagName.toLowerCase()&&(0,u.log)("return pressed when current document is: "+e.tagName),c=e.subject,y=(y=g.any(c,v("indent")))?Number(y.value):0,i?(l=g.any(void 0,v("next"),c),d=c,p=l,b="newlinesAfter"):(l=c,d=g.any(c,v("next")),p=d,b="newlinesBefore"),f=e.parentNode):(l=r,d=r,f=void 0);var w=(0,s.newThing)(t),x=w.uri.slice(-4),_=[(0,a.st)(l,v("next"),d,t)],S=[(0,a.st)(l,v("next"),w,t),(0,a.st)(w,v("next"),d,t),(0,a.st)(w,o.dc("author"),n,t),(0,a.st)(w,o.sioc("content"),"",t)];if(y>0&&S.push((0,a.st)(w,v("indent"),y,t)),(0,u.log)(" Fresh chunk "+x+" proposed"),!m)throw new Error("no updater");m.update(_,S,function(e,t,r,n){if(t){var o=A(f,w,i);E(o),o.focus(),b&&((0,u.log)(" Fresh chunk "+x+" updated, queue = "+p[b]),p[b]-=1,p[b]>0&&((0,u.log)(" Implementing queued newlines = "+d.newLinesBefore),k(o,i)))}else(0,u.log)(" ERROR writing new line "+x+": "+r)})},C=function(){var e={},t=0;function n(e){x(e),t++}if(!f.the(r,v("next")))return n("No initial next pointer"),!1;for(var i,a=r;(i=f.the(a,v("next")))||n("No next pointer from "+a),!i.sameTerm(r);){a=i;var s=i.uri.split("#")[1];if(e[i.uri])return n("Loop!"),!1;e[i.uri]=!0;var c=f.each(i,v("next")).length;1!==c&&n("Should be 1 not "+c+" next pointer for "+s),(c=f.each(i,v("indent")).length)>1&&n("Should be 0 or 1 not "+c+" indent for "+s),1!==(c=f.each(i,o.sioc("content")).length)&&n("Should be 1 not "+c+" contents for "+s),1!==(c=f.each(i,o.dc("author")).length)&&n("Should be 1 not "+c+" author for "+s),f.statementsMatching(void 0,o.sioc("contents")).forEach(function(t){e[t.subject.value]||n("Loose chunk! "+t.subject.value)})}return!t},T=function(){if(1!==f.each(r,v("next")).length){var e="Pad: Inconsistent data - NEXT pointers: "+f.each(r,v("next")).length;return(0,u.log)(e),void(i.statusArea&&(i.statusArea.textContent+=e))}for(var t,n=[],a=f.the(r,v("next"));!a.sameTerm(r);a=f.the(a,v("next")))for(var s=0;s<p.children.length;s++){var c=p.children[s];c.firstChild&&c.firstChild.subject.sameTerm(a)&&(n[a.uri]=c.firstChild)}for(var l=p.children.length-1;l>=0;l--)n[(t=p.children[l]).firstChild.subject.uri]||p.removeChild(t);t=p.firstChild;for(var d=f.the(r,v("next"));!d.sameTerm(r);d=f.the(d,v("next"))){var h=f.any(d,o.sioc("content")).value;if(t&&n[d.uri]){var m=t.firstChild;h!==m.value&&(m.value=h),E(m),m.state=0,delete m.lastSent,t=t.nextSibling}else A(t,d,!0)}},I=function(e){if(e.refresh)e.refresh();else for(var t=0;t<e.children.length;t++)I(e.children[t])},F=!1,P=function(){if(F)(0,u.log)(" Already reloading - stop");else{F=!0;var e=1e3,r=function(){if((0,u.log)("try reload - timeout = "+e),!m)throw new Error("no updater");m.reload(m.store,t,function(n,i,o){F=!1,n?((0,u.log)(" reloaded OK"),_(),C()?I(p):x("CONSISTENCY CHECK FAILED")):0===o.status?(x("Network error refreshing the pad. Retrying in "+e/1e3),F=!0,e*=2,setTimeout(r,e)):x("Error "+o.status+"refreshing the pad:"+i+". Stopped. "+t)})};r()}};if(p.refresh=T,p.reloadAndSync=P,n||(0,u.log)("Warning: must be logged in for pad to be edited"),l)(0,u.log)("Existing pad."),C()?(T(),f.holds(r,v("next"),r)&&k()):(0,u.log)(p.textContent="Inconsistent data. Abort");else{(0,u.log)("No pad exists - making new one.");var N=[(0,a.st)(r,o.rdf("type"),v("Notepad"),t),(0,a.st)(r,o.dc("author"),n,t),(0,a.st)(r,o.dc("created"),new Date,t),(0,a.st)(r,v("next"),r,t)];if(!m)throw new Error("no updater");m.update([],N,function(e,t,r){t?((0,u.log)("Initial pad created"),k()):x(r||"")})}return p},t.notepadToHTML=function(e,t){var r=v(e,t),n="<html>\n <head>\n",i=t.anyValue(e,o.dct("title"));i&&(n+=" <title>".concat(y(i),"</title>\n")),n+=" </head>\n <body>\n";var a=0;function s(e){for(;a>e;a--)n+="</ul>\n"}return r.forEach(function(e){var r=t.anyJS(e,m("indent")),i=t.anyJS(e,o.sioc("content"));if(i){var c=y(i);if(r<0){s(0);var u=r>=-3?4+r:1;n+="\n<h".concat(u,">").concat(c,"</h").concat(u,">\n")}else r>0?(s(r),function(e){for(;a<e;a++)n+="<ul>\n"}(r),n+="<li>".concat(c,"</li>\n")):(s(r),n+="<p>".concat(c,"</p>\n"))}}),s(0),n+=" </body>\n</html>\n"},Object.defineProperty(t,"participationObject",{enumerable:!0,get:function(){return p.participationObject}}),Object.defineProperty(t,"recordParticipation",{enumerable:!0,get:function(){return p.recordParticipation}}),Object.defineProperty(t,"renderParticipants",{enumerable:!0,get:function(){return p.renderParticipants}}),t.xmlEncode=y,n(r(4579)),n(r(7383)),n(r(8452)),n(r(3072)),n(r(9511)),n(r(1837)),n(r(3693));var o=f(r(2054)),a=r(2209),s=r(1939),c=r(7499),u=r(2902),l=r(3451),d=f(r(5148)),p=r(4044);function f(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(f=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var h=l.solidLogicSingleton.store,m=(0,a.Namespace)("http://www.w3.org/ns/pim/pad#");function g(e){var t;return e&&e.uri?"#"+(16777215&(t=e.uri,t.split("").reduce(function(e,t){return(e=(e<<5)-e+t.charCodeAt(0))&e},0))|12632256).toString(16):"#ffffff"}function v(e,t){for(var r=[],n=t.the(e,m("next"));!n.sameTerm(e);n=t.the(n,m("next")))r.push(n);return r}function y(e){return e.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;")}},1761:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._DST_scalar=void 0,t.expand_message_xmd=l,t.expand_message_xof=d,t.hash_to_field=p,t.isogenyMap=function(e,t){const r=t.map(e=>Array.from(e).reverse());return(t,n)=>{const[o,a,s,c]=r.map(r=>r.reduce((r,n)=>e.add(e.mul(r,t),n))),[u,l]=(0,i.FpInvertBatch)(e,[a,c],!0);return t=e.mul(o,u),n=e.mul(n,e.mul(s,l)),{x:t,y:n}}},t.createHasher=function(e,r,n){if("function"!=typeof r)throw new Error("mapToCurve() must be defined");function i(t){return e.fromAffine(r(t))}function o(t){const r=t.clearCofactor();return r.equals(e.ZERO)?e.ZERO:(r.assertValidity(),r)}return{defaults:n,hashToCurve(e,t){const r=p(e,2,Object.assign({},n,t)),a=i(r[0]),s=i(r[1]);return o(a.add(s))},encodeToCurve(e,t){const r=n.encodeDST?{DST:n.encodeDST}:{};return o(i(p(e,1,Object.assign({},n,r,t))[0]))},mapToCurve(e){if(!Array.isArray(e))throw new Error("expected array of bigints");for(const t of e)if("bigint"!=typeof t)throw new Error("expected array of bigints");return o(i(e))},hashToScalar(r,i){const o=e.Fn.ORDER;return p(r,1,Object.assign({},n,{p:o,m:1,DST:t._DST_scalar},i))[0][0]}}};const n=r(8627),i=r(4967),o=n.bytesToNumberBE;function a(e,t){if(c(e),c(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function s(e,t){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}function c(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function u(e){if(!(0,n.isBytes)(e)&&"string"!=typeof e)throw new Error("DST must be Uint8Array or string");return"string"==typeof e?(0,n.utf8ToBytes)(e):e}function l(e,t,r,i){(0,n.abytes)(e),c(r),(t=u(t)).length>255&&(t=i((0,n.concatBytes)((0,n.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:l}=i,d=Math.ceil(r/o);if(r>65535||d>255)throw new Error("expand_message_xmd: invalid lenInBytes");const p=(0,n.concatBytes)(t,a(t.length,1)),f=a(0,l),h=a(r,2),m=new Array(d),g=i((0,n.concatBytes)(f,e,h,a(0,1),p));m[0]=i((0,n.concatBytes)(g,a(1,1),p));for(let e=1;e<=d;e++){const t=[s(g,m[e-1]),a(e+1,1),p];m[e]=i((0,n.concatBytes)(...t))}return(0,n.concatBytes)(...m).slice(0,r)}function d(e,t,r,i,o){if((0,n.abytes)(e),c(r),(t=u(t)).length>255){const e=Math.ceil(2*i/8);t=o.create({dkLen:e}).update((0,n.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(e).update(a(r,2)).update(t).update(a(t.length,1)).digest()}function p(e,t,r){(0,n._validateObject)(r,{p:"bigint",m:"number",k:"number",hash:"function"});const{p:a,k:s,m:u,hash:p,expand:f,DST:h}=r;if(!(0,n.isHash)(r.hash))throw new Error("expected valid hash");(0,n.abytes)(e),c(t);const m=a.toString(2).length,g=Math.ceil((m+s)/8),v=t*u*g;let y;if("xmd"===f)y=l(e,h,v,p);else if("xof"===f)y=d(e,h,v,s,p);else{if("_internal_pass"!==f)throw new Error('expand must be "xmd" or "xof"');y=e}const b=new Array(t);for(let e=0;e<t;e++){const t=new Array(u);for(let r=0;r<u;r++){const n=g*(r+e*u),s=y.subarray(n,n+g);t[r]=(0,i.mod)(o(s),a)}b[e]=t}return b}t._DST_scalar=(0,n.utf8ToBytes)("HashToScalar-")},1791:(e,t,r)=>{var n=r(5172),i=r(5546);e.exports=function e(t,r){function o(e,i,a,s){try{var c=t[e](i),u=c.value;return u instanceof n?r.resolve(u.v).then(function(e){o("next",e,a,s)},function(e){o("throw",e,a,s)}):r.resolve(u).then(function(e){c.value=e,a(c)},function(e){return o("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(e,t,n){function i(){return new r(function(t,r){o(e,n,t,r)})}return a=a?a.then(i,i):i()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},1797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9746);t.default=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)}},1813:e=>{"use strict";e.exports=JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/3gpphal+json":{"source":"iana","compressible":true},"application/3gpphalforms+json":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/ace+cbor":{"source":"iana"},"application/ace+json":{"source":"iana","compressible":true},"application/ace-groupcomm+cbor":{"source":"iana"},"application/ace-trl+cbor":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/aif+cbor":{"source":"iana"},"application/aif+json":{"source":"iana","compressible":true},"application/alto-cdni+json":{"source":"iana","compressible":true},"application/alto-cdnifilter+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/alto-propmap+json":{"source":"iana","compressible":true},"application/alto-propmapparams+json":{"source":"iana","compressible":true},"application/alto-tips+json":{"source":"iana","compressible":true},"application/alto-tipsparams+json":{"source":"iana","compressible":true},"application/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/appinstaller":{"compressible":false,"extensions":["appinstaller"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/appx":{"compressible":false,"extensions":["appx"]},"application/appxbundle":{"compressible":false,"extensions":["appxbundle"]},"application/at+jwt":{"source":"iana"},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-dynamic-event-message":{"source":"iana"},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/automationml-aml+xml":{"source":"iana","compressible":true,"extensions":["aml"]},"application/automationml-amlx+zip":{"source":"iana","compressible":false,"extensions":["amlx"]},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/bufr":{"source":"iana"},"application/c2pa":{"source":"iana"},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/captive+json":{"source":"iana","compressible":true},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cda+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/ce+cbor":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/cid-edhoc+cbor-seq":{"source":"iana"},"application/city+json":{"source":"iana","compressible":true},"application/city+json-seq":{"source":"iana"},"application/clr":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-eap":{"source":"iana"},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/concise-problem-details+cbor":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cose-x509":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true,"extensions":["cpl"]},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwl":{"source":"iana","extensions":["cwl"]},"application/cwl+json":{"source":"iana","compressible":true},"application/cwl+yaml":{"source":"iana"},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dash-patch+xml":{"source":"iana","compressible":true,"extensions":["mpp"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana","extensions":["dcm"]},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dots+cbor":{"source":"iana"},"application/dpop+jwt":{"source":"iana"},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/eat+cwt":{"source":"iana"},"application/eat+jwt":{"source":"iana"},"application/eat-bun+cbor":{"source":"iana"},"application/eat-bun+json":{"source":"iana","compressible":true},"application/eat-ucs+cbor":{"source":"iana"},"application/eat-ucs+json":{"source":"iana","compressible":true},"application/ecmascript":{"source":"apache","compressible":true,"extensions":["ecma"]},"application/edhoc+cbor-seq":{"source":"iana"},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.legacyesn+json":{"source":"iana","compressible":true},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/entity-statement+jwt":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/express":{"source":"iana","extensions":["exp"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdf":{"source":"iana","extensions":["fdf"]},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geopose+json":{"source":"iana","compressible":true},"application/geoxacml+json":{"source":"iana","compressible":true},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gnap-binding-jws":{"source":"iana"},"application/gnap-binding-jwsd":{"source":"iana"},"application/gnap-binding-rotation-jws":{"source":"iana"},"application/gnap-binding-rotation-jwsd":{"source":"iana"},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/grib":{"source":"iana"},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/hl7v2+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"iana","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"apache","charset":"UTF-8","compressible":true,"extensions":["js"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/jscalendar+json":{"source":"iana","compressible":true},"application/jscontact+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jsonpath":{"source":"iana"},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwk-set+jwt":{"source":"iana"},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/linkset":{"source":"iana"},"application/linkset+json":{"source":"iana","compressible":true},"application/load-control+xml":{"source":"iana","compressible":true},"application/logout+jwt":{"source":"iana"},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lpf+zip":{"source":"iana","compressible":false},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true,"extensions":["mpf"]},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/missing-blocks+cbor-seq":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4","mpg4","mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msix":{"compressible":false,"extensions":["msix"]},"application/msixbundle":{"compressible":false,"extensions":["msixbundle"]},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/oauth-authz-req+jwt":{"source":"iana"},"application/oblivious-dns-message":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":true,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/ohttp-keys":{"source":"iana"},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg","one","onea"]},"application/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p21":{"source":"iana"},"application/p21+zip":{"source":"iana","compressible":false},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana","extensions":["asc"]},"application/pgp-signature":{"source":"iana","extensions":["sig","asc"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/private-token-issuer-directory":{"source":"iana"},"application/private-token-request":{"source":"iana"},"application/private-token-response":{"source":"iana"},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/provided-claims+jwt":{"source":"iana"},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.cyn":{"source":"iana","charset":"7-BIT"},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.implied-document+xml":{"source":"iana","compressible":true},"application/prs.implied-executable":{"source":"iana"},"application/prs.implied-object+json":{"source":"iana","compressible":true},"application/prs.implied-object+json-seq":{"source":"iana"},"application/prs.implied-object+yaml":{"source":"iana"},"application/prs.implied-structure":{"source":"iana"},"application/prs.mayfile":{"source":"iana"},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.vcfbzip2":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true,"extensions":["xsf"]},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/pvd+json":{"source":"iana","compressible":true},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"apache"},"application/reputon+json":{"source":"iana","compressible":true},"application/resolve-response+jwt":{"source":"iana"},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-checklist":{"source":"iana"},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-signed-tal":{"source":"iana"},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sarif+json":{"source":"iana","compressible":true},"application/sarif-external-properties+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"apache"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spdx+json":{"source":"iana","compressible":true},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana","extensions":["sql"]},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/sslkeylogfile":{"source":"iana"},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/st2110-41":{"source":"iana"},"application/stix+json":{"source":"iana","compressible":true},"application/stratum":{"source":"iana"},"application/swid+cbor":{"source":"iana"},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/td+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tm+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/toc+cbor":{"source":"iana"},"application/token-introspection+jwt":{"source":"iana"},"application/toml":{"source":"iana","compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana","extensions":["trig"]},"application/trust-chain+json":{"source":"iana","compressible":true},"application/trust-mark+jwt":{"source":"iana"},"application/trust-mark-delegation+jwt":{"source":"iana"},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"application/uccs+cbor":{"source":"iana"},"application/ujcs+json":{"source":"iana","compressible":true},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true,"extensions":["td"]},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vc":{"source":"iana"},"application/vc+cose":{"source":"iana"},"application/vc+jwt":{"source":"iana"},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.1ob":{"source":"iana"},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3a+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ach+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc8+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gnas":{"source":"iana"},"application/vnd.3gpp.5gsa2x":{"source":"iana"},"application/vnd.3gpp.5gsa2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gsv2x":{"source":"iana"},"application/vnd.3gpp.5gsv2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.crs+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.current-location-discovery+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gtpc":{"source":"iana"},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.lpp":{"source":"iana"},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-msgstore-ctrl-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-regroup+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-regroup+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-regroup+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ngap":{"source":"iana"},"application/vnd.3gpp.pfcp":{"source":"iana"},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.pinapp-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.s1ap":{"source":"iana"},"application/vnd.3gpp.seal-group-doc+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-network-qos-management-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-ue-config-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-unicast-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-user-profile-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.v2x":{"source":"iana"},"application/vnd.3gpp.vae-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acm.addressxfer+json":{"source":"iana","compressible":true},"application/vnd.acm.chatbot+json":{"source":"iana","compressible":true},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"apache","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.cmoca-cmresource":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-cmtable":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.age":{"source":"iana","extensions":["age"]},"application/vnd.ah-barcode":{"source":"apache"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.arrow.file":{"source":"iana"},"application/vnd.apache.arrow.stream":{"source":"iana"},"application/vnd.apache.parquet":{"source":"iana"},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.apexlang":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["key"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"apache"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autodesk.fbx":{"extensions":["fbx"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.belightsoft.lhzd+zip":{"source":"iana","compressible":false},"application/vnd.belightsoft.lhzl+zip":{"source":"iana","compressible":false},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.bzip3":{"source":"iana"},"application/vnd.c3voc.schedule+xml":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.cncf.helm.chart.content.v1.tar+gzip":{"source":"iana"},"application/vnd.cncf.helm.chart.provenance.v1.prov":{"source":"iana"},"application/vnd.cncf.helm.config.v1+json":{"source":"iana","compressible":true},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.cryptomator.encrypted":{"source":"iana"},"application/vnd.cryptomator.vault":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datalog":{"source":"iana"},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.dbf":{"source":"iana","extensions":["dbf"]},"application/vnd.dcmp+xml":{"source":"iana","compressible":true,"extensions":["dcmp"]},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbisl+xml":{"source":"iana","compressible":true},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.eclipse.ditto+json":{"source":"iana","compressible":true},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.eln+zip":{"source":"iana","compressible":false},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.erofs":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eu.kasparian.car+json":{"source":"iana","compressible":true},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.familysearch.gedcom+zip":{"source":"iana","compressible":false},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"apache","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.fdsn.stationxml+xml":{"source":"iana","charset":"XML-BASED","compressible":true},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.freelog.comic":{"source":"iana"},"application/vnd.frogans.fnc":{"source":"apache","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"apache","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujifilm.fb.docuworks":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.container":{"source":"iana"},"application/vnd.fujifilm.fb.jfi+xml":{"source":"iana","compressible":true},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.ga4gh.passport+jwt":{"source":"iana"},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.genozip":{"source":"iana"},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.gentoo.catmetadata+xml":{"source":"iana","compressible":true},"application/vnd.gentoo.ebuild":{"source":"iana"},"application/vnd.gentoo.eclass":{"source":"iana"},"application/vnd.gentoo.gpkg":{"source":"iana"},"application/vnd.gentoo.manifest":{"source":"iana"},"application/vnd.gentoo.pkgmetadata+xml":{"source":"iana","compressible":true},"application/vnd.gentoo.xpak":{"source":"iana"},"application/vnd.geo+json":{"source":"apache","compressible":true},"application/vnd.geocube+xml":{"source":"apache","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.pinboard":{"source":"iana"},"application/vnd.geogebra.slides":{"source":"iana","extensions":["ggs"]},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.gnu.taler.exchange+json":{"source":"iana","compressible":true},"application/vnd.gnu.taler.merchant+json":{"source":"iana","compressible":true},"application/vnd.google-apps.audio":{},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.drawing":{"compressible":false,"extensions":["gdraw"]},"application/vnd.google-apps.drive-sdk":{"compressible":false},"application/vnd.google-apps.file":{},"application/vnd.google-apps.folder":{"compressible":false},"application/vnd.google-apps.form":{"compressible":false,"extensions":["gform"]},"application/vnd.google-apps.fusiontable":{},"application/vnd.google-apps.jam":{"compressible":false,"extensions":["gjam"]},"application/vnd.google-apps.mail-layout":{},"application/vnd.google-apps.map":{"compressible":false,"extensions":["gmap"]},"application/vnd.google-apps.photo":{},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.script":{"compressible":false,"extensions":["gscript"]},"application/vnd.google-apps.shortcut":{},"application/vnd.google-apps.site":{"compressible":false,"extensions":["gsite"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-apps.unknown":{},"application/vnd.google-apps.video":{},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"apache","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true,"extensions":["xdcf"]},"application/vnd.gpxsee.map+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.hsl":{"source":"iana"},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"apache"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"apache","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"apache"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.ipfs.ipns-record":{"source":"iana"},"application/vnd.ipld.car":{"source":"iana"},"application/vnd.ipld.dag-cbor":{"source":"iana"},"application/vnd.ipld.dag-json":{"source":"iana"},"application/vnd.ipld.raw":{"source":"iana"},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kdl":{"source":"iana"},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.keyman.kmp+zip":{"source":"iana","compressible":false},"application/vnd.keyman.kmx":{"source":"iana"},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.ldev.productlicensing":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana","extensions":["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxar.archive.3tz+zip":{"source":"iana","compressible":false},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.mdl":{"source":"iana"},"application/vnd.mdl-mbsdf":{"source":"iana"},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.medicalholodeck.recordxr":{"source":"iana"},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mermaid":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.modl":{"source":"iana"},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-visio.viewer":{"extensions":["vdx"]},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msgpack":{"source":"iana"},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.nacamar.ybrid+json":{"source":"iana","compressible":true},"application/vnd.nato.bindingdataobject+cbor":{"source":"iana"},"application/vnd.nato.bindingdataobject+json":{"source":"iana","compressible":true},"application/vnd.nato.bindingdataobject+xml":{"source":"iana","compressible":true,"extensions":["bdo"]},"application/vnd.nato.openxmlformats-package.iepd+zip":{"source":"iana","compressible":false},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"apache","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oai.workflows":{"source":"iana"},"application/vnd.oai.workflows+json":{"source":"iana","compressible":true},"application/vnd.oai.workflows+yaml":{"source":"iana"},"application/vnd.oasis.opendocument.base":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"apache","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-master-template":{"source":"iana"},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"apache","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"apache","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+cbor":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.onvif.metadata":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.opentimestamps.ots":{"source":"iana"},"application/vnd.openvpi.dspx+json":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.procrate.brushset":{"extensions":["brushset"]},"application/vnd.procreate.brush":{"extensions":["brush"]},"application/vnd.procreate.dream":{"extensions":["drm"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.pt.mundusmundi":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true,"extensions":["xhtm"]},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana","extensions":["rar"]},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.relpipe":{"source":"iana"},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.resilient.logic":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sar":{"source":"iana"},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.seis+json":{"source":"iana","compressible":true},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.sketchometry":{"source":"iana"},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.smintio.portals.archive":{"source":"iana"},"application/vnd.snesdev-page-table":{"source":"iana"},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.sybyl.mol2":{"source":"iana"},"application/vnd.sycle+xml":{"source":"iana","compressible":true},"application/vnd.syft+json":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uic.osdm+json":{"source":"iana","compressible":true},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml","uo"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.veraison.tsm-report+cbor":{"source":"iana"},"application/vnd.veraison.tsm-report+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veritone.aion+json":{"source":"iana","compressible":true},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw","vsdx","vtx"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vocalshaper.vsp4":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","charset":"UTF-8","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.wasmflow.wafl":{"source":"iana"},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.dpp":{"source":"iana"},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordlift":{"source":"iana"},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xarin.cpj":{"source":"iana"},"application/vnd.xecrets-encrypted":{"source":"iana"},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/voucher-jws+json":{"source":"iana","compressible":true},"application/vp":{"source":"iana"},"application/vp+cose":{"source":"iana"},"application/vp+jwt":{"source":"iana"},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"source":"iana","compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true,"extensions":["wif"]},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blender":{"extensions":["blend"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-compressed":{"extensions":["rar"]},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-ipynb+json":{"compressible":true,"extensions":["ipynb"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-iwork-keynote-sffkey":{"extensions":["key"]},"application/x-iwork-numbers-sffnumbers":{"extensions":["numbers"]},"application/x-iwork-pages-sffpages":{"extensions":["pages"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-pki-message":{"source":"iana"},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zip-compressed":{"extensions":["zip"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xfdf":{"source":"iana","extensions":["xfdf"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xsl","xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yaml":{"source":"iana"},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+cbor":{"source":"iana"},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yang-sid+json":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zip+dotlottie":{"extensions":["lottie"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana","extensions":["adts","aac"]},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana","extensions":["amr"]},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flac":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/matroska":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/mhas":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/midi-clip":{"source":"iana"},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a","m4b"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx","opus"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"apache"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"source":"iana","compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana","extensions":["avci"]},"image/avcs":{"source":"iana","extensions":["avcs"]},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp","dib"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/dpx":{"source":"iana","extensions":["dpx"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/j2c":{"source":"iana"},"image/jaii":{"source":"iana","extensions":["jaii"]},"image/jais":{"source":"iana","extensions":["jais"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpg","jpeg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm","jpgm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxl":{"source":"iana","extensions":["jxl"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/ktx2":{"source":"iana","extensions":["ktx2"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false,"extensions":["jfif"]},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif","btf"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.clip":{"source":"iana"},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","compressible":true,"extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"compressible":true,"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.pco.b16":{"source":"iana","extensions":["b16"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"iana","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-adobe-dng":{"extensions":["dng"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-emf":{"source":"iana"},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-wmf":{"source":"iana"},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/bhttp":{"source":"iana"},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/mls":{"source":"iana"},"message/news":{"source":"apache"},"message/ohttp-req":{"source":"iana"},"message/ohttp-res":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime","mht","mhtml"]},"message/s-http":{"source":"apache"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"apache"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/e57":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/jt":{"source":"iana","extensions":["jt"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/prc":{"source":"iana","extensions":["prc"]},"model/step":{"source":"iana","extensions":["step","stp","stpnc","p21","210"]},"model/step+xml":{"source":"iana","compressible":true,"extensions":["stpx"]},"model/step+zip":{"source":"iana","compressible":false,"extensions":["stpz"]},"model/step-xml+zip":{"source":"iana","compressible":false,"extensions":["stpxz"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/u3d":{"source":"iana","extensions":["u3d"]},"model/vnd.bary":{"source":"iana","extensions":["bary"]},"model/vnd.cld":{"source":"iana","extensions":["cld"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.pytha.pyox":{"source":"iana","extensions":["pyo","pyox"]},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"model/vnd.usda":{"source":"iana","extensions":["usda"]},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"apache"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/hl7v2":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["md","markdown"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/prs.texi":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shaclc":{"source":"iana"},"text/shex":{"source":"iana","extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.exchangeable":{"source":"iana"},"text/vnd.familysearch.gedcom":{"source":"iana","extensions":["ged"]},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hans":{"source":"iana"},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"apache"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"text/vnd.vcf":{"source":"iana"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vnd.zoo.kcl":{"source":"iana"},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/wgsl":{"source":"iana","extensions":["wgsl"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"compressible":true,"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/evc":{"source":"iana"},"video/ffv1":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/h266":{"source":"iana"},"video/iso.segment":{"source":"iana","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/jxsv":{"source":"iana"},"video/lottie+json":{"source":"iana","compressible":true},"video/matroska":{"source":"iana"},"video/matroska-3d":{"source":"iana"},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts","m2t","m2ts","mts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/scip":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.planar":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"apache"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/vp9":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}')},1837:(e,t,r)=>{var n=r(3072),i=r(5636),o=r(691),a=r(9646);function s(t){var r="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return a(e,arguments,n(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},1869:e=>{e.exports=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.")},e.exports.__esModule=!0,e.exports.default=e.exports},1888:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ACL_LINK=void 0,t.createAclLogic=function(e){var r=a.ns;function s(e,t,n,i){void 0===i&&(i={});var a=i.public||[],s=(0,o.graph)(),c=(0,o.Namespace)("http://www.w3.org/ns/auth/acl#"),u=s.sym("".concat(n,"#a1")),l=s.sym(n),d=s.sym(e);if(s.add(u,r.rdf("type"),c("Authorization"),l),s.add(u,c("accessTo"),d,l),i.defaultForNew&&s.add(u,c("default"),d,l),s.add(u,c("agent"),t,l),s.add(u,c("mode"),c("Read"),l),s.add(u,c("mode"),c("Write"),l),s.add(u,c("mode"),c("Control"),l),a.length){u=s.sym("".concat(n,"#a2")),s.add(u,r.rdf("type"),c("Authorization"),l),s.add(u,c("accessTo"),d,l),s.add(u,c("agentClass"),r.foaf("Agent"),l);for(var p=0;p<a.length;p++)s.add(u,c("mode"),c(a[p]),l)}return(0,o.serialize)(l,s,n)}return{findAclDocUrl:function(r){return n(this,void 0,void 0,function(){var n;return i(this,function(i){switch(i.label){case 0:return[4,e.fetcher.load(r)];case 1:if(i.sent(),!(n=e.any(r,t.ACL_LINK)))throw new Error("No ACL link discovered for ".concat(r));return[2,n.value]}})})},setACLUserPublic:function(r,n,i){var o=e.any(e.sym(r),t.ACL_LINK);return Promise.resolve().then(function(){return o||function(r){var n=e.fetcher;if(!n)throw new Error("Cannot fetch ACL rel, store has no fetcher");return n.load(r).then(function(n){if(!n.ok)throw new Error("fetchACLRel: While loading:"+n.error);var i=e.any(e.sym(r),t.ACL_LINK);if(!i)throw new Error("fetchACLRel: No Link rel=ACL header for "+r);return i})}(r).catch(function(e){throw new Error("Error fetching rel=ACL header for ".concat(r,": ").concat(e))})}).then(function(t){var o=s(r,n,t.uri,i);if(!e.fetcher)throw new Error("Cannot PUT this, store has no fetcher");return e.fetcher.webOperation("PUT",t.uri,{data:o,contentType:"text/turtle"}).then(function(e){if(!e.ok)throw new Error("Error writing ACL text: "+e.error);return t})})},genACLText:s}};var o=r(2209),a=r(733);t.ACL_LINK=(0,o.sym)("http://www.iana.org/assignments/link-relations/acl")},1939:(e,t,r)=>{"use strict";var n=r(3738);Object.defineProperty(t,"__esModule",{value:!0});var i={publicData:!0};t.publicData=void 0;var o=r(7442);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))});var a=r(3957);Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))});var s=r(5078);Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var c=r(6691);Object.keys(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))});var u=r(1302);Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))});var l=r(2524);Object.keys(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))});var d=r(2545);Object.keys(d).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))});var p=r(3696);Object.keys(p).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))});var f=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var r,i,o={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return o;if(r=t){if(r.has(e))return r.get(e);r.set(e,o)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((i=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(i.get||i.set)?r(o,a,i):o[a]=e[a]);return o}(e)}(r(1552));t.publicData=f},1949:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.fieldParams=void 0;var o,a=n(r(3693)),s=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var r,n,o={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return o;if(r=t){if(r.has(e))return r.get(e);r.set(e,o)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(n.get||n.set)?r(o,a,n):o[a]=e[a]);return o}(e)}(r(2054)),c=r(5148);t.fieldParams=(o={},(0,a.default)((0,a.default)((0,a.default)((0,a.default)((0,a.default)((0,a.default)((0,a.default)((0,a.default)((0,a.default)((0,a.default)(o,s.ui("ColorField").uri,{size:9,type:"color",style:"height: 3em;",dt:"color",pattern:/^\s*#[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]([0-9a-f][0-9a-f])?\s*$/}),s.ui("DateField").uri,{size:20,type:"date",dt:"date",pattern:/^\s*[0-9][0-9][0-9][0-9](-[0-1]?[0-9]-[0-3]?[0-9])?Z?\s*$/}),s.ui("DateTimeField").uri,{size:20,type:"datetime-local",dt:"dateTime",pattern:/^\s*[0-9][0-9][0-9][0-9](-[0-1]?[0-9]-[0-3]?[0-9])?(T[0-2][0-9]:[0-5][0-9](:[0-5][0-9])?)?Z?\s*$/}),s.ui("TimeField").uri,{size:10,type:"time",dt:"time",pattern:/^\s*([0-2]?[0-9]:[0-5][0-9](:[0-5][0-9])?)\s*$/}),s.ui("IntegerField").uri,{size:12,style:"text-align: right;",dt:"integer",pattern:/^\s*-?[0-9]+\s*$/}),s.ui("DecimalField").uri,{size:12,style:"text-align: right;",dt:"decimal",pattern:/^\s*-?[0-9]*(\.[0-9]*)?\s*$/}),s.ui("FloatField").uri,{size:12,style:"text-align: right;",dt:"float",pattern:/^\s*-?[0-9]*(\.[0-9]*)?((e|E)-?[0-9]*)?\s*$/}),s.ui("SingleLineTextField").uri,{}),s.ui("NamedNodeURIField").uri,{namedNode:!0}),s.ui("TextField").uri,{}),(0,a.default)((0,a.default)((0,a.default)((0,a.default)((0,a.default)(o,s.ui("PhoneField").uri,{size:20,uriPrefix:"tel:",pattern:/^\+?[\d-]+[\d]*$/}),s.ui("EmailField").uri,{size:30,uriPrefix:"mailto:",pattern:/^\s*.*@.*\..*\s*$/}),s.ui("Group").uri,{style:c.formGroupStyle}),s.ui("Comment").uri,{element:"p",style:c.commentStyle}),s.ui("Heading").uri,{element:"h3",style:c.formHeadingStyle}))},2009:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.basicField=function(e,t,r,n,i,a,l){var g=h,y=i.doc?i.doc():null,b=e.createElement("div"),w=g.any(i,s.ui("property"));if(t&&t.appendChild(b),!w)return b.appendChild((0,d.errorMessageBlock)(e,"Error: No property given for text field: "+i));var x=m(e,g,b,i),_=g.anyJS(i,s.ui("suppressEmptyUneditable"),null,y),E=(0,p.mostSpecificClassURI)(i),S=f.fieldParams[E];void 0===S&&(S={style:""});var A=S.style||"",k=c.textInputStyle+A,C=e.createElement("input");C.style=k,x.appendChild(C),C.setAttribute("type",S.type?S.type:"text");var T=g.anyJS(i,s.ui("size"))||u.default.textInputSize||20;C.setAttribute("size",T);var I=g.any(i,s.ui("maxLength"));C.setAttribute("maxLength",I?""+I:u.default.basicMaxLength),a=a||v(n,w,a);var F=g.any(n,w,void 0,a);if(F||(F=g.any(i,s.ui("default"))),F&&F.value&&S.uriPrefix?C.value=decodeURIComponent(F.value.replace(S.uriPrefix,"")).replace(/ /g,""):F&&(C.value=F.value||F.value||""),C.setAttribute("style",k),!g.updater)throw new Error("kb has no updater");return g.updater.editable(a.uri)?(C.addEventListener("keyup",function(e){S.pattern&&C.setAttribute("style",k+(C.value.match(S.pattern)?"color: green;":"color: red;"))},!0),C.addEventListener("change",function(t){if(!S.pattern||C.value.match(S.pattern)){C.disabled=!0,C.setAttribute("style",k+"color: gray;");var r,i=g.statementsMatching(n,w);S.namedNode?r=g.sym(C.value):S.uriPrefix?(r=encodeURIComponent(C.value.replace(/ /g,"")),r=g.sym(S.uriPrefix+C.value)):r=S.dt?new o.Literal(C.value.trim(),void 0,s.xsd(S.dt)):new o.Literal(C.value);var c=i.map(function(e){return(0,o.st)(e.subject,e.predicate,r,e.why)});0===c.length&&(c=[(0,o.st)(n,w,r,a)]),function e(t,r,n){var i=[];if(r.forEach(function(e){i.includes(e.why.uri)||i.push(e.why.uri)}),t.forEach(function(e){i.includes(e.why.uri)||i.push(e.why.uri)}),0===i.length)throw new Error("updateMany has no docs to patch");if(!g.updater)throw new Error("kb has no updater");if(1===i.length)return g.updater.update(t,r,n);var o=i.pop(),a=r.filter(function(e){return e.why.uri===o}),s=r.filter(function(e){return e.why.uri!==o}),c=t.filter(function(e){return e.why.uri===o}),u=t.filter(function(e){return e.why.uri!==o});g.updater.update(c,a,function(t,r,i){r?e(u,s,n):n(t,r,i)})}(i,c,function(t,r,n){r?(C.disabled=!1,C.setAttribute("style",k)):b.appendChild((0,d.errorMessageBlock)(e,n)),l(r,n)})}},!0),b):(C.readOnly=!0,C.style=c.textInputStyleUneditable+A,_&&""===C.value&&(b.style.display="none"),b)},t.fieldLabel=g,t.fieldStore=v,t.renderNameValuePair=m;var o=r(2209),a=r(3451),s=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var r,n,o={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return o;if(r=t){if(r.has(e))return r.get(e);r.set(e,o)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(n.get||n.set)?r(o,a,n):o[a]=e[a]);return o}(e)}(r(2054)),c=r(5148),u=n(r(471)),l=r(7499),d=r(1302),p=r(9171),f=r(1949),h=a.solidLogicSingleton.store;function m(e,t,r,n,i){r.style.display="flex",r.style.flexDirection="row";var o=r.appendChild(e.createElement("div"));o.style.width=u.default.formFieldNameBoxWidth;var a=r.appendChild(e.createElement("div"));return o.setAttribute("class","formFieldName"),o.setAttribute("style",c.formFieldNameBoxStyle),a.setAttribute("class","formFieldValue"),i?o.appendChild(e.createTextNode(i)):t.any(n,s.ui("property"))?o.appendChild(g(e,t.any(n,s.ui("property")),n)):(a.appendChild((0,d.errorMessageBlock)(e,"No property or label given for form field: "+n)),o.appendChild(e.createTextNode("???"))),a}function g(e,t,r){var n=h.any(r,s.ui("label"));if(n||(n=(0,l.label)(t,!0)),void 0===t)return e.createTextNode("@@Internal error: undefined property");var i=e.createElement("a");return t.uri&&i.setAttribute("href",t.uri),i.setAttribute("style","color: #3B5998; text-decoration: none;"),i.textContent=n,i}function v(e,t,r){var n=h.statementsMatching(e,t);if(0===n.length)return r;if(!h.updater)throw new Error("Store has no updater");return n.length>0&&n[0].why.value&&h.updater.editable(n[0].why.value,h)?h.sym(n[0].why.value):r}},2054:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738),o=n(r(5386)),a=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var r,n,o={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return o;if(r=t){if(r.has(e))return r.get(e);r.set(e,o)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(n.get||n.set)?r(o,a,n):o[a]=e[a]);return o}(e)}(r(2209));e.exports=(0,o.default)(a)},2168:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(7493);const i=function(e,t,r,i,o){if(void 0!==o.crit&&void 0===i?.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!i||void 0===i.crit)return new Set;if(!Array.isArray(i.crit)||0===i.crit.length||i.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let a;a=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t;for(const t of i.crit){if(!a.has(t))throw new n.JOSENotSupported(`Extension Header Parameter "${t}" is not recognized`);if(void 0===o[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(a.get(t)&&void 0===i[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(i.crit)}},2196:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="ffffffff-ffff-ffff-ffff-ffffffffffff"},2209:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BlankNode:()=>i.A,Collection:()=>o.A,ConnectedStore:()=>je,DataFactory:()=>ge,Empty:()=>c,Fetcher:()=>se,Formula:()=>C,IndexedFormula:()=>U,Literal:()=>O.A,LiveStore:()=>Le,N3Parser:()=>M.A,NamedNode:()=>k.A,Namespace:()=>f.A,NextId:()=>Re,Node:()=>T,Query:()=>F,RDFParser:()=>q.A,RDFaProcessor:()=>H.A,SPARQLToQuery:()=>le,Serializer:()=>w,Statement:()=>pe.A,Store:()=>U,UpdateManager:()=>fe,UpdatesSocket:()=>ve,UpdatesVia:()=>ye,Util:()=>m,Variable:()=>S.A,blankNode:()=>ke,defaultGraph:()=>Ce,fetcher:()=>we,fromNT:()=>Ne,graph:()=>xe,isBlankNode:()=>E.jt,isCollection:()=>E.P3,isGraph:()=>E.RN,isLiteral:()=>E.c$,isNamedNode:()=>E.Y2,isPredicate:()=>E.YC,isQuad:()=>E.aF,isRDFObject:()=>E.GE,isRDFlibObject:()=>E.DJ,isRDFlibPredicate:()=>E.fY,isRDFlibSubject:()=>E.CZ,isStatement:()=>E.SH,isStore:()=>E.ok,isSubject:()=>E.hr,isTerm:()=>E.D0,isVariable:()=>E.DZ,jsonParser:()=>ce,lit:()=>_e,literal:()=>Te,log:()=>p.A,namedNode:()=>Se,parse:()=>B.A,quad:()=>Ie,queryToSPARQL:()=>ue,serialize:()=>_,sparqlUpdateParser:()=>de.A,st:()=>Ee,sym:()=>Se,term:()=>Oe,termValue:()=>K.E,triple:()=>Fe,uri:()=>h,variable:()=>Ae});var n=r(4705),i=r(8921),o=r(3476),a=r(8936),s=r(9403);class c extends a.A{constructor(){super(""),(0,n.A)(this,"termType",s.S)}toString(){return"()"}}var u=r(1059),l=r(4275),d=r(437),p=r(4940),f=r(3581),h=r(2727),m=r(4011);function g(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d.A;return{boolean:e.namedNode("http://www.w3.org/2001/XMLSchema#boolean"),dateTime:e.namedNode("http://www.w3.org/2001/XMLSchema#dateTime"),decimal:e.namedNode("http://www.w3.org/2001/XMLSchema#decimal"),double:e.namedNode("http://www.w3.org/2001/XMLSchema#double"),integer:e.namedNode("http://www.w3.org/2001/XMLSchema#integer"),langString:e.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),string:e.namedNode("http://www.w3.org/2001/XMLSchema#string")}}g(d.A);var v=r(5386),y=r.n(v),b=r(5306);function w(e){return new x(e)}class x{constructor(e){(0,n.A)(this,"_notQNameChars","\t\r\n !\"#$%&'()*.,+/;<=>?@[\\]^`{|}~"),(0,n.A)(this,"_notNameChars",this._notQNameChars+":"),(0,n.A)(this,"validPrefix",new RegExp(/^[a-zA-Z][a-zA-Z0-9]*$/)),(0,n.A)(this,"forbidden1",new RegExp(/[\\"\b\f\r\v\t\n\u0080-\uffff]/gm)),(0,n.A)(this,"forbidden3",new RegExp(/[\\"\b\f\r\v\u0080-\uffff]/gm)),this.flags="",this.base=null,this.prefixes=[],this.namespaces=[];const t=Object.keys(y()());for(const e in t){const r=y()()[t[e]](""),n=t[e];this.prefixes[r]=n,this.namespaces[n]=r}this.suggestPrefix("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.suggestPrefix("xml","reserved:reservedForFutureUse"),this.namespacesUsed=[],this.keywords=["a"],this.prefixchars="abcdefghijklmnopqustuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",this.incoming=null,this.formulas=[],this.store=e,this.rdfFactory=e.rdfFactory||d.A,this.xsd=g(this.rdfFactory)}setBase(e){return this.base=e,this}setFlags(e){return this.flags=e||"",this}toStr(e){var t=e.toNT();return"Graph"===e.termType&&(this.formulas[t]=e),t}fromStr(e){if("{"===e[0]){var t=this.formulas[e];return t||console.log("No formula object for "+e),t}return this.store.fromNT(e)}setNamespaces(e){for(var t in e)this.setPrefix(t,e[t]);return this}setPrefix(e,t){if("default"!==e.slice(0,7)&&"ns"!==e.slice(0,2)&&e&&t){for(let t in this.prefixes)this.prefixes[t]==e&&delete this.prefixes[t];this.prefixes[t]=e,this.namespaces[e]=t}}suggestPrefix(e,t){"default"!==e.slice(0,7)&&"ns"!==e.slice(0,2)&&e&&t&&(e in this.namespaces||t in this.prefixes||(this.prefixes[t]=e,this.namespaces[e]=t))}suggestNamespaces(e){for(var t in e)this.suggestPrefix(t,e[t]);return this}checkIntegrity(){var e,t;for(e in this.namespaces)if(this.prefixes[this.namespaces[e]]!==e)throw new Error("Serializer integity error 1: "+e+", "+this.namespaces[e]+", "+this.prefixes[this.namespaces[e]]+"!");for(t in this.prefixes)if(this.namespaces[this.prefixes[t]]!==t)throw new Error("Serializer integity error 2: "+t+", "+this.prefixs[t]+", "+this.namespaces[this.prefixes[t]]+"!")}makeUpPrefix(e){var t=e,r=function(t){return!!this.validPrefix.test(t)&&"ns"!==t&&!(t in this.namespaces)&&(this.prefixes[e]=t,this.namespaces[t]=e,t)}.bind(this);"#/".indexOf(t[t.length-1])>=0&&(t=t.slice(0,-1));var n=t.lastIndexOf("/");n>=0&&(t=t.slice(n+1));for(var i=0;i<t.length&&this.prefixchars.indexOf(t[i]);)i++;if((t=t.slice(0,i)).length<6&&r(t))return t;if(r(t.slice(0,3)))return t.slice(0,3);if(r(t.slice(0,2)))return t.slice(0,2);if(r(t.slice(0,4)))return t.slice(0,4);if(r(t.slice(0,1)))return t.slice(0,1);if(r(t.slice(0,5)))return t.slice(0,5);this.validPrefix.test(t)||(t="n");for(var o=0;;o++)if(r(t.slice(0,3)+o))return t.slice(0,3)+o}rootSubjects(e){for(var t={},r={},n={},i=0;i<e.length;i++){var o=e[i],a=function(e){t.hasOwnProperty(e)||(t[e]=[]),t[e].push(o.subject)};[o.subject,o.predicate,o.object].map(function(e){"BlankNode"===e.termType?n[e.toNT()]=!0:"Collection"===e.termType&&e.elements.forEach(function(e){a(e)})}),a(e[i].object);var s=r[this.toStr(o.subject)];s||(s=[]),s.push(o),r[this.toStr(o.subject)]=s}var c=[];for(var u in r)if(r.hasOwnProperty(u)){var l=this.fromStr(u);"BlankNode"===l.termType&&t[l]&&1===t[l].length||c.push(l)}this.incoming=t;for(var d={},p=0;p<c.length;p++)d[c[p].toNT()]=!0;return{roots:c,subjects:r,rootsHash:d,incoming:t}}toN3(e){return this.statementsToN3(e.statements)}explicitURI(e){var t;return this.flags.indexOf("r")<0&&this.base?e=h.refTo(this.base,e):this.flags.indexOf("u")>=0?e=function(e){for(var t,r="",n=0;n<e.length;n++)r+=(t=e.charCodeAt(n))>65535?"\\U"+("00000000"+t.toString(16)).slice(-8):t>126?"\\u"+("0000"+t.toString(16)).slice(-4):e[n];return r}(e):(t=decodeURI(e),e=encodeURI(t)),"<"+e+">"}statementsToNTriples(e){var t=e.slice();t.sort();for(var r="",n="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i=this,o=this.store,a=this.rdfFactory,s=function(e){if("Collection"!==e.termType)return i.atomicTermToN3(e);for(var t=e.elements,c=o.sym(n+"nill"),u=t.length-1;u>=0;u--){var l=a.blankNode();r+=s(l)+" "+s(o.sym(n+"first"))+" "+s(t[u])+".\n",r+=s(l)+" "+s(o.sym(n+"rest"))+" "+s(c)+".\n",c=l}return i.atomicTermToN3(c)},c=0;c<t.length;c++){var u=t[c],l="";l+=s(u.subject)+" ",l+=s(u.predicate)+" ",l+=s(u.object)+" ",this.flags.indexOf("q")>=0&&(l+=s(u.why)+" "),r+=l+=".\n"}return r}statementsToN3(e){var t=this.store,r={"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":"aaa:00"};e.sort(function(e,n){return m.heavyCompareSPO(e,n,t,r)}),this.base&&!this.defaultNamespace&&(this.defaultNamespace=this.base+"#");var n={};this.flags.indexOf("s")<0&&(n["http://www.w3.org/2002/07/owl#sameAs"]="="),this.flags.indexOf("t")<0&&(n["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"]="a"),this.flags.indexOf("i")<0&&(n["http://www.w3.org/2000/10/swap/log#implies"]="=>");var i=function(e){for(var t="",r=0;r<e;r++)t+=" ";return t},o=function(e){for(var t="",r=0;r<e.length;r++){var n=e[r],i="string"==typeof n?n:o(n);if(0!==r){var a=t.slice(-1)||" ";","===i||";"===i||("."!==i||"0123456789.:".includes(a))&&(t+=" ")}t+=i}return t},a=function(e,t){var r="",n=1e5;void 0===t&&(t=-1);for(var s=0;s<e.length;s++){var c=e[s];if("string"!=typeof c){var u=a(c,t+1);if(u.length<10*(80-4*t)&&u.indexOf('"""')<0){var l=o(c);l.length<80-4*t&&(c=l,u="")}u&&(n=1e4),r+=u}if("string"==typeof c){if(1===c.length&&"\n"===r.slice(-1)&&",.;".indexOf(c)>=0){r=r.slice(0,-1),"."==c&&"0123456789.:".includes(r.charAt(r.length-1))&&(r+=" ",n+=1),r+=c+"\n",n+=1;continue}if(n<4*t+4||n+c.length+1<80&&";.".indexOf(r[r.length-2])<0)r=r.slice(0,-1)+" "+c+"\n",n+=c.length+1;else{let e=i(4*t)+c;r+=e+"\n",n=e.length,t<0&&(r+="\n",n=1e5)}}}return r},s=function(e){for(var t=this.rootSubjects(e),r=t.roots,n=[],i=0;i<r.length;i++){var o=r[i];n.push(c(o,t))}return n}.bind(this);function c(e,t){return"BlankNode"!==e.termType||t.incoming[e]?[d(e,t)].concat([u(e,t)]).concat(["."]):l(e,t,!0).concat(["."])}var u=function(e,t){var r=[],i=null,o=t.subjects[this.toStr(e)]||[];if(void 0===o)throw new Error("Cant find statements for "+e);for(var a=[],s=0;s<o.length;s++){var c=o[s];c.predicate.uri===i?a.push(","):(i&&(r=r.concat([a]).concat([";"]),a=[]),r.push(n[c.predicate.uri]?n[c.predicate.uri]:d(c.predicate,t))),i=c.predicate.uri,a.push(l(c.object,t))}return r.concat([a])}.bind(this),l=function(e,t,r){return"BlankNode"!==e.termType||!r&&void 0!==t.rootsHash[e.toNT()]?d(e,t):t.subjects[this.toStr(e)]?["[",u(e,t),"]"]:"[]"}.bind(this);x.prototype.termToN3=d;var d=function(e,t){var r,n;switch(e.termType){case"Graph":return(n=(n=["{"]).concat(s(e.statements))).concat(["}"]);case"Collection":for(n=["("],r=0;r<e.elements.length;r++)n.push([l(e.elements[r],t)]);return n.push(")"),n;default:return this.atomicTermToN3(e)}}.bind(this),p=function(){var e="";for(var t in this.flags.indexOf("d")<0&&this.defaultNamespace&&(e+="@prefix : "+this.explicitURI(this.defaultNamespace)+".\n"),this.prefixes)this.prefixes.hasOwnProperty(t)&&this.namespacesUsed[t]&&(e+="@prefix "+this.prefixes[t]+": "+this.explicitURI(t)+".\n");return e+"\n"}.bind(this),f=s(e);return p()+a(f)}atomicTermToN3(e,t){switch(e.termType){case"BlankNode":case"Variable":return e.toNT();case"Literal":var r=e.value;if("string"!=typeof r)throw new TypeError("Value of RDF literal node must be a string");if(e.datatype&&this.flags.indexOf("x")<0)switch(e.datatype.uri){case"http://www.w3.org/2001/XMLSchema#integer":return r;case"http://www.w3.org/2001/XMLSchema#decimal":return r.indexOf(".")<0&&(r+=".0"),r;case"http://www.w3.org/2001/XMLSchema#double":{const e=r.toLowerCase().indexOf("e")>0;return r.indexOf(".")<0&&!e&&(r+=".0"),e||(r+="e0"),r}case"http://www.w3.org/2001/XMLSchema#boolean":return"1"===e.value?"true":"false"}var n=this.stringToN3(e.value,this.flags);return e.language?n+="@"+e.language:e.datatype.equals(this.xsd.string)||(n+="^^"+this.atomicTermToN3(e.datatype,t)),n;case"NamedNode":return this.symbolToN3(e);case"DefaultGraph":return"";default:throw new Error("Internal: atomicTermToN3 cannot handle "+e+" of termType: "+e.termType)}}stringToN3(e,t){t||(t="e");var r,n,i,o,a,s="";for(e.length>20&&'"'!==e.slice(-1)&&t.indexOf("n")<0&&(e.indexOf("\n")>0||e.indexOf('"')>0)?(o='"""',a=this.forbidden3):(o='"',a=this.forbidden1),r=0;r<e.length&&(a.lastIndex=0,null!=a.exec(e.slice(r)));){n=r+a.lastIndex-1,s+=e.slice(r,n);var c=e[n];'"'===c&&'"""'===o&&'"""'!==e.slice(n,n+3)?s+=c:(i='\b\f\r\t\v\n\\"'.indexOf(c))>=0?s+="\\"+'bfrtvn\\"'[i]:t.indexOf("e")>=0?s+="\\u"+("000"+c.charCodeAt(0).toString(16).toLowerCase()).slice(-4):s+=c,r=n+1}return o+s+e.slice(r)+o}symbolToN3(e){var t=e.uri,r=t.indexOf("#");if(r<0&&this.flags.indexOf("/")<0&&(r=t.lastIndexOf("/")),r>=0&&this.flags.indexOf("p")<0&&(0===t.indexOf("http")||0===t.indexOf("ws")||0===t.indexOf("file"))){for(var n=!0,i=r+1;i<t.length;i++)if(this._notNameChars.indexOf(t[i])>=0){n=!1;break}if(n){var o=t.slice(r+1),a=t.slice(0,r+1);if(this.defaultNamespace&&this.defaultNamespace===a&&this.flags.indexOf("d")<0)return this.flags.indexOf("k")>=0&&this.keyords.indexOf(o)<0?o:":"+o;var s=this.prefixes[a];if(s||(s=this.makeUpPrefix(a)),s)return this.namespacesUsed[a]=!0,s+":"+o}}return this.explicitURI(t)}writeStore(e){var t=this.store,r=t.fetcher,n=r&&r.appNode,i=this.store.index[3];for(var o in i){var a=t.fromNT(o);n&&a.equals(n)||e("\n"+this.atomicTermToN3(a)+" "+this.atomicTermToN3(t.sym("http://www.w3.org/2000/10/swap/log#semantics"))+" { "+this.statementsToN3(t.statementsMatching(void 0,void 0,void 0,a))+" }.\n")}t.statementsMatching(void 0,t.sym("http://www.w3.org/2007/ont/link#requestedURI")).map(function(r){e("\n<"+r.object.value+"> log:metadata {\n");var n=t.statementsMatching(void 0,void 0,void 0,r.subject);e(this.statementsToN3(this.statementsToN3(n))),e("}.\n")});var s=[];n&&s.push(n);var c=[];s.map(function(e){c=c.concat(t.statementsMatching(void 0,void 0,void 0,e))}),e(this.statementsToN3(c))}statementsToXML(e){var t=[];t["http://www.w3.org/1999/02/22-rdf-syntax-ns#"]=!0;var r="http://www.w3.org/1999/02/22-rdf-syntax-ns#_",n=function(e){for(var t="",r=0;r<e;r++)t+=" ";return t},i=function(e){for(var t="",r=0;r<e.length;r++){var n=e[r];t+="string"==typeof n?n:i(n)}return t},o=function(e,t){var r,a="",s=1e5;t||(t=0);for(var c=0;c<e.length;c++){var u=e[c];if("string"!=typeof u){var l=o(u,t+1);l.length<10*(80-4*t)&&l.indexOf('"""')<0&&(r=i(u)).length<80-4*t&&(u=" "+r,l=""),l&&(s=1e4),a+=l}"string"==typeof u&&(s<4*t+4?(a=a.slice(0,-1)+" "+u+"\n",s+=u.length+1):(a+=(r=n(4*t)+u)+"\n",s=r.length))}return a},a=function(e){this.suggestPrefix("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#");for(var t=this.rootSubjects(e),r=t.roots,n=[],i=0;i<r.length;i++){var o=r[i];n.push(u(o,t))}return n}.bind(this);function s(e){return void 0===e?"@@@undefined@@@@":e.replace(/[&<"]/g,function(e){switch(e[0]){case"&":return"&amp;";case"<":return"&lt;";case'"':return"&quot;"}})}var c=function(e){return s(this.base?h.refTo(this.base,e.uri):e.uri)}.bind(this),u=function(e,t){var n,i,o,a,f=[],h=t.subjects[this.toStr(e)];if(void 0===h)return d(e,t);h.sort(function(e,t){var n=e.predicate.uri,i=t.predicate.uri;if(n.substring(0,44)===r||i.substring(0,44)===r)return n.localeCompare(i);var o=n.substring(44),a=i.substring(44),s=parseInt(o,10),c=parseInt(a,10);return isNaN(s)||isNaN(c)||s!==o||c!==a?n.localeCompare(i):s-c});for(var m=0;m<h.length;m++)if("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"!==(o=h[m]).predicate.uri||n||"NamedNode"!==o.object.termType){if((a=o.predicate).uri.substr(0,44)===r){var g=a.uri.substr(44);g===parseInt(g,10).toString()&&(a=this.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#li"))}switch(i=p(a),o.object.termType){case"BlankNode":f=1===t.incoming[o.object].length?f.concat(["<"+i+' rdf:parseType="Resource">',u(o.object,t),"</"+i+">"]):f.concat(["<"+i+' rdf:nodeID="'+o.object.toNT().slice(2)+'"/>']);break;case"NamedNode":f=f.concat(["<"+i+' rdf:resource="'+c(o.object)+'"/>']);break;case"Literal":f=f.concat(["<"+i+(o.object.datatype.equals(this.xsd.string)?"":' rdf:datatype="'+s(o.object.datatype.uri)+'"')+(o.object.language?' xml:lang="'+o.object.language+'"':"")+">"+s(o.object.value)+"</"+i+">"]);break;case"Collection":f=f.concat(["<"+i+' rdf:parseType="Collection">',l(o.object,t),"</"+i+">"]);break;default:throw new Error("Can't serialize object of type "+o.object.termType+" into XML")}}else n=o.object;var v=n?p(n):"rdf:Description",y="";return"BlankNode"===e.termType?t.incoming[e]&&1===t.incoming[e].length||(y=' rdf:nodeID="'+e.toNT().slice(2)+'"'):y=' rdf:about="'+c(e)+'"',["<"+v+y+">"].concat([f]).concat(["</"+v+">"])}.bind(this);function l(e,t){for(var r=[],n=0;n<e.elements.length;n++)r.push(u(e.elements[n],t));return r}var d=function(e,t){var r=[],n=t.subjects[this.toStr(e)];if(!n)return r;n.sort();for(var i=0;i<n.length;i++){var o=n[i];switch(o.object.termType){case"BlankNode":r=t.rootsHash[o.object.toNT()]?r.concat(["<"+p(o.predicate)+' rdf:nodeID="'+o.object.toNT().slice(2)+'">',"</"+p(o.predicate)+">"]):r.concat(["<"+p(o.predicate)+' rdf:parseType="Resource">',d(o.object,t),"</"+p(o.predicate)+">"]);break;case"NamedNode":r=r.concat(["<"+p(o.predicate)+' rdf:resource="'+c(o.object)+'"/>']);break;case"Literal":r=r.concat(["<"+p(o.predicate)+(o.object.datatype.equals(this.xsd.string)?"":' rdf:datatype="'+s(o.object.datatype.value)+'"')+(o.object.language?' xml:lang="'+o.object.language+'"':"")+">"+s(o.object.value)+"</"+p(o.predicate)+">"]);break;case"Collection":r=r.concat(["<"+p(o.predicate)+' rdf:parseType="Collection">',l(o.object,t),"</"+p(o.predicate)+">"]);break;default:throw new Error("Can't serialize object of type "+o.object.termType+" into XML")}}return r}.bind(this),p=function(e){var r=e.uri,n=r.indexOf("#");if(n<0&&this.flags.indexOf("/")<0&&(n=r.lastIndexOf("/")),n<0)throw new Error("Cannot make qname out of <"+r+">");for(var i=n+1;i<r.length;i++)if(this._notNameChars.indexOf(r[i])>=0)throw new Error('Invalid character "'+r[i]+'" cannot be in XML qname for URI: '+r);var o=r.slice(n+1),a=r.slice(0,n+1);if(this.defaultNamespace&&this.defaultNamespace===a&&this.flags.indexOf("d")<0)return o;var s=this.prefixes[a];return s||(s=this.makeUpPrefix(a)),t[a]=!0,s+":"+o}.bind(this),f=a(e),m="<rdf:RDF";for(var g in this.defaultNamespace&&(m+=' xmlns="'+s(this.defaultNamespace)+'"'),t)if(t.hasOwnProperty(g)){var v=this.base&&this.flags.includes("z")?h.refTo(this.base,g):g;m+="\n xmlns:"+this.prefixes[g]+'="'+s(v)+'"'}return o([m+=">",f,"</rdf:RDF>"],-1)}statementsToJsonld(e){const t=this.statementsToN3(e),r=b.parse(t);return JSON.stringify(r,null,2)}}function _(e,t,r,n,i,o){r=r||e?.value;const a=o||{};n=n||s.sT;try{var c=w(t);a.flags&&c.setFlags(a.flags);var u=t.statementsMatching(void 0,void 0,void 0,e);switch("namespaces"in t&&c.suggestNamespaces(t.namespaces),a.namespaces&&c.setNamespaces(a.namespaces),c.setBase(r),n){case s.JG:return l(null,c.statementsToXML(u));case s.ny:case s.MG:return l(null,c.statementsToN3(u));case s.sT:case s.hu:return c.setFlags("si"),l(null,c.statementsToN3(u));case s.bM:return c.setFlags("deinprstux"),l(null,c.statementsToNTriples(u));case s.i2:return c.setFlags("si dr"),l(null,c.statementsToJsonld(u));case s._0:case s.BR:return c.setFlags("deinprstux q"),l(null,c.statementsToNTriples(u));default:throw new Error("Serialize: Content-type "+n+" not supported for data write.")}}catch(e){if(i)return i(e,void 0);throw e}function l(e,t){return i?void i(e,t):t}}var E=r(2915),S=r(6320),A=r(7335),k=r(5108);class C extends a.A{constructor(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};super(""),e=this,this.statements=t,this.constraints=r,this.initBindings=i,this.optional=o,(0,n.A)(this,"termType",s.bD),(0,n.A)(this,"classOrder",u.A.Graph),(0,n.A)(this,"fetcher",void 0),(0,n.A)(this,"isVar",0),(0,n.A)(this,"ns",f.A),(0,n.A)(this,"rdfFactory",void 0),this.rdfFactory=a&&a.rdfFactory||d.A;for(const t of A.Eu)this[t]=function(){return e.rdfFactory[t](...arguments)}}add(e,t,r,n){return 1===arguments.length&&e.forEach(e=>this.add(e.subject,e.predicate,e.object,e.graph)),this.statements.push(this.rdfFactory.quad(e,t,r,n))}addStatement(e){return this.add(e)}bnode(e){return this.rdfFactory.blankNode(e)}addAll(e){e.forEach(e=>{this.add(e.subject,e.predicate,e.object,e.graph)})}any(e,t,r,n){const i=this.anyStatementMatching(e,t,r,n);return null==i?null:null==e?i.subject:null==t?i.predicate:null==r?i.object:null}anyValue(e,t,r,n){const i=this.any(e,t,r,n);return i?i.value:void 0}anyJS(e,t,r,n){const i=this.any(e,t,r,n);return i?a.A.toJS(i):void 0}anyStatementMatching(e,t,r,n){let i=this.statementsMatching(e,t,r,n,!0);if(i&&0!==i.length)return i[0]}id(e){return this.rdfFactory.id(e)}statementsMatching(e,t,r,n,i){const o=this.statements.filter(i=>(!e||e.equals(i.subject))&&(!t||t.equals(i.predicate))&&(!r||r.equals(i.object))&&(!n||n.equals(i.graph)));return i?0===o.length?[]:[o[0]]:o}bottomTypeURIs(e){let t,r,n,i,o,a,s,c;t=[];for(let u in e)if(e.hasOwnProperty(u)){for(c=e[u],s=this.each(void 0,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),this.rdfFactory.namedNode(u)),r=!0,i=0,o=s.length;i<o;i++)if(n=s[i],a=n.uri,a in e){r=!1;break}r&&(t[u]=c)}return t}collection(){return new o.A}each(e,t,r,n){const i=[];let o=this.statementsMatching(e,t,r,n,!1);if(null==e)for(let e=0,t=o.length;e<t;e++)i.push(o[e].subject);else if(null==t)for(let e=0,t=o.length;e<t;e++)i.push(o[e].predicate);else if(null==r)for(let e=0,t=o.length;e<t;e++)i.push(o[e].object);else if(null==n)for(let e=0,t=o.length;e<t;e++)i.push(new k.A(o[e].graph.value));return i}equals(e){return!!e&&this.hashString()===e.hashString()}findMembersNT(e){let t,r,n,i,o,a,s,c,u,l,d,p,f,h;p={},p[e.toNT()]=!0,i={},a=this.transitiveClosure(p,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),!0);for(let e in a)if(a.hasOwnProperty(e)){s=this.statementsMatching(void 0,this.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),this.fromNT(e));for(let e=0,t=s.length;e<t;e++)f=s[e],i[f.subject.toNT()]=f;c=this.each(void 0,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#domain"),this.fromNT(e));for(let e=0,r=c.length;e<r;e++)for(o=c[e],u=this.statementsMatching(void 0,o),n=0,t=u.length;n<t;n++)f=u[n],i[f.subject.toNT()]=f;l=this.each(void 0,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#range"),this.fromNT(e));for(let e=0,t=l.length;e<t;e++)for(o=l[e],d=this.statementsMatching(void 0,o),h=0,r=d.length;h<r;h++)f=d[h],i[f.object.toNT()]=f}return i}findMemberURIs(e){return this.NTtoURI(this.findMembersNT(e))}findSubClassesNT(e){let t={};return t[e.toNT()]=!0,this.transitiveClosure(t,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),!0)}findSuperClassesNT(e){let t={};return t[e.toNT()]=!0,this.transitiveClosure(t,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),!1)}findTypesNT(e){let t,r,n,i,o,a,s,c,u;n="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",u=[],i=this.statementsMatching(e,void 0,void 0);for(let e=0,t=i.length;e<t;e++)if(c=i[e],"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"===c.predicate.uri)u[c.object.toNT()]=c;else{o=this.each(c.predicate,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#domain"));for(let e=0,t=o.length;e<t;e++)r=o[e],u[r.toNT()]=c}a=this.statementsMatching(void 0,void 0,e);for(let e=0,r=a.length;e<r;e++){c=a[e],s=this.each(c.predicate,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#range"));for(let e=0,r=s.length;e<r;e++)t=s[e],u[t.toNT()]=c}return this.transitiveClosure(u,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),!1)}findTypeURIs(e){return this.NTtoURI(this.findTypesNT(e))}connectedStatements(e,t,r){r=r||[];let n=[e],i={},o={},a=[],s=this,c=function(e){let c=function(e){"BlankNode"!==e.termType||i[e.value]||(i[e.value]=!0,n.push(e))},u=s.statementsMatching(null,null,e,t).concat(s.statementsMatching(e,null,null,t));u=u.filter(function(e){if(r[e.predicate.value])return!1;let t=e.toNT();return!o[t]&&(o[t]=!0,!0)}),u.forEach(function(e){c(e.subject),c(e.object)}),a=a.concat(u)};for(;n.length;)c(n.shift());return a}formula(e){return new C}fromNT(e){let t,r,n;switch(e[0]){case"<":return this.sym(e.slice(1,-1));case'"':if(n=void 0,t=void 0,r=e.lastIndexOf('"'),r<e.length-1)if("@"===e[r+1])n=e.slice(r+2);else{if("^^"!==e.slice(r+1,r+3))throw new Error("Can't convert string from NT: "+e);t=this.fromNT(e.slice(r+3))}return e=(e=(e=(e=e.slice(1,r)).replace(/\\"/g,'"')).replace(/\\n/g,"\n")).replace(/\\\\/g,"\\"),this.rdfFactory.literal(e,n||t);case"_":return this.rdfFactory.blankNode(e.slice(2));case"?":return new S.A(e.slice(1))}throw new Error("Can't convert from NT: "+e)}holds(e,t,r,n){let i;if(1===arguments.length){if(!e)return!0;if(e instanceof Array){for(i=0;i<e.length;i++)if(!this.holds(e[i]))return!1;return!0}if((0,E.SH)(e))return this.holds(e.subject,e.predicate,e.object,e.graph);if(e.statements)return this.holds(e.statements)}return null!=this.anyStatementMatching(e,t,r,n)}holdsStatement(e){return this.holds(e.subject,e.predicate,e.object,e.graph)}list(e,t){if(t.rdfFactory.supports.COLLECTIONS){const r=t.rdfFactory.collection();return e.forEach(function(e){r.append(e)}),r}{const r=t.rdfFactory.blankNode(),n=(0,A.XV)(t.rdfFactory,r,e);return t.addAll(n),r}}NTtoURI(e){let t,r,n={};for(t in e)e.hasOwnProperty(t)&&(r=e[t],"<"===t[0]&&(n[t.slice(1,-1)]=r));return n}serialize(e,t,r,n){return _(r,this,e,t,void 0,n)}substitute(e){let t=this.statements.map(function(t){return t.substitute(e)});const r=new C;return r.addAll(t),r}sym(e,t){if(t)throw new Error("This feature (kb.sym with 2 args) is removed. Do not assume prefix mappings.");return this.rdfFactory.namedNode(e)}the(e,t,r,n){let i=this.any(e,t,r,n);return null==i&&p.A.error("No value found for the() {"+e+" "+t+" "+r+"}."),i}transitiveClosure(e,t,r){let n,i,o,a,s,c,u={};Object.assign(u,e);let l={};for(;;){if(c=function(){for(let e in u)if(u.hasOwnProperty(e))return e}(),null==c)return l;for(s=r?this.each(void 0,t,this.fromNT(c)):this.each(this.fromNT(c),t),i=0,o=s.length;i<o;i++)n=s[i],a=n.toNT(),a in l||a in u||(u[a]=u[c]);l[c]=u[c],delete u[c]}}topTypeURIs(e){let t,r,n,i,o,a,s,c;for(n in s=[],e)if(e.hasOwnProperty(n)){for(c=e[n],o=0,a=this.each(this.rdfFactory.namedNode(n),this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf")),t=0,i=a.length;t<i;t++)if(r=a[t],"http://www.w3.org/2000/01/rdf-schema#Resource"!==r.uri){o++;break}o||(s[n]=c)}return s["http://www.w3.org/2000/01/rdf-schema#Resource"]&&delete s["http://www.w3.org/2000/01/rdf-schema#Resource"],s["http://www.w3.org/2002/07/owl#Thing"]&&delete s["http://www.w3.org/2002/07/owl#Thing"],s}toString(){return"{"+this.statements.join("\n")+"}"}variable(e){return new S.A(e)}whether(e,t,r,n){return this.statementsMatching(e,t,r,n,!1).length}}a.A.fromValue=o.Y;const T=a.A,I={xsd:(0,f.A)("http://www.w3.org/2001/XMLSchema#")};a.A.toJS=function(e){return(0,E.P3)(e)?e.elements.map(a.A.toJS):(0,E.c$)(e)?e.datatype.equals(I.xsd("boolean"))?"1"===e.value||"true"===e.value:e.datatype.equals(I.xsd("dateTime"))||e.datatype.equals(I.xsd("date"))?new Date(e.value):e.datatype.equals(I.xsd("integer"))||e.datatype.equals(I.xsd("float"))||e.datatype.equals(I.xsd("decimal"))?Number(e.value):e.value:e};class F{constructor(e,t){this.pat=new U,this.vars=[],this.name=e,this.id=t}}function P(e,t,r,n){function i(e){var t,r="";for(t in e)e.hasOwnProperty(t)&&(r+=" "+t+" -> "+e[t]);return r}function o(e){var t,r="Bindings: ",n=e.length;for(t=0;t<n;t++)r+=i(e[t][0])+";\n\t";return r}function a(e,t,r,n){var i;if(e.length!==t.length)return[];if(!e.length)return[[[],null]];var o=function(e,t,r,n){var i=r[e];if(void 0===i){if(e.isVar){var o=[];return o[e]=t,[[o,null]]}i=e}if(!i.complexType)return n.redirections[i]&&(i=n.redirections[i]),n.redirections[t]&&(t=n.redirections[t]),i.equals(t)||i.uri&&i.uri===l.U?[[[],null]]:[];if(e instanceof Array)return t instanceof Array?a(e,t,r):[];throw new Error("query.js: oops - code not written yet")}(e[0],t[0],r,n);if(0===o.length)return o;var s,c,u,d,p,f,h,m=[],g=o.length;for(s=0;s<g;s++){for(p in h=[],c=o[s][0])c.hasOwnProperty(p)&&(h[p]=c[p]);for(p in r)r.hasOwnProperty(p)&&(h[p]=r[p]);for(d=(i=a(e.slice(1),t.slice(1),h,n)).length,u=0;u<d;u++){for(p in f=i[u][0],c)c.hasOwnProperty(p)&&(f[p]=c[p]);m.push([f,null])}}return m}function s(e,t){var r=t[e];return void 0===r?e:r}function c(e,t){var r,n={};for(r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n}function u(e,t){return this.trunkBindings=t,this.originalCallback=e,this.branches=[],this}function d(e,t){return this.count=0,this.success=!1,this.done=!1,this.callback=e,this.onDone=t,this}u.prototype.checkAllDone=function(){var e;for(e=0;e<this.branches.length;e++)if(!this.branches[e].done)return;p.A.debug("OPTIONAL BIDNINGS ALL DONE:"),this.doCallBacks(this.branches.length-1,this.trunkBindings)},u.prototype.doCallBacks=function(e,t){var r;if(e<0)return this.originalCallback(t);for(r=0;r<this.branches[e].results.length;r++)this.doCallBacks(e-1,c(t,this.branches[e].results[r]))},d.prototype.reportMatch=function(e){this.callback(e),this.success=!0},d.prototype.reportDone=function(){this.done=!0,p.A.info("Mandatory query branch finished.***"),void 0!==this.onDone&&this.onDone()};var f=function(e){return this.count=0,this.done=!1,this.results=[],this.junction=e,e.branches.push(this),this};function m(e,t,r){var n,i,o,a;for(t.nvars=0,t.index=null,n=[t.subject,t.predicate,t.object,t.why],a=[e.subjectIndex,e.predicateIndex,e.objectIndex,e.whyIndex],o=0;o<4;o++){let c=n[o];if(c.uri&&c.uri===l.U);else if(c.isVar&&void 0===r[c])t.nvars++;else{if(c=s(n[o],r),e.redirections[e.id(c)]&&(c=e.redirections[e.id(c)]),!(i=a[o][e.id(c)]))return t.index=[],!1;(null===t.index||t.index.length>i.length)&&(t.index=i)}}return null===t.index&&(t.index=e.statements),!0}function g(e,t){return e.nvars!==t.nvars?e.nvars-t.nvars:e.index.length-t.index.length}f.prototype.reportMatch=function(e){this.results.push(e)},f.prototype.reportDone=function(){p.A.debug("Optional branch finished - results.length = "+this.results.length),0===this.results.length&&(this.results.push({}),p.A.debug("Optional branch FAILED - that's OK.")),this.done=!0,this.junction.checkAllDone()};var v=function(e,r,n,o,a,s,c){p.A.debug("Match begins, Branch count now: "+c.count+" for "+c.pattern_debug);var l,d,m=r.statements;if(0===m.length){if(p.A.debug("FOUND MATCH WITH BINDINGS:"+i(n)),0===r.optional.length)c.reportMatch(n);else{p.A.debug("OPTIONAL: "+r.optional);var g,y=new u(t,n),w=[];for(g=0;g<r.optional.length;g++)w[g]=new f(y),w[g].pattern_debug=r.optional[g];for(g=0;g<r.optional.length;g++)w[g].count=w[g].count+1,v(e,r.optional[g],n,"",a,t,w[g])}return c.count--,void p.A.debug("Match ends -- success , Branch count now: "+c.count+" for "+c.pattern_debug)}var x=m.length;if(a){var _=function(t,i){var u=t.uri.split("#")[0];a.nowOrWhenFetched(u,void 0,function(i,u,l){i||console.log("Error following link to <"+t.uri+"> in query: "+u),v(e,r,n,o,a,s,c)})};for(d=0;d<x;d++){if(l=m[d],void 0!==n[l.subject]&&n[l.subject].uri&&a&&"unrequested"===a.getState((0,h.docpart)(n[l.subject].uri)))return void _(n[l.subject]);if(void 0!==n[l.object]&&n[l.object].uri&&a&&"unrequested"===a.getState((0,h.docpart)(n[l.object].uri)))return void _(n[l.object])}}b(e,r,n,o,a,s,c)},y=function(e,t){var r,n,i=!0;for(r in e)e.hasOwnProperty(r)&&t[r]&&(n=t[r].test)&&!n(e[r])&&(i=!1);return i},b=function(e,t,r,n,s,c,u){var l,d,f,h,b,w,x,_=t.statements,E=_.length;for(l=0;l<E;l++)m(e,x=_[l],r);_.sort(g),x=_[0];var S,A=e.formula();A.optional=t.optional,A.constraints=t.constraints,A.statements=_.slice(1),p.A.debug(n+"match2 searching "+x.index.length+" for "+x+"; bindings so far="+i(r));var k,C,T=x.index.length,I=0;for(S=0;S<T;S++)for(C=x.index[S],k=a([x.subject,x.predicate,x.object,x.why],[C.subject,C.predicate,C.object,C.why],r,e),p.A.info(n+" From first: "+k.length+": "+o(k)),f=k.length,d=0;d<f;d++)if(b=[],w=k[d][0],y(w,t.constraints)){for(h in w)w.hasOwnProperty(h)&&(b[h]=w[h]);for(h in r)r.hasOwnProperty(h)&&(b[h]=r[h]);u.count++,I++,v(e,A,b,n+" ",s,c,u)}else p.A.debug("Branch count CS: "+u.count);u.count--,0===I&&p.A.debug("Match2 fails completely on "+x),p.A.debug("Match2 ends, Branch count: "+u.count+" for "+u.pattern_debug),0===u.count&&(p.A.debug("Branch finished."),u.reportDone())},w=this;p.A.debug("Query on "+this.statements.length);var x=new d(t,n);x.count++,e.sync?v(w,e.pat,e.pat.initBindings,"",r,t,x):setTimeout(function(){v(w,e.pat,e.pat.initBindings,"",r,t,x)},0)}var N=r(3078),O=r(8616);const R="http://www.w3.org/2002/07/owl#";function j(e,t,r,n){var i=e.any(t,r,void 0);return!!i&&(e.equate(i,n),!0)}function L(e,t,r,n){var i=e.any(void 0,r,n);return!!i&&(e.equate(i,t),!0)}function D(e,t,r,n,i){e.typeCallback&&e.typeCallback(e,n,i);var o=e.classActions[e.id(n)],a=!1;if(o)for(var s=0;s<o.length;s++)a=a||o[s](e,t,r,n,i);return a}class U extends C{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(void 0,void 0,void 0,void 0,t),(0,n.A)(this,"updater",void 0),(0,n.A)(this,"namespaces",void 0),(0,n.A)(this,"classActions",void 0),(0,n.A)(this,"propertyActions",void 0),(0,n.A)(this,"redirections",void 0),(0,n.A)(this,"aliases",void 0),(0,n.A)(this,"HTTPRedirects",void 0),(0,n.A)(this,"subjectIndex",void 0),(0,n.A)(this,"predicateIndex",void 0),(0,n.A)(this,"objectIndex",void 0),(0,n.A)(this,"whyIndex",void 0),(0,n.A)(this,"index",void 0),(0,n.A)(this,"features",void 0),(0,n.A)(this,"_universalVariables",void 0),(0,n.A)(this,"_existentialVariables",void 0),(0,n.A)(this,"rdfArrayRemove",void 0),(0,n.A)(this,"dataCallbacks",[]),(0,n.A)(this,"dataRemovalCallbacks",[]),this.propertyActions={},this.classActions={},this.redirections=[],this.aliases=[],this.HTTPRedirects=[],this.subjectIndex=[],this.predicateIndex=[],this.objectIndex=[],this.whyIndex=[],this.index=[this.subjectIndex,this.predicateIndex,this.objectIndex,this.whyIndex],this.namespaces={},this.features=e||[],this.rdfArrayRemove=t.rdfArrayRemove||m.RDFArrayRemove,t.dataCallback&&(this.dataCallbacks=[t.dataCallback]),t.dataRemovalCallback&&(this.dataRemovalCallbacks=[t.dataRemovalCallback]),this.initPropertyActions(this.features)}static get defaultGraphURI(){return l.U}substitute(e){var t=this.statements.map(function(t){return t.substitute(e)}),r=new U;return r.add(t),r}addDataCallback(e){this.dataCallbacks.push(e)}addDataRemovalCallback(e){this.dataRemovalCallbacks.push(e)}applyPatch(e,t,r){var n,i=this,o=null;function a(a){if(e.delete){n=e.delete,o&&(n=n.substitute(o)),n=n.statements;var s=[],c=n.map(function(e){var r=i.statementsMatching(e.subject,e.predicate,e.object,t);return 0===r.length?(s.push(e),null):r[0]});if(s.length)return r("Could not find to delete: "+s.join("\n or "));c.map(function(e){i.remove(e)})}e.insert&&(n=e.insert,o&&(n=n.substitute(o)),(n=n.statements).map(function(e){e.graph=t,i.add(e.subject,e.predicate,e.object,e.graph)})),a()}if(e.where){var s=new F("patch");s.pat=e.where,s.pat.statements.map(function(e){e.graph=Se(t.value)}),s.sync=!0;var c=[];i.query(s,function(e){c.push(e)},i.fetcher,function(){return 0===c.length?r("No match found to be patched:"+e.where):c.length>1?r("Patch ambiguous. No patch done."):(o=c[0],void a(r))})}else a(r)}declareExistential(e){return this._existentialVariables||(this._existentialVariables=[]),this._existentialVariables.push(e),e}initPropertyActions(e){this.propertyActions[this.rdfFactory.id(this.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))]=[D],(0,A.Do)(e,"sameAs")>=0&&(this.propertyActions[this.rdfFactory.id(this.rdfFactory.namedNode(`${R}sameAs`))]=[function(e,t,r,n,i){return e.equate(t,n),!0}]),(0,A.Do)(e,"InverseFunctionalProperty")>=0&&(this.classActions[this.rdfFactory.id(this.rdfFactory.namedNode(`${R}InverseFunctionalProperty`))]=[function(e,t,r,n,i){return e.newPropertyAction(t,L)}]),(0,A.Do)(e,"FunctionalProperty")>=0&&(this.classActions[this.rdfFactory.id(this.rdfFactory.namedNode(`${R}FunctionalProperty`))]=[function(e,t,r,n,i){return e.newPropertyAction(t,j)}])}addStatement(e){return this.add(e.subject,e.predicate,e.object,e.graph),this.statements.length}add(e,t,r,n){var i,o,a;if(1===arguments.length){if(e instanceof Array)for(i=0;i<e.length;i++)this.add(e[i]);else(0,E.aF)(e)?this.add(e.subject,e.predicate,e.object,e.graph):(0,E.ok)(e)&&this.add(e.statements);return this}n||(n=this.fetcher?this.fetcher.appNode:this.rdfFactory.defaultGraph()),"string"==typeof e&&(e=this.rdfFactory.namedNode(e)),t=T.fromValue(t);const s=T.fromValue(r);if(n=T.fromValue(n),!(0,E.CZ)(e))throw new Error("Subject is not a subject type");if(!(0,E.fY)(t))throw new Error(`Predicate ${t} is not a predicate type`);if(!(0,E.DJ)(s))throw new Error(`Object ${s} is not an object type`);if(!(0,E.RN)(n))throw new Error("Why is not a graph type");this.predicateCallback&&this.predicateCallback(this,t,n);var c=this.id(this.canon(t)),u=!1;if(o=this.propertyActions[c])for(i=0;i<o.length;i++)u=u||o[i](this,e,t,s,n);if(this.holds(e,t,s,n))return null;var l=[this.id(this.canon(e)),c,this.id(this.canon(s)),this.id(this.canon(n))];for(a=this.rdfFactory.quad(e,t,s,n),i=0;i<4;i++){var d=this.index[i],p=l[i];d[p]||(d[p]=[]),d[p].push(a)}this.statements.push(a);for(const e of this.dataCallbacks)e(a);return a}canon(e){if(!e)return e;const t=this.redirections[this.id(e)];if(t)return t;switch(e.termType){case s.$Q:return new i.A(e.value);case s.r0:return e;case s.ic:return new N.A;case s.S:case s.bD:return e;case s.QW:return new O.A(e.value,e.language,e.datatype);case s.Kk:return new k.A(e.value);case s.P2:return new S.A(e.value);default:throw new Error(`Term Type not recognized for canonization: ${e.termType}`)}}check(){this.checkStatementList(this.statements);for(var e=0;e<4;e++){var t=this.index[e];for(var r in t)t.hasOwnProperty(r)&&this.checkStatementList(t[r],e)}}checkStatementList(e,t){void 0===t&&(t=0);for(var r,n=" found in "+["subject","predicate","object","why"][t]+" index.",i=0;i<e.length;i++){for(var o=[(r=e[i]).subject,r.predicate,r.object,r.graph],a=function(e,t){for(var r=0;r<e.length;r++)if(e[r].subject.equals(t.subject)&&e[r].predicate.equals(t.predicate)&&e[r].object.equals(t.object)&&e[r].why.equals(t.graph))return!0},s=0;s<4;s++){var c=this.canon(o[s]),u=this.id(c);this.index[s][u]&&a(this.index[s][u],r)}if(!a(this.statements,r))throw new Error("Statement list does not statement "+r+"@"+r.graph+n)}}close(){return this}compareTerms(e,t){return Object.prototype.hasOwnProperty.call(e,"compareTerm")?e.compareTerm(t):u.A[e.termType]<u.A[t.termType]?-1:u.A[e.termType]>u.A[t.termType]?1:e.value<t.value?-1:e.value>t.value?1:0}copyTo(e,t,r){r||(r=[]);var n=this.statementsMatching(e);-1!==(0,A.Do)(r,"two-direction")&&n.concat(this.statementsMatching(void 0,void 0,e));for(var i=0;i<n.length;i++){var o=n[i];switch(o.object.termType){case"NamedNode":this.add(t,o.predicate,o.object);break;case"Literal":case"BlankNode":case"Collection":this.add(t,o.predicate,o.object.copy(this))}-1!==(0,A.Do)(r,"delete")&&this.remove(o)}}equate(e,t){const r=this.canon(e),n=this.canon(t);var i=this.compareTerms(r,n);return!i||(i<0?this.replaceWith(n,r):this.replaceWith(r,n))}formula(e){return new U(e)}get length(){return this.statements.length}match(e,t,r,n){return this.statementsMatching(T.fromValue(e),T.fromValue(t),T.fromValue(r),T.fromValue(n))}mentionsURI(e){var t="<"+e+">";return!!this.subjectIndex[t]||!!this.objectIndex[t]||!!this.predicateIndex[t]}newExistential(e){if(!e)return this.bnode();var t=this.sym(e);return this.declareExistential(t)}newPropertyAction(e,t){var r=this.id(e);this.propertyActions[r]||(this.propertyActions[r]=[]),this.propertyActions[r].push(t);for(var n=this.statementsMatching(void 0,e,void 0),i=!1,o=0;o<n.length;o++)i=i||t(this,n[o].subject,e,n[o].object);return i}newUniversal(e){var t=this.sym(e);return this._universalVariables||(this._universalVariables=[]),this._universalVariables.push(t),t}variable(e){return new S.A(e)}nextSymbol(e){for(var t=0;;t++){var r=e.value+"#n"+t;if(!this.mentionsURI(r))return this.sym(r)}}query(e,t,r,n){return P.call(this,e,t,r,n)}querySync(e){var t=[],r=!1;if(e.sync=!0,P.call(this,e,function(e){t.push(e)},null,function(){r=!0}),!r)throw new Error("Sync query should have called done function");return t}remove(e){if(e instanceof Array){for(var t=0;t<e.length;t++)this.remove(e[t]);return this}if((0,E.ok)(e))return this.remove(e.statements);var r=this.statementsMatching(e.subject,e.predicate,e.object,e.graph);if(!r.length)throw new Error("Statement to be removed is not on store: "+e);return this.removeStatement(r[0]),this}removeDocument(e){this.removeMetadata(e);for(var t=this.statementsMatching(void 0,void 0,void 0,e).slice(),r=0;r<t.length;r++)this.removeStatement(t[r]);return this.removeMatches(e,null,null),this}removeMetadata(e){const t=this.sym("chrome://TheCurrentSession"),r="http://www.w3.org/2007/ont/link#",n=this.statementsMatching(void 0,this.sym(`${r}requestedURI`),this.rdfFactory.literal(e.value),t).map(e=>e.subject);for(var i=0;i<n.length;i++){const e=n[i];if(null!=e){let n;const i=this.any(e,this.sym(`${r}status`),null,t);if(null!=i){n=this.statementsMatching(i,this.sym(`${r}status`),null,t).slice();for(var o=0;o<n.length;o++)this.removeStatement(n[o])}const a=this.any(e,this.sym(`${r}response`),null,t);if(null!=a)for(n=this.statementsMatching(a,null,null,t).slice(),o=0;o<n.length;o++)this.removeStatement(n[o]);for(n=this.statementsMatching(e,null,null,t).slice(),o=0;o<n.length;o++)this.removeStatement(n[o])}}return this.removeMatches(this.sym(e.value),null,null,t),this}removeMany(e,t,r,n,i){for(var o=this.statementsMatching(e,t,r,n,!1),a=[],s=0;s<o.length;s++)a.push(o[s]);for(i&&(a=a.slice(0,i)),s=0;s<a.length;s++)this.remove(a[s])}removeMatches(e,t,r,n){return this.removeMany(e,t,r,n),this}removeStatement(e){for(var t=[e.subject,e.predicate,e.object,e.graph],r=0;r<4;r++){var n=this.canon(t[r]),i=this.id(n);this.index[r][i]&&this.rdfArrayRemove(this.index[r][i],e)}this.rdfArrayRemove(this.statements,e);for(const t of this.dataRemovalCallbacks)t(e);return this}removeStatements(e){for(var t=0;t<e.length;t++)this.remove(e[t]);return this}replaceWith(e,t){for(var r=this.id(e),n=this.id(t),i=function(e){var t=e[r];if(t){var i=e[n];e[n]=i?t.concat(i):t,delete e[r]}},o=0;o<4;o++)i(this.index[o]);if(this.redirections[r]=t,e.value){if(this.aliases[n]||(this.aliases[n]=[]),this.aliases[n].push(e),this.aliases[r])for(o=0;o<this.aliases[r].length;o++)this.redirections[this.id(this.aliases[r][o])]=t,this.aliases[n].push(this.aliases[r][o]);this.add(t,this.sym("http://www.w3.org/2007/ont/link#uri"),e),this.fetcher&&this.fetcher.nowKnownAs(e,t)}return i(this.classActions),i(this.propertyActions),!0}allAliases(e){var t=this.aliases[this.id(this.canon(e))]||[];return t.push(this.canon(e)),t}sameThings(e,t){if(e.equals(t))return!0;var r=this.canon(e);if(!r)return!1;var n=this.canon(t);return!!n&&r.value===n.value}setPrefixForURI(e,t){if(("tab"!==e||!this.namespaces.tab)&&"ns"!==e.slice(0,2)&&"default"!==e.slice(0,7)){for(let e in this.namespaces)this.namespaces[e]==t&&delete this.namespaces[e];this.namespaces[e]=t}}statementsMatching(e,t,r,n,i){var o,a,s=[e,t,r,n],c=[],u=[],l=[],d=[];for(o=0;o<4;o++)c[o]=this.canon(T.fromValue(s[o])),c[o]?(d.push(o),u[o]=this.id(c[o])):l.push(o);if(0===d.length)return this.statements;if(1===d.length)return o=d[0],(a=this.index[o][u[o]])&&i&&a.length>1&&(a=a.slice(0,1)),a||[];var p,f,h=1e10;for(f=0;f<d.length;f++){if(o=d[f],!(a=this.index[o][u[o]]))return[];a.length<h&&(h=a.length,p=f)}for(var m=d[p],g=this.index[m][u[m]],v=d.slice(0,p).concat(d.slice(p+1)),y=[],b=["subject","predicate","object","why"],w=0;w<g.length;w++){var x=g[w];for(f=0;f<v.length;f++)if(o=v[f],!this.canon(x[b[o]]).equals(c[o])){x=null;break}if(null!=x&&(y.push(x),i))break}return y}uris(e){var t=this.canon(e),r=this.aliases[this.id(t)];if(!t.value)return[];var n=[t.value];if(r)for(var i=0;i<r.length;i++)n.push(r[i].uri);return n}serialize(e,t,r,n){return _(r,this,e,t,void 0,n={...n||{},namespaces:n?.namespaces?{...this.namespaces,...n.namespaces}:{...this.namespaces}})}}(0,n.A)(U,"handleRDFType",void 0),U.handleRDFType=D;var M=r(2299),B=r(5796),H=r(5936),q=r(5946),W=r(4945),V=r.n(W),K=r(2931),J=r(3093);const z={"text/n3":!0,"text/turtle":!0,"application/rdf+xml":!0,"application/xhtml+xml":!0,"text/html":!0,"application/ld+json":!0},$={rdf:s.JG,owl:s.JG,n3:"text/n3",ttl:"text/turtle",nt:"text/n3",acl:"text/n3",html:"text/html",xml:"text/xml"},G=e=>({link:(0,f.A)("http://www.w3.org/2007/ont/link#",e),http:(0,f.A)("http://www.w3.org/2007/ont/http#",e),httph:(0,f.A)("http://www.w3.org/2007/ont/httph#",e),rdf:(0,f.A)("http://www.w3.org/1999/02/22-rdf-syntax-ns#",e),rdfs:(0,f.A)("http://www.w3.org/2000/01/rdf-schema#",e),dc:(0,f.A)("http://purl.org/dc/elements/1.1/",e),ldp:(0,f.A)("http://www.w3.org/ns/ldp#",e)}),X=G();class Y{constructor(e,t){(0,n.A)(this,"response",void 0),(0,n.A)(this,"dom",void 0),this.response=e,this.dom=t}}(0,n.A)(Y,"pattern",void 0);class Q extends Y{static toString(){return"RDFXMLHandler"}static register(e){e.mediatypes[s.JG]={q:.9}}parse(e,t,r){let n=e.store;if(this.dom||(this.dom=m.parseXML(t)),"parsererror"===this.dom.documentElement.nodeName)return e.failFetch(r,"Badly formed XML in "+r.resource.value,"parse_error");let i=new q.A(n);try{i.parse(this.dom,r.original.value,r.original)}catch(t){return e.failFetch(r,"Syntax error parsing RDF/XML! "+t,"parse_error")}return r.noMeta||n.add(r.original,X.rdf("type"),X.link("RDFDocument"),e.appNode),e.doneFetch(r,this.response)}}Q.pattern=new RegExp("application/rdf\\+xml");class Z extends Y{static toString(){return"XHTMLHandler"}static register(e){e.mediatypes[s.H]={q:.8}}parse(e,t,r){let n,i;this.dom||(this.dom=m.parseXML(t));let o=e.store,a=this.dom.getElementsByTagName("title");a.length>0&&o.add(r.resource,X.dc("title"),o.rdfFactory.literal(a[0].textContent),r.resource);let s=this.dom.getElementsByTagName("link");for(let t=s.length-1;t>=0;t--)n=s[t].getAttribute("rel"),i=!1,n||(n=s[t].getAttribute("rev"),i=!0),n&&e.linkData(r.original,n,s[t].getAttribute("href"),r.resource,i);let c=this.dom.getElementsByTagName("script");for(let e=0;e<c.length;e++){let t=c[e].getAttribute("type");z[t]&&((0,B.A)(c[e].textContent,o,r.original.value,t),(0,B.A)(c[e].textContent,o,r.original.value,t))}if(r.noMeta||o.add(r.resource,X.rdf("type"),X.link("WebPage"),e.appNode),!r.noRDFa&&H.B)try{(0,H.B)(this.dom,o,r.original.value)}catch(t){let n="Error trying to parse "+r.resource+" as RDFa:\n"+t+":\n"+t.stack;return e.failFetch(r,n,"parse_error")}return e.doneFetch(r,this.response)}}Z.pattern=new RegExp("application/xhtml");class ee extends Y{static toString(){return"XMLHandler"}static register(e){e.mediatypes["text/xml"]={q:.5},e.mediatypes["application/xml"]={q:.5}}static isElement(e){return e.nodeType===Node.ELEMENT_NODE}parse(e,t,r){let n=m.parseXML(t);for(let i=0;i<n.childNodes.length;i++){const o=n.childNodes[i];if(ee.isElement(o)){let i=o.namespaceURI;if(i&&i===i.rdf)return e.addStatus(r.req,"Has XML root element in the RDF namespace, so assume RDF/XML."),new Q(this.response,n).parse(e,t,r);break}}if(n.doctype&&"html"===n.doctype.name&&n.doctype.publicId.match(/^-\/\/W3C\/\/DTD XHTML/)&&n.doctype.systemId.match(/http:\/\/www.w3.org\/TR\/xhtml/))return e.addStatus(r.req,"Has XHTML DOCTYPE. Switching to XHTML Handler.\n"),new Z(this.response,n).parse(e,t,r);let i=n.getElementsByTagName("html")[0];if(i){let o=i.getAttribute("xmlns");if(o&&o.match(/^http:\/\/www.w3.org\/1999\/xhtml/))return e.addStatus(r.req,"Has a default namespace for XHTML. Switching to XHTMLHandler.\n"),new Z(this.response,n).parse(e,t,r)}return e.failFetch(r,"Unsupported dialect of XML: not RDF or XHTML namespace, etc.\n"+t.slice(0,80),901)}}ee.pattern=new RegExp("(text|application)/(.*)xml");class te extends Y{static toString(){return"HTMLHandler"}static register(e){e.mediatypes["text/html"]={q:.8}}parse(e,t,r){let n=e.store;if(ae(t))return e.addStatus(r.req,"Has an XML declaration. We'll assume it's XHTML as the content-type was text/html.\n"),new Z(this.response).parse(e,t,r);if(function(e){const t=e.indexOf("<!DOCTYPE html"),r=e.indexOf(">");return!(-1===t||-1===r||t>r)&&-1!==e.substr(t,r-t).indexOf("XHTML")}(t))return e.addStatus(r.req,"Has XHTML DOCTYPE. Switching to XHTMLHandler.\n"),new Z(this.response).parse(e,t,r);if(function(e){return!!e.match(/[^(<html)]*<html\s+[^<]*xmlns=['"]http:\/\/www.w3.org\/1999\/xhtml["'][^<]*>/)}(t))return e.addStatus(r.req,"Has default namespace for XHTML, so switching to XHTMLHandler.\n"),new Z(this.response).parse(e,t,r);let i=new RegExp("<title>([\\s\\S]+?)</title>","im").exec(t);return i&&n.add(r.resource,X.dc("title"),n.rdfFactory.literal(i[1]),r.resource),n.add(r.resource,X.rdf("type"),X.link("WebPage"),e.appNode),e.addStatus(r.req,"non-XML HTML document, not parsed for data."),e.doneFetch(r,this.response)}}te.pattern=new RegExp("text/html");class re extends Y{static toString(){return"JsonLdHandler"}static register(e){e.mediatypes["application/ld+json"]={q:.9}}async parse(e,t,r,n){const i=e.store;try{return await(0,J.A)(t,i,r.original.value),e.store.add(r.original,X.rdf("type"),X.link("RDFDocument"),e.appNode),e.doneFetch(r,n)}catch(t){const i="Error trying to parse "+r.resource+" as JSON-LD:\n"+t;return e.failFetch(r,i,"parse_error",n)}}}re.pattern=/application\/(ld\+json|activity\+json)/;class ne extends Y{static toString(){return"TextHandler"}static register(e){e.mediatypes["text/plain"]={q:.5}}parse(e,t,r){return ae(t)?(e.addStatus(r.req,"Warning: "+r.resource+" has an XML declaration. We'll assume it's XML but its content-type wasn't XML.\n"),new ee(this.response).parse(e,t,r)):t.slice(0,500).match(/xmlns:/)?(e.addStatus(r.req,"May have an XML namespace. We'll assume it's XML but its content-type wasn't XML.\n"),new ee(this.response).parse(e,t,r)):(e.addStatus(r.req,"Plain text document, no known RDF semantics."),e.doneFetch(r,this.response))}}ne.pattern=new RegExp("text/plain");class ie extends Y{static toString(){return"N3Handler"}static register(e){e.mediatypes["text/n3"]={},e.mediatypes["text/turtle"]={}}parse(e,t,r,n){let i=e.store,o=(0,M.A)(i,i,r.original.value,r.original.value,null,null,"",null);try{o.loadBuf(t)}catch(t){let i="Error trying to parse "+r.resource+" as Notation3:\n"+t;return e.failFetch(r,i,"parse_error",n)}return e.addStatus(r.req,"N3 parsed: "+o.statementCount+" triples in "+o.lines+" lines."),e.store.add(r.original,X.rdf("type"),X.link("RDFDocument"),e.appNode),e.doneFetch(r,this.response)}}ie.pattern=new RegExp("(application|text)/(x-)?(rdf\\+)?(n3|turtle)");const oe={RDFXMLHandler:Q,XHTMLHandler:Z,XMLHandler:ee,HTMLHandler:te,TextHandler:ne,N3Handler:ie,JsonLdHandler:re};function ae(e){return!!e.match(/\s*<\?xml\s+version\s*=[^<>]+\?>/)}class se{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,n.A)(this,"store",void 0),(0,n.A)(this,"timeout",void 0),(0,n.A)(this,"_fetch",void 0),(0,n.A)(this,"mediatypes",void 0),(0,n.A)(this,"appNode",void 0),(0,n.A)(this,"requested",void 0),(0,n.A)(this,"timeouts",void 0),(0,n.A)(this,"redirectedTo",void 0),(0,n.A)(this,"fetchQueue",void 0),(0,n.A)(this,"fetchCallbacks",void 0),(0,n.A)(this,"nonexistent",void 0),(0,n.A)(this,"lookedUp",void 0),(0,n.A)(this,"handlers",void 0),(0,n.A)(this,"ns",void 0),(0,n.A)(this,"fireCallbacks",void 0),this.store=e||new U,this.ns=G(this.store.rdfFactory),this.timeout=t.timeout||3e4,this._fetch=t.fetch||void 0!==r.g&&(r.g.solidFetcher||r.g.solidFetch)||"undefined"!=typeof window&&(window.solidFetcher||window.solidFetch)||V(),!this._fetch)throw new Error("No _fetch function available for Fetcher");this.appNode=this.store.sym("chrome://TheCurrentSession"),this.store.fetcher=this,this.requested={},this.timeouts={},this.redirectedTo={},this.fetchQueue={},this.fetchCallbacks={},this.nonexistent={},this.lookedUp={},this.handlers=[],this.mediatypes={"image/*":{q:.9},"*/*":{q:.1}},m.callbackify(this,["request","fail","refresh","retract","done"]),Object.keys(t.handlers||oe).map(e=>this.addHandler(oe[e]))}static crossSiteProxy(e){return se.crossSiteProxyTemplate?se.crossSiteProxyTemplate.replace("{uri}",encodeURIComponent(e)):void 0}static offlineOverride(e){let t=e;var r;return"undefined"!=typeof window&&window.panes&&(r=window.panes.UI)&&r.preferences&&r.preferences.get("offlineModeUsingLocalhost")&&"http://"===t.slice(0,7)&&"localhost/"!==t.slice(7,17)&&(t="http://localhost/"+t.slice(7),p.A.warn("Localhost kludge for offline use: actually getting <"+t+">")),t}static proxyIfNecessary(e){var t;if("undefined"!=typeof window&&window.panes&&(t=window.panes.UI)&&t.isExtension)return e;if("undefined"!=typeof $SolidTestEnvironment&&$SolidTestEnvironment.localSiteMap){let t=e.split("/").slice(2);const r=(e,t)=>{let n=t[e.shift()];return n?"string"==typeof n?n+e.join("/"):e?r(e,n):null:null},n=r(t,$SolidTestEnvironment.localSiteMap);if(n)return n}return se.crossSiteProxyTemplate&&"undefined"!=typeof document&&document.location&&"https:"===(""+document.location).slice(0,6)&&"http:"===e.slice(0,5)?se.crossSiteProxyTemplate.replace("{uri}",encodeURIComponent(e)):e}static unsupportedProtocol(e){let t=h.protocol(e);return"tel"===t||"mailto"===t||"urn"===t}static setCredentials(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};void 0===t.credentials&&(void 0!==t.withCredentials?t.credentials=t.withCredentials?"include":"omit":t.credentials="include")}load(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t=Object.assign({},t),e instanceof Array)return Promise.all(e.map(e=>this.load(e,Object.assign({},t))));const r=e;let n=(0,K.E)(r);n=n.split("#")[0],t=this.initFetchOptions(n,t);const i=this.appNode,o=this.store,a=o.statementsMatching(void 0,this.ns.link("requestedURI"),o.sym(n),i).map(e=>e.subject);for(const e of a){const r=o.any(e,this.ns.link("response"),null,i);if(null!=r){const e=o.statementsMatching(r,this.ns.link("outOfDate"),!0,i);o.remove(e),t.force=!0,t.clearPreviousData=!0}}const s=this.initFetchOptions(n,t);return this.pendingFetchPromise(n,s.baseURI,s)}async pendingFetchPromise(e,t,r){let n;return!r.force&&await this.fetchQueue[t]?n=this.fetchQueue[t]:(n=Promise.race([this.setRequestTimeout(e,r),this.fetchUri(e,r)]),this.fetchQueue[t]=n,this.cleanupFetchRequest(t,void 0,this.timeout)),n.then(t=>(e in this.timeouts&&(this.timeouts[e].forEach(clearTimeout),delete this.timeouts[e]),t))}cleanupFetchRequest(e,t,r){void 0!==t&&console.warn("_options is deprecated"),this.timeouts[e]=(this.timeouts[e]||[]).concat(setTimeout(()=>{this.isPending(e)||delete this.fetchQueue[e]},r))}initFetchOptions(e,t){let r=this.store;!t.method||"GET"===t.method.toUpperCase()||(t.force=!0),t.resource=r.rdfFactory.namedNode(e),t.baseURI=t.baseURI||e,t.original=r.rdfFactory.namedNode(t.baseURI),t.req=r.bnode(),t.headers=t.headers||{},t.contentType&&(t.headers["content-type"]=t.contentType),t.force&&(t.cache="no-cache");let n=this.acceptString();t.headers.accept=n;let i=se.offlineOverride(e);t.requestedURI=i,se.setCredentials(i,t);let o=se.proxyIfNecessary(i);return i!==o&&(t.proxyUsed=!0),t.actualProxyURI=o,t}fetchUri(e,t){if(!e)return Promise.reject(new Error("Cannot fetch an empty uri"));if(se.unsupportedProtocol(e))return this.failFetch(t,"fetcher: Unsupported protocol","unsupported_protocol");let r=this.getState(e);if(t.force)delete this.nonexistent[e];else{if("fetched"===r)return Promise.resolve(this.doneFetch(t,{status:200,ok:!0,statusText:"Already loaded into quadstore."}));if("failed"===r&&404===this.requested[e]){let r="Previously failed: "+this.requested[e],n={url:e,status:this.requested[e],statusText:r,responseText:r,headers:new W.Headers,ok:!1,body:null,bodyUsed:!1,size:0,timeout:0};return this.failFetch(t,r,this.requested[e],n)}}this.fireCallbacks("request",[e]),this.requested[e]=!0,t.noMeta||this.saveRequestMetadata(e,t);let{actualProxyURI:n}=t;return this._fetch(n,t).then(r=>this.handleResponse(r,e,t),r=>{let i={url:n,status:999,statusText:(r.name||"network failure")+": "+(r.errno||r.code||r.type),responseText:r.message,headers:new W.Headers,ok:!1,body:null,bodyUsed:!1,size:0,timeout:0};return this.handleError(i,e,t)})}nowOrWhenFetched(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=(0,K.E)(e);"function"==typeof t?r=t:void 0===t||((0,E.Y2)(t)?n.referringTerm=t:n=t),this.load(i,n).then(e=>{if(r)if(e)if(e.ok)r(!0,"OK",e);else{let t="HTTP error: Status "+e.status+" ("+e.statusText+")";e.responseText&&(t+=" "+e.responseText),r(!1,t,e)}else r(!1,"@@ nowOrWhenFetched: no response object!")},function(e){var t=e.message||e.statusText;t="Failed to load <"+i+"> "+t,e.response&&e.response.status&&(t+=" status: "+e.response.status),r(!1,t,e.response)})}addStatus(e,t){let r=new Date;t="["+r.getHours()+":"+r.getMinutes()+":"+r.getSeconds()+"."+r.getMilliseconds()+"] "+t;let n=this.store;const i=n.the(e,this.ns.link("status"));(0,E.P3)(i)?i.append(n.rdfFactory.literal(t)):p.A.warn("web.js: No list to add to: "+i+","+t)}failFetch(e,t,r,n){this.addStatus(e.req,t),e.noMeta||this.store.add(e.original,this.ns.link("error"),this.store.rdfFactory.literal(t));let i=(e.method||"GET").toUpperCase();("GET"===i||"HEAD"===i)&&(e.resource.equals(e.original),this.requested[h.docpart(e.original.value)]=r,this.fireCallbacks("fail",[e.original.value,t]));var o=new Error("Fetcher: "+t);return o.status=r,o.statusText=t,o.response=n,Promise.reject(o)}linkData(e,t,r,n,i){if(!r)return;let o,a=this.store,s=a.rdfFactory.namedNode(h.join(r,e.value));if("alternate"===t||"seeAlso"===t||"meta"===t||"describedby"===t){if(s.value===e.value)return;o=this.ns.rdfs("seeAlso")}else o="type"===t?a.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"):a.rdfFactory.namedNode(h.join(encodeURIComponent(t),"http://www.iana.org/assignments/link-relations/"));i?a.add(s,o,e,n):a.add(e,o,s,n)}parseLinkHeader(e,t,r){if(!e)return;const n=/[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g,i=e.match(/<[^>]*>\s*(\s*;\s*[^()<>@,;:"/[\]?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g);if(null!=i)for(let e=0;e<i.length;e++){let o=i[e].split(">"),a=o[0].substring(1),s=o[1].match(n);if(null==s)return;for(let e=0;e<s.length;e++){let n=s[e].split("=")[1].replace(/["']/g,"");this.linkData(t,n,a,r)}}}doneFetch(e,t){return this.addStatus(e.req,"Done."),this.requested[e.original.value]="done",this.fireCallbacks("done",[e.original.value]),t.req=e.req,t}nowKnownAs(e,t){this.lookedUp[e.value]?this.lookedUp[t.value]||this.lookUpThing(t,e):this.lookedUp[t.value]&&(this.lookedUp[e.value]||this.lookUpThing(e,t))}putBack(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(0,K.E)(e);let n=new k.A(r).doc();return t.contentType=t["content-type"]||t["Content-Type"]||t.contentType||s.sT,"application/ld+json"===t.contentType?new Promise((r,i)=>{_(n,this.store,n.uri,t.contentType,(n,o)=>{n?i(n):(t.data=o,this.webOperation("PUT",e,t).then(e=>r(e)).catch(e=>i(e)))})}):(t.data=_(n,this.store,n.value,t.contentType),this.webOperation("PUT",r,t))}webCopy(e,t,r){return this.webOperation("GET",e).then(e=>this.webOperation("PUT",t,{data:e.responseText,contentType:r}))}delete(e,t){return this.webOperation("DELETE",e,t).then(t=>(this.requested[e]=404,this.nonexistent[e]=!0,this.unload(this.store.rdfFactory.namedNode(e)),t))}async createIfNotExists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.sT,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=this;try{var i=await n.load(e)}catch(o){if(404===o.response.status){try{i=await n.webOperation("PUT",e.value,{data:r,contentType:t})}catch(e){throw e}return delete n.requested[e.value],i}throw o}return i}createContainer(e,t,r){let n={"content-type":s.sT,link:this.ns.ldp("BasicContainer")+'; rel="type"'};t&&(n.slug=t);let i={headers:n};return r&&(i.body=r),this.webOperation("POST",e,i)}invalidateCache(e){const t=(0,K.E)(e),r=this;if(r.fetchQueue&&r.fetchQueue[t]&&(r.fetchQueue[t].PromiseStatus,delete r.fetchQueue[t]),r.requested[t]&&"done"!==r.requested[t]&&"failed"!==r.requested[t]&&404!==r.requested[t]){let e=`Rdflib: fetcher: Destructive operation on <${r.requested[t]}> file being fetched! `+t;console.error(e)}else delete r.requested[t],delete r.nonexistent[t]}webOperation(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(0,K.E)(t);r.method=e,r.body=r.data||r.body,r.force=!0;const i=this;if(r.body&&!r.contentType)throw new Error("Web operation sending data must have a defined contentType.");return r.contentType&&(r.headers=r.headers||{},r.headers["content-type"]=r.contentType),se.setCredentials(n,r),new Promise(function(t,o){i._fetch(n,r).then(r=>{if(r.ok)"PUT"!==e&&"PATCH"!==e&&"POST"!==e&&"DELETE"!==e||i.invalidateCache(n),r.text?r.text().then(e=>{r.responseText=e,t(r)}):t(r);else{let t="Web error: "+r.status;r.statusText&&(t+=" ("+r.statusText+")"),t+=" on "+e+" of <"+n+">",r.responseText&&(t+=": "+r.responseText);let i=new Error(t);i.response=r,o(i)}},t=>{o(new Error("Fetch error for "+e+" of <"+n+">:"+t))})})}lookUpThing(e,t){let r=this.store.uris(e);return r=r.map(e=>h.docpart(e)),r.forEach(e=>{this.lookedUp[e]=!0}),this.load(r,{referringTerm:t})}getHeader(e,t){const r=this.store,n=e.value,i=r.each(void 0,this.ns.link("requestedURI"),r.rdfFactory.literal(n));for(let e=0;e<i.length;e++){let n=i[e];if(void 0!==n){let e=r.any(n,this.ns.link("response"));if(void 0!==e&&r.anyValue(e,this.ns.http("status"))&&r.anyValue(e,this.ns.http("status")).startsWith("2")){let n=r.each(e,this.ns.httph(t.toLowerCase()));return n.length?n.map(e=>e.value):[]}}}}saveRequestMetadata(e,t){let r=t.req,n=this.store,i=t.referringTerm;this.addStatus(t.req,"Accept: "+t.headers.accept),(0,E.Y2)(i)&&n.add(n.rdfFactory.namedNode(e),this.ns.link("requestedBy"),i,this.appNode),t.original&&t.original.value!==e&&n.add(r,this.ns.link("orginalURI"),n.rdfFactory.literal(t.original.value),this.appNode);const o=new Date,a="["+o.getHours()+":"+o.getMinutes()+":"+o.getSeconds()+"] ";n.add(r,this.ns.rdfs("label"),n.rdfFactory.literal(a+" Request for "+e),this.appNode),n.add(r,this.ns.link("requestedURI"),n.rdfFactory.literal(e),this.appNode),n.add(r,this.ns.link("status"),n.collection(),this.appNode)}saveResponseMetadata(e,t){const r=this.store;let n=r.bnode();return r.add(t.req,this.ns.link("response"),n,this.appNode),r.add(n,this.ns.http("status"),r.rdfFactory.literal(e.status),this.appNode),r.add(n,this.ns.http("statusText"),r.rdfFactory.literal(e.statusText),this.appNode),e.headers.forEach((e,i)=>{r.add(n,this.ns.httph(i),this.store.rdfFactory.literal(e),this.appNode),"content-type"===i&&r.add(t.resource,this.ns.rdf("type"),r.rdfFactory.namedNode(m.mediaTypeClass(e).value),this.appNode)}),n}objectRefresh(e){let t=this.store.uris(e);if(void 0!==t)for(let e=0;e<t.length;e++)this.refresh(this.store.rdfFactory.namedNode(h.docpart(t[e])))}refresh(e,t){this.fireCallbacks("refresh",arguments),this.nowOrWhenFetched(e,{force:!0,clearPreviousData:!0},t)}refreshIfExpired(e,t){let r=this.getHeader(e,"Expires");!r||new Date(r[0]).getTime()<=(new Date).getTime()?this.refresh(e,t):t(!0,"Not expired",{})}retract(e){this.store.removeMany(void 0,void 0,void 0,e),e.value&&delete this.requested[h.docpart(e.value)],this.fireCallbacks("retract",arguments)}getState(e){return void 0===this.requested[e]?"unrequested":!0===this.requested[e]?"requested":"done"===this.requested[e]?"fetched":"redirected"===this.requested[e]?this.getState(this.redirectedTo[e]):"failed"}isPending(e){return!0===this.requested[e]}unload(e){this.store.removeDocument(e),delete this.requested[e.value]}addHandler(e){this.handlers.push(e),e.register(this)}retryNoCredentials(e,t){t.retriedWithNoCredentials=!0,delete this.requested[e],delete this.fetchQueue[e];let r=Object.assign({},t,{credentials:"omit"});return this.addStatus(t.req,"Abort: Will retry with credentials SUPPRESSED to see if that helps"),this.load(e,r)}isCrossSite(e){if("undefined"==typeof document||!document.location)return!1;const t=h.hostpart,r=""+document.location;return(t(r)&&t(e)&&t(r))!==t(e)}handleError(e,t,r){if(this.isCrossSite(t)){if(r.credentials&&"include"===r.credentials&&!r.retriedWithNoCredentials)return this.retryNoCredentials(t,r);let e=se.crossSiteProxy(t);if(e&&!r.proxyUsed)return this.redirectToProxy(e,r)}var n;return e instanceof Error?n="Fetch error: "+e.message:(n=e.statusText,e.responseText&&(n+=` ${e.responseText}`)),this.failFetch(r,n,e.status||998,e)}addType(e,t,r,n){let i=t;if(n){var o=r.any(i,this.ns.link("requestedURI"));o&&o.value!==n&&r.add(r.rdfFactory.namedNode(n),this.ns.rdf("type"),e,this.appNode)}for(;;){const t=r.any(i,this.ns.link("requestedURI"));if(t&&t.value&&r.add(r.rdfFactory.namedNode(t.value),this.ns.rdf("type"),e,this.appNode),i=r.any(void 0,r.rdfFactory.namedNode("http://www.w3.org/2007/ont/link#redirectedRequest"),i),!i)break;var a=r.any(i,r.rdfFactory.namedNode("http://www.w3.org/2007/ont/link#response"));if(!a)break;var s=r.any(a,r.rdfFactory.namedNode("http://www.w3.org/2007/ont/http#status"));if(!s)break;if("301"!==s&&"302"!==s)break}}handleResponse(e,t,r){const n=this.store,i=e.headers,o=r.req,a=this.saveResponseMetadata(e,r),s=this.normalizedContentType(r,i)||"";let c=i.get("content-location");if(0===e.status)return this.handleError(e,t,r);if(e.status>=400)return 404===e.status&&(this.nonexistent[r.original.value]=!0,this.nonexistent[t]=!0),this.saveErrorResponse(e,a).then(()=>{let t=r.resource+" "+e.statusText;return this.failFetch(r,t,e.status,e)});var u=null,l=null;if(c&&(l=h.join(c,t))!==t&&(u=l),200===e.status){if(this.addType(this.ns.link("Document"),o,n,t),u&&this.addType(this.ns.link("Document"),o,n,u),r.clearPreviousData){const e=n.statementsMatching(void 0,void 0,void 0,r.resource).slice();for(let t=0;t<e.length;t++)n.removeStatement(e[t])}let e=s.includes("image/")||s.includes("application/pdf");s&&e&&(this.addType(n.rdfFactory.namedNode("http://purl.org/dc/terms/Image"),o,n,t),u&&this.addType(n.rdfFactory.namedNode("http://purl.org/dc/terms/Image"),o,n,u))}if(c){if(!r.force&&u&&"done"===this.requested[l])return this.doneFetch(r,e);this.requested[l]=!0}this.parseLinkHeader(i.get("link"),r.original,o);let d=this.handlerForContentType(s,e);return d?e.text().then(t=>(e.responseText=t,d.parse(this,t,r,e))):(this.addStatus(o,"Fetch over. No data handled."),this.doneFetch(r,e))}saveErrorResponse(e,t){let r=this.store;return e.text().then(e=>{e.length>10&&r.add(t,this.ns.http("content"),r.rdfFactory.literal(e),t)})}handlerForContentType(e,t){if(!e)return null;let r=this.handlers.find(t=>e.match(t.pattern));return r?new r(t):null}guessContentType(e){return $[e.split(".").pop()]}normalizedContentType(e,t){if(e.forceContentType)return e.forceContentType;let r=t.get("content-type");if(!r||r.includes("application/octet-stream")){let t=this.guessContentType(e.resource.value);if(t)return t}let n=h.protocol(e.resource.value);return!r&&["file","chrome"].includes(n)?"text/xml":r}redirectToProxy(e,t){this.addStatus(t.req,"BLOCKED -> Cross-site Proxy to <"+e+">"),t.proxyUsed=!0;const r=this.store,n=t.req;t.noMeta||(r.add(n,this.ns.link("redirectedTo"),r.rdfFactory.namedNode(e),n),this.addStatus(n,"redirected to new request")),this.requested[t.resource.value]="redirected",this.redirectedTo[t.resource.value]=e;let i=Object.assign({},t);return i.baseURI=t.resource.value,this.fetchUri(e,i).then(e=>(i.noMeta||r.add(n,this.ns.link("redirectedRequest"),i.req,this.appNode),e))}setRequestTimeout(e,t){return new Promise(r=>{this.timeouts[e]=(this.timeouts[e]||[]).concat(setTimeout(()=>{!this.isPending(e)||t.retriedWithNoCredentials||t.proxyUsed||r(this.failFetch(t,`Request to ${e} timed out`,"timeout"))},this.timeout))})}addFetchCallback(e,t){this.fetchCallbacks[e]?this.fetchCallbacks[e].push(t):this.fetchCallbacks[e]=[t]}acceptString(){let e="";for(let t in this.mediatypes){""!==e&&(e+=", "),e+=t;for(let r in this.mediatypes[t])e+=";"+r+"="+this.mediatypes[t][r]}return e}}(0,n.A)(se,"HANDLERS",void 0),(0,n.A)(se,"CONTENT_TYPE_BY_EXT",void 0),(0,n.A)(se,"crossSiteProxyTemplate",void 0),se.HANDLERS=oe,se.CONTENT_TYPE_BY_EXT=$;const ce={parseJSON:function(e,t,r){var n,i,o,a={},s=r.sym(t);for(var c in e){0===c.indexOf("_:")?a[c]?n=a[c]:(n=r.bnode(c),a[c]=n):n=r.sym(c);var u=e[c];for(var l in u){var d=u[l];for(var p in i=r.sym(l),d){var f=d[p];if("uri"===f.type)o=r.sym(f.value),r.add(n,i,o,s);else if("BlankNode"===f.type)a[f.value]?o=a[f.value]:(o=r.bnode(f.value),a[f.value]=o),r.add(n,i,o,s);else{if("Literal"!==f.type)throw new Error("error: unexpected termtype: "+p.type);o=f.datatype?r.literal(f.value,void 0,r.sym(f.datatype)):f.lang?r.literal(f.value,f.lang):r.literal(f.value),r.add(n,i,o,s)}}}}}};function ue(e){var t=0;function r(e){var t="",r=e.statements;for(var n in r)p.A.debug("Found statement: "+r),t+=a()+r[n]+"\n";return t}function n(e){var t="";for(var r in e.constraints){var n=e.constraints[r];t+=a()+"FILTER ( "+n.describe(r)+" ) \n"}return t}function i(e){for(var o="",s=0;s<e.optional.length;s++)p.A.debug("Found optional query"),o+=a()+"OPTIONAL { \n",t++,o+=r(e.optional[s]),o+=n(e.optional[s]),o+=i(e.optional[s]),t--,o+=a()+"}\n";return o}function o(e){var o=a()+"WHERE \n{ \n";return t++,o+=r(e),o+=n(e),o+=i(e),t--,o+"}"}function a(){for(var e="",r=0;r<t;r++)e+=" ";return e}return function(e){return function(e){for(var t=a()+"SELECT ",r=0;r<e.vars.length;r++)t+=e.vars[r]+" ";return t+"\n"}(e)+o(e.pat)}(e)}function le(e,t,r){var n=[];function i(e){if(n[e])return n[e];var t=r.variable(e);return n[e]=t,t}function o(e){return"string"==typeof e&&e.match(/[^ \n\t]/)}function a(e){return"string"==typeof e&&e.match(/^[\?\$]/)}function s(e){return"string"==typeof e?e.replace(/^&lt;/,"<").replace(/&gt;$/,">"):e}function c(e){return"string"==typeof e&&e.match(/^<[^>]*>$/)}function u(e){return"string"==typeof e&&(e.match(/^_:/)||e.match(/^$/))}function l(e){return"string"==typeof e&&e.match(/:$/)}function d(e){return"string"==typeof e&&e.match(/^:|^[^_][^:]*:/)}function f(e){return e.split(":")[0]}function h(e){return e.split(":")[1]}function m(e){return c(e)?e.slice(1,e.length-1):e}function g(e){var t=-1===e.indexOf("'")?null:e.indexOf("'"),n=-1===e.indexOf('"')?null:e.indexOf('"');if(!t&&!n){var i=new Array(1);return i[0]=e,i}var o,a,s=new Array(2);if(!t||n&&n<t)o='"',a=n;else{if(n&&!(t&&t<n))return p.A.error("SQARQL QUERY OOPS!"),s;o="'",a=t}s[0]=e.slice(0,a);var c,u=e.slice(a+1).indexOf(o);return-1===u?(p.A.error("SPARQL parsing error: no matching parentheses in literal "+e),e):(e.slice(u+a+2).match(/^\^\^/)?(c=e.slice(u+a+2).indexOf(" "),s[1]=r.literal(e.slice(a+1,a+1+u),r.sym(m(e.slice(a+4+u,a+2+u+c)))),s=s.concat(g(e.slice(u+a+3+c)))):e.slice(u+a+2).match(/^@/)?(c=e.slice(u+a+2).indexOf(" "),s[1]=r.literal(e.slice(a+1,a+1+u),e.slice(a+3+u,a+2+u+c),null),s=s.concat(g(e.slice(u+a+2+c)))):(s[1]=r.literal(e.slice(a+1,a+1+u)),p.A.info("Literal found: "+s[1]),s=s.concat(g(e.slice(u+a+2)))),s)}function v(e){e=e.replace(/\(/g," ( ").replace(/\)/g," ) ").replace(/</g," <").replace(/>/g,"> ").replace(/{/g," { ").replace(/}/g," } ").replace(/[\t\n\r]/g," ").replace(/; /g," ; ").replace(/\. /g," . ").replace(/, /g," , "),p.A.info("New str into spaceDelimit: \n"+e);var t=[],r=e.split(" ");for(var n in r)o(r[n])&&(t=t.concat(r[n]));return t}function y(e,t){for(var r=0;r<t.length;r++)if("string"==typeof t[r]&&t[r].toLowerCase()===e.toLowerCase())return r;return null}function b(e,t){for(var r=[],n=0;n<t.length;n++)"string"==typeof t[n]&&t[n].toLowerCase()===e.toLowerCase()&&r.push(n);return r}function w(e,t,r){p.A.info("Looking for a close bracket of type "+r+" in "+e);for(var n=0,i=0;i<e.length;i++)if(e[i]===t&&n++,e[i]===r&&n--,n<0)return i;return p.A.error("Statement had no close parenthesis in SPARQL query"),0}function x(e){return this.describe=function(t){return t+" = "+e.toNT()},this.test=function(t){return e.equals(t)},this}function _(e){this.describe=function(t){return"REGEXP( '"+e+"' , "+t+" )"},this.test=function(t){var r=new RegExp(e);return!!t.value&&r.test(t.value)}}function E(e,t){3!==e.length||"Variable"!==e[0].termType||"NamedNode"!==e[2].termType&&"Literal"!==e[2].termType?6===e.length&&"string"==typeof e[0]&&"regexp"===e[0].toLowerCase()&&"("===e[1]&&")"===e[5]&&","===e[3]&&"Variable"===e[4].termType&&"Literal"===e[2].termType&&(p.A.debug("Constraint added: "+e),t.constraints[e[4]]=new _(e[2].value)):"="===e[1]||">"===e[1]||"<"===e[1]?(p.A.debug("Constraint added: "+e),t.constraints[e[0]]=new x(e[2])):p.A.warn("I don't know how to handle the constraint: "+e)}function S(e,t){p.A.debug("Optional query: "+e+" not yet implemented.");var n=r.formula();A(e,n),t.optional.push(n)}function A(e,t){var n,o,l=function(e){for(var t=[],n=0;n<e.length;n++)"string"==typeof e[n]?(e[n]=s(e[n]),a(e[n])?t[n]=i(e[n].slice(1)):u(e[n])?(p.A.info(e[n]+" was identified as a bnode."),t[n]=r.bnode()):c(e[n])?(p.A.info(e[n]+" was identified as a symbol."),t[n]=r.sym(m(e[n]))):d(e[n])?(p.A.info(e[n]+" was identified as a prefixed symbol"),T[f(e[n])]?t[n]=r.sym(e[n]=T[f(e[n])]+h(e[n])):(p.A.error("SPARQL error: "+e[n]+" with prefix "+f(e[n])+" does not have a correct prefix entry."),t[n]=e[n])):t[n]=e[n]):t[n]=e[n];return t}(e);for(p.A.debug("WHERE: "+l);y("OPTIONAL",l);)o=y("OPTIONAL",l),p.A.debug("OPT: "+o+" "+l[o]+" in "+l),"{"!==l[o+1]&&p.A.warn("Bad optional opening bracket in word "+o),-1===(n=w(l.slice(o+2),"{","}"))?p.A.error("No matching bracket in word "+o):(S(l.slice(o+2,o+2+n),t),o=y("OPTIONAL",l),n=w(l.slice(o+2),"{","}"),l.splice(o,n+3));for(p.A.debug("WHERE after optionals: "+l);y("FILTER",l);){var g=y("FILTER",l);"("!==l[g+1]&&p.A.warn("Bad filter opening bracket in word "+g),-1===(n=w(l.slice(g+2),"(",")"))?p.A.error("No matching bracket in word "+g):(E(l.slice(g+2,g+2+n),t),g=y("FILTER",l),n=w(l.slice(g+2),"(",")"),l.splice(g,n+3))}p.A.debug("WHERE after filters and optionals: "+l),function(e,t){var r=new Array(1);r[0]=-1;for(var n=r.concat(b(".",e)),i=[],o=0;o<n.length-1;o++)i[o]=e.slice(n[o]+1,n[o+1]);for(o in i){p.A.info("s+p+o "+o+" = "+i[o]);var a=i[o][0];i[o].splice(0,1);var s=r.concat(b(";",i[o]));s.push(i[o].length);for(var c=[],u=0;u<s.length-1;u++)c[u]=i[o].slice(s[u]+1,s[u+1]);for(o in c){p.A.info("p+o "+o+" = "+i[o]);var l=c[o][0];c[o].splice(0,1);var d=r.concat(b(",",c[o]));d.push(c[o].length);var f=[];for(u=0;u<d.length-1;u++)f[u]=c[o].slice(d[u]+1,d[u+1]);for(o in f){var h=f[o][0];p.A.info("Subj="+a+" Pred="+l+" Obj="+h),t.add(a,l,h)}}}}(l,t)}p.A.info("SPARQL input: \n"+e);var k=new F,C=function(e){var t=g(e),r=[];for(var n in t)r="string"==typeof t[n]?r.concat(v(t[n])):r.concat(t[n]);return r=function(e){for(var t=e,r=0;r<t.length;r++)if("a"===t[r]&&(t[r]="<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>"),"is"===t[r]&&"of"===t[r+2]){t.splice(r,1),t.splice(r+1,1);var n=t[r-1];t[r-1]=t[r+1],t[r+1]=n}return t}(r),p.A.info("SPARQL Tokens: "+r),r}(e),T=function(e){var t=b("PREFIX",e),r=[];for(var n in t){var i=e[t[n]+1],o=e[t[n]+2];if(l(i))if(c(o)){p.A.info("Prefix found: "+i+" -> "+o);var a=f(i),s=m(o);r[a]=s}else p.A.error("Invalid SPARQL symbol: "+o);else p.A.error("Invalid SPARQL prefix: "+i)}return r}(C);T.rdf||(T.rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"),T.rdfs||(T.rdfs="http://www.w3.org/2000/01/rdf-schema#");var I=y("SELECT",C),P=y("WHERE",C);if(I<0||P<0||I>P)return p.A.error("Invalid or nonexistent SELECT and WHERE tags in SPARQL query"),!1;if(function(e,t){for(var r in p.A.info("SPARQL vars: "+e),e)if(a(e[r])){p.A.info("Added "+e[r]+" to query variables from SPARQL");var n=i(e[r].slice(1));t.vars.push(n),n.label=e[r].slice(1)}else p.A.warn("Incorrect SPARQL variable in SELECT: "+e[r])}(C.slice(I+1,P),k),A(C.slice(P+2,C.length-1),k.pat),t)return k;for(var N in k.pat.statements){var O=k.pat.statements[N];"NamedNode"===O.subject.termType&&r.fetcher&&r.fetcher.lookUpThing(O.subject,"sparql:"+O.subject),"NamedNode"===O.object.termType&&r.fetcher&&r.fetcher.lookUpThing(O.object,"sparql:"+O.object)}return k}var de=r(5894),pe=r(9755);class fe{constructor(e){if((0,n.A)(this,"store",void 0),(0,n.A)(this,"ifps",void 0),(0,n.A)(this,"fps",void 0),(0,n.A)(this,"patchControl",void 0),(0,n.A)(this,"ns",void 0),(e=e||new U).updater)throw new Error("You can't have two UpdateManagers for the same store");e.fetcher||(e.fetcher=new se(e)),this.store=e,e.updater=this,this.ifps={},this.fps={},this.ns={},this.ns.link=(0,f.A)("http://www.w3.org/2007/ont/link#"),this.ns.http=(0,f.A)("http://www.w3.org/2007/ont/http#"),this.ns.httph=(0,f.A)("http://www.w3.org/2007/ont/httph#"),this.ns.ldp=(0,f.A)("http://www.w3.org/ns/ldp#"),this.ns.rdf=(0,f.A)("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.ns.rdfs=(0,f.A)("http://www.w3.org/2000/01/rdf-schema#"),this.ns.rdf=(0,f.A)("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.ns.owl=(0,f.A)("http://www.w3.org/2002/07/owl#"),this.patchControl=[]}patchControlFor(e){return this.patchControl[e.value]||(this.patchControl[e.value]=[]),this.patchControl[e.value]}isHttpUri(e){return"http"===e.slice(0,4)}flagAuthorizationMetadata(e){e||(e=this.store);const t=e.fetcher?.appNode,r=e.statementsMatching(void 0,this.ns.link("requestedURI"),void 0,t).map(e=>e.subject);for(const n of r){const r=e.any(n,this.ns.link("response"),null,t);null!=r&&e.add(r,this.ns.link("outOfDate"),!0,t)}}async checkEditable(e,t){if(!e)return!1;t||(t=this.store);const r=this.editable(e,t);return void 0!==r?r:(await(t.fetcher?.load(e)),this.editable(e,t))}editable(e,t){if(!e)return!1;if(t||(t=this.store),e=(0,K.E)(e),!this.isHttpUri(e)&&t.holds(t.rdfFactory.namedNode(e),t.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),t.rdfFactory.namedNode("http://www.w3.org/2007/ont/link#MachineEditableDocument")))return"LOCALFILE";var r,n=!1;const i=t.fetcher?.appNode;for(var o,a=t.each(void 0,this.ns.link("requestedURI"),(0,h.docpart)(e),i),s=0;s<a.length;s++)if(void 0!==(r=a[s])){const a=t.any(r,this.ns.link("response"),null,i);if(void 0!==a){if(t.anyJS(a,this.ns.link("outOfDate"),null,i))continue;var c=t.anyValue(a,this.ns.httph("wac-allow"));if(c)for(var u of c.split(",")){var l=u.split("=");if(l[0].includes("user")&&!l[1].includes("write")&&!l[1].includes("append"))return!1}var d=t.each(a,this.ns.httph("accept-patch"));if(d.length)for(let e=0;e<d.length;e++){if((o=d[e].value.trim()).indexOf("application/sparql-update")>=0)return"SPARQL";if(o.indexOf("application/sparql-update-single-match")>=0)return"SPARQL";if(o.indexOf("text/n3")>=0)return"N3PATCH"}var p=t.each(a,this.ns.httph("ms-author-via"));if(p.length)for(let e=0;e<p.length;e++){if((o=p[e].value.trim()).indexOf("SPARQL")>=0)return"SPARQL";if(o.indexOf("DAV")>=0)return"DAV"}if(!this.isHttpUri(e))return!!c&&"LOCALFILE";var f=t.each(a,this.ns.http("status"));if(f.length)for(let e=0;e<f.length;e++)200!==f[e]&&404!==f[e]||(n=!0)}}if(0===a.length);else if(n)return!1}anonymize(e){return"_:"===e.toNT().substr(0,2)&&this.mentioned(e)?"?"+e.toNT().substr(2):e.toNT()}anonymizeNT(e){return this.anonymize(e.subject)+" "+this.anonymize(e.predicate)+" "+this.anonymize(e.object)+" ."}nTriples(e){return`${e.subject.toNT()} ${e.predicate.toNT()} ${e.object.toNT()} .`}statementBnodes(e){return[e.subject,e.predicate,e.object].filter(function(e){return(0,E.jt)(e)})}statementArrayBnodes(e){var t=[];for(let r=0;r<e.length;r++)t=t.concat(this.statementBnodes(e[r]));t.sort();var r=[];for(let e=0;e<t.length;e++)0!==e&&t[e].equals(t[e-1])||r.push(t[e]);return r}cacheIfps(){this.ifps={};var e=this.store.each(void 0,this.ns.rdf("type"),this.ns.owl("InverseFunctionalProperty"));for(let t=0;t<e.length;t++)this.ifps[e[t].value]=!0;this.fps={},e=this.store.each(void 0,this.ns.rdf("type"),this.ns.owl("FunctionalProperty"));for(let t=0;t<e.length;t++)this.fps[e[t].value]=!0}bnodeContext2(e,t,r){var n,i,o=this.store.statementsMatching(void 0,void 0,e,t);for(let e=0;e<o.length;e++)if(this.fps[o[e].predicate.value]){if(!(n=o[e].subject).isBlank)return[o[e]];if(r&&(i=this.bnodeContext2(n,t,r-1)))return i.concat([o[e]])}o=this.store.statementsMatching(e,void 0,void 0,t);for(let e=0;e<o.length;e++)if(this.ifps[o[e].predicate.value]){if(!(n=o[e].object).isBlank)return[o[e]];if(r&&(i=this.bnodeContext2(n,t,r-1)))return i.concat([o[e]])}return null}bnodeContext1(e,t){for(var r=0;r<3;r++){var n=this.bnodeContext2(e,t,r);if(null!==n)return n}return this.store.connectedStatements(e,t)}mentioned(e){return 0!==this.store.statementsMatching(e,null,null,null).length||0!==this.store.statementsMatching(null,e).length||0!==this.store.statementsMatching(null,null,e).length}bnodeContext(e,t){var r=[];if(e.length){this.cacheIfps();for(let i=0;i<e.length;i++){var n=e[i];this.mentioned(n)&&(r=r.concat(this.bnodeContext1(n,t)))}}return r}statementContext(e){var t=this.statementBnodes(e);return this.bnodeContext(t,e.graph)}contextWhere(e){var t=this;return e&&0!==e.length?"WHERE { "+e.map(function(e){return t.anonymizeNT(e)}).join("\n")+" }\n":""}fire(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Promise.resolve().then(()=>{if(!e)throw new Error("No URI given for remote editing operation: "+t);return n.noMeta=!0,n.contentType=n.contentType||"application/sparql-update",n.body=t,this.store.fetcher.webOperation("PATCH",e,n)}).then(n=>{if(!n.ok){let r="UpdateManager: update failed for <"+e+"> status="+n.status+", "+n.statusText+"\n for query: "+t;throw new Error(r)}r(e,n.ok,n.responseText,n)}).catch(t=>{r(e,!1,t.message,t)})}update_statement(e){if(!e||e.graph){var t=this,r=this.statementContext(e);return{statement:e?[e.subject,e.predicate,e.object,e.graph]:void 0,statementNT:e?this.anonymizeNT(e):void 0,where:t.contextWhere(r),set_object:function(e,r){var n=this.where;n+="DELETE DATA { "+this.statementNT+" } ;\n",n+="INSERT DATA { "+this.anonymize(this.statement[0])+" "+this.anonymize(this.statement[1])+" "+this.anonymize(e)+" . }\n",t.fire(this.statement[3].value,n,r)}}}}insert_statement(e,t){var r=e instanceof Array?e[0]:e,n=this.contextWhere(this.statementContext(r));if(e instanceof Array){var i="";for(let t=0;t<e.length;t++)i+=e[t]+"\n";n+="INSERT DATA { "+i+" }\n"}else n+="INSERT DATA { "+this.anonymize(e.subject)+" "+this.anonymize(e.predicate)+" "+this.anonymize(e.object)+" . }\n";this.fire(r.graph.value,n,t)}delete_statement(e,t){var r=e instanceof Array?e[0]:e,n=this.contextWhere(this.statementContext(r));if(e instanceof Array){var i="";for(let t=0;t<e.length;t++)i+=e[t]+"\n";n+="DELETE DATA { "+i+" }\n"}else n+="DELETE DATA { "+this.anonymize(e.subject)+" "+this.anonymize(e.predicate)+" "+this.anonymize(e.object)+" . }\n";this.fire(r.graph.value,n,t)}requestDownstreamAction(e,t){var r=this.patchControlFor(e);if(r.pendingUpstream)if(r.downstreamAction){if(""+r.downstreamAction!=""+t)throw new Error("Can't wait for > 1 different downstream actions")}else r.downstreamAction=t;else t(e)}clearUpstreamCount(e){this.patchControlFor(e).upstreamCount=0}getUpdatesVia(e){var t=this.store.fetcher.getHeader(e,"updates-via");return t&&t.length?t[0].trim():null}addDownstreamChangeListener(e,t){var r=this.patchControlFor(e);r.downstreamChangeListeners||(r.downstreamChangeListeners=[]),r.downstreamChangeListeners.push(t),this.setRefreshHandler(e,e=>{this.reloadAndSync(e)})}reloadAndSync(e){var t=this.patchControlFor(e),r=this;if(t.reloading)t.outOfDate=!0;else{t.reloading=!0;var n=1e3,i=function(){r.reload(r.store,e,function(e,r,o){if(e){if(t.downstreamChangeListeners)for(let e=0;e<t.downstreamChangeListeners.length;e++)t.downstreamChangeListeners[e]();t.reloading=!1,t.outOfDate&&(t.outOfDate=!1,i())}else t.reloading=!1,o&&0===o.status&&(t.reloading=!0,setTimeout(i,n*=2))})};i()}}setRefreshHandler(e,t){let r=this.getUpdatesVia(e);var n=t,i=this,o=this,a=1500,s=0;if(!r)return!1;r=(0,h.join)(r,e.value);const c=r.replace(/^http:/,"ws:").replace(/^https:/,"wss:");var u=function(){var t;if("undefined"!=typeof WebSocket)t=new WebSocket(c);else{if("undefined"==typeof window||!window.WebSocket)return;t=window.WebSocket(c)}t.onopen=function(){a=1500,this.send("sub "+e.value),s&&o.requestDownstreamAction(e,n)};var r=i.patchControlFor(e);r.upstreamCount=0,t.onerror=function(e){},t.onclose=function(e){a*=2,s+=1,setTimeout(function(){u()},a)},t.onmessage=function(t){if(t.data&&"pub"===t.data.slice(0,3)){if("upstreamCount"in r&&(r.upstreamCount-=1,r.upstreamCount>=0))return;r.upstreamCount=0,i.requestDownstreamAction(e,n)}}};return u(),!0}updateMany(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=e.concat(t).map(e=>e.why),n=this,i=[];r.forEach(e=>{i.find(t=>t.equals(e))||i.push(e)});const o=i.map(r=>n.update(e.filter(e=>e.why.equals(r)),t.filter(e=>e.why.equals(r))));return o.length,Promise.all(o)}constructSparqlUpdateQuery(e,t,r){var n=this.contextWhere(r),i="";if(n.length){if(e.length){i+="DELETE { ";for(let t=0;t<e.length;t++)i+=this.anonymizeNT(e[t])+"\n";i+=" }\n"}if(t.length){i+="INSERT { ";for(let e=0;e<t.length;e++)i+=this.anonymizeNT(t[e])+"\n";i+=" }\n"}i+=n}else{if(e.length){i+="DELETE DATA { ";for(let t=0;t<e.length;t++)i+=this.anonymizeNT(e[t])+"\n";i+=" } \n"}if(t.length){e.length&&(i+=" ; "),i+="INSERT DATA { ";for(let e=0;e<t.length;e++)i+=this.nTriples(t[e])+"\n";i+=" }\n"}}return i}constructN3PatchQuery(e,t,r){var n="\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ex: <http://www.example.org/terms#>.\n\n_:patch\n";return r&&r.length>0&&(n+=`\n solid:where {\n ${r.map(e=>this.anonymizeNT(e)).join("\n ")}\n };`),e.length>0&&(n+=`\n solid:deletes {\n ${e.map(e=>this.anonymizeNT(e)).join("\n ")}\n };`),t.length>0&&(n+=`\n solid:inserts {\n ${t.map(e=>this.anonymizeNT(e)).join("\n ")}\n };`),n+" a solid:InsertDeletePatch .\n"}update(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(!r){var o=this;return new Promise(function(r,a){o.update(e,t,function(e,t,n){t?r():a(new Error(n))},n,i)})}try{var a=this.store,s=e?(0,E.ok)(e)?e.statements:e instanceof Array?e:[e]:[],c=t?(0,E.ok)(t)?t.statements:t instanceof Array?t:[t]:[];if(!(s instanceof Array))throw new Error("Type Error "+typeof s+": "+s);if(!(c instanceof Array))throw new Error("Type Error "+typeof c+": "+c);if(0===s.length&&0===c.length)return r(null,!0);var u=s.length?s[0].graph:c[0].graph;if(!u){let e="Error patching: statement does not specify which document to patch:"+s[0]+", "+c[0];throw new Error(e)}if("NamedNode"!==u.termType){let e="Error patching: document not a NamedNode:"+s[0]+", "+c[0];throw new Error(e)}var l=this.patchControlFor(u),d=Date.now(),p=["subject","predicate","object","why"],f={delete:s,insert:c};["insert","delete"].map(function(e){f[e].map(function(e){if(!u.equals(e.graph))throw new Error("update: destination "+u+" inconsistent with delete quad "+e.graph);p.map(function(t){if(void 0===e[t])throw new Error("update: undefined "+t+" of statement.")})})});var h=this.editable(u.value,a);if(!1===h)throw new Error("Update: Can't make changes in uneditable "+u);if(void 0===h){if(n)throw new Error("Update: Loaded "+u+"but still can't figure out what editing protocol it supports.");return void this.store.fetcher.load(u).then(n=>{this.update(e,t,r,!0,i)},n=>{if(404!==n.response.status)throw new Error(`Update: Can't get updatability status ${u} before patching: ${n}`);this.update(e,t,r,!0,i)})}if(h.indexOf("SPARQL")>=0||h.indexOf("N3PATCH")>=0){var g=h.indexOf("SPARQL")>=0,v=[];s.length&&(v=this.statementArrayBnodes(s)),c.length&&(v=v.concat(this.statementArrayBnodes(c)));var y=this.bnodeContext(v,u),b=g?this.constructSparqlUpdateQuery(s,c,y):this.constructN3PatchQuery(s,c,y);i.contentType=g?"application/sparql-update":"text/n3",l.pendingUpstream=l.pendingUpstream?l.pendingUpstream+1:1,"upstreamCount"in l&&(l.upstreamCount+=1),this.fire(u.value,b,(e,t,n,i)=>{if(i.elapsedTimeMs=Date.now()-d,t){try{a.remove(s)}catch(e){t=!1,n="Remote Ok BUT error deleting "+s.length+" from store!!! "+e}for(let e=0;e<c.length;e++)a.add(c[e].subject,c[e].predicate,c[e].object,u)}if(r(e,t,n,i),l.pendingUpstream-=1,0===l.pendingUpstream&&l.downstreamAction){var o=l.downstreamAction;delete l.downstreamAction,o(u)}},i)}else if(h.indexOf("DAV")>=0)this.updateDav(u,s,c,r,i);else{if(!(h.indexOf("LOCALFILE")>=0))throw new Error("Unhandled edit method: '"+h+"' for "+u);try{this.updateLocalFile(u,s,c,r,i)}catch(e){r(u.value,!1,"Exception trying to write back file <"+u.value+">\n")}}}catch(e){r(void 0,!1,"Exception in update: "+e+"\n"+m.stackString(e))}}updateDav(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=this.store;var a=o.any(e,this.ns.link("request"));if(!a)throw new Error("No record of our HTTP GET request for document: "+e);var s=o.any(a,this.ns.link("response"));if(!s)return null;var c=o.the(s,this.ns.httph("content-type")).value;let u=o.statementsMatching(void 0,void 0,void 0,e).slice();for(let e=0;e<t.length;e++)m.RDFArrayRemove(u,t[e]);for(let e=0;e<r.length;e++)u.push(r[e]);const l=this.serialize(e.value,u,c);var d,p=o.the(s,this.ns.httph("content-location"));return p&&(d=(0,h.join)(p.value,d)),i.contentType=c,i.noMeta=!0,i.body=l,o.fetcher.webOperation("PUT",d,i).then(i=>{if(!i.ok)throw new Error(i.error);for(let e=0;e<t.length;e++)o.remove(t[e]);for(let t=0;t<r.length;t++)o.add(r[t].subject,r[t].predicate,r[t].object,e);n(e.value,i.ok,i.responseText,i)}).catch(t=>{n(e.value,!1,t.message,t)})}updateLocalFile(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const o=this.store;let a=o.statementsMatching(void 0,void 0,void 0,e).slice();for(let e=0;e<t.length;e++)m.RDFArrayRemove(a,t[e]);for(let e=0;e<r.length;e++)a.push(r[e]);var s=e.value.lastIndexOf(".");if(s<1)throw new Error("Rewriting file: No filename extension: "+e.value);var c=e.value.slice(s+1);let u=se.CONTENT_TYPE_BY_EXT[c];if(!u)throw new Error("File extension ."+c+" not supported for data write");i.body=this.serialize(e.value,a,u),i.contentType=u,o.fetcher.webOperation("PUT",e.value,i).then(i=>{if(!i.ok)return n(e.value,!1,i.error);for(let e=0;e<t.length;e++)o.remove(t[e]);for(let t=0;t<r.length;t++)o.add(r[t].subject,r[t].predicate,r[t].object,e);n(e.value,!0,"")})}serialize(e,t,r){const n=this.store;let i;if("string"==typeof t)return t;var o=w(n);switch(o.suggestNamespaces(n.namespaces),o.setBase(e),r){case"text/xml":case"application/rdf+xml":i=o.statementsToXML(t);break;case"text/n3":case"text/turtle":case"application/x-turtle":case"application/n3":i=o.statementsToN3(t);break;default:throw new Error("Content-type "+r+" not supported for data serialization")}return i}put(e,t,r,n){const i=this.store;let o;return Promise.resolve().then(()=>(o=this.serialize(e.value,t,r),i.fetcher.webOperation("PUT",e.value,{contentType:r,body:o}))).then(r=>{if(!r.ok)return n(e.value,r.ok,r.error,r);delete i.fetcher.nonexistent[e.value],delete i.fetcher.requested[e.value],"string"!=typeof t&&t.map(e=>{i.addStatement(e)}),n(e.value,r.ok,"",r)}).catch(t=>{n(e.value,!1,t.message)})}reload(e,t,r){var n=Date.now();e.fetcher.nowOrWhenFetched(t.value,{force:!0,noMeta:!0,clearPreviousData:!0},function(e,i,o){if(e)if(o.onErrorWasCalled||200!==o.status)r(!1,"Non-HTTP error reloading data: "+i,o);else{var a=Date.now()-n;t.reloadTimeTotal||(t.reloadTimeTotal=0),t.reloadTimeCount||(t.reloadTimeCount=0),t.reloadTimeTotal+=a,t.reloadTimeCount+=1,r(!0)}else r(!1,"Error reloading data: "+i,o)})}}var he=r(9814);const me={...he.A,fetcher:(e,t)=>new se(e,t),graph(){return new U(arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,(arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0)||{rdfFactory:he.A})},lit(e,t,r){return this.literal(""+e,t||r)},st(e,t,r,n){return this.quad(e,t,r,n)}},ge=me;class ve{constructor(e,t){this.parent=e,this.via=t,this.connected=!1,this.pending={},this.subscribed={},this.socket={};try{this.socket=new WebSocket(t),this.socket.onopen=this.onOpen,this.socket.onclose=this.onClose,this.socket.onmessage=this.onMessage,this.socket.onerror=this.onError}catch(e){this.onError(e)}}_decode(e){var t,r,n,i,o,a,s;for(r in i={},o=function(){var r,n,i,o;for(o=[],r=0,n=(i=e.split("&")).length;r<n;r++)t=i[r],o.push(t.split("="));return o}())t=o[r],s=(a=[decodeURIComponent(t[0]),decodeURIComponent(t[1])])[1],null==i[n=a[0]]&&(i[n]=[]),i[n].push(s);return i}_send(e,t,r){var n,i;return i=[e,t,r].join(" "),"function"==typeof(n=this.socket).send?n.send(i):void 0}_subscribe(e){return this._send("sub",e,""),this.subscribed[e]=!0,this.subscribed[e]}onClose(e){var t;for(t in this.connected=!1,this.subscribed)this.pending[t]=!0;return this.subscribed={},this.subscribed}onError(e){throw new Error("onError"+e)}onMessage(e){var t,r;return"ping"===(r=e.data.split(" "))[0]?"function"==typeof(t=this.socket).send?t.send("pong "+r.slice(1).join(" ")):void 0:"pub"===r[0]?this.parent.onUpdate(r[1],this._decode(r[2])):void 0}onOpen(e){var t,r;for(r in this.connected=!0,t=[],this.pending)delete this.pending[r],t.push(this._subscribe(r));return t}subscribe(e){return this.connected?this._subscribe(e):(this.pending[e]=!0,this.pending[e])}}class ye{constructor(e){this.fetcher=e,this.graph={},this.via={},this.fetcher.addCallback("headers",this.onHeaders)}onHeaders(e){var t,r,n;return null==e.headers||"undefined"==typeof WebSocket||null===WebSocket||(t=e.headers.etag,n=e.headers["updates-via"],r=e.uri,t&&n&&(this.graph[r]={etag:t,via:n},this.register(n,r))),!0}onUpdate(e,t){return this.fetcher.refresh(ge.namedNode(e))}register(e,t){return null==this.via[e]&&(this.via[e]=new ve(this,e)),this.via[e].subscribe(t)}}const be={};for(const e in ge)"function"==typeof ge[e]&&(be[e]=ge[e].bind(ge));const{fetcher:we,graph:xe,lit:_e,st:Ee,namedNode:Se,variable:Ae,blankNode:ke,defaultGraph:Ce,literal:Te,quad:Ie,triple:Fe}=be,Pe=new C,Ne=e=>Pe.fromNT(e),Oe=T.fromValue,Re=i.A.nextId;class je extends U{constructor(e){super(e),(0,n.A)(this,"fetcher",void 0),this.fetcher=new se(this,{})}}class Le extends je{constructor(e){super(e),(0,n.A)(this,"updater",void 0),this.updater=new fe(this)}}},2222:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=e=>Math.floor(e.getTime()/1e3)},2263:(e,t,r)=>{"use strict";var n=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.messageArea=function(e,t,r,n,i){t=t||a.solidLogicSingleton.store,n=n.doc();var s,u,d=f.ns,p=c.Namespace("http://www.w3.org/2005/01/wf/flow#"),h=c.Namespace("http://purl.org/dc/terms/"),m=!!(i=i||{}).newestFirst,g="white-space: pre-wrap; width: 90%; font-size:100%; border: 0.07em solid #eee; padding: .2em 0.5em; margin: 0.1em 1em 0.1em 1em;",v=e.createElement("div"),y=a.solidLogicSingleton.store.updater,b=function(t,r){var n=e.createElement("a");return r&&r.uri&&(n.setAttribute("href",r.uri),n.addEventListener("click",f.widgets.openHrefInOutlineMode,!0),n.setAttribute("style","color: #3B5998; text-decoration: none; ")),n.textContent=t,n},w=function(t,r){var n=e.createElement("pre");return n.setAttribute("style",r||"color: grey"),v.appendChild(n),n.appendChild(e.createTextNode(t)),n},x=function(e){w(e,"color: #800;")};function _(e){var t=a.solidLogicSingleton.store.any(e,f.ns.foaf("nick"));return t?""+t.value:""+l.label(e)}function E(t,r,n,i){var o=t.appendChild(b(_(r),r));r.uri&&a.solidLogicSingleton.store.fetcher.nowOrWhenFetched(r.doc(),void 0,function(e,t){o.textContent=_(r)}),t.appendChild(e.createElement("br")),t.appendChild(b(n,i))}function S(e,r){var n,i,o={};for(n=r.firstChild;n;n=n.nextSibling)n.AJAR_subject&&(o[n.AJAR_subject.uri]=!0);var a=t.each(e,d.wf("message")),s={};for(a.forEach(function(e){s[e.uri]=!0,o[e.uri]||A(e)}),n=r.firstChild;n;)i=n.nextSibling,n.AJAR_subject&&!s[n.AJAR_subject.uri]&&r.removeChild(n),n=i}var A=function(e){var r={"?msg":e,"?creator":t.any(e,d.foaf("maker")),"?date":t.any(e,h("created")),"?content":t.any(e,d.sioc("content"))};k(r,!0)},k=function(n,i){var o=n["?creator"],a=n["?msg"],c=n["?date"],u=n["?content"],l=c.value,d=e.createElement("tr");d.AJAR_date=l,d.AJAR_subject=a;for(var p=!1,h=s.firstChild;h;h=h.nextSibling)if(l>h.AJAR_date&&m||l<h.AJAR_date&&!m){s.insertBefore(d,h),p=!0;break}p||s.appendChild(d);var v=e.createElement("td");d.appendChild(v),E(v,o,f.widgets.shortDate(l),a);var b=e.createElement("td");d.appendChild(b);var w=e.createElement("p");w.setAttribute("style",g+(i?"background-color: #e8ffe8;":"background-color: #white;")),b.appendChild(w),w.textContent=u.value;var _=e.createElement("td");d.appendChild(_);var A=e.createElement("button");_.appendChild(A),A.textContent="-",d.setAttribute("class","hoverControl"),A.setAttribute("class","hoverControlHide"),A.setAttribute("style","color: red;"),A.addEventListener("click",function(n){_.removeChild(A);var i=e.createElement("button");i.textContent="cancel",_.appendChild(i).addEventListener("click",function(e){_.removeChild(o),_.removeChild(i),_.appendChild(A)},!1);var o=e.createElement("button");o.textContent="Delete message",_.appendChild(o).addEventListener("click",function(e){_.removeChild(o),_.removeChild(i),function(e){var n=t.statementsMatching(e).concat(t.statementsMatching(void 0,void 0,e));y.update(n,[],function(e,t,n){t?S(r,s):x("Cant delete messages:"+n)})}(a)},!1)},!1)};(s=e.createElement("table")).fresh=!1,v.appendChild(s),s.setAttribute("style","width: 100%;");var C,T=function(){var i=e.createElement("tr"),a=e.createElement("td"),s=e.createElement("td"),l=e.createElement("td");i.appendChild(a),i.appendChild(s),i.appendChild(l),i.AJAR_date="9999-01-01T00:00:00Z";var p,m,v=function(){p.setAttribute("class","pendingedit"),p.disabled=!0;var o=[],a=new Date,s=""+a.getTime(),l=c.term(a),m=t.sym(n.uri+"#Msg"+s);o.push(new c.Statement(r,d.wf("message"),m,n)),o.push(new c.Statement(m,d.sioc("content"),t.literal(p.value),n)),o.push(new c.Statement(m,h("created"),l,n)),u&&o.push(new c.Statement(m,d.foaf("maker"),u,n)),y.update([],o,function(r,n,o){if(n){var a={"?msg":m,"?content":t.literal(p.value),"?date":l,"?creator":u};k(a,!1),p.value="",p.setAttribute("class",""),p.disabled=!1}else i.appendChild(f.widgets.errorMessageBlock(e,"Error writing message: "+o))})};i.appendChild(e.createElement("br"));var b={div:s,dom:e};return o.ensureLoggedIn(b).then(function(t){u=t.me,E(a,u,"",null),p=e.createElement("textarea"),s.innerHTML="",s.appendChild(p),p.rows=3,p.setAttribute("style",g+"background-color: #eef;"),p.addEventListener("keyup",function(e){13===e.keyCode&&(e.altKey||v())},!1),l.innerHTML="",(m=f.widgets.button(e,f.icons.iconBase+"noun_383448.svg","Send")).setAttribute("style",f.style.buttonStyle+"float: right;"),m.addEventListener("click",v,!1),l.appendChild(m)}),i}();if(m?s.insertBefore(T,s.firstChild):s.appendChild(T),i.query)C=i.query;else{C=new c.Query("Messages");var I={};["msg","date","creator","content"].forEach(function(e){C.vars.push(I[e]=c.variable(e))}),C.pat.add(r,p("message"),I.msg),C.pat.add(I.msg,d.dct("created"),I.date),C.pat.add(I.msg,d.foaf("maker"),I.creator),C.pat.add(I.msg,d.sioc("content"),I.content)}return t.query(C,k,void 0,function(){s.fresh=!0}),v.refresh=function(){S(r,s)},v};var i=r(4901),o=p(r(7822)),a=r(3451),s=p(r(2054)),c=p(r(2209)),u=p(r(5148)),l=p(r(7499)),d=p(r(1939));function p(e,t){if("function"==typeof WeakMap)var r=new WeakMap,i=new WeakMap;return(p=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return s;if(o=t?i:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var f={icons:i.icons,ns:s,rdf:c,style:u,widgets:d}},2291:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0});const n=new Uint8Array(16);t.default=function(){if(!r){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(n)}},2299:(e,t,r)=>{"use strict";r.d(t,{A:()=>T});var n=r(2727),i=r(7335),o=r(3476),a=r(9755);const s=(0,r(3581).A)("http://www.w3.org/1999/02/22-rdf-syntax-ns#");function c(e,t){function r(n,i,c){const u=e.statementsMatching(n,s("rest"),null,t);if(1!==u.length)throw new Error(`Bad list structure: no rest at ${n}`);const l=e.statementsMatching(n,s("first"),null,t);if(1!==l.length)throw new Error(`Bad list structure: rest but ${l.length} firsts at ${n}`);const d=[l[0].object].concat(i),p=c.concat(u).concat(l),f=e.statementsMatching(null,s("rest"),n,t);if(0===f.length){const r=new o.A(d);return e.remove(p),void function(e,t,r,n){for(const i of e.statementsMatching(r,null,null,n)){const r=new a.A(t,i.predicate,i.object,n);e.remove(i),e.add(r)}for(const i of e.statementsMatching(null,r,null,n))e.remove(i),e.add(new a.A(i.subject,t,i.object,n));for(const i of e.statementsMatching(null,null,r,n))e.remove(i),e.add(new a.A(i.subject,i.predicate,t,n))}(e,r,n,t)}if(1!==f.length)throw new Error(`Bad list structure: ${f.length} pres at ${n}`);const h=f[0].subject;if("BlankNode"!==h.termType)throw new Error(`Bad list element node ${h} type: ${h.termType} `);r(h,d,p)}!function(e,t){const r=s("nil");for(const n of e.statementsMatching(r,null,null,t)){e.remove(n);const r=new o.A;e.add(new a.A(r,n.predicate,n.object,t))}for(const n of e.statementsMatching(null,null,r,t))if(!n.predicate.sameTerm(s("rest"))){e.remove(n);const r=new o.A;e.add(new a.A(n.subject,n.predicate,r,t))}}(e,t),e.statementsMatching(null,s("rest"),s("nil"),t).forEach(e=>{if("BlankNode"!==e.subject.termType)throw new Error(`Bad list element node ${e.subject} type: ${e.subject.termType} `);r(e.subject,[],[])})}var u="http://www.w3.org/2000/10/swap/log#",l=function(e){return e},d=function(e){return e},p=function(e){if(e.length>0)throw"missing.js: oops nnonempty dict not imp";return[]},f=function(e){return e.length},h=function(e,t,r){if(void 0===e.slice)throw"@@ mising.js: No .slice function for "+e+" of type "+typeof e;return void 0===r||null==r?e.slice(t):e.slice(t,r)},m=Error("dummy error stop iteration"),g=function(e){return this.last=0,this.li=e,this.next=function(){if(this.last==this.li.length)throw m;return this.li[this.last++]},this},v=function(e,t){return e.indexOf(t)},y=function(e,t){if(!e){if(t)throw"python Assertion failed: "+t;throw"(python) Assertion failed."}};String.prototype.encode=function(e){if("utf-8"!=e)throw"UTF8_converter: can only do utf-8";return function(e){e=e.replace(/\r\n/g,"\n");for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t}(this)},String.prototype.decode=function(e){if("utf-8"!=e)throw"UTF8_converter: can only do utf-8";return this};var b=function(e,t){return n.join(t,e)},w="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil",x="http://www.w3.org/2002/07/owl#sameAs",_="\t\r\n !\"#$%&'()*.,+/;<=>?@[\\]^`{|}~",E=_+":",S=new RegExp("^([-+]?[0-9]+)(\\.[0-9]+)?([eE][-+]?[0-9]+)?","g"),A=new RegExp("^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9](T[0-9][0-9]:[0-9][0-9](:[0-9][0-9](\\.[0-9]*)?)?)?Z?"),k=new RegExp('[\\\\\\r\\n\\"]',"g"),C=new RegExp("^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*","g");const T=function(e,t,r,n,i,o,a,s){return new I(e,t,r,n,i,o,a,s)};class I{constructor(e,t,r,n,i,o,a,s){void 0===t&&(t=null),void 0===r&&(r=""),void 0===n&&(n=null),void 0===i&&(i=""),void 0===o&&(o=null),void 0===a&&(a=""),void 0===s&&(s=null),this._bindings=new p([]),this._flags=a,""!=r&&(y(r.indexOf(":")>=0,"Document URI not absolute: "+r),this._bindings[""]=r+"#"),this._store=e,i&&e.setGenPrefix(i),this._thisDoc=r,this.source=e.sym(r),this.lines=0,this.statementCount=0,this.hasNil=!1,this.startOfLine=0,this.previousLine=0,this._genPrefix=i,this.keywords=new d(["a","this","bind","has","is","of","true","false"]),this.keywordsSet=0,this._anonymousNodes=new p([]),this._variables=new p([]),this._parentVariables=new p([]),this._reason=s,this._reason2=null,this._baseURI=n||r||null,y(!this._baseURI||this._baseURI.indexOf(":")>=0),this._genPrefix||(this._thisDoc?this._genPrefix=this._thisDoc+"#_g":this._genPrefix=RDFSink_uniqueURI()),null==t?this._thisDoc?this._formula=e.formula(r+"#_formula"):this._formula=e.formula():this._formula=t,this._context=this._formula,this._parentContext=null}here(e){return this._genPrefix+"_L"+this.lines+"C"+(e-this.startOfLine+1)}formula(){return this._formula}loadStream(e){return this.loadBuf(e.read())}loadBuf(e){return this.startDoc(),this.feed(e),this.endDoc()}feed(e){for(var t=e.decode("utf-8"),r=0;r>=0;){var n=this.skipSpace(t,r);if(n<0)return;if((r=this.directiveOrStatement(t,n))<0)throw F(this._thisDoc,this.lines,t,n,"expected directive or statement")}}directiveOrStatement(e,t){var r,n=this.skipSpace(e,t);return n<0?n:(r=this.directive(e,n))>=0||(r=this.statement(e,n))>=0?this.checkDot(e,r):r}tok(e,t,r){if("@"==t.slice(r,r+1))r+=1;else if((0,i.Do)(this.keywords,e)<0)return-1;var n=r+f(e);return t.slice(r,n)==e&&_.indexOf(t.charAt(n))>=0?n:-1}directive(e,t){if((a=this.skipSpace(e,t))<0)return a;var r=new d([]);if((a=this.tok("bind",e,t))>0)throw F(this._thisDoc,this.lines,e,t,"keyword bind is obsolete: use @prefix");if((a=this.tok("keywords",e,t))>0){if((t=this.commaSeparatedList(e,a,r,!1))<0)throw F(this._thisDoc,this.lines,e,t,"'@keywords' needs comma separated list of words");return this.setKeywords(h(r,null,null)),t}if((a=this.tok("forAll",e,t))>0){if((t=this.commaSeparatedList(e,a,r,!0))<0)throw F(this._thisDoc,this.lines,e,t,"Bad variable list after @forAll");var n=new g(r);try{for(;;){var o=n.next();((0,i.Do)(this._variables,o)<0||(0,i.Do)(this._parentVariables,o)>=0)&&(this._variables[o]=this._context.newUniversal(o))}}catch(e){if(e!=m)throw e}return t}if((a=this.tok("forSome",e,t))>0){if((t=this.commaSeparatedList(e,a,r,this.uri_ref2))<0)throw F(this._thisDoc,this.lines,e,t,"Bad variable list after @forSome");n=new g(r);try{for(;;)o=n.next(),this._context.declareExistential(o)}catch(e){if(e!=m)throw e}return t}if((a=this.tok("prefix",e,t))>=0){var a,s=new d([]);if((t=this.qname(e,a,s))<0)throw F(this._thisDoc,this.lines,e,a,"expected qname after @prefix");if((a=this.uri_ref2(e,t,s))<0)throw F(this._thisDoc,this.lines,e,t,"expected <uriref> after @prefix _qname_");var c=s[1].uri;return this._baseURI?c=b(this._baseURI,c):y(c.indexOf(":")>=0,"With no base URI, cannot handle relative URI for NS"),y(c.indexOf(":")>=0),this._bindings[s[0][0]]=c,this.bind(s[0][0],function(e){return encodeURI(e)}(c)),a}if((a=this.tok("base",e,t))>=0){if(s=new d([]),(t=this.uri_ref2(e,a,s))<0)throw F(this._thisDoc,this.lines,e,a,"expected <uri> after @base ");if(c=s[0].uri,!this._baseURI)throw F(this._thisDoc,this.lines,e,a,"With no previous base URI, cannot use relative URI in @base <"+c+">");return c=b(this._baseURI,c),y(c.indexOf(":")>=0),this._baseURI=c,t}return-1}bind(e,t){""==e||this._store.setPrefixForURI(e,t)}setKeywords(e){null==e?this.keywordsSet=0:(this.keywords=e,this.keywordsSet=1)}startDoc(){}endDoc(){return this.hasNil&&this._store.rdfFactory.supports.COLLECTIONS&&c(this._store,this.source),this._formula}makeStatement(e){e[0].add(e[2],e[1],e[3],this.source),(e[2].uri&&e[2].uri===w||e[3].uri&&e[3].uri===w)&&(this.hasNil=!0),this.statementCount+=1}statement(e,t){var r=new d([]);if((t=this.object(e,t,r))<0)return t;var n=this.property_list(e,t,r[0]);if(n<0)throw F(this._thisDoc,this.lines,e,t,"expected propertylist");return n}subject(e,t,r){return this.item(e,t,r)}verb(e,t,r){if((i=this.skipSpace(e,t))<0)return i;var n=new d([]);if((i=this.tok("has",e,t))>=0){if((t=this.prop(e,i,n))<0)throw F(this._thisDoc,this.lines,e,i,"expected property after 'has'");return r.push(new l(["->",n[0]])),t}if((i=this.tok("is",e,t))>=0){if((t=this.prop(e,i,n))<0)throw F(this._thisDoc,this.lines,e,i,"expected <property> after 'is'");if((i=this.skipSpace(e,t))<0)throw F(this._thisDoc,this.lines,e,t,"End of file found, expected property after 'is'");var i;if(t=i,(i=this.tok("of",e,t))<0)throw F(this._thisDoc,this.lines,e,t,"expected 'of' after 'is' <prop>");return r.push(new l(["<-",n[0]])),i}if((i=this.tok("a",e,t))>=0)return r.push(new l(["->",this._store.sym("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")])),i;if("<="==e.slice(t,t+2))return r.push(new l(["<-",this._store.sym(u+"implies")])),t+2;if("="==e.slice(t,t+1))return">"==e.slice(t+1,t+2)?(r.push(new l(["->",this._store.sym(u+"implies")])),t+2):(r.push(new l(["->",this._store.sym(x)])),t+1);if(":="==e.slice(t,t+2))return r.push(new l(["->",u+"becomes"])),t+2;if((i=this.prop(e,t,n))>=0)return r.push(new l(["->",n[0]])),i;if(">-"==e.slice(t,t+2)||"<-"==e.slice(t,t+2))throw F(this._thisDoc,this.lines,e,i,">- ... -> syntax is obsolete.");return-1}prop(e,t,r){return this.item(e,t,r)}item(e,t,r){return this.path(e,t,r)}blankNode(e){return this._context.bnode(e,this._reason2)}path(e,t,r){if((o=this.nodeOrLiteral(e,t,r))<0)return o;for(;"!^.".indexOf(e.slice(o,o+1))>=0;){var n=e.slice(o,o+1);if("."==n){var i=e.slice(o+1,o+2);if(!i||E.indexOf(i)>=0&&":?<[{(".indexOf(i)<0)break}var o,a=r.pop(),s=this.blankNode(this.here(o));if((o=this.node(e,o+1,r))<0)throw F(this._thisDoc,this.lines,e,o,"EOF found in middle of path syntax");var c=r.pop();"^"==n?this.makeStatement(new l([this._context,c,s,a])):this.makeStatement(new l([this._context,c,a,s])),r.push(s)}return o}anonymousNode(e){if(t=this._anonymousNodes[e])return t;var t=this._store.bnode(e);return this._anonymousNodes[e]=t,t}node(e,t,r,n){void 0===n&&(n=null);var i=n;if((h=this.skipSpace(e,t))<0)return h;t=h;var o=e.slice(t,t+1);if("["==o){var a=this.here(t);if((h=this.skipSpace(e,t+1))<0)throw F(this._thisDoc,this.lines,e,t,"EOF after '['");if("="==e.slice(h,h+1)){t=h+1;var s=new d([]);if(!((h=this.objectList(e,t,s))>=0))throw F(this._thisDoc,this.lines,e,t,"objectList expected after [= ");if(i=s[0],f(s)>1){var c=new g(s);try{for(;;){var u=c.next();this.makeStatement(new l([this._context,this._store.sym(x),i,u]))}}catch(e){if(e!=m)throw e}}if((h=this.skipSpace(e,h))<0)throw F(this._thisDoc,this.lines,e,t,"EOF when objectList expected after [ = ");if(";"==e.slice(h,h+1))var h=h+1}if(null==i&&(i=this.blankNode(a)),(t=this.property_list(e,h,i))<0)throw F(this._thisDoc,this.lines,e,h,"property_list expected");if((h=this.skipSpace(e,t))<0)throw F(this._thisDoc,this.lines,e,t,"EOF when ']' expected after [ <propertyList>");if("]"!=e.slice(h,h+1))throw F(this._thisDoc,this.lines,e,h,"']' expected");return r.push(i),h+1}if("{"==o){if("$"==e.slice(t+1,t+2)){h=(t+=1)+1;for(var v=new d([]),y=!0;;){if((t=this.skipSpace(e,h))<0)throw F(this._thisDoc,this.lines,e,t,"needed '$}', found end.");if("$}"==e.slice(t,t+2)){h=t+2;break}if(y)y=!1;else{if(","!=e.slice(t,t+1))throw F(this._thisDoc,this.lines,e,t,"expected: ','");t+=1}var b=new d([]);if((h=this.item(e,t,b))<0)throw F(this._thisDoc,this.lines,e,t,"expected item in set or '$}'");v.push(b[0])}return r.push(this._store.newSet(v,this._context)),h}h=t+1;var w=this._parentContext;this._parentContext=this._context;var _=this._anonymousNodes,E=this._parentVariables;this._parentVariables=this._variables,this._anonymousNodes=new p([]),this._variables=this._variables.slice();var S=this._reason2;for(this._reason2=null,null==i&&(i=this._store.formula()),this._context=i;;){if((t=this.skipSpace(e,h))<0)throw F(this._thisDoc,this.lines,e,t,"needed '}', found end.");if("}"==e.slice(t,t+1)){h=t+1;break}if((h=this.directiveOrStatement(e,t))<0)throw F(this._thisDoc,this.lines,e,t,"expected statement or '}'")}return this._anonymousNodes=_,this._variables=this._parentVariables,this._parentVariables=E,this._context=this._parentContext,this._reason2=S,this._parentContext=w,r.push(i.close()),h}if("("==o){var A=this._store.list;for("$"==e.slice(t+1,t+2)&&(A=this._store.newSet,t+=1),h=t+1,v=new d([]);;){if((t=this.skipSpace(e,h))<0)throw F(this._thisDoc,this.lines,e,t,"needed ')', found end.");if(")"==e.slice(t,t+1)){h=t+1;break}if(b=new d([]),(h=this.item(e,t,b))<0)throw F(this._thisDoc,this.lines,e,t,"expected item in list or ')'");v.push(b[0])}return r.push(A(v,this._context)),h}if((h=this.tok("this",e,t))>=0)throw F(this._thisDoc,this.lines,e,t,"Keyword 'this' was ancient N3. Now use @forSome and @forAll keywords.");return(h=this.tok("true",e,t))>=0?(r.push(!0),h):(h=this.tok("false",e,t))>=0?(r.push(!1),h):null==i&&(h=this.uri_ref2(e,t,r))>=0?h:-1}property_list(e,t,r){for(;;){if((p=this.skipSpace(e,t))<0)throw F(this._thisDoc,this.lines,e,t,"EOF found when expected verb in property list");if(":-"!=e.slice(p,p+2)){t=p;var n=new d([]);if((p=this.verb(e,t,n))<=0)return t;var i=new d([]);if((t=this.objectList(e,p,i))<0)throw F(this._thisDoc,this.lines,e,p,"objectList expected");var o=new g(i);try{for(;;){var a=o.next(),s=n[0],c=s[0],u=s[1];"->"==c?this.makeStatement(new l([this._context,u,r,a])):this.makeStatement(new l([this._context,u,a,r]))}}catch(e){if(e!=m)throw e}if((p=this.skipSpace(e,t))<0)throw F(this._thisDoc,this.lines,e,p,"EOF found in list of objects");if(";"!=e.slice(t,t+1))return t;t+=1}else{t=p+2;var p,f=new d([]);if((p=this.node(e,t,f,r))<0)throw F(this._thisDoc,this.lines,e,t,"bad {} or () or [] node after :- ");t=p}}}commaSeparatedList(e,t,r,n){if((i=this.skipSpace(e,t))<0)throw F(this._thisDoc,this.lines,e,i,"EOF found expecting comma sep list");if("."==e.charAt(i))return t;if(n)var i=this.uri_ref2(e,i,r);else i=this.bareWord(e,i,r);if(i<0)return-1;for(;;){if((t=this.skipSpace(e,i))<0)return t;var o=e.slice(t,t+1);if(","!=o)return"."!=o?-1:t;if((i=n?this.uri_ref2(e,t+1,r):this.bareWord(e,t+1,r))<0)throw F(this._thisDoc,this.lines,e,i,"bad list content")}}objectList(e,t,r){if((t=this.object(e,t,r))<0)return-1;for(;;){var n=this.skipSpace(e,t);if(n<0)throw F(this._thisDoc,this.lines,e,n,"EOF found after object");if(","!=e.slice(n,n+1))return n;if((t=this.object(e,n+1,r))<0)return t}}checkDot(e,t){var r=this.skipSpace(e,t);if(r<0)return r;if("."==e.slice(r,r+1))return r+1;if("}"==e.slice(r,r+1))return r;if("]"==e.slice(r,r+1))return r;throw F(this._thisDoc,this.lines,e,r,"expected '.' or '}' or ']' at end of statement")}uri_ref2(e,t,r){var n=new d([]);if((g=this.qname(e,t,n))>=0){var o=n[0],a=o[0],s=o[1];if(null==a){y(0,"not used?");var c=this._baseURI+"#"}else if(!(c=this._bindings[a])){if("_"==a)return r.push(this.anonymousNode(s)),g;throw F(this._thisDoc,this.lines,e,t,"Prefix "+a+" not bound.")}var u=this._store.sym(c+s);return(0,i.Do)(this._variables,u)>=0?r.push(this._variables[u]):r.push(u),g}if((t=this.skipSpace(e,t))<0)return-1;if("?"==e.charAt(t)){var l=new d([]);return(g=this.variable(e,t,l))>0?(r.push(l[0]),g):-1}if("<"==e.charAt(t)){for(var p=t+=1;t<f(e);){if(">"==e.charAt(t)){var m=e.slice(p,t);return this._baseURI?m=b(this._baseURI,m):y(m.indexOf(":")>=0,"With no base URI, cannot deal with relative URIs"),"#"==e.slice(t-1,t)&&"#"!=h(m,-1,null)&&(m+="#"),u=this._store.sym(m),(0,i.Do)(this._variables,u)>=0?r.push(this._variables[u]):r.push(u),t+1}t+=1}throw F(this._thisDoc,this.lines,e,g,"unterminated URI reference")}if(this.keywordsSet){var g;if(l=new d([]),(g=this.bareWord(e,t,l))<0)return-1;if((0,i.Do)(this.keywords,l[0])>=0)throw F(this._thisDoc,this.lines,e,t,'Keyword "'+l[0]+'" not allowed here.');return r.push(this._store.sym(this._bindings[""]+l[0])),g}return-1}skipSpace(e,t){for(var r=t||0;r<e.length;r++){var n=e.charAt(r);if(" \n\r\t\f\v            ​\u2028\u2029 ".indexOf(n)<0){if("#"!==e.charAt(r))return r;for(;;r++){if(r===e.length)return-1;if("\n"===e.charAt(r)){this.lines=this.lines+1;break}}}else"\n"===e.charAt(r)&&(this.lines=this.lines+1)}return-1}variable(e,t,r){if((n=this.skipSpace(e,t))<0)return-1;if("?"!=e.slice(n,n+1))return-1;var n;if(t=n+=1,"0123456789-".indexOf(e.charAt(n))>=0)throw F(this._thisDoc,this.lines,e,n,"Varible name can't start with '"+e.charAt(n)+"s'");for(;t<f(e)&&E.indexOf(e.charAt(t))<0;)t+=1;if(null==this._parentContext)throw F(this._thisDoc,this.lines,e,n,"Can't use ?xxx syntax for variable in outermost level: "+e.slice(n-1,t));return r.push(this._store.variable(e.slice(n,t))),t}bareWord(e,t,r){var n=this.skipSpace(e,t);if(n<0)return-1;var i=e.charAt(n);if("0123456789-".indexOf(i)>=0)return-1;if(E.indexOf(i)>=0)return-1;for(t=n;t<f(e)&&E.indexOf(e.charAt(t))<0;)t+=1;return r.push(e.slice(n,t)),t}qname(e,t,r){if((t=this.skipSpace(e,t))<0)return-1;var n=e.charAt(t);if("0123456789-+".indexOf(n)>=0)return-1;if(E.indexOf(n)<0){var o=n;for(t+=1;t<f(e)&&(n=e.charAt(t),E.indexOf(n)<0);)o+=n,t+=1}else o="";if(t<f(e)&&":"==e.charAt(t)){var a=o;for(t+=1,o="";t<f(e)&&(n=e.charAt(t),E.indexOf(n)<0);)o+=n,t+=1;return r.push(new l([a,o])),t}return o&&this.keywordsSet&&(0,i.Do)(this.keywords,o)<0?(r.push(new l(["",o])),t):-1}object(e,t,r){if((o=this.subject(e,t,r))>=0)return o;{if((o=this.skipSpace(e,t))<0)return-1;t=o;var n=null;let s=e.charAt(t);if('"'==s||"'"==s){n=e.slice(t,t+3==s+s)?s+s+s:s,t+=f(n);var i=this.strconst(e,t,n),o=i[0],a=i[1];return r.push(this._store.literal(a)),o}return-1}}nodeOrLiteral(e,t,r){if((c=this.node(e,t,r))>=0)return c;if((c=this.skipSpace(e,t))<0)return-1;t=c;var n=e.charAt(t);if("-+0987654321".indexOf(n)>=0){if(A.lastIndex=0,null!=(p=A.exec(e.slice(t))))c=t+(i=p[0]).length,i.indexOf("T")>=0?r.push(this._store.literal(i,this._store.sym("http://www.w3.org/2001/XMLSchema#dateTime"))):r.push(this._store.literal(i,this._store.sym("http://www.w3.org/2001/XMLSchema#date")));else{var i;if(S.lastIndex=0,null==(p=S.exec(e.slice(t))))throw F(this._thisDoc,this.lines,e,t,"Bad number or date syntax");c=t+S.lastIndex,(i=e.slice(t,c)).indexOf("e")>=0?r.push(this._store.literal(parseFloat(i),this._store.sym("http://www.w3.org/2001/XMLSchema#double"))):e.slice(t,c).indexOf(".")>=0?r.push(this._store.literal(parseFloat(i),this._store.sym("http://www.w3.org/2001/XMLSchema#decimal"))):r.push(this._store.literal(parseInt(i),this._store.sym("http://www.w3.org/2001/XMLSchema#integer")))}return c}if('"'==e.charAt(t)){if('"""'==e.slice(t,t+3))var o='"""';else o='"';t+=f(o);var a=null,s=this.strconst(e,t,o),c=s[0],u=s[1],l=null;if("@"==e.slice(c,c+1)){var p;if(C.lastIndex=0,null==(p=C.exec(e.slice(c+1))))throw F(this._thisDoc,startline,e,t,"Bad language code syntax on string literal, after @");t=C.lastIndex+c+1,l=e.slice(c+1,t),c=t}if("^^"==e.slice(c,c+2)){var h=new d([]);c=this.uri_ref2(e,c+2,h),a=h[0]}return r.push(this._store.literal(u,l||a)),c}return-1}strconst(e,t,r){for(var n=t,i="",o=this.lines;n<f(e);){if(t=n+f(r),e.slice(n,t)==r)return new l([t,i]);if('"'!=e.charAt(n)){if(k.lastIndex=0,!k.exec(e.slice(n)))throw F(this._thisDoc,o,e,n,"Closing quote missing in string at ^ in "+e.slice(n-20,n)+"^"+e.slice(n,n+20));if(t=n+k.lastIndex-1,i+=e.slice(n,t),'"'!=(c=e.charAt(t)))if("\r"!=c){if("\n"==c){if('"'==r)throw F(this._thisDoc,o,e,t,"newline found in string literal");this.lines=this.lines+1,i+=c,n=t+1,this.previousLine=this.startOfLine,this.startOfLine=n}else if("\\"==c){if(n=t+1,!(c=e.slice(n,n+1)))throw F(this._thisDoc,o,e,t,"unterminated string literal (2)");var a=v('abfrtvn\\"',c);if(a>=0)i+='a\b\f\r\t\v\n\\"'.charAt(a),n+=1;else if("u"==c)n=(s=this.uEscape(e,n+1,o))[0],i+=c=s[1];else{if("U"!=c)throw F(this._thisDoc,this.lines,e,t,"bad escape");var s,c;n=(s=this.UEscape(e,n+1,o))[0],i+=c=s[1]}}}else n=t+1;else n=t}else i=i+'"',n=n+1}throw F(this._thisDoc,this.lines,e,t,"unterminated string literal")}uEscape(e,t,r){for(var n=t,i=0,o=0;i<4;){var a=e.slice(n,n+1).toLowerCase();if(n+=1,""==a)throw F(this._thisDoc,r,e,t,"unterminated string literal(3)");var s=v("0123456789abcdef",a);if(s<0)throw F(this._thisDoc,r,e,t,"bad string literal hex escape");o=16*o+s,i+=1}var c=String.fromCharCode(o);return new l([n,c])}UEscape(e,t,r){for(var n=t,i=0,o="\\U";i<8;){var a=e.slice(n,n+1).toLowerCase();if(n+=1,""==a)throw F(this._thisDoc,r,e,t,"unterminated string literal(3)");if(v("0123456789abcdef",a)<0)throw F(this._thisDoc,r,e,t,"bad string literal hex escape");o+=a,i+=1}var s,c=(s="0x"+h(o,2,10)-0,String.fromCharCode(s));return new l([n,c])}}function F(e,t,r,n,i){let o=t+1,a="Line "+o+" of <"+e+">: Bad syntax: "+i+'\nat: "'+r.slice(n,n+30)+'"',s=new SyntaxError(a,e,o);return s.lineNo=o,s.characterInFile=n,s.syntaxProblem=i,s}},2318:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toBig=t.shrSL=t.shrSH=t.rotrSL=t.rotrSH=t.rotrBL=t.rotrBH=t.rotr32L=t.rotr32H=t.rotlSL=t.rotlSH=t.rotlBL=t.rotlBH=t.add5L=t.add5H=t.add4L=t.add4H=t.add3L=t.add3H=void 0,t.add=b,t.fromBig=i,t.split=o;const r=BigInt(2**32-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e,t=!1){const r=e.length;let n=new Uint32Array(r),o=new Uint32Array(r);for(let a=0;a<r;a++){const{h:r,l:s}=i(e[a],t);[n[a],o[a]]=[r,s]}return[n,o]}const a=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);t.toBig=a;const s=(e,t,r)=>e>>>r;t.shrSH=s;const c=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=c;const u=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=u;const l=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=l;const d=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=d;const p=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=p;const f=(e,t)=>t;t.rotr32H=f;const h=(e,t)=>e;t.rotr32L=h;const m=(e,t,r)=>e<<r|t>>>32-r;t.rotlSH=m;const g=(e,t,r)=>t<<r|e>>>32-r;t.rotlSL=g;const v=(e,t,r)=>t<<r-32|e>>>64-r;t.rotlBH=v;const y=(e,t,r)=>e<<r-32|t>>>64-r;function b(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}t.rotlBL=y;const w=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=w;const x=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=x;const _=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=_;const E=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;t.add4H=E;const S=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=S;const A=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;t.add5H=A;const k={fromBig:i,split:o,toBig:a,shrSH:s,shrSL:c,rotrSH:u,rotrSL:l,rotrBH:d,rotrBL:p,rotr32H:f,rotr32L:h,rotlSH:m,rotlSL:g,rotlBH:v,rotlBL:y,add:b,add3L:w,add3H:x,add4L:_,add4H:E,add5H:A,add5L:S};t.default=k},2361:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"acl",{enumerable:!0,get:function(){return s.acl}}),Object.defineProperty(t,"aclControl",{enumerable:!0,get:function(){return s.aclControl}}),Object.defineProperty(t,"authn",{enumerable:!0,get:function(){return I.authn}}),Object.defineProperty(t,"create",{enumerable:!0,get:function(){return c.create}}),t.dom=t.createTypes=void 0,Object.defineProperty(t,"icons",{enumerable:!0,get:function(){return u.icons}}),Object.defineProperty(t,"infiniteMessageArea",{enumerable:!0,get:function(){return m.infiniteMessageArea}}),Object.defineProperty(t,"initFooter",{enumerable:!0,get:function(){return C.initFooter}}),Object.defineProperty(t,"initHeader",{enumerable:!0,get:function(){return k.initHeader}}),t.login=t.log=t.language=void 0,Object.defineProperty(t,"matrix",{enumerable:!0,get:function(){return p.matrix}}),Object.defineProperty(t,"media",{enumerable:!0,get:function(){return f.media}}),Object.defineProperty(t,"messageArea",{enumerable:!0,get:function(){return h.messageArea}}),t.rdf=t.preferences=t.participation=t.pad=t.ns=void 0,Object.defineProperty(t,"store",{enumerable:!0,get:function(){return I.store}}),t.style=void 0,Object.defineProperty(t,"table",{enumerable:!0,get:function(){return w.renderTableViewPane}}),t.utils=t.tabs=void 0,Object.defineProperty(t,"versionInfo",{enumerable:!0,get:function(){return A.default}}),t.widgets=void 0;var o=F(r(2209));t.rdf=o;var a=F(r(2054));t.ns=a;var s=r(8322),c=r(3338),u=r(4901),l=F(r(7532));t.language=l;var d=F(r(9295));t.log=d;var p=r(5915),f=r(8406),h=r(2263),m=r(4426),g=F(r(1712));t.pad=g;var v=F(r(4044));t.participation=v;var y=F(r(7919));t.preferences=y;var b=F(r(5148));t.style=b;var w=r(9129),x=F(r(3489));t.tabs=x;var _=F(r(7499));t.utils=_;var E=F(r(7822));t.login=E;var S=F(r(1939));t.widgets=S;var A=n(r(1041)),k=r(6231),C=r(3749),T=F(r(2407));t.createTypes=T;var I=r(3451);function F(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(F=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var P=t.dom=window?window.document:null;"undefined"!=typeof window&&(window.UI={authn:I.authn,store:I.store,ns:a,rdf:o,acl:s.acl,aclControl:s.aclControl,create:c.create,createTypes:T,dom:P,icons:u.icons,language:l,log:d,login:E,matrix:p.matrix,media:f.media,messageArea:h.messageArea,infiniteMessageArea:m.infiniteMessageArea,pad:g,participation:v,preferences:y,style:b,table:w.renderTableViewPane,tabs:x,utils:_,widgets:S,versionInfo:A.default,initHeader:k.initHeader,initFooter:C.initFooter})},2407:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wNAF=void 0,t.negateCt=s,t.normalizeZ=function(e,t){const r=(0,i.FpInvertBatch)(e.Fp,t.map(e=>e.Z));return t.map((t,n)=>e.fromAffine(t.toAffine(r[n])))},t.mulEndoUnsafe=function(e,t,r,n){let i=t,s=e.ZERO,c=e.ZERO;for(;r>o||n>o;)r&a&&(s=s.add(i)),n&a&&(c=c.add(i)),i=i.double(),r>>=a,n>>=a;return{p1:s,p2:c}},t.pippenger=function(e,t,r,i){d(r,e),p(i,t);const o=r.length,a=i.length;if(o!==a)throw new Error("arrays of points and scalars must have equal length");const s=e.ZERO,c=(0,n.bitLen)(BigInt(o));let u=1;c>12?u=c-3:c>4?u=c-2:c>0&&(u=2);const l=(0,n.bitMask)(u),f=new Array(Number(l)+1).fill(s);let h=s;for(let e=Math.floor((t.BITS-1)/u)*u;e>=0;e-=u){f.fill(s);for(let t=0;t<a;t++){const n=i[t],o=Number(n>>BigInt(e)&l);f[o]=f[o].add(r[t])}let t=s;for(let e=f.length-1,r=s;e>0;e--)r=r.add(f[e]),t=t.add(r);if(h=h.add(t),0!==e)for(let e=0;e<u;e++)h=h.double()}return h},t.precomputeMSMUnsafe=function(e,t,r,i){c(i,t.BITS),d(r,e);const o=e.ZERO,a=2**i-1,s=Math.ceil(t.BITS/i),u=(0,n.bitMask)(i),l=r.map(e=>{const t=[];for(let r=0,n=e;r<a;r++)t.push(n),n=n.add(e);return t});return e=>{if(p(e,t),e.length>r.length)throw new Error("array of scalars must be smaller than array of points");let n=o;for(let t=0;t<s;t++){if(n!==o)for(let e=0;e<i;e++)n=n.double();const r=BigInt(s*i-(t+1)*i);for(let t=0;t<e.length;t++){const i=e[t],o=Number(i>>r&u);o&&(n=n.add(l[t][o-1]))}}return n}},t.validateBasic=function(e){return(0,i.validateField)(e.Fp),(0,n.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,i.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})},t._createCurveFields=function(e,t,r={},n){if(void 0===n&&(n="edwards"===e),!t||"object"!=typeof t)throw new Error(`expected valid ${e} CURVE object`);for(const e of["p","n","h"]){const r=t[e];if(!("bigint"==typeof r&&r>o))throw new Error(`CURVE.${e} must be positive bigint`)}const i=v(t.p,r.Fp,n),a=v(t.n,r.Fn,n),s=["Gx","Gy","a","weierstrass"===e?"b":"d"];for(const e of s)if(!i.isValid(t[e]))throw new Error(`CURVE.${e} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:i,Fn:a}};const n=r(8627),i=r(4967),o=BigInt(0),a=BigInt(1);function s(e,t){const r=t.negate();return e?r:t}function c(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function u(e,t){c(e,t);const r=2**e;return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1),mask:(0,n.bitMask)(e),maxNumber:r,shiftBy:BigInt(e)}}function l(e,t,r){const{windowSize:n,mask:i,maxNumber:o,shiftBy:s}=r;let c=Number(e&i),u=e>>s;c>n&&(c-=o,u+=a);const l=t*n;return{nextN:u,offset:l+Math.abs(c)-1,isZero:0===c,isNeg:c<0,isNegF:t%2!=0,offsetF:l}}function d(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((e,r)=>{if(!(e instanceof t))throw new Error("invalid point at index "+r)})}function p(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((e,r)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+r)})}const f=new WeakMap,h=new WeakMap;function m(e){return h.get(e)||1}function g(e){if(e!==o)throw new Error("invalid wNAF")}function v(e,t,r){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return(0,i.validateField)(t),t}return(0,i.Field)(e,{isLE:r})}t.wNAF=class{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,r=this.ZERO){let n=e;for(;t>o;)t&a&&(r=r.add(n)),n=n.double(),t>>=a;return r}precomputeWindow(e,t){const{windows:r,windowSize:n}=u(t,this.bits),i=[];let o=e,a=o;for(let e=0;e<r;e++){a=o,i.push(a);for(let e=1;e<n;e++)a=a.add(o),i.push(a);o=a.double()}return i}wNAF(e,t,r){if(!this.Fn.isValid(r))throw new Error("invalid scalar");let n=this.ZERO,i=this.BASE;const o=u(e,this.bits);for(let e=0;e<o.windows;e++){const{nextN:a,offset:c,isZero:u,isNeg:d,isNegF:p,offsetF:f}=l(r,e,o);r=a,u?i=i.add(s(p,t[f])):n=n.add(s(d,t[c]))}return g(r),{p:n,f:i}}wNAFUnsafe(e,t,r,n=this.ZERO){const i=u(e,this.bits);for(let e=0;e<i.windows&&r!==o;e++){const{nextN:o,offset:a,isZero:s,isNeg:c}=l(r,e,i);if(r=o,!s){const e=t[a];n=n.add(c?e.negate():e)}}return g(r),n}getPrecomputes(e,t,r){let n=f.get(t);return n||(n=this.precomputeWindow(t,e),1!==e&&("function"==typeof r&&(n=r(n)),f.set(t,n))),n}cached(e,t,r){const n=m(e);return this.wNAF(n,this.getPrecomputes(n,e,r),t)}unsafe(e,t,r,n){const i=m(e);return 1===i?this._unsafeLadder(e,t,n):this.wNAFUnsafe(i,this.getPrecomputes(i,e,r),t,n)}createCache(e,t){c(t,this.bits),h.set(e,t),f.delete(e)}hasCache(e){return 1!==m(e)}}},2452:(e,t,r)=>{"use strict";var n=r(4667),i=r(182),o=r(7007),a=r(8134);class s extends n.StorageUtility{constructor(e,t){super(e,t)}}class c extends n.ClientAuthentication{login=async(e,t)=>{"none"!==e.prompt&&await this.sessionInfoManager.clear(e.sessionId);const r=e.redirectUrl??a.normalizeCallbackUrl(window.location.href);if(!n.isValidRedirectUrl(r))throw new Error(`${r} is not a valid redirect URL, it is either a malformed IRI, includes a hash fragment, or reserved query parameters ('code' or 'state').`);await this.loginHandler.handle({...e,redirectUrl:r,clientName:e.clientName??e.clientId,eventEmitter:t})};validateCurrentSession=async e=>{const t=await this.sessionInfoManager.get(e);return void 0===t||void 0===t.clientAppId||void 0===t.issuer?null:t};handleIncomingRedirect=async(e,t)=>{try{const r=await this.redirectHandler.handle(e,t,void 0);return this.fetch=r.fetch.bind(window),this.boundLogout=r.getLogoutUrl,await this.cleanUrlAfterRedirect(e),{isLoggedIn:r.isLoggedIn,webId:r.webId,sessionId:r.sessionId,expirationDate:r.expirationDate,clientAppId:r.clientAppId}}catch(r){return await this.cleanUrlAfterRedirect(e),void t.emit(n.EVENTS.ERROR,"redirect",r)}};async cleanUrlAfterRedirect(e){const t=n.removeOpenIdParams(e).href;for(window.history.replaceState(null,"",t);window.location.href!==t;)await new Promise(e=>{setTimeout(()=>e(),1)})}}function u(e){return"string"==typeof e.oidcIssuer}function l(e){return"string"==typeof e.redirectUrl}class d{storageUtility;oidcHandler;issuerConfigFetcher;clientRegistrar;constructor(e,t,r,n){this.storageUtility=e,this.oidcHandler=t,this.issuerConfigFetcher=r,this.clientRegistrar=n,this.storageUtility=e,this.oidcHandler=t,this.issuerConfigFetcher=r,this.clientRegistrar=n}async canHandle(e){return u(e)&&l(e)}async handle(e){if(!u(e))throw new n.ConfigurationError(`OidcLoginHandler requires an OIDC issuer: missing property 'oidcIssuer' in ${JSON.stringify(e)}`);if(!l(e))throw new n.ConfigurationError(`OidcLoginHandler requires a redirect URL: missing property 'redirectUrl' in ${JSON.stringify(e)}`);const t=await this.issuerConfigFetcher.fetchConfig(e.oidcIssuer),r=await n.handleRegistration(e,t,this.storageUtility,this.clientRegistrar),i={issuer:t.issuer,dpop:"dpop"===e.tokenType.toLowerCase(),...e,issuerConfiguration:t,client:r,scopes:n.normalizeScopes(e.customScopes)};return this.oidcHandler.handle(i)}}class p extends n.AuthorizationCodeWithPkceOidcHandlerBase{async handle(e){const t={authority:e.issuer.toString(),client_id:e.client.clientId,client_secret:e.client.clientSecret,redirect_uri:e.redirectUrl,response_type:"code",scope:e.scopes.join(" "),filterProtocolClaims:!0,loadUserInfo:!1,code_verifier:!0,prompt:e.prompt??"consent"},r=new a.OidcClient(t);try{const t=await r.createSigninRequest();return await this.setupRedirectHandler({oidcLoginOptions:e,state:t.state._id,codeVerifier:t.state._code_verifier,targetUrl:t.url.toString()})}catch(e){console.error(e)}}}const f={issuer:{toKey:"issuer",convertToUrl:!0},authorization_endpoint:{toKey:"authorizationEndpoint",convertToUrl:!0},token_endpoint:{toKey:"tokenEndpoint",convertToUrl:!0},userinfo_endpoint:{toKey:"userinfoEndpoint",convertToUrl:!0},jwks_uri:{toKey:"jwksUri",convertToUrl:!0},registration_endpoint:{toKey:"registrationEndpoint",convertToUrl:!0},end_session_endpoint:{toKey:"endSessionEndpoint",convertToUrl:!0},scopes_supported:{toKey:"scopesSupported"},response_types_supported:{toKey:"responseTypesSupported"},response_modes_supported:{toKey:"responseModesSupported"},grant_types_supported:{toKey:"grantTypesSupported"},acr_values_supported:{toKey:"acrValuesSupported"},subject_types_supported:{toKey:"subjectTypesSupported"},id_token_signing_alg_values_supported:{toKey:"idTokenSigningAlgValuesSupported"},id_token_encryption_alg_values_supported:{toKey:"idTokenEncryptionAlgValuesSupported"},id_token_encryption_enc_values_supported:{toKey:"idTokenEncryptionEncValuesSupported"},userinfo_signing_alg_values_supported:{toKey:"userinfoSigningAlgValuesSupported"},userinfo_encryption_alg_values_supported:{toKey:"userinfoEncryptionAlgValuesSupported"},userinfo_encryption_enc_values_supported:{toKey:"userinfoEncryptionEncValuesSupported"},request_object_signing_alg_values_supported:{toKey:"requestObjectSigningAlgValuesSupported"},request_object_encryption_alg_values_supported:{toKey:"requestObjectEncryptionAlgValuesSupported"},request_object_encryption_enc_values_supported:{toKey:"requestObjectEncryptionEncValuesSupported"},token_endpoint_auth_methods_supported:{toKey:"tokenEndpointAuthMethodsSupported"},token_endpoint_auth_signing_alg_values_supported:{toKey:"tokenEndpointAuthSigningAlgValuesSupported"},display_values_supported:{toKey:"displayValuesSupported"},claim_types_supported:{toKey:"claimTypesSupported"},claims_supported:{toKey:"claimsSupported"},service_documentation:{toKey:"serviceDocumentation"},claims_locales_supported:{toKey:"claimsLocalesSupported"},ui_locales_supported:{toKey:"uiLocalesSupported"},claims_parameter_supported:{toKey:"claimsParameterSupported"},request_parameter_supported:{toKey:"requestParameterSupported"},request_uri_parameter_supported:{toKey:"requestUriParameterSupported"},require_request_uri_registration:{toKey:"requireRequestUriRegistration"},op_policy_uri:{toKey:"opPolicyUri",convertToUrl:!0},op_tos_uri:{toKey:"opTosUri",convertToUrl:!0}};class h{storageUtility;constructor(e){this.storageUtility=e,this.storageUtility=e}static getLocalStorageKey(e){return`issuerConfig:${e}`}async fetchConfig(e){let t;const r=new URL(".well-known/openid-configuration",e.endsWith("/")?e:`${e}/`).href,i=await fetch(r);try{t=function(e){const t={};return Object.keys(e).forEach(r=>{f[r]&&(t[f[r].toKey]=e[r])}),Array.isArray(t.scopesSupported)||(t.scopesSupported=["openid"]),t}(await i.json())}catch(t){throw new n.ConfigurationError(`[${e.toString()}] has an invalid configuration: ${t.message}`)}return await this.storageUtility.set(h.getLocalStorageKey(e),JSON.stringify(t)),t}}class m extends n.SessionInfoManagerBase{async get(e){const[t,r,i,o,a,s,c,u]=await Promise.all([this.storageUtility.getForUser(e,"isLoggedIn",{secure:!0}),this.storageUtility.getForUser(e,"webId",{secure:!0}),this.storageUtility.getForUser(e,"clientId",{secure:!1}),this.storageUtility.getForUser(e,"clientSecret",{secure:!1}),this.storageUtility.getForUser(e,"redirectUrl",{secure:!1}),this.storageUtility.getForUser(e,"refreshToken",{secure:!0}),this.storageUtility.getForUser(e,"issuer",{secure:!1}),this.storageUtility.getForUser(e,"tokenType",{secure:!1})]);if("string"!=typeof a||n.isValidRedirectUrl(a)){if(void 0!==u&&!n.isSupportedTokenType(u))throw new Error(`Tokens of type [${u}] are not supported.`);if(void 0!==i||void 0!==t||void 0!==r||void 0!==s)return{sessionId:e,webId:r,isLoggedIn:"true"===t,redirectUrl:a,refreshToken:s,issuer:c,clientAppId:i,clientAppSecret:o,tokenType:u??"DPoP"}}else await Promise.all([this.storageUtility.deleteAllUserData(e,{secure:!1}),this.storageUtility.deleteAllUserData(e,{secure:!0})])}async clear(e){return async function(e,t){await n.clear(e,t),await a.clearOidcPersistentStorage()}(e,this.storageUtility)}}class g{async canHandle(e){try{return new URL(e),!0}catch(t){throw new Error(`[${e}] is not a valid URL, and cannot be used as a redirect URL: ${t}`)}}async handle(e){return n.getUnauthenticatedSession()}}class v{storageUtility;sessionInfoManager;issuerConfigFetcher;clientRegistrar;tokerRefresher;constructor(e,t,r,n,i){this.storageUtility=e,this.sessionInfoManager=t,this.issuerConfigFetcher=r,this.clientRegistrar=n,this.tokerRefresher=i,this.storageUtility=e,this.sessionInfoManager=t,this.issuerConfigFetcher=r,this.clientRegistrar=n,this.tokerRefresher=i}async canHandle(e){try{const t=new URL(e);return null!==t.searchParams.get("code")&&null!==t.searchParams.get("state")}catch(t){throw new Error(`[${e}] is not a valid URL, and cannot be used as a redirect URL: ${t}`)}}async handle(e,t){if(!await this.canHandle(e))throw new Error(`AuthCodeRedirectHandler cannot handle [${e}]: it is missing one of [code, state].`);const r=new URL(e),i=r.searchParams.get("state"),o=await this.storageUtility.getForUser(i,"sessionId",{errorIfNull:!0}),{issuerConfig:s,codeVerifier:c,redirectUrl:u,dpop:l}=await n.loadOidcContextFromStorage(o,this.storageUtility,this.issuerConfigFetcher),d=r.searchParams.get("iss");if("string"==typeof d&&d!==s.issuer)throw new Error(`The value of the iss parameter (${d}) does not match the issuer identifier of the authorization server (${s.issuer}). See [rfc9207](https://www.rfc-editor.org/rfc/rfc9207.html#section-2.3-3.1.1)`);if(void 0===c)throw new Error(`The code verifier for session ${o} is missing from storage.`);if(void 0===u)throw new Error(`The redirect URL for session ${o} is missing from storage.`);const p=await this.clientRegistrar.getClient({sessionId:o},s),f=Date.now(),h=await a.getTokens(s,p,{grantType:"authorization_code",code:r.searchParams.get("code"),codeVerifier:c,redirectUrl:u},l);let m;window.localStorage.removeItem(`oidc.${i}`),void 0!==h.refreshToken&&(m={sessionId:o,refreshToken:h.refreshToken,tokenRefresher:this.tokerRefresher});const g=n.buildAuthenticatedFetch(h.accessToken,{dpopKey:h.dpopKey,refreshOptions:m,eventEmitter:t,expiresIn:h.expiresIn});await n.saveSessionInfoToStorage(this.storageUtility,o,h.webId,h.clientId,"true",void 0,!0);const v=await this.sessionInfoManager.get(o);if(!v)throw new Error(`Could not retrieve session: [${o}].`);return Object.assign(v,{fetch:g,getLogoutUrl:n.maybeBuildRpInitiatedLogout({idTokenHint:h.idToken,endSessionEndpoint:s.endSessionEndpoint}),expirationDate:"number"==typeof h.expiresIn?f+1e3*h.expiresIn:void 0})}}class y extends n.AggregateHandler{constructor(e){super(e)}}class b{get storage(){return window.localStorage}async get(e){return this.storage.getItem(e)||void 0}async set(e,t){this.storage.setItem(e,t)}async delete(e){this.storage.removeItem(e)}}class w{redirect(e,t){t&&t.handleRedirect?t.handleRedirect(e):t&&t.redirectByReplacingState?window.history.replaceState({},"",e):window.location.href=e}}class x{storageUtility;constructor(e){this.storageUtility=e,this.storageUtility=e}async getClient(e,t){const[r,i,o,s,c]=await Promise.all([this.storageUtility.getForUser(e.sessionId,"clientId",{secure:!1}),this.storageUtility.getForUser(e.sessionId,"clientSecret",{secure:!1}),this.storageUtility.getForUser(e.sessionId,"expiresAt",{secure:!1}),this.storageUtility.getForUser(e.sessionId,"clientName",{secure:!1}),this.storageUtility.getForUser(e.sessionId,"clientType",{secure:!1})]),u=void 0!==o?Number.parseInt(o,10):-1,l=void 0!==i&&0!==u&&Math.floor(Date.now()/1e3)>u;if(r&&n.isKnownClientType(c)&&!l)return void 0!==i?{clientId:r,clientSecret:i,clientName:s,clientType:"dynamic",expiresAt:u}:{clientId:r,clientName:s,clientType:c};try{const r=await a.registerClient(e,t),n={clientId:r.clientId,clientType:"dynamic"};return void 0!==r.clientSecret&&(n.clientSecret=r.clientSecret,n.expiresAt=String(r.expiresAt)),r.idTokenSignedResponseAlg&&(n.idTokenSignedResponseAlg=r.idTokenSignedResponseAlg),await this.storageUtility.setForUser(e.sessionId,n,{secure:!1}),r}catch(e){throw new Error("Client registration failed.",{cause:e})}}}class _{async canHandle(e){try{return new URL(e).searchParams.has("error")}catch(t){throw new Error(`[${e}] is not a valid URL, and cannot be used as a redirect URL: ${t}`)}}async handle(e,t){if(void 0!==t){const r=new URL(e),i=r.searchParams.get("error"),o=r.searchParams.get("error_description");t.emit(n.EVENTS.ERROR,i,o)}return n.getUnauthenticatedSession()}}class E{storageUtility;issuerConfigFetcher;clientRegistrar;constructor(e,t,r){this.storageUtility=e,this.issuerConfigFetcher=t,this.clientRegistrar=r,this.storageUtility=e,this.issuerConfigFetcher=t,this.clientRegistrar=r}async refresh(e,t,r,i){const o=await n.loadOidcContextFromStorage(e,this.storageUtility,this.issuerConfigFetcher),s=await this.clientRegistrar.getClient({sessionId:e},o.issuerConfig);if(void 0===t)throw new Error(`Session [${e}] has no refresh token to allow it to refresh its access token.`);if(o.dpop&&void 0===r)throw new Error(`For session [${e}], the key bound to the DPoP access token must be provided to refresh said access token.`);const c=await a.refresh(t,o.issuerConfig,s,r);return void 0!==c.refreshToken&&i?.emit(n.EVENTS.NEW_REFRESH_TOKEN,c.refreshToken),c}}function S(e){const t=new n.InMemoryStorage,r=e.secureStorage||t,i=e.insecureStorage||new b,o=new s(r,i),a=new h(o),u=new x(o),l=new m(o),f=new E(o,a,u),S=new w,A=new d(o,new p(o,S),a,u),k=new y([new _,new v(o,l,a,u,f),new g]);return new c(A,k,new n.IWaterfallLogoutHandler(l,S),l,a)}const A=`${n.SOLID_CLIENT_AUTHN_KEY_PREFIX}currentSession`,k=`${n.SOLID_CLIENT_AUTHN_KEY_PREFIX}currentUrl`;class C{info;events;clientAuthentication;tokenRequestInProgress=!1;constructor(e={},t=void 0){this.events=new o,e.clientAuthentication?this.clientAuthentication=e.clientAuthentication:e.secureStorage&&e.insecureStorage?this.clientAuthentication=S({secureStorage:e.secureStorage,insecureStorage:e.insecureStorage}):this.clientAuthentication=S({}),e.sessionInfo?this.info={sessionId:e.sessionInfo.sessionId,isLoggedIn:!1,webId:e.sessionInfo.webId,clientAppId:e.sessionInfo.clientAppId}:this.info={sessionId:t??i.v4(),isLoggedIn:!1},this.events.on(n.EVENTS.LOGIN,()=>window.localStorage.setItem(A,this.info.sessionId)),this.events.on(n.EVENTS.SESSION_EXPIRED,()=>this.internalLogout(!1)),this.events.on(n.EVENTS.ERROR,()=>this.internalLogout(!1))}login=async e=>(await this.clientAuthentication.login({sessionId:this.info.sessionId,...e,tokenType:e.tokenType??"DPoP"},this.events),new Promise(()=>{}));fetch=(e,t)=>this.clientAuthentication.fetch(e,t);internalLogout=async(e,t)=>{window.localStorage.removeItem(A),await this.clientAuthentication.logout(this.info.sessionId,t),this.info.isLoggedIn=!1,e&&this.events.emit(n.EVENTS.LOGOUT)};logout=async e=>this.internalLogout(!0,e);handleIncomingRedirect=async(e={})=>{if(this.info.isLoggedIn)return this.info;if(this.tokenRequestInProgress)return;const t="string"==typeof e?{url:e}:e,r=t.url??window.location.href;this.tokenRequestInProgress=!0;const i=await this.clientAuthentication.handleIncomingRedirect(r,this.events);if(function(e){return!!e?.isLoggedIn}(i)){this.setSessionInfo(i);const e=window.localStorage.getItem(k);null===e?this.events.emit(n.EVENTS.LOGIN):(window.localStorage.removeItem(k),this.events.emit(n.EVENTS.SESSION_RESTORED,e))}else if(!0===t.restorePreviousSession){const e=window.localStorage.getItem(A);if(null!==e&&await async function(e,t,r){const n=await t.validateCurrentSession(e);return null!==n&&(window.localStorage.setItem(k,window.location.href),await t.login({sessionId:e,prompt:"none",oidcIssuer:n.issuer,redirectUrl:n.redirectUrl,clientId:n.clientAppId,clientSecret:n.clientAppSecret,tokenType:n.tokenType??"DPoP"},r.events),!0)}(e,this.clientAuthentication,this))return new Promise(()=>{})}return this.tokenRequestInProgress=!1,i};setSessionInfo(e){this.info.isLoggedIn=e.isLoggedIn,this.info.webId=e.webId,this.info.sessionId=e.sessionId,this.info.clientAppId=e.clientAppId,this.info.expirationDate=e.expirationDate,this.events.on(n.EVENTS.SESSION_EXTENDED,e=>{this.info.expirationDate=Date.now()+1e3*e})}}let T;function I(){return void 0===T&&(T=new C),T}Object.defineProperty(t,"ConfigurationError",{enumerable:!0,get:function(){return n.ConfigurationError}}),Object.defineProperty(t,"EVENTS",{enumerable:!0,get:function(){return n.EVENTS}}),Object.defineProperty(t,"InMemoryStorage",{enumerable:!0,get:function(){return n.InMemoryStorage}}),Object.defineProperty(t,"NotImplementedError",{enumerable:!0,get:function(){return n.NotImplementedError}}),t.Session=C,t.events=()=>I().events,t.fetch=(...e)=>I().fetch(...e),t.getDefaultSession=I,t.handleIncomingRedirect=(...e)=>I().handleIncomingRedirect(...e),t.login=(...e)=>I().login(...e),t.logout=(...e)=>I().logout(...e)},2475:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},2524:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.appendForm=j,Object.defineProperty(t,"basicField",{enumerable:!0,get:function(){return f.basicField}}),t.buildCheckboxForm=V,t.editFormButton=function(e,t,r,n,i){var o=e.createElement("button");return o.setAttribute("type","button"),o.innerHTML="Edit "+_.label(b.ui("Form")),o.addEventListener("click",function(a){j(e,t,{},r,b.ui("FormForm"),n,i).setAttribute("style",b.ui("FormForm").sameTerm(r)?"background-color: #fee;":"background-color: #ffffe7;"),o.parentNode.removeChild(o)},!0),o},Object.defineProperty(t,"field",{enumerable:!0,get:function(){return u.field}}),Object.defineProperty(t,"fieldFunction",{enumerable:!0,get:function(){return u.fieldFunction}}),Object.defineProperty(t,"fieldLabel",{enumerable:!0,get:function(){return f.fieldLabel}}),Object.defineProperty(t,"fieldParams",{enumerable:!0,get:function(){return c.fieldParams}}),Object.defineProperty(t,"fieldStore",{enumerable:!0,get:function(){return f.fieldStore}}),t.findClosest=L,t.formsFor=function(e){var t=x.store;y.debug("formsFor: subject="+e);var r,n=t.findTypeURIs(e);for(r in n)y.debug(" type: "+r);var i=t.bottomTypeURIs(n),o=[];for(var a in i)y.debug("candidatesFor: trying bottom type ="+a),o=(o=o.concat(L(t,a,b.ui("creationForm")))).concat(L(t,a,b.ui("annotationForm")));return o},t.makeDescription=B,t.makeSelectForCategory=q,t.makeSelectForChoice=J,t.makeSelectForClassifierOptions=H,t.makeSelectForNestedCategory=W,t.makeSelectForOptions=function(e,t,r,n,i,o,a,s){y.debug("Select list length now "+i.length);for(var c,u=0,l={},f=t.updater.editable(a.uri),h=0;h<i.length;h++){var g=i[h];g.uri||d.warn("makeSelectForOptions: option does not have an uri: ".concat(g,", with predicate: ").concat(n)),g.uri&&!(g.uri in l)&&(l[g.uri]=!0,u++)}if(0===u)return(0,p.errorMessageBlock)(e,"Can't do selector with no options, subject= "+r+" property = "+n+".");y.debug("makeSelectForOptions: dataDoc="+a);var v=function(){return c={},n.sameTerm(b.rdf("type"))?c=t.findTypeURIs(r):t.each(r,n,null,a).forEach(function(e){e.uri&&(c[e.uri]=!0)}),c};c=v();var x=e.createElement("select");for(var E in x.setAttribute("style",m.formSelectStyle),x.currentURI=null,x.refresh=function(){c=v();for(var e=0;e<x.children.length;e++){var t=x.children[e];t.AJAR_uri&&(t.selected=t.AJAR_uri in c)}x.disabled=!1},l){var S=t.sym(E),A=e.createElement("option");o.disambiguate?A.appendChild(e.createTextNode(_.labelWithOntology(S,!0))):A.appendChild(e.createTextNode(_.label(S,!0)));var k=t.any(S,t.sym("http://www.w3.org/ns/ui#backgroundColor"));k&&A.setAttribute("style","background-color: "+k.value+"; "),A.AJAR_uri=E,E in c&&(A.setAttribute("selected","true"),x.currentURI=E),x.appendChild(A)}if(!x.currentURI){var C=e.createElement("option");C.appendChild(e.createTextNode(o.nullLabel)),x.insertBefore(C,x.firstChild),C.selected=!0}return f&&x.addEventListener("change",function(i){x.disabled=!0;for(var o=[],u=[],l=function(e){t.holds(r,n,e,a)&&o.push(w.st(r,n,e,a))},d=0;d<x.options.length;d++){var f=x.options[d];f.AJAR_uri&&(f.selected&&!(f.AJAR_uri in c)&&u.push(w.st(r,n,t.sym(f.AJAR_uri),a)),!f.selected&&f.AJAR_uri in c&&l(t.sym(f.AJAR_uri)),f.selected&&(x.currentURI=f.AJAR_uri))}for(var h=x.subSelect;h&&h.currentURI;)l(t.sym(h.currentURI)),h=h.subSelect;for(h=x.superSelect;h&&h.currentURI;)l(t.sym(h.currentURI)),h=h.superSelect;y.info("selectForOptions: data doc = "+a),t.updater.update(o,u,function(t,r,n){if(c=v(),!r)return x.parentNode.appendChild((0,p.errorMessageBlock)(e,"Error updating data in select: "+n));x.disabled=!1,s&&s(r,{widget:"select",event:"change"})})},!1),x},Object.defineProperty(t,"mostSpecificClassURI",{enumerable:!0,get:function(){return u.mostSpecificClassURI}}),t.newButton=function(e,t,r,n,i,o,a,s){var c=e.createElement("button");return c.setAttribute("type","button"),c.innerHTML="New "+_.label(i),c.addEventListener("click",function(u){c.parentNode.appendChild(M(e,t,r,n,i,o,a,s))},!1),c},t.newThing=K,t.promptForNew=M,t.propertiesForClass=function(e,t){var r=e.each(void 0,b.rdf("range"),t);[b.rdfs("comment"),b.dc("title"),b.foaf("name"),b.foaf("homepage")].forEach(function(e){r.push(e)});var n=e.each(void 0,b.rdf("type"),t);n.length>60&&(n=n.slice(0,60));for(var i={},o=0;o<(n.length>60?60:n.length);o++)e.statementsMatching(n[o],void 0,void 0).forEach(function(e){i[e.predicate.uri]=!0});r.forEach(function(e){i[e.uri]=!0});var a=[];for(var s in i)a.push(e.sym(s));return a},Object.defineProperty(t,"renderNameValuePair",{enumerable:!0,get:function(){return f.renderNameValuePair}}),t.sortByLabel=U,t.sortBySequence=D;var o=n(r(4756)),a=n(r(9293)),s=A(r(5078)),c=r(1949),u=r(9171),l=r(9400),d=A(r(2902)),p=r(1302),f=r(2009),h=r(3256),m=A(r(5148)),g=n(r(471)),v=r(4901),y=A(r(9295)),b=A(r(2054)),w=A(r(2209)),x=r(3451),_=A(r(7499)),E=r(8998),S=A(r(1939));function A(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(A=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}function k(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 C(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)?C(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 C(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}var T="✓",I="✕",F="-",P=x.store;function N(e,t,r,n,i,o,a){for(var s=o.children,c=0;c<a.length;c++){var l=a[c];if((0,u.mostSpecificClassURI)(l)===b.ui("Options").uri){var p=(0,u.fieldFunction)(e,l)(e,null,t,r,l,n,i);d.log("Refreshing Options field by replacing it."),o.insertBefore(p,s[c]),o.removeChild(s[c+1])}}}function O(e,t,r,n,i,o,a,s){var c=b.ui,u=x.store,l=u.any(i,c("property"));if(!l){var d=(0,p.errorMessageBlock)(e,"No property to boolean field: "+i);return t&&t.appendChild(d),d}var h=u.any(i,c("label"));h||(h=_.label(l,!0)),o=(0,f.fieldStore)(n,l,o);var m=u.any(n,l);void 0===m&&(m=!1);var g=w.st(n,l,!0,o),v=V(e,u,h,w.st(n,l,!1,o),g,i,o,s);return t&&t.appendChild(v),v}function R(e,t,r,n,i,o,a){(0,u.fieldFunction)(e,i)(e,t,r,n,i,o,a)}function j(e,t,r,n,i,o,a){return(0,u.fieldFunction)(e,i)(e,t,r,n,i,o,a)}function L(e,t,r){for(var n=[e.sym(t)];n.length>0;){var i=n.shift(),o=e.each(i,r);if(y.debug("Lists for "+i+", "+r+": "+o.length),0!==o.length)return o;for(var a=e.each(i,b.rdfs("subClassOf")),s=0;s<a.length;s++)n.push(a[s]),y.debug("findClosest: add super: "+a[s])}return[]}function D(e){var t=e.map(function(e){return[P.any(e,b.ui("sequence"))||9999,e]});return t.sort(function(e,t){return e[0]-t[0]}),t.map(function(e){return e[1]})}function U(e){var t=e.map(function(e){return[_.label(e).toLowerCase(),e]});return t.sort(),t.map(function(e){return e[1]})}function M(e,t,r,n,i,o,a,c){var l=e.createElement("form");if(!o){var d=L(t,i.uri,b.ui("creationForm"));if(0===d.length){l.appendChild(e.createElement("p")).textContent="I am sorry, you need to provide information about a "+_.label(i)+" but I don't know enough information about those to ask you.";var p=l.appendChild(e.createElement("button"));return p.setAttribute("type","button"),p.setAttribute("style","float: right;"),p.innerHTML="Goto "+_.label(i),p.addEventListener("click",function(t){e.outlineManager.GotoSubject(i,!0,void 0,!0,void 0)},!1),l}y.debug("lists[0] is "+d[0]),o=d[0]}y.debug("form is "+o),l.setAttribute("style","border: 0.05em solid ".concat(g.default.formBorderColor,"; color: ").concat(g.default.formBorderColor)),l.innerHTML="<h3>New "+_.label(i)+"</h3>";var f=(0,u.fieldFunction)(e,o),h=K(a),m=!1;function v(e,t,r){return c(t,r)}y.info("paneUtils Object is "+h);var x=f(e,l,{},h,o,a,function(o,u){if(!o)return c(o,u);var d=[];r&&!t.holds(r,n,h,a)&&d.push(w.st(r,n,h,a)),r&&!t.holds(h,b.rdf("type"),i,a)&&d.push(w.st(h,b.rdf("type"),i,a)),d.length?t.updater.update([],d,v):c(!0,u),m||(m=l.appendChild(s.linkButton(e,h)))});return s.removeButton(e,x).setAttribute("style","float: right;"),l.AJAR_subject=h,l}function B(e,t,r,n,i,o){var a,s=e.createElement("div"),c=t.anyJS(r,n,null,i)||"",u=e.createElement("textarea");function l(c){a.disabled=!0,a.setAttribute("style","visibility: hidden; float: right;"),u.disabled=!0,u.style.color=g.default.textInputColorPending;var l=t.statementsMatching(r,n,null,i),d=w.st(r,n,u.value,i);t.updater.update(l,d,function(t,r,n){r?(u.style.color=g.default.textInputColor,u.disabled=!1):s.appendChild((0,p.errorMessageBlock)(e,"Error (while saving change to "+i.uri+"): "+n)),o&&o(r,n)})}return s.appendChild(u),u.rows=c?c.split("\n").length+2:2,u.cols=80,u.setAttribute("style",m.multilineTextInputStyle),null!==c?u.value=c:u.select(),s.refresh=function(){var e=t.any(r,n,null,i);e&&e.value!==u.value&&(u.value=e.value)},t.updater.editable(i.uri)?((a=S.continueButton(e,l)).disabled=!0,a.style.visibility="hidden",a.style.float="right",s.appendChild(a),u.addEventListener("keyup",function(e){u.style.color="green",a&&(a.disabled=!1,a.style.visibility="")},!0),u.addEventListener("change",l,!0)):(u.disabled=!0,u.style.backgroundColor=g.default.textInputBackgroundColorUneditable),s}function H(e,t,r,n,i,o,a,s){y.debug("Select list length now "+i.length);for(var c,l=0,f={},h=t.updater.editable(a.uri),g=0;g<i.length;g++){var v=i[g];v.uri||d.warn("makeSelectForClassifierOptions: option does not have an uri: ".concat(v,", with predicate: ").concat(n)),v.uri&&!(v.uri in f)&&(f[v.uri]=!0,l++)}if(0===l&&!o.mint)return(0,p.errorMessageBlock)(e,"Can't do selector with no options, subject= "+r+" property = "+n+".");y.debug("makeSelectForClassifierOptions: dataDoc="+a);var x=function(){return c={},n.sameTerm(b.rdf("type"))?c=t.findTypeURIs(r):t.each(r,n,null,a).forEach(function(e){c[e.uri]=!0}),c};c=x();var E=e.createElement("select");for(var S in E.setAttribute("style",m.formSelectStyle),o.multiple&&E.setAttribute("multiple","true"),E.currentURI=null,E.refresh=function(){c=x();for(var e=0;e<E.children.length;e++){var t=E.children[e];t.AJAR_uri&&(t.selected=t.AJAR_uri in c)}E.disabled=!1},f){var A=t.sym(S),k=e.createElement("option");o.disambiguate?k.appendChild(e.createTextNode(_.labelWithOntology(A,!0))):k.appendChild(e.createTextNode(_.label(A,!0)));var C=t.any(A,t.sym("http://www.w3.org/ns/ui#backgroundColor"));C&&k.setAttribute("style","background-color: "+C.value+"; "),k.AJAR_uri=S,S in c&&(k.setAttribute("selected","true"),E.currentURI=S),E.appendChild(k)}if(h&&o.mint){var T=e.createElement("option");T.appendChild(e.createTextNode(o.mint)),T.AJAR_mint=!0,E.insertBefore(T,E.firstChild)}if(null==E.currentURI&&!o.multiple){var I=e.createElement("option");I.appendChild(e.createTextNode(o.nullLabel)),E.insertBefore(I,E.firstChild),I.selected=!0}return h&&E.addEventListener("change",function(i){E.disabled=!0;for(var l,d=[],f=[],h=function(e){t.holds(r,n,e,a)&&d.push(w.st(r,n,e,a))},m=0;m<E.options.length;m++){var g=E.options[m];if(g.selected&&g.AJAR_mint){if(o.mintClass){var v=M(e,t,r,n,o.mintClass,null,a,function(e,t){e||s(e,t,{change:"new"})});E.parentNode.appendChild(v),l=v.AJAR_subject}else l=K(a);f.push(w.st(r,n,l,a)),o.mintStatementsFun&&(f=f.concat(o.mintStatementsFun(l)))}g.AJAR_uri&&(g.selected&&!(g.AJAR_uri in c)&&f.push(w.st(r,n,t.sym(g.AJAR_uri),a)),!g.selected&&g.AJAR_uri in c&&h(t.sym(g.AJAR_uri)),g.selected&&(E.currentURI=g.AJAR_uri))}for(var b=E.subSelect;b&&b.currentURI;)h(t.sym(b.currentURI)),b=b.subSelect;for(b=E.superSelect;b&&b.currentURI;)h(t.sym(b.currentURI)),b=b.superSelect;function _(e,t){s(e,{widget:"select",event:"new"})}y.info("makeSelectForClassifierOptions: data doc = "+a),t.updater.update(d,f,function(t,r,n){if(c=x(),!r)return E.parentNode.appendChild((0,p.errorMessageBlock)(e,"Error updating data in select: "+n));E.disabled=!1,l&&(0,u.fieldFunction)(e,o.subForm)(e,E.parentNode,{},l,o.subForm,a,_),s&&s(r,{widget:"select",event:"change"})})},!1),E}function q(e,t,r,n,i,o){var a,s=t.any(n,b.owl("disjointUnionOf")),c=!1;return s?a=s.elements:(a=t.each(void 0,b.rdfs("subClassOf"),n),c=!0),y.debug("Select list length "+a.length),0===a.length?(0,p.errorMessageBlock)(e,"Can't do "+(c?"multiple ":"")+"selector with no subclasses of category: "+n):1===a.length?(0,p.errorMessageBlock)(e,"Can't do "+(c?"multiple ":"")+"selector with only 1 subclass of category: "+n+":"+a[1]):H(e,t,r,b.rdf("type"),a,{multiple:c,nullLabel:"* Select type *"},i,o)}function W(e,t,r,n,i,o){function a(){c&&(s.removeChild(c),c=null),u.currentURI&&t.any(t.sym(u.currentURI),b.owl("disjointUnionOf"))&&(c=W(e,t,r,t.sym(u.currentURI),i,o),u.subSelect=c.firstChild,u.subSelect.superSelect=u,s.appendChild(c))}var s=e.createElement("span"),c=null,u=q(e,t,r,n,i,function(e,t){e&&a(),o(e,t)});return s.appendChild(u),a(),s}function V(e,t,r,n,i,o,a,s){var c=e.createElement("div"),u=(0,f.renderNameValuePair)(e,t,c,o,r),l=t.updater.editable(a.uri),h=e.createElement("button"),g=h;function v(e){if(!e)return[];if(e.object)return e.why||(e.why=a),[e];if(e instanceof Array)return e;throw new Error("buildCheckboxForm: bad param "+e)}function y(e){return 0===e.filter(function(e){return!t.holds(e.subject,e.predicate,e.object,e.why)}).length}return h.style=m.checkboxInputStyle,u.appendChild(h),i=v(i),n=v(n),function(){var r=y(i),a=r;if(n.length){var u=y(n);if(r&&u)return c.appendChild(S.errorMessageBlock(e,"Inconsistent data in dataDoc!\n"+i+" and\n"+n)),c;if(!r&&!u){r=null;var l=t.any(o,b.ui("default"));a=l?"1"===l.value:!!s&&null}}h.state=r,h.textContent={true:T,false:s?I:" ",null:F}[a]}(),l?(h.addEventListener("click",function(r){g.style.color="#bbb";var o=!0===h.state?i:!1===h.state?n:[];h.newState=null===h.state||!0!==h.state&&(!s||null);var a=!0===h.newState?i:!1===h.newState?n:[];d.log(" Deleting ".concat(o)),d.log(" Inserting ".concat(a)),t.updater.update(o,a,function(r,n,i){n?(g.style.color="#000",h.state=h.newState,h.textContent={true:T,false:I,null:F}[h.state]):(o.why&&t.holds(o.subject,o.predicate,o.object,o.why)&&d.log(" @@@@@ weird if 409 - does hold statement"),g.style.color="#000",g.style.backgroundColor="#fee",c.appendChild((0,p.errorMessageBlock)(e,"Checkbox: Error updating dataDoc from ".concat(h.state," to ").concat(h.newState,":\n\n").concat(i))))})},!1),c):c}function K(e){var t=new Date;return w.sym(e.uri+"#id"+t.getTime())}function J(e,t,r,n,i,o,a,s,c,u,l){for(var d={},f=r.updater.editable(u.uri),h=0;h<o.length;h++){var g=o[h];g.uri&&!(g.uri in d)&&(d[g.uri]=!0)}if(0===Object.keys(d).length&&!c.mint)return(0,p.errorMessageBlock)(e,"Can't do selector with no options, subject= "+n+" property = "+i+".");y.debug("makeSelectForChoice: dataDoc="+u);var v,x,E=e.createElement("select");for(var S in E.setAttribute("style",m.formSelectStyle),E.setAttribute("id","formSelect"),E.currentURI=null,d)E.appendChild(C(S));if(f&&c.mint){var A=e.createElement("option");A.appendChild(e.createTextNode(c.mint)),A.AJAR_mint=!0,E.insertBefore(A,E.firstChild)}function C(t){var n,i=e.createElement("option"),o=r.sym(t);n=c.disambiguate?_.labelWithOntology(o,!0):_.label(o,!0),i.appendChild(e.createTextNode(n)),i.setAttribute("value",t);var s=r.any(o,r.sym("http://www.w3.org/ns/ui#backgroundColor"));return s&&i.setAttribute("style","background-color: "+s.value+"; "),i.AJAR_uri=t,z(o.value,a)&&i.setAttribute("selected","true"),i}return 0===E.children.length&&E.insertBefore(((x=e.createElement("option")).appendChild(e.createTextNode((v="--- choice ---",i&&"BlankNode"!==i.termType&&(v="* Select for property: "+_.label(i)+" *"),n&&"BlankNode"!==n.termType&&(v="* Select for "+_.label(n,!0)+" *"),v))),x.disabled=!0,x.value=!0,x.hidden=!0,x.selected=!0,x),E.firstChild),E.update=function(t){a=t;var o,c=[],d=[],f=function(e){r.holds(n,i,e,u)&&c.push(w.st(n,i,e,u))},h=function(e){r.holds(n,i,e,u)||d.push(w.st(n,i,e,u)),s&&!r.holds(e,b.rdf("type"),r.sym(s),u)&&d.push(w.st(e,b.rdf("type"),r.sym(s),u))},m=r.each(n,i,null,u).map(function(e){return e.value}),g=k(m);try{for(g.s();!(o=g.n()).done;){var v=o.value;z(v,a)||f(w.sym(v))}}catch(e){g.e(e)}finally{g.f()}var y,x=k(a);try{for(x.s();!(y=x.n()).done;){var _=y.value;_ in m||h(w.sym(_))}}catch(e){x.e(e)}finally{x.f()}r.updater.update(c,d,function(t,r,n){if(!r)return E.parentNode.appendChild((0,p.errorMessageBlock)(e,"Error updating data in select: "+n));E.refresh(),l&&l(r,{widget:"select",event:"change"})})},E.refresh=function(){E.disabled=!0;for(var o,d=[],f=0;f<E.options.length;f++){var h=E.options[f];if(h.selected&&h.AJAR_mint){if(c.mintClass){var m=M(e,r,n,i,s,c.subForm,u,function(e,t){e||l(e,t,{change:"new"})});E.parentNode.appendChild(m),o=m.AJAR_subject}else o=K(u);d.push(w.st(n,i,r.sym(o),u)),s&&d.push(w.st(o,b.rdf("type"),r.sym(s),u)),c.mintStatementsFun&&(d=d.concat(c.mintStatementsFun(o))),E.currentURI=o}h.AJAR_uri&&(h.selected&&z(h.AJAR_uri,a)&&(E.currentURI=h.AJAR_uri),z(h.AJAR_uri,a)||h.removeAttribute("selected"),z(h.AJAR_uri,a)&&h.setAttribute("selected","true"))}y.info("selectForOptions: data doc = "+u),E.currentURI&&c.subForm&&!c.multiSelect&&R(e,t,{},w.sym(E.currentURI),c.subForm,u,function(n,i){n?(r.updater.update([],d,function(r,n,i){n||t.appendChild((0,p.errorMessageBlock)(e,"Error updating select: "+i))}),l&&l(n,{widget:"select",event:"new"})):t.appendChild((0,p.errorMessageBlock)(e,"Error updating data in field of select: "+i))}),E.disabled=!1},f&&E.addEventListener("change",function(e){t.removeChild(t.lastChild),E.refresh()},!1),E}function z(e,t){var r;for(r=0;r<t.length;r++)if(t[r]===e)return!0;return!1}u.field[b.ui("AutocompleteField").uri]=h.autocompleteField,u.field[b.ui("Form").uri]=u.field[b.ui("Group").uri]=function(e,t,r,n,i,o,a){var s=e.createElement("div"),c=b.ui;if(t&&t.appendChild(s),i){var l=n.toNT()+"|"+i.toNT();if(r[l])return s.appendChild(e.createTextNode("Group: see above "+l)),s;var d={};for(var f in r)d[f]=1;d[l]=1;var h=i.doc?i.doc():null,g=P.any(i,c("weight"),null,h),v=g?Number(g.value):1;if(v>3||v<0)return s.appendChild((0,p.errorMessageBlock)(e,"Form Group weight ".concat(v," should be 0-3")));s.setAttribute("style",m.formGroupStyle[v]),s.style.display="flex",s.style.flexDirection="column",s.class="form-weight-"+v;var y,w=P.any(i,c("parts"),null,h);if(w?y=w.elements:(w=P.each(i,c("part"),null,h),y=D(w)),!w)return s.appendChild((0,p.errorMessageBlock)(e,"No parts to form! "));for(var x=0;x<y.length;x++){var _=y[x],E=(0,u.fieldFunction)(e,_),S=function(t,i){t&&i&&i.widget&&"select"===i.widget&&N(e,r,n,o,a,s,y),a(t,{widget:"group",change:i})};s.appendChild(E(e,null,d,n,_,o,S))}return s}},u.field[b.ui("Options").uri]=function(e,t,r,n,i,o,a){var s=x.store,c=e.createElement("div"),u=i.doc?i.doc():null,l=b.ui;t&&t.appendChild(c);var d=s.any(i,l("dependingOn"));d||(d=b.rdf("type"));var f,h=s.each(i,l("case"),null,u);h||c.appendChild((0,p.errorMessageBlock)(e,"No cases to Options form. ")),f=d.sameTerm(b.rdf("type"))?Object.keys(s.findTypeURIs(n)).map(function(e){return w.sym(e)}):s.each(n,d);for(var m=0;m<h.length;m++){for(var g=h[m],v=s.each(g,l("for"),null,u),y=!1,_=0;_<v.length;_++){var E,S=k(f);try{for(S.s();!(E=S.n()).done;){var A=E.value,C=v[_];(A.sameTerm(v)||A.termType===C.termType&&A.value===C.value)&&(y=!0)}}catch(e){S.e(e)}finally{S.f()}}if(y){var T=s.the(g,l("use"));if(!T)return c.appendChild((0,p.errorMessageBlock)(e,'No "use" part for case in form '+i)),c;j(e,c,r,n,T,o,a);break}}return c},u.field[b.ui("Multiple").uri]=function(e,t,r,n,i,c,l){function f(e){return e.map(function(e){return e.toString().slice(-7)}).join(", ")}function h(){return m.apply(this,arguments)}function m(){return(m=(0,a.default)(o.default.mark(function t(){var r,i,a,s;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=K(c),!F){t.next=2;break}return q(),L.elements.push(r),t.next=1,W();case 1:t.next=7;break;case 2:return i=N?[w.st(r,P,n,c)]:[w.st(n,P,r,c)],t.prev=3,t.next=4,S.updater.update([],i);case 4:t.next=6;break;case 5:t.prev=5,s=t.catch(3),a="Error adding to unordered multiple: "+s,k.appendChild((0,p.errorMessageBlock)(e,a)),d.error(a);case 6:J();case 7:case"end":return t.stop()}},t,null,[[3,5]])}))).apply(this,arguments)}function g(t){function i(){return(i=(0,a.default)(o.default.mark(function r(){var i,a;return o.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!F){r.next=5;break}d.log("pre delete: "+f(L.elements)),i=0;case 1:if(!(i<L.elements.length)){r.next=4;break}if(!L.elements[i].sameTerm(t)){r.next=3;break}return L.elements.splice(i,1),r.next=2,W();case 2:return r.abrupt("return");case 3:i++,r.next=1;break;case 4:r.next=6;break;case 5:S.holds(n,P,t,c)&&(a=[w.st(n,P,t,c)],S.updater.update(a,[],function(t,r,n){r?U.removeChild(g):U.appendChild((0,p.errorMessageBlock)(e,"Multiple: delete failed: "+n))}));case 6:case"end":return r.stop()}},r)}))).apply(this,arguments)}function h(e,t){return m.apply(this,arguments)}function m(){return(m=(0,a.default)(o.default.mark(function e(r,n){var i;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:d.log("pre move: "+f(L.elements)),i=0;case 1:if(!(i<L.elements.length)){e.next=3;break}if(!L.elements[i].sameTerm(t)){e.next=2;break}return e.abrupt("continue",3);case 2:i++,e.next=1;break;case 3:if(i===L.elements.length&&alert("list move: not found element for "+t),!n){e.next=5;break}if(0!==i){e.next=4;break}return alert("@@ boop - already at top -temp message"),e.abrupt("return");case 4:L.elements.splice(i-1,2,L.elements[i],L.elements[i-1]),e.next=7;break;case 5:if(i!==L.elements.length-1){e.next=6;break}return alert("@@ boop - already at bottom -temp message"),e.abrupt("return");case 6:L.elements.splice(i,2,L.elements[i+1],L.elements[i]);case 7:return e.next=8,W();case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}y.debug("Multiple: render object: "+t);var g=(0,u.fieldFunction)(e,j)(e,null,r,t,j,c,function(e,r){d.log("Item done callback for item ".concat(t.toString())),e||d.error(" Item done callback: Error: "+r),l(e,r)});if(g.subject=t,S.updater.editable(c.uri)&&(s.deleteButtonWithCheck(e,g,O,function(){return i.apply(this,arguments)}),F)){var b=e.createElement("div");b.style.display="grid",b.style.gridTemplateColumns="auto 3em",b.style.gridTemplateRows="50% 50%";var x=s.button(e,v.icons.iconBase+"noun_1369237.svg","Move Up",function(){var e=(0,a.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h(t,!0));case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_=s.button(e,v.icons.iconBase+"noun_1369241.svg","Move Down",function(){var e=(0,a.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h(t,!1));case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),E=e.createElement("div");return E.appendChild(g),b.appendChild(E),b.appendChild(x),b.appendChild(_),x.style.gridColumn=2,_.style.gridColumn=2,x.style.gridRow=1,_.style.padding="0em",x.style.padding="0em",_.style.gridRow=2,E.style.gridColumn=1,E.style.gridRowStart="span 2",b}return g}var E=v.icons.iconBase+"noun_19460_green.svg",S=x.store,A=i.doc?i.doc():null,k=e.createElement("div"),C=k,T=b.ui;t&&t.appendChild(k);var I=S.any(i,T("ordered")),F=!!I&&w.Node.toJS(I),P=S.any(i,T("property")),N=S.anyJS(i,T("reverse"),null,A);if(!P)return k.appendChild((0,p.errorMessageBlock)(e,"No property to multiple: "+i)),C;var O=S.any(i,T("label"));O||(O=_.label(P));var R=S.any(i,T("min"));R=R?0+R.value:0;var j=S.any(i,T("part"));if(!j)return k.appendChild((0,p.errorMessageBlock)(e,"No part to multiple: "+i)),C;var L,D,U=k.appendChild(e.createElement("div"));if(U.style.display="flex",U.style.flexDirection="column",D=N?S.any(null,P,n,c):S.any(n,P,null,c),F?(L=N?S.any(null,P,n,c):S.any(n,P,null,c),D=L?L.elements:[]):(D=N?S.each(null,P,n,c):S.each(n,P,null,c),L=null),S.updater.editable(c.uri)){var M=k.appendChild(e.createElement("div"));M.style.padding="0.5em";var B=M.appendChild(e.createElement("img"));B.setAttribute("src",E),B.setAttribute("style","margin: 0.2em; width: 1.5em; height:1.5em"),B.title="Click to add another "+O;var H=e.createElement("span");H.textContent=(0===D.length?"Add another ":"Add ")+O,M.addEventListener("click",function(){var e=(0,a.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,h();case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),!0),M.appendChild(H)}function q(){L||(L=new w.Collection,N?S.add(L,P,n,c):S.add(n,P,L,c))}function W(){return V.apply(this,arguments)}function V(){return(V=(0,a.default)(o.default.mark(function t(){var r;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return d.log("save list: "+f(L.elements)),q(),t.prev=1,t.next=2,S.fetcher.putBack(c);case 2:t.next=4;break;case 3:return t.prev=3,r=t.catch(1),k.appendChild((0,p.errorMessageBlock)(e,"Error trying to put back a list: "+r)),t.abrupt("return");case 4:J();case 5:case"end":return t.stop()}},t,null,[[1,3]])}))).apply(this,arguments)}function J(){var e;if(F){var t=N?S.the(null,P,n,c):S.the(n,P,null,c);e=t?t.elements:[]}else(e=N?S.each(null,P,n,c):S.each(n,P,null,c)).sort();_.syncTableToArrayReOrdered(U,e,g)}function z(){return(z=(0,a.default)(o.default.mark(function e(){var t,r;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!((t=R-D.length)>0)){e.next=4;break}r=0;case 1:if(!(r<t)){e.next=3;break}return d.log("Adding extra: min "+R),e.next=2,h();case 2:r++,e.next=1;break;case 3:return e.next=4,W();case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}return U.refresh=J,J(),function(){return z.apply(this,arguments)}().then(function(){d.log(" Multiple render: async stuff ok")},function(e){d.error(" Multiple render: async stuff fails. #### ",e)}),C},u.field[b.ui("PhoneField").uri]=f.basicField,u.field[b.ui("EmailField").uri]=f.basicField,u.field[b.ui("ColorField").uri]=f.basicField,u.field[b.ui("DateField").uri]=f.basicField,u.field[b.ui("DateTimeField").uri]=f.basicField,u.field[b.ui("TimeField").uri]=f.basicField,u.field[b.ui("NumericField").uri]=f.basicField,u.field[b.ui("IntegerField").uri]=f.basicField,u.field[b.ui("DecimalField").uri]=f.basicField,u.field[b.ui("FloatField").uri]=f.basicField,u.field[b.ui("TextField").uri]=f.basicField,u.field[b.ui("SingleLineTextField").uri]=f.basicField,u.field[b.ui("NamedNodeURIField").uri]=f.basicField,u.field[b.ui("MultiLineTextField").uri]=function(e,t,r,n,i,o,a){var s=b.ui,c=x.store,u=i.doc?i.doc():null,l=c.any(i,s("property"));if(!l)return(0,p.errorMessageBlock)(e,"No property to text field: "+i);var d=e.createElement("div");d.style.display="flex",d.style.flexDirection="row";var h=d.appendChild(e.createElement("div"));h.style.width=g.default.formFieldNameBoxWidth;var m=d.appendChild(e.createElement("div"));h.appendChild((0,f.fieldLabel)(e,l,i)),o=(0,f.fieldStore)(n,l,o);var v=c.anyJS(n,l,null,o)||"",y=c.updater.editable(o.uri),w=i&&c.anyJS(i,b.ui("suppressEmptyUneditable"),null,u);!y&&w&&""===v&&(d.style.display="none");var _=B(e,c,n,l,o,a);return m.appendChild(_),t&&t.appendChild(d),d},u.field[b.ui("BooleanField").uri]=function(e,t,r,n,i,o,a){return O(e,t,0,n,i,o,0,!1)},u.field[b.ui("TristateField").uri]=function(e,t,r,n,i,o,a){return O(e,t,0,n,i,o,0,!0)},u.field[b.ui("Classifier").uri]=function(e,t,r,n,i,o,a){var s=x.store,c=b.ui,u=s.any(i,c("category"));if(!u)return(0,p.errorMessageBlock)(e,"No category for classifier: "+i);y.debug("Classifier: dataDoc="+o);var l=W(e,s,n,u,o,function(e,t){return a(e,t)});return t&&t.appendChild(l),l},u.field[b.ui("Choice").uri]=function(e,t,r,n,i,o,a){var c,u=b.ui,l=x.store,d=i.doc?i.doc():null,h=e.createElement("div");h.setAttribute("class","choiceBox"),t&&t.appendChild(h);var m=e.createElement("div");m.setAttribute("class","formFieldName choiceBox-label"),h.appendChild(m);var g=e.createElement("div");g.setAttribute("class","formFieldValue choiceBox-selectBox"),h.appendChild(g);var v=l.any(i,u("property"));if(!v)return h.appendChild((0,p.errorMessageBlock)(e,"No property for Choice: "+i));m.appendChild((0,f.fieldLabel)(e,v,i));var y=l.any(i,u("from"));if(!y)return(0,p.errorMessageBlock)(e,"No 'from' for Choice: "+i);var _=l.any(i,u("use")),S={form:i,subForm:_,disambiguate:!1};l.any(i,u("canMintNew"))&&(S.mint="* Create new *");var A=l.any(i,u("multiselect"));A&&(S.multiSelect=!0);var k,C=l.each(i,u("search-full-store")).length?null:o;return g.refresh=function(){var t=l.each(n,v,null,o).map(function(e){return e.value}),r=function(e){var t,r=[];for(var n in r=l.each(void 0,b.rdf("type"),y,d),function(e,t,r){var n,i,o,a,s,c,u,l,d,p,f,h={};h[t.toNT()]=!0;var m={},g=e.transitiveClosure(h,e.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),!0);for(var v in g){for(var y=0,b=(s=e.statementsMatching(null,e.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),e.fromNT(v),r)).length;y<b;y++)m[(p=s[y]).subject.toNT()]=p;for(var w=0,x=(c=e.each(null,e.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#domain"),e.fromNT(v),r)).length;w<x;w++)for(a=c[w],o=0,n=(u=e.statementsMatching(null,a,null,r)).length;o<n;o++)m[(p=u[o]).subject.toNT()]=p;for(var _=0,E=(l=e.each(null,e.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#range"),e.fromNT(v),r)).length;_<E;_++)for(a=l[_],f=0,i=(d=e.statementsMatching(null,a,null,r)).length;f<i;f++)m[(p=d[f]).object.toNT()]=p}return m}(l,y,e))r.push(l.fromNT(n));if(y.sameTerm(b.rdfs("Class")))for(c in s.allClassURIs())r.push(l.sym(c));else if(y.sameTerm(b.rdf("Property"))){for(c in(t=s.propertyTriage(l)).op)r.push(l.fromNT(c));for(c in t.dp)r.push(l.fromNT(c));S.disambiguate=!0}else if(y.sameTerm(b.owl("ObjectProperty"))){for(c in(t=s.propertyTriage(l)).op)r.push(l.fromNT(c));S.disambiguate=!0}else if(y.sameTerm(b.owl("DatatypeProperty"))){for(c in(t=s.propertyTriage(l)).dp)r.push(l.fromNT(c));S.disambiguate=!0}return r}(C);if(r.push(t),r=U(r),k=J(e,g,l,n,v,r,t,y,S,o,a),g.innerHTML="",g.appendChild(k),A){var i=new E.IconicMultiSelect({placeholder:k.selected,select:k,container:g,textField:"textField",valueField:"valueField"});i.init(),i.subscribe(function(r){if("REMOVE_OPTION"===r.action&&(t=t.filter(function(e){return e!==r.value})),"CLEAR_ALL_OPTIONS"===r.action&&(t=[]),"ADD_OPTION"===r.action)if((r.value+"").includes("Create new")){var i=K(o),s=[];s.push(w.st(n,v,l.sym(i),o)),y&&s.push(w.st(i,b.rdf("type"),l.sym(y),o)),_&&R(e,g,{},w.sym(i),_,o,function(r,n){r?(l.updater.update([],s,function(t,r,n){r||g.appendChild((0,p.errorMessageBlock)(e,"Error updating select: "+n))}),t.push(i),a&&a(r,{widget:"select",event:"new"})):g.appendChild((0,p.errorMessageBlock)(e,"Error updating data in field of select: "+n))})}else t.push(r.value);k.update(t)})}},g.refresh(),k&&k.refresh&&k.refresh(),h},u.field[b.ui("Comment").uri]=u.field[b.ui("Heading").uri]=function(e,t,r,n,i,o,a){var s=b.ui,d=x.store,p=d.any(i,s("contents"));p||(p="Error: No contents in comment field.");var f=i.doc?i.doc():null,h=(0,u.mostSpecificClassURI)(i),m=c.fieldParams[h]||{},g=e.createElement("div");t&&t.appendChild(g);var v=g.appendChild(e.createElement(m.element));v.textContent=p,(0,l.setFieldStyle)(v,i);var y=d.anyJS(i,b.ui("suppressIfUneditable"),null,f),w=d.updater.editable(o.uri);return y&&!w&&(g.style.display="none"),g}},2545:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.renderAutocompleteControl=function(e,t,r,n,i,o){return b.apply(this,arguments)};var o=n(r(4756)),a=n(r(9293)),s=f(r(2054)),c=r(4901),u=r(3451),l=f(r(1939)),d=f(r(7499)),p=r(3696);function f(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(f=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}function h(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 m(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)?m(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 m(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}var g=c.icons.iconBase+"noun_34653_green.svg",v=c.icons.iconBase+"noun_Search_875351.svg",y=c.icons.iconBase+"noun_253504.svg";function b(){return b=(0,a.default)(o.default.mark(function e(t,r,n,i,c,f){var m,b,w,x,_,E,S,A,k,C,T,I,F,P,N,O,R,j,L,D,U,M,B;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(L=function(){j?((0,p.setVisible)(R,!1),(0,p.setVisible)(I,!1),(0,p.setVisible)(F,!1)):((0,p.setVisible)(R,!0),(0,p.setVisible)(I,!1),(0,p.setVisible)(F,!1))},T=function(){return(T=(0,a.default)(o.default.mark(function e(t){var n,i,a,s;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=h(t),e.prev=1,n.s();case 2:if((i=n.n()).done){e.next=4;break}return a=i.value,e.next=3,c(r,a);case 3:e.next=2;break;case 4:e.next=6;break;case 5:e.prev=5,s=e.catch(1),n.e(s);case 6:return e.prev=6,n.f(),e.finish(6);case 7:case"end":return e.stop()}},e,null,[[1,5,6,7]])}))).apply(this,arguments)},C=function(e){return T.apply(this,arguments)},k=function(){return(k=(0,a.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!U){e.next=1;break}M.removeChild(U),U=void 0,e.next=2;break;case 1:return e.next=2,E();case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)},A=function(e){return k.apply(this,arguments)},S=function(){return(S=(0,a.default)(o.default.mark(function e(){var r;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(U=t.createElement("div")).setAttribute("style","display: flex; flex-flow: wrap;"),r=U,e.next=1,(0,p.renderAutoComplete)(t,i,D,m);case 1:r.appendChild.call(r,e.sent),U.appendChild(I),U.appendChild(F),U.appendChild(R),U.appendChild(P),M.appendChild(U);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)},E=function(){return S.apply(this,arguments)},_=function(){U&&(M.removeChild(U),U=void 0)},x=function(){return(x=(0,a.default)(o.default.mark(function e(n){var i;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,l.askName(t,u.store,M,s.vcard("url"),void 0,"Solid ID");case 1:if(i=e.sent){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",c(r,i));case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)},w=function(e){return x.apply(this,arguments)},b=function(){return(b=(0,a.default)(o.default.mark(function e(t,r){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i.permanent?((0,p.setVisible)(R,!0),(0,p.setVisible)(I,!1),(0,p.setVisible)(F,!1)):_(),e.abrupt("return",c(t,r));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)},m=function(e,t){return b.apply(this,arguments)},(I=l.continueButton(t)).setAttribute("data-testid","accept-button"),(F=l.cancelButton(t)).setAttribute("data-testid","cancel-button"),P=t.createElement("div"),N=i.targetClass?d.label(i.targetClass):"item",(O=l.deleteButtonWithCheck(t,P,N,f)).setAttribute("data-testid","delete-button"),(R=l.button(t,y,"Edit",function(e){j=!j,L()})).setAttribute("data-testid","edit-button"),j=!0,D={acceptButton:I,cancelButton:F,editButton:R,deleteButton:O},U=void 0,(M=t.createElement("div")).style.display="flex",M.style.flexDirection="row",!i.permanent&&!i.currentObject){e.next=1;break}return e.next=1,E();case 1:return n.editable&&(M.style.width="100%",n.manualURIEntry&&(B=M.appendChild(l.button(t,g,n.idNoun,w)),l.makeDropTarget(B,C,void 0)),!n.dbLookup||i.currentObject||i.permanent||M.appendChild(l.button(t,v,n.idNoun,A))),L(),e.abrupt("return",M);case 2:case"end":return e.stop()}},e)})),b.apply(this,arguments)}},2566:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={authEndpoint:"",fallbackAuthEndpoint:"https://databox.me/",signupEndpoint:"https://solidproject.org/use-solid/",signupWindowHeight:600,signupWindowWidth:1024,key:"",cert:""}},2609:(e,t,r)=>{"use strict";r.d(t,{T:()=>i});var n=r(5550);class i{constructor(e){this._flattened=new n.n(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){const r=await this._flattened.sign(e,t);if(void 0===r.payload)throw new TypeError("use the flattened module for creating JWS with b64: false");return`${r.protected}.${r.payload}.${r.signature}`}}},2623:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.SHA224=t.sha256=t.SHA256=void 0;const n=r(7076);t.SHA256=n.SHA256,t.sha256=n.sha256,t.SHA224=n.SHA224,t.sha224=n.sha224},2698:(e,t,r)=>{"use strict";function n(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function i(e,t){return e.name===t}function o(e){return parseInt(e.name.slice(4),10)}function a(e,t){if(t.length&&!t.some(t=>e.usages.includes(t))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}function s(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!i(e.algorithm,"HMAC"))throw n("HMAC");const r=parseInt(t.slice(2),10);if(o(e.algorithm.hash)!==r)throw n(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!i(e.algorithm,"RSASSA-PKCS1-v1_5"))throw n("RSASSA-PKCS1-v1_5");const r=parseInt(t.slice(2),10);if(o(e.algorithm.hash)!==r)throw n(`SHA-${r}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!i(e.algorithm,"RSA-PSS"))throw n("RSA-PSS");const r=parseInt(t.slice(2),10);if(o(e.algorithm.hash)!==r)throw n(`SHA-${r}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw n("Ed25519 or Ed448");break;case"Ed25519":if(!i(e.algorithm,"Ed25519"))throw n("Ed25519");break;case"ES256":case"ES384":case"ES512":{if(!i(e.algorithm,"ECDSA"))throw n("ECDSA");const r=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==r)throw n(r,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}a(e,r)}function c(e,t,...r){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!i(e.algorithm,"AES-GCM"))throw n("AES-GCM");const r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw n(r,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!i(e.algorithm,"AES-KW"))throw n("AES-KW");const r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw n(r,"algorithm.length");break}case"ECDH":switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw n("ECDH, X25519, or X448")}break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!i(e.algorithm,"PBKDF2"))throw n("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!i(e.algorithm,"RSA-OAEP"))throw n("RSA-OAEP");const r=parseInt(t.slice(9),10)||1;if(o(e.algorithm.hash)!==r)throw n(`SHA-${r}`,"algorithm.hash");break}default:throw new TypeError("CryptoKey does not support this operation")}a(e,r)}r.d(t,{$:()=>c,Y:()=>s})},2727:(e,t,r)=>{"use strict";r.r(t),r.d(t,{docpart:()=>o,document:()=>a,hostpart:()=>s,join:()=>c,protocol:()=>u,refTo:()=>l});var n=r(5108),i=i||console.log;function o(e){var t;return(t=e.indexOf("#"))<0?e:e.slice(0,t)}function a(e){return new n.A(o(e))}function s(e){var t=/[^\/]*\/\/([^\/]*)\//.exec(e);return t?t[1]:""}function c(e,t){var r,n,o,a,s,c=t.indexOf("#");if(c>0&&(t=t.slice(0,c)),0===e.length)return t;if(0===e.indexOf("#"))return t+e;if(e.indexOf(":")>=0)return e;if(r=t.indexOf(":"),0===t.length)return e;if(r<0)return i("Invalid base: "+t+" in join with given: "+e),e;if(n=t.slice(0,+r+1||9e9),0===e.indexOf("//"))return n+e;if(t.indexOf("//",r)===r+1){if((o=t.indexOf("/",r+3))<0)return t.length-r-3>0?t+"/"+e:n+e}else if((o=t.indexOf("/",r+1))<0)return t.length-r-1>0?t+"/"+e:n+e;if(0===e.indexOf("/"))return t.slice(0,o)+e;if((a=(s=t.slice(o)).lastIndexOf("/"))<0)return n+e;for(a>=0&&a<s.length-1&&(s=s.slice(0,+a+1||9e9)),s+=e;s.match(/[^\/]*\/\.\.\//);)s=s.replace(/[^\/]*\/\.\.\//,"");return s=(s=s.replace(/\.\//g,"")).replace(/\/\.$/,"/"),t.slice(0,o)+s}function u(e){const t=e.indexOf(":");return t<0?null:e.slice(0,t)}function l(e,t){var r,n,i,o,a,s,c,u,l,d,p,f,h=new RegExp("^[-_a-zA-Z0-9.]+:(//[^/]*)?/[^/]*$");if(!e)return t;if(e===t)return"";for(r=c=0,o=t.length;c<o&&t[r]===e[r];r=++c);if(e.slice(0,r).match(h)&&((n=t.indexOf("//"))<0&&(n=-2),i=t.indexOf("/",n+2),"/"!==t[i+1]&&"/"!==e[i+1]&&t.slice(0,i)===e.slice(0,i)))return t.slice(i);if("#"===t[r]&&e.length===r)return t.slice(r);for(;r>0&&"/"!==t[r-1];)r--;if(r<3)return t;if(e.indexOf("//",r-2)>0||t.indexOf("//",r-2)>0)return t;if(e.indexOf(":",r)>0)return t;for(s=0,u=0,a=(d=e.slice(r)).length;u<a;u++)"/"===d[u]&&s++;if(0===s&&r<t.length&&"#"===t[r])return"./"+t.slice(r);if(0===s&&r===t.length)return"./";if(f="",s>0)for(l=1,p=s;p>=1?l<=p:l>=p;p>=1?++l:--l)f+="../";return f+t.slice(r)}},2770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9746);t.default=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},2829:(e,t)=>{"use strict";function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520],o=new Uint8Array(e.length+1);o.set(e),o[e.length]=128;const a=(e=o).length/4+2,s=Math.ceil(a/16),c=new Array(s);for(let t=0;t<s;++t){const r=new Uint32Array(16);for(let n=0;n<16;++n)r[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];c[t]=r}c[s-1][14]=8*(e.length-1)/Math.pow(2,32),c[s-1][14]=Math.floor(c[s-1][14]),c[s-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<s;++e){const o=new Uint32Array(80);for(let t=0;t<16;++t)o[t]=c[e][t];for(let e=16;e<80;++e)o[e]=n(o[e-3]^o[e-8]^o[e-14]^o[e-16],1);let a=i[0],s=i[1],u=i[2],l=i[3],d=i[4];for(let e=0;e<80;++e){const i=Math.floor(e/20),c=n(a,5)+r(i,s,u,l)+d+t[i]+o[e]>>>0;d=l,l=u,u=n(s,30)>>>0,s=a,a=c}i[0]=i[0]+a>>>0,i[1]=i[1]+s>>>0,i[2]=i[2]+u>>>0,i[3]=i[3]+l>>>0,i[4]=i[4]+d>>>0}return Uint8Array.of(i[0]>>24,i[0]>>16,i[0]>>8,i[0],i[1]>>24,i[1]>>16,i[1]>>8,i[1],i[2]>>24,i[2]>>16,i[2]>>8,i[2],i[3]>>24,i[3]>>16,i[3]>>8,i[3],i[4]>>24,i[4]>>16,i[4]>>8,i[4])}},2902:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.error=function(){var e;(e=console).error.apply(e,arguments)},t.log=function(){var e;(e=console).log.apply(e,arguments)},t.trace=function(){var e;(e=console).trace.apply(e,arguments)},t.warn=function(){var e;(e=console).warn.apply(e,arguments)}},2915:(e,t,r)=>{"use strict";r.d(t,{CZ:()=>c,D0:()=>d,DJ:()=>s,DZ:()=>l,GE:()=>y,P3:()=>a,RN:()=>b,SH:()=>i,Y2:()=>h,YC:()=>v,aF:()=>f,c$:()=>p,fY:()=>u,hr:()=>g,jt:()=>m,ok:()=>o});var n=r(9403);function i(e){return"object"==typeof e&&null!==e&&"subject"in e}function o(e){return"object"==typeof e&&null!==e&&"statements"in e}function a(e){return d(e)&&e.termType===n.r0}function s(e){return e&&Object.prototype.hasOwnProperty.call(e,"termType")&&(e.termType===n.Kk||e.termType===n.P2||e.termType===n.$Q||e.termType===n.r0||e.termType===n.QW||e.termType===n.bD)}function c(e){return e&&Object.prototype.hasOwnProperty.call(e,"termType")&&(e.termType===n.Kk||e.termType===n.P2||e.termType===n.$Q||e.termType===n.r0||e.termType===n.QW||e.termType===n.bD)}function u(e){return d(e)&&(e.termType===n.Kk||e.termType===n.$Q||e.termType===n.P2)}function l(e){return d(e)&&e.termType===n.P2}function d(e){return"object"==typeof e&&null!==e&&"termType"in e}function p(e){return e.termType===n.QW}function f(e){return"object"==typeof e&&null!==e&&"subject"in e&&"predicate"in e&&"object"in e}function h(e){return d(e)&&"NamedNode"===e.termType}function m(e){return d(e)&&"termType"in e&&"BlankNode"===e.termType}function g(e){return d(e)&&(e.termType===n.Kk||e.termType===n.P2||e.termType===n.$Q)}function v(e){return d(e)&&(e.termType===n.Kk||e.termType===n.P2)}function y(e){return d(e)&&(e.termType===n.Kk||e.termType===n.P2||e.termType===n.$Q||e.termType===n.QW)}function b(e){return d(e)&&(e.termType===n.Kk||e.termType===n.P2||e.termType===n.$Q||e.termType===n.ic)}},2931:(e,t,r)=>{"use strict";function n(e){return"string"==typeof e?e:e.value}r.d(t,{E:()=>n})},2987:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},2988:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=t.stringToBytes=void 0;const n=r(1797),i=r(6011);function o(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t}t.stringToBytes=o,t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t.default=function(e,t,r,a,s,c){const u="string"==typeof r?o(r):r,l="string"==typeof a?(0,n.default)(a):a;if("string"==typeof a&&(a=(0,n.default)(a)),16!==a?.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let d=new Uint8Array(16+u.length);if(d.set(l),d.set(u,l.length),d=t(d),d[6]=15&d[6]|e,d[8]=63&d[8]|128,s){c=c||0;for(let e=0;e<16;++e)s[c+e]=d[e];return s}return(0,i.unsafeStringify)(d)}},3054:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapDivInATR=t.createImageDiv=t.addClickListenerToElement=void 0;var n=r(5148);t.wrapDivInATR=function(e,t,r){var n=e.createElement("tr");return n.appendChild(e.createElement("td")).appendChild(t),n.subject=r,n},t.addClickListenerToElement=function(e,t){e.addEventListener("click",t)},t.createImageDiv=function(e,t,r){var i=t.appendChild(e.createElement("div"));i.setAttribute("style",n.imageDivStyle),i.appendChild(r),r.setAttribute("draggable","false")}},3072:e=>{function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3078:(e,t,r)=>{"use strict";r.d(t,{A:()=>s,U:()=>c});var n=r(4705),i=r(8936),o=r(9403),a=r(4275);class s extends i.A{constructor(){super(""),(0,n.A)(this,"value",""),(0,n.A)(this,"termType",o.ic),(0,n.A)(this,"uri",a.U)}toCanonical(){return this.value}toString(){return"DefaultGraph"}}function c(e){return!!e&&e.termType===o.ic}},3085:(e,t,r)=>{"use strict";r.d(t,{G:()=>s});var n=r(2222),i=r(149),o=r(6957);function a(e,t){if(!Number.isFinite(t))throw new TypeError(`Invalid ${e} input`);return t}class s{constructor(e={}){if(!(0,i.A)(e))throw new TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return"number"==typeof e?this._payload={...this._payload,nbf:a("setNotBefore",e)}:e instanceof Date?this._payload={...this._payload,nbf:a("setNotBefore",(0,n.A)(e))}:this._payload={...this._payload,nbf:(0,n.A)(new Date)+(0,o.A)(e)},this}setExpirationTime(e){return"number"==typeof e?this._payload={...this._payload,exp:a("setExpirationTime",e)}:e instanceof Date?this._payload={...this._payload,exp:a("setExpirationTime",(0,n.A)(e))}:this._payload={...this._payload,exp:(0,n.A)(new Date)+(0,o.A)(e)},this}setIssuedAt(e){return void 0===e?this._payload={...this._payload,iat:(0,n.A)(new Date)}:e instanceof Date?this._payload={...this._payload,iat:a("setIssuedAt",(0,n.A)(e))}:this._payload="string"==typeof e?{...this._payload,iat:a("setIssuedAt",(0,n.A)(new Date)+(0,o.A)(e))}:{...this._payload,iat:a("setIssuedAt",e)},this}}},3093:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(7335);function i(e,t){return"string"==typeof t?e.rdfFactory.literal(t):Object.prototype.hasOwnProperty.call(t,"@list")?!0===e.rdfFactory.supports.COLLECTIONS?function(e,t){if(!Array.isArray(t))throw new TypeError("Object must be an array");return e.rdfFactory.collection(t.map(t=>i(e,t)))}(e,t["@list"]):function(e,t){const r=t["@id"]?a(e,t):e.rdfFactory.blankNode(),o=t["@list"].map(t=>i(e,t)),s=(0,n.XV)(e.rdfFactory,r,o);return e.addAll(s),r}(e,t):Object.prototype.hasOwnProperty.call(t,"@id")?a(e,t):Object.prototype.hasOwnProperty.call(t,"@language")?e.rdfFactory.literal(t["@value"],t["@language"]):Object.prototype.hasOwnProperty.call(t,"@type")?e.rdfFactory.literal(t["@value"],e.rdfFactory.namedNode(t["@type"])):Object.prototype.hasOwnProperty.call(t,"@value")?e.rdfFactory.literal(t["@value"]):e.rdfFactory.literal(t)}async function o(e,t,n){const i=n&&Object.prototype.hasOwnProperty.call(n,"termType")?n.value:n,o=await Promise.all([r.e(841),r.e(789)]).then(r.t.bind(r,4841,23));return(await o.default.flatten(JSON.parse(e),null,{base:i})).reduce((e,t)=>s(e,n,t),t)}function a(e,t){return t["@id"].startsWith("_:")?e.rdfFactory.blankNode(t["@id"].substring(2)):e.rdfFactory.namedNode(t["@id"])}function s(e,t,r){const n=r["@id"]?a(e,r):e.rdfFactory.blankNode();for(const i of Object.keys(r)){if("@id"===i)continue;if("@graph"==i){const t=n,o=r[i];for(let r=0;r<o.length;r++)e=s(e,t,o[r])}const o=r[i];if(Array.isArray(o))for(let r=0;r<o.length;r++)e.addStatement(c(e,n,i,o[r],t));else e.addStatement(c(e,n,i,o,t))}return e}function c(e,t,r,n,o){let a,s;return"@type"===r?(a=e.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),s=e.rdfFactory.namedNode(n)):(a=e.rdfFactory.namedNode(r),s=i(e,n)),e.rdfFactory.quad(t,a,s,e.rdfFactory.namedNode(o))}},3121:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CompactEncrypt:()=>Q,CompactSign:()=>Z.T,EmbeddedJWK:()=>le,EncryptJWT:()=>oe,FlattenedEncrypt:()=>W,FlattenedSign:()=>ee.n,GeneralEncrypt:()=>K,GeneralSign:()=>re,SignJWT:()=>ne.P,UnsecuredJWT:()=>fe,base64url:()=>n,calculateJwkThumbprint:()=>ce,calculateJwkThumbprintUri:()=>ue,compactDecrypt:()=>U,compactVerify:()=>J.B,createLocalJWKSet:()=>de.w,createRemoteJWKSet:()=>pe.RD,cryptoRuntime:()=>xe,decodeJwt:()=>ve,decodeProtectedHeader:()=>ge,errors:()=>a,experimental_jwksCache:()=>pe.tK,exportJWK:()=>H.JU,exportPKCS8:()=>H.Yp,exportSPKI:()=>H.Y5,flattenedDecrypt:()=>D,flattenedVerify:()=>z.Z,generalDecrypt:()=>M,generalVerify:()=>$,generateKeyPair:()=>ye.T,generateSecret:()=>we,importJWK:()=>P.Og,importPKCS8:()=>P.Lf,importSPKI:()=>P.jU,importX509:()=>P.Mh,jwksCache:()=>pe.gE,jwtDecrypt:()=>Y,jwtVerify:()=>G.V});var n={};r.r(n),r.d(n,{decode:()=>me,encode:()=>he});var i=r(1436),o=r(9095),a=r(7493),s=r(8057);function c(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new a.JOSENotSupported(`Unsupported JWE Algorithm: ${e}`)}}const u=(e,t)=>{if(t.length<<3!==c(e))throw new a.JWEInvalid("Invalid Initialization Vector length")},l=(e,t)=>{const r=e.byteLength<<3;if(r!==t)throw new a.JWEInvalid(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)};var d=r(7991),p=r(2698),f=r(1575),h=r(5994);const m=async(e,t,r,n,i,s)=>{if(!((0,d.R)(t)||t instanceof Uint8Array))throw new TypeError((0,f.A)(t,...h.g,"Uint8Array"));if(!n)throw new a.JWEInvalid("JWE Initialization Vector missing");if(!i)throw new a.JWEInvalid("JWE Authentication Tag missing");switch(u(e,n),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return t instanceof Uint8Array&&l(t,parseInt(e.slice(-3),10)),async function(e,t,r,n,i,s){if(!(t instanceof Uint8Array))throw new TypeError((0,f.A)(t,"Uint8Array"));const c=parseInt(e.slice(1,4),10),u=await d.A.subtle.importKey("raw",t.subarray(c>>3),"AES-CBC",!1,["decrypt"]),l=await d.A.subtle.importKey("raw",t.subarray(0,c>>3),{hash:"SHA-"+(c<<1),name:"HMAC"},!1,["sign"]),p=(0,o.xW)(s,n,r,(0,o.mx)(s.length<<3)),h=new Uint8Array((await d.A.subtle.sign("HMAC",l,p)).slice(0,c>>3));let m,g;try{m=((e,t)=>{if(!(e instanceof Uint8Array))throw new TypeError("First argument must be a buffer");if(!(t instanceof Uint8Array))throw new TypeError("Second argument must be a buffer");if(e.length!==t.length)throw new TypeError("Input buffers must have the same length");const r=e.length;let n=0,i=-1;for(;++i<r;)n|=e[i]^t[i];return 0===n})(i,h)}catch{}if(!m)throw new a.JWEDecryptionFailed;try{g=new Uint8Array(await d.A.subtle.decrypt({iv:n,name:"AES-CBC"},u,r))}catch{}if(!g)throw new a.JWEDecryptionFailed;return g}(e,t,r,n,i,s);case"A128GCM":case"A192GCM":case"A256GCM":return t instanceof Uint8Array&&l(t,parseInt(e.slice(1,4),10)),async function(e,t,r,n,i,s){let c;t instanceof Uint8Array?c=await d.A.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]):((0,p.$)(t,e,"decrypt"),c=t);try{return new Uint8Array(await d.A.subtle.decrypt({additionalData:s,iv:n,name:"AES-GCM",tagLength:128},c,(0,o.xW)(r,i)))}catch{throw new a.JWEDecryptionFailed}}(e,t,r,n,i,s);default:throw new a.JOSENotSupported("Unsupported JWE Content Encryption Algorithm")}};var g=r(9874),v=r(149);const y=[{hash:"SHA-256",name:"HMAC"},!0,["sign"]];function b(e,t){if(e.algorithm.length!==parseInt(t.slice(1,4),10))throw new TypeError(`Invalid key size for alg: ${t}`)}function w(e,t,r){if((0,d.R)(e))return(0,p.$)(e,t,r),e;if(e instanceof Uint8Array)return d.A.subtle.importKey("raw",e,"AES-KW",!0,[r]);throw new TypeError((0,f.A)(e,...h.g,"Uint8Array"))}const x=async(e,t,r)=>{const n=await w(t,e,"wrapKey");b(n,e);const i=await d.A.subtle.importKey("raw",r,...y);return new Uint8Array(await d.A.subtle.wrapKey("raw",i,n,"AES-KW"))},_=async(e,t,r)=>{const n=await w(t,e,"unwrapKey");b(n,e);const i=await d.A.subtle.unwrapKey("raw",r,n,"AES-KW",...y);return new Uint8Array(await d.A.subtle.exportKey("raw",i))};async function E(e,t,r,n,i=new Uint8Array(0),a=new Uint8Array(0)){if(!(0,d.R)(e))throw new TypeError((0,f.A)(e,...h.g));if((0,p.$)(e,"ECDH"),!(0,d.R)(t))throw new TypeError((0,f.A)(t,...h.g));(0,p.$)(t,"ECDH","deriveBits");const s=(0,o.xW)((0,o.Kp)(o.Rd.encode(r)),(0,o.Kp)(i),(0,o.Kp)(a),(0,o.VS)(n));let c;c="X25519"===e.algorithm.name?256:"X448"===e.algorithm.name?448:Math.ceil(parseInt(e.algorithm.namedCurve.substr(-3),10)/8)<<3;const u=new Uint8Array(await d.A.subtle.deriveBits({name:e.algorithm.name,public:e},t,c));return(0,o.yI)(u,n,s)}function S(e){if(!(0,d.R)(e))throw new TypeError((0,f.A)(e,...h.g));return["P-256","P-384","P-521"].includes(e.algorithm.namedCurve)||"X25519"===e.algorithm.name||"X448"===e.algorithm.name}async function A(e,t,r,n){!function(e){if(!(e instanceof Uint8Array)||e.length<8)throw new a.JWEInvalid("PBES2 Salt Input must be 8 or more octets")}(e);const i=(0,o.MT)(t,e),s=parseInt(t.slice(13,16),10),c={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:i},u={length:s,name:"AES-KW"},l=await function(e,t){if(e instanceof Uint8Array)return d.A.subtle.importKey("raw",e,"PBKDF2",!1,["deriveBits"]);if((0,d.R)(e))return(0,p.$)(e,t,"deriveBits","deriveKey"),e;throw new TypeError((0,f.A)(e,...h.g,"Uint8Array"))}(n,t);if(l.usages.includes("deriveBits"))return new Uint8Array(await d.A.subtle.deriveBits(c,l,s));if(l.usages.includes("deriveKey"))return d.A.subtle.deriveKey(c,l,u,!1,["wrapKey","unwrapKey"]);throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}function k(e){switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new a.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}var C=r(4495),T=r(3139);function I(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new a.JOSENotSupported(`Unsupported JWE Algorithm: ${e}`)}}const F=e=>(0,s.A)(new Uint8Array(I(e)>>3));var P=r(8278),N=r(8858);const O=async(e,t,r,n,i)=>{if(!((0,d.R)(r)||r instanceof Uint8Array))throw new TypeError((0,f.A)(r,...h.g,"Uint8Array"));var m;switch(n?u(e,n):(m=e,n=(0,s.A)(new Uint8Array(c(m)>>3))),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r instanceof Uint8Array&&l(r,parseInt(e.slice(-3),10)),async function(e,t,r,n,i){if(!(r instanceof Uint8Array))throw new TypeError((0,f.A)(r,"Uint8Array"));const a=parseInt(e.slice(1,4),10),s=await d.A.subtle.importKey("raw",r.subarray(a>>3),"AES-CBC",!1,["encrypt"]),c=await d.A.subtle.importKey("raw",r.subarray(0,a>>3),{hash:"SHA-"+(a<<1),name:"HMAC"},!1,["sign"]),u=new Uint8Array(await d.A.subtle.encrypt({iv:n,name:"AES-CBC"},s,t)),l=(0,o.xW)(i,n,u,(0,o.mx)(i.length<<3));return{ciphertext:u,tag:new Uint8Array((await d.A.subtle.sign("HMAC",c,l)).slice(0,a>>3)),iv:n}}(e,t,r,n,i);case"A128GCM":case"A192GCM":case"A256GCM":return r instanceof Uint8Array&&l(r,parseInt(e.slice(1,4),10)),async function(e,t,r,n,i){let o;r instanceof Uint8Array?o=await d.A.subtle.importKey("raw",r,"AES-GCM",!1,["encrypt"]):((0,p.$)(r,e,"encrypt"),o=r);const a=new Uint8Array(await d.A.subtle.encrypt({additionalData:i,iv:n,name:"AES-GCM",tagLength:128},o,t)),s=a.slice(-16);return{ciphertext:a.slice(0,-16),tag:s,iv:n}}(e,t,r,n,i);default:throw new a.JOSENotSupported("Unsupported JWE Content Encryption Algorithm")}},R=async function(e,t,r,n,o){switch((0,N.A)(e,t,"decrypt"),t=await(T.A.normalizePrivateKey?.(t,e))||t,e){case"dir":if(void 0!==r)throw new a.JWEInvalid("Encountered unexpected JWE Encrypted Key");return t;case"ECDH-ES":if(void 0!==r)throw new a.JWEInvalid("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!(0,v.A)(n.epk))throw new a.JWEInvalid('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!S(t))throw new a.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime");const o=await(0,P.Og)(n.epk,e);let s,c;if(void 0!==n.apu){if("string"!=typeof n.apu)throw new a.JWEInvalid('JOSE Header "apu" (Agreement PartyUInfo) invalid');try{s=(0,i.D4)(n.apu)}catch{throw new a.JWEInvalid("Failed to base64url decode the apu")}}if(void 0!==n.apv){if("string"!=typeof n.apv)throw new a.JWEInvalid('JOSE Header "apv" (Agreement PartyVInfo) invalid');try{c=(0,i.D4)(n.apv)}catch{throw new a.JWEInvalid("Failed to base64url decode the apv")}}const u=await E(o,t,"ECDH-ES"===e?n.enc:e,"ECDH-ES"===e?I(n.enc):parseInt(e.slice(-5,-2),10),s,c);if("ECDH-ES"===e)return u;if(void 0===r)throw new a.JWEInvalid("JWE Encrypted Key missing");return _(e.slice(-6),u,r)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":if(void 0===r)throw new a.JWEInvalid("JWE Encrypted Key missing");return(async(e,t,r)=>{if(!(0,d.R)(t))throw new TypeError((0,f.A)(t,...h.g));if((0,p.$)(t,e,"decrypt","unwrapKey"),(0,C.A)(e,t),t.usages.includes("decrypt"))return new Uint8Array(await d.A.subtle.decrypt(k(e),t,r));if(t.usages.includes("unwrapKey")){const n=await d.A.subtle.unwrapKey("raw",r,t,k(e),...y);return new Uint8Array(await d.A.subtle.exportKey("raw",n))}throw new TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation')})(e,t,r);case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{if(void 0===r)throw new a.JWEInvalid("JWE Encrypted Key missing");if("number"!=typeof n.p2c)throw new a.JWEInvalid('JOSE Header "p2c" (PBES2 Count) missing or invalid');const s=o?.maxPBES2Count||1e4;if(n.p2c>s)throw new a.JWEInvalid('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof n.p2s)throw new a.JWEInvalid('JOSE Header "p2s" (PBES2 Salt) missing or invalid');let c;try{c=(0,i.D4)(n.p2s)}catch{throw new a.JWEInvalid("Failed to base64url decode the p2s")}return(async(e,t,r,n,i)=>{const o=await A(i,e,n,t);return _(e.slice(-6),o,r)})(e,t,r,n.p2c,c)}case"A128KW":case"A192KW":case"A256KW":if(void 0===r)throw new a.JWEInvalid("JWE Encrypted Key missing");return _(e,t,r);case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{if(void 0===r)throw new a.JWEInvalid("JWE Encrypted Key missing");if("string"!=typeof n.iv)throw new a.JWEInvalid('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof n.tag)throw new a.JWEInvalid('JOSE Header "tag" (Authentication Tag) missing or invalid');let o,s;try{o=(0,i.D4)(n.iv)}catch{throw new a.JWEInvalid("Failed to base64url decode the iv")}try{s=(0,i.D4)(n.tag)}catch{throw new a.JWEInvalid("Failed to base64url decode the tag")}return async function(e,t,r,n,i){const o=e.slice(0,7);return m(o,t,r,n,i,new Uint8Array(0))}(e,t,r,o,s)}default:throw new a.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}};var j=r(2168),L=r(4618);async function D(e,t,r){if(!(0,v.A)(e))throw new a.JWEInvalid("Flattened JWE must be an object");if(void 0===e.protected&&void 0===e.header&&void 0===e.unprotected)throw new a.JWEInvalid("JOSE Header missing");if(void 0!==e.iv&&"string"!=typeof e.iv)throw new a.JWEInvalid("JWE Initialization Vector incorrect type");if("string"!=typeof e.ciphertext)throw new a.JWEInvalid("JWE Ciphertext missing or incorrect type");if(void 0!==e.tag&&"string"!=typeof e.tag)throw new a.JWEInvalid("JWE Authentication Tag incorrect type");if(void 0!==e.protected&&"string"!=typeof e.protected)throw new a.JWEInvalid("JWE Protected Header incorrect type");if(void 0!==e.encrypted_key&&"string"!=typeof e.encrypted_key)throw new a.JWEInvalid("JWE Encrypted Key incorrect type");if(void 0!==e.aad&&"string"!=typeof e.aad)throw new a.JWEInvalid("JWE AAD incorrect type");if(void 0!==e.header&&!(0,v.A)(e.header))throw new a.JWEInvalid("JWE Shared Unprotected Header incorrect type");if(void 0!==e.unprotected&&!(0,v.A)(e.unprotected))throw new a.JWEInvalid("JWE Per-Recipient Unprotected Header incorrect type");let n;if(e.protected)try{const t=(0,i.D4)(e.protected);n=JSON.parse(o.D0.decode(t))}catch{throw new a.JWEInvalid("JWE Protected Header is invalid")}if(!(0,g.A)(n,e.header,e.unprotected))throw new a.JWEInvalid("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");const s={...n,...e.header,...e.unprotected};if((0,j.A)(a.JWEInvalid,new Map,r?.crit,n,s),void 0!==s.zip)throw new a.JOSENotSupported('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');const{alg:c,enc:u}=s;if("string"!=typeof c||!c)throw new a.JWEInvalid("missing JWE Algorithm (alg) in JWE Header");if("string"!=typeof u||!u)throw new a.JWEInvalid("missing JWE Encryption Algorithm (enc) in JWE Header");const l=r&&(0,L.A)("keyManagementAlgorithms",r.keyManagementAlgorithms),d=r&&(0,L.A)("contentEncryptionAlgorithms",r.contentEncryptionAlgorithms);if(l&&!l.has(c)||!l&&c.startsWith("PBES2"))throw new a.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed');if(d&&!d.has(u))throw new a.JOSEAlgNotAllowed('"enc" (Encryption Algorithm) Header Parameter value not allowed');let p;if(void 0!==e.encrypted_key)try{p=(0,i.D4)(e.encrypted_key)}catch{throw new a.JWEInvalid("Failed to base64url decode the encrypted_key")}let f,h,y,b=!1;"function"==typeof t&&(t=await t(n,e),b=!0);try{f=await R(c,t,p,s,r)}catch(e){if(e instanceof TypeError||e instanceof a.JWEInvalid||e instanceof a.JOSENotSupported)throw e;f=F(u)}if(void 0!==e.iv)try{h=(0,i.D4)(e.iv)}catch{throw new a.JWEInvalid("Failed to base64url decode the iv")}if(void 0!==e.tag)try{y=(0,i.D4)(e.tag)}catch{throw new a.JWEInvalid("Failed to base64url decode the tag")}const w=o.Rd.encode(e.protected??"");let x,_;x=void 0!==e.aad?(0,o.xW)(w,o.Rd.encode("."),o.Rd.encode(e.aad)):w;try{_=(0,i.D4)(e.ciphertext)}catch{throw new a.JWEInvalid("Failed to base64url decode the ciphertext")}const E={plaintext:await m(u,f,_,h,y,x)};if(void 0!==e.protected&&(E.protectedHeader=n),void 0!==e.aad)try{E.additionalAuthenticatedData=(0,i.D4)(e.aad)}catch{throw new a.JWEInvalid("Failed to base64url decode the aad")}return void 0!==e.unprotected&&(E.sharedUnprotectedHeader=e.unprotected),void 0!==e.header&&(E.unprotectedHeader=e.header),b?{...E,key:t}:E}async function U(e,t,r){if(e instanceof Uint8Array&&(e=o.D0.decode(e)),"string"!=typeof e)throw new a.JWEInvalid("Compact JWE must be a string or Uint8Array");const{0:n,1:i,2:s,3:c,4:u,length:l}=e.split(".");if(5!==l)throw new a.JWEInvalid("Invalid Compact JWE");const d=await D({ciphertext:c,iv:s||void 0,protected:n,tag:u||void 0,encrypted_key:i||void 0},t,r),p={plaintext:d.plaintext,protectedHeader:d.protectedHeader};return"function"==typeof t?{...p,key:d.key}:p}async function M(e,t,r){if(!(0,v.A)(e))throw new a.JWEInvalid("General JWE must be an object");if(!Array.isArray(e.recipients)||!e.recipients.every(v.A))throw new a.JWEInvalid("JWE Recipients missing or incorrect type");if(!e.recipients.length)throw new a.JWEInvalid("JWE Recipients has no members");for(const n of e.recipients)try{return await D({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:n.encrypted_key,header:n.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,r)}catch{}throw new a.JWEDecryptionFailed}const B=Symbol();var H=r(5130);const q=async function(e,t,r,n,o={}){let c,u,l;switch((0,N.A)(e,r,"encrypt"),r=await(T.A.normalizePublicKey?.(r,e))||r,e){case"dir":l=r;break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!S(r))throw new a.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime");const{apu:s,apv:p}=o;let{epk:m}=o;m||(m=(await async function(e){if(!(0,d.R)(e))throw new TypeError((0,f.A)(e,...h.g));return d.A.subtle.generateKey(e.algorithm,!0,["deriveBits"])}(r)).privateKey);const{x:g,y:v,crv:y,kty:b}=await(0,H.JU)(m),w=await E(r,m,"ECDH-ES"===e?t:e,"ECDH-ES"===e?I(t):parseInt(e.slice(-5,-2),10),s,p);if(u={epk:{x:g,crv:y,kty:b}},"EC"===b&&(u.epk.y=v),s&&(u.apu=(0,i.lF)(s)),p&&(u.apv=(0,i.lF)(p)),"ECDH-ES"===e){l=w;break}l=n||F(t);const _=e.slice(-6);c=await x(_,w,l);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":l=n||F(t),c=await(async(e,t,r)=>{if(!(0,d.R)(t))throw new TypeError((0,f.A)(t,...h.g));if((0,p.$)(t,e,"encrypt","wrapKey"),(0,C.A)(e,t),t.usages.includes("encrypt"))return new Uint8Array(await d.A.subtle.encrypt(k(e),t,r));if(t.usages.includes("wrapKey")){const n=await d.A.subtle.importKey("raw",r,...y);return new Uint8Array(await d.A.subtle.wrapKey("raw",n,t,k(e)))}throw new TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation')})(e,r,l);break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{l=n||F(t);const{p2c:a,p2s:d}=o;({encryptedKey:c,...u}=await(async(e,t,r,n=2048,o=(0,s.A)(new Uint8Array(16)))=>{const a=await A(o,e,n,t);return{encryptedKey:await x(e.slice(-6),a,r),p2c:n,p2s:(0,i.lF)(o)}})(e,r,l,a,d));break}case"A128KW":case"A192KW":case"A256KW":l=n||F(t),c=await x(e,r,l);break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{l=n||F(t);const{iv:a}=o;({encryptedKey:c,...u}=await async function(e,t,r,n){const o=e.slice(0,7),a=await O(o,r,t,n,new Uint8Array(0));return{encryptedKey:a.ciphertext,iv:(0,i.lF)(a.iv),tag:(0,i.lF)(a.tag)}}(e,r,l,a));break}default:throw new a.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:l,encryptedKey:c,parameters:u}};class W{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("plaintext must be an instance of Uint8Array");this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader)throw new TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}setContentEncryptionKey(e){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=e,this}async encrypt(e,t){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new a.JWEInvalid("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!(0,g.A)(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new a.JWEInvalid("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");const r={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if((0,j.A)(a.JWEInvalid,new Map,t?.crit,this._protectedHeader,r),void 0!==r.zip)throw new a.JOSENotSupported('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');const{alg:n,enc:s}=r;if("string"!=typeof n||!n)throw new a.JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("string"!=typeof s||!s)throw new a.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');let c,u,l,d,p;if(this._cek&&("dir"===n||"ECDH-ES"===n))throw new TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${n}`);{let r;({cek:u,encryptedKey:c,parameters:r}=await q(n,s,e,this._cek,this._keyManagementParameters)),r&&(t&&B in t?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...r}:this.setUnprotectedHeader(r):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...r}:this.setProtectedHeader(r))}d=this._protectedHeader?o.Rd.encode((0,i.lF)(JSON.stringify(this._protectedHeader))):o.Rd.encode(""),this._aad?(p=(0,i.lF)(this._aad),l=(0,o.xW)(d,o.Rd.encode("."),o.Rd.encode(p))):l=d;const{ciphertext:f,tag:h,iv:m}=await O(s,this._plaintext,u,this._iv,l),v={ciphertext:(0,i.lF)(f)};return m&&(v.iv=(0,i.lF)(m)),h&&(v.tag=(0,i.lF)(h)),c&&(v.encrypted_key=(0,i.lF)(c)),p&&(v.aad=p),this._protectedHeader&&(v.protected=o.D0.decode(d)),this._sharedUnprotectedHeader&&(v.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(v.header=this._unprotectedHeader),v}}class V{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setUnprotectedHeader(e){if(this.unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class K{constructor(e){this._recipients=[],this._plaintext=e}addRecipient(e,t){const r=new V(this,e,{crit:t?.crit});return this._recipients.push(r),r}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setSharedUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}async encrypt(){if(!this._recipients.length)throw new a.JWEInvalid("at least one recipient must be added");if(1===this._recipients.length){const[e]=this._recipients,t=await new W(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(e.unprotectedHeader).encrypt(e.key,{...e.options}),r={ciphertext:t.ciphertext,iv:t.iv,recipients:[{}],tag:t.tag};return t.aad&&(r.aad=t.aad),t.protected&&(r.protected=t.protected),t.unprotected&&(r.unprotected=t.unprotected),t.encrypted_key&&(r.recipients[0].encrypted_key=t.encrypted_key),t.header&&(r.recipients[0].header=t.header),r}let e;for(let t=0;t<this._recipients.length;t++){const r=this._recipients[t];if(!(0,g.A)(this._protectedHeader,this._unprotectedHeader,r.unprotectedHeader))throw new a.JWEInvalid("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");const n={...this._protectedHeader,...this._unprotectedHeader,...r.unprotectedHeader},{alg:i}=n;if("string"!=typeof i||!i)throw new a.JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("dir"===i||"ECDH-ES"===i)throw new a.JWEInvalid('"dir" and "ECDH-ES" alg may only be used with a single recipient');if("string"!=typeof n.enc||!n.enc)throw new a.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if(e){if(e!==n.enc)throw new a.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else e=n.enc;if((0,j.A)(a.JWEInvalid,new Map,r.options.crit,this._protectedHeader,n),void 0!==n.zip)throw new a.JOSENotSupported('JWE "zip" (Compression Algorithm) Header Parameter is not supported.')}const t=F(e),r={ciphertext:"",iv:"",recipients:[],tag:""};for(let n=0;n<this._recipients.length;n++){const o=this._recipients[n],a={};r.recipients.push(a);const s={...this._protectedHeader,...this._unprotectedHeader,...o.unprotectedHeader}.alg.startsWith("PBES2")?2048+n:void 0;if(0===n){const e=await new W(this._plaintext).setAdditionalAuthenticatedData(this._aad).setContentEncryptionKey(t).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(o.unprotectedHeader).setKeyManagementParameters({p2c:s}).encrypt(o.key,{...o.options,[B]:!0});r.ciphertext=e.ciphertext,r.iv=e.iv,r.tag=e.tag,e.aad&&(r.aad=e.aad),e.protected&&(r.protected=e.protected),e.unprotected&&(r.unprotected=e.unprotected),a.encrypted_key=e.encrypted_key,e.header&&(a.header=e.header);continue}const{encryptedKey:c,parameters:u}=await q(o.unprotectedHeader?.alg||this._protectedHeader?.alg||this._unprotectedHeader?.alg,e,o.key,t,{p2c:s});a.encrypted_key=(0,i.lF)(c),(o.unprotectedHeader||u)&&(a.header={...o.unprotectedHeader,...u})}return r}}var J=r(5609),z=r(6711);async function $(e,t,r){if(!(0,v.A)(e))throw new a.JWSInvalid("General JWS must be an object");if(!Array.isArray(e.signatures)||!e.signatures.every(v.A))throw new a.JWSInvalid("JWS Signatures missing or incorrect type");for(const n of e.signatures)try{return await(0,z.Z)({header:n.header,payload:e.payload,protected:n.protected,signature:n.signature},t,r)}catch{}throw new a.JWSSignatureVerificationFailed}var G=r(9380),X=r(9803);async function Y(e,t,r){const n=await U(e,t,r),i=(0,X.A)(n.protectedHeader,n.plaintext,r),{protectedHeader:o}=n;if(void 0!==o.iss&&o.iss!==i.iss)throw new a.JWTClaimValidationFailed('replicated "iss" claim header parameter mismatch',i,"iss","mismatch");if(void 0!==o.sub&&o.sub!==i.sub)throw new a.JWTClaimValidationFailed('replicated "sub" claim header parameter mismatch',i,"sub","mismatch");if(void 0!==o.aud&&JSON.stringify(o.aud)!==JSON.stringify(i.aud))throw new a.JWTClaimValidationFailed('replicated "aud" claim header parameter mismatch',i,"aud","mismatch");const s={payload:i,protectedHeader:o};return"function"==typeof t?{...s,key:n.key}:s}class Q{constructor(e){this._flattened=new W(e)}setContentEncryptionKey(e){return this._flattened.setContentEncryptionKey(e),this}setInitializationVector(e){return this._flattened.setInitializationVector(e),this}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}setKeyManagementParameters(e){return this._flattened.setKeyManagementParameters(e),this}async encrypt(e,t){const r=await this._flattened.encrypt(e,t);return[r.protected,r.encrypted_key,r.iv,r.ciphertext,r.tag].join(".")}}var Z=r(2609),ee=r(5550);class te{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setProtectedHeader(e){if(this.protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this.protectedHeader=e,this}setUnprotectedHeader(e){if(this.unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class re{constructor(e){this._signatures=[],this._payload=e}addSignature(e,t){const r=new te(this,e,t);return this._signatures.push(r),r}async sign(){if(!this._signatures.length)throw new a.JWSInvalid("at least one signature must be added");const e={signatures:[],payload:""};for(let t=0;t<this._signatures.length;t++){const r=this._signatures[t],n=new ee.n(this._payload);n.setProtectedHeader(r.protectedHeader),n.setUnprotectedHeader(r.unprotectedHeader);const{payload:i,...o}=await n.sign(r.key,r.options);if(0===t)e.payload=i;else if(e.payload!==i)throw new a.JWSInvalid("inconsistent use of JWS Unencoded Payload (RFC7797)");e.signatures.push(o)}return e}}var ne=r(7248),ie=r(3085);class oe extends ie.G{setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setKeyManagementParameters(e){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setContentEncryptionKey(e){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=e,this}replicateIssuerAsHeader(){return this._replicateIssuerAsHeader=!0,this}replicateSubjectAsHeader(){return this._replicateSubjectAsHeader=!0,this}replicateAudienceAsHeader(){return this._replicateAudienceAsHeader=!0,this}async encrypt(e,t){const r=new Q(o.Rd.encode(JSON.stringify(this._payload)));return this._replicateIssuerAsHeader&&(this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}),this._replicateSubjectAsHeader&&(this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}),this._replicateAudienceAsHeader&&(this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}),r.setProtectedHeader(this._protectedHeader),this._iv&&r.setInitializationVector(this._iv),this._cek&&r.setContentEncryptionKey(this._cek),this._keyManagementParameters&&r.setKeyManagementParameters(this._keyManagementParameters),r.encrypt(e,t)}}var ae=r(610);const se=(e,t)=>{if("string"!=typeof e||!e)throw new a.JWKInvalid(`${t} missing or invalid`)};async function ce(e,t){if(!(0,v.A)(e))throw new TypeError("JWK must be an object");if(t??(t="sha256"),"sha256"!==t&&"sha384"!==t&&"sha512"!==t)throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');let r;switch(e.kty){case"EC":se(e.crv,'"crv" (Curve) Parameter'),se(e.x,'"x" (X Coordinate) Parameter'),se(e.y,'"y" (Y Coordinate) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":se(e.crv,'"crv" (Subtype of Key Pair) Parameter'),se(e.x,'"x" (Public Key) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":se(e.e,'"e" (Exponent) Parameter'),se(e.n,'"n" (Modulus) Parameter'),r={e:e.e,kty:e.kty,n:e.n};break;case"oct":se(e.k,'"k" (Key Value) Parameter'),r={k:e.k,kty:e.kty};break;default:throw new a.JOSENotSupported('"kty" (Key Type) Parameter missing or unsupported')}const n=o.Rd.encode(JSON.stringify(r));return(0,i.lF)(await(0,ae.A)(t,n))}async function ue(e,t){t??(t="sha256");const r=await ce(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${r}`}async function le(e,t){const r={...e,...t?.header};if(!(0,v.A)(r.jwk))throw new a.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a JSON object');const n=await(0,P.Og)({...r.jwk,ext:!0},r.alg);if(n instanceof Uint8Array||"public"!==n.type)throw new a.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a public key');return n}var de=r(458),pe=r(3584);class fe extends ie.G{encode(){return`${i.lF(JSON.stringify({alg:"none"}))}.${i.lF(JSON.stringify(this._payload))}.`}static decode(e,t){if("string"!=typeof e)throw new a.JWTInvalid("Unsecured JWT must be a string");const{0:r,1:n,2:s,length:c}=e.split(".");if(3!==c||""!==s)throw new a.JWTInvalid("Invalid Unsecured JWT");let u;try{if(u=JSON.parse(o.D0.decode(i.D4(r))),"none"!==u.alg)throw new Error}catch{throw new a.JWTInvalid("Invalid Unsecured JWT")}return{payload:(0,X.A)(u,i.D4(n),t),header:u}}}const he=i.lF,me=i.D4;function ge(e){let t;if("string"==typeof e){const r=e.split(".");3!==r.length&&5!==r.length||([t]=r)}else if("object"==typeof e&&e){if(!("protected"in e))throw new TypeError("Token does not contain a Protected Header");t=e.protected}try{if("string"!=typeof t||!t)throw new Error;const e=JSON.parse(o.D0.decode(me(t)));if(!(0,v.A)(e))throw new Error;return e}catch{throw new TypeError("Invalid Token or Protected Header formatting")}}function ve(e){if("string"!=typeof e)throw new a.JWTInvalid("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:r}=e.split(".");if(5===r)throw new a.JWTInvalid("Only JWTs using Compact JWS serialization can be decoded");if(3!==r)throw new a.JWTInvalid("Invalid JWT");if(!t)throw new a.JWTInvalid("JWTs must contain a payload");let n,i;try{n=me(t)}catch{throw new a.JWTInvalid("Failed to base64url decode the payload")}try{i=JSON.parse(o.D0.decode(n))}catch{throw new a.JWTInvalid("Failed to parse the decoded payload as JSON")}if(!(0,v.A)(i))throw new a.JWTInvalid("Invalid JWT Claims Set");return i}var ye=r(7307),be=r(8793);async function we(e,t){return(0,be.K)(e,t)}const xe="WebCryptoAPI"},3139:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n=r(5500),i=r(1436),o=r(1542);const a=e=>(0,i.D4)(e);let s,c;const u=e=>"KeyObject"===e?.[Symbol.toStringTag],l=async(e,t,r,n,i=!1)=>{let a=e.get(t);if(a?.[n])return a[n];const s=await(0,o.A)({...r,alg:n});return i&&Object.freeze(t),a?a[n]=s:e.set(t,{[n]:s}),s},d={normalizePublicKey:(e,t)=>{if(u(e)){let r=e.export({format:"jwk"});return delete r.d,delete r.dp,delete r.dq,delete r.p,delete r.q,delete r.qi,r.k?a(r.k):(c||(c=new WeakMap),l(c,e,r,t))}return(0,n.ll)(e)?e.k?(0,i.D4)(e.k):(c||(c=new WeakMap),l(c,e,e,t,!0)):e},normalizePrivateKey:(e,t)=>{if(u(e)){let r=e.export({format:"jwk"});return r.k?a(r.k):(s||(s=new WeakMap),l(s,e,r,t))}return(0,n.ll)(e)?e.k?(0,i.D4)(e.k):(s||(s=new WeakMap),l(s,e,e,t,!0)):e}}},3256:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.autocompleteField=function(e,t,r,n,i,f,h){var m;function g(){return(g=(0,a.default)(o.default.mark(function t(r,i){var a,s,c,l,d,m;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i){t.next=1;break}throw new Error("autocompleteField: No name set.");case 1:if(!(a=y.the(n,E,null,f))){t.next=2;break}if(s=y.any(a,S,null,f),!(a.equals(r)&&s&&s.sameTerm(i))){t.next=2;break}return t.abrupt("return");case 2:return c=a?y.statementsMatching(n,E,a,f).concat(y.statementsMatching(a,S,null,f)):[],l=[(0,p.st)(n,E,r,f),(0,p.st)(r,S,i,f)],t.prev=3,t.next=4,null===(d=y.updater)||void 0===d?void 0:d.updateMany(c,l);case 4:t.next=6;break;case 5:return t.prev=5,m=t.catch(3),h(!1,m),w.appendChild(u.errorMessageBlock(e,"Autocomplete form data update error:"+m,null,m)),t.abrupt("return");case 6:h(!0,"");case 7:case"end":return t.stop()}},t,null,[[3,5]])}))).apply(this,arguments)}function v(){return(v=(0,a.default)(o.default.mark(function t(r,i){var a,s,c,l,d,p;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a=y.the(n,E,null,f)){t.next=1;break}return h(!1,"NO data to elete"),w.appendChild(u.errorMessageBlock(e,"Autocomplete delete: no old data!")),t.abrupt("return");case 1:return s=y.statementsMatching(n,E,a,f).concat(y.statementsMatching(a,S,null,f)),c=[],t.prev=2,t.next=3,null===(l=y.updater)||void 0===l?void 0:l.updateMany(s,c);case 3:t.next=5;break;case 4:return t.prev=4,p=t.catch(2),d=new Error("Autocomplete form data delete error:"+p),h(!1,p),w.appendChild(u.errorMessageBlock(e,d,null,p)),t.abrupt("return");case 5:h(!0,"");case 6:case"end":return t.stop()}},t,null,[[2,4]])}))).apply(this,arguments)}if("NamedNode"!==n.termType)throw new Error("Sorry this field only works on NamedNode subjects (for editable)");var y=c.store,b=i.doc?i.doc():null,w=e.createElement("div");t&&t.appendChild(w);var x=e.createElement("div");x.setAttribute("class","formFieldName"),x.setAttribute("style",l.formFieldNameBoxStyle),w.appendChild(x);var _=e.createElement("div");_.setAttribute("class","formFieldValue"),w.appendChild(_);var E=y.any(i,s.ui("property"));if(!E)return w.appendChild(u.errorMessageBlock(e,"Error: No property given for autocomplete field: "+i));var S=y.any(i,s.ui("labelProperty"))||s.schema("name"),A=y.any(i,s.ui("dataSource"));if(!A)return w.appendChild(u.errorMessageBlock(e,"Error: No data source given for autocomplete field: "+i));var k={label:y.anyJS(A,s.schema("name"),null,A.doc()),logo:y.any(A,s.schema("logo"),null,A.doc())},C=y.any(i,s.ui("targetClass"),null,i.doc())||y.any(A,s.ui("targetClass"),null,A.doc());C&&(k.targetClass=C),k.objectURIBase=y.any(A,s.ui("objectURIBase"),null,A.doc())||void 0;var T=y.anyJS(A,s.ui("endpoint"),null,A.doc());if(T){if(k.endpoint=T,k.searchByNameQuery=y.anyJS(A,s.ui("searchByNameQuery"),null,A.doc()),!k.searchByNameQuery)return w.appendChild(u.errorMessageBlock(e,"Error: No searchByNameQuery given for endpoint data Source: "+i));k.insitituteDetailsQuery=y.anyJS(A,s.ui("insitituteDetailsQuery"),null,A.doc())}else{var I=y.anyJS(A,s.ui("searchByNameURI"));if(!I)return w.appendChild(u.errorMessageBlock(e,"Error: No searchByNameURI OR sparql endpoint given for dataSource: "+A));k.searchByNameURI=I}var F=y.anyJS(i,s.ui("suppressEmptyUneditable"),null,b),P=null===(m=y.updater)||void 0===m?void 0:m.editable(f.uri),N={permanent:!0,targetClass:k.targetClass,queryParams:k};N.size=y.anyJS(i,s.ui("size"),null,b)||void 0;var O=y.any(n,E,void 0,f);if(O)N.currentObject=O,N.currentName=y.any(N.currentObject,S,null,f);else if(O=y.any(i,s.ui("default")))N.currentObject=O,N.currentName=y.any(N.currentObject,S,null,f);else if(F&&!P)return w.style.display="none",w;x.appendChild(u.fieldLabel(e,E,i));var R={editable:P,dbLookup:!0};return(0,d.renderAutocompleteControl)(e,n,R,N,function(e,t){return g.apply(this,arguments)},function(e,t){return v.apply(this,arguments)}).then(function(e){_.appendChild(e)},function(t){_.appendChild(u.errorMessageBlock(e,"Error rendering autocomplete ".concat(i,": ").concat(t),"#fee",t))}),w};var o=n(r(4756)),a=n(r(9293)),s=f(r(2054)),c=r(3451),u=f(r(1939)),l=f(r(5148)),d=r(2545),p=r(2209);function f(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(f=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}},3292:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.Signup=o;var i=n(r(2566));function o(e){this.config=e||i.default}o.prototype.listen=function(){return new Promise(function(e,t){var r=window.addEventListener?"addEventListener":"attachEvent";(0,window[r])("attachEvent"===r?"onmessage":"message",function(r){var n=r.data;if("User:"===n.slice(0,5)){var i=n.slice(5,n.length);return i&&i.length>0&&"http"===i.slice(0,4)?e(i):t(i)}},!0)})},o.prototype.signup=function(e){e=e||this.config.signupEndpoint;var t=this.config.signupWindowWidth,r=this.config.signupWindowHeight,n=window.screen.width/2-(t/2+10),i=window.screen.height/2-(r/2+50),o=e+"?origin="+encodeURIComponent(window.location.origin),a="resizable,scrollbars,status,width="+t+",height="+r+",left="+n+",top="+i;window.open(o,"Solid signup",a);var s=this;return new Promise(function(e){s.listen().then(function(t){return e(t)})})}},3338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.create=void 0;var n=r(3672);t.create={newThingUI:n.newThingUI}},3451:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authSession=t.authn=t.store=t.solidLogicSingleton=t.WebOperationError=t.NotEditableError=t.FetchError=t.NotFoundError=t.SameOriginForbiddenError=t.CrossOriginForbiddenError=t.UnauthorizedError=t.createTypeIndexLogic=t.getSuggestedIssuers=t.appContext=t.offlineTestID=t.ACL_LINK=void 0;var n=r(46);Object.defineProperty(t,"solidLogicSingleton",{enumerable:!0,get:function(){return n.solidLogicSingleton}});var i=n.solidLogicSingleton.authn;t.authn=i;var o=n.solidLogicSingleton.authn.authSession;t.authSession=o;var a=n.solidLogicSingleton.store;t.store=a;var s=r(1888);Object.defineProperty(t,"ACL_LINK",{enumerable:!0,get:function(){return s.ACL_LINK}});var c=r(9288);Object.defineProperty(t,"offlineTestID",{enumerable:!0,get:function(){return c.offlineTestID}}),Object.defineProperty(t,"appContext",{enumerable:!0,get:function(){return c.appContext}});var u=r(7016);Object.defineProperty(t,"getSuggestedIssuers",{enumerable:!0,get:function(){return u.getSuggestedIssuers}});var l=r(5648);Object.defineProperty(t,"createTypeIndexLogic",{enumerable:!0,get:function(){return l.createTypeIndexLogic}});var d=r(1033);Object.defineProperty(t,"UnauthorizedError",{enumerable:!0,get:function(){return d.UnauthorizedError}}),Object.defineProperty(t,"CrossOriginForbiddenError",{enumerable:!0,get:function(){return d.CrossOriginForbiddenError}}),Object.defineProperty(t,"SameOriginForbiddenError",{enumerable:!0,get:function(){return d.SameOriginForbiddenError}}),Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return d.NotFoundError}}),Object.defineProperty(t,"FetchError",{enumerable:!0,get:function(){return d.FetchError}}),Object.defineProperty(t,"NotEditableError",{enumerable:!0,get:function(){return d.NotEditableError}}),Object.defineProperty(t,"WebOperationError",{enumerable:!0,get:function(){return d.WebOperationError}})},3465:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="00000000-0000-0000-0000-000000000000"},3476:(e,t,r)=>{"use strict";r.d(t,{A:()=>d,Y:()=>l});var n=r(4705),i=r(8921),o=r(1059),a=r(8616),s=r(8936),c=r(9403),u=r(2915);function l(e){return null==e||(0,u.D0)(e)?e:Array.isArray(e)?new d(e):a.A.fromValue(e)}class d extends s.A{constructor(e){super((i.A.nextId++).toString()),(0,n.A)(this,"termType",c.r0),(0,n.A)(this,"classOrder",o.A.Collection),(0,n.A)(this,"closed",!1),(0,n.A)(this,"compareTerm",i.A.prototype.compareTerm),(0,n.A)(this,"elements",[]),(0,n.A)(this,"isVar",0),e&&e.length>0&&e.forEach(e=>{this.elements.push(l(e))})}get id(){return this.value}set id(e){this.value=e}append(e){return this.elements.push(e)}close(){return this.closed=!0,this.closed}shift(){return this.elements.shift()}substitute(e){const t=this.elements.map(t=>t.substitute(e));return new d(t)}toNT(){return d.toNT(this)}static toNT(e){return i.A.NTAnonymousNodePrefix+e.id}toString(){return"("+this.elements.join(" ")+")"}unshift(e){return this.elements.unshift(e)}}(0,n.A)(d,"termType",c.r0)},3489:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.TabWidgetElement=void 0,t.tabWidget=function(e){var t=e.subject,r=e.dom||document,n=parseInt(e.orientation||"0"),i=e.backgroundColor||y,a=2&n,s=1&n,c=e.onClose,u=function(e){return function(e){for(var t=0,r=0;r<3;r++)t+=parseInt(e.slice(2*r+1,2*r+3),16);return t>384}(e)?[b(e,"#ffffff",.3),"#000000"]:[b(e,"#000000",.3),"#ffffff"]}(i),l=(0,o.default)(u,2),d=l[0],p=l[1],v="flex: 2; width: auto; height: 100%; border: 0.1em; border-style: solid; border-color: ".concat(d,"; padding: 1em;"),w=r.createElement("div");w.setAttribute("style",m.tabsRootElement),w.style.flexDirection=(s?"row":"column")+(a?"-reverse":"");var x=w.appendChild(r.createElement("nav"));x.setAttribute("style",m.tabsNavElement);var _=w.appendChild(r.createElement("main"));_.setAttribute("style",m.tabsMainElement);var E=x.appendChild(r.createElement("ul"));E.setAttribute("style",m.tabContainer),E.style.flexDirection="".concat(s?"column":"row");var S=_;w.tabContainer=E,w.bodyContainer=S;var A=["0.2em","0.2em","0","0"],k=A.concat(A).slice(n,n+4),C="border-radius: ".concat(k.join(" "),";"),T=["0.3em","0.3em","0","0.3em"],I=T.concat(T).slice(n,n+4),F="margin: ".concat(I.join(" "),";"),P="padding: ".concat(I.join(" "),";"),N=C+"position: relative; padding: 0.7em; max-width: 20em; color: ".concat(p,";"),O="".concat(N+F," opacity: 50%; background-color: ").concat(i,";"),R="".concat(N+F," background-color: ").concat(d,";"),j="height: 100%; width: 100%;",L=j+"display: none;";if(w.refresh=H,H(),!e.startEmpty&&E.children.length&&e.selectedTab){var D=Array.from(E.children).map(function(e){return e.firstChild}).find(function(t){return t.dataset.name===e.selectedTab}),U=e.selectedTab.uri,M=(Array.from(E.children).find(function(e){return e.subject&&e.subject.uri&&e.subject.uri===U})||D||E.children[0]).firstChild;M&&M.click()}else e.startEmpty||E.children[0].firstChild.click();return w;function B(t){var n=r.createElement("li");n.setAttribute("style",O),n.subject=t;var i=n.appendChild(r.createElement("button"));if(i.setAttribute("style",m.makeNewSlot),i.onclick=function(){if(q(),W(),n.setAttribute("style",R),n.bodyTR){n.bodyTR.setAttribute("style",j);var r=a(n);e.renderMain&&n.subject&&!1!==r.asSettings&&(r.innerHTML="loading item ..."+t,e.renderMain(r,n.subject),r.asSettings=!1)}},e.renderTabSettings&&n.subject){var o=r.createElement("button");o.textContent="...",o.setAttribute("style",m.ellipsis),o.onclick=function(){if(q(),W(),n.setAttribute("style",R),n.bodyTR){n.bodyTR.setAttribute("style",j);var r=a(n);e.renderTabSettings&&n.subject&&!0!==r.asSettings&&(r.innerHTML="loading settings ..."+t,e.renderTabSettings(r,n.subject),r.asSettings=!0)}},n.appendChild(o)}return e.renderTab?e.renderTab(i,t):i.innerHTML=(0,h.label)(t),n;function a(e){var t,n=null===(t=e.bodyTR)||void 0===t?void 0:t.children[0];if(n)return n;var i=e.bodyTR.appendChild(r.createElement("main"));return i.setAttribute("style",v),i}}function H(){var n,i,o,a,s,u=e.items?e.items:!1!==e.ordered?g.store.the(t,e.predicate).elements:g.store.each(t,e.predicate),l=!1;for(a=0;a<E.children.length;a++)if(n=E.children[a],a>=u.length||n.subject&&!n.subject.sameTerm(u[a])){l=!0;break}if(l||u.length!==E.children.length){for(s=E.children.length-1;s>=0&&(n=E.children[s],o=s-E.children.length+u.length,!n.subject||n.subject.sameTerm(u[o]));s--);for(var d=u.slice(a,s-E.children.length+u.length+1);s>=a;)E.removeChild(E.children[a]),S.removeChild(S.children[a]),s-=1;for(i=0;i<d.length;i++){var p=B(d[i]),h=r.createElement("div");p.bodyTR=h,a===E.children.length?(E.appendChild(p),S.appendChild(h)):(E.insertBefore(p,E.children[a+i]),S.insertBefore(h,S.children[a+i]))}c&&function(e){if(e.dataset.onCloseSet){var t=e.querySelector(".unstyled");e.removeChild(t)}var n=r.createElement("li");n.classList.add("unstyled");var i=(0,f.cancelButton)(r,c);i.setAttribute("style",i.getAttribute("style")+P),n.appendChild(i),e.appendChild(n),e.dataset.onCloseSet="true"}(E)}}function q(){for(var e=0;e<E.children.length;e++){var t=E.children[e];t.classList.contains("unstyled")||t.setAttribute("style",O)}}function W(){for(var e=0;e<S.children.length;e++)S.children[e].setAttribute("style",L)}};var o=n(r(5715)),a=n(r(4579)),s=n(r(7383)),c=n(r(8452)),u=n(r(3072)),l=n(r(9511)),d=n(r(1837)),p=n(r(3693)),f=r(1939),h=r(7499),m=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var r,n,o={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return o;if(r=t){if(r.has(e))return r.get(e);r.set(e,o)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(n.get||n.set)?r(o,a,n):o[a]=e[a]);return o}(e)}(r(5148)),g=r(3451);function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}t.TabWidgetElement=function(e){function t(){var e,r,n,i;(0,s.default)(this,t);for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];return r=this,n=t,i=[].concat(a),n=(0,u.default)(n),e=(0,c.default)(r,v()?Reflect.construct(n,i||[],(0,u.default)(r).constructor):n.apply(r,i)),(0,p.default)(e,"bodyContainer",void 0),(0,p.default)(e,"refresh",void 0),(0,p.default)(e,"tabContainer",void 0),e}return(0,l.default)(t,e),(0,a.default)(t)}((0,d.default)(HTMLElement));var y="#ddddcc";function b(e,t,r){for(var n,i,o="#",a="0123456789abcdef",s=0;s<3;s++){n=parseInt(e.slice(2*s+1,2*s+3),16),i=parseInt(t.slice(2*s+1,2*s+3),16);var c=parseInt((""+(n*(1-r)+i*r)).split(".")[0]),u=parseInt((""+c/16).split(".")[0]),l=parseInt((""+c%16).split(".")[0]);o+=a[u]+a[l]}return o}},3562:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHash=function(e){return{hash:e}},t.createCurve=function(e,t){const r=t=>(0,n.weierstrass)({...e,hash:t});return{...r(t),create:r}};const n=r(1705)},3565:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.generatePrivateKey=g,t.generatePublicKey=v,t.getPrivateKey=function(e){return b.apply(this,arguments)},t.getPublicKey=function(e){return y.apply(this,arguments)};var o=n(r(4756)),a=n(r(9293)),s=m(r(2902)),c=r(8510),u=r(9175),l=m(r(2054)),d=r(3451),p=m(r(2209)),f=r(760),h=r(7472);function m(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(m=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}function g(){return(0,u.bytesToHex)(c.schnorr.utils.randomPrivateKey())}function v(e){return(0,u.bytesToHex)(c.schnorr.getPublicKey(e))}function y(){return(y=(0,a.default)(o.default.mark(function e(t){var r,n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,d.store.fetcher.load(t);case 1:return e.next=2,(0,f.pubKeyUrl)(t);case 2:return r=e.sent,e.prev=3,e.next=4,d.store.fetcher.load(r);case 4:return n=d.store.any(t,l.solid("publicKey")),e.abrupt("return",null==n?void 0:n.value);case 5:return e.prev=5,e.catch(3),e.abrupt("return",void 0);case 6:case"end":return e.stop()}},e,null,[[3,5]])}))).apply(this,arguments)}function b(){return(b=(0,a.default)(o.default.mark(function e(t){var r,n,i,a,c,u,m,y,b;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,d.store.fetcher.load(t);case 1:return e.next=2,(0,f.pubKeyUrl)(t);case 2:return r=e.sent,e.next=3,(0,f.privKeyUrl)(t);case 3:return n=e.sent,e.next=4,(0,f.getExistingPublicKey)(t,r);case 4:return i=e.sent,e.next=5,(0,f.getExistingPrivateKey)(t,n);case 5:if(a=e.sent,c=!0,a&&i!==v(a)&&confirm("This is strange the publicKey is not valid for\n"+(null==t?void 0:t.uri)+"'shall we repair keeping the private key ?")&&(c=!1),a&&i&&c){e.next=8;break}if(u=[],m=[],a){e.next=6;break}return a=g(),m=[p.st(t,l.solid("privateKey"),p.literal(a),d.store.sym(n))],e.next=6,x(n,[],m,t.uri);case 6:if(i&&c){e.next=7;break}return u=[],i&&(u=[p.st(t,l.solid("publicKey"),p.lit(i),d.store.sym(r))],s.log("delete invalid publicKey "+u)),y=v(a),m=[p.st(t,l.solid("publicKey"),p.literal(y),d.store.sym(r))],e.next=7,x(r,u,m);case 7:return b=n.substring(0,n.lastIndexOf("/")+1),e.next=8,(0,h.setAcl)(b,(0,h.keyContainerAclBody)(t.uri));case 8:return e.abrupt("return",a);case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}var w=function(){var e=(0,a.default)(o.default.mark(function e(t){var r,n,i;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,d.store.fetcher.load(t);case 1:if(!(r=d.store.any(d.store.sym(t),d.store.sym("http://www.iana.org/assignments/link-relations/acl")))){e.next=6;break}return e.prev=2,e.next=3,d.store.fetcher.webOperation("DELETE",r.value);case 3:n=e.sent,s.log("delete keyAcl"+r.value+" "+n.status),e.next=6;break;case 4:if(e.prev=4,404===(i=e.catch(2)).response.status){e.next=5;break}throw new Error(i);case 5:s.log("delete keyAcl"+r.value+" "+i.response.status);case 6:case"end":return e.stop()}},e,null,[[2,4]])}));return function(t){return e.apply(this,arguments)}}();function x(e,t,r){return _.apply(this,arguments)}function _(){return _=(0,a.default)(function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return o.default.mark(function i(){var a;return o.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=1,w(e);case 1:return i.next=2,d.store.updater.updateMany(t,r);case 2:return a=(0,h.keyAclBody)(e,n),i.next=3,(0,h.setAcl)(e,a);case 3:case"end":return i.stop()}},i)})()}),_.apply(this,arguments)}},3581:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(5108);function i(e,t){const r=t||{namedNode:e=>new n.A(e)};return function(t){return r.namedNode(e+(t||""))}}},3584:(e,t,r)=>{"use strict";r.d(t,{RD:()=>u,tK:()=>l,gE:()=>s});var n=r(7493);var i=r(458),o=r(149);let a;"undefined"!=typeof navigator&&navigator.userAgent?.startsWith?.("Mozilla/5.0 ")||(a="jose/v5.10.0");const s=Symbol();class c{constructor(e,t){if(!(e instanceof URL))throw new TypeError("url must be an instance of URL");var r,n;this._url=new URL(e.href),this._options={agent:t?.agent,headers:t?.headers},this._timeoutDuration="number"==typeof t?.timeoutDuration?t?.timeoutDuration:5e3,this._cooldownDuration="number"==typeof t?.cooldownDuration?t?.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof t?.cacheMaxAge?t?.cacheMaxAge:6e5,void 0!==t?.[s]&&(this._cache=t?.[s],r=t?.[s],n=this._cacheMaxAge,"object"==typeof r&&null!==r&&"uat"in r&&"number"==typeof r.uat&&!(Date.now()-r.uat>=n)&&"jwks"in r&&(0,o.A)(r.jwks)&&Array.isArray(r.jwks.keys)&&Array.prototype.every.call(r.jwks.keys,o.A)&&(this._jwksTimestamp=this._cache.uat,this._local=(0,i.w)(this._cache.jwks)))}coolingDown(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cooldownDuration}fresh(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cacheMaxAge}async getKey(e,t){this._local&&this.fresh()||await this.reload();try{return await this._local(e,t)}catch(r){if(r instanceof n.JWKSNoMatchingKey&&!1===this.coolingDown())return await this.reload(),this._local(e,t);throw r}}async reload(){this._pendingFetch&&("undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&(this._pendingFetch=void 0);const e=new Headers(this._options.headers);a&&!e.has("User-Agent")&&(e.set("User-Agent",a),this._options.headers=Object.fromEntries(e.entries())),this._pendingFetch||(this._pendingFetch=(async(e,t,r)=>{let i,o,a=!1;"function"==typeof AbortController&&(i=new AbortController,o=setTimeout(()=>{a=!0,i.abort()},t));const s=await fetch(e.href,{signal:i?i.signal:void 0,redirect:"manual",headers:r.headers}).catch(e=>{if(a)throw new n.JWKSTimeout;throw e});if(void 0!==o&&clearTimeout(o),200!==s.status)throw new n.JOSEError("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await s.json()}catch{throw new n.JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON")}})(this._url,this._timeoutDuration,this._options).then(e=>{this._local=(0,i.w)(e),this._cache&&(this._cache.uat=Date.now(),this._cache.jwks=e),this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(e=>{throw this._pendingFetch=void 0,e})),await this._pendingFetch}}function u(e,t){const r=new c(e,t),n=async(e,t)=>r.getKey(e,t);return Object.defineProperties(n,{coolingDown:{get:()=>r.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>r.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>r.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>!!r._pendingFetch,enumerable:!0,configurable:!1},jwks:{value:()=>r._local?.jwks(),enumerable:!0,configurable:!1,writable:!1}}),n}const l=s},3672:(e,t,r)=>{"use strict";var n=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.newThingUI=function(e,t,r){var n=e.dom,i=e.div;if(e.me&&!e.me.uri)throw new Error("newThingUI: Invalid userid: "+e.me);var d="padding: 0.7em; width: 2em; height: 2em;",f=i.appendChild(n.createElement("img")),h=!1;f.setAttribute("src",a.icons.iconBase+"noun_34653_green.svg"),f.setAttribute("style",d),f.setAttribute("title","Add another tool");var m=function(e){var t=i.appendChild(n.createElement("pre"));t.setAttribute("style","background-color: pink"),t.appendChild(n.createTextNode(e))};function g(e){for(var t=0;t<y.length;t++){var r=d+e;y[t].disabled&&(r+="opacity: 0.3;"),y[t].setAttribute("style",r)}}function v(e){h=!h,f.setAttribute("style",d+(h?"background-color: yellow;":"")),g(h?"":"display: none;")}f.addEventListener("click",v);var y=[],b=Object.values(r).filter(function(e){return e.mintNew}),w=b.reduce(function(e,t){return t.mintClass&&(e[t.mintClass.uri]=(e[t.mintClass.uri]||0)+1),e},{});b.forEach(function(r){var i=e.div.appendChild(n.createElement("img"));i.setAttribute("src",r.icon);var a=r.mintClass?w[r.mintClass.uri]>1?"".concat(u.label(r.mintClass)," (using ").concat(r.name," pane)"):u.label(r.mintClass):r.name+" @@";i.setAttribute("title","Make new "+a),i.setAttribute("style",d+"display: none;"),y.push(i),i.disabled||i.addEventListener("click",function(f){var h;!function(e){g("display: none;"),e.setAttribute("style",d+"background-color: yellow;")}(i),h={event:f,folder:e.folder||null,iconEle:i,pane:r,noun:a,noIndexHTML:!0,div:e.div,me:e.me,dom:e.dom,refreshTarget:e.refreshTarget},new Promise(function(r,i){var a;function d(r,a){(0,s.ensureLoadedProfile)(e).then(function(e){var s=Object.assign({newBase:a,folder:h.folder||void 0,workspace:r},h);for(var u in h)s[u]=h[u];o.log("newThingUI: Minting new ".concat(s.pane.name," at ").concat(s.newBase)),h.pane.mintNew(t,s).then(function(e){if(!e||!e.newInstance)throw new Error("Cannot mint new - missing newInstance");if(e.folder){var t=e.newInstance.uri.slice(e.folder.uri.length).includes("/");o.log(" new thing is packge? "+t),t?p.add(e.folder,c.ldp("contains"),p.sym(e.newBase),e.folder.doc()):p.add(e.folder,c.ldp("contains"),e.newInstance,e.folder.doc()),e.refreshTarget&&e.refreshTarget.refresh&&e.refreshTarget.refresh()}else{var r=h.div.appendChild(n.createElement("p"));r.setAttribute("style","font-size: 120%;"),r.innerHTML="Your <a target='_blank' href='"+e.newInstance.uri+"'><b>new "+h.noun+"</b></a> is ready to be set up. <br/><br/><a target='_blank' href='"+e.newInstance.uri+"'>Go to your new "+h.noun+".</a>"}v()}).catch(function(e){m(e),i(e)})},function(e){m("Error logging on: "+e)})}var f=h.pane;h.noun=f.mintClass?u.label(f.mintClass):f.name,h.appPathSegment=h.noun.slice(0,1).toUpperCase()+h.noun.slice(1),h.folder?l.askName(n,p,h.div,c.foaf("name"),null,h.noun).then(function(e){if(e){var t=h.folder.uri;t.endsWith("/")||(t+="/"),d(null,t=t+encodeURIComponent(e)+"/")}else v()}):(a=(0,s.selectWorkspace)(n,{noun:h.noun,appPathSegment:h.appPathSegment},d),h.div.appendChild(a))})})})};var i=r(3451),o=d(r(2902)),a=r(4901),s=r(7822),c=d(r(2054)),u=d(r(7499)),l=d(r(1939));function d(e,t){if("function"==typeof WeakMap)var r=new WeakMap,i=new WeakMap;return(d=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return s;if(o=t?i:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var p=i.solidLogicSingleton.store},3693:(e,t,r)=>{var n=r(7736);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},3696:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.renderAutoComplete=function(e,t,r,n){return y.apply(this,arguments)},t.setVisible=v;var o=n(r(4756)),a=n(r(9293)),s=h(r(2902)),c=h(r(5148)),u=n(r(471)),l=h(r(1939)),d=r(3451),p=r(1552),f=r(7532);function h(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(h=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}function m(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 g(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)?g(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 g(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 v(e,t){e.style.display=t?"":"none"}function y(){return y=(0,a.default)(o.default.mark(function e(t,r,n,i){var h,g,y,b,w,x,_,E,S,A,k,C,T,I,F,P,N,O,R,j,L,D,U,M,B,H,q,W,V,K,J,z,$,G;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(O=function(){r.currentObject?(z.value=r.currentName?r.currentName.value:"??? wot no name for "+r.currentObject,q=r.currentName,M=r.currentName?r.currentName.value:void 0,W=r.currentObject):(z.value="",M=void 0,W=void 0),n.deleteButton&&v(n.deleteButton,!!r.currentObject),n.acceptButton&&v(n.acceptButton,!1),n.editButton&&v(n.editButton,!0),n.cancelButton&&v(n.cancelButton,!1),D=!1,A()},N=function(){return N=(0,a.default)(o.default.mark(function e(){var r,n,i,u,l,d,h,g,v;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=function(e,t){return t.name.value>e.name.value?1:t.name.name<e.name.value?-1:0},r=function(e){var r=t.createElement("tr");c.setStyle(r,"autocompleteRowStyle"),r.setAttribute("style","padding: 0.3em;"),r.style.color=U?"#080":"#088",r.textContent=e.name.value;var n=(0,p.bindingToTerm)(e.subject),i=(0,p.bindingToTerm)(e.name);return r.addEventListener("click",function(){var e=(0,a.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:s.log(" click row textContent: "+r.textContent),s.log(" click name: "+i.value),n&&i&&y(n,i);case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),r},!D){e.next=1;break}return s.log('Ignoring "'.concat(z.value,'" because of lock ')),e.abrupt("return");case 1:return s.log('Setting lock at "'.concat(z.value,'"')),D=!0,e.next=2,(0,f.getPreferredLanguages)();case 2:if(i=e.sent,!((u=z.value.trim().toLowerCase()).length<4)){e.next=3;break}A(),B=20,e.next=6;break;case 3:if(U&&M&&u.startsWith(M)){e.next=5;break}return s.log(' Querying database at "'.concat(u,'" cf last "').concat(M,'".')),e.next=4,T(u,i);case 4:j=e.sent;case 5:l=F(u,j),L&&l.length<=40&&(B=l.length),U=L&&l.length<=B,s.log(' Filter:"'.concat(u,'" lastBindings: ').concat(j.length,", slimmed to ").concat(l.length,"; rows: ").concat(B,", Enough? ").concat(L,", All displayed? ").concat(U)),(d=l.slice(0,B)).sort(n),A(),h=m(d);try{for(h.s();!(g=h.n()).done;)v=g.value,V.appendChild(r(v))}catch(e){h.e(e)}finally{h.f()}1===l.length&&y((0,p.bindingToTerm)(l[0].subject),(0,p.bindingToTerm)(l[0].name));case 6:D=!1;case 7:case"end":return e.stop()}},e)})),N.apply(this,arguments)},P=function(){return N.apply(this,arguments)},F=function(e,t){return t.filter(function(t){return S(e,t.name.value)})},I=function(){return(I=(0,a.default)(o.default.mark(function e(t,n){var i,a,s;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,(0,p.queryPublicDataByName)(t,R,n||f.defaultPreferredLanguages,r.queryParams);case 1:i=e.sent,e.next=3;break;case 2:return e.prev=2,s=e.catch(0),h("Error querying db of organizations: "+s),D=!1,e.abrupt("return");case 3:return L=i.length<p.AUTOCOMPLETE_LIMIT,M=L?t:void 0,A(),a=(0,f.filterByLanguage)(i,n),e.abrupt("return",a);case 4:case"end":return e.stop()}},e,null,[[0,2]])}))).apply(this,arguments)},T=function(e,t){return I.apply(this,arguments)},C=function(){return(C=(0,a.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:v(n.cancelButton,!0),P();case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)},k=function(e){return C.apply(this,arguments)},A=function(){for(;V.children.length>1;)V.removeChild(V.lastChild)},S=function(e,t){for(var r=e.split(" "),n=0;n<r.length;n++){var i=r[n];if(t.toLowerCase().indexOf(i)<0)return!1}return!0},E=function(){return(E=(0,a.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:s.log("Auto complete: Canceled by user! "),r.permanent?O():H.parentNode&&H.parentNode.removeChild(H);case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)},_=function(e){return E.apply(this,arguments)},x=function(){return(x=(0,a.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:q&&z.value===q.value&&g(W,q);case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)},w=function(e){return x.apply(this,arguments)},b=function(){return(b=(0,a.default)(o.default.mark(function e(t,r){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.acceptButton){e.next=1;break}return n.acceptButton.disbaled=!1,v(n.acceptButton,!0),z.value=r.value,q=r,W=t,s.log("Auto complete: name: "+r),s.log("Auto complete: waiting for accept "+t),A(),e.abrupt("return");case 1:v(n.cancelButton,!0),g(t,r);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)},y=function(e,t){return b.apply(this,arguments)},g=function(e,t){s.log("Auto complete: finish! "+e),"Literal"===e.termType&&r.queryParams.objectURIBase&&(e=d.store.sym(r.queryParams.objectURIBase.value+e.value)),A(),i(e,t)},h=function(e){var r=V.appendChild(t.createElement("tr"));s.log(e);var n=new Error(e);r.appendChild(l.errorMessageBlock(t,n,"pink")),c.setStyle(r,"autocompleteRowStyle"),r.style.padding="1em"},R=r.targetClass){e.next=1;break}throw new Error("renderAutoComplete: missing targetClass");case 1:return n.acceptButton&&n.acceptButton.addEventListener("click",w,!1),n.cancelButton&&n.cancelButton.addEventListener("click",_,!1),L=!1,D=!1,U=!1,M=void 0,B=20,H=t.createElement("div"),q=void 0,W=void 0,(V=H.appendChild(t.createElement("table"))).setAttribute("data-testid","autocomplete-table"),V.setAttribute("style","max-width: 30em; margin: 0.5em;"),K=V.appendChild(t.createElement("tr")),c.setStyle(K,"autocompleteRowStyle"),J=K.appendChild(t.createElement("td")),(z=J.appendChild(t.createElement("input"))).setAttribute("type","text"),O(),$=r.size||u.default.textInputSize||20,z.setAttribute("size",$),z.setAttribute("data-testid","autocomplete-input"),G=c.textInputStyle||"border: 0.1em solid #444; border-radius: 0.5em; width: 100%; font-size: 100%; padding: 0.1em 0.6em",z.setAttribute("style",G),z.addEventListener("keyup",function(e){13===e.keyCode&&w(e)},!1),z.addEventListener("input",k),e.abrupt("return",H);case 2:case"end":return e.stop()}},e)})),y.apply(this,arguments)}},3738: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},3749:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.createControllerInfoBlock=h,t.initFooter=function(e,t){return p.apply(this,arguments)},t.rebuildFooter=f;var o=n(r(4756)),a=n(r(9293)),s=r(3451),c=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var r,n,o={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return o;if(r=t){if(r.has(e))return r.get(e);r.set(e,o)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(n.get||n.set)?r(o,a,n):o[a]=e[a]);return o}(e)}(r(5148)),u=r(4135),l="https://solidproject.org",d="solidproject.org";function p(){return(p=(0,a.default)(o.default.mark(function e(t,r){var n,i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=document.getElementById("PageFooter")){e.next=1;break}return e.abrupt("return");case 1:return i=(0,u.getPod)(),e.next=2,(0,u.getPodOwner)(i,t);case 2:a=e.sent,f(n,t,i,a,r)(),s.authSession.events.on("login",f(n,t,i,a,r)),s.authSession.events.on("logout",f(n,t,i,a,r));case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function f(e,t,r,n,i){return(0,a.default)(o.default.mark(function a(){var c,u;return o.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return c=s.authn.currentUser(),e.innerHTML="",u=e,o.next=1,h(t,c,r,n,i);case 1:u.appendChild.call(u,o.sent);case 2:case"end":return o.stop()}},a)}))}function h(e,t,r,n,i){var o=document.createElement("div");if(!r||!n||t&&t.equals(n))return o;o.setAttribute("style",c.footer);var a=document.createElement("span");a.innerText="You're visiting ";var s=document.createElement("a");s.href=r.uri,s.innerText="the Pod";var p=document.createElement("span");p.innerText=" controlled by ";var f=document.createElement("a");f.href=n.uri,f.innerText=(0,u.getName)(e,n);var h=document.createElement("span");h.innerText=". For more info, check out ";var m=document.createElement("a");m.href=i&&i.solidProjectUrl?i.solidProjectUrl:l,m.innerText=i&&i.solidProjectName?i.solidProjectName:d;var g=document.createElement("span");return g.innerText=".",o.appendChild(a),o.appendChild(s),o.appendChild(p),o.appendChild(f),o.appendChild(h),o.appendChild(m),o.appendChild(g),o}},3779:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);t.default={randomUUID:r}},3909:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.findBookmarkDocument=function(e){return A.apply(this,arguments)},t.renderBookmarksButton=function(e,t){return F.apply(this,arguments)},t.toggleBookmark=T;var o=n(r(4756)),a=n(r(9293)),s=y(r(2902)),c=r(4901),u=r(8406),l=y(r(2054)),d=y(r(1712)),p=y(r(2209)),f=y(r(5148)),h=y(r(7499)),m=y(r(1939)),g=r(3451),v=r(7822);function y(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(y=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var b={icons:c.icons,ns:l,media:u.media,pad:d,rdf:p,style:f,utils:h,widgets:m},w=b.rdf,x=w.Namespace("http://www.w3.org/2002/01/bookmark#"),_=h.label,E=window.document||null;function S(e,t){return new Promise(function(r,n){g.store.updater.update(e,t,function(e,t,i){t?r():n(new Error(i))})})}function A(){return(A=(0,a.default)(o.default.mark(function e(t){var r,n,i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=x("Bookmark"),n="bookmarks.ttl",e.next=1,(0,v.findAppInstances)(t,r,!0);case 1:if(!(t.instances&&t.instances.length>0)){e.next=2;break}t.bookmarkDocument=t.instances[0],t.instances.length>1&&s.warn("More than one bookmark file! "+t.instances),e.next=9;break;case 2:if(!t.publicProfile){e.next=8;break}return i=w.sym(t.publicProfile.dir().uri+n),e.prev=3,s.log("Creating new bookmark file "+i),e.next=4,g.store.fetcher.createIfNotExists(i);case 4:e.next=6;break;case 5:return e.prev=5,a=e.catch(3),s.warn("Can't make fresh bookmark file:"+a),e.abrupt("return",t);case 6:return e.next=7,(0,g.registerInTypeIndex)(i,t.index,r);case 7:t.bookmarkDocument=i,e.next=9;break;case 8:s.warn("You seem to have no bookmark file, nor even a profile file!");case 9:return e.abrupt("return",t);case 10:case"end":return e.stop()}},e,null,[[3,5]])}))).apply(this,arguments)}function k(e,t){return C.apply(this,arguments)}function C(){return(C=(0,a.default)(o.default.mark(function e(t,r){var n,i,a,c,u,d,p,f;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n="",i=g.authn.currentUser()){e.next=1;break}throw new Error("Must be logged on to add Bookmark");case 1:return a=g.store.any(r,l.foaf("maker")),n=_(a)+": "+g.store.anyValue(r,l.sioc("content")).slice(0,80),c=t.bookmarkDocument,u=b.widgets.newThing(c,n),d=[w.st(c,b.ns.dct("references"),u,c),w.st(u,b.ns.rdf("type"),x("Bookmark"),c),w.st(u,b.ns.dct("created"),new Date,c),w.st(u,x("recalls"),r,c),w.st(u,b.ns.foaf("maker"),i,c),w.st(u,b.ns.dct("title"),n,c)],e.prev=2,e.next=3,S([],d);case 3:e.next=5;break;case 4:return e.prev=4,f=e.catch(2),p="Making bookmark: "+f,s.warn(p),e.abrupt("return",null);case 5:return e.abrupt("return",u);case 6:case"end":return e.stop()}},e,null,[[2,4]])}))).apply(this,arguments)}function T(e,t,r){return I.apply(this,arguments)}function I(){return(I=(0,a.default)(o.default.mark(function e(t,r,n){var i,a,c,u;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,g.store.fetcher.load(t.bookmarkDocument);case 1:if(!(i=g.store.each(null,x("recalls"),r,t.bookmarkDocument)).length){e.next=9;break}if(confirm("Delete bookmark on this?"+i.length)){e.next=2;break}return e.abrupt("return");case 2:a=0;case 3:if(!(a<i.length)){e.next=8;break}return e.prev=4,e.next=5,S(g.store.connectedStatements(i[a]),[]);case 5:n.style.backgroundColor="white",s.log("Bookmark deleted: "+i[a]),e.next=7;break;case 6:e.prev=6,u=e.catch(4),s.error("Cant delete bookmark:"+u),s.warn("Cannot delete bookmark:"+u);case 7:a++,e.next=3;break;case 8:e.next=11;break;case 9:return e.next=10,k(t,r);case 10:c=e.sent,n.style.backgroundColor="yellow",s.log("Bookmark added: "+c);case 11:case"end":return e.stop()}},e,null,[[4,6]])}))).apply(this,arguments)}function F(){return F=(0,a.default)(o.default.mark(function e(t,r){var n,i,s;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=function(){return i=(0,a.default)(o.default.mark(function e(r){var n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,g.store.fetcher.load(t.bookmarkDocument);case 1:n=g.store.any(null,x("recalls"),r.target,t.bookmarkDocument),r.style=b.style.buttonStyle,n&&(r.style.backgroundColor="yellow");case 2:case"end":return e.stop()}},e)})),i.apply(this,arguments)},n=function(e){return i.apply(this,arguments)},!t.bookmarkDocument){e.next=2;break}return(s=b.widgets.button(E,b.icons.iconBase+"noun_45961.svg",_(x("Bookmark")),function(){T(t,r,s)})).target=r,e.next=1,n(s);case 1:return e.abrupt("return",s);case 2:case"end":return e.stop()}},e)})),F.apply(this,arguments)}},3957:(e,t,r)=>{"use strict";var n=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.makeDraggable=function(e,t){e.setAttribute("draggable","true"),e.addEventListener("dragstart",function(r){e.style.fontWeight="bold",r.dataTransfer.setData("text/uri-list",t.uri),r.dataTransfer.setData("text/plain",t.uri),r.dataTransfer.setData("text/html",e.outerHTML),i.log("Dragstart: "+e+" -> "+t+"de: "+r.dataTransfer.dropEffect)},!1),e.addEventListener("drag",function(e){e.preventDefault(),e.stopPropagation()},!1),e.addEventListener("dragend",function(r){e.style.fontWeight="normal",i.log("Dragend dropeffect: "+r.dataTransfer.dropEffect),i.log("Dragend: "+e+" -> "+t)},!1)},t.makeDropTarget=function(e,t,r){var n=function(e){e.preventDefault(),e.dataTransfer.dropEffect="copy"},o=function(e){i.log("dragenter event dropEffect: "+e.dataTransfer.dropEffect),this.localStyle&&(this.savedStyle||(this.savedStyle=a.dragEvent)),e.dataTransfer.dropEffect="link",i.log("dragenter event dropEffect 2: "+e.dataTransfer.dropEffect)},s=function(e){i.log("dragleave event dropEffect: "+e.dataTransfer.dropEffect),this.savedStyle?this.localStyle=this.savedStyle:this.localStyle=a.dropEvent},c=function(e){e.preventDefault&&e.preventDefault(),i.log("Drop event. dropEffect: "+e.dataTransfer.dropEffect),i.log("Drop event. types: "+(e.dataTransfer.types?e.dataTransfer.types.join(", "):"NOPE"));var n,o=null;if(e.dataTransfer.types){for(var s=0;s<e.dataTransfer.types.length;s++){var c=e.dataTransfer.types[s];if("text/uri-list"===c)o=e.dataTransfer.getData(c).split("\n"),i.log("Dropped text/uri-list: "+o);else if("text/plain"===c)n=e.dataTransfer.getData(c);else if("Files"===c&&r){for(var u=e.dataTransfer.files,l=0;u[l];l++){var d=u[l];i.log("Filename: "+d.name+", type: "+(d.type||"n/a")+" size: "+d.size+" bytes, last modified: "+(d.lastModifiedDate?d.lastModifiedDate.toLocaleDateString():"n/a"))}r(u)}}null===o&&n&&"http"===n.slice(0,4)&&(o=n,i.log("Waring: Poor man's drop: using text for URI"))}else o=[e.dataTransfer.getData("Text")],i.log("WARNING non-standard drop event: "+o[0]);return i.log("Dropped URI list (2): "+o),o&&t(o),this.localStyle=a.restoreStyle,!1};!function(e){e||i.log("@@@ addTargetListeners: ele "+e),e.addEventListener("dragover",n),e.addEventListener("dragenter",o),e.addEventListener("dragleave",s),e.addEventListener("drop",c)}(e)},t.uploadFiles=function(e,t,r,n,a){for(var s=0;t[s];s++){var c=t[s];i.log(" dropped: Filename: "+c.name+", type: "+(c.type||"n/a")+" size: "+c.size+" bytes, last modified: "+(c.lastModifiedDate?c.lastModifiedDate.toLocaleDateString():"n/a"));var u=new FileReader;u.onload=function(t){return function(s){var c=s.target.result,u="";i.log(" File read byteLength : "+c.byteLength);var l=t.type;if(t.type&&""!==t.type){var d=o.extension(t.type);d&&"false"!==d&&!t.name.endsWith("."+d)&&t.type!==o.lookup(t.name)&&(u="_."+d)}else if(!(l=o.lookup(t.name))){var p="Filename needs to have an extension which gives a type we know: "+t.name;throw i.log(p),alert(p),new Error(p)}var f=t.type.startsWith("image/")&&n||r,h=f+(f.endsWith("/")?"":"/")+encodeURIComponent(t.name)+u;e.webOperation("PUT",h,{data:c,contentType:l}).then(function(e){i.log(" Upload: put OK: "+h),a(t,h)},function(e){var t=" Upload: FAIL "+h+", Error: "+e;throw i.log(t),alert(t),new Error(t)})}}(c),u.readAsArrayBuffer(c)}};var i=s(r(2902)),o=s(r(6049)),a=s(r(5148));function s(e,t){if("function"==typeof WeakMap)var r=new WeakMap,i=new WeakMap;return(s=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return s;if(o=t?i:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}},4011:(e,t,r)=>{"use strict";r.r(t),r.d(t,{DOMParserFactory:()=>d,RDFArrayRemove:()=>b,callbackify:()=>l,domToString:()=>p,dtstamp:()=>h,dumpNode:()=>f,heavyCompare:()=>m,heavyCompareSPO:()=>g,linkRelationProperty:()=>u,log:()=>n.A,mediaTypeClass:()=>c,output:()=>v,parseXML:()=>y,stackString:()=>x,string:()=>s,string_startswith:()=>w,uri:()=>i});var n=r(4940),i=r(2727),o=r(5108),a=r(8978);e=r.hmd(e);const s={template:function(e,t){for(var r=e.split("%s"),n="",i=0;i<t.length;i++)t[i]+="",n+=r[i]+t[i];return n+r.slice(t.length).join()}};function c(e){return e=e.split(";")[0].trim(),new o.A("http://www.w3.org/ns/iana/media-types/"+e+"#Resource")}function u(e){return new o.A("http://www.w3.org/ns/iana/link-relations/relation#"+e.trim())}function l(e,t){e.callbacks={};for(var r=t.length-1;r>=0;r--)e.callbacks[t[r]]=[];e.addHook=function(t){e.callbacks[t]||(e.callbacks[t]=[])},e.addCallback=function(t,r){e.callbacks[t].push(r)},e.removeCallback=function(t,r){for(var n=0;n<e.callbacks[t].length;n++)if(e.callbacks[t][n].name===r)return e.callbacks[t].splice(n,1),!0;return!1},e.insertCallback=function(t,r){e.callbacks[t].unshift(r)},e.fireCallbacks=function(t,r){var n,i=[],o=[],a=e.callbacks[t].length;let s;for(n=a-1;n>=0;n--)s=e.callbacks[t][n],s&&s.apply(e,r)&&i.push(s);for(n=i.length-1;n>=0;n--)o.push(i[n]);for(n=a;n<e.callbacks[t].length;n++)o.push(e.callbacks[t][n]);e.callbacks[t]=o}}function d(){return window.DOMParser?new a.DOMParser:!!window.ActiveXObject&&new ActiveXObject("Microsoft.XMLDOM")}function p(e,t){var r=[];(t=t||{})&&t.selfClosing&&t.selfClosing.split(" ").forEach(function(e){r[e]=!0});var n=[];return t&&t.skipAttributes&&t.skipAttributes.split(" ").forEach(function(e){n[e]=!0}),f(e,t,r,n)}function f(e,t,r,n){var i,o="",a=[!1];if(void 0===e.nodeType)return o;if(1===e.nodeType){if(e.hasAttribute("class")&&t&&t.classWithChildText&&e.matches(t.classWithChildText.class))o+=e.querySelector(t.classWithChildText.element).textContent;else if(!(t&&t.skipNodeWithClass&&e.matches("."+t.skipNodeWithClass))){var s=e.nodeName.toLowerCase();o+="<"+s;var c=[];for(i=e.attributes.length-1;i>=0;i--){var u=e.attributes[i];if(!(n&&n.length>0&&n[u.name]||/^\d+$/.test(u.name))){if("class"===u.name&&t&&t.replaceClassItemWith&&u.value.split(" ").indexOf(t.replaceClassItemWith.source)>-1){var l=new RegExp(t.replaceClassItemWith.source,"g");u.value=u.value.replace(l,t.replaceClassItemWith.target).trim()}"class"===u.name&&t&&t.skipClassWithValue&&t.skipClassWithValue===u.value||c.push(u.name+"='"+u.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&quot;")+"'")}}if(c.length>0&&(t&&t.sortAttributes&&c.sort(function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}),o+=" "+c.join(" ")),r&&r.ename)o+=" />";else{for(o+=">",o+="html"===s?"\n ":"",a.push("style"===s||"script"===s),i=0;i<e.childNodes.length;i++)o+=f(e.childNodes[i]);a.pop(),o+="body"===s?"</"+s+">\n":"</"+s+">"}}}else if(8===e.nodeType)o+="\x3c!--"+e.nodeValue+"--\x3e";else if(3===e.nodeType||4===e.nodeType){var d=e.nodeValue.replace(/\n+$/,"");o+=a[a.length-1]?d:d.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}else console.log("Warning; Cannot handle serialising nodes of type: "+e.nodeType),console.log(e);return o}function h(){var e=new Date,t=e.getYear()+1900,r=e.getMonth()+1,n=e.getDate(),i=e.getUTCHours(),o=e.getUTCMinutes(),a=e.getSeconds();return r<10&&(r="0"+r),n<10&&(n="0"+n),i<10&&(i="0"+i),o<10&&(o="0"+o),a<10&&(a="0"+a),t+"-"+r+"-"+n+"T"+i+":"+o+":"+a+"Z"}function m(e,t,r,n){var i=function(e){return"BlankNode"===e.termType?null:e},o=function(e){var t=r.statementsMatching(e).map(function(e){return i(e.subject)+" "+i(e.predicate)+" "+i(e.object)}).concat(r.statementsMatching(void 0,void 0,e).map(function(e){return i(e.subject)+" "+i(e.predicate)+" "+i(e.object)}));return t.sort(),t.join("\n")};const a=Object.prototype.hasOwnProperty.call(r,"compareTerms")?r.compareTerms(e,t):e.compareTerm(t);return"BlankNode"===e.termType&&"BlankNode"===t.termType?0===a?0:o(e)>o(t)?1:o(e)<o(t)?-1:a:n&&e.uri&&t.uri?(n[e.uri]||e.uri).localeCompare(n[t.uri]||t.uri):a}function g(e,t,r,n){return m(e.subject,t.subject,r,n)||m(e.predicate,t.predicate,r,n)||m(e.object,t.object,r,n)}function v(e){var t=document.createElement("div");t.textContent=e,document.body.appendChild(t)}function y(t,r){return r=r||{},e&&e.exports?(new a.DOMParser).parseFromString(t,r.contentType||"application/xhtml+xml"):("undefined"!=typeof window&&window.DOMParser?new window.DOMParser:new a.DOMParser).parseFromString(t,"application/xml")}function b(e,t){for(var r=0;r<e.length;r++)if(e[r].subject.equals(t.subject)&&e[r].predicate.equals(t.predicate)&&e[r].object.equals(t.object)&&e[r].why.equals(t.why))return void e.splice(r,1);throw new Error("RDFArrayRemove: Array did not contain "+t+" "+t.why)}function w(e,t){return e.slice(0,t.length)===t}function x(e){var t=e+"\n";if(!e.stack)return t+"No stack available.\n";for(var r=e.stack.toString().split("\n"),n=[],i=0;i<r.length;i++){var o=r[i];if(o.indexOf("ecmaunit.js")>-1)break;"("==o.charAt(0)&&(o="function"+o);var a=o.split("@");n.push(a)}for(i=0;i<n.length;i++)t+=" "+n[i][1]+"\n "+n[i][0];return t}},4044:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.manageParticipation=function(e,t,r,n,i,o){var a=e.createElement("table");t.appendChild(a),y(e,a,0,n,0,o);try{b(n,r,a)}catch(r){t.appendChild((0,u.errorMessageBlock)(e,"Error recording your participation: "+r))}return a},t.participationObject=function(e,t,r){return new Promise(function(n,i){if(!r)throw new Error("No user id");var o=v.each(e,c.wf("participation")).filter(function(e){return v.holds(e,c.wf("participant"),r)});if(o.length>1){var l,p=[],f=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return g(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)?g(e,t):void 0}}(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}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 i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(o);try{for(f.s();!(l=f.n()).done;){var h=l.value,m=v.anyValue(h,c.cal("dtstart"));m&&p.push([m,h])}}catch(e){f.e(e)}finally{f.f()}p.sort(),a.warn("Multiple participation objects, picking earliest, in "+t),n(p[0][1])}if(o.length)n(o[0]);else{var y=(0,u.newThing)(t),b=[(0,s.st)(e,c.wf("participation"),y,t),(0,s.st)(y,c.wf("participant"),r,t),(0,s.st)(y,c.cal("dtstart"),new Date,t),(0,s.st)(y,c.ui("backgroundColor"),(0,d.lightColorHash)(r),t)];v.updater.update([],b,function(e,t,r){t?n(y):i(new Error("Error recording your participation: "+r))}),n(y)}})},t.recordParticipation=b,t.renderParticipants=y,n(r(4579)),n(r(7383)),n(r(8452)),n(r(3072)),n(r(9511)),n(r(1837)),n(r(3693));var o=m(r(2902)),a=o,s=r(2209),c=m(r(2054)),u=r(1939),l=r(7499),d=r(1712),p=m(r(5148)),f=n(r(471)),h=r(3451);function m(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(m=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}function g(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}var v=h.solidLogicSingleton.store;function y(e,t,r,n,i,a){t.setAttribute("style",p.participantsStyle);var s=function(r){var n,i=v.any(r,c.wf("participant"));if(!i)return(n=e.createElement("tr")).textContent="???",n;var o=v.anyValue(r,c.ui("backgroundColor"))||f.default.participationDefaultBackground,s=e.createElement("div");s.setAttribute("style",p.participantsBlock),s.style.backgroundColor=o,n=(0,u.personTR)(e,null,i,a),t.appendChild(n);var l=e.createElement("td");return l.setAttribute("style",p.personTableTD),l.appendChild(s),n.insertBefore(l,n.firstChild),n},d=function(){var e=v.each(n,c.wf("participation")).map(function(e){return(0,o.log)("in participants"),[v.anyValue(e,c.cal("dtstart"))||"9999-12-31",e]});e.sort();var r=e.map(function(e){return e[1]});(0,l.syncTableToArray)(t,r,s)};return t.refresh=d,d(),t}function b(e,t,r){var n=h.authn.currentUser();if(n){var i=v.each(e,c.wf("participation")).filter(function(e){return v.holds(e,c.wf("participant"),n)});if(i.length>1)throw new Error("Multiple records of your participation");if(i.length)return i[0];if(!v.updater.editable(t))return a.log("Not recording participation, as no write access as "+n+" to "+t),null;var o=(0,u.newThing)(t),l=[(0,s.st)(e,c.wf("participation"),o,t),(0,s.st)(o,c.wf("participant"),n,t),(0,s.st)(o,c.cal("dtstart"),new Date,t),(0,s.st)(o,c.ui("backgroundColor"),(0,d.lightColorHash)(n),t)];return v.updater.update([],l,function(e,t,n){if(!t)throw new Error("Error recording your participation: "+n);r&&r.refresh&&r.refresh()}),o}}},4122:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.ACLControlBox5=function(e,t,r,n){var i=t.dom,o=e.doc(),a=i.createElement("div");a.setAttribute("style",d.aclControlBoxContainer);var s=a.appendChild(i.createElement("h1"));s.textContent="Sharing for ".concat(r," ").concat(c.label(e)),s.setAttribute("style",d.aclControlBoxHeader);var u=a.appendChild(i.createElement("div"));u.setAttribute("style",d.aclControlBoxStatus);try{(function(e,t,r,n,i,o,a){return y.apply(this,arguments)})(o,n,e,r,t,i,u).then(function(e){return a.appendChild(e.render())})}catch(e){u.innerText=e}return a},t.handleDrop=v,t.preventBrowserDropEvents=function(e){if((0,p.log)("preventBrowserDropEvents called."),void 0!==h){if(h[m])return;h[m]=!0}e.addEventListener("drop",v,!1),e.addEventListener("dragenter",g,!1),e.addEventListener("dragover",g,!1)},t.preventDrag=g,t.setGlobalWindow=function(e){h=e},t.shortNameForFolder=function(e){var t=e.uri;"/"===t.slice(-1)&&(t=t.slice(0,-1));var r=t.lastIndexOf("/");return r>=0&&(t=t.slice(r+1)),t||"/"};var o=n(r(4756)),a=n(r(9293)),s=f(r(2054)),c=f(r(7499)),u=r(9922),l=r(979),d=f(r(5148)),p=r(2902);function f(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(f=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var h=window,m=Symbol("prevent double triggering of drop event");function g(e){e.stopPropagation(),e.preventDefault()}function v(e){e.dataTransfer.files.length>0&&(h.confirm("Are you sure you want to drop this file here? (Cancel opens it in a new tab)")||(e.stopPropagation(),e.preventDefault(),(0,p.log)("@@@@ document-level DROP suppressed: "+e.dataTransfer.dropEffect)))}function y(){return y=(0,a.default)(o.default.mark(function e(t,r,n,i,s,c,d){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,f){return(0,u.getACLorDefault)(t,function(){var t=(0,a.default)(o.default.mark(function t(a,h,m,g,v,y){var _,E,S,A,k;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(A=function(e){return new l.AccessController(n,i,s,d,E,m,g,v,y,e,r,c)},a){t.next=1;break}return t.abrupt("return",f(new Error("Error reading ".concat(h?"":" default ","ACL. status ").concat(m,": ").concat(g))));case 1:if(_=b(m),(E=w(m,g,r)||x(m))||!_){t.next=5;break}return t.prev=2,t.next=3,(0,u.getProspectiveHolder)(_);case 3:return S=t.sent,t.abrupt("return",e(A(S)));case 4:t.prev=4,k=t.catch(2),(0,p.warn)(k);case 5:return t.abrupt("return",e(A()));case 6:case"end":return t.stop()}},t,null,[[2,4]])}));return function(e,r,n,i,o,a){return t.apply(this,arguments)}}())}));case 1:case"end":return e.stop()}},e)})),y.apply(this,arguments)}function b(e){var t=e.uri.split("#")[0],r=t.slice(0,-1).lastIndexOf("/"),n=t.indexOf("//");return n>=0&&r<n+2||r<0?null:t.slice(0,r+1)}function w(e,t,r){return r.holds(e,s.rdf("type"),s.space("Storage"),t)}function x(e){return e.uri===e.site().uri}},4135:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.getName=function(e,t){return e.anyValue(t,s.ns.vcard("fn"),null,t.doc())||e.anyValue(t,s.ns.foaf("name"),null,t.doc())||t.uri},t.getPod=function(){return(0,a.sym)(document.location.origin).site()},t.getPodOwner=function(e,t){return c.apply(this,arguments)},t.throttle=function(e,t){var r,n,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=null,s=0,c=function(){s=o.leading?Date.now():0,a=null,i=e.apply(r,n),a||(r=n=null)};return function(){var u=Date.now();s||o.leading||(s=u);var l=t-(u-s);return r=this,n=arguments,l<=0||l>t?(a&&(clearTimeout(a),a=null),s=u,i=e.apply(r,n),a||(r=n=null)):a||!1===o.trailing||(a=setTimeout(c,l)),i}};var i=n(r(4756)),o=n(r(9293)),a=r(2209),s=r(2361);function c(){return(c=(0,o.default)(i.default.mark(function e(t,r){var n,o,c,u,l;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,r.any(t,null,s.ns.ldp("Container"),t)){e.next=2;break}return e.next=1,r.fetcher.webOperation("GET",t.uri,r.fetcher.initFetchOptions(t.uri,{headers:{accept:"text/turtle"}}));case 1:n=e.sent,o=n.responseText,(0,a.parse)(o,r,t.uri,"text/turtle");case 2:e.next=4;break;case 3:return e.prev=3,l=e.catch(0),console.error("Error loading pod "+t+": "+l),e.abrupt("return",null);case 4:if(r.holds(t,s.ns.rdf("type"),s.ns.space("Storage"),t)){e.next=5;break}return console.warn("Pod "+t+" does not declare itself as a space:Storage"),e.abrupt("return",null);case 5:if(!(c=r.any(t,s.ns.solid("owner"),null,t)||r.any(null,s.ns.space("storage"),t,t))){e.next=10;break}return e.prev=6,e.next=7,r.fetcher.load(c.doc());case 7:e.next=9;break;case 8:return e.prev=8,e.catch(6),console.warn("Unable to load profile of pod owner "+c),e.abrupt("return",null);case 9:return r.holds(c,s.ns.space("storage"),t,c.doc())||console.warn("Pod owner ".concat(c," does NOT list pod ").concat(t," as their storage")),e.abrupt("return",c);case 10:return u=(0,a.sym)("".concat(t.uri,"profile/card#me")),e.prev=11,e.next=12,r.fetcher.load(u);case 12:e.next=14;break;case 13:return e.prev=13,e.catch(11),console.error("Ooops. Guessed wrong pod owner webid {$guess} : can't load it."),e.abrupt("return",null);case 14:if(!r.holds(u,s.ns.space("storage"),t,u.doc())){e.next=15;break}return console.warn("Using guessed pod owner webid but it links back."),e.abrupt("return",u);case 15:return e.abrupt("return",null);case 16:case"end":return e.stop()}},e,null,[[0,3],[6,8],[11,13]])}))).apply(this,arguments)}},4208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authSession=void 0;var n=r(2452);t.authSession=new n.Session},4275:(e,t,r)=>{"use strict";r.d(t,{U:()=>i});var n=r(5108);const i="chrome:theSession";new n.A(i)},4299:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV7State=void 0;const n=r(2291),i=r(6011),o={};function a(e,t,r){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++),e}function s(e,t,r,n,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(n){if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`)}else n=new Uint8Array(16),i=0;return t??=Date.now(),r??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],n[i++]=t/1099511627776&255,n[i++]=t/4294967296&255,n[i++]=t/16777216&255,n[i++]=t/65536&255,n[i++]=t/256&255,n[i++]=255&t,n[i++]=112|r>>>28&15,n[i++]=r>>>20&255,n[i++]=128|r>>>14&63,n[i++]=r>>>6&255,n[i++]=r<<2&255|3&e[10],n[i++]=e[11],n[i++]=e[12],n[i++]=e[13],n[i++]=e[14],n[i++]=e[15],n}t.updateV7State=a,t.default=function(e,t,r){let c;if(e)c=s(e.random??e.rng?.()??(0,n.default)(),e.msecs,e.seq,t,r);else{const e=Date.now(),i=(0,n.default)();a(o,e,i),c=s(i,o.msecs,o.seq,t,r)}return t??(0,i.unsafeStringify)(c)}},4373:e=>{e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4426:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.desktopNotification=y,t.infiniteMessageArea=function(e,t,r,n){return x.apply(this,arguments)},t.insertMessageIntoTable=b;var o=n(r(4756)),a=n(r(9293)),s=m(r(2209)),c=r(3451),u=m(r(2902)),l=r(4901),d=m(r(2054)),p=m(r(1939)),f=r(6472),h=r(1255);function m(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(m=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}function g(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 v(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)?v(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 v(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 y(e){"Notification"in window?"granted"===Notification.permission?new Notification(e):"denied"!==Notification.permission&&Notification.requestPermission().then(function(t){"granted"===t&&new Notification(e)}):u.warn("This browser does no t support desktop notification")}function b(e,t,r,n,i,o){return w.apply(this,arguments)}function w(){return(w=(0,a.default)(o.default.mark(function e(t,r,n,i,a,s){var c,u,l,d,p;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,h.renderMessageRow)(t,n,i,a,s);case 1:c=e.sent,a.selectedMessage&&a.selectedMessage.sameTerm(n)&&(c.style.backgroundColor="yellow",a.selectedElement=c,r.selectedElement=c),u=!1,l=r.firstChild;case 2:if(l){e.next=3;break}return e.abrupt("continue",5);case 3:if(d=!0===a.newestfirst,!((p=c.AJAR_date)>l.AJAR_date&&d||p<l.AJAR_date&&!d)){e.next=4;break}return r.insertBefore(c,l),u=!0,e.abrupt("continue",5);case 4:l=l.nextSibling,e.next=2;break;case 5:u||r.appendChild(c);case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)}function x(){return x=(0,a.default)(o.default.mark(function e(t,r,n,i){var m,v,w,x,_,E,S,A,k,C,T,I,F,P,N,O,R,j,L,D,U,M,B,H,q,W,V,K,J,z,$;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return j=function(){return(j=(0,a.default)(o.default.mark(function e(){var t,r,n,a,s,c,u,l,d,p;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(){i.selectedElement?i.selectedElement.scrollIntoView({block:"center"}):q.inputRow.scrollIntoView&&q.inputRow.scrollIntoView(L)},t=function(){d&&d.selectedElement&&d.selectedElement.scrollIntoView({block:"center"})},i.selectedMessage&&(a=i.selectedMessage.doc()),W&&(s=W.doc()),(c=a||s)&&(u=new Date,l=U.leafDocumentFromDate(u),n=l.sameTerm(c)),!c||n){e.next=2;break}return p=U.dateFromLeafDocument(c),e.next=1,S(p,n);case 1:d=e.sent,M.appendChild(d),V.messageTable=d,K.messageTable=d,t(),setTimeout(t,1e3),e.next=4;break;case 2:return e.next=3,F();case 3:V.messageTable=q,K.messageTable=q;case 4:return e.next=5,N(null,r);case 5:M.addEventListener("scroll",N),i.solo&&document.body.addEventListener("scroll",N);case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)},R=function(){return j.apply(this,arguments)},O=function(){return(O=(0,a.default)(o.default.mark(function e(t,r){var n,a,s,c,u;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!$){e.next=1;break}return e.abrupt("return");case 1:$=!0,n=!r,a=150;case 2:if(!(M.scrollTop<a&&V.messageTable&&!V.messageTable.initial&&V.messageTable.extendBackwards)){e.next=6;break}if(0!==M.scrollHeight){e.next=3;break}return setTimeout(N,2e3),$=!1,e.abrupt("return");case 3:return c=M.scrollHeight-M.scrollTop,e.next=4,V.messageTable.extendBackwards();case 4:if(s=e.sent,n&&(M.scrollTop=M.scrollHeight-c),r&&r(),!s){e.next=5;break}return e.abrupt("continue",6);case 5:e.next=2;break;case 6:if(!(i.selectedMessage&&M.scrollHeight-M.scrollTop-M.clientHeight<a&&K.messageTable&&!K.messageTable.final&&K.messageTable.extendForwards)){e.next=9;break}return u=M.scrollTop,e.next=7,K.messageTable.extendForwards();case 7:if(s=e.sent,n&&(M.scrollTop=u),r&&r(),!s){e.next=8;break}return e.abrupt("continue",9);case 8:e.next=6;break;case 9:$=!1;case 10:case"end":return e.stop()}},e)}))).apply(this,arguments)},N=function(e,t){return O.apply(this,arguments)},P=function(){return(P=(0,a.default)(o.default.mark(function e(){var t,r,i;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Date,r=U.leafDocumentFromDate(t),e.next=1,S(t,!0);case 1:return i=e.sent,M.appendChild(i),M.refresh=(0,a.default)(o.default.mark(function e(){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,T(new Date);case 1:return e.next=2,m(n,i);case 2:y(n);case 3:case"end":return e.stop()}},e)})),c.store.updater.addDownstreamChangeListener(r,M.refresh),q=i,K.messageTable=q,e.abrupt("return",i);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)},F=function(){return P.apply(this,arguments)},I=function(){return(I=(0,a.default)(o.default.mark(function e(){var t,r,n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((t=U.leafDocumentFromDate(new Date)).sameTerm(K.messageTable.chatDocument)){e.next=2;break}return q.inputRow&&(q.removeChild(q.inputRow),delete q.inputRow),r=K.messageTable.chatDocument,e.next=1,F();case 1:if(!c.store.holds(r,d.rdfs("seeAlso"),t,r)){n=[s.st(r,d.rdfs("seeAlso"),t,r)];try{c.store.updater.update([],n)}catch(e){alert("Unable to link old chat file to new one:"+e)}}case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)},T=function(){return I.apply(this,arguments)},C=function(){return C=(0,a.default)(o.default.mark(function e(r,n){var s,u,f,m,v,y,b,x,E,S,A,k,C,T,I,F,P,N,O;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:x=function(){if(u){var e=E.extendedForwards?!L:L,t=E.final?"noun_T-Block_1114657_000000.svg":function(e){return e?"noun_1369237.svg":"noun_1369241.svg"}(e);u.firstChild.setAttribute("src",l.icons.iconBase+t)}},b=function(){return(b=(0,a.default)(o.default.mark(function e(){var t;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,_(!1);case 1:return t=e.sent,e.abrupt("return",t);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)},y=function(){return b.apply(this,arguments)},v=function(){if(s){var e=E.extendedBack?!L:L,t=E.initial?"noun_T-Block_1114655_000000.svg":function(e){return e?"noun_1369241.svg":"noun_1369237.svg"}(e);s.firstChild.setAttribute("src",l.icons.iconBase+t)}},m=function(){return(m=(0,a.default)(o.default.mark(function e(){var t;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,_(!0);case 1:return(t=e.sent)?(s&&(s.firstChild.setAttribute("src",l.icons.iconBase+"noun_T-Block_1114655_000000.svg"),s.disabled=!0),E.initial=!0):E.extendedBack=!0,v(),e.abrupt("return",t);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)},f=function(){return m.apply(this,arguments)},s=null,u=null,(E=t.createElement("table")).style.width="100%",E.extendBackwards=f,E.extendForwards=y,E.date=r,S=U.leafDocumentFromDate(r),E.chatDocument=S,E.fresh=!1,E.setAttribute("style","width: 100%;"),n&&(E.final=!0,q=E,K.messageTable=E,A=(0,h.renderMessageEditor)(D,E,H,i),L?E.insertBefore(A,E.firstChild):E.appendChild(A),E.inputRow=A),(k=t.createElement("tr")).appendChild(t.createElement("td")),(C=k.appendChild(t.createElement("td"))).style="text-align: center; vertical-align: middle; color: #888; font-style: italic;",C.textContent=p.shortDate(r.toISOString(),!0),T=k.appendChild(t.createElement("td")),i.includeRemoveButton&&T.appendChild(p.cancelButton(t,function(e){M.parentNode.removeChild(M)})),E.extendedForwards=!1,L?E.appendChild(k):E.insertBefore(k,E.firstChild),I=c.store.statementsMatching(null,d.wf("message"),null,S),!n&&I.length,F=g(I),e.prev=1,F.s();case 2:if((P=F.n()).done){e.next=4;break}return N=P.value,e.next=3,w(N.object,E);case 3:e.next=2;break;case 4:e.next=6;break;case 5:e.prev=5,O=e.catch(1),F.e(O);case 6:return e.prev=6,F.f(),e.finish(6);case 7:return E.fresh=!0,e.abrupt("return",E);case 8:case"end":return e.stop()}},e,null,[[1,5,6,7]])})),C.apply(this,arguments)},k=function(e,t){return C.apply(this,arguments)},A=function(){return(A=(0,a.default)(o.default.mark(function e(r,n){var i,a,s,l;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=U.leafDocumentFromDate(r),e.prev=1,e.next=2,c.store.fetcher.createIfNotExists(i);case 2:e.next=7;break;case 3:if(e.prev=3,l=e.catch(1),a=t.createElement("table"),s=a.appendChild(t.createElement("tr")),!l.response||!l.response.status||404!==l.response.status){e.next=5;break}return e.next=4,k(r,n);case 4:return e.abrupt("return",e.sent);case 5:u.log("*** Error NON 404 for chat file "+i),s.appendChild(p.errorMessageBlock(t,l,"pink"));case 6:return e.abrupt("return",s);case 7:return e.next=8,k(r,n);case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}},e,null,[[1,3]])}))).apply(this,arguments)},S=function(e,t){return A.apply(this,arguments)},E=function(){return(E=(0,a.default)(o.default.mark(function e(t){var r,n,i,a,s,c;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(r=t?V:K).messageTable.date,!(t&&V.limit&&n<=V.limit)){e.next=2;break}if(q){e.next=1;break}return e.next=1,F();case 1:return e.abrupt("return",!0);case 2:return e.next=3,U.loadPrevious(n,t);case 3:if((n=e.sent)||t||q){e.next=4;break}return e.next=4,F();case 4:if(n){e.next=5;break}return e.abrupt("return",!0);case 5:return i=!1,t||(a=U.leafDocumentFromDate(new Date),s=U.leafDocumentFromDate(n),i=s.sameTerm(a)),e.next=6,S(n,i);case 6:return c=e.sent,r.messageTable=c,(t?L:!L)?M.appendChild(c):M.insertBefore(c,M.firstChild),e.abrupt("return",i);case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)},_=function(e){return E.apply(this,arguments)},x=function(){return x=(0,a.default)(o.default.mark(function e(t,r){var n,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,f.isDeleted)(t)||i.showDeletedMessages){e.next=1;break}return e.abrupt("return");case 1:if(n=c.store.any(null,d.sioc("has_member"),t,t.doc()),(a=c.store.any(t,d.sioc("id"),null,t.doc()))&&!n&&(n=c.store.any(null,d.sioc("has_member"),a,t.doc())),!i.thread){e.next=5;break}if(!c.store.holds(t,d.sioc("has_reply"),i.thread)){e.next=2;break}e.next=4;break;case 2:if(!n||!n.sameTerm(i.thread)){e.next=3;break}e.next=4;break;case 3:return e.abrupt("return");case 4:e.next=6;break;case 5:if(!n){e.next=6;break}return e.abrupt("return");case 6:if(r.fresh){e.next=7;break}return e.next=7,b(D,r,t,r.fresh,i,H);case 7:case"end":return e.stop()}},e)})),x.apply(this,arguments)},w=function(e,t){return x.apply(this,arguments)},v=function(){return v=(0,a.default)(o.default.mark(function e(t,r){var n,i,a,s,u,l,f,h,m;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n={},i=r.firstChild;i;i=i.nextSibling)i.AJAR_subject&&(n[i.AJAR_subject.uri]=!0);s=c.store.each(t,d.wf("message"),null,r.chatDocument),u={},l=g(s),e.prev=1,l.s();case 2:if((f=l.n()).done){e.next=4;break}if(h=f.value,u[h.uri]=!0,n[h.uri]){e.next=3;break}return e.next=3,w(h,r);case 3:e.next=2;break;case 4:e.next=6;break;case 5:e.prev=5,m=e.catch(1),l.e(m);case 6:return e.prev=6,l.f(),e.finish(6);case 7:for(i=r.firstChild;i;)a=i.nextSibling,i.AJAR_subject&&!u[i.AJAR_subject.uri]&&r.removeChild(i),i=a;for(i=r.firstChild;i;i=i.nextSibling)i.AJAR_subject&&p.refreshTree(i);case 8:case"end":return e.stop()}},e,null,[[1,5,6,7]])})),v.apply(this,arguments)},m=function(e,t){return v.apply(this,arguments)},(i=i||{}).authorDateOnLeft=!1,L="1"===i.newestFirst||!0===i.newestFirst,D=new f.ChatChannel(n,i),U=D.dateFolder,M=t.createElement("div"),D.div=M,B=M.appendChild(t.createElement("div")),H={dom:t,statusArea:B,div:B},V={messageTable:null},K={messageTable:null},i.thread&&(J=i.thread,(W=c.store.any(null,d.sioc("has_reply"),J,J.doc()))&&(z=c.store.any(W,d.dct("created"),null,W.doc()))&&(V.limit=new Date(z.value))),$=!1,e.next=1,R();case 1:return e.abrupt("return",M);case 2:case"end":return e.stop()}},e)})),x.apply(this,arguments)}},4466:(e,t,r)=>{var n=r(4582).NAMESPACE,i=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,o=new RegExp("[\\-\\.0-9"+i.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+i.source+o.source+"*(?::"+i.source+o.source+"*)?$");function s(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,s)}function c(){}function u(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function l(e,t,r,i,o,a){function s(e,t,n){r.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),r.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,o),n)}for(var c,u=++t,l=0;;){var d=e.charAt(u);switch(d){case"=":if(1===l)c=e.slice(t,u),l=3;else{if(2!==l)throw new Error("attribute equal must after attrName");l=3}break;case"'":case'"':if(3===l||1===l){if(1===l&&(a.warning('attribute value must after "="'),c=e.slice(t,u)),t=u+1,!((u=e.indexOf(d,t))>0))throw new Error("attribute value no end '"+d+"' match");s(c,p=e.slice(t,u),t-1),l=5}else{if(4!=l)throw new Error('attribute value must after "="');s(c,p=e.slice(t,u),t),a.warning('attribute "'+c+'" missed start quot('+d+")!!"),t=u+1,l=5}break;case"/":switch(l){case 0:r.setTagName(e.slice(t,u));case 5:case 6:case 7:l=7,r.closed=!0;case 4:case 1:break;case 2:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==l&&r.setTagName(e.slice(t,u)),u;case">":switch(l){case 0:r.setTagName(e.slice(t,u));case 5:case 6:case 7:break;case 4:case 1:"/"===(p=e.slice(t,u)).slice(-1)&&(r.closed=!0,p=p.slice(0,-1));case 2:2===l&&(p=c),4==l?(a.warning('attribute "'+p+'" missed quot(")!'),s(c,p,t)):(n.isHTML(i[""])&&p.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),s(p,p,t));break;case 3:throw new Error("attribute value missed!!")}return u;case"€":d=" ";default:if(d<=" ")switch(l){case 0:r.setTagName(e.slice(t,u)),l=6;break;case 1:c=e.slice(t,u),l=2;break;case 4:var p=e.slice(t,u);a.warning('attribute "'+p+'" missed quot(")!!'),s(c,p,t);case 5:l=6}else switch(l){case 2:r.tagName,n.isHTML(i[""])&&c.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),s(c,c,t),t=u,l=1;break;case 5:a.warning('attribute space is required"'+c+'"!!');case 6:l=1,t=u;break;case 3:l=4,t=u;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function d(e,t,r){for(var i=e.tagName,o=null,a=e.length;a--;){var s=e[a],c=s.qName,u=s.value;if((f=c.indexOf(":"))>0)var l=s.prefix=c.slice(0,f),d=c.slice(f+1),p="xmlns"===l&&d;else d=c,l=null,p="xmlns"===c&&"";s.localName=d,!1!==p&&(null==o&&(o={},h(r,r={})),r[p]=o[p]=u,s.uri=n.XMLNS,t.startPrefixMapping(p,u))}for(a=e.length;a--;)(l=(s=e[a]).prefix)&&("xml"===l&&(s.uri=n.XML),"xmlns"!==l&&(s.uri=r[l||""]));var f;(f=i.indexOf(":"))>0?(l=e.prefix=i.slice(0,f),d=e.localName=i.slice(f+1)):(l=null,d=e.localName=i);var m=e.uri=r[l||""];if(t.startElement(m,d,i,e),!e.closed)return e.currentNSMap=r,e.localNSMap=o,!0;if(t.endElement(m,d,i),o)for(l in o)Object.prototype.hasOwnProperty.call(o,l)&&t.endPrefixMapping(l)}function p(e,t,r,n,i){if(/^(?:script|textarea)$/i.test(r)){var o=e.indexOf("</"+r+">",t),a=e.substring(t+1,o);if(/[&<]/.test(a))return/^script$/i.test(r)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,n),i.characters(a,0,a.length),o)}return t+1}function f(e,t,r,n){var i=n[r];return null==i&&((i=e.lastIndexOf("</"+r+">"))<t&&(i=e.lastIndexOf("</"+r)),n[r]=i),i<t}function h(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}function m(e,t,r,n){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(i=e.indexOf("--\x3e",t+4))>t?(r.comment(e,t+4,i-t-4),i+3):(n.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,i-t-9),r.endCDATA(),i+3}var o=function(e,t){var r,n=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(e);r=i.exec(e);)if(n.push(r),r[1])return n}(e,t),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],c=!1,u=!1;a>3&&(/^public$/i.test(o[2][0])?(c=o[3][0],u=a>4&&o[4][0]):/^system$/i.test(o[2][0])&&(u=o[3][0]));var l=o[a-1];return r.startDTD(s,c,u),r.endDTD(),l.index+l[0].length}return-1}function g(e,t,r){var n=e.indexOf("?>",t);if(n){var i=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return i?(i[0].length,r.processingInstruction(i[1],i[2]),n+2):-1}return-1}function v(){this.attributeNames={}}s.prototype=new Error,s.prototype.name=s.name,c.prototype={parse:function(e,t,r){var i=this.domBuilder;i.startDocument(),h(t,t={}),function(e,t,r,i,o){function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(r,t)?r[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(o.error("entity not found:"+e),e)}function c(t){if(t>S){var r=e.substring(S,t).replace(/&#?\w+;/g,a);x&&h(S),i.characters(r,0,t-S),S=t}}function h(t,r){for(;t>=b&&(r=w.exec(e));)y=r.index,b=y+r[0].length,x.lineNumber++;x.columnNumber=t-y+1}for(var y=0,b=0,w=/.*(?:\r\n?|\n)|.*$/g,x=i.locator,_=[{currentNSMap:t}],E={},S=0;;){try{var A=e.indexOf("<",S);if(A<0){if(!e.substr(S).match(/^\s*$/)){var k=i.doc,C=k.createTextNode(e.substr(S));k.appendChild(C),i.currentElement=C}return}switch(A>S&&c(A),e.charAt(A+1)){case"/":var T=e.indexOf(">",A+3),I=e.substring(A+2,T).replace(/[ \t\n\r]+$/g,""),F=_.pop();T<0?(I=e.substring(A+2).replace(/[\s<].*/,""),o.error("end tag name: "+I+" is not complete:"+F.tagName),T=A+1+I.length):I.match(/\s</)&&(I=I.replace(/[\s<].*/,""),o.error("end tag name: "+I+" maybe not complete"),T=A+1+I.length);var P=F.localNSMap,N=F.tagName==I;if(N||F.tagName&&F.tagName.toLowerCase()==I.toLowerCase()){if(i.endElement(F.uri,F.localName,I),P)for(var O in P)Object.prototype.hasOwnProperty.call(P,O)&&i.endPrefixMapping(O);N||o.fatalError("end tag name: "+I+" is not match the current start tagName:"+F.tagName)}else _.push(F);T++;break;case"?":x&&h(A),T=g(e,A,i);break;case"!":x&&h(A),T=m(e,A,i,o);break;default:x&&h(A);var R=new v,j=_[_.length-1].currentNSMap,L=(T=l(e,A,R,j,a,o),R.length);if(!R.closed&&f(e,T,R.tagName,E)&&(R.closed=!0,r.nbsp||o.warning("unclosed xml attribute")),x&&L){for(var D=u(x,{}),U=0;U<L;U++){var M=R[U];h(M.offset),M.locator=u(x,{})}i.locator=D,d(R,i,j)&&_.push(R),i.locator=x}else d(R,i,j)&&_.push(R);n.isHTML(R.uri)&&!R.closed?T=p(e,T,R.tagName,a,i):T++}}catch(e){if(e instanceof s)throw e;o.error("element parse error: "+e),T=-1}T>S?S=T:c(Math.max(A,S)+1)}}(e,t,r,i,this.errorHandler),i.endDocument()}},v.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!a.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=c,t.ParseError=s},4478:e=>{e.exports='@prefix : <http://www.w3.org/ns/ui#> .\n@prefix f: <#> .\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix cal: <http://www.w3.org/2002/12/cal/ical#>.\n@prefix meeting: <http://www.w3.org/ns/pim/meeting#>.\n@prefix ns: <http://www.w3.org/2006/vcard/ns#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix te: <http://purl.org/dc/terms/> .\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n\n f:main a :Form;\n cal:summary "Meeting Details";\n :part f:titleField, f:locationField, f:startField,\n f:endField, f:eventComment, f:colorField .\n\n f:titleField a :SingleLineTextField;\n :maxLength 256;\n :property cal:summary;\n :label "Name of meeting";\n :size 80 .\n\n f:locationField a :SingleLineTextField;\n :maxLength 128;\n :property cal:location;\n :size 40 .\n\n f:startField a :DateField;\n :label "Start";\n :property cal:dtstart .\n\n f:endField a :DateField;\n :label "End";\n :property cal:dtend .\n\n f:colorField a :ColorField;\n :label "Tab color";\n # :default "#ddddcc"^^xsd:color;\n :property ui:backgroundColor .\n\n f:eventComment\n a ui:MultiLineTextField;\n # ui:maxLength\n # "1048";\n # ui:size\n # "40".\n ui:property\n cal:comment.\n\n###################################################\n\nf:settings a :Form;\n dc:title "Tab settings";\n :part f:labelField, f:targetField, f:viewField.\n\n f:labelField a :SingleLineTextField;\n :maxLength 128;\n :property rdfs:label;\n :label "Label on tab";\n :size 40 .\n\n f:targetField a :NamedNodeURIField;\n :maxLength 1024; # Longer?\n :property meeting:target;\n :label "URL of resource";\n :size 80 .\n\n f:colorField2 a :ColorField;\n :label "Tab color";\n # :default "#ddddcc"^^xsd:color;\n :property ui:backgroundColor .\n\n f:viewField a :SingleLineTextField;\n :maxLength 128;\n :property meeting:view;\n :label "View mode (experts only)";\n :size 40 .\n\n#\n'},4495:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}}},4557:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const n=r(2829),i=r(2988);var o=r(2988);function a(e,t,r,o){return(0,i.default)(80,n.default,e,t,r,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),a.DNS=i.DNS,a.URL=i.URL,t.default=a},4579:(e,t,r)=>{var n=r(7736);function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}e.exports=function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},4582:(e,t)=>{"use strict";function r(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var n=r({HTML:"text/html",isHTML:function(e){return e===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=r({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===i.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},t.find=function(e,t,r){if(void 0===r&&(r=Array.prototype),e&&"function"==typeof r.find)return r.find.call(e,t);for(var n=0;n<e.length;n++)if(Object.prototype.hasOwnProperty.call(e,n)){var i=e[n];if(t.call(void 0,i,n,e))return i}},t.freeze=r,t.MIME_TYPE=n,t.NAMESPACE=i},4618:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)}},4633:(e,t,r)=>{var n=r(5172),i=r(6993),o=r(5869),a=r(887),s=r(1791),c=r(4373),u=r(579);function l(){"use strict";var t=i(),r=t.m(l),d=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function p(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var f={throw:1,return:2,break:3,continue:3};function h(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,f[e],t)},delegateYield:function(e,i,o){return t.resultName=i,r(n.d,u(e),o)},finish:function(e){return r(n.f,e)}},r=function(e,r,i){n.p=t.prev,n.n=t.next;try{return e(r,i)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,r,n,i){return t.w(h(e),r,n,i&&i.reverse())},isGeneratorFunction:p,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:s,async:function(e,t,r,n,i){return(p(t)?a:o)(h(e),t,r,n,i)},keys:c,values:u}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},4667:(e,t,r)=>{"use strict";var n=r(3121),i=r(182);const o=["ES256","RS256"],a={ERROR:"error",LOGIN:"login",LOGOUT:"logout",NEW_REFRESH_TOKEN:"newRefreshToken",NEW_TOKENS:"newTokens",AUTHORIZATION_REQUEST:"authorizationRequest",SESSION_EXPIRED:"sessionExpired",SESSION_EXTENDED:"sessionExtended",SESSION_RESTORED:"sessionRestore",TIMEOUT_SET:"timeoutSet"},s=["openid","offline_access","webid"];class c{sessionInfoManager;constructor(e){this.sessionInfoManager=e,this.sessionInfoManager=e}async canHandle(){return!0}async handle(e){await this.sessionInfoManager.clear(e)}}class u{redirector;constructor(e){this.redirector=e,this.redirector=e}async canHandle(e,t){return"idp"===t?.logoutType}async handle(e,t){if("idp"!==t?.logoutType)throw new Error("Attempting to call idp logout handler to perform app logout");if(void 0===t.toLogoutUrl)throw new Error("Cannot perform IDP logout. Did you log in using the OIDC authentication flow?");this.redirector.redirect(t.toLogoutUrl(t),{handleRedirect:t.handleRedirect})}}async function l(e,t){await Promise.all([t.deleteAllUserData(e,{secure:!1}),t.deleteAllUserData(e,{secure:!0})])}function d({endSessionEndpoint:e,idTokenHint:t,postLogoutRedirectUri:r,state:n}){const i=new URL(e);return void 0!==t&&i.searchParams.append("id_token_hint",t),void 0!==r&&(i.searchParams.append("post_logout_redirect_uri",r),void 0!==n&&i.searchParams.append("state",n)),i.toString()}function p(e){try{return new URL(e),!0}catch{return!1}}const f=(e,t)=>fetch(e,t);class h{secureStorage;insecureStorage;constructor(e,t){this.secureStorage=e,this.insecureStorage=t,this.secureStorage=e,this.insecureStorage=t}getKey(e){return`solidClientAuthenticationUser:${e}`}async getUserData(e,t){const r=await(t?this.secureStorage:this.insecureStorage).get(this.getKey(e));if(void 0===r)return{};try{return JSON.parse(r)}catch(n){throw new Error(`Data for user [${e}] in [${t?"secure":"unsecure"}] storage is corrupted - expected valid JSON, but got: ${r}`)}}async setUserData(e,t,r){await(r?this.secureStorage:this.insecureStorage).set(this.getKey(e),JSON.stringify(t))}async get(e,t){const r=await(t?.secure?this.secureStorage:this.insecureStorage).get(e);if(void 0===r&&t?.errorIfNull)throw new Error(`[${e}] is not stored`);return r}async set(e,t,r){return(r?.secure?this.secureStorage:this.insecureStorage).set(e,t)}async delete(e,t){return(t?.secure?this.secureStorage:this.insecureStorage).delete(e)}async getForUser(e,t,r){const n=await this.getUserData(e,r?.secure);let i;if(n&&n[t]||(i=void 0),i=n[t],void 0===i&&r?.errorIfNull)throw new Error(`Field [${t}] for user [${e}] is not stored`);return i||void 0}async setForUser(e,t,r){let n;try{n=await this.getUserData(e,r?.secure)}catch{n={}}await this.setUserData(e,{...n,...t},r?.secure)}async deleteForUser(e,t,r){const n=await this.getUserData(e,r?.secure);delete n[t],await this.setUserData(e,n,r?.secure)}async deleteAllUserData(e,t){await(t?.secure?this.secureStorage:this.insecureStorage).delete(this.getKey(e))}}class m extends Error{constructor(e){super(e)}}class g extends Error{constructor(e){super(`[${e}] is not implemented`)}}class v extends Error{missingFields;constructor(e){super(`Invalid response from OIDC provider: missing fields ${e}`),this.missingFields=e}}class y extends Error{error;errorDescription;constructor(e,t,r){super(e),this.error=t,this.errorDescription=r}}function b(e){const t=new URL(e);return new URL(t.pathname,t.origin).toString()}async function w(e,t,r){return new n.SignJWT({htu:b(e),htm:t.toUpperCase(),jti:i.v4()}).setProtectedHeader({alg:o[0],jwk:r.publicKey,typ:"dpop+jwt"}).setIssuedAt().sign(r.privateKey,{})}async function x(e,t,r,n,i=fetch){return i(t,await async function(e,t,r,n){if(void 0!==r)return async function(e,t,r,n){const i=new Headers(n?.headers);return i.set("Authorization",`DPoP ${t}`),i.set("DPoP",await w(e,n?.method??"get",r)),{...n,headers:i}}(e,t,r,n);const i=new Headers(n?.headers);return i.set("Authorization",`Bearer ${t}`),{...n,headers:i}}(t.toString(),e,n,r))}const _=e=>void 0!==e?e-5>0?e-5:e:600,E="getResponse",S={get:async(e,t)=>E,set:async(e,t)=>{},delete:async e=>{},getForUser:async(e,t,r)=>E,setForUser:async(e,t,r)=>{},deleteForUser:async(e,t,r)=>{},deleteAllUserData:async(e,t)=>{}},A=e=>{const t=e;return{get:async e=>{if(void 0!==t[e])return"string"==typeof t[e]?t[e]:JSON.stringify(t[e])},set:async(e,r)=>{t[e]=r},delete:async e=>{delete t[e]}}};t.AggregateHandler=class{handleables;constructor(e){this.handleables=e,this.handleables=e}async getProperHandler(e){const t=await Promise.all(this.handleables.map(t=>t.canHandle(...e)));for(let e=0;e<t.length;e+=1)if(t[e])return this.handleables[e];return null}async canHandle(...e){return null!==await this.getProperHandler(e)}async handle(...e){const t=await this.getProperHandler(e);if(t)return t.handle(...e);throw new Error(`[${this.constructor.name}] cannot find a suitable handler for: ${e.map(e=>{try{return JSON.stringify(e)}catch(t){return e.toString()}}).join(", ")}`)}},t.AuthorizationCodeWithPkceOidcHandlerBase=class{storageUtility;redirector;constructor(e,t){this.storageUtility=e,this.redirector=t,this.storageUtility=e,this.redirector=t}parametersGuard=e=>void 0!==e.issuerConfiguration.grantTypesSupported&&e.issuerConfiguration.grantTypesSupported.indexOf("authorization_code")>-1&&void 0!==e.redirectUrl;async canHandle(e){return this.parametersGuard(e)}async setupRedirectHandler({oidcLoginOptions:e,state:t,codeVerifier:r,targetUrl:n}){if(!this.parametersGuard(e))throw new Error("The authorization code grant requires a redirectUrl.");var i;await Promise.all([this.storageUtility.setForUser(t,{sessionId:e.sessionId}),this.storageUtility.setForUser(e.sessionId,{codeVerifier:r,issuer:e.issuer.toString(),redirectUrl:e.redirectUrl,dpop:Boolean(e.dpop).toString(),keepAlive:(i=e.keepAlive,"boolean"==typeof i?Boolean(i):Boolean(true)).toString()})]),this.redirector.redirect(n,{handleRedirect:e.handleRedirect})}},t.ClientAuthentication=class{loginHandler;redirectHandler;logoutHandler;sessionInfoManager;issuerConfigFetcher;boundLogout;constructor(e,t,r,n,i){this.loginHandler=e,this.redirectHandler=t,this.logoutHandler=r,this.sessionInfoManager=n,this.issuerConfigFetcher=i,this.loginHandler=e,this.redirectHandler=t,this.logoutHandler=r,this.sessionInfoManager=n,this.issuerConfigFetcher=i}fetch=f;logout=async(e,t)=>{await this.logoutHandler.handle(e,"idp"===t?.logoutType?{...t,toLogoutUrl:this.boundLogout}:t),this.fetch=f,delete this.boundLogout};getSessionInfo=async e=>this.sessionInfoManager.get(e);getAllSessionInfo=async()=>this.sessionInfoManager.getAll()},t.ConfigurationError=m,t.DEFAULT_SCOPES=s,t.EVENTS=a,t.GeneralLogoutHandler=c,t.IRpLogoutHandler=u,t.IWaterfallLogoutHandler=class{handlers;constructor(e,t){this.handlers=[new c(e),new u(t)]}async canHandle(){return!0}async handle(e,t){for(const r of this.handlers)await r.canHandle(e,t)&&await r.handle(e,t)}},t.InMemoryStorage=class{map={};async get(e){return this.map[e]||void 0}async set(e,t){this.map[e]=t}async delete(e){delete this.map[e]}},t.InvalidResponseError=v,t.NotImplementedError=g,t.OidcProviderError=y,t.PREFERRED_SIGNING_ALG=o,t.REFRESH_BEFORE_EXPIRATION_SECONDS=5,t.SOLID_CLIENT_AUTHN_KEY_PREFIX="solidClientAuthn:",t.SessionInfoManagerBase=class{storageUtility;constructor(e){this.storageUtility=e,this.storageUtility=e}update(e,t){throw new Error("Not Implemented")}set(e,t){throw new Error("Not Implemented")}get(e){throw new Error("Not implemented")}async getAll(){throw new Error("Not implemented")}async clear(e){return l(e,this.storageUtility)}async register(e){throw new Error("Not implemented")}async getRegisteredSessionIdAll(){throw new Error("Not implemented")}async clearAll(){throw new Error("Not implemented")}async setOidcContext(e,t){throw new Error("Not implemented")}},t.StorageUtility=h,t.StorageUtilityGetResponse=E,t.StorageUtilityMock=S,t.USER_SESSION_PREFIX="solidClientAuthenticationUser",t.buildAuthenticatedFetch=function(e,t){let r,n=e;const i=t?.refreshOptions;if(void 0!==i){const e=async()=>{try{const{accessToken:o,refreshToken:s,expiresIn:c}=await async function(e,t,r){const n=await e.tokenRefresher.refresh(e.sessionId,e.refreshToken,t);return r?.emit(a.SESSION_EXTENDED,n.expiresIn??600),{accessToken:n.accessToken,refreshToken:n.refreshToken,expiresIn:n.expiresIn}}(i,t.dpopKey,t.eventEmitter);n=o,void 0!==s&&(i.refreshToken=s),clearTimeout(r),r=setTimeout(e,1e3*_(c)),t.eventEmitter?.emit(a.TIMEOUT_SET,r)}catch(e){e instanceof y&&(t?.eventEmitter?.emit(a.ERROR,e.error,e.errorDescription),t?.eventEmitter?.emit(a.SESSION_EXPIRED)),e instanceof v&&e.missingFields.includes("access_token")&&t?.eventEmitter?.emit(a.SESSION_EXPIRED)}};r=setTimeout(e,1e3*_(t.expiresIn)),t.eventEmitter?.emit(a.TIMEOUT_SET,r)}else if(void 0!==t&&void 0!==t.eventEmitter){const e=setTimeout(()=>{t.eventEmitter.emit(a.SESSION_EXPIRED)},1e3*_(t.expiresIn));t.eventEmitter.emit(a.TIMEOUT_SET,e)}return async(e,r)=>{let i=await x(n,e,r,t?.dpopKey,t?.fetch);const o=!i.ok&&(a=i.status,![401,403].includes(a));var a;return i.ok||o||i.url!==e&&void 0!==t?.dpopKey&&(i=await x(n,i.url,r,t.dpopKey,t.fetch)),i}},t.clear=l,t.createDpopHeader=w,t.determineSigningAlg=function(e,t){return t.find(t=>e.includes(t))??null},t.generateDpopKeyPair=async function(){const{privateKey:e,publicKey:t}=await n.generateKeyPair(o[0]),r={privateKey:e,publicKey:await n.exportJWK(t)};return[r.publicKey.alg]=o,r},t.getEndSessionUrl=d,t.getSessionIdFromOauthState=async function(e,t){return e.getForUser(t,"sessionId")},t.getUnauthenticatedSession=function(){return{isLoggedIn:!1,sessionId:i.v4(),fetch:(...e)=>fetch(...e)}},t.getWebidFromTokenPayload=async function(e,t,r,i){let o,a;try{const{payload:a}=await n.jwtVerify(e,n.createRemoteJWKSet(new URL(t)),{issuer:r,audience:i});o=a}catch(e){throw new Error(`Token verification failed: ${e.stack}`)}if("string"==typeof o.azp&&(a=o.azp),"string"==typeof o.webid)return{webId:o.webid,clientId:a};if("string"!=typeof o.sub)throw new Error(`The token ${JSON.stringify(o)} is invalid: it has no 'webid' claim and no 'sub' claim.`);try{return new URL(o.sub),{webId:o.sub,clientId:a}}catch(e){throw new Error(`The token has no 'webid' claim, and its 'sub' claim of [${o.sub}] is invalid as a URL - error [${e}].`)}},t.handleRegistration=async function(e,t,r,n){let i;if(function(e,t){return t.scopesSupported.includes("webid")&&void 0!==e.clientId&&p(e.clientId)}(e,t))i={clientId:e.clientId,clientName:e.clientName,clientType:"solid-oidc"};else{if(!function(e){return void 0!==e.clientId&&!p(e.clientId)}(e))return n.getClient({sessionId:e.sessionId,clientName:e.clientName,redirectUrl:e.redirectUrl},t);i={clientId:e.clientId,clientSecret:e.clientSecret,clientName:e.clientName,clientType:"static"}}const o={clientId:i.clientId,clientType:i.clientType};return"static"===i.clientType&&(o.clientSecret=i.clientSecret),i.clientName&&(o.clientName=i.clientName),await r.setForUser(e.sessionId,o),i},t.isKnownClientType=function(e){return"string"==typeof e&&["dynamic","static","solid-oidc"].includes(e)},t.isSupportedTokenType=function(e){return"string"==typeof e&&["DPoP","Bearer"].includes(e)},t.isValidRedirectUrl=function(e){try{const t=new URL(e),r=!t.searchParams.has("code")&&!t.searchParams.has("state"),n=""===t.hash;return r&&n}catch(e){return!1}},t.loadOidcContextFromStorage=async function(e,t,r){try{const[n,i,o,a,s]=await Promise.all([t.getForUser(e,"issuer",{errorIfNull:!0}),t.getForUser(e,"codeVerifier"),t.getForUser(e,"redirectUrl"),t.getForUser(e,"dpop",{errorIfNull:!0}),t.getForUser(e,"keepAlive")]);return await t.deleteForUser(e,"codeVerifier"),{codeVerifier:i,redirectUrl:o,issuerConfig:await r.fetchConfig(n),dpop:"true"===a,keepAlive:"string"!=typeof s||"true"===s}}catch(t){throw new Error(`Failed to retrieve OIDC context from storage associated with session [${e}]: ${t}`)}},t.maybeBuildRpInitiatedLogout=function({endSessionEndpoint:e,idTokenHint:t}){if(void 0!==e)return function({state:r,postLogoutUrl:n}){return d({endSessionEndpoint:e,idTokenHint:t,state:r,postLogoutRedirectUri:n})}},t.mockStorage=A,t.mockStorageUtility=(e,t=!1)=>t?new h(A(e),A({})):new h(A({}),A(e)),t.normalizeScopes=function(e){return Array.isArray(e)?Array.from(new Set([...s,...e.filter(e=>"string"==typeof e&&!e.includes(" "))])):s},t.removeOpenIdParams=function(e){const t=new URL(e);return t.searchParams.delete("state"),t.searchParams.delete("code"),t.searchParams.delete("error"),t.searchParams.delete("error_description"),t.searchParams.delete("iss"),t},t.saveSessionInfoToStorage=async function(e,t,r,i,o,a,s,c){void 0!==a&&await e.setForUser(t,{refreshToken:a},{secure:s}),void 0!==r&&await e.setForUser(t,{webId:r},{secure:s}),void 0!==i&&await e.setForUser(t,{clientId:i},{secure:s}),void 0!==o&&await e.setForUser(t,{isLoggedIn:o},{secure:s}),void 0!==c&&await e.setForUser(t,{publicKey:JSON.stringify(c.publicKey),privateKey:JSON.stringify(await n.exportJWK(c.privateKey))},{secure:s})}},4705:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function i(e,t,r){return(t=function(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{A:()=>i})},4722:(e,t,r)=>{var n=r(4582),i=n.find,o=n.NAMESPACE;function a(e){return""!==e}function s(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function c(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(a):[]}(e);return Object.keys(t.reduce(s,{}))}function u(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}function l(e,t){var r=e.prototype;if(!(r instanceof t)){function n(){}n.prototype=t.prototype,u(r,n=new n),e.prototype=r=n}r.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),r.constructor=e)}var d={},p=d.ELEMENT_NODE=1,f=d.ATTRIBUTE_NODE=2,h=d.TEXT_NODE=3,m=d.CDATA_SECTION_NODE=4,g=d.ENTITY_REFERENCE_NODE=5,v=d.ENTITY_NODE=6,y=d.PROCESSING_INSTRUCTION_NODE=7,b=d.COMMENT_NODE=8,w=d.DOCUMENT_NODE=9,x=d.DOCUMENT_TYPE_NODE=10,_=d.DOCUMENT_FRAGMENT_NODE=11,E=d.NOTATION_NODE=12,S={},A={},k=(S.INDEX_SIZE_ERR=(A[1]="Index size error",1),S.DOMSTRING_SIZE_ERR=(A[2]="DOMString size error",2),S.HIERARCHY_REQUEST_ERR=(A[3]="Hierarchy request error",3)),C=(S.WRONG_DOCUMENT_ERR=(A[4]="Wrong document",4),S.INVALID_CHARACTER_ERR=(A[5]="Invalid character",5),S.NO_DATA_ALLOWED_ERR=(A[6]="No data allowed",6),S.NO_MODIFICATION_ALLOWED_ERR=(A[7]="No modification allowed",7),S.NOT_FOUND_ERR=(A[8]="Not found",8)),T=(S.NOT_SUPPORTED_ERR=(A[9]="Not supported",9),S.INUSE_ATTRIBUTE_ERR=(A[10]="Attribute in use",10));function I(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,A[e]),this.message=A[e],Error.captureStackTrace&&Error.captureStackTrace(this,I);return r.code=e,t&&(this.message=this.message+": "+t),r}function F(){}function P(e,t){this._node=e,this._refresh=t,N(this)}function N(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var r=e._refresh(e._node);if(be(e,"length",r.length),!e.$$length||r.length<e.$$length)for(var n=r.length;n in e;n++)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n];u(r,e),e._inc=t}}function O(){}function R(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function j(e,t,r,n){if(n?t[R(t,n)]=r:t[t.length++]=r,e){r.ownerElement=e;var i=e.ownerDocument;i&&(n&&q(i,e,n),function(e,t,r){e&&e._inc++,r.namespaceURI===o.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(i,e,r))}}function L(e,t,r){var n=R(t,r);if(!(n>=0))throw new I(C,new Error(e.tagName+"@"+r));for(var i=t.length-1;n<i;)t[n]=t[++n];if(t.length=i,e){var o=e.ownerDocument;o&&(q(o,e,r),r.ownerElement=null)}}function D(){}function U(){}function M(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function B(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(B(e,t))return!0}while(e=e.nextSibling)}function H(){this.ownerDocument=this}function q(e,t,r,n){e&&e._inc++,r.namespaceURI===o.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function W(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var i=t.firstChild,o=0;i;)n[o++]=i,i=i.nextSibling;n.length=o,delete n[n.length]}}}function V(e,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:e.firstChild=n,n?n.previousSibling=r:e.lastChild=r,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,W(e.ownerDocument,e),t}function K(e){return e&&e.nodeType===U.DOCUMENT_TYPE_NODE}function J(e){return e&&e.nodeType===U.ELEMENT_NODE}function z(e){return e&&e.nodeType===U.TEXT_NODE}function $(e,t){var r=e.childNodes||[];if(i(r,J)||K(t))return!1;var n=i(r,K);return!(t&&n&&r.indexOf(n)>r.indexOf(t))}function G(e,t){var r=e.childNodes||[];if(i(r,function(e){return J(e)&&e!==t}))return!1;var n=i(r,K);return!(t&&n&&r.indexOf(n)>r.indexOf(t))}function X(e,t,r){var n=e.childNodes||[],o=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var a=o.filter(J);if(a.length>1||i(o,z))throw new I(k,"More than one element or text in fragment");if(1===a.length&&!$(e,r))throw new I(k,"Element in fragment can not be inserted before doctype")}if(J(t)&&!$(e,r))throw new I(k,"Only one element can be added and only after doctype");if(K(t)){if(i(n,K))throw new I(k,"Only one doctype is allowed");var s=i(n,J);if(r&&n.indexOf(s)<n.indexOf(r))throw new I(k,"Doctype can only be inserted before an element");if(!r&&s)throw new I(k,"Doctype can not be appended since element is present")}}function Y(e,t,r){var n=e.childNodes||[],o=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var a=o.filter(J);if(a.length>1||i(o,z))throw new I(k,"More than one element or text in fragment");if(1===a.length&&!G(e,r))throw new I(k,"Element in fragment can not be inserted before doctype")}if(J(t)&&!G(e,r))throw new I(k,"Only one element can be added and only after doctype");if(K(t)){if(i(n,function(e){return K(e)&&e!==r}))throw new I(k,"Only one doctype is allowed");var s=i(n,J);if(r&&n.indexOf(s)<n.indexOf(r))throw new I(k,"Doctype can only be inserted before an element")}}function Q(e,t,r,n){(function(e,t,r){if(!function(e){return e&&(e.nodeType===U.DOCUMENT_NODE||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.ELEMENT_NODE)}(e))throw new I(k,"Unexpected parent node type "+e.nodeType);if(r&&r.parentNode!==e)throw new I(C,"child not in parent");if(!function(e){return e&&(J(e)||z(e)||K(e)||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.COMMENT_NODE||e.nodeType===U.PROCESSING_INSTRUCTION_NODE)}(t)||K(t)&&e.nodeType!==U.DOCUMENT_NODE)throw new I(k,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)})(e,t,r),e.nodeType===U.DOCUMENT_NODE&&(n||X)(e,t,r);var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===_){var o=t.firstChild;if(null==o)return t;var a=t.lastChild}else o=a=t;var s=r?r.previousSibling:e.lastChild;o.previousSibling=s,a.nextSibling=r,s?s.nextSibling=o:e.firstChild=o,null==r?e.lastChild=a:r.previousSibling=a;do{o.parentNode=e,Z(o,e.ownerDocument||e)}while(o!==a&&(o=o.nextSibling));return W(e.ownerDocument||e,e),t.nodeType==_&&(t.firstChild=t.lastChild=null),t}function Z(e,t){if(e.ownerDocument!==t){if(e.ownerDocument=t,e.nodeType===p&&e.attributes)for(var r=0;r<e.attributes.length;r++){var n=e.attributes.item(r);n&&(n.ownerDocument=t)}for(var i=e.firstChild;i;)Z(i,t),i=i.nextSibling}}function ee(){this._nsMap={}}function te(){}function re(){}function ne(){}function ie(){}function oe(){}function ae(){}function se(){}function ce(){}function ue(){}function le(){}function de(){}function pe(){}function fe(e,t){var r=[],n=9==this.nodeType&&this.documentElement||this,i=n.prefix,o=n.namespaceURI;if(o&&null==i&&null==(i=n.lookupPrefix(o)))var a=[{namespace:o,prefix:null}];return ge(this,r,e,t,a),r.join("")}function he(e,t,r){var n=e.prefix||"",i=e.namespaceURI;if(!i)return!1;if("xml"===n&&i===o.XML||i===o.XMLNS)return!1;for(var a=r.length;a--;){var s=r[a];if(s.prefix===n)return s.namespace!==i}return!0}function me(e,t,r){e.push(" ",t,'="',r.replace(/[<>&"\t\n\r]/g,M),'"')}function ge(e,t,r,n,i){if(i||(i=[]),n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case p:var a=e.attributes,s=a.length,c=e.firstChild,u=e.tagName,l=u;if(!(r=o.isHTML(e.namespaceURI)||r)&&!e.prefix&&e.namespaceURI){for(var d,v=0;v<a.length;v++)if("xmlns"===a.item(v).name){d=a.item(v).value;break}if(!d)for(var E=i.length-1;E>=0;E--)if(""===(S=i[E]).prefix&&S.namespace===e.namespaceURI){d=S.namespace;break}if(d!==e.namespaceURI)for(E=i.length-1;E>=0;E--){var S;if((S=i[E]).namespace===e.namespaceURI){S.prefix&&(l=S.prefix+":"+u);break}}}t.push("<",l);for(var A=0;A<s;A++)"xmlns"==(k=a.item(A)).prefix?i.push({prefix:k.localName,namespace:k.value}):"xmlns"==k.nodeName&&i.push({prefix:"",namespace:k.value});for(A=0;A<s;A++){var k,C,T;he(k=a.item(A),0,i)&&(me(t,(C=k.prefix||"")?"xmlns:"+C:"xmlns",T=k.namespaceURI),i.push({prefix:C,namespace:T})),ge(k,t,r,n,i)}if(u===l&&he(e,0,i)&&(me(t,(C=e.prefix||"")?"xmlns:"+C:"xmlns",T=e.namespaceURI),i.push({prefix:C,namespace:T})),c||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(t.push(">"),r&&/^script$/i.test(u))for(;c;)c.data?t.push(c.data):ge(c,t,r,n,i.slice()),c=c.nextSibling;else for(;c;)ge(c,t,r,n,i.slice()),c=c.nextSibling;t.push("</",l,">")}else t.push("/>");return;case w:case _:for(c=e.firstChild;c;)ge(c,t,r,n,i.slice()),c=c.nextSibling;return;case f:return me(t,e.name,e.value);case h:return t.push(e.data.replace(/[<&>]/g,M));case m:return t.push("<![CDATA[",e.data,"]]>");case b:return t.push("\x3c!--",e.data,"--\x3e");case x:var I=e.publicId,F=e.systemId;if(t.push("<!DOCTYPE ",e.name),I)t.push(" PUBLIC ",I),F&&"."!=F&&t.push(" ",F),t.push(">");else if(F&&"."!=F)t.push(" SYSTEM ",F,">");else{var P=e.internalSubset;P&&t.push(" [",P,"]"),t.push(">")}return;case y:return t.push("<?",e.target," ",e.data,"?>");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ve(e,t,r){var n;switch(t.nodeType){case p:(n=t.cloneNode(!1)).ownerDocument=e;case _:break;case f:r=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,r)for(var i=t.firstChild;i;)n.appendChild(ve(e,i,r)),i=i.nextSibling;return n}function ye(e,t,r){var n=new t.constructor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var o=t[i];"object"!=typeof o&&o!=n[i]&&(n[i]=o)}switch(t.childNodes&&(n.childNodes=new F),n.ownerDocument=e,n.nodeType){case p:var a=t.attributes,s=n.attributes=new O,c=a.length;s._ownerElement=n;for(var u=0;u<c;u++)n.setAttributeNode(ye(e,a.item(u),!0));break;case f:r=!0}if(r)for(var l=t.firstChild;l;)n.appendChild(ye(e,l,r)),l=l.nextSibling;return n}function be(e,t,r){e[t]=r}S.INVALID_STATE_ERR=(A[11]="Invalid state",11),S.SYNTAX_ERR=(A[12]="Syntax error",12),S.INVALID_MODIFICATION_ERR=(A[13]="Invalid modification",13),S.NAMESPACE_ERR=(A[14]="Invalid namespace",14),S.INVALID_ACCESS_ERR=(A[15]="Invalid access",15),I.prototype=Error.prototype,u(S,I),F.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var r=[],n=0;n<this.length;n++)ge(this[n],r,e,t);return r.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},P.prototype.item=function(e){return N(this),this[e]||null},l(P,F),O.prototype={length:0,item:F.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var r=this[t];if(r.nodeName==e)return r}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new I(T);var r=this.getNamedItem(e.nodeName);return j(this._ownerElement,this,e,r),r},setNamedItemNS:function(e){var t,r=e.ownerElement;if(r&&r!=this._ownerElement)throw new I(T);return t=this.getNamedItemNS(e.namespaceURI,e.localName),j(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return L(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);return L(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){for(var r=this.length;r--;){var n=this[r];if(n.localName==t&&n.namespaceURI==e)return n}return null}},D.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,r){var n=new H;if(n.implementation=this,n.childNodes=new F,n.doctype=r||null,r&&n.appendChild(r),t){var i=n.createElementNS(e,t);n.appendChild(i)}return n},createDocumentType:function(e,t,r){var n=new ae;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=r||"",n}},U.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Q(this,e,t)},replaceChild:function(e,t){Q(this,e,t,Y),t&&this.removeChild(t)},removeChild:function(e){return V(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return ye(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==h&&e.nodeType==h?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)&&r[n]===e)return n;t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&Object.prototype.hasOwnProperty.call(r,e))return r[e];t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},u(d,U),u(d,U.prototype),H.prototype={nodeName:"#document",nodeType:w,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==_){for(var r=e.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return e}return Q(this,e,t),Z(e,this),null===this.documentElement&&e.nodeType===p&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),V(this,e)},replaceChild:function(e,t){Q(this,e,t,Y),Z(e,this),t&&this.removeChild(t),J(e)&&(this.documentElement=e)},importNode:function(e,t){return ve(this,e,t)},getElementById:function(e){var t=null;return B(this.documentElement,function(r){if(r.nodeType==p&&r.getAttribute("id")==e)return t=r,!0}),t},getElementsByClassName:function(e){var t=c(e);return new P(this,function(r){var n=[];return t.length>0&&B(r.documentElement,function(i){if(i!==r&&i.nodeType===p){var o=i.getAttribute("class");if(o){var a=e===o;if(!a){var s=c(o);a=t.every((u=s,function(e){return u&&-1!==u.indexOf(e)}))}a&&n.push(i)}}var u}),n})},createElement:function(e){var t=new ee;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new F,(t.attributes=new O)._ownerElement=t,t},createDocumentFragment:function(){var e=new le;return e.ownerDocument=this,e.childNodes=new F,e},createTextNode:function(e){var t=new ne;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new oe;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new de;return r.ownerDocument=this,r.tagName=r.nodeName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new te;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ue;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new ee,n=t.split(":"),i=r.attributes=new O;return r.childNodes=new F,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,i._ownerElement=r,r},createAttributeNS:function(e,t){var r=new te,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}},l(H,U),ee.prototype={nodeType:p,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===_?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,W(e.ownerDocument,e,t),Z(t,e.ownerDocument||e),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new P(this,function(t){var r=[];return B(t,function(n){n===t||n.nodeType!=p||"*"!==e&&n.tagName!=e||r.push(n)}),r})},getElementsByTagNameNS:function(e,t){return new P(this,function(r){var n=[];return B(r,function(i){i===r||i.nodeType!==p||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||n.push(i)}),n})}},H.prototype.getElementsByTagName=ee.prototype.getElementsByTagName,H.prototype.getElementsByTagNameNS=ee.prototype.getElementsByTagNameNS,l(ee,U),te.prototype.nodeType=f,l(te,U),re.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(A[k])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},l(re,U),ne.prototype={nodeName:"#text",nodeType:h,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},l(ne,re),ie.prototype={nodeName:"#comment",nodeType:b},l(ie,re),oe.prototype={nodeName:"#cdata-section",nodeType:m},l(oe,re),ae.prototype.nodeType=x,l(ae,U),se.prototype.nodeType=E,l(se,U),ce.prototype.nodeType=v,l(ce,U),ue.prototype.nodeType=g,l(ue,U),le.prototype.nodeName="#document-fragment",le.prototype.nodeType=_,l(le,U),de.prototype.nodeType=y,l(de,U),pe.prototype.serializeToString=function(e,t,r){return fe.call(e,t,r)},U.prototype.toString=fe;try{if(Object.defineProperty){function we(e){switch(e.nodeType){case p:case _:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(we(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(P.prototype,"length",{get:function(){return N(this),this.$$length}}),Object.defineProperty(U.prototype,"textContent",{get:function(){return we(this)},set:function(e){switch(this.nodeType){case p:case _:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),be=function(e,t,r){e["$$"+t]=r}}}catch(xe){}t.DocumentType=ae,t.DOMException=I,t.DOMImplementation=D,t.Element=ee,t.Node=U,t.NodeList=F,t.XMLSerializer=pe},4756:(e,t,r)=>{var n=r(4633)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},4757:(e,t,r)=>{"use strict";var n=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.getRootIfPreferencesExist=void 0;var i=r(3451),o=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var r,i,o={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return o;if(r=t){if(r.has(e))return r.get(e);r.set(e,o)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((i=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(i.get||i.set)?r(o,a,i):o[a]=e[a]);return o}(e)}(r(2054));t.getRootIfPreferencesExist=function(e){var t,r,n=null===(t=i.store.any(e,o.space("preferencesFile"),null,e.doc()))||void 0===t?void 0:t.value;if(!(n=null===(r=n)||void 0===r?void 0:r.split("/").slice(0,-2).join("/")))throw new Error("prefererencesFile is expected to exist in ".concat(e));return n}},4901:(e,t,r)=>{"use strict";e=r.nmd(e),Object.defineProperty(t,"__esModule",{value:!0}),t.originalIconBase=t.icons=t.iconBase=void 0;var n=r(2902),i="https://solidos.github.io/solid-ui/src",o=t.icons=e.scriptURI?{iconBase:e.scriptURI.slice(0,e.scriptURI.lastIndexOf("/"))+"/icons/",originalIconBase:e.scriptURI.slice(0,e.scriptURI.lastIndexOf("/"))+"/originalIcons/"}:"undefined"!=typeof $SolidTestEnvironment&&$SolidTestEnvironment.iconBase?{iconBase:$SolidTestEnvironment.iconBase,originalIconBase:$SolidTestEnvironment.originalIconBase}:{iconBase:i+"/icons/",originalIconBase:i+"/originalIcons/"};(0,n.log)(" icons.iconBase is set to : "+o.iconBase),t.iconBase=o.iconBase,t.originalIconBase=o.originalIconBase},4932:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),a=0;a<r.length;a++)"default"!==r[a]&&i(t,e,r[a]);return o(t,e),t}),s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},c=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.createUtilityLogic=function(e,t,r){function n(t){return s(this,void 0,void 0,function(){var r,n,i,o;return c(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,10]),[4,e.fetcher.load(t)];case 1:return r=a.sent(),[3,10];case 2:if(404!==(n=a.sent()).response.status)return[3,8];a.label=3;case 3:return a.trys.push([3,5,,6]),[4,e.fetcher.webOperation("PUT",t,{data:"",contentType:"text/turtle"})];case 4:return a.sent(),[3,6];case 5:throw i=a.sent(),o="createIfNotExists: PUT FAILED: "+t+": "+i,new l.WebOperationError(o);case 6:return[4,e.fetcher.load(t)];case 7:return a.sent(),[3,9];case 8:if(401===n.response.status)throw new l.UnauthorizedError;if(403===n.response.status){if((0,p.differentOrigin)(t))throw new l.CrossOriginForbiddenError;throw new l.SameOriginForbiddenError}throw o="createIfNotExists doc load error NOT 404: "+t+": "+n,new l.FetchError(n.status,n.message+o);case 9:return[3,10];case 10:return[2,r]}})})}return{recursiveDelete:function n(i){return s(this,void 0,void 0,function(){var o,a,s,u;return c(this,function(c){switch(c.label){case 0:return c.trys.push([0,6,,7]),r.isContainer(i)?[4,t.findAclDocUrl(i)]:[3,5];case 1:return o=c.sent(),[4,e.fetcher._fetch(o,{method:"DELETE"})];case 2:return c.sent(),[4,r.getContainerMembers(i)];case 3:return a=c.sent(),[4,Promise.all(a.map(function(e){return n(e)}))];case 4:c.sent(),c.label=5;case 5:return s=i.value,[2,e.fetcher._fetch(s,{method:"DELETE"})];case 6:return u=c.sent(),d.log("Please manually remove ".concat(i.value," from your system."),u),[3,7];case 7:return[2]}})})},setSinglePeerAccess:function(r){return s(this,void 0,void 0,function(){var n,i;return c(this,function(o){switch(o.label){case 0:return n=["@prefix acl: <http://www.w3.org/ns/auth/acl#>.","","<#alice> a acl:Authorization;\n acl:agent <".concat(r.ownerWebId,">;")," acl:accessTo <".concat(r.target,">;")," acl:default <".concat(r.target,">;")," acl:mode acl:Read, acl:Write, acl:Control.",""].join("\n"),r.accessToModes&&(n+=["<#bobAccessTo> a acl:Authorization;"," acl:agent <".concat(r.peerWebId,">;")," acl:accessTo <".concat(r.target,">;")," acl:mode ".concat(r.accessToModes,"."),""].join("\n")),r.defaultModes&&(n+=["<#bobDefault> a acl:Authorization;"," acl:agent <".concat(r.peerWebId,">;")," acl:default <".concat(r.target,">;")," acl:mode ".concat(r.defaultModes,"."),""].join("\n")),[4,t.findAclDocUrl((0,u.sym)(r.target))];case 1:return i=o.sent(),[2,e.fetcher._fetch(i,{method:"PUT",body:n,headers:[["Content-Type","text/turtle"]]})]}})})},createEmptyRdfDoc:function(t,r){return s(this,void 0,void 0,function(){return c(this,function(n){switch(n.label){case 0:return[4,e.fetcher.webOperation("PUT",t.uri,{data:"# ".concat(new Date," ").concat(r,"\n "),contentType:"text/turtle"})];case 1:return n.sent(),[2]}})})},followOrCreateLink:function(t,r,i,o){return s(this,void 0,void 0,function(){var a,s,p,f;return c(this,function(c){switch(c.label){case 0:return[4,e.fetcher.load(o)];case 1:if(c.sent(),a=e.any(t,r,null,o))return[2,a];if(!e.updater.editable(o))throw p="followOrCreateLink: cannot edit ".concat(o.value),d.warn(p),new l.NotEditableError(p);c.label=2;case 2:return c.trys.push([2,4,,5]),[4,e.updater.update([],[(0,u.st)(t,r,i,o)])];case 3:return c.sent(),[3,5];case 4:throw s=c.sent(),p="followOrCreateLink: Error making link in ".concat(o," to ").concat(i,": ").concat(s),d.warn(p),new l.WebOperationError(s);case 5:return c.trys.push([5,7,,8]),[4,n(i)];case 6:return c.sent(),[3,8];case 7:throw f=c.sent(),d.warn("followOrCreateLink: Error loading or saving new linked document: ".concat(i,": ").concat(f)),f;case 8:return[2,i]}})})},loadOrCreateIfNotExists:n}};var u=r(2209),l=r(1033),d=a(r(8339)),p=r(9013)},4940:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={debug(e){},warn(e){},info(e){},error(e){},success(e){},msg(e){}}},4945:(e,t,r)=>{var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r.g&&r.g||{},i="URLSearchParams"in n,o="Symbol"in n&&"iterator"in Symbol,a="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in n,c="ArrayBuffer"in n;if(c)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&u.indexOf(Object.prototype.toString.call(e))>-1};function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return o&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function m(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function g(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function v(e){var t=new FileReader,r=g(t);return t.readAsArrayBuffer(e),r}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():c&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=m(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return m(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer));if(a)return this.blob().then(v);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,n,i,o=m(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,r=g(t=new FileReader),i=(n=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?n[1]:"utf-8",t.readAsText(e,i),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=d(e),t=p(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},h.prototype.delete=function(e){delete this.map[d(e)]},h.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},h.prototype.set=function(e,t){this.map[d(e)]=p(t)},h.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},h.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),f(e)},h.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),f(e)},h.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),f(e)},o&&(h.prototype[Symbol.iterator]=h.prototype.entries);var w=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function x(e,t){if(!(this instanceof x))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,i,o=(t=t||{}).body;if(e instanceof x){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(i=(r=t.method||this.method||"GET").toUpperCase(),w.indexOf(i)>-1?i:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in n)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function _(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function E(e,t){if(!(this instanceof E))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})},b.call(x.prototype),b.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var S=[301,302,303,307,308];E.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},t.DOMException=n.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function A(e,r){return new Promise(function(i,o){var s=new x(e,r);if(s.signal&&s.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}if(u.onload=function(){var e,t,r={statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{t.append(n,i)}catch(e){console.warn("Response "+e.message)}}}),t)};0===s.url.indexOf("file://")&&(u.status<200||u.status>599)?r.status=200:r.status=u.status,r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;setTimeout(function(){i(new E(n,r))},0)},u.onerror=function(){setTimeout(function(){o(new TypeError("Network request failed"))},0)},u.ontimeout=function(){setTimeout(function(){o(new TypeError("Network request timed out"))},0)},u.onabort=function(){setTimeout(function(){o(new t.DOMException("Aborted","AbortError"))},0)},u.open(s.method,function(e){try{return""===e&&n.location.href?n.location.href:e}catch(t){return e}}(s.url),!0),"include"===s.credentials?u.withCredentials=!0:"omit"===s.credentials&&(u.withCredentials=!1),"responseType"in u&&(a?u.responseType="blob":c&&(u.responseType="arraybuffer")),r&&"object"==typeof r.headers&&!(r.headers instanceof h||n.Headers&&r.headers instanceof n.Headers)){var f=[];Object.getOwnPropertyNames(r.headers).forEach(function(e){f.push(d(e)),u.setRequestHeader(e,p(r.headers[e]))}),s.headers.forEach(function(e,t){-1===f.indexOf(t)&&u.setRequestHeader(t,e)})}else s.headers.forEach(function(e,t){u.setRequestHeader(t,e)});s.signal&&(s.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&s.signal.removeEventListener("abort",l)}),u.send(void 0===s._bodyInit?null:s._bodyInit)})}A.polyfill=!0,n.fetch||(n.fetch=A,n.Headers=h,n.Request=x,n.Response=E),t.Headers=h,t.Request=x,t.Response=E,t.fetch=A,Object.defineProperty(t,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=n.fetch?n:i;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},4967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNegativeLE=void 0,t.mod=h,t.pow=function(e,t,r){return _(k(r),e,t)},t.pow2=function(e,t,r){let n=e;for(;t-- >i;)n*=n,n%=r;return n},t.invert=m,t.tonelliShanks=b,t.FpSqrt=w,t.validateField=function(e){const t=x.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"});return(0,n._validateObject)(e,t),e},t.FpPow=_,t.FpInvertBatch=E,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?m(r,e.ORDER):e.inv(r))},t.FpLegendre=S,t.FpIsSquare=function(e,t){return 1===S(e,t)},t.nLength=A,t.Field=k,t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const i=(e=(0,n.ensureBytes)("privateHash",e)).length,a=A(t).nByteLength+8;if(a<24||i<a||i>1024)throw new Error("hashToPrivateScalar: expected "+a+"-1024 bytes of input, got "+i);return h(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-o)+o},t.getFieldBytesLength=C,t.getMinHashLength=T,t.mapHashToField=function(e,t,r=!1){const i=e.length,a=C(t),s=T(t);if(i<16||i<s||i>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+i);const c=h(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-o)+o;return r?(0,n.numberToBytesLE)(c,a):(0,n.numberToBytesBE)(c,a)};const n=r(8627),i=BigInt(0),o=BigInt(1),a=BigInt(2),s=BigInt(3),c=BigInt(4),u=BigInt(5),l=BigInt(7),d=BigInt(8),p=BigInt(9),f=BigInt(16);function h(e,t){const r=e%t;return r>=i?r:t+r}function m(e,t){if(e===i)throw new Error("invert: expected non-zero number");if(t<=i)throw new Error("invert: expected positive modulus, got "+t);let r=h(e,t),n=t,a=i,s=o,c=o,u=i;for(;r!==i;){const e=n/r,t=n%r,i=a-c*e,o=s-u*e;n=r,r=t,a=c,s=u,c=i,u=o}if(n!==o)throw new Error("invert: does not exist");return h(a,t)}function g(e,t,r){if(!e.eql(e.sqr(t),r))throw new Error("Cannot find square root")}function v(e,t){const r=(e.ORDER+o)/c,n=e.pow(t,r);return g(e,n,t),n}function y(e,t){const r=(e.ORDER-u)/d,n=e.mul(t,a),i=e.pow(n,r),o=e.mul(t,i),s=e.mul(e.mul(o,a),i),c=e.mul(o,e.sub(s,e.ONE));return g(e,c,t),c}function b(e){if(e<s)throw new Error("sqrt is not defined for small field");let t=e-o,r=0;for(;t%a===i;)t/=a,r++;let n=a;const c=k(e);for(;1===S(c,n);)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(1===r)return v;let u=c.pow(n,t);const l=(t+o)/a;return function(e,n){if(e.is0(n))return n;if(1!==S(e,n))throw new Error("Cannot find square root");let i=r,a=e.mul(e.ONE,u),s=e.pow(n,t),c=e.pow(n,l);for(;!e.eql(s,e.ONE);){if(e.is0(s))return e.ZERO;let t=1,r=e.sqr(s);for(;!e.eql(r,e.ONE);)if(t++,r=e.sqr(r),t===i)throw new Error("Cannot find square root");const n=o<<BigInt(i-t-1),u=e.pow(a,n);i=t,a=e.sqr(u),s=e.mul(s,a),c=e.mul(c,u)}return c}}function w(e){return e%c===s?v:e%d===u?y:e%f===p?function(e){const t=k(e),r=b(e),n=r(t,t.neg(t.ONE)),i=r(t,n),o=r(t,t.neg(n)),a=(e+l)/f;return(e,t)=>{let r=e.pow(t,a),s=e.mul(r,n);const c=e.mul(r,i),u=e.mul(r,o),l=e.eql(e.sqr(s),t),d=e.eql(e.sqr(c),t);r=e.cmov(r,s,l),s=e.cmov(u,c,d);const p=e.eql(e.sqr(s),t),f=e.cmov(r,s,p);return g(e,f,t),f}}(e):b(e)}t.isNegativeLE=(e,t)=>(h(e,t)&o)===o;const x=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function _(e,t,r){if(r<i)throw new Error("invalid exponent, negatives unsupported");if(r===i)return e.ONE;if(r===o)return t;let n=e.ONE,a=t;for(;r>i;)r&o&&(n=e.mul(n,a)),a=e.sqr(a),r>>=o;return n}function E(e,t,r=!1){const n=new Array(t.length).fill(r?e.ZERO:void 0),i=t.reduce((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r)),e.ONE),o=e.inv(i);return t.reduceRight((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r)),o),n}function S(e,t){const r=(e.ORDER-o)/a,n=e.pow(t,r),i=e.eql(n,e.ONE),s=e.eql(n,e.ZERO),c=e.eql(n,e.neg(e.ONE));if(!i&&!s&&!c)throw new Error("invalid Legendre symbol result");return i?1:s?0:-1}function A(e,t){void 0!==t&&(0,n.anumber)(t);const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function k(e,t,r=!1,a={}){if(e<=i)throw new Error("invalid field: expected ORDER > 0, got "+e);let s,c,u,l=!1;if("object"==typeof t&&null!=t){if(a.sqrt||r)throw new Error("cannot specify opts in two arguments");const e=t;e.BITS&&(s=e.BITS),e.sqrt&&(c=e.sqrt),"boolean"==typeof e.isLE&&(r=e.isLE),"boolean"==typeof e.modFromBytes&&(l=e.modFromBytes),u=e.allowedLengths}else"number"==typeof t&&(s=t),a.sqrt&&(c=a.sqrt);const{nBitLength:d,nByteLength:p}=A(e,s);if(p>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let f;const g=Object.freeze({ORDER:e,isLE:r,BITS:d,BYTES:p,MASK:(0,n.bitMask)(d),ZERO:i,ONE:o,allowedLengths:u,create:t=>h(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isValidNot0:e=>!g.is0(e)&&g.isValid(e),isOdd:e=>(e&o)===o,neg:t=>h(-t,e),eql:(e,t)=>e===t,sqr:t=>h(t*t,e),add:(t,r)=>h(t+r,e),sub:(t,r)=>h(t-r,e),mul:(t,r)=>h(t*r,e),pow:(e,t)=>_(g,e,t),div:(t,r)=>h(t*m(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>m(t,e),sqrt:c||(t=>(f||(f=w(e)),f(g,t))),toBytes:e=>r?(0,n.numberToBytesLE)(e,p):(0,n.numberToBytesBE)(e,p),fromBytes:(t,i=!0)=>{if(u){if(!u.includes(t.length)||t.length>p)throw new Error("Field.fromBytes: expected "+u+" bytes, got "+t.length);const e=new Uint8Array(p);e.set(t,r?0:e.length-t.length),t=e}if(t.length!==p)throw new Error("Field.fromBytes: expected "+p+" bytes, got "+t.length);let o=r?(0,n.bytesToNumberLE)(t):(0,n.bytesToNumberBE)(t);if(l&&(o=h(o,e)),!i&&!g.isValid(o))throw new Error("invalid field element: outside of range 0..ORDER");return o},invertBatch:e=>E(g,e),cmov:(e,t,r)=>r?t:e});return Object.freeze(g)}function C(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function T(e){const t=C(e);return t+Math.ceil(t/2)}},4994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},5078:(e,t,r)=>{"use strict";var n=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.addStyleSheet=function(e,t){for(var r=e.querySelectorAll("link"),n=0;n<r.length;n++)if("stylesheet"===(r[n].getAttribute("rel")||"")&&(r[n].getAttribute("href")||"")===t)return;var i=e.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("type","text/css"),i.setAttribute("href",t),e.getElementsByTagName("head")[0].appendChild(i)},t.allClassURIs=function(){var e={};return d.store.statementsMatching(void 0,a.rdf("type"),void 0).forEach(function(t){t.object.value&&(e[t.object.value]=!0)}),d.store.statementsMatching(void 0,a.rdfs("subClassOf"),void 0).forEach(function(t){t.object.value&&(e[t.object.value]=!0),t.subject.value&&(e[t.subject.value]=!0)}),d.store.each(void 0,a.rdf("type"),a.rdfs("Class")).forEach(function(t){t.value&&(e[t.value]=!0)}),e},t.askName=function(e,t,r,n,i,o){return new Promise(function(t,c){var u=e.createElement("div");n=n||a.foaf("name");var l=(o=o||(i?p.label(i):" "))+" "+p.label(n)+": ";u.appendChild(e.createElement("p")).textContent=l;var d=e.createElement("input");function f(){u.parentNode.removeChild(u),t(d.value.trim())}d.setAttribute("type","text"),d.setAttribute("size","100"),d.setAttribute("maxLength","2048"),d.setAttribute("style",s.textInputStyle),d.select(),u.appendChild(d),r.appendChild(u),d.addEventListener("keyup",function(e){13===e.keyCode&&f()},!1),u.appendChild(e.createElement("br")),u.appendChild(N(e,function(e){u.parentNode.removeChild(u),t(null)})),u.appendChild(O(e,function(e){f()})),d.focus()})},t.attachmentList=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};function o(r){var n=r,o={noun:b};return m&&(o.deleteFunction=function(){!function(e){if(!x.updater)throw new Error("kb has no updater");x.updater.update((0,i.st)(t,y,e,h),[],function(e,t,r,n){t?s():w(void 0,"Error deleting one: "+r)})}(n)}),R(e,y,r,o)}var s=function(){var e=x.each(t,y);e.sort(),p.syncTableToArray(A,e,o)};function u(e){var r=[];if(e.forEach(function(e){var n=(0,i.sym)(e);c.log("Dropped on attachemnt "+e),r.push((0,i.st)(t,y,n,h))}),!x.updater)throw new Error("kb has no updater");x.updater.update([],r,function(e,t,r,n){t?s():w(void 0,"Error adding one: "+r)})}function f(e){var r,o;(0,l.uploadFiles)(x.fetcher,e,null===(r=n.uploadFolder)||void 0===r?void 0:r.uri,null===(o=n.uploadFolder)||void 0===o?void 0:o.uri,function(e,r){var n=[(0,i.st)(t,y,x.sym(r),h)];if(!x.updater)throw new Error("kb has no updater");x.updater.update([],n,function(e,t,r,n){t?s():w(void 0,"Error adding link to uploaded file: "+r)})})}var h=n.doc||t.doc();void 0===n.modify&&(n.modify=!0);var m=n.modify,g=n.promptIcon||v+"noun_748003.svg",y=n.predicate||a.wf("attachment"),b=n.noun||"attachment",x=d.store,_=r.appendChild(e.createElement("table"));_.setAttribute("style","margin-top: 1em; margin-bottom: 1em;");var E=_.appendChild(e.createElement("tr")),S=E.appendChild(e.createElement("td")),A=E.appendChild(e.createElement("td")).appendChild(e.createElement("table"));if(A.appendChild(e.createElement("tr")),_.refresh=s,s(),m){var k=P(e,g,"Drop attachments here");S.appendChild(k);var C=n.uploadFolder?f:null;if((0,l.makeDropTarget)(k,u,C),(0,l.makeDropTarget)(S,u,C),n.uploadFolder){var T=H(e,f);S.appendChild(T)}}return _},t.button=P,t.cancelButton=N,t.clearElement=function(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e},t.complain=w,t.continueButton=O,t.createLinkDiv=D,t.createNameDiv=L,t.defaultAnnotationStore=function(e){if(void 0!==e.uri){var t=e.uri;if("http://"===t.slice(0,7)){var r=(t=t.slice(7)).indexOf("#");if(r>=0)t=t.slice(0,r);else{var n=t.lastIndexOf("/");if(n<0)return;t=t.slice(0,n)}return d.store.sym("http://tabulator.org/wiki/annnotation/"+t)}}},t.deleteButtonWithCheck=F,t.extractLogURI=function(e){var t=e.search(/logFile=/),r=e.search(/&rulesFile=/);return e.substring(t+8,r)},t.faviconOrDefault=I,t.fileUploadButtonDiv=H,t.findImage=k,t.findImageFromURI=A,t.formatDateTime=x,t.iconForClass=void 0,t.imagesOf=function(e,t){return t.each(e,a.sioc("avatar")).concat(t.each(e,a.foaf("img"))).concat(t.each(e,a.vcard("logo"))).concat(t.each(e,a.vcard("hasPhoto"))).concat(t.each(e,a.vcard("photo"))).concat(t.each(e,a.foaf("depiction")))},t.index=void 0,t.isAudio=function(e){return B(e,"audio")},t.isImage=B,t.isVideo=function(e){return B(e,"video")},t.linkButton=function(e,t){var r=e.createElement("button");return r.setAttribute("type","button"),r.textContent="Goto "+p.label(t),r.addEventListener("click",function(r){e.outlineManager.GotoSubject(t,!0,void 0,!0,void 0)},!0),r},t.openHrefInOutlineMode=function(e){e.preventDefault(),e.stopPropagation();var t=p.getTarget(e).getAttribute("href");if(!t)return c.log("openHrefInOutlineMode: No href found!\n");var r=window.document;r.outlineManager?r.outlineManager.GotoSubject(d.store.sym(t),!0,void 0,!0,void 0):window&&window.panes&&window.panes.getOutliner?window.panes.getOutliner().GotoSubject(d.store.sym(t),!0,void 0,!0,void 0):c.log("ERROR: Can't access outline manager in this config")},t.personTR=void 0,t.propertyTriage=function(e){var t={},r={},n={},i=0,o=0,s=0,c=e.predicateIndex;for(var l in c)"Literal"===c[l][0].object.termType?(r[l]=!0,o++):(n[l]=!0,i++);for(var d=e.each(void 0,a.rdf("type"),a.rdf("Property")),p=0;p<d.length;p++){var f=d[p].toNT();n[f]||r[f]||(r[f]=!0,n[f]=!0,s++)}return t.op=n,t.dp=r,(0,u.info)("propertyTriage: ".concat(i," non-lit, ").concat(o," literal. ").concat(s," unknown.")),t},t.refreshTree=function e(t){if(t.refresh)t.refresh();else for(var r=0;r<t.children.length;r++)e(t.children[r])},t.removeButton=function(e,t){var r=e.createElement("button");return r.setAttribute("type","button"),r.textContent="✕",r.addEventListener("click",function(e){t.parentNode.removeChild(t)},!0),r},t.renderAsDiv=function(e,t,r){var n=e.createElement("div");n.setAttribute("style",s.renderAsDivStyle);var i=(r=r||{}).image||I(e,t);return(0,h.createImageDiv)(e,n,i),L(e,n,r.title,t),D(e,n,t,r),r.clickable&&r.onClickFunction&&(0,h.addClickListenerToElement)(n,r.onClickFunction),r.wrapInATR?(0,h.wrapDivInATR)(e,n,t):n},t.renderAsRow=j,t.selectorPanel=function(e,t,r,n,i,o,a,s,c){return U(e.createElement("div"),e,t,r,n,i,o,a,s,c)},t.selectorPanelRefresh=U,t.setImage=T,t.setName=_,t.shortDate=function(e,t){if(!e)return"???";try{var r=(new Date).toISOString();return e.slice(0,10)!==r.slice(0,10)||t?e.slice(0,4)===r.slice(0,4)?["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][parseInt(e.slice(5,7),10)-1]+" "+parseInt(e.slice(8,10),10):e.slice(0,10):e.slice(11,16)}catch(e){return"shortdate:"+e}},t.shortTime=function(){return x(new Date,"{Hours}:{Minutes}:{Seconds}.{Milliseconds}")},t.timestamp=function(){return x(new Date,"{FullYear}-{Month}-{Date}T{Hours}:{Minutes}:{Seconds}.{Milliseconds}")};var i=r(2209),o=r(4901),a=g(r(2054)),s=g(r(5148)),c=g(r(2902)),u=r(9295),l=r(3957),d=r(3451),p=g(r(7499)),f=r(1302),h=r(3054),m=r(6691);function g(e,t){if("function"==typeof WeakMap)var r=new WeakMap,i=new WeakMap;return(g=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return s;if(o=t?i:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var v=o.icons.iconBase,y=v+"noun_1180156.svg",b=v+"noun_1180158.svg";function w(e,t){if(t){var r=function(e){var t=e&&e.statusArea||e&&e.div||null;if(t)return t;var r=e&&e.dom;if(r||"undefined"==typeof document||(r=document),r){var n=r.getElementsByTagName("body")[0];return t=r.createElement("div"),n.insertBefore(t,n.firstElementChild),e&&(e.statusArea=t),t}return null}(e);c.log("Complaint: "+t),r?r.appendChild((0,f.errorMessageBlock)(e&&e.dom||document,t)):alert(t)}}function x(e,t){return t.split("{").map(function(t){var r=t.split("}")[0];return t?("000"+(e["get"+r]()+({Month:1}[r]||0))).slice(-({Milliseconds:3,FullYear:4}[r]||2))+t.split("}")[1]:""}).join("")}function _(e,t){var r=d.store,n=function(e){var t=r.any(e,a.vcard("fn"))||r.any(e,a.foaf("name"))||r.any(e,a.vcard("organization-name"));return t?t.value:null},i=t.sameTerm(a.foaf("Agent"))?"Everyone":n(t);if(e.textContent=i||p.label(t),!i&&t.uri){if(!r.fetcher)throw new Error("kb has no fetcher");r.fetcher.nowOrWhenFetched(t.doc(),void 0,function(r){e.textContent=n(t)||p.label(t)})}}var E=t.iconForClass={"solid:AppProviderClass":"noun_144.svg","solid:AppProvider":"noun_15177.svg","solid:Pod":"noun_Cabinet_1434380.svg","vcard:Group":"noun_339237.svg","vcard:Organization":"noun_143899.svg","vcard:Individual":"noun_15059.svg","schema:Person":"noun_15059.svg","foaf:Person":"noun_15059.svg","foaf:Agent":"noun_98053.svg","acl:AuthenticatedAgent":"noun_99101.svg","prov:SoftwareAgent":"noun_Robot_849764.svg","vcard:AddressBook":"noun_15695.svg","trip:Trip":"noun_581629.svg","meeting:LongChat":"noun_1689339.svg","meeting:Meeting":"noun_66617.svg","meeting:Project":"noun_1036577.svg","ui:Form":"noun_122196.svg","rdfs:Class":"class-rectangle.svg","rdf:Property":"property-diamond.svg","owl:Ontology":"noun_classification_1479198.svg","wf:Tracker":"noun_122196.svg","wf:Task":"noun_17020_gray-tick.svg","wf:Open":"noun_17020_sans-tick.svg","wf:Closed":"noun_17020.svg"};function S(e){var t=e.uri.split("#")[0],r=t.indexOf("//");if(r<0)throw new Error("This URI does not have a web site part (origin)");var n=t.indexOf("/",r+2);return n<0?t.slice(0)+"/":t.slice(0,n+1)}function A(e){var t=v;return"string"!=typeof e&&e.uri?4!==e.uri.split("/").length||e.uri.split("/")[1]||e.uri.split("/")[3]?e.uri.startsWith("message:")||e.uri.startsWith("mid:")?t+"noun_480183.svg":e.uri.startsWith("mailto:")?t+"noun_567486.svg":e.uri.startsWith("https:")&&e.uri.indexOf("#")<0?S(e)+"favicon.ico":null:t+"noun_15177.svg":t+"noun_10636_grey.svg"}function k(e){var t=d.store,r=v;if(e.sameTerm(a.foaf("Agent"))||e.sameTerm(a.rdf("Resource")))return r+"noun_98053.svg";var n=t.any(e,a.sioc("avatar"))||t.any(e,a.foaf("img"))||t.any(e,a.vcard("logo"))||t.any(e,a.vcard("hasPhoto"))||t.any(e,a.vcard("photo"))||t.any(e,a.foaf("depiction"));return n?n.uri:null}function C(e,t,r){var n=d.store,i=k(t);if(i)return e.setAttribute("src",i),!0;var o=r[t.uri];if(o)return e.setAttribute("src",o),e.style=s.classIconStyle,!0;var a=A(t);if(a)return e.setAttribute("src",a),!0;var c=n.findTypeURIs(t);for(var u in c)if(r[u])return e.setAttribute("src",r[u]),!1;return e.setAttribute("src",v+"noun_10636_grey.svg"),!1}function T(e,t){var r=d.store,n={};for(var o in E){var s=o.split(":")[0],c=o.split(":")[1],u=a[s](c);n[u.uri]=i.uri.join(E[o],v)}if(!C(e,t,n)&&t.uri){if(!r.fetcher)throw new Error("kb has no fetcher");r.fetcher.nowOrWhenFetched(t.doc(),void 0,function(r){r&&C(e,t,n)})}}function I(e,t){var r=e.createElement("img");if(r.style=s.iconStyle,r.setAttribute("src",v+(function(e){if(!e.uri)return!1;var t=e.uri.split("/");return 3===t.length||4===t.length&&""===t[3]}(t)?"noun_15177.svg":"noun_681601.svg")),t.uri&&t.uri.startsWith("https:")&&t.uri.indexOf("#")<0){var n=e.createElement("object");return n.setAttribute("data",S(t)+"favicon.ico"),n.setAttribute("type","image/x-icon"),n.appendChild(r),n}return T(r,t),r}function F(e,t,r,n){var i=v+"noun_2188_red.svg",a=e.createElement("img");a.setAttribute("src",i),a.setAttribute("style",s.smallButtonStyle),a.style.float="right";var c="Remove this "+r;return a.title=c,a.classList.add("hoverControlHide"),a.addEventListener("click",function(){var r=e.createElement("div");t.insertBefore(r,a),r.style.position="relative",r.appendChild(function(e,t,r,n){function i(){t.parentElement.removeChild(t)}function a(){i(),n()}var c=e.createElement("div");c.style=s.confirmPopupStyle,c.style.position="absolute",c.style.top="-1em",c.style.display="grid",c.style.gridTemplateColumns="auto auto";var u=e.createElement("div");u.style.gridColumn="1/2",u.style.gridRow="1";var l=e.createElement("div");l.style.gridColumn="1/2",l.style.gridRow="2";var d=N(e,i);c.appendChild(d),d.style.gridColumn="1",d.style.gridRow="2";var p=c.appendChild(e.createElement("button"));p.style=s.buttonStyle,p.style.gridRow="2",p.style.gridColumn="2",p.textContent="Cancel";var f=P(e,o.icons.iconBase+"noun_925021.svg","Delete it");c.appendChild(f),f.style.gridRow="1",f.style.gridColumn="1";var h=c.appendChild(e.createElement("button"));return h.style=s.buttonStyle,h.style.gridRow="1",h.style.gridColumn="2",h.textContent=r,c.appendChild(h),f.addEventListener("click",a),h.addEventListener("click",a),p.addEventListener("click",i),c}(e,r,c,n))}),t.classList.add("hoverControl"),t.appendChild(a),a.setAttribute("data-testid","deleteButtonWithCheck"),a}function P(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{buttonColor:"Primary",needsBorder:!1},o=e.createElement("button");if(o.setAttribute("type","button"),t){var a=o.appendChild(e.createElement("img"));a.setAttribute("src",t),a.setAttribute("style","width: 2em; height: 2em;"),a.title=r,o.setAttribute("style",s.buttonStyle)}else o.textContent=r.toLocaleUpperCase(),o.onmouseover=function(){"Secondary"===i.buttonColor?i.needsBorder?o.setAttribute("style",s.secondaryButtonNoBorderHover):o.setAttribute("style",s.secondaryButtonHover):i.needsBorder?o.setAttribute("style",s.primaryButtonNoBorderHover):o.setAttribute("style",s.primaryButtonHover)},o.onmouseout=function(){"Secondary"===i.buttonColor?i.needsBorder?o.setAttribute("style",s.secondaryButtonNoBorder):o.setAttribute("style",s.secondaryButton):i.needsBorder?o.setAttribute("style",s.primaryButtonNoBorder):o.setAttribute("style",s.primaryButton)},"Secondary"===i.buttonColor?i.needsBorder?o.setAttribute("style",s.secondaryButtonNoBorder):o.setAttribute("style",s.secondaryButton):i.needsBorder?o.setAttribute("style",s.primaryButtonNoBorder):o.setAttribute("style",s.primaryButton);return n&&o.addEventListener("click",n,!1),o}function N(e,t){var r=P(e,y,"Cancel",t);return r.firstChild&&(r.firstChild.style.opacity="0.3"),r}function O(e,t){return P(e,b,"Continue",t)}var R=t.personTR=j;function j(e,t,r,n){var i=e.createElement("tr");n=n||{};var o=i.appendChild(e.createElement("td")),a=i.appendChild(e.createElement("td")),s=i.appendChild(e.createElement("td")),c=n.image||I(e,r);return o.setAttribute("style","vertical-align: middle; width:2.5em; padding:0.5em; height: 2.5em;"),a.setAttribute("style","vertical-align: middle; text-align:left;"),s.setAttribute("style","vertical-align: middle; width:2em; padding:0.5em; height: 4em;"),o.appendChild(c),n.title?a.textContent=n.title:_(a,r),n.deleteFunction&&F(e,s,n.noun||"one",n.deleteFunction),r.uri&&(!1!==n.link&&(s.appendChild((0,m.linkIcon)(e,r)).classList.add("HoverControlHide"),s.appendChild(e.createElement("br"))),!1!==n.draggable&&(c.setAttribute("draggable","false"),(0,l.makeDraggable)(i,r))),i.subject=r,i}function L(e,t,r,n){var i=t.appendChild(e.createElement("div"));r?i.textContent=r:_(i,n)}function D(e,t,r,n){var i=t.appendChild(e.createElement("div"));i.setAttribute("style",s.linkDivStyle),n.deleteFunction&&F(e,i,n.noun||"one",n.deleteFunction),r.uri&&(!1!==n.link&&(0,m.createLinkForURI)(e,i,r),(0,l.makeDraggable)(t,r))}function U(e,t,r,n,i,o,a,s,c,u){var l="border: 0.1em solid #ddd; border-bottom: none; width: 95%; height: 2em; padding: 0.5em;",d=null;e.innerHTML="";for(var p=function(e,a){var p,f,h=function(){var e=o?r.each(void 0,i,a):r.each(a,i);b.setAttribute("class",0===e.length?"hideTillHover":""),f.setAttribute("src",s.connectIcon||v+"noun_25830.svg"),f.setAttribute("title",e.length?e.length:"attach")},m=M.twoLine.widgetForClass(n);(p=m(t,a)).setAttribute("style",l);var g=t.createElement("div");g.setAttribute("class","hideTillHover"),g.setAttribute("style","float:right; width:10%");var y=t.createElement("a");y.setAttribute("href",a.uri),y.setAttribute("style","float:right"),g.appendChild(y).textContent=">",e.appendChild(g);var b=t.createElement("div");return b.setAttribute("style",(o?"float:left;":"float:right;")+" width:30px;"),f=t.createElement("img"),h(),b.appendChild(f),e.appendChild(b),p.addEventListener("click",function(e){d===p?(p.setAttribute("style",l),d=null):(d&&d.setAttribute("style",l),p.setAttribute("style",l+"background-color: #ccc; color:black;"),d=p),c(a,e,d===p),h()},!1),f.addEventListener("click",function(e){u(a,e,o,h)},!1),e.appendChild(p),e},f=0;f<a.length;f++){var h=t.createElement("div");e.appendChild(h),p(h,a[f])}return e}var M=t.index={};function B(e,t){var r=t||"image",n=d.store.findTypeURIs(e),o=i.Util.mediaTypeClass(r+"/*").uri.split("*")[0];for(var a in n)if(a.startsWith(o))return!0;return{audio:"http://purl.org/dc/dcmitype/Sound",image:"http://purl.org/dc/dcmitype/Image",video:"http://purl.org/dc/dcmitype/MovingImage"}[r]in n}function H(e,t){var r=e.createElement("div"),n=r.appendChild(e.createElement("input"));n.setAttribute("type","file"),n.setAttribute("multiple","true"),n.addEventListener("change",function(e){c.log("File drop event: ",e),e.files?t(e.files):e.target&&e.target.files?t(e.target.files):alert("Sorry no files .. internal error?")},!1),n.style="display:none";var i=r.appendChild(P(e,v+"noun_Upload_76574_000000.svg","Upload files",function(e){n.click()}));return(0,l.makeDropTarget)(i,null,t),r}t.index=M={line:{},twoLine:{"":function(e,t){var r=e.createElement("div");return r.textContent=p.label(t),r},"http://www.w3.org/2000/10/swap/pim/qif#Transaction":function(e,t){var r="",n=function(e){var n=d.store.any(t,a.qu(e));return n||(r+="@@ No value for "+e+"! "),n?p.escapeForXML(n.value):"?"},i=e.createElement("table");return i.innerHTML='\n <tr>\n <td colspan="2"> '.concat(n("payee"),"</td>\n < /tr>\n < tr >\n <td>").concat(n("date").slice(0,10),'</td>\n <td style = "text-align: right;">').concat(n("amount"),"</td>\n </tr>"),r&&(i.innerHTML='\n <tr>\n <td><a href="'.concat(p.escapeForXML(t.uri),'">').concat(p.escapeForXML(r),"</a></td>\n </tr>")),i},"http://www.w3.org/ns/pim/trip#Trip":function(e,t){var r=function(e){var r=d.store.any(t,e);return r?p.escapeForXML(r.value):"?"},n=e.createElement("table");return n.innerHTML='\n <tr>\n <td colspan="2">'.concat(r(a.dc("title")),'</td>\n </tr>\n <tr style="color: #777">\n <td>').concat(r(a.cal("dtstart")),"</td>\n <td>").concat(r(a.cal("dtend")),"</td>\n </tr>"),n},widgetForClass:function(e){var t=M.twoLine[e.uri],r=d.store;if(t)return t;var n=r.findSuperClassesNT(e);for(var i in n)if(t=M.twoLine[r.fromNT(i).uri])return t;return M.twoLine[""]}}}},5108:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(4705),i=r(1059),o=r(8936),a=r(9403),s=r(2931),c=r(2915);class u extends o.A{constructor(e){if(super((0,s.E)(e)),(0,n.A)(this,"termType",a.Kk),(0,n.A)(this,"classOrder",i.A.NamedNode),!this.value)throw new Error("Missing IRI for NamedNode");if(!this.value.includes(":"))throw new Error('NamedNode IRI "'+e+'" must be absolute.');if(this.value.includes(" "))throw new Error('Error: NamedNode IRI "'+e+'" must not contain unencoded spaces.')}dir(){var e=this.value.split("#")[0],t=e.slice(0,-1).lastIndexOf("/"),r=e.indexOf("//");return r>=0&&t<r+2||t<0?null:new u(e.slice(0,t+1))}site(){var e=this.value.split("#")[0],t=e.indexOf("//");if(t<0)throw new Error("This URI does not have a web site part (origin)");var r=e.indexOf("/",t+2);return new u(r<0?e.slice(0)+"/":e.slice(0,r+1))}doc(){return this.value.indexOf("#")<0?this:new u(this.value.split("#")[0])}toString(){return"<"+this.value+">"}id(){return this.value.split("#")[1]}get uri(){return this.value}set uri(e){this.value=e}static fromValue(e){return null==e||(0,c.D0)(e)?e:new u(e)}}},5130:(e,t,r)=>{"use strict";r.d(t,{JU:()=>d,Yp:()=>l,Y5:()=>u});var n=r(5141),i=r(7991),o=r(1575),a=r(1436),s=r(5994);const c=async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:(0,a.lF)(e)};if(!(0,i.R)(e))throw new TypeError((0,o.A)(e,...s.g,"Uint8Array"));if(!e.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");const{ext:t,key_ops:r,alg:n,use:c,...u}=await i.A.subtle.exportKey("jwk",e);return u};async function u(e){return(0,n.Nj)(e)}async function l(e){return(0,n.Jq)(e)}async function d(e){return c(e)}},5141:(e,t,r)=>{"use strict";r.d(t,{IG:()=>m,sc:()=>g,zp:()=>b,Jq:()=>d,Nj:()=>l});var n=r(7991),i=r(1575),o=r(1436);const a=(e,t)=>`-----BEGIN ${t}-----\n${(e.match(/.{1,64}/g)||[]).join("\n")}\n-----END ${t}-----`;var s=r(7493),c=r(5994);const u=async(e,t,r)=>{if(!(0,n.R)(r))throw new TypeError((0,i.A)(r,...c.g));if(!r.extractable)throw new TypeError("CryptoKey is not extractable");if(r.type!==e)throw new TypeError(`key is not a ${e} key`);return a((0,o.WG)(new Uint8Array(await n.A.subtle.exportKey(t,r))),`${e.toUpperCase()} KEY`)},l=e=>u("public","spki",e),d=e=>u("private","pkcs8",e),p=(e,t,r=0)=>{0===r&&(t.unshift(t.length),t.unshift(6));const n=e.indexOf(t[0],r);if(-1===n)return!1;const i=e.subarray(n,n+t.length);return i.length===t.length&&(i.every((e,r)=>e===t[r])||p(e,t,n+1))},f=e=>{switch(!0){case p(e,[42,134,72,206,61,3,1,7]):return"P-256";case p(e,[43,129,4,0,34]):return"P-384";case p(e,[43,129,4,0,35]):return"P-521";case p(e,[43,101,110]):return"X25519";case p(e,[43,101,111]):return"X448";case p(e,[43,101,112]):return"Ed25519";case p(e,[43,101,113]):return"Ed448";default:throw new s.JOSENotSupported("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},h=async(e,t,r,i,o)=>{let a,c;const u=new Uint8Array(atob(r.replace(e,"")).split("").map(e=>e.charCodeAt(0))),l="spki"===t;switch(i){case"PS256":case"PS384":case"PS512":a={name:"RSA-PSS",hash:`SHA-${i.slice(-3)}`},c=l?["verify"]:["sign"];break;case"RS256":case"RS384":case"RS512":a={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${i.slice(-3)}`},c=l?["verify"]:["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":a={name:"RSA-OAEP",hash:`SHA-${parseInt(i.slice(-3),10)||1}`},c=l?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":a={name:"ECDSA",namedCurve:"P-256"},c=l?["verify"]:["sign"];break;case"ES384":a={name:"ECDSA",namedCurve:"P-384"},c=l?["verify"]:["sign"];break;case"ES512":a={name:"ECDSA",namedCurve:"P-521"},c=l?["verify"]:["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{const e=f(u);a=e.startsWith("P-")?{name:"ECDH",namedCurve:e}:{name:e},c=l?[]:["deriveBits"];break}case"Ed25519":a={name:"Ed25519"},c=l?["verify"]:["sign"];break;case"EdDSA":a={name:f(u)},c=l?["verify"]:["sign"];break;default:throw new s.JOSENotSupported('Invalid or unsupported "alg" (Algorithm) value')}return n.A.subtle.importKey(t,u,a,o?.extractable??!1,c)},m=(e,t,r)=>h(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"pkcs8",e,t,r),g=(e,t,r)=>h(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",e,t,r);function v(e){const t=[];let r=0;for(;r<e.length;){const n=y(e.subarray(r));t.push(n),r+=n.byteLength}return t}function y(e){let t=0,r=31&e[0];if(t++,31===r){for(r=0;e[t]>=128;)r=128*r+e[t]-128,t++;r=128*r+e[t]-128,t++}let n=0;if(e[t]<128)n=e[t],t++;else{if(128===n){for(n=0;0!==e[t+n]||0!==e[t+n+1];){if(n>e.byteLength)throw new TypeError("invalid indefinite form length");n++}const r=t+n+2;return{byteLength:r,contents:e.subarray(t,t+n),raw:e.subarray(0,r)}}{const r=127&e[t];t++,n=0;for(let i=0;i<r;i++)n=256*n+e[t],t++}}const i=t+n;return{byteLength:i,contents:e.subarray(t,i),raw:e.subarray(0,i)}}const b=(e,t,r)=>{let n;try{n=function(e){const t=e.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g,""),r=(0,o.y4)(t);return a(function(e){const t=v(v(y(e).contents)[0].contents);return(0,o.WG)(t[160===t[0].raw[0]?6:5].raw)}(r),"PUBLIC KEY")}(e)}catch(e){throw new TypeError("Failed to parse the X.509 certificate",{cause:e})}return g(n,t,r)}},5145:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},5148:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.style=void 0;var i=n(r(471)),o=t.style={checkboxStyle:"color: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;",checkboxInputStyle:"font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em;",fieldLabelStyle:"color: #3B5998; text-decoration: none;",formSelectStyle:"background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;",textInputStyle:"background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;",textInputStyleUneditable:"background-color: white; padding: 0.5em; border: .05em solid white; border-radius:0.2em; font-size: 100%; margin:0.4em;",buttonStyle:"background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;",commentStyle:"padding: 0.7em; border: none; font-size: 100%; white-space: pre-wrap;",iconStyle:"width: 3em; height: 3em; margin: 0.1em; border-radius: 1em;",smallButtonStyle:"margin: 0.2em; width: 1em; height:1em;",classIconStyle:"width: 3em; height: 3em; margin: 0.1em; border-radius: 0.2em; border: 0.1em solid green; padding: 0.2em; background-color: #efe;",confirmPopupStyle:"padding: 0.7em; border-radius: 0.2em; border: 0.1em solid orange; background-color: white; box-shadow: 0.5em 0.9em #888;",messageBodyStyle:"white-space: pre-wrap; width: 99%; font-size:100%; border: 0.07em solid #eee; border-radius:0.2em; padding: .3em 0.5em; margin: 0.1em;",pendingeditModifier:"color: #bbb;",personaBarStyle:"width: 100%; height: 4em; background-color: #eee; vertical-align: middle;",searchInputStyle:"border: 0.1em solid #444; border-radius: 0.2em; width: 100%; font-size: 100%; padding: 0.1em 0.6em; margin 0.2em;",autocompleteRowStyle:"border: 0.2em solid straw;",signInAndUpButtonStyle:"padding: 1em; border-radius:0.2em; font-size: 100%;",headerBannerLoginInput:"margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important;",signUpBackground:"background-color: #eef;",signInBackground:"background-color: #efe;",heading1Style:"font-size: 180%; font-weight: bold; color: #888888; padding: 0.5em; margin: 0.7em 0.0m;",heading2Style:"font-size: 130%; font-weight: bold; color: #888888; padding: 0.4em; margin: 0.7em 0.0em;",heading3Style:"font-size: 120%; font-weight: bold; color: #888888; padding: 0.3em; margin: 0.7em 0.0em;",heading4Style:"font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;",formHeadingStyle:"font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;",formTextInput:"font-size: 100%; margin: 0.1em; padding: 0.1em;",formGroupStyle:["padding-left: 0em; border: 0.0em solid ".concat(i.default.formBorderColor,"; border-radius: 0.2em;"),"padding-left: 2em; border: 0.05em solid ".concat(i.default.formBorderColor,"; border-radius: 0.2em;"),"padding-left: 2em; border: 0.1em solid ".concat(i.default.formBorderColor,"; border-radius: 0.2em;"),"padding-left: 2em; border: 0.2em solid ".concat(i.default.formBorderColor,"; border-radius: 0.2em;")],formFieldLabelStyle:"color: ".concat(i.default.lowProfileLinkColor,"; text-decoration: none;"),formFieldNameBoxStyle:"padding: 0.3em; vertical-align: middle; width:".concat(i.default.formFieldNameBoxWidth,";"),multilineTextInputStyle:"font-size:100%; white-space: pre-wrap; background-color: #eef; border: 0.07em solid gray; padding: 1em 0.5em; margin: 1em 1em;",renderAsDivStyle:"display: flex; align-items: center; justify-content: space-between; height: 2.5em; padding: 1em;",imageDivStyle:"width:2.5em; padding:0.5em; height: 2.5em;",linkDivStyle:"width:2em; padding:0.5em; height: 4em;",aclControlBoxContainer:"margin: 1em;",aclControlBoxHeader:"font-size: 120%; margin: 0 0 1rem;",aclControlBoxStatus:"display: none; margin: 1rem 0;",aclControlBoxStatusRevealed:"display: block;",aclGroupContent:"maxWidth: 650;",accessGroupList:"display: grid; grid-template-columns: 1fr; margin: 1em; width: 100%;",accessGroupListItem:"display: grid; grid-template-columns: 100px auto 30%;",defaultsController:"display: flex;",defaultsControllerNotice:"color: #888; flexGrow: 1; fontSize: 80%;",bigButton:"background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em;",group:"color: #888;",group1:"color: green;",group2:"color: #cc0;",group3:"color: orange;",group5:"color: red;",group9:"color: blue;",group13:"color: purple;",trustedAppAddApplicationsTable:"background-color: #eee;",trustedAppCancelButton:"float: right;",trustedAppControllerI:"border-color: orange; border-radius: 1em; border-width: 0.1em;",temporaryStatusInit:"background: green;",temporaryStatusEnd:"background: transparent; transition: background 5s linear;",headerUserMenuLink:"background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none;",headerUserMenuLinkHover:"background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%);",headerUserMenuTrigger:"background: none; border: 0; cursor: pointer; width: 60px; height: 60px;",headerUserMenuTriggerImg:"border-radius: 50%; height: 56px; width: 28px !important;",headerUserMenuButton:"background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%;",headerUserMenuButtonHover:"background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%);",headerUserMenuList:"list-style: none; margin: 0; padding: 0;",headerUserMenuListDisplay:"list-style: none; margin: 0; padding: 0; display:true;",headerUserMenuNavigationMenu:"background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true;",headerUserMenuNavigationMenuNotDisplayed:"background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none;",headerUserMenuListItem:"border-bottom: solid 1px #000000;",headerUserMenuPhoto:"border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px;",headerBanner:"box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px;",headerBannerLink:"display: block;",headerBannerRightMenu:"display: flex;",headerBannerLogin:"margin-left: auto;",allChildrenVisible:"display:true;",headerBannerUserMenu:"border-left: solid 1px #000000; margin-left: auto;",headerBannerHelpMenu:"border-left: solid 1px #000000; margin-left: auto;",headerBannerIcon:"background-size: 65px 60px !important; height: 60px !important; width: 65px !important;",footer:"border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em;",primaryButton:"background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;",primaryButtonHover:"background-color: #9f7dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;",primaryButtonNoBorder:"background-color: #ffffff; color: #7c4dff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;",primaryButtonNoBorderHover:"background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;",secondaryButton:"background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;",secondaryButtonHover:"background-color: #37cde6; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;",secondaryButtonNoBorder:"background-color: #ffffff; color: #01c9ea; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;",secondaryButtonNoBorderHover:"background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;",controlStyle:"border-radius: 0.5em; margin: 0.8em; width:".concat(i.default.mediaModuleCanvasWidth,"; height:").concat(i.default.mediaModuleCanvasHeight,";"),dragEvent:"background-color: #ccc; border: 0.25em dashed black; border-radius: 0.3em;",dropEvent:"background-color: white; border: 0em solid black;",restoreStyle:"background-color: white;",errorCancelButton:"width: 2em; height: 2em; align: right;",errorMessageBlockStyle:"margin: 0.1em; padding: 0.5em; border: 0.05em solid gray; color:black;",notepadStyle:"padding: 1em; overflow: auto; resize: horizontal; min-width: 40em;",upstreamStatus:"width: 50%;",downstreamStatus:"width: 50%;",baseStyle:"font-size: 100%; font-family: monospace; width: 100%; border: none; white-space: pre-wrap;",headingCore:"font-family: sans-serif; font-weight: bold; border: none;",headingStyle:["font-size: 110%; padding-top: 0.5em; padding-bottom: 0.5em; width: 100%;","font-size: 120%; padding-top: 1em; padding-bottom: 1em; width: 100%;","font-size: 150%; padding-top: 1em; padding-bottom: 1em; width: 100%;"],participantsStyle:"margin: 0.8em;",participantsBlock:"height: 1.5em; width: 1.5em; margin: 0.3em; border 0.01em solid #888;",personTableTD:"vertical-align: middle;",tabsNavElement:"margin: 0;",tabsRootElement:"display: flex; height: 100%; width: 100%;",tabsMainElement:"margin: 0; width:100%; height: 100%;",tabContainer:"list-style-type: none; display: flex; height: 100%; width: 100%; margin: 0; padding: 0;",makeNewSlot:"background: none; border: none; font: inherit; cursor: pointer;",ellipsis:"position: absolute; right: 0; bottom: 0; width: 20%; background: none; color: inherit; border: none; padding: 0; font: inherit; cursor: pointer; outline: inherit;"};o.setStyle=function(e,t){e.style=o[t]},e.exports=o},5172:e=>{e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},5246:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.emptyProfile=void 0,t.emptyProfile='\n<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 26 26" fill="none">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M13 25C19.6274 25 25 19.6274 25 13C25 6.37258 19.6274 1 13 1C6.37258 1 1 6.37258 1 13C1 19.6274 6.37258 25 13 25Z" fill="#D8D8D8" stroke="#8B8B8B"/>\n <mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="26" height="26">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M13 25C19.6274 25 25 19.6274 25 13C25 6.37258 19.6274 1 13 1C6.37258 1 1 6.37258 1 13C1 19.6274 6.37258 25 13 25Z" fill="white" stroke="white"/>\n </mask>\n <g mask="url(#mask0)">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M17.0468 10.4586C17.0468 14.4979 15.4281 16.9214 12.9999 16.9214C10.5718 16.9214 8.95298 14.4979 8.95298 10.4586C8.95298 6.41931 12.9999 6.41931 12.9999 6.41931C12.9999 6.41931 17.0468 6.41931 17.0468 10.4586ZM4.09668 23.3842C6.52483 17.7293 12.9999 17.7293 12.9999 17.7293C12.9999 17.7293 19.475 17.7293 21.9031 23.3842C21.9031 23.3842 17.8481 25 12.9999 25C8.15169 25 4.09668 23.3842 4.09668 23.3842Z" fill="#8B8B8B"/>\n </g>\n</svg>'},5306:function(e,t){var r,n;void 0===(n="function"==typeof(r=function(){"use strict";function e(t,r,n,i){this.message=t,this.expected=r,this.found=n,this.location=i,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),e.buildMessage=function(e,t){var r={literal:function(e){return'"'+i(e.text)+'"'},class:function(e){var t,r="";for(t=0;t<e.parts.length;t++)r+=e.parts[t]instanceof Array?o(e.parts[t][0])+"-"+o(e.parts[t][1]):o(e.parts[t]);return"["+(e.inverted?"^":"")+r+"]"},any:function(e){return"any character"},end:function(e){return"end of input"},other:function(e){return e.description}};function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function i(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+n(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+n(e)})}function o(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+n(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+n(e)})}function a(e){return r[e.type](e)}return"Expected "+function(e){var t,r,n=new Array(e.length);for(t=0;t<e.length;t++)n[t]=a(e[t]);if(n.sort(),n.length>0){for(t=1,r=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+function(e){return e?'"'+i(e)+'"':"end of input"}(t)+" found."},{SyntaxError:e,parse:function(t,r){r=void 0!==r?r:{};var n,i={},o={turtleDoc:$r},a=$r,s=function(e){var t=xn.toJSON();return t["@graph"]=[],e.filter(e=>Array.isArray(e)).forEach(e=>{e.forEach(e=>{t["@graph"].push(e)})}),1===t["@graph"].length&&(Object.assign(t,t["@graph"][0]),delete t["@graph"]),t},c="\ufeff",u=Wr("\ufeff",!1),l=".",d=Wr(".",!1),p=function(e){return e},f="#",h=Wr("#",!1),m=/^[^\n]/,g=Vr(["\n"],!0,!1),v="\n",y=Wr("\n",!1),b=function(e){return e.join("")},w="@prefix",x=Wr("@prefix",!1),_=function(e,t){return xn.addPrefix(""===e?"0":e,t),{}},E="@base",S=Wr("@base",!1),A=function(e){return xn.addBase(e),{}},k=/^[Bb]/,C=Vr(["B","b"],!1,!1),T=/^[Aa]/,I=Vr(["A","a"],!1,!1),F=/^[Ss]/,P=Vr(["S","s"],!1,!1),N=/^[Ee]/,O=Vr(["E","e"],!1,!1),R=/^[Pp]/,j=Vr(["P","p"],!1,!1),L=/^[Rr]/,D=Vr(["R","r"],!1,!1),U=/^[Ff]/,M=Vr(["F","f"],!1,!1),B=/^[Ii]/,H=Vr(["I","i"],!1,!1),q=/^[Xx]/,W=Vr(["X","x"],!1,!1),V=function(e,t){var r={};return"string"==typeof e&&"[]"!==e?r["@id"]=e:"object"==typeof e&&Object.assign(r,e),t&&Object.assign(r,t),[r]},K=function(e,t){var r={};return e&&Object.assign(r,e),t&&Object.assign(r,t),[r]},J=";",z=Wr(";",!1),$=function(e,t,r,n){var i={};return i[r]=n,i},G=function(e,t,r){return r},X=function(e,t,r){var n={};return r.unshift(function(e,t){var r={};return r[e]=t,r}(e,t)),r.forEach(e=>{e&&Object.keys(e).forEach(t=>{e[t].forEach(e=>{"@type"===t&&void 0!==e["@id"]&&(e=e["@id"]),void 0===n[t]?n[t]=e:Array.isArray(n[t])?n[t].push(e):n[t]=[n[t],e]})})}),n},Y=",",Q=Wr(",",!1),Z=function(e,t){return t},ee=function(e,t){return t.unshift(e),t},te="a",re=Wr("a",!1),ne=function(){return"@type"},ie=function(e){return _n(e,!0)},oe=function(e){return _n(e,!1)},ae=function(e){return"[]"===e?{}:{"@id":e}},se=function(e){return{"@id":e}},ce="[",ue=Wr("[",!1),le="]",de=Wr("]",!1),pe="(",fe=Wr("(",!1),he=")",me=Wr(")",!1),ge=function(e){return{"@list":e}},ve=function(e,t){return{"@value":e,"@language":t}},ye="^^",be=Wr("^^",!1),we=function(e,t){if("http://www.w3.org/2001/XMLSchema#boolean"===t&&"true"===e)return!0;if("http://www.w3.org/2001/XMLSchema#boolean"===t&&"false"===e)return!1;if("http://www.w3.org/2001/XMLSchema#integer"===t)return parseInt(e);if("http://www.w3.org/2001/XMLSchema#double"===t)return parseFloat(e);const r=xn.resolve(t,!0);if(r){const n=t.split(":")[0];if("http://www.w3.org/2001/XMLSchema#boolean"===r&&"true"===e)return xn.decrement(n),!0;if("http://www.w3.org/2001/XMLSchema#boolean"===r&&"false"===e)return xn.decrement(n),!1;if("http://www.w3.org/2001/XMLSchema#integer"===r)return xn.decrement(n),parseInt(e);if("http://www.w3.org/2001/XMLSchema#double"===r)return xn.decrement(n),parseFloat(e)}return{"@value":e,"@type":t}},xe="true",_e=Wr("true",!1),Ee=function(){return!0},Se="false",Ae=Wr("false",!1),ke=function(){return!1},Ce=function(e){return e+":"},Te="<",Ie=Wr("<",!1),Fe=/^[^\0- <>"{}|\^`\\]/,Pe=Vr([["\0"," "],"<",">",'"',"{","}","|","^","`","\\"],!0,!1),Ne=">",Oe=Wr(">",!1),Re=function(e){const t=e.map(e=>65536<=e.codePointAt(0)&&e.codePointAt(0)<=983039?"a":1===e.length?e:6===e.length?String.fromCharCode("0x"+e.substring(2)):10===e.length?String.fromCodePoint("0x"+e.substring(2)):e).join("");if(t.match(/^[^\u0000-\u0020<>"{}|^`\\]*$/)){var r=e.join("");try{return xn.resolve(r)}catch(e){qr("Invalid IRIREF "+r)}}else qr("Invalid IRIREF "+e.join("")+" / "+t)},je=":",Le=Wr(":",!1),De=function(e){return e=e||"0",!1===xn.hasPrefix(e)&&qr("undefined prefix "+e),e},Ue=function(e){return e||""},Me=function(e,t){return xn.increment(e),xn.resolve(e+":"+t)},Be="_:",He=Wr("_:",!1),qe=/^[0-9]/,We=Vr([["0","9"]],!1,!1),Ve="@",Ke=Wr("@",!1),Je=/^[a-zA-Z]/,ze=Vr([["a","z"],["A","Z"]],!1,!1),$e="-",Ge=Wr("-",!1),Xe=/^[a-zA-Z0-9]/,Ye=Vr([["a","z"],["A","Z"],["0","9"]],!1,!1),Qe=function(e,t){return"-"+t.join("")},Ze=function(e,t){return e.join("")+t.join("")},et=/^[+\-]/,tt=Vr(["+","-"],!1,!1),rt=function(e){return e.match(/^[0+][0-9]+$/)?{"@value":e,"@type":"http://www.w3.org/2001/XMLSchema#integer"}:parseInt(e)},nt=function(e){return{"@value":e,"@type":"http://www.w3.org/2001/XMLSchema#decimal"}},it=function(e){return{"@value":e,"@type":"http://www.w3.org/2001/XMLSchema#double"}},ot=/^[eE]/,at=Vr(["e","E"],!1,!1),st='"',ct=Wr('"',!1),ut=/^[^"\\\n\r]/,lt=Vr(['"',"\\","\n","\r"],!0,!1),dt="'",pt=Wr("'",!1),ft=/^[^'\\\n\r]/,ht=Vr(["'","\\","\n","\r"],!0,!1),mt="'''",gt=Wr("'''",!1),vt=/^[^'\\]/,yt=Vr(["'","\\"],!0,!1),bt="''",wt=Wr("''",!1),xt=function(e,t){return"''"+t.join("")},_t=function(e,t){return"'"+t.join("")},Et=function(e,t){return e.join("")+t.join("")},St='"""',At=Wr('"""',!1),kt=/^[^"\\]/,Ct=Vr(['"',"\\"],!0,!1),Tt='""',It=Wr('""',!1),Ft=function(e,t){return'""'+t.join("")},Pt=function(e,t){return'"'+t.join("")},Nt="\\U",Ot=Wr("\\U",!1),Rt=function(e){return String.fromCodePoint(parseInt(e.join(""),16))},jt="\\u",Lt=Wr("\\u",!1),Dt=function(e){return String.fromCharCode(parseInt(e.join(""),16))},Ut="\\t",Mt=Wr("\\t",!1),Bt=function(){return"\t"},Ht="\\b",qt=Wr("\\b",!1),Wt=function(){return"\b"},Vt="\\n",Kt=Wr("\\n",!1),Jt=function(){return"\n"},zt="\\r",$t=Wr("\\r",!1),Gt=function(){return"\r"},Xt="\\f",Yt=Wr("\\f",!1),Qt=function(){return"\f"},Zt='\\"',er=Wr('\\"',!1),tr=function(){return'"'},rr="\\'",nr=Wr("\\'",!1),ir=function(){return"'"},or="\\\\",ar=Wr("\\\\",!1),sr=function(){return"\\"},cr=/^[ \t\r\n]/,ur=Vr([" ","\t","\r","\n"],!1,!1),lr=function(){return"[]"},dr=/^[\uD800-\uDBFF]/,pr=Vr([["\ud800","\udbff"]],!1,!1),fr=/^[\uDC00-\uDFFF]/,hr=Vr([["\udc00","\udfff"]],!1,!1),mr=function(e,t){return e+t},gr=/^[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]/,vr=Vr([["A","Z"],["a","z"],["À","Ö"],["Ø","ö"],["ø","˿"],["Ͱ","ͽ"],["Ϳ","῿"],["‌","‍"],["⁰","↏"],["Ⰰ","⿯"],["、","퟿"],["豈","﷏"],["ﷰ","�"]],!1,!1),yr="_",br=Wr("_",!1),wr="·",xr=Wr("·",!1),_r=/^[\u0300-\u036F]/,Er=Vr([["̀","ͯ"]],!1,!1),Sr=/^[\u203F-\u2040]/,Ar=Vr([["‿","⁀"]],!1,!1),kr=function(e,t,r,n){return r.join("")+n.join("")},Cr=function(e,t,r){return e+t.join("")+r.join("")},Tr="%",Ir=Wr("%",!1),Fr=/^[0-9A-Fa-f]/,Pr=Vr([["0","9"],["A","F"],["a","f"]],!1,!1),Nr="\\",Or=Wr("\\",!1),Rr=/^[_~.!$&'()*+,;=\/?#@%\-]/,jr=Vr(["_","~",".","!","$","&","'","(",")","*","+",",",";","=","/","?","#","@","%","-"],!1,!1),Lr=0,Dr=0,Ur=[{line:1,column:1}],Mr=0,Br=[],Hr=0;if("startRule"in r){if(!(r.startRule in o))throw new Error("Can't start parsing from rule \""+r.startRule+'".');a=o[r.startRule]}function qr(t,r){throw function(t,r){return new e(t,null,null,r)}(t,r=void 0!==r?r:Jr(Dr,Lr))}function Wr(e,t){return{type:"literal",text:e,ignoreCase:t}}function Vr(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Kr(e){var r,n=Ur[e];if(n)return n;for(r=e-1;!Ur[r];)r--;for(n={line:(n=Ur[r]).line,column:n.column};r<e;)10===t.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return Ur[e]=n,n}function Jr(e,t){var r=Kr(e),n=Kr(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function zr(e){Lr<Mr||(Lr>Mr&&(Mr=Lr,Br=[]),Br.push(e))}function $r(){var e,t,r,n,o;for(e=Lr,t=[],r=Gr();r!==i;)t.push(r),r=Gr();if(t!==i){for(r=[],n=Xr();n!==i;)r.push(n),n=Xr();if(r!==i){for(n=[],o=Yr();o!==i;)n.push(o),o=Yr();n!==i?(Dr=e,e=t=s(r)):(Lr=e,e=i)}else Lr=e,e=i}else Lr=e,e=i;return e}function Gr(){var e;return 65279===t.charCodeAt(Lr)?(e=c,Lr++):(e=i,0===Hr&&zr(u)),e}function Xr(){var e,r,n,o;if((e=function(){var e;return(e=function(){var e,r,n,o,a,s,c,u,p;for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();if(r!==i)if(t.substr(Lr,7)===w?(n=w,Lr+=7):(n=i,0===Hr&&zr(x)),n!==i){for(o=[],a=Yr();a!==i;)o.push(a),a=Yr();if(o!==i)if((a=ln())!==i){for(s=[],c=Yr();c!==i;)s.push(c),c=Yr();if(s!==i)if((c=cn())!==i){for(u=[],p=Yr();p!==i;)u.push(p),p=Yr();u!==i?(46===t.charCodeAt(Lr)?(p=l,Lr++):(p=i,0===Hr&&zr(d)),p!==i?(Dr=e,e=r=_(a,c)):(Lr=e,e=i)):(Lr=e,e=i)}else Lr=e,e=i;else Lr=e,e=i}else Lr=e,e=i;else Lr=e,e=i}else Lr=e,e=i;else Lr=e,e=i;return e}())===i&&(e=function(){var e,r,n,o,a,s,c;for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();if(r!==i)if(t.substr(Lr,5)===E?(n=E,Lr+=5):(n=i,0===Hr&&zr(S)),n!==i){for(o=[],a=Yr();a!==i;)o.push(a),a=Yr();if(o!==i)if((a=cn())!==i){for(s=[],c=Yr();c!==i;)s.push(c),c=Yr();s!==i?(46===t.charCodeAt(Lr)?(c=l,Lr++):(c=i,0===Hr&&zr(d)),c!==i?(Dr=e,e=r=A(a)):(Lr=e,e=i)):(Lr=e,e=i)}else Lr=e,e=i;else Lr=e,e=i}else Lr=e,e=i;else Lr=e,e=i;return e}())===i&&(e=function(){var e,r,n,o,a,s,c,u,l,d,p,f;for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();if(r!==i)if(R.test(t.charAt(Lr))?(n=t.charAt(Lr),Lr++):(n=i,0===Hr&&zr(j)),n!==i)if(L.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(D)),o!==i)if(N.test(t.charAt(Lr))?(a=t.charAt(Lr),Lr++):(a=i,0===Hr&&zr(O)),a!==i)if(U.test(t.charAt(Lr))?(s=t.charAt(Lr),Lr++):(s=i,0===Hr&&zr(M)),s!==i)if(B.test(t.charAt(Lr))?(c=t.charAt(Lr),Lr++):(c=i,0===Hr&&zr(H)),c!==i)if(q.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(W)),u!==i){for(l=[],d=Yr();d!==i;)l.push(d),d=Yr();if(l!==i)if((d=ln())!==i){for(p=[],f=Yr();f!==i;)p.push(f),f=Yr();p!==i&&(f=cn())!==i?(Dr=e,e=r=_(d,f)):(Lr=e,e=i)}else Lr=e,e=i;else Lr=e,e=i}else Lr=e,e=i;else Lr=e,e=i;else Lr=e,e=i;else Lr=e,e=i;else Lr=e,e=i;else Lr=e,e=i;else Lr=e,e=i;return e}())===i&&(e=function(){var e,r,n,o,a,s,c,u;for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();if(r!==i)if(k.test(t.charAt(Lr))?(n=t.charAt(Lr),Lr++):(n=i,0===Hr&&zr(C)),n!==i)if(T.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(I)),o!==i)if(F.test(t.charAt(Lr))?(a=t.charAt(Lr),Lr++):(a=i,0===Hr&&zr(P)),a!==i)if(N.test(t.charAt(Lr))?(s=t.charAt(Lr),Lr++):(s=i,0===Hr&&zr(O)),s!==i){for(c=[],u=Yr();u!==i;)c.push(u),u=Yr();c!==i&&(u=cn())!==i?(Dr=e,e=r=A(u)):(Lr=e,e=i)}else Lr=e,e=i;else Lr=e,e=i;else Lr=e,e=i;else Lr=e,e=i;else Lr=e,e=i;return e}()),e}())===i)if(e=Lr,(r=function(){var e,t,r;return e=Lr,(t=function(){var e,t;return e=Lr,(t=nn())!==i&&(Dr=e,t=ie(t)),(e=t)===i&&(e=sn())===i&&(e=an()),e}())!==i&&(r=Qr())!==i?(Dr=e,e=t=V(t,r)):(Lr=e,e=i),e===i&&(e=Lr,(t=rn())!==i?((r=Qr())===i&&(r=null),r!==i?(Dr=e,e=t=K(t,r)):(Lr=e,e=i)):(Lr=e,e=i)),e}())!==i){for(n=[],o=Yr();o!==i;)n.push(o),o=Yr();n!==i?(46===t.charCodeAt(Lr)?(o=l,Lr++):(o=i,0===Hr&&zr(d)),o!==i?(Dr=e,e=r=p(r)):(Lr=e,e=i)):(Lr=e,e=i)}else Lr=e,e=i;return e}function Yr(){var e;return(e=function(){var e;return cr.test(t.charAt(Lr))?(e=t.charAt(Lr),Lr++):(e=i,0===Hr&&zr(ur)),e}())===i&&(e=function(){var e,r,n,o;if(e=Lr,35===t.charCodeAt(Lr)?(r=f,Lr++):(r=i,0===Hr&&zr(h)),r!==i){for(n=[],m.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(g));o!==i;)n.push(o),m.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(g));n!==i?(10===t.charCodeAt(Lr)?(o=v,Lr++):(o=i,0===Hr&&zr(y)),o!==i?(Dr=e,e=r=b(n)):(Lr=e,e=i)):(Lr=e,e=i)}else Lr=e,e=i;return e}()),e}function Qr(){var e,r,n,o,a,s,c,u,l,d;if(e=Lr,(r=en())!==i)if((n=Zr())!==i){for(o=[],a=Lr,s=[],c=Yr();c!==i;)s.push(c),c=Yr();for(s!==i?(59===t.charCodeAt(Lr)?(c=J,Lr++):(c=i,0===Hr&&zr(z)),c!==i?(u=Lr,(l=en())!==i&&(d=Zr())!==i?(Dr=u,u=l=$(r,n,l,d)):(Lr=u,u=i),u===i&&(u=null),u!==i?(Dr=a,a=s=G(r,n,u)):(Lr=a,a=i)):(Lr=a,a=i)):(Lr=a,a=i);a!==i;){for(o.push(a),a=Lr,s=[],c=Yr();c!==i;)s.push(c),c=Yr();s!==i?(59===t.charCodeAt(Lr)?(c=J,Lr++):(c=i,0===Hr&&zr(z)),c!==i?(u=Lr,(l=en())!==i&&(d=Zr())!==i?(Dr=u,u=l=$(r,n,l,d)):(Lr=u,u=i),u===i&&(u=null),u!==i?(Dr=a,a=s=G(r,n,u)):(Lr=a,a=i)):(Lr=a,a=i)):(Lr=a,a=i)}o!==i?(Dr=e,e=r=X(r,n,o)):(Lr=e,e=i)}else Lr=e,e=i;else Lr=e,e=i;return e}function Zr(){var e,r,n,o,a,s,c;if(e=Lr,(r=tn())!==i){for(n=[],o=Lr,a=[],s=Yr();s!==i;)a.push(s),s=Yr();for(a!==i?(44===t.charCodeAt(Lr)?(s=Y,Lr++):(s=i,0===Hr&&zr(Q)),s!==i&&(c=tn())!==i?(Dr=o,o=a=Z(r,c)):(Lr=o,o=i)):(Lr=o,o=i);o!==i;){for(n.push(o),o=Lr,a=[],s=Yr();s!==i;)a.push(s),s=Yr();a!==i?(44===t.charCodeAt(Lr)?(s=Y,Lr++):(s=i,0===Hr&&zr(Q)),s!==i&&(c=tn())!==i?(Dr=o,o=a=Z(r,c)):(Lr=o,o=i)):(Lr=o,o=i)}n!==i?(Dr=e,e=r=ee(r,n)):(Lr=e,e=i)}else Lr=e,e=i;return e}function en(){var e,r,n;if(e=Lr,(r=function(){var e,t,r;for(e=Lr,t=[],r=Yr();r!==i;)t.push(r),r=Yr();return t!==i&&(r=an())!==i?(Dr=e,e=t=p(r)):(Lr=e,e=i),e}())!==i&&(Dr=e,r=p(r)),(e=r)===i){for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();r!==i?(97===t.charCodeAt(Lr)?(n=te,Lr++):(n=i,0===Hr&&zr(re)),n!==i?(Dr=e,e=r=ne()):(Lr=e,e=i)):(Lr=e,e=i)}return e}function tn(){var e,r;return(e=function(){var e;return(e=function(){var e,r,n,o,a,s,c;for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();if(r!==i)if((n=on())!==i){for(o=[],a=Yr();a!==i;)o.push(a),a=Yr();o!==i&&(a=function(){var e,r,n,o,a,s,c,u;if(e=Lr,64===t.charCodeAt(Lr)?(r=Ve,Lr++):(r=i,0===Hr&&zr(Ke)),r!==i){if(n=[],Je.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(ze)),o!==i)for(;o!==i;)n.push(o),Je.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(ze));else n=i;if(n!==i){if(o=[],a=Lr,45===t.charCodeAt(Lr)?(s=$e,Lr++):(s=i,0===Hr&&zr(Ge)),s!==i){if(c=[],Xe.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(Ye)),u!==i)for(;u!==i;)c.push(u),Xe.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(Ye));else c=i;c!==i?(Dr=a,a=s=Qe(n,c)):(Lr=a,a=i)}else Lr=a,a=i;for(;a!==i;)if(o.push(a),a=Lr,45===t.charCodeAt(Lr)?(s=$e,Lr++):(s=i,0===Hr&&zr(Ge)),s!==i){if(c=[],Xe.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(Ye)),u!==i)for(;u!==i;)c.push(u),Xe.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(Ye));else c=i;c!==i?(Dr=a,a=s=Qe(n,c)):(Lr=a,a=i)}else Lr=a,a=i;o!==i?(Dr=e,e=r=Ze(n,o)):(Lr=e,e=i)}else Lr=e,e=i}else Lr=e,e=i;return e}())!==i?(Dr=e,e=r=ve(n,a)):(Lr=e,e=i)}else Lr=e,e=i;else Lr=e,e=i;if(e===i){for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();if(r!==i)if((n=on())!==i){for(o=[],a=Yr();a!==i;)o.push(a),a=Yr();if(o!==i)if(t.substr(Lr,2)===ye?(a=ye,Lr+=2):(a=i,0===Hr&&zr(be)),a!==i){for(s=[],c=Yr();c!==i;)s.push(c),c=Yr();s!==i&&(c=an())!==i?(Dr=e,e=r=we(n,c)):(Lr=e,e=i)}else Lr=e,e=i;else Lr=e,e=i}else Lr=e,e=i;else Lr=e,e=i;if(e===i){for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();r!==i&&(n=on())!==i?(Dr=e,e=r=p(n)):(Lr=e,e=i)}}return e}())===i&&(e=function(){var e,r,n;for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();return r!==i?((n=function(){var e,r,n,o,a,s,c,u,p;if(e=Lr,r=Lr,n=Lr,et.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(tt)),o===i&&(o=null),o!==i){if(a=Lr,s=[],qe.test(t.charAt(Lr))?(c=t.charAt(Lr),Lr++):(c=i,0===Hr&&zr(We)),c!==i)for(;c!==i;)s.push(c),qe.test(t.charAt(Lr))?(c=t.charAt(Lr),Lr++):(c=i,0===Hr&&zr(We));else s=i;if(s!==i)if(46===t.charCodeAt(Lr)?(c=l,Lr++):(c=i,0===Hr&&zr(d)),c!==i){for(u=[],qe.test(t.charAt(Lr))?(p=t.charAt(Lr),Lr++):(p=i,0===Hr&&zr(We));p!==i;)u.push(p),qe.test(t.charAt(Lr))?(p=t.charAt(Lr),Lr++):(p=i,0===Hr&&zr(We));u!==i&&(p=dn())!==i?a=s=[s,c,u,p]:(Lr=a,a=i)}else Lr=a,a=i;else Lr=a,a=i;if(a===i){if(a=Lr,46===t.charCodeAt(Lr)?(s=l,Lr++):(s=i,0===Hr&&zr(d)),s!==i){if(c=[],qe.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(We)),u!==i)for(;u!==i;)c.push(u),qe.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(We));else c=i;c!==i&&(u=dn())!==i?a=s=[s,c,u]:(Lr=a,a=i)}else Lr=a,a=i;if(a===i){if(a=Lr,s=[],qe.test(t.charAt(Lr))?(c=t.charAt(Lr),Lr++):(c=i,0===Hr&&zr(We)),c!==i)for(;c!==i;)s.push(c),qe.test(t.charAt(Lr))?(c=t.charAt(Lr),Lr++):(c=i,0===Hr&&zr(We));else s=i;s!==i&&(c=dn())!==i?a=s=[s,c]:(Lr=a,a=i)}}a!==i?n=o=[o,a]:(Lr=n,n=i)}else Lr=n,n=i;return(r=n!==i?t.substring(r,Lr):n)!==i&&(Dr=e,r=it(r)),r}())===i&&(n=function(){var e,r,n,o,a,s,c,u;if(e=Lr,r=Lr,n=Lr,et.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(tt)),o===i&&(o=null),o!==i){for(a=[],qe.test(t.charAt(Lr))?(s=t.charAt(Lr),Lr++):(s=i,0===Hr&&zr(We));s!==i;)a.push(s),qe.test(t.charAt(Lr))?(s=t.charAt(Lr),Lr++):(s=i,0===Hr&&zr(We));if(a!==i)if(46===t.charCodeAt(Lr)?(s=l,Lr++):(s=i,0===Hr&&zr(d)),s!==i){if(c=[],qe.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(We)),u!==i)for(;u!==i;)c.push(u),qe.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(We));else c=i;c!==i?n=o=[o,a,s,c]:(Lr=n,n=i)}else Lr=n,n=i;else Lr=n,n=i}else Lr=n,n=i;return(r=n!==i?t.substring(r,Lr):n)!==i&&(Dr=e,r=nt(r)),r}())===i&&(n=function(){var e,r,n,o,a,s;if(e=Lr,r=Lr,n=Lr,et.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(tt)),o===i&&(o=null),o!==i){if(a=[],qe.test(t.charAt(Lr))?(s=t.charAt(Lr),Lr++):(s=i,0===Hr&&zr(We)),s!==i)for(;s!==i;)a.push(s),qe.test(t.charAt(Lr))?(s=t.charAt(Lr),Lr++):(s=i,0===Hr&&zr(We));else a=i;a!==i?n=o=[o,a]:(Lr=n,n=i)}else Lr=n,n=i;return(r=n!==i?t.substring(r,Lr):n)!==i&&(Dr=e,r=rt(r)),r}()),n!==i?(Dr=e,e=r=p(n)):(Lr=e,e=i)):(Lr=e,e=i),e}())===i&&(e=function(){var e,r,n;for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();if(r!==i?(t.substr(Lr,4)===xe?(n=xe,Lr+=4):(n=i,0===Hr&&zr(_e)),n!==i?(Dr=e,e=r=Ee()):(Lr=e,e=i)):(Lr=e,e=i),e===i){for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();r!==i?(t.substr(Lr,5)===Se?(n=Se,Lr+=5):(n=i,0===Hr&&zr(Ae)),n!==i?(Dr=e,e=r=ke()):(Lr=e,e=i)):(Lr=e,e=i)}return e}()),e}())===i&&(e=Lr,(r=nn())!==i&&(Dr=e,r=oe(r)),(e=r)===i&&(e=Lr,(r=sn())!==i&&(Dr=e,r=ae(r)),(e=r)===i&&(e=Lr,(r=rn())!==i&&(Dr=e,r=p(r)),(e=r)===i&&(e=Lr,(r=an())!==i&&(Dr=e,r=se(r)),e=r)))),e}function rn(){var e,r,n,o,a,s;for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();if(r!==i)if(91===t.charCodeAt(Lr)?(n=ce,Lr++):(n=i,0===Hr&&zr(ue)),n!==i)if((o=Qr())!==i){for(a=[],s=Yr();s!==i;)a.push(s),s=Yr();a!==i?(93===t.charCodeAt(Lr)?(s=le,Lr++):(s=i,0===Hr&&zr(de)),s!==i?(Dr=e,e=r=p(o)):(Lr=e,e=i)):(Lr=e,e=i)}else Lr=e,e=i;else Lr=e,e=i;else Lr=e,e=i;return e}function nn(){var e,r,n,o,a,s;for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();if(r!==i)if(40===t.charCodeAt(Lr)?(n=pe,Lr++):(n=i,0===Hr&&zr(fe)),n!==i){for(o=[],a=tn();a!==i;)o.push(a),a=tn();if(o!==i){for(a=[],s=Yr();s!==i;)a.push(s),s=Yr();a!==i?(41===t.charCodeAt(Lr)?(s=he,Lr++):(s=i,0===Hr&&zr(me)),s!==i?(Dr=e,e=r=ge(o)):(Lr=e,e=i)):(Lr=e,e=i)}else Lr=e,e=i}else Lr=e,e=i;else Lr=e,e=i;return e}function on(){var e,r,n;for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();return r!==i?((n=function(){var e,r,n,o,a,s,c,u;if(e=Lr,t.substr(Lr,3)===mt?(r=mt,Lr+=3):(r=i,0===Hr&&zr(gt)),r!==i){for(n=[],vt.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(yt)),o===i&&(o=fn())===i&&(o=pn());o!==i;)n.push(o),vt.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(yt)),o===i&&(o=fn())===i&&(o=pn());if(n!==i){if(o=[],a=Lr,t.substr(Lr,2)===bt?(s=bt,Lr+=2):(s=i,0===Hr&&zr(wt)),s!==i){if(c=[],vt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(yt)),u===i&&(u=fn())===i&&(u=pn()),u!==i)for(;u!==i;)c.push(u),vt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(yt)),u===i&&(u=fn())===i&&(u=pn());else c=i;c!==i?(Dr=a,a=s=xt(n,c)):(Lr=a,a=i)}else Lr=a,a=i;if(a===i)if(a=Lr,39===t.charCodeAt(Lr)?(s=dt,Lr++):(s=i,0===Hr&&zr(pt)),s!==i){if(c=[],vt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(yt)),u===i&&(u=fn())===i&&(u=pn()),u!==i)for(;u!==i;)c.push(u),vt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(yt)),u===i&&(u=fn())===i&&(u=pn());else c=i;c!==i?(Dr=a,a=s=_t(n,c)):(Lr=a,a=i)}else Lr=a,a=i;for(;a!==i;){if(o.push(a),a=Lr,t.substr(Lr,2)===bt?(s=bt,Lr+=2):(s=i,0===Hr&&zr(wt)),s!==i){if(c=[],vt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(yt)),u===i&&(u=fn())===i&&(u=pn()),u!==i)for(;u!==i;)c.push(u),vt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(yt)),u===i&&(u=fn())===i&&(u=pn());else c=i;c!==i?(Dr=a,a=s=xt(n,c)):(Lr=a,a=i)}else Lr=a,a=i;if(a===i)if(a=Lr,39===t.charCodeAt(Lr)?(s=dt,Lr++):(s=i,0===Hr&&zr(pt)),s!==i){if(c=[],vt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(yt)),u===i&&(u=fn())===i&&(u=pn()),u!==i)for(;u!==i;)c.push(u),vt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(yt)),u===i&&(u=fn())===i&&(u=pn());else c=i;c!==i?(Dr=a,a=s=_t(n,c)):(Lr=a,a=i)}else Lr=a,a=i}o!==i?(t.substr(Lr,3)===mt?(a=mt,Lr+=3):(a=i,0===Hr&&zr(gt)),a!==i?(Dr=e,e=r=Et(n,o)):(Lr=e,e=i)):(Lr=e,e=i)}else Lr=e,e=i}else Lr=e,e=i;return e}())===i&&(n=function(){var e,r,n,o,a,s,c,u;if(e=Lr,t.substr(Lr,3)===St?(r=St,Lr+=3):(r=i,0===Hr&&zr(At)),r!==i){for(n=[],kt.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(Ct)),o===i&&(o=fn())===i&&(o=pn());o!==i;)n.push(o),kt.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(Ct)),o===i&&(o=fn())===i&&(o=pn());if(n!==i){if(o=[],a=Lr,t.substr(Lr,2)===Tt?(s=Tt,Lr+=2):(s=i,0===Hr&&zr(It)),s!==i){if(c=[],kt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(Ct)),u===i&&(u=fn())===i&&(u=pn()),u!==i)for(;u!==i;)c.push(u),kt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(Ct)),u===i&&(u=fn())===i&&(u=pn());else c=i;c!==i?(Dr=a,a=s=Ft(n,c)):(Lr=a,a=i)}else Lr=a,a=i;if(a===i)if(a=Lr,34===t.charCodeAt(Lr)?(s=st,Lr++):(s=i,0===Hr&&zr(ct)),s!==i){if(c=[],kt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(Ct)),u===i&&(u=fn())===i&&(u=pn()),u!==i)for(;u!==i;)c.push(u),kt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(Ct)),u===i&&(u=fn())===i&&(u=pn());else c=i;c!==i?(Dr=a,a=s=Pt(n,c)):(Lr=a,a=i)}else Lr=a,a=i;for(;a!==i;){if(o.push(a),a=Lr,t.substr(Lr,2)===Tt?(s=Tt,Lr+=2):(s=i,0===Hr&&zr(It)),s!==i){if(c=[],kt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(Ct)),u===i&&(u=fn())===i&&(u=pn()),u!==i)for(;u!==i;)c.push(u),kt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(Ct)),u===i&&(u=fn())===i&&(u=pn());else c=i;c!==i?(Dr=a,a=s=Ft(n,c)):(Lr=a,a=i)}else Lr=a,a=i;if(a===i)if(a=Lr,34===t.charCodeAt(Lr)?(s=st,Lr++):(s=i,0===Hr&&zr(ct)),s!==i){if(c=[],kt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(Ct)),u===i&&(u=fn())===i&&(u=pn()),u!==i)for(;u!==i;)c.push(u),kt.test(t.charAt(Lr))?(u=t.charAt(Lr),Lr++):(u=i,0===Hr&&zr(Ct)),u===i&&(u=fn())===i&&(u=pn());else c=i;c!==i?(Dr=a,a=s=Pt(n,c)):(Lr=a,a=i)}else Lr=a,a=i}o!==i?(t.substr(Lr,3)===St?(a=St,Lr+=3):(a=i,0===Hr&&zr(At)),a!==i?(Dr=e,e=r=Et(n,o)):(Lr=e,e=i)):(Lr=e,e=i)}else Lr=e,e=i}else Lr=e,e=i;return e}())===i&&(n=function(){var e,r,n,o;if(e=Lr,39===t.charCodeAt(Lr)?(r=dt,Lr++):(r=i,0===Hr&&zr(pt)),r!==i){for(n=[],ft.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(ht)),o===i&&(o=fn())===i&&(o=pn());o!==i;)n.push(o),ft.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(ht)),o===i&&(o=fn())===i&&(o=pn());n!==i?(39===t.charCodeAt(Lr)?(o=dt,Lr++):(o=i,0===Hr&&zr(pt)),o!==i?(Dr=e,e=r=b(n)):(Lr=e,e=i)):(Lr=e,e=i)}else Lr=e,e=i;return e}())===i&&(n=function(){var e,r,n,o;if(e=Lr,34===t.charCodeAt(Lr)?(r=st,Lr++):(r=i,0===Hr&&zr(ct)),r!==i){for(n=[],ut.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(lt)),o===i&&(o=fn())===i&&(o=pn());o!==i;)n.push(o),ut.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(lt)),o===i&&(o=fn())===i&&(o=pn());n!==i?(34===t.charCodeAt(Lr)?(o=st,Lr++):(o=i,0===Hr&&zr(ct)),o!==i?(Dr=e,e=r=b(n)):(Lr=e,e=i)):(Lr=e,e=i)}else Lr=e,e=i;return e}()),n!==i?(Dr=e,e=r=p(n)):(Lr=e,e=i)):(Lr=e,e=i),e}function an(){var e,r,n;for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();if(r!==i&&(n=cn())!==i?(Dr=e,e=r=p(n)):(Lr=e,e=i),e===i){for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();r!==i&&(n=function(){var e,r;return(e=function(){var e,r,n;return e=Lr,(r=un())!==i&&(n=function(){var e,r,n,o,a,s,c,u;if(e=Lr,(r=mn())===i&&(58===t.charCodeAt(Lr)?(r=je,Lr++):(r=i,0===Hr&&zr(Le)),r===i&&(qe.test(t.charAt(Lr))?(r=t.charAt(Lr),Lr++):(r=i,0===Hr&&zr(We)),r===i&&(r=yn()))),r!==i){for(n=[],(o=gn())===i&&(58===t.charCodeAt(Lr)?(o=je,Lr++):(o=i,0===Hr&&zr(Le)),o===i&&(o=yn()));o!==i;)n.push(o),(o=gn())===i&&(58===t.charCodeAt(Lr)?(o=je,Lr++):(o=i,0===Hr&&zr(Le)),o===i&&(o=yn()));if(n!==i){if(o=[],a=Lr,s=[],46===t.charCodeAt(Lr)?(c=l,Lr++):(c=i,0===Hr&&zr(d)),c!==i)for(;c!==i;)s.push(c),46===t.charCodeAt(Lr)?(c=l,Lr++):(c=i,0===Hr&&zr(d));else s=i;if(s!==i){if(c=[],(u=gn())===i&&(58===t.charCodeAt(Lr)?(u=je,Lr++):(u=i,0===Hr&&zr(Le)),u===i&&(u=yn())),u!==i)for(;u!==i;)c.push(u),(u=gn())===i&&(58===t.charCodeAt(Lr)?(u=je,Lr++):(u=i,0===Hr&&zr(Le)),u===i&&(u=yn()));else c=i;c!==i?(Dr=a,a=s=kr(r,n,s,c)):(Lr=a,a=i)}else Lr=a,a=i;for(;a!==i;){if(o.push(a),a=Lr,s=[],46===t.charCodeAt(Lr)?(c=l,Lr++):(c=i,0===Hr&&zr(d)),c!==i)for(;c!==i;)s.push(c),46===t.charCodeAt(Lr)?(c=l,Lr++):(c=i,0===Hr&&zr(d));else s=i;if(s!==i){if(c=[],(u=gn())===i&&(58===t.charCodeAt(Lr)?(u=je,Lr++):(u=i,0===Hr&&zr(Le)),u===i&&(u=yn())),u!==i)for(;u!==i;)c.push(u),(u=gn())===i&&(58===t.charCodeAt(Lr)?(u=je,Lr++):(u=i,0===Hr&&zr(Le)),u===i&&(u=yn()));else c=i;c!==i?(Dr=a,a=s=kr(r,n,s,c)):(Lr=a,a=i)}else Lr=a,a=i}o!==i?(Dr=e,e=r=Cr(r,n,o)):(Lr=e,e=i)}else Lr=e,e=i}else Lr=e,e=i;return e}())!==i?(Dr=e,e=r=Me(r,n)):(Lr=e,e=i),e}())===i&&(e=Lr,(r=un())!==i&&(Dr=e,r=Ce(r)),e=r),e}())!==i?(Dr=e,e=r=p(n)):(Lr=e,e=i)}return e}function sn(){var e,r,n;for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();if(r!==i&&(n=function(){var e,r,n,o,a,s,c,u,p,f;if(e=Lr,r=Lr,t.substr(Lr,2)===Be?(n=Be,Lr+=2):(n=i,0===Hr&&zr(He)),n!==i)if((o=mn())===i&&(qe.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(We))),o!==i){for(a=[],s=gn();s!==i;)a.push(s),s=gn();if(a!==i){if(s=[],c=Lr,u=[],46===t.charCodeAt(Lr)?(p=l,Lr++):(p=i,0===Hr&&zr(d)),p!==i)for(;p!==i;)u.push(p),46===t.charCodeAt(Lr)?(p=l,Lr++):(p=i,0===Hr&&zr(d));else u=i;if(u!==i){if(p=[],(f=gn())!==i)for(;f!==i;)p.push(f),f=gn();else p=i;p!==i?c=u=[u,p]:(Lr=c,c=i)}else Lr=c,c=i;for(;c!==i;){if(s.push(c),c=Lr,u=[],46===t.charCodeAt(Lr)?(p=l,Lr++):(p=i,0===Hr&&zr(d)),p!==i)for(;p!==i;)u.push(p),46===t.charCodeAt(Lr)?(p=l,Lr++):(p=i,0===Hr&&zr(d));else u=i;if(u!==i){if(p=[],(f=gn())!==i)for(;f!==i;)p.push(f),f=gn();else p=i;p!==i?c=u=[u,p]:(Lr=c,c=i)}else Lr=c,c=i}s!==i?r=n=[n,o,a,s]:(Lr=r,r=i)}else Lr=r,r=i}else Lr=r,r=i;else Lr=r,r=i;return r!==i?t.substring(e,Lr):r}())!==i?(Dr=e,e=r=p(n)):(Lr=e,e=i),e===i){for(e=Lr,r=[],n=Yr();n!==i;)r.push(n),n=Yr();r!==i&&(n=function(){var e,r,n,o;if(e=Lr,91===t.charCodeAt(Lr)?(r=ce,Lr++):(r=i,0===Hr&&zr(ue)),r!==i){for(n=[],o=Yr();o!==i;)n.push(o),o=Yr();n!==i?(93===t.charCodeAt(Lr)?(o=le,Lr++):(o=i,0===Hr&&zr(de)),o!==i?(Dr=e,e=r=lr()):(Lr=e,e=i)):(Lr=e,e=i)}else Lr=e,e=i;return e}())!==i?(Dr=e,e=r=p(n)):(Lr=e,e=i)}return e}function cn(){var e,r,n,o;if(e=Lr,60===t.charCodeAt(Lr)?(r=Te,Lr++):(r=i,0===Hr&&zr(Ie)),r!==i){for(n=[],Fe.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(Pe)),o===i&&(o=pn());o!==i;)n.push(o),Fe.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(Pe)),o===i&&(o=pn());n!==i?(62===t.charCodeAt(Lr)?(o=Ne,Lr++):(o=i,0===Hr&&zr(Oe)),o!==i?(Dr=e,e=r=Re(n)):(Lr=e,e=i)):(Lr=e,e=i)}else Lr=e,e=i;return e}function un(){var e,r,n;return e=Lr,(r=vn())===i&&(r=null),r!==i?(58===t.charCodeAt(Lr)?(n=je,Lr++):(n=i,0===Hr&&zr(Le)),n!==i?(Dr=e,e=r=De(r)):(Lr=e,e=i)):(Lr=e,e=i),e}function ln(){var e,r,n;return e=Lr,(r=vn())===i&&(r=null),r!==i?(58===t.charCodeAt(Lr)?(n=je,Lr++):(n=i,0===Hr&&zr(Le)),n!==i?(Dr=e,e=r=Ue(r)):(Lr=e,e=i)):(Lr=e,e=i),e}function dn(){var e,r,n,o,a,s;if(e=Lr,r=Lr,ot.test(t.charAt(Lr))?(n=t.charAt(Lr),Lr++):(n=i,0===Hr&&zr(at)),n!==i)if(et.test(t.charAt(Lr))?(o=t.charAt(Lr),Lr++):(o=i,0===Hr&&zr(tt)),o===i&&(o=null),o!==i){if(a=[],qe.test(t.charAt(Lr))?(s=t.charAt(Lr),Lr++):(s=i,0===Hr&&zr(We)),s!==i)for(;s!==i;)a.push(s),qe.test(t.charAt(Lr))?(s=t.charAt(Lr),Lr++):(s=i,0===Hr&&zr(We));else a=i;a!==i?r=n=[n,o,a]:(Lr=r,r=i)}else Lr=r,r=i;else Lr=r,r=i;return r!==i?t.substring(e,Lr):r}function pn(){var e,r,n,o,a,s,c,u,l,d,p;return e=Lr,t.substr(Lr,2)===Nt?(r=Nt,Lr+=2):(r=i,0===Hr&&zr(Ot)),r!==i?(n=Lr,(o=bn())!==i&&(a=bn())!==i&&(s=bn())!==i&&(c=bn())!==i&&(u=bn())!==i&&(l=bn())!==i&&(d=bn())!==i&&(p=bn())!==i?n=o=[o,a,s,c,u,l,d,p]:(Lr=n,n=i),n!==i?(Dr=e,e=r=Rt(n)):(Lr=e,e=i)):(Lr=e,e=i),e===i&&(e=Lr,t.substr(Lr,2)===jt?(r=jt,Lr+=2):(r=i,0===Hr&&zr(Lt)),r!==i?(n=Lr,(o=bn())!==i&&(a=bn())!==i&&(s=bn())!==i&&(c=bn())!==i?n=o=[o,a,s,c]:(Lr=n,n=i),n!==i?(Dr=e,e=r=Dt(n)):(Lr=e,e=i)):(Lr=e,e=i)),e}function fn(){var e,r;return e=Lr,t.substr(Lr,2)===Ut?(r=Ut,Lr+=2):(r=i,0===Hr&&zr(Mt)),r!==i&&(Dr=e,r=Bt()),(e=r)===i&&(e=Lr,t.substr(Lr,2)===Ht?(r=Ht,Lr+=2):(r=i,0===Hr&&zr(qt)),r!==i&&(Dr=e,r=Wt()),(e=r)===i&&(e=Lr,t.substr(Lr,2)===Vt?(r=Vt,Lr+=2):(r=i,0===Hr&&zr(Kt)),r!==i&&(Dr=e,r=Jt()),(e=r)===i&&(e=Lr,t.substr(Lr,2)===zt?(r=zt,Lr+=2):(r=i,0===Hr&&zr($t)),r!==i&&(Dr=e,r=Gt()),(e=r)===i&&(e=Lr,t.substr(Lr,2)===Xt?(r=Xt,Lr+=2):(r=i,0===Hr&&zr(Yt)),r!==i&&(Dr=e,r=Qt()),(e=r)===i&&(e=Lr,t.substr(Lr,2)===Zt?(r=Zt,Lr+=2):(r=i,0===Hr&&zr(er)),r!==i&&(Dr=e,r=tr()),(e=r)===i&&(e=Lr,t.substr(Lr,2)===rr?(r=rr,Lr+=2):(r=i,0===Hr&&zr(nr)),r!==i&&(Dr=e,r=ir()),(e=r)===i&&(e=Lr,t.substr(Lr,2)===or?(r=or,Lr+=2):(r=i,0===Hr&&zr(ar)),r!==i&&(Dr=e,r=sr()),e=r))))))),e}function hn(){var e,r,n;return e=Lr,dr.test(t.charAt(Lr))?(r=t.charAt(Lr),Lr++):(r=i,0===Hr&&zr(pr)),r!==i?(fr.test(t.charAt(Lr))?(n=t.charAt(Lr),Lr++):(n=i,0===Hr&&zr(hr)),n!==i?(Dr=e,e=r=mr(r,n)):(Lr=e,e=i)):(Lr=e,e=i),e===i&&(gr.test(t.charAt(Lr))?(e=t.charAt(Lr),Lr++):(e=i,0===Hr&&zr(vr))),e}function mn(){var e;return(e=hn())===i&&(95===t.charCodeAt(Lr)?(e=yr,Lr++):(e=i,0===Hr&&zr(br))),e}function gn(){var e;return(e=mn())===i&&(45===t.charCodeAt(Lr)?(e=$e,Lr++):(e=i,0===Hr&&zr(Ge)),e===i&&(qe.test(t.charAt(Lr))?(e=t.charAt(Lr),Lr++):(e=i,0===Hr&&zr(We)),e===i&&(183===t.charCodeAt(Lr)?(e=wr,Lr++):(e=i,0===Hr&&zr(xr)),e===i&&(_r.test(t.charAt(Lr))?(e=t.charAt(Lr),Lr++):(e=i,0===Hr&&zr(Er)),e===i&&(Sr.test(t.charAt(Lr))?(e=t.charAt(Lr),Lr++):(e=i,0===Hr&&zr(Ar))))))),e}function vn(){var e,r,n,o,a,s,c,u,p;if(e=Lr,r=Lr,(n=hn())!==i){for(o=[],a=gn();a!==i;)o.push(a),a=gn();if(o!==i){if(a=[],s=Lr,c=[],46===t.charCodeAt(Lr)?(u=l,Lr++):(u=i,0===Hr&&zr(d)),u!==i)for(;u!==i;)c.push(u),46===t.charCodeAt(Lr)?(u=l,Lr++):(u=i,0===Hr&&zr(d));else c=i;if(c!==i){if(u=[],(p=gn())!==i)for(;p!==i;)u.push(p),p=gn();else u=i;u!==i?s=c=[c,u]:(Lr=s,s=i)}else Lr=s,s=i;for(;s!==i;){if(a.push(s),s=Lr,c=[],46===t.charCodeAt(Lr)?(u=l,Lr++):(u=i,0===Hr&&zr(d)),u!==i)for(;u!==i;)c.push(u),46===t.charCodeAt(Lr)?(u=l,Lr++):(u=i,0===Hr&&zr(d));else c=i;if(c!==i){if(u=[],(p=gn())!==i)for(;p!==i;)u.push(p),p=gn();else u=i;u!==i?s=c=[c,u]:(Lr=s,s=i)}else Lr=s,s=i}a!==i?r=n=[n,o,a]:(Lr=r,r=i)}else Lr=r,r=i}else Lr=r,r=i;return r!==i?t.substring(e,Lr):r}function yn(){var e;return(e=function(){var e,r,n,o,a;return e=Lr,r=Lr,37===t.charCodeAt(Lr)?(n=Tr,Lr++):(n=i,0===Hr&&zr(Ir)),n!==i&&(o=bn())!==i&&(a=bn())!==i?r=n=[n,o,a]:(Lr=r,r=i),r!==i?t.substring(e,Lr):r}())===i&&(e=function(){var e,r,n;return e=Lr,92===t.charCodeAt(Lr)?(r=Nr,Lr++):(r=i,0===Hr&&zr(Or)),r!==i?(Rr.test(t.charAt(Lr))?(n=t.charAt(Lr),Lr++):(n=i,0===Hr&&zr(jr)),n!==i?(Dr=e,e=r=p(n)):(Lr=e,e=i)):(Lr=e,e=i),e}()),e}function bn(){var e;return Fr.test(t.charAt(Lr))?(e=t.charAt(Lr),Lr++):(e=i,0===Hr&&zr(Pr)),e}var wn=function(e){return e.match(/^[a-z](.*?):(.+?)/g)},xn={base:[],data:{},addBase:function(e){if(0===xn.base.length)return void xn.base.push(e);const t=xn.base[xn.base.length-1];t!==e&&xn.base.push(new URL(e,t).toString())},addPrefix:function(e,t){const r=xn.data[e];void 0===r?xn.data[e]=[{uri:t,count:0}]:r[r.length-1].uri!==t&&r.push({uri:t,count:0})},hasPrefix:function(e){return void 0!==this.data[e]},resolve:function(e,t){const n=Object.keys(xn.data).find(t=>0===e.indexOf(t+":"));if(void 0!==n){const r=xn.data[n];if(1===r.length&&!0!==t&&wn(r[0].uri))return e;const i=r[r.length-1].uri;return e.replace(n+":",i)}var i=0===xn.base.length?r.baseIRI:xn.base[xn.base.length-1];return!i||e.match(/^(http:|https:|urn:|file:)/)?e:0===e.indexOf("//")&&i?i.split("//")[0]+e:new URL(e,i).toString()},increment:function(e){const t=xn.data[e];void 0!==t&&t[t.length-1].count++},decrement:function(e){const t=xn.data[e];void 0!==t&&t[t.length-1].count--},toJSON:function(){const e={};return xn.base.length>0&&(void 0===e["@context"]&&(e["@context"]={}),e["@context"]["@base"]=xn.base[0]),Object.keys(xn.data).forEach(t=>{const r=xn.data[t][0];"http://www.w3.org/2001/XMLSchema#"===r.uri&&r.count<1||wn(r.uri)&&(void 0===e["@context"]&&(e["@context"]={}),e["@context"][t]=r.uri)}),e}};function _n(e,t){if(void 0===e["@list"])return e;if(!t&&!e["@list"].find(e=>void 0!==e["@list"]))return e;if(0===e["@list"].length)return{"@id":"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"};var r={},n=null;return e["@list"].forEach(e=>{null===n?n=r:(n["http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"]={},n=n["http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"]),n["http://www.w3.org/1999/02/22-rdf-syntax-ns#first"]=_n(e,!0),n["http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"]={"@id":"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"}}),r}if((n=a())!==i&&Lr===t.length)return n;throw n!==i&&Lr<t.length&&zr({type:"end"}),function(t,r,n){return new e(e.buildMessage(t,r),t,r,n)}(Br,Mr<t.length?t.charAt(Mr):null,Mr<t.length?Jr(Mr,Mr+1):Jr(Mr,Mr))}}})?r.apply(t,[]):r)||(e.exports=n)},5386:e=>{const t={acl:"http://www.w3.org/ns/auth/acl#",arg:"http://www.w3.org/ns/pim/arg#",as:"https://www.w3.org/ns/activitystreams#",bookmark:"http://www.w3.org/2002/01/bookmark#",cal:"http://www.w3.org/2002/12/cal/ical#",cco:"http://www.ontologyrepository.com/CommonCoreOntologies/",cert:"http://www.w3.org/ns/auth/cert#",contact:"http://www.w3.org/2000/10/swap/pim/contact#",dc:"http://purl.org/dc/elements/1.1/",dct:"http://purl.org/dc/terms/",doap:"http://usefulinc.com/ns/doap#",foaf:"http://xmlns.com/foaf/0.1/",geo:"http://www.w3.org/2003/01/geo/wgs84_pos#",gpx:"http://www.w3.org/ns/pim/gpx#",gr:"http://purl.org/goodrelations/v1#",http:"http://www.w3.org/2007/ont/http#",httph:"http://www.w3.org/2007/ont/httph#",icalTZ:"http://www.w3.org/2002/12/cal/icaltzd#",ldp:"http://www.w3.org/ns/ldp#",link:"http://www.w3.org/2007/ont/link#",log:"http://www.w3.org/2000/10/swap/log#",meeting:"http://www.w3.org/ns/pim/meeting#",mo:"http://purl.org/ontology/mo/",org:"http://www.w3.org/ns/org#",owl:"http://www.w3.org/2002/07/owl#",pad:"http://www.w3.org/ns/pim/pad#",patch:"http://www.w3.org/ns/pim/patch#",prov:"http://www.w3.org/ns/prov#",pto:"http://www.productontology.org/id/",qu:"http://www.w3.org/2000/10/swap/pim/qif#",trip:"http://www.w3.org/ns/pim/trip#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",rss:"http://purl.org/rss/1.0/",sched:"http://www.w3.org/ns/pim/schedule#",schema:"http://schema.org/",sioc:"http://rdfs.org/sioc/ns#",skos:"http://www.w3.org/2004/02/skos/core#",solid:"http://www.w3.org/ns/solid/terms#",space:"http://www.w3.org/ns/pim/space#",stat:"http://www.w3.org/ns/posix/stat#",tab:"http://www.w3.org/2007/ont/link#",tabont:"http://www.w3.org/2007/ont/link#",ui:"http://www.w3.org/ns/ui#",vann:"http://purl.org/vocab/vann/",vcard:"http://www.w3.org/2006/vcard/ns#",wf:"http://www.w3.org/2005/01/wf/flow#",xsd:"http://www.w3.org/2001/XMLSchema#"};e.exports=function(e={namedNode:e=>e}){const r={};for(const n in t){const i=t[n];r[n]=function(t=""){return e.namedNode(i+t)}}return r}},5500:(e,t,r)=>{"use strict";r.d(t,{M3:()=>a,W2:()=>o,ll:()=>i,t9:()=>s});var n=r(149);function i(e){return(0,n.A)(e)&&"string"==typeof e.kty}function o(e){return"oct"!==e.kty&&"string"==typeof e.d}function a(e){return"oct"!==e.kty&&void 0===e.d}function s(e){return i(e)&&"oct"===e.kty&&"string"==typeof e.k}},5546:e=>{function t(r,n,i,o){var a=Object.defineProperty;try{a({},"",{})}catch(r){a=0}e.exports=t=function(e,r,n,i){function o(r,n){t(e,r,function(e){return this._invoke(r,n,e)})}r?a?a(e,r,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,i,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},5550:(e,t,r)=>{"use strict";r.d(t,{n:()=>f});var n=r(1436),i=r(1020),o=r(7991),a=r(4495),s=r(676);var c=r(9874),u=r(7493),l=r(9095),d=r(8858),p=r(2168);class f{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader)throw new u.JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!(0,c.A)(this._protectedHeader,this._unprotectedHeader))throw new u.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const r={...this._protectedHeader,...this._unprotectedHeader};let f=!0;if((0,p.A)(u.JWSInvalid,new Map([["b64",!0]]),t?.crit,this._protectedHeader,r).has("b64")&&(f=this._protectedHeader.b64,"boolean"!=typeof f))throw new u.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:h}=r;if("string"!=typeof h||!h)throw new u.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');(0,d.I)(h,e,"sign");let m,g=this._payload;f&&(g=l.Rd.encode((0,n.lF)(g))),m=this._protectedHeader?l.Rd.encode((0,n.lF)(JSON.stringify(this._protectedHeader))):l.Rd.encode("");const v=(0,l.xW)(m,l.Rd.encode("."),g),y=await(async(e,t,r)=>{const n=await(0,s.A)(e,t,"sign");(0,a.A)(e,n);const c=await o.A.subtle.sign((0,i.A)(e,n.algorithm),n,r);return new Uint8Array(c)})(h,e,v),b={signature:(0,n.lF)(y),payload:""};return f&&(b.payload=l.D0.decode(g)),this._unprotectedHeader&&(b.header=this._unprotectedHeader),this._protectedHeader&&(b.protected=l.D0.decode(m)),b}}},5609:(e,t,r)=>{"use strict";r.d(t,{B:()=>a});var n=r(6711),i=r(7493),o=r(9095);async function a(e,t,r){if(e instanceof Uint8Array&&(e=o.D0.decode(e)),"string"!=typeof e)throw new i.JWSInvalid("Compact JWS must be a string or Uint8Array");const{0:a,1:s,2:c,length:u}=e.split(".");if(3!==u)throw new i.JWSInvalid("Invalid Compact JWS");const l=await(0,n.Z)({payload:s,protected:a,signature:c},t,r),d={payload:l.payload,protectedHeader:l.protectedHeader};return"function"==typeof t?{...d,key:l.key}:d}},5636:e=>{function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},5648:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),a=0;a<r.length;a++)"default"!==r[a]&&i(t,e,r[a]);return o(t,e),t}),s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},c=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.createTypeIndexLogic=function(e,t,r,n){var i=d.ns;function o(t){return s(this,void 0,void 0,function(){var o,a,s,u,d,p,f,h,v,y,b,w,x;return c(this,function(c){switch(c.label){case 0:if(!t)throw new Error("loadTypeIndexesFor: No user given");return[4,r.loadProfile(t)];case 1:o=c.sent(),a=m(t),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,n.followOrCreateLink(t,i.solid("publicTypeIndex"),a,o)];case 3:return s=c.sent(),[3,5];case 4:return c.sent(),y="User ".concat(t," has no pointer in profile to publicTypeIndex file."),l.warn(y),[3,5];case 5:u=s?[{label:"public",index:s,agent:t}]:[],c.label=6;case 6:return c.trys.push([6,8,,9]),[4,r.silencedLoadPreferences(t)];case 7:return d=c.sent(),[3,9];case 8:return c.sent(),d=null,[3,9];case 9:if(!d)return[3,15];f=g(d),h=void 0,c.label=10;case 10:return c.trys.push([10,13,,14]),(v=e.any(t,i.solid("privateTypeIndex"),void 0,o))?[3,12]:[4,n.followOrCreateLink(t,i.solid("privateTypeIndex"),f,d)];case 11:v=c.sent(),c.label=12;case 12:return h=v,[3,14];case 13:return c.sent(),y="User ".concat(t," has no pointer in preference file to privateTypeIndex file."),l.warn(y),[3,14];case 14:return p=h?[{label:"private",index:h,agent:t}]:[],[3,16];case 15:p=[],c.label=16;case 16:if(0===(b=u.concat(p)).length)return[2,b];w=b.map(function(e){return e.index}),c.label=17;case 17:return c.trys.push([17,19,,20]),[4,e.fetcher.load(w)];case 18:return c.sent(),[3,20];case 19:return x=c.sent(),l.warn("Problems loading type index: ",x),[3,20];case 20:return[2,b]}})})}function a(t){return s(this,void 0,void 0,function(){var n,a,s,u,d,p,f,h,m;return c(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,r.silencedLoadPreferences(t)];case 1:return n=c.sent(),[3,3];case 2:return c.sent(),a="User ".concat(t," has no pointer in profile to preferences file."),l.warn(a),[3,3];case 3:if(!n)return[3,8];s=e.each(t,i.solid("community"),void 0,n).concat(e.each(t,i.solid("community"),void 0,t.doc())),u=[],d=0,p=s,c.label=4;case 4:return d<p.length?(f=p[d],m=(h=u).concat,[4,o(f)]):[3,7];case 5:u=m.apply(h,[c.sent()]),c.label=6;case 6:return d++,[3,4];case 7:return[2,u];case 8:return[2,[]]}})})}function f(e){return s(this,void 0,void 0,function(){var t,r;return c(this,function(n){switch(n.label){case 0:return[4,o(e)];case 1:return r=(t=n.sent()).concat,[4,a(e)];case 2:return[2,r.apply(t,[n.sent().flat()])]}})})}function h(e,t){return s(this,void 0,void 0,function(){var r,n,i,o,a;return c(this,function(s){switch(s.label){case 0:return[4,f(t)];case 1:r=s.sent(),n=[],i=0,o=r,s.label=2;case 2:return i<o.length?[4,v(o[i],e)]:[3,5];case 3:a=s.sent(),n=n.concat(a),s.label=4;case 4:return i++,[3,2];case 5:return[2,n]}})})}function m(e){var t;return(0,u.sym)((null===(t=e.doc().dir())||void 0===t?void 0:t.uri)+"publicTypeIndex.ttl")}function g(e){var t;return(0,u.sym)((null===(t=e.doc().dir())||void 0===t?void 0:t.uri)+"privateTypeIndex.ttl")}function v(t,r){return s(this,void 0,void 0,function(){var n,o,a,s,l,d,p,f,h,m,g,v,y,b;return c(this,function(c){switch(c.label){case 0:n=t.index,o=[],a=e.statementsMatching(null,i.solid("instance"),null,n).concat(e.statementsMatching(null,i.solid("instanceContainer"),null,n)).map(function(e){return e.subject}),s=0,l=a,c.label=1;case 1:if(!(s<l.length))return[3,6];if(d=l[s],p=e.any(d,i.solid("forClass"),null,n),r&&!p.sameTerm(r))return[3,5];for(f=e.each(d,i.solid("instance"),null,n),h=0,m=f;h<m.length;h++)b=m[h],o.push({instance:b,type:p,scope:t});g=e.each(d,i.solid("instanceContainer"),null,n),v=0,y=g,c.label=2;case 2:return v<y.length?(b=y[v],[4,e.fetcher.load(b)]):[3,5];case 3:c.sent(),o.push({instance:(0,u.sym)(b.value),type:p,scope:t}),c.label=4;case 4:return v++,[3,2];case 5:return s++,[3,1];case 6:return[2,o]}})})}return{registerInTypeIndex:function(t,r,n){return s(this,void 0,void 0,function(){var o,a,s,l;return c(this,function(c){switch(c.label){case 0:o=(0,p.newThing)(r),a=[(0,u.st)(o,i.rdf("type"),i.solid("TypeRegistration"),r),(0,u.st)(o,i.solid("forClass"),n,r),(0,u.st)(o,i.solid("instance"),t,r)],c.label=1;case 1:return c.trys.push([1,3,,4]),[4,e.updater.update([],a)];case 2:return c.sent(),[3,4];case 3:return s=c.sent(),l="Unable to register ".concat(t," in index ").concat(r,": ").concat(s),console.warn(l),[2,null];case 4:return[2,o]}})})},getRegistrations:function(t,r){return e.each(void 0,i.solid("instance"),t).filter(function(t){return e.holds(t,i.solid("forClass"),r)})},loadTypeIndexesFor:o,loadCommunityTypeIndexes:a,loadAllTypeIndexes:f,getScopedAppInstances:h,getAppInstances:function(e){return s(this,void 0,void 0,function(){var r;return c(this,function(n){switch(n.label){case 0:if(!(r=t.currentUser()))throw new Error("getAppInstances: Must be logged in to find apps.");return[4,h(e,r)];case 1:return[2,n.sent().map(function(e){return e.instance})]}})})},suggestPublicTypeIndex:m,suggestPrivateTypeIndex:g,deleteTypeIndexRegistration:function(t){return s(this,void 0,void 0,function(){var r,n;return c(this,function(o){switch(o.label){case 0:if(!(r=e.the(null,i.solid("instance"),t.instance,t.scope.index)))throw new Error("deleteTypeIndexRegistration: No registration found for ".concat(t.instance));return n=e.statementsMatching(r,null,null,t.scope.index),[4,e.updater.update(n,[])];case 1:return o.sent(),[2]}})})},getScopedAppsFromIndex:v}};var u=r(2209),l=a(r(8339)),d=r(733),p=r(9013)},5715:(e,t,r)=>{var n=r(2987),i=r(1156),o=r(7122),a=r(7752);e.exports=function(e,t){return n(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},5752:(e,t,r)=>{var n=r(4582),i=r(4722),o=r(6559),a=r(4466),s=i.DOMImplementation,c=n.NAMESPACE,u=a.ParseError,l=a.XMLReader;function d(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function p(e){this.options=e||{locator:{}}}function f(){this.cdata=!1}function h(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function m(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function g(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function v(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}p.prototype.parseFromString=function(e,t){var r=this.options,n=new l,i=r.domBuilder||new f,a=r.errorHandler,s=r.locator,u=r.xmlns||{},p=/\/x?html?$/.test(t),h=p?o.HTML_ENTITIES:o.XML_ENTITIES;s&&i.setDocumentLocator(s),n.errorHandler=function(e,t,r){if(!e){if(t instanceof f)return t;e=t}var n={},i=e instanceof Function;function o(t){var o=e[t];!o&&i&&(o=2==e.length?function(r){e(t,r)}:e),n[t]=o&&function(e){o("[xmldom "+t+"]\t"+e+m(r))}||function(){}}return r=r||{},o("warning"),o("error"),o("fatalError"),n}(a,i,s),n.domBuilder=r.domBuilder||i,p&&(u[""]=c.HTML),u.xml=u.xml||c.XML;var g=r.normalizeLineEndings||d;return e&&"string"==typeof e?n.parse(g(e),u,h):n.errorHandler.error("invalid doc source"),i.doc},f.prototype={startDocument:function(){this.doc=(new s).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,n){var i=this.doc,o=i.createElementNS(e,r||t),a=n.length;v(this,o),this.currentElement=o,this.locator&&h(this.locator,o);for(var s=0;s<a;s++){e=n.getURI(s);var c=n.getValue(s),u=(r=n.getQName(s),i.createAttributeNS(e,r));this.locator&&h(n.getLocator(s),u),u.value=u.nodeValue=c,o.setAttributeNode(u)}},endElement:function(e,t,r){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&h(this.locator,r),v(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=g.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&h(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,r){e=g.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&h(this.locator,n),v(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var i=n.createDocumentType(e,t,r);this.locator&&h(this.locator,i),v(this,i),this.doc.doctype=i}},warning:function(e){console.warn("[xmldom warning]\t"+e,m(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,m(this.locator))},fatalError:function(e){throw new u(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){f.prototype[e]=function(){return null}}),t.DOMParser=p},5796:(e,t,r)=>{"use strict";r.d(t,{A:()=>K});var n=r(9814),i=r(3093),o=r(8287);const a="http://www.w3.org/1999/02/22-rdf-syntax-ns#",s="http://www.w3.org/2001/XMLSchema#",c="http://www.w3.org/2000/10/swap/",u={xsd:{decimal:`${s}decimal`,boolean:`${s}boolean`,double:`${s}double`,integer:`${s}integer`,string:`${s}string`},rdf:{type:`${a}type`,nil:`${a}nil`,first:`${a}first`,rest:`${a}rest`,langString:`${a}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${c}reify#forSome`,forAll:`${c}reify#forAll`},log:{implies:`${c}log#implies`,isImpliedBy:`${c}log#isImpliedBy`}},{xsd:l}=u,d=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,p={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},f=/[\x00-\x20<>\\"\{\}\|\^\`]/,h={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},m=/$0^/;class g{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._isImpliedBy=e.isImpliedBy,this._lineMode=!!e.lineMode){this._n3Mode=!1;for(const e in this)!(e in h)&&this[e]instanceof RegExp&&(this[e]=m)}else this._n3Mode=!1!==e.n3;this.comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,t){let r=this._input,n=r.length;for(;;){let e,a;for(;e=this._newline.exec(r);)this.comments&&(a=this._comment.exec(e[0]))&&i("comment",a[1],"",this._line,e[0].length),r=r.substr(e[0].length,r.length),n=r.length,this._line++;if(!e&&(e=this._whitespace.exec(r))&&(r=r.substr(e[0].length,r.length)),this._endOfFile.test(r))return t&&(this.comments&&(a=this._comment.exec(r))&&i("comment",a[1],"",this._line,r.length),r=null,i("eof","","",this._line,0)),this._input=r;const s=this._line,c=r[0];let u="",d="",p="",h=null,m=0,g=!1;switch(c){case"^":if(r.length<3)break;if("^"!==r[1]){this._n3Mode&&(m=1,u="^");break}if(this._previousMarker="^^",r=r.substr(2),"<"!==r[0]){g=!0;break}case"<":if(h=this._unescapedIri.exec(r))u="IRI",d=h[1];else if(h=this._iri.exec(r)){if(d=this._unescape(h[1]),null===d||f.test(d))return o(this);u="IRI"}else r.length>1&&"<"===r[1]?(u="<<",m=2):this._n3Mode&&r.length>1&&"="===r[1]&&(m=2,this._isImpliedBy?(u="abbreviation",d="<"):(u="inverse",d=">"));break;case">":r.length>1&&">"===r[1]&&(u=">>",m=2);break;case"_":((h=this._blank.exec(r))||t&&(h=this._blank.exec(`${r} `)))&&(u="blank",p="_",d=h[1]);break;case'"':if(h=this._simpleQuotedString.exec(r))d=h[1];else if(({value:d,matchLength:m}=this._parseLiteral(r)),null===d)return o(this);null===h&&0===m||(u="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(h=this._simpleApostropheString.exec(r))d=h[1];else if(({value:d,matchLength:m}=this._parseLiteral(r)),null===d)return o(this);null===h&&0===m||(u="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(h=this._variable.exec(r))&&(u="var",d=h[0]);break;case"@":"literal"===this._previousMarker&&(h=this._langcode.exec(r))?(u="langcode",d=h[1]):(h=this._keyword.exec(r))&&(u=h[0]);break;case".":if(1===r.length?t:r[1]<"0"||r[1]>"9"){u=".",m=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(h=this._number.exec(r)||t&&(h=this._number.exec(`${r} `)))&&(u="literal",d=h[0],p="string"==typeof h[1]?l.double:"string"==typeof h[2]?l.decimal:l.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(h=this._sparqlKeyword.exec(r))?u=h[0].toUpperCase():g=!0;break;case"f":case"t":(h=this._boolean.exec(r))?(u="literal",d=h[0],p=l.boolean):g=!0;break;case"a":(h=this._shortPredicates.exec(r))?(u="abbreviation",d="a"):g=!0;break;case"=":this._n3Mode&&r.length>1&&(u="abbreviation",">"!==r[1]?(m=1,d="="):(m=2,d=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"}":this._lineMode||(m=1,u=c);break;case"{":!this._lineMode&&r.length>=2&&("|"===r[1]?(u="{|",m=2):(u=c,m=1));break;case"|":r.length>=2&&"}"===r[1]&&(u="|}",m=2);break;default:g=!0}if(g&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(h=this._prefix.exec(r))?((h=this._prefixed.exec(r))||t&&(h=this._prefixed.exec(`${r} `)))&&(u="prefixed",p=h[1]||"",d=this._unescape(h[2])):(u="prefix",d=h[1]||"")),"^^"===this._previousMarker)switch(u){case"prefixed":u="type";break;case"IRI":u="typeIRI";break;default:u=""}if(!u)return t||!/^'''|^"""/.test(r)&&/\n|\r/.test(r)?o(this):this._input=r;const v=m||h[0].length,y=i(u,d,p,s,v);this.previousToken=y,this._previousMarker=u,r=r.substr(v,r.length)}function i(t,i,o,a,s){const c=r?n-r.length:n,u={type:t,value:i,prefix:o,line:a,start:c,end:c+s};return e(null,u),u}function o(t){e(t._syntaxError(/^\S*/.exec(r)[0]))}}_unescape(e){let t=!1;const r=e.replace(d,(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 p?p[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}_readStartingBom(e){return e.startsWith("\ufeff")?e.substr(1):e}tokenize(e,t){if(this._line=1,"string"==typeof e){if(this._input=this._readStartingBom(e),"function"!=typeof t){const e=[];let t;if(this._tokenizeToEnd((r,n)=>r?t=r:e.push(n),!0),t)throw t;return e}queueMicrotask(()=>this._tokenizeToEnd(t,!0))}else this._pendingBuffer=null,"function"==typeof e.setEncoding&&e.setEncoding("utf8"),e.on("data",e=>{null!==this._input&&0!==e.length&&(this._pendingBuffer&&(e=o.hp.concat([this._pendingBuffer,e]),this._pendingBuffer=null),128&e[e.length-1]?this._pendingBuffer=e:(void 0===this._input?this._input=this._readStartingBom("string"==typeof e?e:e.toString()):this._input+=e,this._tokenizeToEnd(t,!1)))}),e.on("end",()=>{"string"==typeof this._input&&this._tokenizeToEnd(t,!0)}),e.on("error",t)}}const{rdf:v,xsd:y}=u;let b,w=0;const x={namedNode:T,blankNode:I,variable:P,literal:F,defaultGraph:function(){return b},quad:N,triple:N,fromTerm:O,fromQuad:R};class _{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof _?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class E extends _{get termType(){return"NamedNode"}}class S extends _{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 E(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?y.string:v.langString}equals(e){return e instanceof S?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 A extends _{constructor(e){super(`_:${e}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class k extends _{constructor(e){super(`?${e}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}b=new class extends _{constructor(){return super(""),b||this}get termType(){return"DefaultGraph"}equals(e){return this===e||!!e&&this.termType===e.termType}};class C extends _{constructor(e,t,r,n){super(""),this._subject=e,this._predicate=t,this._object=r,this._graph=n||b}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 T(e){return new E(e)}function I(e){return new A(e||"n3-"+w++)}function F(e,t){if("string"==typeof t)return new S(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";return""===r&&("boolean"==typeof e?r=y.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?y.integer:y.double:(r=y.double,Number.isNaN(e)||(e=e>0?"INF":"-INF")))),""===r||r===y.string?new S(`"${e}"`):new S(`"${e}"^^${r}`)}function P(e){return new k(e)}function N(e,t,r,n){return new C(e,t,r,n)}function O(e){if(e instanceof _)return e;switch(e.termType){case"NamedNode":return T(e.value);case"BlankNode":return I(e.value);case"Variable":return P(e.value);case"DefaultGraph":return b;case"Literal":return F(e.value,e.language||e.datatype);case"Quad":return R(e);default:throw new Error(`Unexpected termType: ${e.termType}`)}}function R(e){if(e instanceof C)return e;if("Quad"!==e.termType)throw new Error(`Unexpected termType: ${e.termType}`);return N(O(e.subject),O(e.predicate),O(e.object),O(e.graph))}let j=0;class L{constructor(e){this._contextStack=[],this._graph=null,e=e||{},this._setBase(e.baseIRI),e.factory&&U(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._isImpliedBy=e.isImpliedBy,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 g({lineMode:s,n3:a,isImpliedBy:this._isImpliedBy}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){j=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({type:e,subject:r,predicate:n,object:i,graph:t,inverse:!!o&&this._inversePredicate,blankPrefix:o?this._prefixes._:"",quantified:o?this._quantified:null}),o&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(e,t){const r=this._contextStack.pop();if(!r||r.type!==e)return this._error(`Unexpected ${t.type}`,t);this._subject=r.subject,this._predicate=r.predicate,this._object=r.object,this._graph=r.graph,this._n3Mode&&(this._inversePredicate=r.inverse,this._prefixes._=r.blankPrefix,this._quantified=r.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._factory.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._factory.namedNode(n+e.value);break;case"blank":r=this._factory.blankNode(this._prefixes[e.prefix]+e.value);break;case"var":r=this._factory.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._factory.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._factory.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="blankNode",this._readQuantifierList):this._error('Unexpected "@forSome"',e);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier="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._factory.literal(e.value,this._factory.namedNode(e.prefix));break;case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Unexpected RDF-star 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"[":if(this._n3Mode)return this._saveContext("blank",this._graph,this._subject,this._subject=this._factory.blankNode(),null),this._readBlankNodeHead;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._factory.literal(e.value,this._factory.namedNode(e.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._factory.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._factory.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-star 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("blank",e),null!==this._object?this._getContextEndReader():null!==this._predicate?this._readObject:t?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank}_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._factory.blankNode(),this.RDF_FIRST,this._subject=t=this._factory.blankNode()),n=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,r=this._factory.blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",e),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._factory.literal(e.value,this._factory.namedNode(e.prefix)),n=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._factory.blankNode()),this._readSubject):this._error("Unexpected graph",e);default:if(void 0===(t=this._readEntity(e)))return}if(null===r&&(this._subject=r=this._factory.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._factory.literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const r=this._readEntity(e);if(void 0===r)return;t=this._factory.literal(this._literalValue,r),e=null;break;case"langcode":t=this._factory.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("formula",e),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;case"{|":if(!this._supportsRDFStar)return this._error("Unexpected RDF-star syntax",e);const o=this._predicate,a=this._object;this._subject=this._factory.quad(n,o,a,this.DEFAULTGRAPH),t=this._readPredicate;break;case"|}":if("Quad"!==this._subject.termType)return this._error("Unexpected asserted triple closing",e);this._subject=null,t=this._readPunctuation;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._factory.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._factory.blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._factory.blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,t,this.QUANTIFIERS_GRAPH)):this._quantified[t.id]=this._factory[this._quantifier](this._factory.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 t=this._subject;this._restoreContext("item",e),this._emit(this._subject,this.RDF_FIRST,t,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let t,r;const n=this._factory.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._factory.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._factory.quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<",e),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._factory.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=D}_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){let n,i,o;if(t&&(t.onQuad||t.onPrefix||t.onComment)?(n=t.onQuad,i=t.onPrefix,o=t.onComment):(n=t,i=r),this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${j++}_`,this._prefixCallback=i||D,this._inversePredicate=!1,this._quantified=Object.create(null),!n){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}let a=(e,t)=>{null!==e?(this._callback(e),this._callback=D):this._readCallback&&(this._readCallback=this._readCallback(t))};o&&(this._lexer.comments=!0,a=(e,t)=>{null!==e?(this._callback(e),this._callback=D):this._readCallback&&("comment"===t.type?o(t.value):this._readCallback=this._readCallback(t))}),this._callback=n,this._lexer.tokenize(e,a)}}function D(){}function U(e,t){e._factory=t,e.DEFAULTGRAPH=t.defaultGraph(),e.RDF_FIRST=t.namedNode(u.rdf.first),e.RDF_REST=t.namedNode(u.rdf.rest),e.RDF_NIL=t.namedNode(u.rdf.nil),e.N3_FORALL=t.namedNode(u.r.forAll),e.N3_FORSOME=t.namedNode(u.r.forSome),e.ABBREVIATIONS={a:t.namedNode(u.rdf.type),"=":t.namedNode(u.owl.sameAs),">":t.namedNode(u.log.implies),"<":t.namedNode(u.log.isImpliedBy)},e.QUANTIFIERS_GRAPH=t.namedNode("urn:n3:quantifiers")}U(L.prototype,x);var M=r(2299),B=r(5936),H=r(5946),q=r(5894),W=r(4011),V=r(9403);function K(e,t,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"text/turtle",a=arguments.length>4?arguments[4]:void 0;o=o||V.sT,o=o.split(";")[0];try{if(o===V.ny||o===V.sT)(0,M.A)(t,t,r,r,null,null,"",null).loadBuf(e),c();else if(o===V.JG)new H.A(t).parse(W.parseXML(e),r,t.sym(r)),c();else if(o===V.H)(0,B.B)(W.parseXML(e,{contentType:V.H}),t,r),c();else if(o===V.lc)(0,B.B)(W.parseXML(e,{contentType:V.lc}),t,r),c();else if(o===V.K9||o===V.Fn)(0,q.A)(e,t,r),c();else if(o===V.i2)(0,i.A)(e,t,r).then(c).catch(u);else{if(o!==V._0&&o!==V.BR)throw void 0===o?new Error("contentType is undefined"):new Error("Don't know how to parse "+o+" yet");var s=new L({factory:n.A});!function(e,r){try{s.parse(r,l)}catch(e){a(e,t)}}(null,e)}}catch(e){u(e)}function c(){a&&a(null,t)}function u(e){if(o!==V.i2||o!==V._0||o!==V.BR){if(!a){let t=new Error(e+" while trying to parse <"+r+"> as "+o);throw t.cause=e,t}a(e,t)}}function l(e,r){r?t.add(r.subject,r.predicate,r.object,r.graph):a(e,t)}K.handled={"text/n3":!0,"text/turtle":!0,"application/rdf+xml":!0,"application/xhtml+xml":!0,"text/html":!0,"application/sparql-update":!0,"application/sparql-update-single-match":!0,"application/ld+json":!0,"application/nquads":!0,"application/n-quads":!0}}},5869:(e,t,r)=>{var n=r(887);e.exports=function(e,t,r,i,o){var a=n(e,t,r,i,o);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},5894:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(2299),i=r(3581);function o(e,t,r){var o,a,s,c=["INSERT","DELETE","WHERE"],u=(0,i.A)("http://www.w3.org/ns/pim/patch#"),l=(0,n.A)(t,t,r,r,null,null,"",null),d={},p=function(e,t,r,n,i){return"Line "+(t+1)+" of <"+e+">: Bad syntax:\n "+i+'\n at: "'+r.slice(n,n+30)+'"'};o=0;var f=t.sym(r+"#query");for(d.query=f;;){if((a=l.skipSpace(e,o))<0)return d;if(";"===e[a]){if((o=l.skipSpace(e,a+1))<0)return d;a=o}var h=!1;for(s=0;s<c.length;s++){var m=c[s];if(e.slice(a,a+m.length)===m){if((o=l.skipSpace(e,a+m.length))<0)throw p(l._thisDoc,l.lines,e,a+m.length,"found EOF, needed {...} after "+m);if(("INSERT"===m||"DELETE"===m)&&"DATA"===e.slice(o,o+4)){if((a=l.skipSpace(e,o+4))<0)throw p(l._thisDoc,l.lines,e,o+4,"needed {...} after INSERT DATA "+m);o=a}var g=[];if((a=l.node(e,o,g))<0)throw p(l._thisDoc,l.lines,e,o,"bad syntax or EOF in {...} after "+m);d[m.toLowerCase()]=g[0],t.add(f,u(m.toLowerCase()),g[0]),h=!0,o=a}}if(!h&&"@prefix"===e.slice(a,a+7)){if((o=l.directive(e,a))<0)throw p(l._thisDoc,l.lines,e,o,"bad syntax or EOF after @prefix ");o=l.checkDot(e,o),h=!0}if(!h)throw p(l._thisDoc,l.lines,e,a,"Unknown syntax at start of statememt: '"+e.slice(a).slice(0,20)+"'")}}},5901:(e,t,r)=>{var n=r(79);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},5915:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matrix=void 0;var n=r(506);t.matrix={matrixForQuery:n.matrixForQuery}},5936:(e,t,r)=>{"use strict";r.d(t,{A:()=>l,B:()=>d});var n=r(8921),i=r(8616),o=r(5108),a=r(2727),s=r(4011),c=r(437);if(void 0===u)var u={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};class l{constructor(e,t){this.options=t||{},this.kb=e,this.target=t.target||{graph:{subjects:{},prefixes:{},terms:{}}},this.blankNodes=[],this.htmlOptions={selfClosing:"br img input area base basefont col colgroup source wbr isindex link meta param hr"},this.theOne="_:"+(new Date).getTime(),this.language=null,this.vocabulary=null,this.blankCounter=0,this.langAttributes=[{namespaceURI:"http://www.w3.org/XML/1998/namespace",localName:"lang"}],this.inXHTMLMode=!1,this.absURIRE=/[\w\_\-]+:\S+/,this.finishedHandlers=[],this.init()}addTriple(e,t,r,n){var i,o,a,s;i=void 0===t?c.A.namedNode(this.options.base):this.toRDFNodeObject(t),a=this.toRDFNodeObject(r),o=this.toRDFNodeObject(n),s=c.A.namedNode(this.options.base),this.kb.add(i,a,o,s)}ancestorPath(e){for(var t="";e&&e.nodeType!==u.DOCUMENT_NODE;)t="/"+e.localName+t,e=e.parentNode;return t}copyMappings(e){var t={};for(var r in e)t[r]=e[r];return t}copyProperties(){}deriveDateTimeType(e){for(var t=0;t<l.dateTimeTypes.length;t++){var r=l.dateTimeTypes[t].pattern.exec(e);if(r&&r[0].length===e.length)return l.dateTimeTypes[t].type}return null}init(){}newBlankNode(){return this.blankCounter++,"_:"+this.blankCounter}newSubjectOrigin(e,t){}parseCURIE(e,t,r){var n,i=e.indexOf(":");if(i>=0){var o=e.substring(0,i);if(""===o)return(n=t[""])?n+e.substring(i+1):null;if("_"===o)return"_:"+e.substring(i+1);if(l.NCNAME.test(o)&&(n=t[o]))return n+e.substring(i+1)}return null}parseCURIEOrURI(e,t,r){return this.parseCURIE(e,t,r)||this.resolveAndNormalize(r,e)}parsePredicate(e,t,r,n,i,o){if(""===e)return null;var a=this.parseTermOrCURIEOrAbsURI(e,t,o?null:r,n,i);return a&&0===a.indexOf("_:")?null:a}parsePrefixMappings(e,t){for(var r=this.tokenize(e),n=null,i=0;i<r.length;i++)":"===r[i][r[i].length-1]?n=r[i].substring(0,r[i].length-1):n&&(t[n]=this.options.base?a.join(r[i],this.options.base):r[i],n=null)}static parseRDFaDOM(e,t,r){var n=new l(t,{base:r});e.baseURI||(e.baseURI=r),n.process(e,{baseURI:r})}parseSafeCURIEOrCURIEOrURI(e,t,r){return"["===(e=this.trim(e)).charAt(0)&&"]"===e.charAt(e.length-1)?0===(e=(e=e.substring(1,e.length-1)).trim(e)).length?null:"_:"===e?this.theOne:this.parseCURIE(e,t,r):this.parseCURIEOrURI(e,t,r)}parseTermOrCURIEOrAbsURI(e,t,r,n,i){e=this.trim(e);var o=this.parseCURIE(e,n,i);if(o)return o;if(r){if(t&&!this.absURIRE.exec(e))return t+e;var a=r[e];if(a)return a;if(a=r[e.toLowerCase()])return a}return this.absURIRE.exec(e)?this.resolveAndNormalize(i,e):null}parseTermOrCURIEOrURI(e,t,r,n,i){e=this.trim(e);var o=this.parseCURIE(e,n,i);if(o)return o;var a=r[e];return a||((a=r[e.toLowerCase()])?a:t&&!this.absURIRE.exec(e)?t+e:this.resolveAndNormalize(i,e))}parseURI(e){return e}process(e,t){var r;t=t||{},e.nodeType===u.DOCUMENT_NODE?(e.baseURI&&!t.baseURI&&(t.baseURI=e.baseURI),r=e.baseURI,(e=e.documentElement).baseURI||(e.baseURI=r),this.setContext(e)):e.parentNode.nodeType===u.DOCUMENT_NODE&&this.setContext(e);var n=[],i=function(e){if(!e&&t&&t.baseURI)return t.baseURI;var r=e.indexOf("#");return r>=0&&(e=e.substring(0,r)),t&&t.baseURIMap&&(e=t.baseURIMap(e)),e};for(n.push({current:e,context:this.push(null,i(e.baseURI))});n.length>0;){var o=n.shift();if(o.parent){if(o.context.parent&&o.context.parent.listMapping===o.listMapping)continue;for(let e in o.listMapping){var s=o.listMapping[e];if(0!==s.length){var c=[];for(let e=0;e<s.length;e++)c.push(this.newBlankNode());for(let e=0;e<c.length;e++)this.addTriple(o.parent,c[e],"http://www.w3.org/1999/02/22-rdf-syntax-ns#first",s[e]),this.addTriple(o.parent,c[e],"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",{type:l.objectURI,value:e+1<c.length?c[e+1]:"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"});this.addTriple(o.parent,o.subject,e,{type:l.objectURI,value:c[0]})}else this.addTriple(o.parent,o.subject,e,{type:l.objectURI,value:"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"})}}else{var d=o.current,p=o.context,f=!1,h=null,m=null,g=null,v=p.prefixes,y=!1,b=[],w=p.listMapping,x=!p.parent,_=p.language,E=p.vocabulary;r=this.parseURI(i(d.baseURI)),d.item=null;var S=d.getAttributeNode("vocab");if(S){let e=this.trim(S.value);if(e.length>0){E=e;var A=r.spec;this.addTriple(d,A,"http://www.w3.org/ns/rdfa#usesVocabulary",{type:l.objectURI,value:E})}else E=this.vocabulary}for(var k=0;k<d.attributes.length;k++){var C=d.attributes[k];if("x"===C.nodeName.charAt(0)&&0===C.nodeName.indexOf("xmlns:")){y||(v=this.copyMappings(v),y=!0);var T=C.nodeName.substring(6),I=l.trim(C.value);v[T]=this.options.base?a.join(I,this.options.base):I}}var F=d.getAttributeNode("prefix");F&&(y||(v=this.copyMappings(v),y=!0),this.parsePrefixMappings(F.value,v));var P=null;for(let e=0;!P&&e<this.langAttributes.length;e++)P=d.getAttributeNodeNS(this.langAttributes[e].namespaceURI,this.langAttributes[e].localName);if(P){let e=l.trim(P.value);_=e.length>0?e:null}var N,O,R=d.getAttributeNode("rel"),j=d.getAttributeNode("rev"),L=d.getAttributeNode("typeof"),D=d.getAttributeNode("property"),U=d.getAttributeNode("datatype"),M=this.inHTMLMode?d.getAttributeNode("datetime"):null,B=d.getAttributeNode("content"),H=d.getAttributeNode("about"),q=d.getAttributeNode("src"),W=d.getAttributeNode("resource"),V=d.getAttributeNode("href"),K=d.getAttributeNode("inlist"),J=[];if(R){O=this.tokenize(R.value);for(let e=0;e<O.length;e++)(N=this.parsePredicate(O[e],E,p.terms,v,r,this.inHTMLMode&&null!==D))&&J.push(N)}var z=[];if(j){O=this.tokenize(j.value);for(let e=0;e<O.length;e++)(N=this.parsePredicate(O[e],E,p.terms,v,r,this.inHTMLMode&&D))&&z.push(N)}if(this.inHTMLMode&&(R||j)&&D&&(0===J.length&&(R=null),0===z.length&&(j=null)),R||j?(H&&(h=this.parseSafeCURIEOrCURIEOrURI(H.value,v,r)),L&&(g=h),h||(d.parentNode.nodeType===u.DOCUMENT_NODE?h=i(d.baseURI):p.parentObject&&(h=i(d.parentNode.baseURI)===p.parentObject?i(d.baseURI):p.parentObject)),W&&(m=this.parseSafeCURIEOrCURIEOrURI(W.value,v,r)),m||(V?m=this.resolveAndNormalize(r,encodeURI(V.value)):q?m=this.resolveAndNormalize(r,encodeURI(q.value)):!L||H||this.inXHTMLMode&&("head"===d.localName||"body"===d.localName)||(m=this.newBlankNode())),!L||H||!this.inXHTMLMode||"head"!==d.localName&&"body"!==d.localName?L&&!H&&(g=m):g=h):!D||B||U?(H&&(h=this.parseSafeCURIEOrCURIEOrURI(H.value,v,r)),!h&&W&&(h=this.parseSafeCURIEOrCURIEOrURI(W.value,v,r)),!h&&V&&(h=this.resolveAndNormalize(r,encodeURI(V.value))),!h&&q&&(h=this.resolveAndNormalize(r,encodeURI(q.value))),h||(d.parentNode.nodeType===u.DOCUMENT_NODE?h=i(d.baseURI):!this.inXHTMLMode&&!this.inHTMLMode||"head"!==d.localName&&"body"!==d.localName?L?h=this.newBlankNode():p.parentObject&&(h=i(d.parentNode.baseURI)===p.parentObject?i(d.baseURI):p.parentObject,D||(f=!0)):h=i(d.parentNode.baseURI)===p.parentObject?i(d.baseURI):p.parentObject),L&&(g=h)):(H&&(h=this.parseSafeCURIEOrCURIEOrURI(H.value,v,r),L&&(g=h)),h||d.parentNode.nodeType!==u.DOCUMENT_NODE?!h&&p.parentObject&&(h=i(d.parentNode.baseURI)===p.parentObject?i(d.baseURI):p.parentObject):(h=i(d.baseURI),L&&(g=h)),L&&!g&&(W&&(g=this.parseSafeCURIEOrCURIEOrURI(W.value,v,r)),!g&&V&&(g=this.resolveAndNormalize(r,encodeURI(V.value))),!g&&q&&(g=this.resolveAndNormalize(r,encodeURI(q.value))),g||!this.inXHTMLMode&&!this.inHTMLMode||"head"!==d.localName&&"body"!==d.localName||(g=h),g||(g=this.newBlankNode()),m=g)),h&&(H||W||g)){var $=h;L&&!H&&!W&&m&&($=m),this.newSubjectOrigin(d,$)}if(g){O=this.tokenize(L.value);for(let e=0;e<O.length;e++){var G=this.parseTermOrCURIEOrAbsURI(O[e],E,p.terms,v,r);G&&this.addTriple(d,g,l.typeURI,{type:l.objectURI,value:G})}}if(h&&h!==p.parentObject&&(w={},x=!0),m){if(R&&K)for(let e=0;e<J.length;e++){let t=w[J[e]];t||(t=[],w[J[e]]=t),t.push({type:l.objectURI,value:m})}else if(R)for(let e=0;e<J.length;e++)this.addTriple(d,h,J[e],{type:l.objectURI,value:m});if(j)for(let e=0;e<z.length;e++)this.addTriple(d,m,z[e],{type:l.objectURI,value:h})}else{if(h&&!m&&(R||j)&&(m=this.newBlankNode()),R&&K)for(let e=0;e<J.length;e++){let t=w[J[e]];t||(t=[],w[N]=t),b.push({predicate:J[e],list:t})}else if(R)for(let e=0;e<J.length;e++)b.push({predicate:J[e],forward:!0});if(j)for(let e=0;e<z.length;e++)b.push({predicate:z[e],forward:!1})}if(D){var X=null,Y=null;U?(X=""===U.value?l.PlainLiteralURI:this.parseTermOrCURIEOrAbsURI(U.value,E,p.terms,v,r),Y=M&&!B?M.value:X===l.XMLLiteralURI||X===l.HTMLLiteralURI?null:B?B.value:d.textContent):B?(X=l.PlainLiteralURI,Y=B.value):M?(Y=M.value,(X=l.deriveDateTimeType(Y))||(X=l.PlainLiteralURI)):R||j||(W&&(Y=this.parseSafeCURIEOrCURIEOrURI(W.value,v,r)),!Y&&V?Y=this.resolveAndNormalize(r,encodeURI(V.value)):!Y&&q&&(Y=this.resolveAndNormalize(r,encodeURI(q.value))),Y&&(X=l.objectURI)),X||(L&&!H?(X=l.objectURI,Y=g):(Y=d.textContent,this.inHTMLMode&&"time"===d.localName&&(X=l.deriveDateTimeType(Y)),X||(X=l.PlainLiteralURI))),O=this.tokenize(D.value);for(let e=0;e<O.length;e++){let t=this.parsePredicate(O[e],E,p.terms,v,r);if(t)if(K){let e=w[t];e||(e=[],w[t]=e),e.push(X===l.XMLLiteralURI||X===l.HTMLLiteralURI?{type:X,value:d.childNodes}:{type:X||l.PlainLiteralURI,value:Y,language:_})}else X===l.XMLLiteralURI||X===l.HTMLLiteralURI?this.addTriple(d,h,t,{type:X,value:d.childNodes}):this.addTriple(d,h,t,{type:X||l.PlainLiteralURI,value:Y,language:_})}}if(h&&!f)for(let e=0;e<p.incomplete.length;e++)p.incomplete[e].list?p.incomplete[e].list.push({type:l.objectURI,value:h}):p.incomplete[e].forward?this.addTriple(d,p.subject,p.incomplete[e].predicate,{type:l.objectURI,value:h}):this.addTriple(d,h,p.incomplete[e].predicate,{type:l.objectURI,value:p.subject});var Q=null,Z=h;f?((Q=this.push(p,p.subject)).parentObject=i(d.parentNode.baseURI)===p.parentObject?i(d.baseURI):p.parentObject,Q.incomplete=p.incomplete,Q.language=_,Q.prefixes=v,Q.vocabulary=E):((Q=this.push(p,h)).parentObject=m||h||p.subject,Q.prefixes=v,Q.incomplete=b,m&&(Z=m,w={},x=!0),Q.listMapping=w,Q.language=_,Q.vocabulary=E),x&&n.unshift({parent:d,context:p,subject:Z,listMapping:w});for(var ee=d.lastChild;ee;ee=ee.previousSibling)ee.nodeType===u.ELEMENT_NODE&&n.unshift({current:ee,context:Q})}}this.inHTMLMode&&this.copyProperties();for(let t=0;t<this.finishedHandlers.length;t++)this.finishedHandlers[t](e)}push(e,t){return{parent:e,subject:t||(e?e.subject:null),parentObject:null,incomplete:[],listMapping:e?e.listMapping:{},language:e?e.language:this.language,prefixes:e?e.prefixes:this.target.graph.prefixes,terms:e?e.terms:this.target.graph.terms,vocabulary:e?e.vocabulary:this.vocabulary}}resolveAndNormalize(e,t){return a.join(t,e)}setContext(e){"html"===e.localName&&"XHTML+RDFa 1.1"===e.getAttribute("version")?this.setXHTMLContext():"html"===e.localName||"http://www.w3.org/1999/xhtml"===e.namespaceURI?"undefined"!=typeof document&&document.doctype?"-//W3C//DTD XHTML+RDFa 1.0//EN"===document.doctype.publicId&&"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"===document.doctype.systemId?(console.log("WARNING: RDF 1.0 is not supported. Defaulting to HTML5 mode."),this.setHTMLContext()):"-//W3C//DTD XHTML+RDFa 1.1//EN"===document.doctype.publicId&&"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd"===document.doctype.systemId?this.setXHTMLContext():this.setHTMLContext():this.setHTMLContext():this.setXMLContext()}setHTMLContext(){this.setInitialContext(),this.langAttributes=[{namespaceURI:"http://www.w3.org/XML/1998/namespace",localName:"lang"},{namespaceURI:null,localName:"lang"}],this.inXHTMLMode=!1,this.inHTMLMode=!0}setInitialContext(){this.vocabulary=null,this.langAttributes=[{namespaceURI:"http://www.w3.org/XML/1998/namespace",localName:"lang"}]}setXHTMLContext(){this.setInitialContext(),this.inXHTMLMode=!0,this.inHTMLMode=!1,this.langAttributes=[{namespaceURI:"http://www.w3.org/XML/1998/namespace",localName:"lang"},{namespaceURI:null,localName:"lang"}],this.target.graph.terms.alternate="http://www.w3.org/1999/xhtml/vocab#alternate",this.target.graph.terms.appendix="http://www.w3.org/1999/xhtml/vocab#appendix",this.target.graph.terms.bookmark="http://www.w3.org/1999/xhtml/vocab#bookmark",this.target.graph.terms.cite="http://www.w3.org/1999/xhtml/vocab#cite",this.target.graph.terms.chapter="http://www.w3.org/1999/xhtml/vocab#chapter",this.target.graph.terms.contents="http://www.w3.org/1999/xhtml/vocab#contents",this.target.graph.terms.copyright="http://www.w3.org/1999/xhtml/vocab#copyright",this.target.graph.terms.first="http://www.w3.org/1999/xhtml/vocab#first",this.target.graph.terms.glossary="http://www.w3.org/1999/xhtml/vocab#glossary",this.target.graph.terms.help="http://www.w3.org/1999/xhtml/vocab#help",this.target.graph.terms.icon="http://www.w3.org/1999/xhtml/vocab#icon",this.target.graph.terms.index="http://www.w3.org/1999/xhtml/vocab#index",this.target.graph.terms.last="http://www.w3.org/1999/xhtml/vocab#last",this.target.graph.terms.license="http://www.w3.org/1999/xhtml/vocab#license",this.target.graph.terms.meta="http://www.w3.org/1999/xhtml/vocab#meta",this.target.graph.terms.next="http://www.w3.org/1999/xhtml/vocab#next",this.target.graph.terms.prev="http://www.w3.org/1999/xhtml/vocab#prev",this.target.graph.terms.previous="http://www.w3.org/1999/xhtml/vocab#previous",this.target.graph.terms.section="http://www.w3.org/1999/xhtml/vocab#section",this.target.graph.terms.stylesheet="http://www.w3.org/1999/xhtml/vocab#stylesheet",this.target.graph.terms.subsection="http://www.w3.org/1999/xhtml/vocab#subsection",this.target.graph.terms.start="http://www.w3.org/1999/xhtml/vocab#start",this.target.graph.terms.top="http://www.w3.org/1999/xhtml/vocab#top",this.target.graph.terms.up="http://www.w3.org/1999/xhtml/vocab#up",this.target.graph.terms.p3pv1="http://www.w3.org/1999/xhtml/vocab#p3pv1",this.target.graph.terms.related="http://www.w3.org/1999/xhtml/vocab#related",this.target.graph.terms.role="http://www.w3.org/1999/xhtml/vocab#role",this.target.graph.terms.transformation="http://www.w3.org/1999/xhtml/vocab#transformation"}setXMLContext(){this.setInitialContext(),this.inXHTMLMode=!1,this.inHTMLMode=!1}tokenize(e){return this.trim(e).split(/\s+/)}static tokenize(e){return this.trim(e).split(/\s+/)}toRDFNodeObject(e){if(void 0!==e){if("string"==typeof e)return"_:"===e.substring(0,2)?(void 0===this.blankNodes[e.substring(2)]&&(this.blankNodes[e.substring(2)]=new n.A(e.substring(2))),this.blankNodes[e.substring(2)]):c.A.namedNode(e);switch(e.type){case l.objectURI:return"_:"===e.value.substring(0,2)?(void 0===this.blankNodes[e.value.substring(2)]&&(this.blankNodes[e.value.substring(2)]=new n.A(e.value.substring(2))),this.blankNodes[e.value.substring(2)]):c.A.namedNode(e.value);case l.PlainLiteralURI:return new i.A(e.value,e.language||"");case l.XMLLiteralURI:case l.HTMLLiteralURI:var t="";return Object.keys(e.value).forEach(r=>{t+=s.domToString(e.value[r],this.htmlOptions)}),new i.A(t,"",new o.A(e.type));default:return new i.A(e.value,"",new o.A(e.type))}}}trim(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}static trim(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}}l.XMLLiteralURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral",l.HTMLLiteralURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML",l.PlainLiteralURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral",l.objectURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#object",l.typeURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",l.nameChar="[-A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�က0-F.0-9·̀-ͯ‿-⁀]",l.nameStartChar="[A-Za-zÀ-ÖØ-öø-ÿĀ-ıĴ-ľŁ-ňŊ-žƀ-ǃǍ-ǰǴ-ǵǺ-ȗɐ-ʨʻ-ˁΆΈ-ΊΌΎ-ΡΣ-ώϐ-ϖϚϜϞϠϢ-ϳЁ-ЌЎ-яё-ќў-ҁҐ-ӄӇ-ӈӋ-ӌӐ-ӫӮ-ӵӸ-ӹԱ-Ֆՙա-ֆא-תװ-ײء-غف-يٱ-ڷں-ھۀ-ێې-ۓەۥ-ۦअ-हऽक़-ॡঅ-ঌএ-ঐও-নপ-রলশ-হড়-ঢ়য়-ৡৰ-ৱਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઋઍએ-ઑઓ-નપ-રલ-ળવ-હઽૠଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଶ-ହଽଡ଼-ଢ଼ୟ-ୡஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-வஷ-ஹఅ-ఌఎ-ఐఒ-నప-ళవ-హౠ-ౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹೞೠ-ೡഅ-ഌഎ-ഐഒ-നപ-ഹൠ-ൡก-ฮะา-ำเ-ๅກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ຮະາ-ຳຽເ-ໄཀ-ཇཉ-ཀྵႠ-Ⴥა-ჶᄀᄂ-ᄃᄅ-ᄇᄉᄋ-ᄌᄎ-ᄒᄼᄾᅀᅌᅎᅐᅔ-ᅕᅙᅟ-ᅡᅣᅥᅧᅩᅭ-ᅮᅲ-ᅳᅵᆞᆨᆫᆮ-ᆯᆷ-ᆸᆺᆼ-ᇂᇫᇰᇹḀ-ẛẠ-ỹἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼΩK-Å℮ↀ-ↂぁ-ゔァ-ヺㄅ-ㄬ가-힣一-龥〇〡-〩_]",l.NCNAME=new RegExp("^"+l.nameStartChar+l.nameChar+"*$"),l.dateTimeTypes=[{pattern:/-?P(?:[0-9]+Y)?(?:[0-9]+M)?(?:[0-9]+D)?(?:T(?:[0-9]+H)?(?:[0-9]+M)?(?:[0-9]+(?:\.[0-9]+)?S)?)?/,type:"http://www.w3.org/2001/XMLSchema#duration"},{pattern:/-?(?:[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9])-[0-9][0-9]-[0-9][0-9]T(?:[0-1][0-9]|2[0-4]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]+)?(?:Z|[+\-][0-9][0-9]:[0-9][0-9])?/,type:"http://www.w3.org/2001/XMLSchema#dateTime"},{pattern:/-?(?:[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9])-[0-9][0-9]-[0-9][0-9](?:Z|[+\-][0-9][0-9]:[0-9][0-9])?/,type:"http://www.w3.org/2001/XMLSchema#date"},{pattern:/(?:[0-1][0-9]|2[0-4]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]+)?(?:Z|[+\-][0-9][0-9]:[0-9][0-9])?/,type:"http://www.w3.org/2001/XMLSchema#time"},{pattern:/-?(?:[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9])-[0-9][0-9]/,type:"http://www.w3.org/2001/XMLSchema#gYearMonth"},{pattern:/-?[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9]/,type:"http://www.w3.org/2001/XMLSchema#gYear"}];const d=l.parseRDFaDOM},5946:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(4705),i=r(2727);class o{constructor(e){this.store=e,this.bnodes={},this.why=null,this.reify=!1}frameFactory(e,t,r){return{NODE:1,ARC:2,parent:t,parser:e,store:e.store,element:r,lastChild:0,base:null,lang:null,node:null,nodeType:null,listIndex:1,rdfid:null,datatype:null,collection:!1,terminateFrame:function(){this.collection&&this.node.close()},addSymbol:function(e,t){t=i.join(t,this.base),this.node=this.store.sym(t),this.nodeType=e},loadTriple:function(){if(this.parent.parent.collection?this.parent.parent.node.append(this.node):this.store.add(this.parent.parent.node,this.parent.node,this.node,this.parser.why),null!=this.parent.rdfid){var e=this.store.sym(i.join("#"+this.parent.rdfid,this.base));this.store.add(e,this.store.sym(o.ns.RDF+"type"),this.store.sym(o.ns.RDF+"Statement"),this.parser.why),this.store.add(e,this.store.sym(o.ns.RDF+"subject"),this.parent.parent.node,this.parser.why),this.store.add(e,this.store.sym(o.ns.RDF+"predicate"),this.parent.node,this.parser.why),this.store.add(e,this.store.sym(o.ns.RDF+"object"),this.node,this.parser.why)}},isTripleToLoad:function(){return null!=this.parent&&null!=this.parent.parent&&this.nodeType===this.NODE&&this.parent.nodeType===this.ARC&&this.parent.parent.nodeType===this.NODE},addNode:function(e){this.addSymbol(this.NODE,e),this.isTripleToLoad()&&this.loadTriple()},addCollection:function(){this.nodeType=this.NODE,this.node=this.store.collection(),this.collection=!0,this.isTripleToLoad()&&this.loadTriple()},addCollectionArc:function(){this.nodeType=this.ARC},addBNode:function(e){null!=e?null!=this.parser.bnodes[e]?this.node=this.parser.bnodes[e]:this.node=this.parser.bnodes[e]=this.store.bnode():this.node=this.store.bnode(),this.nodeType=this.NODE,this.isTripleToLoad()&&this.loadTriple()},addArc:function(e){e===o.ns.RDF+"li"&&(e=o.ns.RDF+"_"+this.parent.listIndex,this.parent.listIndex++),this.addSymbol(this.ARC,e)},addLiteral:function(e){this.parent.datatype&&this.parent.datatype!==o.ns.RDF+"langString"?this.node=this.store.literal(e,this.store.sym(this.parent.datatype)):this.node=this.store.literal(e,this.lang),this.nodeType=this.NODE,this.isTripleToLoad()&&this.loadTriple()}}}getAttributeNodeNS(e,t,r){var n=null;if(e.getAttributeNodeNS)n=e.getAttributeNodeNS(t,r);else for(var i,o=e.attributes,a=0;a<o.length;++a)if((i=o[a]).namespaceURI===t&&(i.prefix?i.prefix+":"+r:r)===i.nodeName){n=i;break}return n}parse(e,t,r){var n,i=e.childNodes;if(this.cleanParser(),e.nodeType===o.nodeType.DOCUMENT){for(var a=0;a<i.length;a++)if(i[a].nodeType===o.nodeType.ELEMENT){n=i[a];break}}else{if(e.nodeType!==o.nodeType.ELEMENT)throw new Error("RDFParser: can't find root in "+t+". Halting. ");n=e}this.why=r;var s=this.frameFactory(this);return this.base=t,s.base=t,s.lang=null,this.parseDOM(this.buildFrame(s,n)),!0}parseDOM(e){for(var t,r=function(e){var t="";if(null==e.namespaceURI)throw new Error("RDF/XML syntax error: No namespace for "+e.localName+" in "+this.base);return e.namespaceURI&&(t+=e.namespaceURI),e.localName?t+=e.localName:e.nodeName&&(e.nodeName.indexOf(":")>=0?t+=e.nodeName.split(":")[1]:t+=e.nodeName),t}.bind(this),n=!0;e.parent;){var a=e.element,s=a.attributes;if(a.nodeType===o.nodeType.TEXT||a.nodeType===o.nodeType.CDATA_SECTION)e.parent.nodeType===e.NODE&&(e.addArc(o.ns.RDF+"value"),e=this.buildFrame(e)),e.addLiteral(a.nodeValue);else if(r(a)!==o.ns.RDF+"RDF")if(e.parent&&e.parent.collection&&(e.addCollectionArc(),(e=this.buildFrame(e,e.element)).parent.element=null),e.parent&&e.parent.nodeType&&e.parent.nodeType!==e.ARC){e.addArc(r(a)),this.reify&&(t=this.getAttributeNodeNS(a,o.ns.RDF,"ID"))&&(e.rdfid=t.nodeValue,a.removeAttributeNode(t));var c=this.getAttributeNodeNS(a,o.ns.RDF,"parseType"),u=this.getAttributeNodeNS(a,o.ns.RDF,"datatype");if(u&&(e.datatype=u.nodeValue,a.removeAttributeNode(u)),c){var l=c.nodeValue;"Literal"===l?(e.datatype=o.ns.RDF+"XMLLiteral",(e=this.buildFrame(e)).addLiteral(a.innerHTML||a.childNodes),n=!1):"Resource"===l?((e=this.buildFrame(e,e.element)).parent.element=null,e.addBNode()):"Collection"===l&&((e=this.buildFrame(e,e.element)).parent.element=null,e.addCollection()),a.removeAttributeNode(c)}if(0!==s.length){var d=this.getAttributeNodeNS(a,o.ns.RDF,"resource"),p=this.getAttributeNodeNS(a,o.ns.RDF,"nodeID");e=this.buildFrame(e),d?(e.addNode(d.nodeValue),a.removeAttributeNode(d)):p?(e.addBNode(p.nodeValue),a.removeAttributeNode(p)):e.addBNode();for(var f=s.length-1;f>=0;f--){var h=this.buildFrame(e);h.addArc(r(s[f])),r(s[f])===o.ns.RDF+"type"?this.buildFrame(h).addNode(s[f].nodeValue):this.buildFrame(h).addLiteral(s[f].nodeValue)}}else 0===a.childNodes.length&&this.buildFrame(e).addLiteral("")}else{var m=this.getAttributeNodeNS(a,o.ns.RDF,"about");if(t=this.getAttributeNodeNS(a,o.ns.RDF,"ID"),m&&t)throw new Error("RDFParser: "+a.nodeName+" has both rdf:id and rdf:about. Halting. Only one of these properties may be specified on a node.");if(!m&&t)e.addNode("#"+t.nodeValue),a.removeAttributeNode(t);else if(null==m&&null==t){var g=this.getAttributeNodeNS(a,o.ns.RDF,"nodeID");g?(e.addBNode(g.nodeValue),a.removeAttributeNode(g)):e.addBNode()}else e.addNode(m.nodeValue),a.removeAttributeNode(m);var v=this.getAttributeNodeNS(a,o.ns.RDF,"type");o.ns.RDF+"Description"!==r(a)&&(v={nodeValue:r(a)}),null!=v&&(this.store.add(e.node,this.store.sym(o.ns.RDF+"type"),this.store.sym(i.join(v.nodeValue,e.base)),this.why),v.nodeName&&a.removeAttributeNode(v));for(var y=s.length-1;y>=0;y--)this.store.add(e.node,this.store.sym(r(s[y])),this.store.literal(s[y].nodeValue,e.lang),this.why)}for(a=e.element;e.parent;){for(var b=e;null==a;)a=(e=e.parent).element;var w=a.childNodes&&a.childNodes[e.lastChild];if(w&&n){if((w.nodeType===o.nodeType.ELEMENT||w.nodeType===o.nodeType.TEXT||w.nodeType===o.nodeType.CDATA_SECTION)&&(w.nodeType!==o.nodeType.TEXT&&w.nodeType!==o.nodeType.CDATA_SECTION||1===a.childNodes.length)){e.lastChild++,e=this.buildFrame(b,a.childNodes[e.lastChild-1]);break}e.lastChild++}else{if(e.terminateFrame(),!(e=e.parent))break;a=e.element,n=!0}}}}cleanParser(){this.bnodes={},this.why=null}buildFrame(e,t){var r=this.frameFactory(this,e,t);if(e&&(r.base=e.base,r.lang=e.lang),!t||t.nodeType===o.nodeType.TEXT||t.nodeType===o.nodeType.CDATA_SECTION)return r;var n=t.attributes,a=t.getAttributeNode("xml:base");null!=a&&(r.base=a.nodeValue,t.removeAttribute("xml:base"));var s=t.getAttributeNode("xml:lang");null!=s&&(r.lang=s.nodeValue,t.removeAttribute("xml:lang"));for(var c=n.length-1;c>=0;c--)if("xml"===n[c].nodeName.substr(0,3)){if("xmlns:"===n[c].name.slice(0,6)){var u=n[c].nodeValue;this.base&&(u=i.join(u,this.base)),this.store.setPrefixForURI(n[c].name.slice(6),u)}t.removeAttributeNode(n[c])}return r}}(0,n.A)(o,"ns",{RDF:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",RDFS:"http://www.w3.org/2000/01/rdf-schema#"}),(0,n.A)(o,"nodeType",{ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12})},5994:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,g:()=>o});var n=r(7991);const i=e=>!!(0,n.R)(e)||"KeyObject"===e?.[Symbol.toStringTag],o=["CryptoKey"]},6011:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafeStringify=void 0;const n=r(9746),i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));function o(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}t.unsafeStringify=o,t.default=function(e,t=0){const r=o(e,t);if(!(0,n.default)(r))throw TypeError("Stringified UUID is invalid");return r}},6049:(e,t,r)=>{"use strict";var n,i,o=r(7598),a=r(7975).extname,s=r(983),c=/^\s*([^;\s]*)(?:;|\s|$)/,u=/^text\//i;function l(e){if(!e||"string"!=typeof e)return!1;var t=c.exec(e),r=t&&o[t[1].toLowerCase()];return r&&r.charset?r.charset:!(!t||!u.test(t[1]))&&"UTF-8"}function d(e){if(!e||"string"!=typeof e)return!1;var r=c.exec(e),n=r&&t.extensions[r[1].toLowerCase()];return!(!n||!n.length)&&n[0]}function p(e,t,r){return(t?s(t,o[t].source):0)>(r?s(r,o[r].source):0)?t:r}function f(e,r,n){var i=["nginx","apache",void 0,"iana"],a=r?i.indexOf(o[r].source):0,s=n?i.indexOf(o[n].source):0;return"application/octet-stream"!==t.types[d]&&(a>s||a===s&&"application/"===t.types[d]?.slice(0,12))||a>s?r:n}t.charset=l,t.charsets={lookup:l},t.contentType=function(e){if(!e||"string"!=typeof e)return!1;var r=-1===e.indexOf("/")?t.lookup(e):e;if(!r)return!1;if(-1===r.indexOf("charset")){var n=t.charset(r);n&&(r+="; charset="+n.toLowerCase())}return r},t.extension=d,t.extensions=Object.create(null),t.lookup=function(e){if(!e||"string"!=typeof e)return!1;var r=a("x."+e).toLowerCase().slice(1);return r&&t.types[r]||!1},t.types=Object.create(null),t._extensionConflicts=[],n=t.extensions,i=t.types,Object.keys(o).forEach(function(e){var r=o[e].extensions;if(r&&r.length){n[e]=r;for(var a=0;a<r.length;a++){var s=r[a];i[s]=p(0,i[s],e);const n=f(0,i[s],e);n!==i[s]&&t._extensionConflicts.push([s,n,i[s]])}}})},6231:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.createBanner=y,t.createHelpMenu=w,t.createLoginSignUpButtons=x,t.createUserMenu=S,t.createUserMenuButton=_,t.createUserMenuItem=k,t.createUserMenuLink=E,t.getProfileImg=C,t.initHeader=function(e,t,r){return g.apply(this,arguments)},t.rebuildHeader=v;var o=n(r(4756)),a=n(r(9293)),s=r(2361),c=r(3451),u=r(7822),l=h(r(1939)),d=h(r(5148)),p=r(5246),f=r(4135);function h(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(h=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var m=s.icons.iconBase+"noun_help.svg";function g(){return(g=(0,a.default)(o.default.mark(function e(t,r,n){var i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=document.getElementById("PageHeader")){e.next=1;break}return e.abrupt("return");case 1:a=(0,f.getPod)(),v(i,t,a,r,n)(),c.authSession.events.on("logout",v(i,t,a,r,n)),c.authSession.events.on("login",v(i,t,a,r,n));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function v(e,t,r,n,i){return(0,a.default)(o.default.mark(function a(){var s,u;return o.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return s=c.authn.currentUser(),e.innerHTML="",u=e,o.next=1,y(t,r,s,n,i);case 1:u.appendChild.call(u,o.sent);case 2:case"end":return o.stop()}},a)}))}function y(e,t,r,n,i){return b.apply(this,arguments)}function b(){return(b=(0,a.default)(o.default.mark(function e(t,r,n,i,a){var s,c,u,l,p,f,h;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((s=document.createElement("a")).href=r.uri,s.setAttribute("style",d.headerBannerLink),c=document.createElement("img"),a&&(c.src=a.logo?a.logo:"https://solidproject.org/assets/img/solid-emblem.svg"),c.setAttribute("style",d.headerBannerIcon),s.appendChild(c),!n){e.next=2;break}return e.next=1,S(t,n,i);case 1:h=e.sent,e.next=3;break;case 2:h=x();case 3:return u=h,(l=document.createElement("div")).setAttribute("style",d.headerBanner),l.appendChild(s),(p=document.createElement("div")).setAttribute("style",d.headerBannerRightMenu),p.appendChild(u),a&&a.helpMenuList&&(f=w(a,a.helpMenuList),p.appendChild(f)),l.appendChild(p),e.abrupt("return",l);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function w(e,t){if(t){var r=document.createElement("ul");r.setAttribute("style",d.headerUserMenuList),t.forEach(function(e){"url"==(e.url?"url":"onclick")?r.appendChild(k(E(e.label,e.url,e.target))):r.appendChild(k(_(e.label,e.onclick)))});var n=document.createElement("nav");n.setAttribute("style",d.headerUserMenuNavigationMenuNotDisplayed),n.setAttribute("aria-hidden","true"),n.setAttribute("id","helperNav"),n.appendChild(r);var i=document.createElement("div");i.setAttribute("style",d.headerBannerUserMenu),i.appendChild(n);var o=document.createElement("button");o.setAttribute("style",d.headerUserMenuTrigger),o.type="button";var a=document.createElement("img");a.src=e&&e.helpIcon?e.helpIcon:s.icons.iconBase+m,a.setAttribute("style",d.headerUserMenuTriggerImg),i.appendChild(o),o.appendChild(a);var c=(0,f.throttle)(function(e){return T(e,o,n)},50);o.addEventListener("click",c);var u=setTimeout(function(){return null},0);return i.addEventListener("mouseover",function(e){clearTimeout(u),c(e);var t=document.getElementById("helperNav");null==t||t.setAttribute("style",d.headerUserMenuNavigationMenu)}),i.addEventListener("mouseout",function(e){u=setTimeout(function(){return c(e)},200);var t=document.getElementById("helperNav");null==t||t.setAttribute("style",d.headerUserMenuNavigationMenuNotDisplayed)}),i}}function x(){var e=document.createElement("div");return e.setAttribute("style",d.headerBannerLogin),e.appendChild((0,u.loginStatusBox)(document,null,{})),e}function _(e,t){var r=document.createElement("button");return r.setAttribute("style",d.headerUserMenuButton),r.onmouseover=function(){r.setAttribute("style",d.headerUserMenuButtonHover)},r.onmouseout=function(){r.setAttribute("style",d.headerUserMenuButton)},r.addEventListener("click",t),r.innerText=e,r}function E(e,t,r){var n=document.createElement("a");return n.setAttribute("style",d.headerUserMenuLink),n.onmouseover=function(){n.setAttribute("style",d.headerUserMenuLinkHover)},n.onmouseout=function(){n.setAttribute("style",d.headerUserMenuLink)},n.href=t,n.innerText=e,r&&(n.target=r),n}function S(e,t,r){return A.apply(this,arguments)}function A(){return(A=(0,a.default)(o.default.mark(function e(t,r,n){var i,a,s,c,u,l,p,h;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(i=t.fetcher)){e.next=1;break}return e.next=1,i.load(r);case 1:return(a=document.createElement("ul")).setAttribute("style",d.headerUserMenuList),n&&n.forEach(function(e){"url"==(e.url?"url":"onclick")?a.appendChild(k(E(e.label,e.url,e.target))):a.appendChild(k(_(e.label,e.onclick)))}),(s=document.createElement("nav")).setAttribute("style",d.headerUserMenuNavigationMenuNotDisplayed),s.setAttribute("aria-hidden","true"),s.setAttribute("id","loggedInNav"),s.appendChild(a),(c=document.createElement("button")).setAttribute("style",d.headerUserMenuTrigger),c.type="button","string"==typeof(u=C(0,r))?c.innerHTML=u:c.appendChild(u),(l=document.createElement("div")).setAttribute("style",d.headerBannerUserMenuNotDisplayed),l.appendChild(c),l.appendChild(s),p=(0,f.throttle)(function(e){return T(e,c,s)},50),c.addEventListener("click",p),h=setTimeout(function(){return null},0),l.addEventListener("mouseover",function(e){clearTimeout(h),p(e);var t=document.getElementById("loggedInNav");null==t||t.setAttribute("style",d.headerUserMenuNavigationMenu)}),l.addEventListener("mouseout",function(e){h=setTimeout(function(){return p(e)},200);var t=document.getElementById("loggedInNav");null==t||t.setAttribute("style",d.headerUserMenuNavigationMenuNotDisplayed)}),e.abrupt("return",l);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function k(e){var t=document.createElement("li");return t.setAttribute("style",d.headerUserMenuListItem),t.appendChild(e),t}function C(e,t){var r=null;try{if(!(r=l.findImage(t)))return p.emptyProfile}catch(e){return p.emptyProfile}var n=document.createElement("div");return n.setAttribute("style",d.headerUserMenuPhoto),n.style.backgroundImage="url(".concat(r,")"),n}function T(e,t,r){var n="true"===t.getAttribute("aria-expanded"),i="mouseover"===e.type,o="mouseout"===e.type;n&&i||!n&&o||(t.setAttribute("aria-expanded",(!n).toString()),r.setAttribute("aria-hidden",n.toString()))}},6270:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.DateFolder=void 0,t.emptyLeaf=h;var o=n(r(4756)),a=n(r(7383)),s=n(r(4579)),c=n(r(9293)),u=f(r(2902)),l=r(3451),d=f(r(2054)),p=f(r(2209));function f(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(f=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}function h(e){return m.apply(this,arguments)}function m(){return(m=(0,c.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,l.store.fetcher.load(t);case 1:return e.abrupt("return",!(l.store.statementsMatching(null,d.dct("created"),null,t).length>0));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}t.DateFolder=function(){return(0,s.default)(function e(t,r,n){(0,a.default)(this,e),this.root=t,this.rootFolder=t.dir(),this.leafFileName=r||"index.ttl",this.membershipProperty=n||d.wf("leafObject")},[{key:"leafDocumentFromDate",value:function(e){var t=e.toISOString().split("T")[0].replace(/-/g,"/");return t=this.root.dir().uri+t+"/"+this.leafFileName,l.store.sym(t)}},{key:"dateFromLeafDocument",value:function(e){var t=this.rootFolder.uri.length,r=e.uri.slice(t,t+10).replace(/\//g,"-");return new Date(r)}},{key:"loadPrevious",value:(t=(0,c.default)(o.default.mark(function e(t,r){var n,i,a,s,p,f;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:i=function(){return(i=(0,c.default)(o.default.mark(function e(t,i){var a,s,c,p,f,h,m,g,v,y;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=function(e){return(e=e.filter(s)).sort(),r||e.reverse(),e.pop()},s=function(e){var t=e.uri.slice(0,-1).split("/").slice(-1)[0];return!!"0123456789".includes(t[0])},a=function(e){return!(r?e.uri>=t.uri:e.uri<=t.uri)},p=t.dir(),e.prev=1,e.next=2,l.store.fetcher.load(p);case 2:if(f=(f=l.store.each(p,d.ldp("contains"))).filter(a),!(h=c(f))){e.next=3;break}return e.abrupt("return",h);case 3:e.next=6;break;case 4:if(e.prev=4,!(y=e.catch(1)).response||!y.response.status||404!==y.response.status){e.next=5;break}u.log("Error 404 for chat parent file "+p),e.next=6;break;case 5:throw u.log("*** Error NON 404 for chat parent file "+p),new Error("*** ".concat(y.message," for chat folder ").concat(p));case 6:if(0!==i){e.next=7;break}return e.abrupt("return",null);case 7:return e.next=8,n(p,i-1);case 8:if(m=e.sent){e.next=9;break}return e.abrupt("return",null);case 9:return e.next=10,l.store.fetcher.load(m);case 10:return g=l.store.each(m,d.ldp("contains")),v=c(g),e.abrupt("return",v);case 11:case"end":return e.stop()}},e,null,[[1,4]])}))).apply(this,arguments)},n=function(e,t){return i.apply(this,arguments)},a=this.leafDocumentFromDate(t).dir();case 1:return e.next=2,n(a,3);case 2:if(!(s=e.sent)){e.next=6;break}return p=l.store.sym(s.uri+this.leafFileName),f=this.dateFromLeafDocument(p),e.next=3,h(p);case 3:if(e.sent){e.next=4;break}return e.abrupt("return",f);case 4:t=f,a=this.leafDocumentFromDate(t).dir();case 5:e.next=7;break;case 6:return e.abrupt("return",null);case 7:e.next=1;break;case 8:case"end":return e.stop()}},e,this)})),function(e,r){return t.apply(this,arguments)})},{key:"firstLeaf",value:(e=(0,c.default)(o.default.mark(function e(t){var r,n,i,a,s,l,f,h,m,g,v;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=function(){return(a=(0,c.default)(o.default.mark(function e(i){var a,s;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=function(e){var t=e.uri.slice(0,-1).split("/").slice(-1)[0];return!!"0123456789".includes(t[0])},delete n.requested[i.uri],e.next=1,n.load(i,{force:!0});case 1:if(0!==(s=(s=r.each(i,d.ldp("contains"))).filter(a)).length){e.next=2;break}throw new Error(" @@@ No children to parent2 "+i);case 2:return s.sort(),t&&s.reverse(),e.abrupt("return",s[0]);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)},i=function(e){return a.apply(this,arguments)},r=p.graph(),n=new p.Fetcher(r),e.next=1,i(this.root.dir());case 1:return s=e.sent,e.next=2,i(s);case 2:return l=e.sent,e.next=3,i(l);case 3:return f=e.sent,h=p.sym(f.uri+"chat.ttl"),e.next=4,n.load(h);case 4:if(0!==(m=r.each(this.root,this.membershipProperty,null,h)).length){e.next=5;break}throw g=" INCONSISTENCY -- no chat leafObject in file "+h,u.trace(g),new Error(g);case 5:return(v=m.map(function(e){return[r.any(e,d.dct("created")),e]})).sort(),t&&v.reverse(),e.abrupt("return",v[0][1]);case 6:case"end":return e.stop()}},e,this)})),function(t){return e.apply(this,arguments)})}]);var e,t}()},6320:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(4705),i=r(1059),o=r(8936),a=r(9403),s=r(2727);class c extends o.A{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";super(e),(0,n.A)(this,"termType",a.P2),(0,n.A)(this,"base","varid:"),(0,n.A)(this,"classOrder",i.A.Variable),(0,n.A)(this,"isVar",1),(0,n.A)(this,"uri",void 0),this.base="varid:",this.uri=s.join(e,this.base)}equals(e){return!!e&&this.termType===e.termType&&this.value===e.value}hashString(){return this.toString()}substitute(e){var t;return null!=(t=e[this.toNT()])?t:this}toString(){return c.toString(this)}static toString(e){return e.uri.slice(0,e.base.length)===e.base?`?${e.uri.slice(e.base.length)}`:`?${e.uri}`}}},6356:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6011),i=r(1425),o=r(6568);t.default=function(e,t,r){e??={},r??=0;let a=(0,i.default)({...e,_v6:!0},new Uint8Array(16));if(a=(0,o.default)(a),t){for(let e=0;e<16;e++)t[r+e]=a[e];return t}return(0,n.unsafeStringify)(a)}},6472:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.ChatChannel=void 0,t.allVersions=function(e){return y.apply(this,arguments)},t.isDeleted=function(e){return d.store.holds(e,p.schema("dateDeleted"),null,e.doc())},t.isHidden=function(e){return this.isDeleted(e)||this.isReplaced(e)},t.isReplaced=function(e){return d.store.holds(e,p.dct("isReplacedBy"),null,e.doc())},t.mostRecentVersion=w,t.nick=function(e){var t=d.store.any(e,p.foaf("nick"));return t?""+t.value:""+h.label(e)},t.originalVersion=function(e){return b.apply(this,arguments)};var o=n(r(4756)),a=n(r(9293)),s=n(r(7383)),c=n(r(4579)),u=v(r(2902)),l=r(6270),d=r(3451),p=v(r(2054)),f=v(r(2209)),h=v(r(7499)),m=r(1546),g=r(3565);function v(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(v=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}function y(){return(y=(0,a.default)(o.default.mark(function e(t){var r,n,i,a,s;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=[t],(n={})[t.uri]=!0,i=t;case 1:if((a=d.store.any(null,p.dct("isReplacedBy"),i,i.doc()))&&!n[a.uri]){e.next=2;break}return e.abrupt("continue",4);case 2:return e.next=3,d.store.fetcher.load(a);case 3:r.unshift(a),n[a.uri]=!0,i=a,e.next=1;break;case 4:i=t;case 5:if((s=d.store.any(i,p.dct("isReplacedBy"),null,i.doc()))&&!n[s.uri]){e.next=6;break}return e.abrupt("continue",7);case 6:r.push(s),n[s.uri]=!0,i=s,e.next=5;break;case 7:return e.abrupt("return",r);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function b(){return(b=(0,a.default)(o.default.mark(function e(t){var r,n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=t,n={};case 1:if(!r){e.next=4;break}if(!n[r.uri]){e.next=2;break}return u.error("originalVersion: verion loop"+t),e.abrupt("return",t);case 2:return n[r.uri]=!0,t=r,e.next=3,d.store.fetcher.load(t);case 3:r=d.store.any(null,p.dct("isReplacedBy"),t,t.doc()),e.next=1;break;case 4:return e.abrupt("return",t);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function w(e){return x.apply(this,arguments)}function x(){return(x=(0,a.default)(o.default.mark(function e(t){var r,n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=t,n={};case 1:if(!r){e.next=4;break}if(!n[r.uri]){e.next=2;break}return u.error("mostRecentVersion: verion loop"+t),e.abrupt("return",t);case 2:return n[r.uri]=!0,t=r,e.next=3,d.store.fetcher.load(t);case 3:r=d.store.any(t,p.dct("isReplacedBy"),null,t.doc()),e.next=1;break;case 4:return e.abrupt("return",t);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}t.ChatChannel=function(){return(0,c.default)(function e(t,r){(0,s.default)(this,e),this.channel=t,this.channelRoot=t.doc(),this.options=r,this.dateFolder=new l.DateFolder(this.channelRoot,"chat.ttl"),this.div=null},[{key:"createMessage",value:(n=(0,a.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.updateMessage(t));case 1:case"end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"updateMessage",value:(r=(0,a.default)(function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return o.default.mark(function a(){var s,c,l,h,v,y,b,x,_,E,S,A,k,C,T,I;return o.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(s=[],c=new Date,l=""+c.getTime(),h=f.term(c),v=r?r.doc():t.dateFolder.leafDocumentFromDate(c),y=d.store.sym(v.uri+"#Msg"+l),b=d.authn.currentUser(),(x=(0,m.getBlankMsg)()).id=y.uri,!r){o.next=4;break}if((_=d.store.any(r,p.foaf("maker"))).uri!==b.uri){o.next=2;break}return o.next=1,w(r);case 1:E=o.sent,s.push(f.st(E,p.dct("isReplacedBy"),y,v)),(S=d.store.any(E,p.sioc("has_reply")))&&s.push(f.st(y,p.sioc("has_reply"),S,v)),n&&s.push(f.st(y,p.schema("dateDeleted"),h,v)),o.next=3;break;case 2:throw A="Error you cannot delete/edit a message from someone else : \n"+_.uri,u.warn(A),alert(A),new Error(A);case 3:o.next=5;break;case 4:s.push(f.st(t.channel,p.wf("message"),y,v));case 5:if(s.push(f.st(y,p.sioc("content"),d.store.literal(e),v)),x.content=e,s.push(f.st(y,p.dct("created"),h,v)),x.created=h.value,!b){o.next=7;break}return s.push(f.st(y,p.foaf("maker"),b,v)),x.maker=b.uri,o.next=6,(0,g.getPrivateKey)(b);case 6:k=o.sent,C=(0,m.signMsg)(x,k),s.push(f.st(y,f.sym("".concat(m.SEC,"proofValue")),f.lit(C),v));case 7:return i&&(s.push(f.st(i,p.sioc("has_member"),y,v)),i.doc().sameTerm(y.doc())||s.push(f.st(i,p.sioc("has_member"),y,i.doc()))),o.prev=8,o.next=9,d.store.updater.updateMany([],s);case 9:o.next=11;break;case 10:throw o.prev=10,I=o.catch(8),T="Error saving chat message: "+I,u.warn(T),alert(T),new Error(T);case 11:return o.abrupt("return",y);case 12:case"end":return o.stop()}},a,null,[[8,10]])})()}),function(e){return r.apply(this,arguments)})},{key:"deleteMessage",value:(t=(0,a.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.updateMessage("(message deleted)",t,!0));case 1:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"createThread",value:(e=(0,a.default)(o.default.mark(function e(t){var r,n,i;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=d.store.each(t,p.sioc("has_reply"),null,t.doc()).filter(function(e){return d.store.holds(e,p.rdf("type"),p.sioc("Thread"),e.doc())}),!(r.length>0)){e.next=1;break}return e.abrupt("return",r[0]);case 1:return n=f.sym(t.uri+"-thread"),i=[f.st(n,p.rdf("type"),p.sioc("Thread"),n.doc()),f.st(t,p.sioc("has_reply"),n,n.doc())],e.next=2,d.store.updater.update([],i);case 2:return e.abrupt("return",n);case 3:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)})}]);var e,t,r,n}()},6516:function(e){var t;t=function(){return 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=22)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i={debug:function(){},info:function(){},warn:function(){},error:function(){}},o=void 0,a=void 0;(t.Log=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.reset=function(){a=3,o=i},e.debug=function(){if(a>=4){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];o.debug.apply(o,Array.from(t))}},e.info=function(){if(a>=3){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];o.info.apply(o,Array.from(t))}},e.warn=function(){if(a>=2){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];o.warn.apply(o,Array.from(t))}},e.error=function(){if(a>=1){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];o.error.apply(o,Array.from(t))}},n(e,null,[{key:"NONE",get:function(){return 0}},{key:"ERROR",get:function(){return 1}},{key:"WARN",get:function(){return 2}},{key:"INFO",get:function(){return 3}},{key:"DEBUG",get:function(){return 4}},{key:"level",get:function(){return a},set:function(e){if(!(0<=e&&e<=4))throw new Error("Invalid log level");a=e}},{key:"logger",get:function(){return o},set:function(e){if(!e.debug&&e.info&&(e.debug=e.info),!(e.debug&&e.info&&e.warn&&e.error))throw new Error("Invalid logger");o=e}}]),e}()).reset()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i={setInterval:function(e){function t(t,r){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e,t){return setInterval(e,t)}),clearInterval:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return clearInterval(e)})},o=!1,a=null;t.Global=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e._testing=function(){o=!0},e.setXMLHttpRequest=function(e){a=e},n(e,null,[{key:"location",get:function(){if(!o)return location}},{key:"localStorage",get:function(){if(!o&&"undefined"!=typeof window)return localStorage}},{key:"sessionStorage",get:function(){if(!o&&"undefined"!=typeof window)return sessionStorage}},{key:"XMLHttpRequest",get:function(){if(!o&&"undefined"!=typeof window)return a||XMLHttpRequest}},{key:"timer",get:function(){if(!o)return i}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataService=void 0;var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(7),a=".well-known/openid-configuration";t.MetadataService=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.JsonService;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw i.Log.error("MetadataService: No settings passed to MetadataService"),new Error("settings");this._settings=t,this._jsonService=new r(["application/jwk-set+json"])}return e.prototype.resetSigningKeys=function(){this._settings=this._settings||{},this._settings.signingKeys=void 0},e.prototype.getMetadata=function(){var e=this;return this._settings.metadata?(i.Log.debug("MetadataService.getMetadata: Returning metadata from settings"),Promise.resolve(this._settings.metadata)):this.metadataUrl?(i.Log.debug("MetadataService.getMetadata: getting metadata from",this.metadataUrl),this._jsonService.getJson(this.metadataUrl).then(function(t){i.Log.debug("MetadataService.getMetadata: json received");var r=e._settings.metadataSeed||{};return e._settings.metadata=Object.assign({},r,t),e._settings.metadata})):(i.Log.error("MetadataService.getMetadata: No authority or metadataUrl configured on settings"),Promise.reject(new Error("No authority or metadataUrl configured on settings")))},e.prototype.getIssuer=function(){return this._getMetadataProperty("issuer")},e.prototype.getAuthorizationEndpoint=function(){return this._getMetadataProperty("authorization_endpoint")},e.prototype.getUserInfoEndpoint=function(){return this._getMetadataProperty("userinfo_endpoint")},e.prototype.getTokenEndpoint=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._getMetadataProperty("token_endpoint",e)},e.prototype.getCheckSessionIframe=function(){return this._getMetadataProperty("check_session_iframe",!0)},e.prototype.getEndSessionEndpoint=function(){return this._getMetadataProperty("end_session_endpoint",!0)},e.prototype.getRevocationEndpoint=function(){return this._getMetadataProperty("revocation_endpoint",!0)},e.prototype.getKeysEndpoint=function(){return this._getMetadataProperty("jwks_uri",!0)},e.prototype._getMetadataProperty=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return i.Log.debug("MetadataService.getMetadataProperty for: "+e),this.getMetadata().then(function(r){if(i.Log.debug("MetadataService.getMetadataProperty: metadata recieved"),void 0===r[e]){if(!0===t)return void i.Log.warn("MetadataService.getMetadataProperty: Metadata does not contain optional property "+e);throw i.Log.error("MetadataService.getMetadataProperty: Metadata does not contain property "+e),new Error("Metadata does not contain property "+e)}return r[e]})},e.prototype.getSigningKeys=function(){var e=this;return this._settings.signingKeys?(i.Log.debug("MetadataService.getSigningKeys: Returning signingKeys from settings"),Promise.resolve(this._settings.signingKeys)):this._getMetadataProperty("jwks_uri").then(function(t){return i.Log.debug("MetadataService.getSigningKeys: jwks_uri received",t),e._jsonService.getJson(t).then(function(t){if(i.Log.debug("MetadataService.getSigningKeys: key set received",t),!t.keys)throw i.Log.error("MetadataService.getSigningKeys: Missing keys on keyset"),new Error("Missing keys on keyset");return e._settings.signingKeys=t.keys,e._settings.signingKeys})})},n(e,[{key:"metadataUrl",get:function(){return this._metadataUrl||(this._settings.metadataUrl?this._metadataUrl=this._settings.metadataUrl:(this._metadataUrl=this._settings.authority,this._metadataUrl&&this._metadataUrl.indexOf(a)<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=a))),this._metadataUrl}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlUtility=void 0;var n=r(0),i=r(1);t.UrlUtility=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.addQueryParam=function(e,t,r){return e.indexOf("?")<0&&(e+="?"),"?"!==e[e.length-1]&&(e+="&"),e+=encodeURIComponent(t),(e+="=")+encodeURIComponent(r)},e.parseUrlFragment=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.Global;"string"!=typeof e&&(e=r.location.href);var o=e.lastIndexOf(t);o>=0&&(e=e.substr(o+1)),"?"===t&&(o=e.indexOf("#"))>=0&&(e=e.substr(0,o));for(var a,s={},c=/([^&=]+)=([^&]*)/g,u=0;a=c.exec(e);)if(s[decodeURIComponent(a[1])]=decodeURIComponent(a[2].replace(/\+/g," ")),u++>50)return n.Log.error("UrlUtility.parseUrlFragment: response exceeded expected number of parameters",e),{error:"Response exceeded expected number of parameters"};for(var l in s)return s;return{}},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoseUtil=void 0;var n=r(26),i=function(e){return e&&e.__esModule?e:{default:e}}(r(33));t.JoseUtil=(0,i.default)({jws:n.jws,KeyUtil:n.KeyUtil,X509:n.X509,crypto:n.crypto,hextob64u:n.hextob64u,b64tohex:n.b64tohex,AllowedSigningAlgs:n.AllowedSigningAlgs})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OidcClientSettings=void 0;var n="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},i=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0),a=r(23),s=r(6),c=r(24),u=r(2),l=".well-known/openid-configuration";t.OidcClientSettings=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.authority,i=t.metadataUrl,o=t.metadata,l=t.signingKeys,d=t.metadataSeed,p=t.client_id,f=t.client_secret,h=t.response_type,m=void 0===h?"id_token":h,g=t.scope,v=void 0===g?"openid":g,y=t.redirect_uri,b=t.post_logout_redirect_uri,w=t.client_authentication,x=void 0===w?"client_secret_post":w,_=t.prompt,E=t.display,S=t.max_age,A=t.ui_locales,k=t.acr_values,C=t.resource,T=t.response_mode,I=t.filterProtocolClaims,F=void 0===I||I,P=t.loadUserInfo,N=void 0===P||P,O=t.staleStateAge,R=void 0===O?900:O,j=t.clockSkew,L=void 0===j?300:j,D=t.clockService,U=void 0===D?new a.ClockService:D,M=t.userInfoJwtIssuer,B=void 0===M?"OP":M,H=t.mergeClaims,q=void 0!==H&&H,W=t.stateStore,V=void 0===W?new s.WebStorageStateStore:W,K=t.ResponseValidatorCtor,J=void 0===K?c.ResponseValidator:K,z=t.MetadataServiceCtor,$=void 0===z?u.MetadataService:z,G=t.extraQueryParams,X=void 0===G?{}:G,Y=t.extraTokenParams,Q=void 0===Y?{}:Y;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._authority=r,this._metadataUrl=i,this._metadata=o,this._metadataSeed=d,this._signingKeys=l,this._client_id=p,this._client_secret=f,this._response_type=m,this._scope=v,this._redirect_uri=y,this._post_logout_redirect_uri=b,this._client_authentication=x,this._prompt=_,this._display=E,this._max_age=S,this._ui_locales=A,this._acr_values=k,this._resource=C,this._response_mode=T,this._filterProtocolClaims=!!F,this._loadUserInfo=!!N,this._staleStateAge=R,this._clockSkew=L,this._clockService=U,this._userInfoJwtIssuer=B,this._mergeClaims=!!q,this._stateStore=V,this._validator=new J(this),this._metadataService=new $(this),this._extraQueryParams="object"===(void 0===X?"undefined":n(X))?X:{},this._extraTokenParams="object"===(void 0===Q?"undefined":n(Q))?Q:{}}return e.prototype.getEpochTime=function(){return this._clockService.getEpochTime()},i(e,[{key:"client_id",get:function(){return this._client_id},set:function(e){if(this._client_id)throw o.Log.error("OidcClientSettings.set_client_id: client_id has already been assigned."),new Error("client_id has already been assigned.");this._client_id=e}},{key:"client_secret",get:function(){return this._client_secret}},{key:"response_type",get:function(){return this._response_type}},{key:"scope",get:function(){return this._scope}},{key:"redirect_uri",get:function(){return this._redirect_uri}},{key:"post_logout_redirect_uri",get:function(){return this._post_logout_redirect_uri}},{key:"client_authentication",get:function(){return this._client_authentication}},{key:"prompt",get:function(){return this._prompt}},{key:"display",get:function(){return this._display}},{key:"max_age",get:function(){return this._max_age}},{key:"ui_locales",get:function(){return this._ui_locales}},{key:"acr_values",get:function(){return this._acr_values}},{key:"resource",get:function(){return this._resource}},{key:"response_mode",get:function(){return this._response_mode}},{key:"authority",get:function(){return this._authority},set:function(e){if(this._authority)throw o.Log.error("OidcClientSettings.set_authority: authority has already been assigned."),new Error("authority has already been assigned.");this._authority=e}},{key:"metadataUrl",get:function(){return this._metadataUrl||(this._metadataUrl=this.authority,this._metadataUrl&&this._metadataUrl.indexOf(l)<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=l)),this._metadataUrl}},{key:"metadata",get:function(){return this._metadata},set:function(e){this._metadata=e}},{key:"metadataSeed",get:function(){return this._metadataSeed},set:function(e){this._metadataSeed=e}},{key:"signingKeys",get:function(){return this._signingKeys},set:function(e){this._signingKeys=e}},{key:"filterProtocolClaims",get:function(){return this._filterProtocolClaims}},{key:"loadUserInfo",get:function(){return this._loadUserInfo}},{key:"staleStateAge",get:function(){return this._staleStateAge}},{key:"clockSkew",get:function(){return this._clockSkew}},{key:"userInfoJwtIssuer",get:function(){return this._userInfoJwtIssuer}},{key:"mergeClaims",get:function(){return this._mergeClaims}},{key:"stateStore",get:function(){return this._stateStore}},{key:"validator",get:function(){return this._validator}},{key:"metadataService",get:function(){return this._metadataService}},{key:"extraQueryParams",get:function(){return this._extraQueryParams},set:function(e){"object"===(void 0===e?"undefined":n(e))?this._extraQueryParams=e:this._extraQueryParams={}}},{key:"extraTokenParams",get:function(){return this._extraTokenParams},set:function(e){"object"===(void 0===e?"undefined":n(e))?this._extraTokenParams=e:this._extraTokenParams={}}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebStorageStateStore=void 0;var n=r(0),i=r(1);t.WebStorageStateStore=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.prefix,n=void 0===r?"oidc.":r,o=t.store,a=void 0===o?i.Global.localStorage:o;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._store=a,this._prefix=n}return e.prototype.set=function(e,t){return n.Log.debug("WebStorageStateStore.set",e),e=this._prefix+e,this._store.setItem(e,t),Promise.resolve()},e.prototype.get=function(e){n.Log.debug("WebStorageStateStore.get",e),e=this._prefix+e;var t=this._store.getItem(e);return Promise.resolve(t)},e.prototype.remove=function(e){n.Log.debug("WebStorageStateStore.remove",e),e=this._prefix+e;var t=this._store.getItem(e);return this._store.removeItem(e),Promise.resolve(t)},e.prototype.getAllKeys=function(){n.Log.debug("WebStorageStateStore.getAllKeys");for(var e=[],t=0;t<this._store.length;t++){var r=this._store.key(t);0===r.indexOf(this._prefix)&&e.push(r.substr(this._prefix.length))}return Promise.resolve(e)},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonService=void 0;var n=r(0),i=r(1);t.JsonService=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Global.XMLHttpRequest,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),t&&Array.isArray(t)?this._contentTypes=t.slice():this._contentTypes=[],this._contentTypes.push("application/json"),n&&this._contentTypes.push("application/jwt"),this._XMLHttpRequest=r,this._jwtHandler=n}return e.prototype.getJson=function(e,t){var r=this;if(!e)throw n.Log.error("JsonService.getJson: No url passed"),new Error("url");return n.Log.debug("JsonService.getJson, url: ",e),new Promise(function(i,o){var a=new r._XMLHttpRequest;a.open("GET",e);var s=r._contentTypes,c=r._jwtHandler;a.onload=function(){if(n.Log.debug("JsonService.getJson: HTTP response received, status",a.status),200===a.status){var t=a.getResponseHeader("Content-Type");if(t){var r=s.find(function(e){if(t.startsWith(e))return!0});if("application/jwt"==r)return void c(a).then(i,o);if(r)try{return void i(JSON.parse(a.responseText))}catch(e){return n.Log.error("JsonService.getJson: Error parsing JSON response",e.message),void o(e)}}o(Error("Invalid response Content-Type: "+t+", from URL: "+e))}else o(Error(a.statusText+" ("+a.status+")"))},a.onerror=function(){n.Log.error("JsonService.getJson: network error"),o(Error("Network Error"))},t&&(n.Log.debug("JsonService.getJson: token passed, setting Authorization header"),a.setRequestHeader("Authorization","Bearer "+t)),a.send()})},e.prototype.postForm=function(e,t,r){var i=this;if(!e)throw n.Log.error("JsonService.postForm: No url passed"),new Error("url");return n.Log.debug("JsonService.postForm, url: ",e),new Promise(function(o,a){var s=new i._XMLHttpRequest;s.open("POST",e);var c=i._contentTypes;s.onload=function(){if(n.Log.debug("JsonService.postForm: HTTP response received, status",s.status),200!==s.status){if(400===s.status&&(r=s.getResponseHeader("Content-Type"))&&c.find(function(e){if(r.startsWith(e))return!0}))try{var t=JSON.parse(s.responseText);if(t&&t.error)return n.Log.error("JsonService.postForm: Error from server: ",t.error),void a(new Error(t.error))}catch(e){return n.Log.error("JsonService.postForm: Error parsing JSON response",e.message),void a(e)}a(Error(s.statusText+" ("+s.status+")"))}else{var r;if((r=s.getResponseHeader("Content-Type"))&&c.find(function(e){if(r.startsWith(e))return!0}))try{return void o(JSON.parse(s.responseText))}catch(e){return n.Log.error("JsonService.postForm: Error parsing JSON response",e.message),void a(e)}a(Error("Invalid response Content-Type: "+r+", from URL: "+e))}},s.onerror=function(){n.Log.error("JsonService.postForm: network error"),a(Error("Network Error"))};var u="";for(var l in t){var d=t[l];d&&(u.length>0&&(u+="&"),u+=encodeURIComponent(l),u+="=",u+=encodeURIComponent(d))}s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),void 0!==r&&s.setRequestHeader("Authorization","Basic "+btoa(r)),s.send(u)})},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigninRequest=void 0;var n=r(0),i=r(3),o=r(13);t.SigninRequest=function(){function e(t){var r=t.url,a=t.client_id,s=t.redirect_uri,c=t.response_type,u=t.scope,l=t.authority,d=t.data,p=t.prompt,f=t.display,h=t.max_age,m=t.ui_locales,g=t.id_token_hint,v=t.login_hint,y=t.acr_values,b=t.resource,w=t.response_mode,x=t.request,_=t.request_uri,E=t.extraQueryParams,S=t.request_type,A=t.client_secret,k=t.extraTokenParams,C=t.skipUserInfo;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!r)throw n.Log.error("SigninRequest.ctor: No url passed"),new Error("url");if(!a)throw n.Log.error("SigninRequest.ctor: No client_id passed"),new Error("client_id");if(!s)throw n.Log.error("SigninRequest.ctor: No redirect_uri passed"),new Error("redirect_uri");if(!c)throw n.Log.error("SigninRequest.ctor: No response_type passed"),new Error("response_type");if(!u)throw n.Log.error("SigninRequest.ctor: No scope passed"),new Error("scope");if(!l)throw n.Log.error("SigninRequest.ctor: No authority passed"),new Error("authority");var T=e.isOidc(c),I=e.isCode(c);w||(w=e.isCode(c)?"query":null),this.state=new o.SigninState({nonce:T,data:d,client_id:a,authority:l,redirect_uri:s,code_verifier:I,request_type:S,response_mode:w,client_secret:A,scope:u,extraTokenParams:k,skipUserInfo:C}),r=i.UrlUtility.addQueryParam(r,"client_id",a),r=i.UrlUtility.addQueryParam(r,"redirect_uri",s),r=i.UrlUtility.addQueryParam(r,"response_type",c),r=i.UrlUtility.addQueryParam(r,"scope",u),r=i.UrlUtility.addQueryParam(r,"state",this.state.id),T&&(r=i.UrlUtility.addQueryParam(r,"nonce",this.state.nonce)),I&&(r=i.UrlUtility.addQueryParam(r,"code_challenge",this.state.code_challenge),r=i.UrlUtility.addQueryParam(r,"code_challenge_method","S256"));var F={prompt:p,display:f,max_age:h,ui_locales:m,id_token_hint:g,login_hint:v,acr_values:y,resource:b,request:x,request_uri:_,response_mode:w};for(var P in F)F[P]&&(r=i.UrlUtility.addQueryParam(r,P,F[P]));for(var N in E)r=i.UrlUtility.addQueryParam(r,N,E[N]);this.url=r}return e.isOidc=function(e){return!!e.split(/\s+/g).filter(function(e){return"id_token"===e})[0]},e.isOAuth=function(e){return!!e.split(/\s+/g).filter(function(e){return"token"===e})[0]},e.isCode=function(e){return!!e.split(/\s+/g).filter(function(e){return"code"===e})[0]},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.State=void 0;var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r(14));t.State=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.id,n=t.data,i=t.created,a=t.request_type;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._id=r||(0,o.default)(),this._data=n,this._created="number"==typeof i&&i>0?i:parseInt(Date.now()/1e3),this._request_type=a}return e.prototype.toStorageString=function(){return i.Log.debug("State.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type})},e.fromStorageString=function(t){return i.Log.debug("State.fromStorageString"),new e(JSON.parse(t))},e.clearStaleState=function(t,r){var n=Date.now()/1e3-r;return t.getAllKeys().then(function(r){i.Log.debug("State.clearStaleState: got keys",r);for(var o=[],a=function(a){var s=r[a];c=t.get(s).then(function(r){var o=!1;if(r)try{var a=e.fromStorageString(r);i.Log.debug("State.clearStaleState: got item from key: ",s,a.created),a.created<=n&&(o=!0)}catch(e){i.Log.error("State.clearStaleState: Error parsing state for key",s,e.message),o=!0}else i.Log.debug("State.clearStaleState: no item in storage for key: ",s),o=!0;if(o)return i.Log.debug("State.clearStaleState: removed item for key: ",s),t.remove(s)}),o.push(c)},s=0;s<r.length;s++){var c;a(s)}return i.Log.debug("State.clearStaleState: waiting on promise count:",o.length),Promise.all(o)})},n(e,[{key:"id",get:function(){return this._id}},{key:"data",get:function(){return this._data}},{key:"created",get:function(){return this._created}},{key:"request_type",get:function(){return this._request_type}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OidcClient=void 0;var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(5),a=r(12),s=r(8),c=r(34),u=r(35),l=r(36),d=r(13),p=r(9);t.OidcClient=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),t instanceof o.OidcClientSettings?this._settings=t:this._settings=new o.OidcClientSettings(t)}return e.prototype.createSigninRequest=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.response_type,n=t.scope,o=t.redirect_uri,a=t.data,c=t.state,u=t.prompt,l=t.display,d=t.max_age,p=t.ui_locales,f=t.id_token_hint,h=t.login_hint,m=t.acr_values,g=t.resource,v=t.request,y=t.request_uri,b=t.response_mode,w=t.extraQueryParams,x=t.extraTokenParams,_=t.request_type,E=t.skipUserInfo,S=arguments[1];i.Log.debug("OidcClient.createSigninRequest");var A=this._settings.client_id;r=r||this._settings.response_type,n=n||this._settings.scope,o=o||this._settings.redirect_uri,u=u||this._settings.prompt,l=l||this._settings.display,d=d||this._settings.max_age,p=p||this._settings.ui_locales,m=m||this._settings.acr_values,g=g||this._settings.resource,b=b||this._settings.response_mode,w=w||this._settings.extraQueryParams,x=x||this._settings.extraTokenParams;var k=this._settings.authority;return s.SigninRequest.isCode(r)&&"code"!==r?Promise.reject(new Error("OpenID Connect hybrid flow is not supported")):this._metadataService.getAuthorizationEndpoint().then(function(t){i.Log.debug("OidcClient.createSigninRequest: Received authorization endpoint",t);var C=new s.SigninRequest({url:t,client_id:A,redirect_uri:o,response_type:r,scope:n,data:a||c,authority:k,prompt:u,display:l,max_age:d,ui_locales:p,id_token_hint:f,login_hint:h,acr_values:m,resource:g,request:v,request_uri:y,extraQueryParams:w,extraTokenParams:x,request_type:_,response_mode:b,client_secret:e._settings.client_secret,skipUserInfo:E}),T=C.state;return(S=S||e._stateStore).set(T.id,T.toStorageString()).then(function(){return C})})},e.prototype.readSigninResponseState=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];i.Log.debug("OidcClient.readSigninResponseState");var n="query"===this._settings.response_mode||!this._settings.response_mode&&s.SigninRequest.isCode(this._settings.response_type)?"?":"#",o=new c.SigninResponse(e,n);return o.state?(t=t||this._stateStore,(r?t.remove.bind(t):t.get.bind(t))(o.state).then(function(e){if(!e)throw i.Log.error("OidcClient.readSigninResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:d.SigninState.fromStorageString(e),response:o}})):(i.Log.error("OidcClient.readSigninResponseState: No state in response"),Promise.reject(new Error("No state in response")))},e.prototype.processSigninResponse=function(e,t){var r=this;return i.Log.debug("OidcClient.processSigninResponse"),this.readSigninResponseState(e,t,!0).then(function(e){var t=e.state,n=e.response;return i.Log.debug("OidcClient.processSigninResponse: Received state from storage; validating response"),r._validator.validateSigninResponse(t,n)})},e.prototype.createSignoutRequest=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.id_token_hint,n=t.data,o=t.state,a=t.post_logout_redirect_uri,s=t.extraQueryParams,c=t.request_type,l=arguments[1];return i.Log.debug("OidcClient.createSignoutRequest"),a=a||this._settings.post_logout_redirect_uri,s=s||this._settings.extraQueryParams,this._metadataService.getEndSessionEndpoint().then(function(t){if(!t)throw i.Log.error("OidcClient.createSignoutRequest: No end session endpoint url returned"),new Error("no end session endpoint");i.Log.debug("OidcClient.createSignoutRequest: Received end session endpoint",t);var d=new u.SignoutRequest({url:t,id_token_hint:r,post_logout_redirect_uri:a,data:n||o,extraQueryParams:s,request_type:c}),p=d.state;return p&&(i.Log.debug("OidcClient.createSignoutRequest: Signout request has state to persist"),(l=l||e._stateStore).set(p.id,p.toStorageString())),d})},e.prototype.readSignoutResponseState=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];i.Log.debug("OidcClient.readSignoutResponseState");var n=new l.SignoutResponse(e);if(!n.state)return i.Log.debug("OidcClient.readSignoutResponseState: No state in response"),n.error?(i.Log.warn("OidcClient.readSignoutResponseState: Response was error: ",n.error),Promise.reject(new a.ErrorResponse(n))):Promise.resolve({state:void 0,response:n});var o=n.state;return t=t||this._stateStore,(r?t.remove.bind(t):t.get.bind(t))(o).then(function(e){if(!e)throw i.Log.error("OidcClient.readSignoutResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:p.State.fromStorageString(e),response:n}})},e.prototype.processSignoutResponse=function(e,t){var r=this;return i.Log.debug("OidcClient.processSignoutResponse"),this.readSignoutResponseState(e,t,!0).then(function(e){var t=e.state,n=e.response;return t?(i.Log.debug("OidcClient.processSignoutResponse: Received state from storage; validating response"),r._validator.validateSignoutResponse(t,n)):(i.Log.debug("OidcClient.processSignoutResponse: No state from storage; skipping validating response"),n)})},e.prototype.clearStaleState=function(e){return i.Log.debug("OidcClient.clearStaleState"),e=e||this._stateStore,p.State.clearStaleState(e,this.settings.staleStateAge)},n(e,[{key:"_stateStore",get:function(){return this.settings.stateStore}},{key:"_validator",get:function(){return this.settings.validator}},{key:"_metadataService",get:function(){return this.settings.metadataService}},{key:"settings",get:function(){return this._settings}},{key:"metadataService",get:function(){return this._metadataService}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenClient=void 0;var n=r(7),i=r(2),o=r(0);t.TokenClient=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.JsonService,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.MetadataService;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw o.Log.error("TokenClient.ctor: No settings passed"),new Error("settings");this._settings=t,this._jsonService=new r,this._metadataService=new a(this._settings)}return e.prototype.exchangeCode=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).grant_type=t.grant_type||"authorization_code",t.client_id=t.client_id||this._settings.client_id,t.client_secret=t.client_secret||this._settings.client_secret,t.redirect_uri=t.redirect_uri||this._settings.redirect_uri;var r=void 0,n=t._client_authentication||this._settings._client_authentication;return delete t._client_authentication,t.code?t.redirect_uri?t.code_verifier?t.client_id?t.client_secret||"client_secret_basic"!=n?("client_secret_basic"==n&&(r=t.client_id+":"+t.client_secret,delete t.client_id,delete t.client_secret),this._metadataService.getTokenEndpoint(!1).then(function(n){return o.Log.debug("TokenClient.exchangeCode: Received token endpoint"),e._jsonService.postForm(n,t,r).then(function(e){return o.Log.debug("TokenClient.exchangeCode: response received"),e})})):(o.Log.error("TokenClient.exchangeCode: No client_secret passed"),Promise.reject(new Error("A client_secret is required"))):(o.Log.error("TokenClient.exchangeCode: No client_id passed"),Promise.reject(new Error("A client_id is required"))):(o.Log.error("TokenClient.exchangeCode: No code_verifier passed"),Promise.reject(new Error("A code_verifier is required"))):(o.Log.error("TokenClient.exchangeCode: No redirect_uri passed"),Promise.reject(new Error("A redirect_uri is required"))):(o.Log.error("TokenClient.exchangeCode: No code passed"),Promise.reject(new Error("A code is required")))},e.prototype.exchangeRefreshToken=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).grant_type=t.grant_type||"refresh_token",t.client_id=t.client_id||this._settings.client_id,t.client_secret=t.client_secret||this._settings.client_secret;var r=void 0,n=t._client_authentication||this._settings._client_authentication;return delete t._client_authentication,t.refresh_token?t.client_id?("client_secret_basic"==n&&(r=t.client_id+":"+t.client_secret,delete t.client_id,delete t.client_secret),this._metadataService.getTokenEndpoint(!1).then(function(n){return o.Log.debug("TokenClient.exchangeRefreshToken: Received token endpoint"),e._jsonService.postForm(n,t,r).then(function(e){return o.Log.debug("TokenClient.exchangeRefreshToken: response received"),e})})):(o.Log.error("TokenClient.exchangeRefreshToken: No client_id passed"),Promise.reject(new Error("A client_id is required"))):(o.Log.error("TokenClient.exchangeRefreshToken: No refresh_token passed"),Promise.reject(new Error("A refresh_token is required")))},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorResponse=void 0;var n=r(0);t.ErrorResponse=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.error,o=r.error_description,a=r.error_uri,s=r.state,c=r.session_state;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),!i)throw n.Log.error("No error passed to ErrorResponse"),new Error("error");var u=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,o||i));return u.name="ErrorResponse",u.error=i,u.error_description=o,u.error_uri=a,u.state=s,u.session_state=c,u}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(Error)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigninState=void 0;var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(9),a=r(4),s=function(e){return e&&e.__esModule?e:{default:e}}(r(14));t.SigninState=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.nonce,i=r.authority,o=r.client_id,c=r.redirect_uri,u=r.code_verifier,l=r.response_mode,d=r.client_secret,p=r.scope,f=r.extraTokenParams,h=r.skipUserInfo;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var m=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,arguments[0]));if(!0===n?m._nonce=(0,s.default)():n&&(m._nonce=n),!0===u?m._code_verifier=(0,s.default)()+(0,s.default)()+(0,s.default)():u&&(m._code_verifier=u),m.code_verifier){var g=a.JoseUtil.hashString(m.code_verifier,"SHA256");m._code_challenge=a.JoseUtil.hexToBase64Url(g)}return m._redirect_uri=c,m._authority=i,m._client_id=o,m._response_mode=l,m._client_secret=d,m._scope=p,m._extraTokenParams=f,m._skipUserInfo=h,m}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.toStorageString=function(){return i.Log.debug("SigninState.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,nonce:this.nonce,code_verifier:this.code_verifier,redirect_uri:this.redirect_uri,authority:this.authority,client_id:this.client_id,response_mode:this.response_mode,client_secret:this.client_secret,scope:this.scope,extraTokenParams:this.extraTokenParams,skipUserInfo:this.skipUserInfo})},t.fromStorageString=function(e){return i.Log.debug("SigninState.fromStorageString"),new t(JSON.parse(e))},n(t,[{key:"nonce",get:function(){return this._nonce}},{key:"authority",get:function(){return this._authority}},{key:"client_id",get:function(){return this._client_id}},{key:"redirect_uri",get:function(){return this._redirect_uri}},{key:"code_verifier",get:function(){return this._code_verifier}},{key:"code_challenge",get:function(){return this._code_challenge}},{key:"response_mode",get:function(){return this._response_mode}},{key:"client_secret",get:function(){return this._client_secret}},{key:"scope",get:function(){return this._scope}},{key:"extraTokenParams",get:function(){return this._extraTokenParams}},{key:"skipUserInfo",get:function(){return this._skipUserInfo}}]),t}(o.State)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return("undefined"!=n&&null!==n&&void 0!==n.getRandomValues?i:o)().replace(/-/g,"")};var n="undefined"!=typeof window?window.crypto||window.msCrypto:null;function i(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^n.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)})}function o(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^16*Math.random()>>e/4).toString(16)})}e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.User=void 0;var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0);t.User=function(){function e(t){var r=t.id_token,n=t.session_state,i=t.access_token,o=t.refresh_token,a=t.token_type,s=t.scope,c=t.profile,u=t.expires_at,l=t.state;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id_token=r,this.session_state=n,this.access_token=i,this.refresh_token=o,this.token_type=a,this.scope=s,this.profile=c,this.expires_at=u,this.state=l}return e.prototype.toStorageString=function(){return i.Log.debug("User.toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})},e.fromStorageString=function(t){return i.Log.debug("User.fromStorageString"),new e(JSON.parse(t))},n(e,[{key:"expires_in",get:function(){if(this.expires_at){var e=parseInt(Date.now()/1e3);return this.expires_at-e}},set:function(e){var t=parseInt(e);if("number"==typeof t&&t>0){var r=parseInt(Date.now()/1e3);this.expires_at=r+t}}},{key:"expired",get:function(){var e=this.expires_in;if(void 0!==e)return e<=0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessTokenEvents=void 0;var n=r(0),i=r(46);t.AccessTokenEvents=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.accessTokenExpiringNotificationTime,n=void 0===r?60:r,o=t.accessTokenExpiringTimer,a=void 0===o?new i.Timer("Access token expiring"):o,s=t.accessTokenExpiredTimer,c=void 0===s?new i.Timer("Access token expired"):s;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._accessTokenExpiringNotificationTime=n,this._accessTokenExpiring=a,this._accessTokenExpired=c}return e.prototype.load=function(e){if(e.access_token&&void 0!==e.expires_in){var t=e.expires_in;if(n.Log.debug("AccessTokenEvents.load: access token present, remaining duration:",t),t>0){var r=t-this._accessTokenExpiringNotificationTime;r<=0&&(r=1),n.Log.debug("AccessTokenEvents.load: registering expiring timer in:",r),this._accessTokenExpiring.init(r)}else n.Log.debug("AccessTokenEvents.load: canceling existing expiring timer becase we're past expiration."),this._accessTokenExpiring.cancel();var i=t+1;n.Log.debug("AccessTokenEvents.load: registering expired timer in:",i),this._accessTokenExpired.init(i)}else this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},e.prototype.unload=function(){n.Log.debug("AccessTokenEvents.unload: canceling existing access token timers"),this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},e.prototype.addAccessTokenExpiring=function(e){this._accessTokenExpiring.addHandler(e)},e.prototype.removeAccessTokenExpiring=function(e){this._accessTokenExpiring.removeHandler(e)},e.prototype.addAccessTokenExpired=function(e){this._accessTokenExpired.addHandler(e)},e.prototype.removeAccessTokenExpired=function(e){this._accessTokenExpired.removeHandler(e)},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;var n=r(0);t.Event=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._name=t,this._callbacks=[]}return e.prototype.addHandler=function(e){this._callbacks.push(e)},e.prototype.removeHandler=function(e){var t=this._callbacks.findIndex(function(t){return t===e});t>=0&&this._callbacks.splice(t,1)},e.prototype.raise=function(){n.Log.debug("Event: Raising event: "+this._name);for(var e=0;e<this._callbacks.length;e++){var t;(t=this._callbacks)[e].apply(t,arguments)}},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionMonitor=void 0;var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(19),a=r(1);t.SessionMonitor=function(){function e(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.CheckSessionIFrame,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.Global.timer;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw i.Log.error("SessionMonitor.ctor: No user manager passed to SessionMonitor"),new Error("userManager");this._userManager=t,this._CheckSessionIFrameCtor=n,this._timer=s,this._userManager.events.addUserLoaded(this._start.bind(this)),this._userManager.events.addUserUnloaded(this._stop.bind(this)),Promise.resolve(this._userManager.getUser().then(function(e){e?r._start(e):r._settings.monitorAnonymousSession&&r._userManager.querySessionStatus().then(function(e){var t={session_state:e.session_state};e.sub&&e.sid&&(t.profile={sub:e.sub,sid:e.sid}),r._start(t)}).catch(function(e){i.Log.error("SessionMonitor ctor: error from querySessionStatus:",e.message)})}).catch(function(e){i.Log.error("SessionMonitor ctor: error from getUser:",e.message)}))}return e.prototype._start=function(e){var t=this,r=e.session_state;r&&(e.profile?(this._sub=e.profile.sub,this._sid=e.profile.sid,i.Log.debug("SessionMonitor._start: session_state:",r,", sub:",this._sub)):(this._sub=void 0,this._sid=void 0,i.Log.debug("SessionMonitor._start: session_state:",r,", anonymous user")),this._checkSessionIFrame?this._checkSessionIFrame.start(r):this._metadataService.getCheckSessionIframe().then(function(e){if(e){i.Log.debug("SessionMonitor._start: Initializing check session iframe");var n=t._client_id,o=t._checkSessionInterval,a=t._stopCheckSessionOnError;t._checkSessionIFrame=new t._CheckSessionIFrameCtor(t._callback.bind(t),n,e,o,a),t._checkSessionIFrame.load().then(function(){t._checkSessionIFrame.start(r)})}else i.Log.warn("SessionMonitor._start: No check session iframe found in the metadata")}).catch(function(e){i.Log.error("SessionMonitor._start: Error from getCheckSessionIframe:",e.message)}))},e.prototype._stop=function(){var e=this;if(this._sub=void 0,this._sid=void 0,this._checkSessionIFrame&&(i.Log.debug("SessionMonitor._stop"),this._checkSessionIFrame.stop()),this._settings.monitorAnonymousSession)var t=this._timer.setInterval(function(){e._timer.clearInterval(t),e._userManager.querySessionStatus().then(function(t){var r={session_state:t.session_state};t.sub&&t.sid&&(r.profile={sub:t.sub,sid:t.sid}),e._start(r)}).catch(function(e){i.Log.error("SessionMonitor: error from querySessionStatus:",e.message)})},1e3)},e.prototype._callback=function(){var e=this;this._userManager.querySessionStatus().then(function(t){var r=!0;t?t.sub===e._sub?(r=!1,e._checkSessionIFrame.start(t.session_state),t.sid===e._sid?i.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, restarting check session iframe; session_state:",t.session_state):(i.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, session state has changed, restarting check session iframe; session_state:",t.session_state),e._userManager.events._raiseUserSessionChanged())):i.Log.debug("SessionMonitor._callback: Different subject signed into OP:",t.sub):i.Log.debug("SessionMonitor._callback: Subject no longer signed into OP"),r&&(e._sub?(i.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed out event"),e._userManager.events._raiseUserSignedOut()):(i.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed in event"),e._userManager.events._raiseUserSignedIn()))}).catch(function(t){e._sub&&(i.Log.debug("SessionMonitor._callback: Error calling queryCurrentSigninSession; raising signed out event",t.message),e._userManager.events._raiseUserSignedOut())})},n(e,[{key:"_settings",get:function(){return this._userManager.settings}},{key:"_metadataService",get:function(){return this._userManager.metadataService}},{key:"_client_id",get:function(){return this._settings.client_id}},{key:"_checkSessionInterval",get:function(){return this._settings.checkSessionInterval}},{key:"_stopCheckSessionOnError",get:function(){return this._settings.stopCheckSessionOnError}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckSessionIFrame=void 0;var n=r(0);t.CheckSessionIFrame=function(){function e(t,r,n,i){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._callback=t,this._client_id=r,this._url=n,this._interval=i||2e3,this._stopOnError=o;var a=n.indexOf("/",n.indexOf("//")+2);this._frame_origin=n.substr(0,a),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.style.display="none",this._frame.width=0,this._frame.height=0,this._frame.src=n}return e.prototype.load=function(){var e=this;return new Promise(function(t){e._frame.onload=function(){t()},window.document.body.appendChild(e._frame),e._boundMessageEvent=e._message.bind(e),window.addEventListener("message",e._boundMessageEvent,!1)})},e.prototype._message=function(e){e.origin===this._frame_origin&&e.source===this._frame.contentWindow&&("error"===e.data?(n.Log.error("CheckSessionIFrame: error message from check session op iframe"),this._stopOnError&&this.stop()):"changed"===e.data?(n.Log.debug("CheckSessionIFrame: changed message from check session op iframe"),this.stop(),this._callback()):n.Log.debug("CheckSessionIFrame: "+e.data+" message from check session op iframe"))},e.prototype.start=function(e){var t=this;if(this._session_state!==e){n.Log.debug("CheckSessionIFrame.start"),this.stop(),this._session_state=e;var r=function(){t._frame.contentWindow.postMessage(t._client_id+" "+t._session_state,t._frame_origin)};r(),this._timer=window.setInterval(r,this._interval)}},e.prototype.stop=function(){this._session_state=null,this._timer&&(n.Log.debug("CheckSessionIFrame.stop"),window.clearInterval(this._timer),this._timer=null)},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenRevocationClient=void 0;var n=r(0),i=r(2),o=r(1);t.TokenRevocationClient=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.Global.XMLHttpRequest,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.MetadataService;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw n.Log.error("TokenRevocationClient.ctor: No settings provided"),new Error("No settings provided.");this._settings=t,this._XMLHttpRequestCtor=r,this._metadataService=new a(this._settings)}return e.prototype.revoke=function(e,t){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"access_token";if(!e)throw n.Log.error("TokenRevocationClient.revoke: No token provided"),new Error("No token provided.");if("access_token"!==i&&"refresh_token"!=i)throw n.Log.error("TokenRevocationClient.revoke: Invalid token type"),new Error("Invalid token type.");return this._metadataService.getRevocationEndpoint().then(function(o){if(o){n.Log.debug("TokenRevocationClient.revoke: Revoking "+i);var a=r._settings.client_id,s=r._settings.client_secret;return r._revoke(o,a,s,e,i)}if(t)throw n.Log.error("TokenRevocationClient.revoke: Revocation not supported"),new Error("Revocation not supported")})},e.prototype._revoke=function(e,t,r,i,o){var a=this;return new Promise(function(s,c){var u=new a._XMLHttpRequestCtor;u.open("POST",e),u.onload=function(){n.Log.debug("TokenRevocationClient.revoke: HTTP response received, status",u.status),200===u.status?s():c(Error(u.statusText+" ("+u.status+")"))},u.onerror=function(){n.Log.debug("TokenRevocationClient.revoke: Network Error."),c("Network Error")};var l="client_id="+encodeURIComponent(t);r&&(l+="&client_secret="+encodeURIComponent(r)),l+="&token_type_hint="+encodeURIComponent(o),l+="&token="+encodeURIComponent(i),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),u.send(l)})},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CordovaPopupWindow=void 0;var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0);t.CordovaPopupWindow=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._promise=new Promise(function(e,t){r._resolve=e,r._reject=t}),this.features=t.popupWindowFeatures||"location=no,toolbar=no,zoom=no",this.target=t.popupWindowTarget||"_blank",this.redirect_uri=t.startUrl,i.Log.debug("CordovaPopupWindow.ctor: redirect_uri: "+this.redirect_uri)}return e.prototype._isInAppBrowserInstalled=function(e){return["cordova-plugin-inappbrowser","cordova-plugin-inappbrowser.inappbrowser","org.apache.cordova.inappbrowser"].some(function(t){return e.hasOwnProperty(t)})},e.prototype.navigate=function(e){if(e&&e.url){if(!window.cordova)return this._error("cordova is undefined");var t=window.cordova.require("cordova/plugin_list").metadata;if(!1===this._isInAppBrowserInstalled(t))return this._error("InAppBrowser plugin not found");this._popup=cordova.InAppBrowser.open(e.url,this.target,this.features),this._popup?(i.Log.debug("CordovaPopupWindow.navigate: popup successfully created"),this._exitCallbackEvent=this._exitCallback.bind(this),this._loadStartCallbackEvent=this._loadStartCallback.bind(this),this._popup.addEventListener("exit",this._exitCallbackEvent,!1),this._popup.addEventListener("loadstart",this._loadStartCallbackEvent,!1)):this._error("Error opening popup window")}else this._error("No url provided");return this.promise},e.prototype._loadStartCallback=function(e){0===e.url.indexOf(this.redirect_uri)&&this._success({url:e.url})},e.prototype._exitCallback=function(e){this._error(e)},e.prototype._success=function(e){this._cleanup(),i.Log.debug("CordovaPopupWindow: Successful response from cordova popup window"),this._resolve(e)},e.prototype._error=function(e){this._cleanup(),i.Log.error(e),this._reject(new Error(e))},e.prototype.close=function(){this._cleanup()},e.prototype._cleanup=function(){this._popup&&(i.Log.debug("CordovaPopupWindow: cleaning up popup"),this._popup.removeEventListener("exit",this._exitCallbackEvent,!1),this._popup.removeEventListener("loadstart",this._loadStartCallbackEvent,!1),this._popup.close()),this._popup=null},n(e,[{key:"promise",get:function(){return this._promise}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(10),o=r(5),a=r(6),s=r(37),c=r(38),u=r(16),l=r(2),d=r(48),p=r(49),f=r(19),h=r(20),m=r(18),g=r(1),v=r(15),y=r(50);t.default={Version:y.Version,Log:n.Log,OidcClient:i.OidcClient,OidcClientSettings:o.OidcClientSettings,WebStorageStateStore:a.WebStorageStateStore,InMemoryWebStorage:s.InMemoryWebStorage,UserManager:c.UserManager,AccessTokenEvents:u.AccessTokenEvents,MetadataService:l.MetadataService,CordovaPopupNavigator:d.CordovaPopupNavigator,CordovaIFrameNavigator:p.CordovaIFrameNavigator,CheckSessionIFrame:f.CheckSessionIFrame,TokenRevocationClient:h.TokenRevocationClient,SessionMonitor:m.SessionMonitor,Global:g.Global,User:v.User},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClockService=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.getEpochTime=function(){return Promise.resolve(Date.now()/1e3|0)},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseValidator=void 0;var n="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},i=r(0),o=r(2),a=r(25),s=r(11),c=r(12),u=r(4),l=["nonce","at_hash","iat","nbf","exp","aud","iss","c_hash"];t.ResponseValidator=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.MetadataService,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.UserInfoService,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:u.JoseUtil,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:s.TokenClient;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw i.Log.error("ResponseValidator.ctor: No settings passed to ResponseValidator"),new Error("settings");this._settings=t,this._metadataService=new r(this._settings),this._userInfoService=new n(this._settings),this._joseUtil=c,this._tokenClient=new l(this._settings)}return e.prototype.validateSigninResponse=function(e,t){var r=this;return i.Log.debug("ResponseValidator.validateSigninResponse"),this._processSigninParams(e,t).then(function(t){return i.Log.debug("ResponseValidator.validateSigninResponse: state processed"),r._validateTokens(e,t).then(function(t){return i.Log.debug("ResponseValidator.validateSigninResponse: tokens validated"),r._processClaims(e,t).then(function(e){return i.Log.debug("ResponseValidator.validateSigninResponse: claims processed"),e})})})},e.prototype.validateSignoutResponse=function(e,t){return e.id!==t.state?(i.Log.error("ResponseValidator.validateSignoutResponse: State does not match"),Promise.reject(new Error("State does not match"))):(i.Log.debug("ResponseValidator.validateSignoutResponse: state validated"),t.state=e.data,t.error?(i.Log.warn("ResponseValidator.validateSignoutResponse: Response was error",t.error),Promise.reject(new c.ErrorResponse(t))):Promise.resolve(t))},e.prototype._processSigninParams=function(e,t){if(e.id!==t.state)return i.Log.error("ResponseValidator._processSigninParams: State does not match"),Promise.reject(new Error("State does not match"));if(!e.client_id)return i.Log.error("ResponseValidator._processSigninParams: No client_id on state"),Promise.reject(new Error("No client_id on state"));if(!e.authority)return i.Log.error("ResponseValidator._processSigninParams: No authority on state"),Promise.reject(new Error("No authority on state"));if(this._settings.authority){if(this._settings.authority&&this._settings.authority!==e.authority)return i.Log.error("ResponseValidator._processSigninParams: authority mismatch on settings vs. signin state"),Promise.reject(new Error("authority mismatch on settings vs. signin state"))}else this._settings.authority=e.authority;if(this._settings.client_id){if(this._settings.client_id&&this._settings.client_id!==e.client_id)return i.Log.error("ResponseValidator._processSigninParams: client_id mismatch on settings vs. signin state"),Promise.reject(new Error("client_id mismatch on settings vs. signin state"))}else this._settings.client_id=e.client_id;return i.Log.debug("ResponseValidator._processSigninParams: state validated"),t.state=e.data,t.error?(i.Log.warn("ResponseValidator._processSigninParams: Response was error",t.error),Promise.reject(new c.ErrorResponse(t))):e.nonce&&!t.id_token?(i.Log.error("ResponseValidator._processSigninParams: Expecting id_token in response"),Promise.reject(new Error("No id_token in response"))):!e.nonce&&t.id_token?(i.Log.error("ResponseValidator._processSigninParams: Not expecting id_token in response"),Promise.reject(new Error("Unexpected id_token in response"))):e.code_verifier&&!t.code?(i.Log.error("ResponseValidator._processSigninParams: Expecting code in response"),Promise.reject(new Error("No code in response"))):!e.code_verifier&&t.code?(i.Log.error("ResponseValidator._processSigninParams: Not expecting code in response"),Promise.reject(new Error("Unexpected code in response"))):(t.scope||(t.scope=e.scope),Promise.resolve(t))},e.prototype._processClaims=function(e,t){var r=this;if(t.isOpenIdConnect){if(i.Log.debug("ResponseValidator._processClaims: response is OIDC, processing claims"),t.profile=this._filterProtocolClaims(t.profile),!0!==e.skipUserInfo&&this._settings.loadUserInfo&&t.access_token)return i.Log.debug("ResponseValidator._processClaims: loading user info"),this._userInfoService.getClaims(t.access_token).then(function(e){return i.Log.debug("ResponseValidator._processClaims: user info claims received from user info endpoint"),e.sub!==t.profile.sub?(i.Log.error("ResponseValidator._processClaims: sub from user info endpoint does not match sub in id_token"),Promise.reject(new Error("sub from user info endpoint does not match sub in id_token"))):(t.profile=r._mergeClaims(t.profile,e),i.Log.debug("ResponseValidator._processClaims: user info claims received, updated profile:",t.profile),t)});i.Log.debug("ResponseValidator._processClaims: not loading user info")}else i.Log.debug("ResponseValidator._processClaims: response is not OIDC, not processing claims");return Promise.resolve(t)},e.prototype._mergeClaims=function(e,t){var r=Object.assign({},e);for(var i in t){var o=t[i];Array.isArray(o)||(o=[o]);for(var a=0;a<o.length;a++){var s=o[a];r[i]?Array.isArray(r[i])?r[i].indexOf(s)<0&&r[i].push(s):r[i]!==s&&("object"===(void 0===s?"undefined":n(s))&&this._settings.mergeClaims?r[i]=this._mergeClaims(r[i],s):r[i]=[r[i],s]):r[i]=s}}return r},e.prototype._filterProtocolClaims=function(e){i.Log.debug("ResponseValidator._filterProtocolClaims, incoming claims:",e);var t=Object.assign({},e);return this._settings._filterProtocolClaims?(l.forEach(function(e){delete t[e]}),i.Log.debug("ResponseValidator._filterProtocolClaims: protocol claims filtered",t)):i.Log.debug("ResponseValidator._filterProtocolClaims: protocol claims not filtered"),t},e.prototype._validateTokens=function(e,t){return t.code?(i.Log.debug("ResponseValidator._validateTokens: Validating code"),this._processCode(e,t)):t.id_token?t.access_token?(i.Log.debug("ResponseValidator._validateTokens: Validating id_token and access_token"),this._validateIdTokenAndAccessToken(e,t)):(i.Log.debug("ResponseValidator._validateTokens: Validating id_token"),this._validateIdToken(e,t)):(i.Log.debug("ResponseValidator._validateTokens: No code to process or id_token to validate"),Promise.resolve(t))},e.prototype._processCode=function(e,t){var r=this,o={client_id:e.client_id,client_secret:e.client_secret,code:t.code,redirect_uri:e.redirect_uri,code_verifier:e.code_verifier};return e.extraTokenParams&&"object"===n(e.extraTokenParams)&&Object.assign(o,e.extraTokenParams),this._tokenClient.exchangeCode(o).then(function(n){for(var o in n)t[o]=n[o];return t.id_token?(i.Log.debug("ResponseValidator._processCode: token response successful, processing id_token"),r._validateIdTokenAttributes(e,t)):(i.Log.debug("ResponseValidator._processCode: token response successful, returning response"),t)})},e.prototype._validateIdTokenAttributes=function(e,t){var r=this;return this._metadataService.getIssuer().then(function(n){var o=e.client_id,a=r._settings.clockSkew;return i.Log.debug("ResponseValidator._validateIdTokenAttributes: Validaing JWT attributes; using clock skew (in seconds) of: ",a),r._settings.getEpochTime().then(function(s){return r._joseUtil.validateJwtAttributes(t.id_token,n,o,a,s).then(function(r){return e.nonce&&e.nonce!==r.nonce?(i.Log.error("ResponseValidator._validateIdTokenAttributes: Invalid nonce in id_token"),Promise.reject(new Error("Invalid nonce in id_token"))):r.sub?(t.profile=r,t):(i.Log.error("ResponseValidator._validateIdTokenAttributes: No sub present in id_token"),Promise.reject(new Error("No sub present in id_token")))})})})},e.prototype._validateIdTokenAndAccessToken=function(e,t){var r=this;return this._validateIdToken(e,t).then(function(e){return r._validateAccessToken(e)})},e.prototype._getSigningKeyForJwt=function(e){var t=this;return this._metadataService.getSigningKeys().then(function(r){var n=e.header.kid;if(!r)return i.Log.error("ResponseValidator._validateIdToken: No signing keys from metadata"),Promise.reject(new Error("No signing keys from metadata"));i.Log.debug("ResponseValidator._validateIdToken: Received signing keys");var o=void 0;if(n)o=r.filter(function(e){return e.kid===n})[0];else{if((r=t._filterByAlg(r,e.header.alg)).length>1)return i.Log.error("ResponseValidator._validateIdToken: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));o=r[0]}return Promise.resolve(o)})},e.prototype._getSigningKeyForJwtWithSingleRetry=function(e){var t=this;return this._getSigningKeyForJwt(e).then(function(r){return r?Promise.resolve(r):(t._metadataService.resetSigningKeys(),t._getSigningKeyForJwt(e))})},e.prototype._validateIdToken=function(e,t){var r=this;if(!e.nonce)return i.Log.error("ResponseValidator._validateIdToken: No nonce on state"),Promise.reject(new Error("No nonce on state"));var n=this._joseUtil.parseJwt(t.id_token);return n&&n.header&&n.payload?e.nonce!==n.payload.nonce?(i.Log.error("ResponseValidator._validateIdToken: Invalid nonce in id_token"),Promise.reject(new Error("Invalid nonce in id_token"))):this._metadataService.getIssuer().then(function(o){return i.Log.debug("ResponseValidator._validateIdToken: Received issuer"),r._getSigningKeyForJwtWithSingleRetry(n).then(function(a){if(!a)return i.Log.error("ResponseValidator._validateIdToken: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));var s=e.client_id,c=r._settings.clockSkew;return i.Log.debug("ResponseValidator._validateIdToken: Validaing JWT; using clock skew (in seconds) of: ",c),r._joseUtil.validateJwt(t.id_token,a,o,s,c).then(function(){return i.Log.debug("ResponseValidator._validateIdToken: JWT validation successful"),n.payload.sub?(t.profile=n.payload,t):(i.Log.error("ResponseValidator._validateIdToken: No sub present in id_token"),Promise.reject(new Error("No sub present in id_token")))})})}):(i.Log.error("ResponseValidator._validateIdToken: Failed to parse id_token",n),Promise.reject(new Error("Failed to parse id_token")))},e.prototype._filterByAlg=function(e,t){var r=null;if(t.startsWith("RS"))r="RSA";else if(t.startsWith("PS"))r="PS";else{if(!t.startsWith("ES"))return i.Log.debug("ResponseValidator._filterByAlg: alg not supported: ",t),[];r="EC"}return i.Log.debug("ResponseValidator._filterByAlg: Looking for keys that match kty: ",r),e=e.filter(function(e){return e.kty===r}),i.Log.debug("ResponseValidator._filterByAlg: Number of keys that match kty: ",r,e.length),e},e.prototype._validateAccessToken=function(e){if(!e.profile)return i.Log.error("ResponseValidator._validateAccessToken: No profile loaded from id_token"),Promise.reject(new Error("No profile loaded from id_token"));if(!e.profile.at_hash)return i.Log.error("ResponseValidator._validateAccessToken: No at_hash in id_token"),Promise.reject(new Error("No at_hash in id_token"));if(!e.id_token)return i.Log.error("ResponseValidator._validateAccessToken: No id_token"),Promise.reject(new Error("No id_token"));var t=this._joseUtil.parseJwt(e.id_token);if(!t||!t.header)return i.Log.error("ResponseValidator._validateAccessToken: Failed to parse id_token",t),Promise.reject(new Error("Failed to parse id_token"));var r=t.header.alg;if(!r||5!==r.length)return i.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",r),Promise.reject(new Error("Unsupported alg: "+r));var n=r.substr(2,3);if(!n)return i.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",r,n),Promise.reject(new Error("Unsupported alg: "+r));if(256!==(n=parseInt(n))&&384!==n&&512!==n)return i.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",r,n),Promise.reject(new Error("Unsupported alg: "+r));var o="sha"+n,a=this._joseUtil.hashString(e.access_token,o);if(!a)return i.Log.error("ResponseValidator._validateAccessToken: access_token hash failed:",o),Promise.reject(new Error("Failed to validate at_hash"));var s=a.substr(0,a.length/2),c=this._joseUtil.hexToBase64Url(s);return c!==e.profile.at_hash?(i.Log.error("ResponseValidator._validateAccessToken: Failed to validate at_hash",c,e.profile.at_hash),Promise.reject(new Error("Failed to validate at_hash"))):(i.Log.debug("ResponseValidator._validateAccessToken: success"),Promise.resolve(e))},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserInfoService=void 0;var n=r(7),i=r(2),o=r(0),a=r(4);t.UserInfoService=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.JsonService,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.MetadataService,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a.JoseUtil;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw o.Log.error("UserInfoService.ctor: No settings passed"),new Error("settings");this._settings=t,this._jsonService=new r(void 0,void 0,this._getClaimsFromJwt.bind(this)),this._metadataService=new s(this._settings),this._joseUtil=c}return e.prototype.getClaims=function(e){var t=this;return e?this._metadataService.getUserInfoEndpoint().then(function(r){return o.Log.debug("UserInfoService.getClaims: received userinfo url",r),t._jsonService.getJson(r,e).then(function(e){return o.Log.debug("UserInfoService.getClaims: claims received",e),e})}):(o.Log.error("UserInfoService.getClaims: No token passed"),Promise.reject(new Error("A token is required")))},e.prototype._getClaimsFromJwt=function e(t){var r=this;try{var n=this._joseUtil.parseJwt(t.responseText);if(!n||!n.header||!n.payload)return o.Log.error("UserInfoService._getClaimsFromJwt: Failed to parse JWT",n),Promise.reject(new Error("Failed to parse id_token"));var i=n.header.kid,a=void 0;switch(this._settings.userInfoJwtIssuer){case"OP":a=this._metadataService.getIssuer();break;case"ANY":a=Promise.resolve(n.payload.iss);break;default:a=Promise.resolve(this._settings.userInfoJwtIssuer)}return a.then(function(e){return o.Log.debug("UserInfoService._getClaimsFromJwt: Received issuer:"+e),r._metadataService.getSigningKeys().then(function(a){if(!a)return o.Log.error("UserInfoService._getClaimsFromJwt: No signing keys from metadata"),Promise.reject(new Error("No signing keys from metadata"));o.Log.debug("UserInfoService._getClaimsFromJwt: Received signing keys");var s=void 0;if(i)s=a.filter(function(e){return e.kid===i})[0];else{if((a=r._filterByAlg(a,n.header.alg)).length>1)return o.Log.error("UserInfoService._getClaimsFromJwt: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));s=a[0]}if(!s)return o.Log.error("UserInfoService._getClaimsFromJwt: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));var c=r._settings.client_id,u=r._settings.clockSkew;return o.Log.debug("UserInfoService._getClaimsFromJwt: Validaing JWT; using clock skew (in seconds) of: ",u),r._joseUtil.validateJwt(t.responseText,s,e,c,u,void 0,!0).then(function(){return o.Log.debug("UserInfoService._getClaimsFromJwt: JWT validation successful"),n.payload})})})}catch(e){return o.Log.error("UserInfoService._getClaimsFromJwt: Error parsing JWT response",e.message),void reject(e)}},e.prototype._filterByAlg=function(e,t){var r=null;if(t.startsWith("RS"))r="RSA";else if(t.startsWith("PS"))r="PS";else{if(!t.startsWith("ES"))return o.Log.debug("UserInfoService._filterByAlg: alg not supported: ",t),[];r="EC"}return o.Log.debug("UserInfoService._filterByAlg: Looking for keys that match kty: ",r),e=e.filter(function(e){return e.kty===r}),o.Log.debug("UserInfoService._filterByAlg: Number of keys that match kty: ",r,e.length),e},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AllowedSigningAlgs=t.b64tohex=t.hextob64u=t.crypto=t.X509=t.KeyUtil=t.jws=void 0;var n=r(27);t.jws=n.jws,t.KeyUtil=n.KEYUTIL,t.X509=n.X509,t.crypto=n.crypto,t.hextob64u=n.hextob64u,t.b64tohex=n.b64tohex,t.AllowedSigningAlgs=["RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"]},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r,n,i,o,a,s,c,u,l,d,p,f="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},h={userAgent:!1},m={},g=g||(r=Math,i=(n={}).lib={},o=i.Base=function(){function e(){}return{extend:function(t){e.prototype=this;var r=new e;return t&&r.mixIn(t),r.hasOwnProperty("init")||(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=i.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var a=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(o=0;o<i;o+=4)t[n+o>>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=r.ceil(t/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(4294967296*r.random()|0);return new a.init(t,e)}}),s=n.enc={},c=s.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new a.init(r,t/2)}},u=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new a.init(r,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},d=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t=this._data,n=t.words,i=t.sigBytes,o=this.blockSize,s=i/(4*o),c=(s=e?r.ceil(s):r.max((0|s)-this._minBufferSize,0))*o,u=r.min(4*c,i);if(c){for(var l=0;l<c;l+=o)this._doProcessBlock(n,l);var d=n.splice(0,c);t.sigBytes-=u}return new a.init(d,u)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),i.Hasher=d.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new p.HMAC.init(e,r).finalize(t)}}}),p=n.algo={},n);!function(){var e,t=(e=g).lib,r=t.Base,n=t.WordArray;(e=e.x64={}).Word=r.extend({init:function(e,t){this.high=e,this.low=t}}),e.WordArray=r.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,r=[],i=0;i<t;i++){var o=e[i];r.push(o.high),r.push(o.low)}return n.create(r,this.sigBytes)},clone:function(){for(var e=r.clone.call(this),t=e.words=this.words.slice(0),n=t.length,i=0;i<n;i++)t[i]=t[i].clone();return e}})}(),function(){var e=g,t=e.lib.WordArray;e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp(),e=[];for(var i=0;i<r;i+=3)for(var o=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;4>a&&i+.75*a<r;a++)e.push(n.charAt(o>>>6*(3-a)&63));if(t=n.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var r=e.length,n=this._map;(i=n.charAt(64))&&-1!=(i=e.indexOf(i))&&(r=i);for(var i=[],o=0,a=0;a<r;a++)if(a%4){var s=n.indexOf(e.charAt(a-1))<<a%4*2,c=n.indexOf(e.charAt(a))>>>6-a%4*2;i[o>>>2]|=(s|c)<<24-o%4*8,o++}return t.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(e){for(var t=g,r=(i=t.lib).WordArray,n=i.Hasher,i=t.algo,o=[],a=[],s=function(e){return 4294967296*(e-(0|e))|0},c=2,u=0;64>u;){var l;e:{l=c;for(var d=e.sqrt(l),p=2;p<=d;p++)if(!(l%p)){l=!1;break e}l=!0}l&&(8>u&&(o[u]=s(e.pow(c,.5))),a[u]=s(e.pow(c,1/3)),u++),c++}var f=[];i=i.SHA256=n.extend({_doReset:function(){this._hash=new r.init(o.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],c=r[4],u=r[5],l=r[6],d=r[7],p=0;64>p;p++){if(16>p)f[p]=0|e[t+p];else{var h=f[p-15],m=f[p-2];f[p]=((h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3)+f[p-7]+((m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10)+f[p-16]}h=d+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&u^~c&l)+a[p]+f[p],m=((n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22))+(n&i^n&o^i&o),d=l,l=u,u=c,c=s+h|0,s=o,o=i,i=n,n=h+m|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0,r[5]=r[5]+u|0,r[6]=r[6]+l|0,r[7]=r[7]+d|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA256=n._createHelper(i),t.HmacSHA256=n._createHmacHelper(i)}(Math),function(){function e(){return n.create.apply(n,arguments)}for(var t=g,r=t.lib.Hasher,n=(o=t.x64).Word,i=o.WordArray,o=t.algo,a=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],s=[],c=0;80>c;c++)s[c]=e();o=o.SHA512=r.extend({_doReset:function(){this._hash=new i.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=(d=this._hash.words)[0],n=d[1],i=d[2],o=d[3],c=d[4],u=d[5],l=d[6],d=d[7],p=r.high,f=r.low,h=n.high,m=n.low,g=i.high,v=i.low,y=o.high,b=o.low,w=c.high,x=c.low,_=u.high,E=u.low,S=l.high,A=l.low,k=d.high,C=d.low,T=p,I=f,F=h,P=m,N=g,O=v,R=y,j=b,L=w,D=x,U=_,M=E,B=S,H=A,q=k,W=C,V=0;80>V;V++){var K=s[V];if(16>V)var J=K.high=0|e[t+2*V],z=K.low=0|e[t+2*V+1];else{J=((z=(J=s[V-15]).high)>>>1|($=J.low)<<31)^(z>>>8|$<<24)^z>>>7;var $=($>>>1|z<<31)^($>>>8|z<<24)^($>>>7|z<<25),G=((z=(G=s[V-2]).high)>>>19|(X=G.low)<<13)^(z<<3|X>>>29)^z>>>6,X=(X>>>19|z<<13)^(X<<3|z>>>29)^(X>>>6|z<<26),Y=(z=s[V-7]).high,Q=(Z=s[V-16]).high,Z=Z.low;J=(J=(J=J+Y+((z=$+z.low)>>>0<$>>>0?1:0))+G+((z+=X)>>>0<X>>>0?1:0))+Q+((z+=Z)>>>0<Z>>>0?1:0),K.high=J,K.low=z}Y=L&U^~L&B,Z=D&M^~D&H,K=T&F^T&N^F&N;var ee=I&P^I&O^P&O,te=($=(T>>>28|I<<4)^(T<<30|I>>>2)^(T<<25|I>>>7),G=(I>>>28|T<<4)^(I<<30|T>>>2)^(I<<25|T>>>7),(X=a[V]).high),re=X.low;Q=q+((L>>>14|D<<18)^(L>>>18|D<<14)^(L<<23|D>>>9))+((X=W+((D>>>14|L<<18)^(D>>>18|L<<14)^(D<<23|L>>>9)))>>>0<W>>>0?1:0),q=B,W=H,B=U,H=M,U=L,M=D,L=R+(Q=(Q=(Q=Q+Y+((X+=Z)>>>0<Z>>>0?1:0))+te+((X+=re)>>>0<re>>>0?1:0))+J+((X+=z)>>>0<z>>>0?1:0))+((D=j+X|0)>>>0<j>>>0?1:0)|0,R=N,j=O,N=F,O=P,F=T,P=I,T=Q+(K=$+K+((z=G+ee)>>>0<G>>>0?1:0))+((I=X+z|0)>>>0<X>>>0?1:0)|0}f=r.low=f+I,r.high=p+T+(f>>>0<I>>>0?1:0),m=n.low=m+P,n.high=h+F+(m>>>0<P>>>0?1:0),v=i.low=v+O,i.high=g+N+(v>>>0<O>>>0?1:0),b=o.low=b+j,o.high=y+R+(b>>>0<j>>>0?1:0),x=c.low=x+D,c.high=w+L+(x>>>0<D>>>0?1:0),E=u.low=E+M,u.high=_+U+(E>>>0<M>>>0?1:0),A=l.low=A+H,l.high=S+B+(A>>>0<H>>>0?1:0),C=d.low=C+W,d.high=k+q+(C>>>0<W>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32}),t.SHA512=r._createHelper(o),t.HmacSHA512=r._createHmacHelper(o)}(),function(){var e=g,t=(i=e.x64).Word,r=i.WordArray,n=(i=e.algo).SHA512,i=i.SHA384=n.extend({_doReset:function(){this._hash=new r.init([new t.init(3418070365,3238371032),new t.init(1654270250,914150663),new t.init(2438529370,812702999),new t.init(355462360,4144912697),new t.init(1731405415,4290775857),new t.init(2394180231,1750603025),new t.init(3675008525,1694076839),new t.init(1203062813,3204075428)])},_doFinalize:function(){var e=n._doFinalize.call(this);return e.sigBytes-=16,e}});e.SHA384=n._createHelper(i),e.HmacSHA384=n._createHmacHelper(i)}();var v,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function b(e){var t,r,n="";for(t=0;t+3<=e.length;t+=3)r=parseInt(e.substring(t,t+3),16),n+=y.charAt(r>>6)+y.charAt(63&r);for(t+1==e.length?(r=parseInt(e.substring(t,t+1),16),n+=y.charAt(r<<2)):t+2==e.length&&(r=parseInt(e.substring(t,t+2),16),n+=y.charAt(r>>2)+y.charAt((3&r)<<4));(3&n.length)>0;)n+="=";return n}function w(e){var t,r,n,i="",o=0;for(t=0;t<e.length&&"="!=e.charAt(t);++t)(n=y.indexOf(e.charAt(t)))<0||(0==o?(i+=C(n>>2),r=3&n,o=1):1==o?(i+=C(r<<2|n>>4),r=15&n,o=2):2==o?(i+=C(r),i+=C(n>>2),r=3&n,o=3):(i+=C(r<<2|n>>4),i+=C(15&n),o=0));return 1==o&&(i+=C(r<<2)),i}function x(e){var t,r=w(e),n=new Array;for(t=0;2*t<r.length;++t)n[t]=parseInt(r.substring(2*t,2*t+2),16);return n}function _(e,t,r){null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function E(){return new _(null)}"Microsoft Internet Explorer"==h.appName?(_.prototype.am=function(e,t,r,n,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var c=32767&this[e],u=this[e++]>>15,l=s*c+u*a;i=((c=a*c+((32767&l)<<15)+r[n]+(1073741823&i))>>>30)+(l>>>15)+s*u+(i>>>30),r[n++]=1073741823&c}return i},v=30):"Netscape"!=h.appName?(_.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var a=t*this[e++]+r[n]+i;i=Math.floor(a/67108864),r[n++]=67108863&a}return i},v=26):(_.prototype.am=function(e,t,r,n,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var c=16383&this[e],u=this[e++]>>14,l=s*c+u*a;i=((c=a*c+((16383&l)<<14)+r[n]+i)>>28)+(l>>14)+s*u,r[n++]=268435455&c}return i},v=28),_.prototype.DB=v,_.prototype.DM=(1<<v)-1,_.prototype.DV=1<<v,_.prototype.FV=Math.pow(2,52),_.prototype.F1=52-v,_.prototype.F2=2*v-52;var S,A,k=new Array;for(S="0".charCodeAt(0),A=0;A<=9;++A)k[S++]=A;for(S="a".charCodeAt(0),A=10;A<36;++A)k[S++]=A;for(S="A".charCodeAt(0),A=10;A<36;++A)k[S++]=A;function C(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function T(e,t){var r=k[e.charCodeAt(t)];return null==r?-1:r}function I(e){var t=E();return t.fromInt(e),t}function F(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function P(e){this.m=e}function N(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function O(e,t){return e&t}function R(e,t){return e|t}function j(e,t){return e^t}function L(e,t){return e&~t}function D(e){if(0==e)return-1;var t=0;return!(65535&e)&&(e>>=16,t+=16),!(255&e)&&(e>>=8,t+=8),!(15&e)&&(e>>=4,t+=4),!(3&e)&&(e>>=2,t+=2),!(1&e)&&++t,t}function U(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function M(){}function B(e){return e}function H(e){this.r2=E(),this.q3=E(),_.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}P.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},P.prototype.revert=function(e){return e},P.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},P.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},P.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},N.prototype.convert=function(e){var t=E();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(_.ZERO)>0&&this.m.subTo(t,t),t},N.prototype.revert=function(e){var t=E();return e.copyTo(t),this.reduce(t),t},N.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e[t],n=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},N.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},N.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},_.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},_.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},_.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,o=0;--n>=0;){var a=8==r?255&e[n]:T(e,n);a<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==o?this[this.t++]=a:o+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,(o+=r)>=this.DB&&(o-=this.DB))}8==r&&!!(128&e[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),i&&_.ZERO.subTo(this,this)},_.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},_.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},_.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s},_.prototype.lShiftTo=function(e,t){var r,n=e%this.DB,i=this.DB-n,o=(1<<i)-1,a=Math.floor(e/this.DB),s=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)t[r+a+1]=this[r]>>i|s,s=(this[r]&o)<<n;for(r=a-1;r>=0;--r)t[r]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},_.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<<n)-1;t[0]=this[r]>>n;for(var a=r+1;a<this.t;++a)t[a-r-1]|=(this[a]&o)<<i,t[a-r]=this[a]>>n;n>0&&(t[this.t-r-1]|=(this.s&o)<<i),t.t=this.t-r,t.clamp()}},_.prototype.subTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]-e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e[r],t[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},_.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t[i]=0;for(i=0;i<n.t;++i)t[i+r.t]=r.am(0,n[i],t,i,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&_.ZERO.subTo(t,t)},_.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},_.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t<n.t)return null!=t&&t.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=E());var o=E(),a=this.s,s=e.s,c=this.DB-F(n[n.t-1]);c>0?(n.lShiftTo(c,o),i.lShiftTo(c,r)):(n.copyTo(o),i.copyTo(r));var u=o.t,l=o[u-1];if(0!=l){var d=l*(1<<this.F1)+(u>1?o[u-2]>>this.F2:0),p=this.FV/d,f=(1<<this.F1)/d,h=1<<this.F2,m=r.t,g=m-u,v=null==t?E():t;for(o.dlShiftTo(g,v),r.compareTo(v)>=0&&(r[r.t++]=1,r.subTo(v,r)),_.ONE.dlShiftTo(u,v),v.subTo(o,o);o.t<u;)o[o.t++]=0;for(;--g>=0;){var y=r[--m]==l?this.DM:Math.floor(r[m]*p+(r[m-1]+h)*f);if((r[m]+=o.am(0,y,r,g,0,u))<y)for(o.dlShiftTo(g,v),r.subTo(v,r);r[m]<--y;)r.subTo(v,r)}null!=t&&(r.drShiftTo(u,t),a!=s&&_.ZERO.subTo(t,t)),r.t=u,r.clamp(),c>0&&r.rShiftTo(c,r),a<0&&_.ZERO.subTo(r,r)}}},_.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},_.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},_.prototype.exp=function(e,t){if(e>4294967295||e<1)return _.ONE;var r=E(),n=E(),i=t.convert(this),o=F(e)-1;for(i.copyTo(r);--o>=0;)if(t.sqrTo(r,n),(e&1<<o)>0)t.mulTo(n,i,r);else{var a=r;r=n,n=a}return t.revert(r)},_.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<<t)-1,i=!1,o="",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s<this.DB&&(r=this[a]>>s)>0&&(i=!0,o=C(r));a>=0;)s<t?(r=(this[a]&(1<<s)-1)<<t-s,r|=this[--a]>>(s+=this.DB-t)):(r=this[a]>>(s-=t)&n,s<=0&&(s+=this.DB,--a)),r>0&&(i=!0),i&&(o+=C(r));return i?o:"0"},_.prototype.negate=function(){var e=E();return _.ZERO.subTo(this,e),e},_.prototype.abs=function(){return this.s<0?this.negate():this},_.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},_.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+F(this[this.t-1]^this.s&this.DM)},_.prototype.mod=function(e){var t=E();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(_.ZERO)>0&&e.subTo(t,t),t},_.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new P(t):new N(t),this.exp(e,r)},_.ZERO=I(0),_.ONE=I(1),M.prototype.convert=B,M.prototype.revert=B,M.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},M.prototype.sqrTo=function(e,t){e.squareTo(t)},H.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=E();return e.copyTo(t),this.reduce(t),t},H.prototype.revert=function(e){return e},H.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},H.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},H.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var q,W,V,K=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],J=(1<<26)/K[K.length-1];function z(){this.i=0,this.j=0,this.S=new Array}function $(){!function(e){W[V++]^=255&e,W[V++]^=e>>8&255,W[V++]^=e>>16&255,W[V++]^=e>>24&255,V>=256&&(V-=256)}((new Date).getTime())}if(_.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},_.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=I(r),i=E(),o=E(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(r+o.intValue()).toString(e).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(e)+a},_.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,o=0,a=0,s=0;s<e.length;++s){var c=T(e,s);c<0?"-"==e.charAt(s)&&0==this.signum()&&(i=!0):(a=t*a+c,++o>=r&&(this.dMultiply(n),this.dAddOffset(a,0),o=0,a=0))}o>0&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(a,0)),i&&_.ZERO.subTo(this,this)},_.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(_.ONE.shiftLeft(e-1),R,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(_.ONE.shiftLeft(e-1),this);else{var n=new Array,i=7&e;n.length=1+(e>>3),t.nextBytes(n),i>0?n[0]&=(1<<i)-1:n[0]=0,this.fromString(n,256)}},_.prototype.bitwiseTo=function(e,t,r){var n,i,o=Math.min(e.t,this.t);for(n=0;n<o;++n)r[n]=t(this[n],e[n]);if(e.t<this.t){for(i=e.s&this.DM,n=o;n<this.t;++n)r[n]=t(this[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n<e.t;++n)r[n]=t(i,e[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},_.prototype.changeBit=function(e,t){var r=_.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},_.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]+e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e[r],t[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},_.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},_.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},_.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,e[i],r,i,0,this.t);for(n=Math.min(e.t,t);i<n;++i)this.am(0,e[i],r,i,0,t-i);r.clamp()},_.prototype.multiplyUpperTo=function(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r[this.t+n-t]=this.am(t-n,e[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)},_.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(0==t)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r},_.prototype.millerRabin=function(e){var t=this.subtract(_.ONE),r=t.getLowestSetBit();if(r<=0)return!1;var n=t.shiftRight(r);(e=e+1>>1)>K.length&&(e=K.length);for(var i=E(),o=0;o<e;++o){i.fromInt(K[Math.floor(Math.random()*K.length)]);var a=i.modPow(n,this);if(0!=a.compareTo(_.ONE)&&0!=a.compareTo(t)){for(var s=1;s++<r&&0!=a.compareTo(t);)if(0==(a=a.modPowInt(2,this)).compareTo(_.ONE))return!1;if(0!=a.compareTo(t))return!1}}return!0},_.prototype.clone=function(){var e=E();return this.copyTo(e),e},_.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},_.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},_.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},_.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},_.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n<this.DB&&(r=this[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this[e]&(1<<n)-1)<<8-n,r|=this[--e]>>(n+=this.DB-8)):(r=this[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),!!(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},_.prototype.equals=function(e){return 0==this.compareTo(e)},_.prototype.min=function(e){return this.compareTo(e)<0?this:e},_.prototype.max=function(e){return this.compareTo(e)>0?this:e},_.prototype.and=function(e){var t=E();return this.bitwiseTo(e,O,t),t},_.prototype.or=function(e){var t=E();return this.bitwiseTo(e,R,t),t},_.prototype.xor=function(e){var t=E();return this.bitwiseTo(e,j,t),t},_.prototype.andNot=function(e){var t=E();return this.bitwiseTo(e,L,t),t},_.prototype.not=function(){for(var e=E(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},_.prototype.shiftLeft=function(e){var t=E();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},_.prototype.shiftRight=function(e){var t=E();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},_.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+D(this[e]);return this.s<0?this.t*this.DB:-1},_.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=U(this[r]^t);return e},_.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:!!(this[t]&1<<e%this.DB)},_.prototype.setBit=function(e){return this.changeBit(e,R)},_.prototype.clearBit=function(e){return this.changeBit(e,L)},_.prototype.flipBit=function(e){return this.changeBit(e,j)},_.prototype.add=function(e){var t=E();return this.addTo(e,t),t},_.prototype.subtract=function(e){var t=E();return this.subTo(e,t),t},_.prototype.multiply=function(e){var t=E();return this.multiplyTo(e,t),t},_.prototype.divide=function(e){var t=E();return this.divRemTo(e,t,null),t},_.prototype.remainder=function(e){var t=E();return this.divRemTo(e,null,t),t},_.prototype.divideAndRemainder=function(e){var t=E(),r=E();return this.divRemTo(e,t,r),new Array(t,r)},_.prototype.modPow=function(e,t){var r,n,i=e.bitLength(),o=I(1);if(i<=0)return o;r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new P(t):t.isEven()?new H(t):new N(t);var a=new Array,s=3,c=r-1,u=(1<<r)-1;if(a[1]=n.convert(this),r>1){var l=E();for(n.sqrTo(a[1],l);s<=u;)a[s]=E(),n.mulTo(l,a[s-2],a[s]),s+=2}var d,p,f=e.t-1,h=!0,m=E();for(i=F(e[f])-1;f>=0;){for(i>=c?d=e[f]>>i-c&u:(d=(e[f]&(1<<i+1)-1)<<c-i,f>0&&(d|=e[f-1]>>this.DB+i-c)),s=r;!(1&d);)d>>=1,--s;if((i-=s)<0&&(i+=this.DB,--f),h)a[d].copyTo(o),h=!1;else{for(;s>1;)n.sqrTo(o,m),n.sqrTo(m,o),s-=2;s>0?n.sqrTo(o,m):(p=o,o=m,m=p),n.mulTo(m,a[d],o)}for(;f>=0&&!(e[f]&1<<i);)n.sqrTo(o,m),p=o,o=m,m=p,--i<0&&(i=this.DB-1,--f)}return n.revert(o)},_.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return _.ZERO;for(var r=e.clone(),n=this.clone(),i=I(1),o=I(0),a=I(0),s=I(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),t?(i.isEven()&&o.isEven()||(i.addTo(this,i),o.subTo(e,o)),i.rShiftTo(1,i)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);for(;n.isEven();)n.rShiftTo(1,n),t?(a.isEven()&&s.isEven()||(a.addTo(this,a),s.subTo(e,s)),a.rShiftTo(1,a)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);r.compareTo(n)>=0?(r.subTo(n,r),t&&i.subTo(a,i),o.subTo(s,o)):(n.subTo(r,n),t&&a.subTo(i,a),s.subTo(o,s))}return 0!=n.compareTo(_.ONE)?_.ZERO:s.compareTo(e)>=0?s.subtract(e):s.signum()<0?(s.addTo(e,s),s.signum()<0?s.add(e):s):s},_.prototype.pow=function(e){return this.exp(e,new M)},_.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},_.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r[0]<=K[K.length-1]){for(t=0;t<K.length;++t)if(r[0]==K[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<K.length;){for(var n=K[t],i=t+1;i<K.length&&n<J;)n*=K[i++];for(n=r.modInt(n);t<i;)if(n%K[t++]==0)return!1}return r.millerRabin(e)},_.prototype.square=function(){var e=E();return this.squareTo(e),e},z.prototype.init=function(e){var t,r,n;for(t=0;t<256;++t)this.S[t]=t;for(r=0,t=0;t<256;++t)r=r+this.S[t]+e[t%e.length]&255,n=this.S[t],this.S[t]=this.S[r],this.S[r]=n;this.i=0,this.j=0},z.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},null==W){var G;if(W=new Array,V=0,void 0!==m&&(void 0!==m.crypto||void 0!==m.msCrypto)){var X=m.crypto||m.msCrypto;if(X.getRandomValues){var Y=new Uint8Array(32);for(X.getRandomValues(Y),G=0;G<32;++G)W[V++]=Y[G]}else if("Netscape"==h.appName&&h.appVersion<"5"){var Q=m.crypto.random(32);for(G=0;G<Q.length;++G)W[V++]=255&Q.charCodeAt(G)}}for(;V<256;)G=Math.floor(65536*Math.random()),W[V++]=G>>>8,W[V++]=255&G;V=0,$()}function Z(){if(null==q){for($(),(q=new z).init(W),V=0;V<W.length;++V)W[V]=0;V=0}return q.next()}function ee(){}function te(e,t){return new _(e,t)}function re(e,t,r){for(var n="",i=0;n.length<t;)n+=r(String.fromCharCode.apply(String,e.concat([(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return n}function ne(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function ie(e,t){this.x=t,this.q=e}function oe(e,t,r,n){this.curve=e,this.x=t,this.y=r,this.z=null==n?_.ONE:n,this.zinv=null}function ae(e,t,r){this.q=e,this.a=this.fromBigInteger(t),this.b=this.fromBigInteger(r),this.infinity=new oe(this,null,null)}ee.prototype.nextBytes=function(e){var t;for(t=0;t<e.length;++t)e[t]=Z()},ne.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},ne.prototype.setPublic=function(e,t){if(this.isPublic=!0,this.isPrivate=!1,"string"!=typeof e)this.n=e,this.e=t;else{if(!(null!=e&&null!=t&&e.length>0&&t.length>0))throw"Invalid RSA public key";this.n=te(e,16),this.e=parseInt(t,16)}},ne.prototype.encrypt=function(e){var t=function(e,t){if(t<e.length+11)throw"Message too long for RSA";for(var r=new Array,n=e.length-1;n>=0&&t>0;){var i=e.charCodeAt(n--);i<128?r[--t]=i:i>127&&i<2048?(r[--t]=63&i|128,r[--t]=i>>6|192):(r[--t]=63&i|128,r[--t]=i>>6&63|128,r[--t]=i>>12|224)}r[--t]=0;for(var o=new ee,a=new Array;t>2;){for(a[0]=0;0==a[0];)o.nextBytes(a);r[--t]=a[0]}return r[--t]=2,r[--t]=0,new _(r)}(e,this.n.bitLength()+7>>3);if(null==t)return null;var r=this.doPublic(t);if(null==r)return null;var n=r.toString(16);return 1&n.length?"0"+n:n},ne.prototype.encryptOAEP=function(e,t,r){var n=function(e,t,r,n){var i=ce.crypto.MessageDigest,o=ce.crypto.Util,a=null;if(r||(r="sha1"),"string"==typeof r&&(a=i.getCanonicalAlgName(r),n=i.getHashLength(a),r=function(e){return _e(o.hashHex(Ee(e),a))}),e.length+2*n+2>t)throw"Message too long for RSA";var s,c="";for(s=0;s<t-e.length-2*n-2;s+=1)c+="\0";var u=r("")+c+""+e,l=new Array(n);(new ee).nextBytes(l);var d=re(l,u.length,r),p=[];for(s=0;s<u.length;s+=1)p[s]=u.charCodeAt(s)^d.charCodeAt(s);var f=re(p,l.length,r),h=[0];for(s=0;s<l.length;s+=1)h[s+1]=l[s]^f.charCodeAt(s);return new _(h.concat(p))}(e,this.n.bitLength()+7>>3,t,r);if(null==n)return null;var i=this.doPublic(n);if(null==i)return null;var o=i.toString(16);return 1&o.length?"0"+o:o},ne.prototype.type="RSA",ie.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.x.equals(e.x)},ie.prototype.toBigInteger=function(){return this.x},ie.prototype.negate=function(){return new ie(this.q,this.x.negate().mod(this.q))},ie.prototype.add=function(e){return new ie(this.q,this.x.add(e.toBigInteger()).mod(this.q))},ie.prototype.subtract=function(e){return new ie(this.q,this.x.subtract(e.toBigInteger()).mod(this.q))},ie.prototype.multiply=function(e){return new ie(this.q,this.x.multiply(e.toBigInteger()).mod(this.q))},ie.prototype.square=function(){return new ie(this.q,this.x.square().mod(this.q))},ie.prototype.divide=function(e){return new ie(this.q,this.x.multiply(e.toBigInteger().modInverse(this.q)).mod(this.q))},oe.prototype.getX=function(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))},oe.prototype.getY=function(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))},oe.prototype.equals=function(e){return e==this||(this.isInfinity()?e.isInfinity():e.isInfinity()?this.isInfinity():!!e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(_.ZERO)&&e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(_.ZERO))},oe.prototype.isInfinity=function(){return null==this.x&&null==this.y||this.z.equals(_.ZERO)&&!this.y.toBigInteger().equals(_.ZERO)},oe.prototype.negate=function(){return new oe(this.curve,this.x,this.y.negate(),this.z)},oe.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),r=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q);if(_.ZERO.equals(r))return _.ZERO.equals(t)?this.twice():this.curve.getInfinity();var n=new _("3"),i=this.x.toBigInteger(),o=this.y.toBigInteger(),a=(e.x.toBigInteger(),e.y.toBigInteger(),r.square()),s=a.multiply(r),c=i.multiply(a),u=t.square().multiply(this.z),l=u.subtract(c.shiftLeft(1)).multiply(e.z).subtract(s).multiply(r).mod(this.curve.q),d=c.multiply(n).multiply(t).subtract(o.multiply(s)).subtract(u.multiply(t)).multiply(e.z).add(t.multiply(s)).mod(this.curve.q),p=s.multiply(this.z).multiply(e.z).mod(this.curve.q);return new oe(this.curve,this.curve.fromBigInteger(l),this.curve.fromBigInteger(d),p)},oe.prototype.twice=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var e=new _("3"),t=this.x.toBigInteger(),r=this.y.toBigInteger(),n=r.multiply(this.z),i=n.multiply(r).mod(this.curve.q),o=this.curve.a.toBigInteger(),a=t.square().multiply(e);_.ZERO.equals(o)||(a=a.add(this.z.square().multiply(o)));var s=(a=a.mod(this.curve.q)).square().subtract(t.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(n).mod(this.curve.q),c=a.multiply(e).multiply(t).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(a.square().multiply(a)).mod(this.curve.q),u=n.square().multiply(n).shiftLeft(3).mod(this.curve.q);return new oe(this.curve,this.curve.fromBigInteger(s),this.curve.fromBigInteger(c),u)},oe.prototype.multiply=function(e){if(this.isInfinity())return this;if(0==e.signum())return this.curve.getInfinity();var t,r=e,n=r.multiply(new _("3")),i=this.negate(),o=this,a=this.curve.q.subtract(e),s=a.multiply(new _("3")),c=new oe(this.curve,this.x,this.y),u=c.negate();for(t=n.bitLength()-2;t>0;--t){o=o.twice();var l=n.testBit(t);l!=r.testBit(t)&&(o=o.add(l?this:i))}for(t=s.bitLength()-2;t>0;--t){c=c.twice();var d=s.testBit(t);d!=a.testBit(t)&&(c=c.add(d?c:u))}return o},oe.prototype.multiplyTwo=function(e,t,r){var n;n=e.bitLength()>r.bitLength()?e.bitLength()-1:r.bitLength()-1;for(var i=this.curve.getInfinity(),o=this.add(t);n>=0;)i=i.twice(),e.testBit(n)?i=r.testBit(n)?i.add(o):i.add(this):r.testBit(n)&&(i=i.add(t)),--n;return i},ae.prototype.getQ=function(){return this.q},ae.prototype.getA=function(){return this.a},ae.prototype.getB=function(){return this.b},ae.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.a.equals(e.a)&&this.b.equals(e.b)},ae.prototype.getInfinity=function(){return this.infinity},ae.prototype.fromBigInteger=function(e){return new ie(this.q,e)},ae.prototype.decodePointHex=function(e){switch(parseInt(e.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:default:return null;case 4:case 6:case 7:var t=(e.length-2)/2,r=e.substr(2,t),n=e.substr(t+2,t);return new oe(this,this.fromBigInteger(new _(r,16)),this.fromBigInteger(new _(n,16)))}},ie.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)},oe.prototype.getEncoded=function(e){var t=function(e,t){var r=e.toByteArrayUnsigned();if(t<r.length)r=r.slice(r.length-t);else for(;t>r.length;)r.unshift(0);return r},r=this.getX().toBigInteger(),n=this.getY().toBigInteger(),i=t(r,32);return e?n.isEven()?i.unshift(2):i.unshift(3):(i.unshift(4),i=i.concat(t(n,32))),i},oe.decodeFrom=function(e,t){t[0];var r=t.length-1,n=t.slice(1,1+r/2),i=t.slice(1+r/2,1+r);n.unshift(0),i.unshift(0);var o=new _(n),a=new _(i);return new oe(e,e.fromBigInteger(o),e.fromBigInteger(a))},oe.decodeFromHex=function(e,t){t.substr(0,2);var r=t.length-2,n=t.substr(2,r/2),i=t.substr(2+r/2,r/2),o=new _(n,16),a=new _(i,16);return new oe(e,e.fromBigInteger(o),e.fromBigInteger(a))},oe.prototype.add2D=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;if(this.x.equals(e.x))return this.y.equals(e.y)?this.twice():this.curve.getInfinity();var t=e.x.subtract(this.x),r=e.y.subtract(this.y).divide(t),n=r.square().subtract(this.x).subtract(e.x),i=r.multiply(this.x.subtract(n)).subtract(this.y);return new oe(this.curve,n,i)},oe.prototype.twice2D=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var e=this.curve.fromBigInteger(_.valueOf(2)),t=this.curve.fromBigInteger(_.valueOf(3)),r=this.x.square().multiply(t).add(this.curve.a).divide(this.y.multiply(e)),n=r.square().subtract(this.x.multiply(e)),i=r.multiply(this.x.subtract(n)).subtract(this.y);return new oe(this.curve,n,i)},oe.prototype.multiply2D=function(e){if(this.isInfinity())return this;if(0==e.signum())return this.curve.getInfinity();var t,r=e,n=r.multiply(new _("3")),i=this.negate(),o=this;for(t=n.bitLength()-2;t>0;--t){o=o.twice();var a=n.testBit(t);a!=r.testBit(t)&&(o=o.add2D(a?this:i))}return o},oe.prototype.isOnCurve=function(){var e=this.getX().toBigInteger(),t=this.getY().toBigInteger(),r=this.curve.getA().toBigInteger(),n=this.curve.getB().toBigInteger(),i=this.curve.getQ(),o=t.multiply(t).mod(i),a=e.multiply(e).multiply(e).add(r.multiply(e)).add(n).mod(i);return o.equals(a)},oe.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"},oe.prototype.validate=function(){var e=this.curve.getQ();if(this.isInfinity())throw new Error("Point is at infinity.");var t=this.getX().toBigInteger(),r=this.getY().toBigInteger();if(t.compareTo(_.ONE)<0||t.compareTo(e.subtract(_.ONE))>0)throw new Error("x coordinate out of bounds");if(r.compareTo(_.ONE)<0||r.compareTo(e.subtract(_.ONE))>0)throw new Error("y coordinate out of bounds");if(!this.isOnCurve())throw new Error("Point is not on the curve.");if(this.multiply(e).isInfinity())throw new Error("Point is not a scalar multiple of G.");return!0};var se=function(){var e=new RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))',"g"),t=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),r={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function n(e,t,n){return t?r[t]:String.fromCharCode(parseInt(n,16))}var i=new String(""),o=Object.hasOwnProperty;return function(r,a){var s,c,u=r.match(e),l=u[0],d=!1;"{"===l?s={}:"["===l?s=[]:(s=[],d=!0);for(var p=[s],h=1-d,m=u.length;h<m;++h){var g;switch((l=u[h]).charCodeAt(0)){default:(g=p[0])[c||g.length]=+l,c=void 0;break;case 34:if(-1!==(l=l.substring(1,l.length-1)).indexOf("\\")&&(l=l.replace(t,n)),g=p[0],!c){if(!(g instanceof Array)){c=l||i;break}c=g.length}g[c]=l,c=void 0;break;case 91:g=p[0],p.unshift(g[c||g.length]=[]),c=void 0;break;case 93:case 125:p.shift();break;case 102:(g=p[0])[c||g.length]=!1,c=void 0;break;case 110:(g=p[0])[c||g.length]=null,c=void 0;break;case 116:(g=p[0])[c||g.length]=!0,c=void 0;break;case 123:g=p[0],p.unshift(g[c||g.length]={}),c=void 0}}if(d){if(1!==p.length)throw new Error;s=s[0]}else if(p.length)throw new Error;return a&&(s=function e(t,r){var n=t[r];if(n&&"object"===(void 0===n?"undefined":f(n))){var i=null;for(var s in n)if(o.call(n,s)&&n!==t){var c=e(n,s);void 0!==c?n[s]=c:(i||(i=[]),i.push(s))}if(i)for(var u=i.length;--u>=0;)delete n[i[u]]}return a.call(t,r,n)}({"":s},"")),s}}();void 0!==ce&&ce||(t.KJUR=ce={}),void 0!==ce.asn1&&ce.asn1||(ce.asn1={}),ce.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var r=t.substr(1).length;r%2==1?r+=1:t.match(/^[0-7]/)||(r+=2);for(var n="",i=0;i<r;i++)n+="f";t=new _(n,16).xor(e).add(_.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return Ce(e,t)},this.newObject=function(e){var t=ce.asn1,r=t.ASN1Object,n=t.DERBoolean,i=t.DERInteger,o=t.DERBitString,a=t.DEROctetString,s=t.DERNull,c=t.DERObjectIdentifier,u=t.DEREnumerated,l=t.DERUTF8String,d=t.DERNumericString,p=t.DERPrintableString,f=t.DERTeletexString,h=t.DERIA5String,m=t.DERUTCTime,g=t.DERGeneralizedTime,v=t.DERVisibleString,y=t.DERBMPString,b=t.DERSequence,w=t.DERSet,x=t.DERTaggedObject,_=t.ASN1Util.newObject;if(e instanceof t.ASN1Object)return e;var E=Object.keys(e);if(1!=E.length)throw new Error("key of param shall be only one.");var S=E[0];if(-1==":asn1:bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:visstr:bmpstr:seq:set:tag:".indexOf(":"+S+":"))throw new Error("undefined key: "+S);if("bool"==S)return new n(e[S]);if("int"==S)return new i(e[S]);if("bitstr"==S)return new o(e[S]);if("octstr"==S)return new a(e[S]);if("null"==S)return new s(e[S]);if("oid"==S)return new c(e[S]);if("enum"==S)return new u(e[S]);if("utf8str"==S)return new l(e[S]);if("numstr"==S)return new d(e[S]);if("prnstr"==S)return new p(e[S]);if("telstr"==S)return new f(e[S]);if("ia5str"==S)return new h(e[S]);if("utctime"==S)return new m(e[S]);if("gentime"==S)return new g(e[S]);if("visstr"==S)return new v(e[S]);if("bmpstr"==S)return new y(e[S]);if("asn1"==S)return new r(e[S]);if("seq"==S){for(var A=e[S],k=[],C=0;C<A.length;C++){var T=_(A[C]);k.push(T)}return new b({array:k})}if("set"==S){for(A=e[S],k=[],C=0;C<A.length;C++)T=_(A[C]),k.push(T);return new w({array:k})}if("tag"==S){var I=e[S];if("[object Array]"===Object.prototype.toString.call(I)&&3==I.length){var F=_(I[2]);return new x({tag:I[0],explicit:I[1],obj:F})}return new x(I)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},ce.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",r=parseInt(e.substr(0,2),16),n=(t=Math.floor(r/40)+"."+r%40,""),i=2;i<e.length;i+=2){var o=("00000000"+parseInt(e.substr(i,2),16).toString(2)).slice(-8);n+=o.substr(1,7),"0"==o.substr(0,1)&&(t=t+"."+new _(n,2).toString(10),n="")}return t},ce.asn1.ASN1Util.oidIntToHex=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},r=function(e){var r="",n=new _(e,10).toString(2),i=7-n.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";for(n=o+n,a=0;a<n.length-1;a+=7){var s=n.substr(a,7);a!=n.length-7&&(s="1"+s),r+=t(parseInt(s,2))}return r};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var n="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);n+=t(o),i.splice(0,2);for(var a=0;a<i.length;a++)n+=r(i[a]);return n},ce.asn1.ASN1Object=function(e){this.params=null,this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw new Error("this.hV is null or undefined");if(this.hV.length%2==1)throw new Error("value hex must be even length: n=0,v="+this.hV);var e=this.hV.length/2,t=e.toString(16);if(t.length%2==1&&(t="0"+t),e<128)return t;var r=t.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);return(128+r).toString(16)+t},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""},this.setByParam=function(e){this.params=e},null!=e&&null!=e.tlv&&(this.hTLV=e.tlv,this.isModified=!1)},ce.asn1.DERAbstractString=function(e){ce.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=we(this.s).toLowerCase()},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?this.setString(e):void 0!==e.str?this.setString(e.str):void 0!==e.hex&&this.setStringHex(e.hex))},He(ce.asn1.DERAbstractString,ce.asn1.ASN1Object),ce.asn1.DERAbstractTime=function(e){ce.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){var t=e.getTime()+6e4*e.getTimezoneOffset();return new Date(t)},this.formatDate=function(e,t,r){var n=this.zeroPadding,i=this.localDateToUTC(e),o=String(i.getFullYear());"utc"==t&&(o=o.substr(2,2));var a=o+n(String(i.getMonth()+1),2)+n(String(i.getDate()),2)+n(String(i.getHours()),2)+n(String(i.getMinutes()),2)+n(String(i.getSeconds()),2);if(!0===r){var s=i.getMilliseconds();if(0!=s){var c=n(String(s),3);a=a+"."+(c=c.replace(/[0]+$/,""))}}return a+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=me(e)},this.setByDateValue=function(e,t,r,n,i,o){var a=new Date(Date.UTC(e,t-1,r,n,i,o,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},He(ce.asn1.DERAbstractTime,ce.asn1.ASN1Object),ce.asn1.DERAbstractStructured=function(e){ce.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,void 0!==e&&void 0!==e.array&&(this.asn1Array=e.array)},He(ce.asn1.DERAbstractStructured,ce.asn1.ASN1Object),ce.asn1.DERBoolean=function(e){ce.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV=0==e?"010100":"0101ff"},He(ce.asn1.DERBoolean,ce.asn1.ASN1Object),ce.asn1.DERInteger=function(e){ce.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=ce.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new _(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.bigint?this.setByBigInteger(e.bigint):void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},He(ce.asn1.DERInteger,ce.asn1.ASN1Object),ce.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=ce.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}ce.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7<e)throw"unused bits shall be from 0 to 7: u = "+e;var r="0"+e;this.hTLV=null,this.isModified=!0,this.hV=r+t},this.setByBinaryString=function(e){var t=8-(e=e.replace(/0+$/,"")).length%8;8==t&&(t=0);for(var r=0;r<=t;r++)e+="0";var n="";for(r=0;r<e.length-1;r+=8){var i=e.substr(r,8),o=parseInt(i,2).toString(16);1==o.length&&(o="0"+o),n+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+t+n},this.setByBooleanArray=function(e){for(var t="",r=0;r<e.length;r++)1==e[r]?t+="1":t+="0";this.setByBinaryString(t)},this.newFalseArray=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=!1;return t},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):void 0!==e.hex?this.setHexValueIncludingUnusedBits(e.hex):void 0!==e.bin?this.setByBinaryString(e.bin):void 0!==e.array&&this.setByBooleanArray(e.array))},He(ce.asn1.DERBitString,ce.asn1.ASN1Object),ce.asn1.DEROctetString=function(e){if(void 0!==e&&void 0!==e.obj){var t=ce.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}ce.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},He(ce.asn1.DEROctetString,ce.asn1.DERAbstractString),ce.asn1.DERNull=function(){ce.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},He(ce.asn1.DERNull,ce.asn1.ASN1Object),ce.asn1.DERObjectIdentifier=function(e){ce.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueOidString=function(e){var t=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},r=function(e){var r="",n=parseInt(e,10).toString(2),i=7-n.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";for(n=o+n,a=0;a<n.length-1;a+=7){var s=n.substr(a,7);a!=n.length-7&&(s="1"+s),r+=t(parseInt(s,2))}return r};try{if(!e.match(/^[0-9.]+$/))return null;var n="",i=e.split("."),o=40*parseInt(i[0],10)+parseInt(i[1],10);n+=t(o),i.splice(0,2);for(var a=0;a<i.length;a++)n+=r(i[a]);return n}catch(e){return null}}(e);if(null==t)throw new Error("malformed oid string: "+e);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueName=function(e){var t=ce.asn1.x509.OID.name2oid(e);if(""===t)throw new Error("DERObjectIdentifier oidName undefined: "+e);this.setValueOidString(t)},this.setValueNameOrOid=function(e){e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e)},this.getFreshValueHex=function(){return this.hV},this.setByParam=function(e){"string"==typeof e?this.setValueNameOrOid(e):void 0!==e.oid?this.setValueNameOrOid(e.oid):void 0!==e.name?this.setValueNameOrOid(e.name):void 0!==e.hex&&this.setValueHex(e.hex)},void 0!==e&&this.setByParam(e)},He(ce.asn1.DERObjectIdentifier,ce.asn1.ASN1Object),ce.asn1.DEREnumerated=function(e){ce.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=ce.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new _(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},He(ce.asn1.DEREnumerated,ce.asn1.ASN1Object),ce.asn1.DERUTF8String=function(e){ce.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},He(ce.asn1.DERUTF8String,ce.asn1.DERAbstractString),ce.asn1.DERNumericString=function(e){ce.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},He(ce.asn1.DERNumericString,ce.asn1.DERAbstractString),ce.asn1.DERPrintableString=function(e){ce.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},He(ce.asn1.DERPrintableString,ce.asn1.DERAbstractString),ce.asn1.DERTeletexString=function(e){ce.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},He(ce.asn1.DERTeletexString,ce.asn1.DERAbstractString),ce.asn1.DERIA5String=function(e){ce.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},He(ce.asn1.DERIA5String,ce.asn1.DERAbstractString),ce.asn1.DERVisibleString=function(e){ce.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="1a"},He(ce.asn1.DERVisibleString,ce.asn1.DERAbstractString),ce.asn1.DERBMPString=function(e){ce.asn1.DERBMPString.superclass.constructor.call(this,e),this.hT="1e"},He(ce.asn1.DERBMPString,ce.asn1.DERAbstractString),ce.asn1.DERUTCTime=function(e){ce.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=me(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=me(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{12}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date))},He(ce.asn1.DERUTCTime,ce.asn1.DERAbstractTime),ce.asn1.DERGeneralizedTime=function(e){ce.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=me(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=me(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{14}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date),!0===e.millis&&(this.withMillis=!0))},He(ce.asn1.DERGeneralizedTime,ce.asn1.DERAbstractTime),ce.asn1.DERSequence=function(e){ce.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var e="",t=0;t<this.asn1Array.length;t++)e+=this.asn1Array[t].getEncodedHex();return this.hV=e,this.hV}},He(ce.asn1.DERSequence,ce.asn1.DERAbstractStructured),ce.asn1.DERSet=function(e){ce.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];e.push(r.getEncodedHex())}return 1==this.sortFlag&&e.sort(),this.hV=e.join(""),this.hV},void 0!==e&&void 0!==e.sortflag&&0==e.sortflag&&(this.sortFlag=!1)},He(ce.asn1.DERSet,ce.asn1.DERAbstractStructured),ce.asn1.DERTaggedObject=function(e){ce.asn1.DERTaggedObject.superclass.constructor.call(this);var t=ce.asn1;this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,r){this.hT=t,this.isExplicit=e,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},this.setByParam=function(e){null!=e.tag&&(this.hT=e.tag),null!=e.explicit&&(this.isExplicit=e.explicit),null!=e.tage&&(this.hT=e.tage,this.isExplicit=!0),null!=e.tagi&&(this.hT=e.tagi,this.isExplicit=!1),null!=e.obj&&(e.obj instanceof t.ASN1Object?(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)):"object"==f(e.obj)&&(this.asn1Object=t.ASN1Util.newObject(e.obj),this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},null!=e&&this.setByParam(e)},He(ce.asn1.DERTaggedObject,ce.asn1.ASN1Object);var ce,ue,le,de=new function(){};function pe(e){for(var t=new Array,r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}function fe(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}function he(e){for(var t="",r=0;r<e.length;r++){var n=e[r].toString(16);1==n.length&&(n="0"+n),t+=n}return t}function me(e){return he(pe(e))}function ge(e){return(e=(e=e.replace(/\=/g,"")).replace(/\+/g,"-")).replace(/\//g,"_")}function ve(e){return e.length%4==2?e+="==":e.length%4==3&&(e+="="),(e=e.replace(/-/g,"+")).replace(/_/g,"/")}function ye(e){return e.length%2==1&&(e="0"+e),ge(b(e))}function be(e){return w(ve(e))}function we(e){return Pe(De(e))}function xe(e){return decodeURIComponent(Ne(e))}function _e(e){for(var t="",r=0;r<e.length-1;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t}function Ee(e){for(var t="",r=0;r<e.length;r++)t+=("0"+e.charCodeAt(r).toString(16)).slice(-2);return t}function Se(e){return b(e)}function Ae(e){return Se(e).replace(/(.{64})/g,"$1\r\n").replace(/\r\n$/,"")}function ke(e){return w(e.replace(/[^0-9A-Za-z\/+=]*/g,""))}function Ce(e,t){return"-----BEGIN "+t+"-----\r\n"+Ae(e)+"\r\n-----END "+t+"-----\r\n"}function Te(e,t){if(-1==e.indexOf("-----BEGIN "))throw"can't find PEM header: "+t;return ke(e=void 0!==t?(e=e.replace(new RegExp("^[^]*-----BEGIN "+t+"-----"),"")).replace(new RegExp("-----END "+t+"-----[^]*$"),""):(e=e.replace(/^[^]*-----BEGIN [^-]+-----/,"")).replace(/-----END [^-]+-----[^]*$/,""))}function Ie(e){var t,r,n,i,o,a,s,c,u,l,d;if(d=e.match(/^(\d{2}|\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(|\.\d+)Z$/))return c=d[1],t=parseInt(c),2===c.length&&(50<=t&&t<100?t=1900+t:0<=t&&t<50&&(t=2e3+t)),r=parseInt(d[2])-1,n=parseInt(d[3]),i=parseInt(d[4]),o=parseInt(d[5]),a=parseInt(d[6]),s=0,""!==(u=d[7])&&(l=(u.substr(1)+"00").substr(0,3),s=parseInt(l)),Date.UTC(t,r,n,i,o,a,s);throw"unsupported zulu format: "+e}function Fe(e){return~~(Ie(e)/1e3)}function Pe(e){return e.replace(/%/g,"")}function Ne(e){return e.replace(/(..)/g,"%$1")}function Oe(e){var t="malformed IPv6 address";if(!e.match(/^[0-9A-Fa-f:]+$/))throw t;var r=(e=e.toLowerCase()).split(":").length-1;if(r<2)throw t;var n=":".repeat(7-r+2),i=(e=e.replace("::",n)).split(":");if(8!=i.length)throw t;for(var o=0;o<8;o++)i[o]=("0000"+i[o]).slice(-4);return i.join("")}function Re(e){if(!e.match(/^[0-9A-Fa-f]{32}$/))throw"malformed IPv6 address octet";for(var t=(e=e.toLowerCase()).match(/.{1,4}/g),r=0;r<8;r++)t[r]=t[r].replace(/^0+/,""),""==t[r]&&(t[r]="0");var n=(e=":"+t.join(":")+":").match(/:(0:){2,}/g);if(null===n)return e.slice(1,-1);var i="";for(r=0;r<n.length;r++)n[r].length>i.length&&(i=n[r]);return(e=e.replace(i,"::")).slice(1,-1)}function je(e){var t="malformed hex value";if(!e.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))throw t;if(8!=e.length)return 32==e.length?Re(e):e;try{return parseInt(e.substr(0,2),16)+"."+parseInt(e.substr(2,2),16)+"."+parseInt(e.substr(4,2),16)+"."+parseInt(e.substr(6,2),16)}catch(e){throw t}}function Le(e){return e.match(/.{4}/g).map(function(e){var t=parseInt(e.substr(0,2),16),r=parseInt(e.substr(2),16);if(0==t&r<128)return String.fromCharCode(r);if(t<8){var n=128|63&r;return xe((192|(7&t)<<3|(192&r)>>6).toString(16)+n.toString(16))}n=128|(15&t)<<2|(192&r)>>6;var i=128|63&r;return xe((224|(240&t)>>4).toString(16)+n.toString(16)+i.toString(16))}).join("")}function De(e){for(var t=encodeURIComponent(e),r="",n=0;n<t.length;n++)"%"==t[n]?(r+=t.substr(n,3),n+=2):r=r+"%"+me(t[n]);return r}function Ue(e){return!(e.length%2!=0||!e.match(/^[0-9a-f]+$/)&&!e.match(/^[0-9A-F]+$/))}function Me(e){return e.length%2==1?"0"+e:e.substr(0,1)>"7"?"00"+e:e}de.getLblen=function(e,t){if("8"!=e.substr(t+2,1))return 1;var r=parseInt(e.substr(t+3,1));return 0==r?-1:0<r&&r<10?r+1:-2},de.getL=function(e,t){var r=de.getLblen(e,t);return r<1?"":e.substr(t+2,2*r)},de.getVblen=function(e,t){var r;return""==(r=de.getL(e,t))?-1:("8"===r.substr(0,1)?new _(r.substr(2),16):new _(r,16)).intValue()},de.getVidx=function(e,t){var r=de.getLblen(e,t);return r<0?r:t+2*(r+1)},de.getV=function(e,t){var r=de.getVidx(e,t),n=de.getVblen(e,t);return e.substr(r,2*n)},de.getTLV=function(e,t){return e.substr(t,2)+de.getL(e,t)+de.getV(e,t)},de.getTLVblen=function(e,t){return 2+2*de.getLblen(e,t)+2*de.getVblen(e,t)},de.getNextSiblingIdx=function(e,t){return de.getVidx(e,t)+2*de.getVblen(e,t)},de.getChildIdx=function(e,t){var r,n,i,o=de,a=[];r=o.getVidx(e,t),n=2*o.getVblen(e,t),"03"==e.substr(t,2)&&(r+=2,n-=2),i=0;for(var s=r;i<=n;){var c=o.getTLVblen(e,s);if((i+=c)<=n&&a.push(s),s+=c,i>=n)break}return a},de.getNthChildIdx=function(e,t,r){return de.getChildIdx(e,t)[r]},de.getIdxbyList=function(e,t,r,n){var i,o,a=de;return 0==r.length?void 0!==n&&e.substr(t,2)!==n?-1:t:(i=r.shift())>=(o=a.getChildIdx(e,t)).length?-1:a.getIdxbyList(e,o[i],r,n)},de.getIdxbyListEx=function(e,t,r,n){var i,o,a=de;if(0==r.length)return void 0!==n&&e.substr(t,2)!==n?-1:t;i=r.shift(),o=a.getChildIdx(e,t);for(var s=0,c=0;c<o.length;c++){var u=e.substr(o[c],2);if("number"==typeof i&&!a.isContextTag(u)&&s==i||"string"==typeof i&&a.isContextTag(u,i))return a.getIdxbyListEx(e,o[c],r,n);a.isContextTag(u)||s++}return-1},de.getTLVbyList=function(e,t,r,n){var i=de,o=i.getIdxbyList(e,t,r,n);return-1==o||o>=e.length?null:i.getTLV(e,o)},de.getTLVbyListEx=function(e,t,r,n){var i=de,o=i.getIdxbyListEx(e,t,r,n);return-1==o?null:i.getTLV(e,o)},de.getVbyList=function(e,t,r,n,i){var o,a,s=de;return-1==(o=s.getIdxbyList(e,t,r,n))||o>=e.length?null:(a=s.getV(e,o),!0===i&&(a=a.substr(2)),a)},de.getVbyListEx=function(e,t,r,n,i){var o,a,s=de;return-1==(o=s.getIdxbyListEx(e,t,r,n))?null:(a=s.getV(e,o),"03"==e.substr(o,2)&&!1!==i&&(a=a.substr(2)),a)},de.getInt=function(e,t,r){null==r&&(r=-1);try{var n=e.substr(t,2);if("02"!=n&&"03"!=n)return r;var i=de.getV(e,t);return"02"==n?parseInt(i,16):function(e){try{var t=e.substr(0,2);if("00"==t)return parseInt(e.substr(2),16);var r=parseInt(t,16),n=e.substr(2),i=parseInt(n,16).toString(2);return"0"==i&&(i="00000000"),i=i.slice(0,0-r),parseInt(i,2)}catch(e){return-1}}(i)}catch(e){return r}},de.getOID=function(e,t,r){null==r&&(r=null);try{return"06"!=e.substr(t,2)?r:function(e){if(!Ue(e))return null;try{var t=[],r=e.substr(0,2),n=parseInt(r,16);t[0]=new String(Math.floor(n/40)),t[1]=new String(n%40);for(var i=e.substr(2),o=[],a=0;a<i.length/2;a++)o.push(parseInt(i.substr(2*a,2),16));var s=[],c="";for(a=0;a<o.length;a++)128&o[a]?c+=Be((127&o[a]).toString(2),7):(c+=Be((127&o[a]).toString(2),7),s.push(new String(parseInt(c,2))),c="");var u=t.join(".");return s.length>0&&(u=u+"."+s.join(".")),u}catch(e){return null}}(de.getV(e,t))}catch(e){return r}},de.getOIDName=function(e,t,r){null==r&&(r=null);try{var n=de.getOID(e,t,r);if(n==r)return r;var i=ce.asn1.x509.OID.oid2name(n);return""==i?n:i}catch(e){return r}},de.getString=function(e,t,r){null==r&&(r=null);try{return _e(de.getV(e,t))}catch(e){return r}},de.hextooidstr=function(e){var t=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},r=[],n=e.substr(0,2),i=parseInt(n,16);r[0]=new String(Math.floor(i/40)),r[1]=new String(i%40);for(var o=e.substr(2),a=[],s=0;s<o.length/2;s++)a.push(parseInt(o.substr(2*s,2),16));var c=[],u="";for(s=0;s<a.length;s++)128&a[s]?u+=t((127&a[s]).toString(2),7):(u+=t((127&a[s]).toString(2),7),c.push(new String(parseInt(u,2))),u="");var l=r.join(".");return c.length>0&&(l=l+"."+c.join(".")),l},de.dump=function(e,t,r,n){var i=de,o=i.getV,a=i.dump,s=i.getChildIdx,c=e;e instanceof ce.asn1.ASN1Object&&(c=e.getEncodedHex());var u=function(e,t){return e.length<=2*t?e:e.substr(0,t)+"..(total "+e.length/2+"bytes).."+e.substr(e.length-t,t)};void 0===t&&(t={ommit_long_octet:32}),void 0===r&&(r=0),void 0===n&&(n="");var l,d=t.ommit_long_octet;if("01"==(l=c.substr(r,2)))return"00"==(p=o(c,r))?n+"BOOLEAN FALSE\n":n+"BOOLEAN TRUE\n";if("02"==l)return n+"INTEGER "+u(p=o(c,r),d)+"\n";if("03"==l){var p=o(c,r);return i.isASN1HEX(p.substr(2))?(x=n+"BITSTRING, encapsulates\n")+a(p.substr(2),t,0,n+" "):n+"BITSTRING "+u(p,d)+"\n"}if("04"==l)return p=o(c,r),i.isASN1HEX(p)?(x=n+"OCTETSTRING, encapsulates\n")+a(p,t,0,n+" "):n+"OCTETSTRING "+u(p,d)+"\n";if("05"==l)return n+"NULL\n";if("06"==l){var f=o(c,r),h=ce.asn1.ASN1Util.oidHexToInt(f),m=ce.asn1.x509.OID.oid2name(h),g=h.replace(/\./g," ");return""!=m?n+"ObjectIdentifier "+m+" ("+g+")\n":n+"ObjectIdentifier ("+g+")\n"}if("0a"==l)return n+"ENUMERATED "+parseInt(o(c,r))+"\n";if("0c"==l)return n+"UTF8String '"+xe(o(c,r))+"'\n";if("13"==l)return n+"PrintableString '"+xe(o(c,r))+"'\n";if("14"==l)return n+"TeletexString '"+xe(o(c,r))+"'\n";if("16"==l)return n+"IA5String '"+xe(o(c,r))+"'\n";if("17"==l)return n+"UTCTime "+xe(o(c,r))+"\n";if("18"==l)return n+"GeneralizedTime "+xe(o(c,r))+"\n";if("1a"==l)return n+"VisualString '"+xe(o(c,r))+"'\n";if("1e"==l)return n+"BMPString '"+Le(o(c,r))+"'\n";if("30"==l){if("3000"==c.substr(r,4))return n+"SEQUENCE {}\n";x=n+"SEQUENCE\n";var v=t;if((2==(w=s(c,r)).length||3==w.length)&&"06"==c.substr(w[0],2)&&"04"==c.substr(w[w.length-1],2)){m=i.oidname(o(c,w[0]));var y=JSON.parse(JSON.stringify(t));y.x509ExtName=m,v=y}for(var b=0;b<w.length;b++)x+=a(c,v,w[b],n+" ");return x}if("31"==l){x=n+"SET\n";var w=s(c,r);for(b=0;b<w.length;b++)x+=a(c,t,w[b],n+" ");return x}if(128&(l=parseInt(l,16))){var x,_=31&l;if(32&l){for(x=n+"["+_+"]\n",w=s(c,r),b=0;b<w.length;b++)x+=a(c,t,w[b],n+" ");return x}return p=o(c,r),de.isASN1HEX(p)?(x=n+"["+_+"]\n")+a(p,t,0,n+" "):(("68747470"==p.substr(0,8)||"subjectAltName"===t.x509ExtName&&2==_)&&(p=xe(p)),n+"["+_+"] "+p+"\n")}return n+"UNKNOWN("+l+") "+o(c,r)+"\n"},de.isContextTag=function(e,t){var r,n;e=e.toLowerCase();try{r=parseInt(e,16)}catch(e){return-1}if(void 0===t)return 128==(192&r);try{return null!=t.match(/^\[[0-9]+\]$/)&&!((n=parseInt(t.substr(1,t.length-1),10))>31)&&128==(192&r)&&(31&r)==n}catch(e){return!1}},de.isASN1HEX=function(e){var t=de;if(e.length%2==1)return!1;var r=t.getVblen(e,0),n=e.substr(0,2),i=t.getL(e,0);return e.length-n.length-i.length==2*r},de.checkStrictDER=function(e,t,r,n,i){var o=de;if(void 0===r){if("string"!=typeof e)throw new Error("not hex string");if(e=e.toLowerCase(),!ce.lang.String.isHex(e))throw new Error("not hex string");r=e.length,i=(n=e.length/2)<128?1:Math.ceil(n.toString(16))+1}if(o.getL(e,t).length>2*i)throw new Error("L of TLV too long: idx="+t);var a=o.getVblen(e,t);if(a>n)throw new Error("value of L too long than hex: idx="+t);var s=o.getTLV(e,t),c=s.length-2-o.getL(e,t).length;if(c!==2*a)throw new Error("V string length and L's value not the same:"+c+"/"+2*a);if(0===t&&e.length!=s.length)throw new Error("total length and TLV length unmatch:"+e.length+"!="+s.length);var u=e.substr(t,2);if("02"===u){var l=o.getVidx(e,t);if("00"==e.substr(l,2)&&e.charCodeAt(l+2)<56)throw new Error("not least zeros for DER INTEGER")}if(32&parseInt(u,16)){for(var d=o.getVblen(e,t),p=0,f=o.getChildIdx(e,t),h=0;h<f.length;h++)p+=o.getTLV(e,f[h]).length,o.checkStrictDER(e,f[h],r,n,i);if(2*d!=p)throw new Error("sum of children's TLV length and L unmatch: "+2*d+"!="+p)}},de.oidname=function(e){var t=ce.asn1;ce.lang.String.isHex(e)&&(e=t.ASN1Util.oidHexToInt(e));var r=t.x509.OID.oid2name(e);return""===r&&(r=e),r},void 0!==ce&&ce||(t.KJUR=ce={}),void 0!==ce.lang&&ce.lang||(ce.lang={}),ce.lang.String=function(){},"function"==typeof e?(t.utf8tob64u=ue=function(t){return ge(e.from(t,"utf8").toString("base64"))},t.b64utoutf8=le=function(t){return e.from(ve(t),"base64").toString("utf8")}):(t.utf8tob64u=ue=function(e){return ye(Pe(De(e)))},t.b64utoutf8=le=function(e){return decodeURIComponent(Ne(be(e)))}),ce.lang.String.isInteger=function(e){return!!e.match(/^[0-9]+$/)||!!e.match(/^-[0-9]+$/)},ce.lang.String.isHex=function(e){return Ue(e)},ce.lang.String.isBase64=function(e){return!(!(e=e.replace(/\s+/g,"")).match(/^[0-9A-Za-z+\/]+={0,3}$/)||e.length%4!=0)},ce.lang.String.isBase64URL=function(e){return!e.match(/[+/=]/)&&(e=ve(e),ce.lang.String.isBase64(e))},ce.lang.String.isIntegerArray=function(e){return!!(e=e.replace(/\s+/g,"")).match(/^\[[0-9,]+\]$/)},ce.lang.String.isPrintable=function(e){return null!==e.match(/^[0-9A-Za-z '()+,-./:=?]*$/)},ce.lang.String.isIA5=function(e){return null!==e.match(/^[\x20-\x21\x23-\x7f]*$/)},ce.lang.String.isMail=function(e){return null!==e.match(/^[A-Za-z0-9]{1}[A-Za-z0-9_.-]*@{1}[A-Za-z0-9_.-]{1,}\.[A-Za-z0-9]{1,}$/)};var Be=function(e,t,r){return null==r&&(r="0"),e.length>=t?e:new Array(t-e.length+1).join(r)+e};function He(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t)}void 0!==ce&&ce||(t.KJUR=ce={}),void 0!==ce.crypto&&ce.crypto||(ce.crypto={}),ce.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHAwithRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:g.algo.MD5,sha1:g.algo.SHA1,sha224:g.algo.SHA224,sha256:g.algo.SHA256,sha384:g.algo.SHA384,sha512:g.algo.SHA512,ripemd160:g.algo.RIPEMD160},this.getDigestInfoHex=function(e,t){if(void 0===this.DIGESTINFOHEAD[t])throw"alg not supported in Util.DIGESTINFOHEAD: "+t;return this.DIGESTINFOHEAD[t]+e},this.getPaddedDigestInfoHex=function(e,t,r){var n=this.getDigestInfoHex(e,t),i=r/4;if(n.length+22>i)throw"key is too short for SigAlg: keylen="+r+","+t;for(var o="00"+n,a="",s=i-4-o.length,c=0;c<s;c+=2)a+="ff";return"0001"+a+o},this.hashString=function(e,t){return new ce.crypto.MessageDigest({alg:t}).digestString(e)},this.hashHex=function(e,t){return new ce.crypto.MessageDigest({alg:t}).digestHex(e)},this.sha1=function(e){return this.hashString(e,"sha1")},this.sha256=function(e){return this.hashString(e,"sha256")},this.sha256Hex=function(e){return this.hashHex(e,"sha256")},this.sha512=function(e){return this.hashString(e,"sha512")},this.sha512Hex=function(e){return this.hashHex(e,"sha512")},this.isKey=function(e){return e instanceof ne||e instanceof ce.crypto.DSA||e instanceof ce.crypto.ECDSA}},ce.crypto.Util.md5=function(e){return new ce.crypto.MessageDigest({alg:"md5",prov:"cryptojs"}).digestString(e)},ce.crypto.Util.ripemd160=function(e){return new ce.crypto.MessageDigest({alg:"ripemd160",prov:"cryptojs"}).digestString(e)},ce.crypto.Util.SECURERANDOMGEN=new ee,ce.crypto.Util.getRandomHexOfNbytes=function(e){var t=new Array(e);return ce.crypto.Util.SECURERANDOMGEN.nextBytes(t),he(t)},ce.crypto.Util.getRandomBigIntegerOfNbytes=function(e){return new _(ce.crypto.Util.getRandomHexOfNbytes(e),16)},ce.crypto.Util.getRandomHexOfNbits=function(e){var t=e%8,r=new Array((e-t)/8+1);return ce.crypto.Util.SECURERANDOMGEN.nextBytes(r),r[0]=(255<<t&255^255)&r[0],he(r)},ce.crypto.Util.getRandomBigIntegerOfNbits=function(e){return new _(ce.crypto.Util.getRandomHexOfNbits(e),16)},ce.crypto.Util.getRandomBigIntegerZeroToMax=function(e){for(var t=e.bitLength();;){var r=ce.crypto.Util.getRandomBigIntegerOfNbits(t);if(-1!=e.compareTo(r))return r}},ce.crypto.Util.getRandomBigIntegerMinToMax=function(e,t){var r=e.compareTo(t);if(1==r)throw"biMin is greater than biMax";if(0==r)return e;var n=t.subtract(e);return ce.crypto.Util.getRandomBigIntegerZeroToMax(n).add(e)},ce.crypto.MessageDigest=function(e){this.setAlgAndProvider=function(e,t){if(null!==(e=ce.crypto.MessageDigest.getCanonicalAlgName(e))&&void 0===t&&(t=ce.crypto.Util.DEFAULTPROVIDER[e]),-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(e)&&"cryptojs"==t){try{this.md=ce.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[e].create()}catch(t){throw"setAlgAndProvider hash alg set fail alg="+e+"/"+t}this.updateString=function(e){this.md.update(e)},this.updateHex=function(e){var t=g.enc.Hex.parse(e);this.md.update(t)},this.digest=function(){return this.md.finalize().toString(g.enc.Hex)},this.digestString=function(e){return this.updateString(e),this.digest()},this.digestHex=function(e){return this.updateHex(e),this.digest()}}if(-1!=":sha256:".indexOf(e)&&"sjcl"==t){try{this.md=new sjcl.hash.sha256}catch(t){throw"setAlgAndProvider hash alg set fail alg="+e+"/"+t}this.updateString=function(e){this.md.update(e)},this.updateHex=function(e){var t=sjcl.codec.hex.toBits(e);this.md.update(t)},this.digest=function(){var e=this.md.finalize();return sjcl.codec.hex.fromBits(e)},this.digestString=function(e){return this.updateString(e),this.digest()},this.digestHex=function(e){return this.updateHex(e),this.digest()}}},this.updateString=function(e){throw"updateString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.updateHex=function(e){throw"updateHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digest=function(){throw"digest() not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestString=function(e){throw"digestString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestHex=function(e){throw"digestHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},void 0!==e&&void 0!==e.alg&&(this.algName=e.alg,void 0===e.prov&&(this.provName=ce.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName))},ce.crypto.MessageDigest.getCanonicalAlgName=function(e){return"string"==typeof e&&(e=(e=e.toLowerCase()).replace(/-/,"")),e},ce.crypto.MessageDigest.getHashLength=function(e){var t=ce.crypto.MessageDigest,r=t.getCanonicalAlgName(e);if(void 0===t.HASHLENGTH[r])throw"not supported algorithm: "+e;return t.HASHLENGTH[r]},ce.crypto.MessageDigest.HASHLENGTH={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,ripemd160:20},ce.crypto.Mac=function(e){this.setAlgAndProvider=function(e,t){if(null==(e=e.toLowerCase())&&(e="hmacsha1"),"hmac"!=(e=e.toLowerCase()).substr(0,4))throw"setAlgAndProvider unsupported HMAC alg: "+e;void 0===t&&(t=ce.crypto.Util.DEFAULTPROVIDER[e]),this.algProv=e+"/"+t;var r=e.substr(4);if(-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(r)&&"cryptojs"==t){try{var n=ce.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[r];this.mac=g.algo.HMAC.create(n,this.pass)}catch(e){throw"setAlgAndProvider hash alg set fail hashAlg="+r+"/"+e}this.updateString=function(e){this.mac.update(e)},this.updateHex=function(e){var t=g.enc.Hex.parse(e);this.mac.update(t)},this.doFinal=function(){return this.mac.finalize().toString(g.enc.Hex)},this.doFinalString=function(e){return this.updateString(e),this.doFinal()},this.doFinalHex=function(e){return this.updateHex(e),this.doFinal()}}},this.updateString=function(e){throw"updateString(str) not supported for this alg/prov: "+this.algProv},this.updateHex=function(e){throw"updateHex(hex) not supported for this alg/prov: "+this.algProv},this.doFinal=function(){throw"digest() not supported for this alg/prov: "+this.algProv},this.doFinalString=function(e){throw"digestString(str) not supported for this alg/prov: "+this.algProv},this.doFinalHex=function(e){throw"digestHex(hex) not supported for this alg/prov: "+this.algProv},this.setPassword=function(e){if("string"==typeof e){var t=e;return e.length%2!=1&&e.match(/^[0-9A-Fa-f]+$/)||(t=Ee(e)),void(this.pass=g.enc.Hex.parse(t))}if("object"!=(void 0===e?"undefined":f(e)))throw"KJUR.crypto.Mac unsupported password type: "+e;if(t=null,void 0!==e.hex){if(e.hex.length%2!=0||!e.hex.match(/^[0-9A-Fa-f]+$/))throw"Mac: wrong hex password: "+e.hex;t=e.hex}if(void 0!==e.utf8&&(t=we(e.utf8)),void 0!==e.rstr&&(t=Ee(e.rstr)),void 0!==e.b64&&(t=w(e.b64)),void 0!==e.b64u&&(t=be(e.b64u)),null==t)throw"KJUR.crypto.Mac unsupported password type: "+e;this.pass=g.enc.Hex.parse(t)},void 0!==e&&(void 0!==e.pass&&this.setPassword(e.pass),void 0!==e.alg&&(this.algName=e.alg,void 0===e.prov&&(this.provName=ce.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName)))},ce.crypto.Signature=function(e){var t=null;if(this._setAlgNames=function(){var e=this.algName.match(/^(.+)with(.+)$/);e&&(this.mdAlgName=e[1].toLowerCase(),this.pubkeyAlgName=e[2].toLowerCase(),"rsaandmgf1"==this.pubkeyAlgName&&"sha"==this.mdAlgName&&(this.mdAlgName="sha1"))},this._zeroPaddingOfSignature=function(e,t){for(var r="",n=t/4-e.length,i=0;i<n;i++)r+="0";return r+e},this.setAlgAndProvider=function(e,t){if(this._setAlgNames(),"cryptojs/jsrsa"!=t)throw new Error("provider not supported: "+t);if(-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(this.mdAlgName)){try{this.md=new ce.crypto.MessageDigest({alg:this.mdAlgName})}catch(e){throw new Error("setAlgAndProvider hash alg set fail alg="+this.mdAlgName+"/"+e)}this.init=function(e,t){var r=null;try{r=void 0===t?qe.getKey(e):qe.getKey(e,t)}catch(e){throw"init failed:"+e}if(!0===r.isPrivate)this.prvKey=r,this.state="SIGN";else{if(!0!==r.isPublic)throw"init failed.:"+r;this.pubKey=r,this.state="VERIFY"}},this.updateString=function(e){this.md.updateString(e)},this.updateHex=function(e){this.md.updateHex(e)},this.sign=function(){if(this.sHashHex=this.md.digest(),void 0===this.prvKey&&void 0!==this.ecprvhex&&void 0!==this.eccurvename&&void 0!==ce.crypto.ECDSA&&(this.prvKey=new ce.crypto.ECDSA({curve:this.eccurvename,prv:this.ecprvhex})),this.prvKey instanceof ne&&"rsaandmgf1"===this.pubkeyAlgName)this.hSign=this.prvKey.signWithMessageHashPSS(this.sHashHex,this.mdAlgName,this.pssSaltLen);else if(this.prvKey instanceof ne&&"rsa"===this.pubkeyAlgName)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex,this.mdAlgName);else if(this.prvKey instanceof ce.crypto.ECDSA)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex);else{if(!(this.prvKey instanceof ce.crypto.DSA))throw"Signature: unsupported private key alg: "+this.pubkeyAlgName;this.hSign=this.prvKey.signWithMessageHash(this.sHashHex)}return this.hSign},this.signString=function(e){return this.updateString(e),this.sign()},this.signHex=function(e){return this.updateHex(e),this.sign()},this.verify=function(e){if(this.sHashHex=this.md.digest(),void 0===this.pubKey&&void 0!==this.ecpubhex&&void 0!==this.eccurvename&&void 0!==ce.crypto.ECDSA&&(this.pubKey=new ce.crypto.ECDSA({curve:this.eccurvename,pub:this.ecpubhex})),this.pubKey instanceof ne&&"rsaandmgf1"===this.pubkeyAlgName)return this.pubKey.verifyWithMessageHashPSS(this.sHashHex,e,this.mdAlgName,this.pssSaltLen);if(this.pubKey instanceof ne&&"rsa"===this.pubkeyAlgName)return this.pubKey.verifyWithMessageHash(this.sHashHex,e);if(void 0!==ce.crypto.ECDSA&&this.pubKey instanceof ce.crypto.ECDSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,e);if(void 0!==ce.crypto.DSA&&this.pubKey instanceof ce.crypto.DSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,e);throw"Signature: unsupported public key alg: "+this.pubkeyAlgName}}},this.init=function(e,t){throw"init(key, pass) not supported for this alg:prov="+this.algProvName},this.updateString=function(e){throw"updateString(str) not supported for this alg:prov="+this.algProvName},this.updateHex=function(e){throw"updateHex(hex) not supported for this alg:prov="+this.algProvName},this.sign=function(){throw"sign() not supported for this alg:prov="+this.algProvName},this.signString=function(e){throw"digestString(str) not supported for this alg:prov="+this.algProvName},this.signHex=function(e){throw"digestHex(hex) not supported for this alg:prov="+this.algProvName},this.verify=function(e){throw"verify(hSigVal) not supported for this alg:prov="+this.algProvName},this.initParams=e,void 0!==e&&(void 0!==e.alg&&(this.algName=e.alg,void 0===e.prov?this.provName=ce.crypto.Util.DEFAULTPROVIDER[this.algName]:this.provName=e.prov,this.algProvName=this.algName+":"+this.provName,this.setAlgAndProvider(this.algName,this.provName),this._setAlgNames()),void 0!==e.psssaltlen&&(this.pssSaltLen=e.psssaltlen),void 0!==e.prvkeypem)){if(void 0!==e.prvkeypas)throw"both prvkeypem and prvkeypas parameters not supported";try{t=qe.getKey(e.prvkeypem),this.init(t)}catch(e){throw"fatal error to load pem private key: "+e}}},ce.crypto.Cipher=function(e){},ce.crypto.Cipher.encrypt=function(e,t,r){if(t instanceof ne&&t.isPublic){var n=ce.crypto.Cipher.getAlgByKeyAndName(t,r);if("RSA"===n)return t.encrypt(e);if("RSAOAEP"===n)return t.encryptOAEP(e,"sha1");var i=n.match(/^RSAOAEP(\d+)$/);if(null!==i)return t.encryptOAEP(e,"sha"+i[1]);throw"Cipher.encrypt: unsupported algorithm for RSAKey: "+r}throw"Cipher.encrypt: unsupported key or algorithm"},ce.crypto.Cipher.decrypt=function(e,t,r){if(t instanceof ne&&t.isPrivate){var n=ce.crypto.Cipher.getAlgByKeyAndName(t,r);if("RSA"===n)return t.decrypt(e);if("RSAOAEP"===n)return t.decryptOAEP(e,"sha1");var i=n.match(/^RSAOAEP(\d+)$/);if(null!==i)return t.decryptOAEP(e,"sha"+i[1]);throw"Cipher.decrypt: unsupported algorithm for RSAKey: "+r}throw"Cipher.decrypt: unsupported key or algorithm"},ce.crypto.Cipher.getAlgByKeyAndName=function(e,t){if(e instanceof ne){if(-1!=":RSA:RSAOAEP:RSAOAEP224:RSAOAEP256:RSAOAEP384:RSAOAEP512:".indexOf(t))return t;if(null==t)return"RSA";throw"getAlgByKeyAndName: not supported algorithm name for RSAKey: "+t}throw"getAlgByKeyAndName: not supported algorithm name: "+t},ce.crypto.OID=new function(){this.oidhex2name={"2a864886f70d010101":"rsaEncryption","2a8648ce3d0201":"ecPublicKey","2a8648ce380401":"dsa","2a8648ce3d030107":"secp256r1","2b8104001f":"secp192k1","2b81040021":"secp224r1","2b8104000a":"secp256k1","2b81040023":"secp521r1","2b81040022":"secp384r1","2a8648ce380403":"SHA1withDSA","608648016503040301":"SHA224withDSA","608648016503040302":"SHA256withDSA"}},void 0!==ce&&ce||(t.KJUR=ce={}),void 0!==ce.crypto&&ce.crypto||(ce.crypto={}),ce.crypto.ECDSA=function(e){var t=Error,r=_,n=oe,i=ce.crypto.ECDSA,o=ce.crypto.ECParameterDB,a=i.getName,s=de,c=s.getVbyListEx,u=s.isASN1HEX,l=new ee;this.type="EC",this.isPrivate=!1,this.isPublic=!1,this.getBigRandom=function(e){return new r(e.bitLength(),l).mod(e.subtract(r.ONE)).add(r.ONE)},this.setNamedCurve=function(e){this.ecparams=o.getByName(e),this.prvKeyHex=null,this.pubKeyHex=null,this.curveName=e},this.setPrivateKeyHex=function(e){this.isPrivate=!0,this.prvKeyHex=e},this.setPublicKeyHex=function(e){this.isPublic=!0,this.pubKeyHex=e},this.getPublicKeyXYHex=function(){var e=this.pubKeyHex;if("04"!==e.substr(0,2))throw"this method supports uncompressed format(04) only";var t=this.ecparams.keylen/4;if(e.length!==2+2*t)throw"malformed public key hex length";var r={};return r.x=e.substr(2,t),r.y=e.substr(2+t),r},this.getShortNISTPCurveName=function(){var e=this.curveName;return"secp256r1"===e||"NIST P-256"===e||"P-256"===e||"prime256v1"===e?"P-256":"secp384r1"===e||"NIST P-384"===e||"P-384"===e?"P-384":null},this.generateKeyPairHex=function(){var e=this.ecparams.n,t=this.getBigRandom(e),r=this.ecparams.G.multiply(t),n=r.getX().toBigInteger(),i=r.getY().toBigInteger(),o=this.ecparams.keylen/4,a=("0000000000"+t.toString(16)).slice(-o),s="04"+("0000000000"+n.toString(16)).slice(-o)+("0000000000"+i.toString(16)).slice(-o);return this.setPrivateKeyHex(a),this.setPublicKeyHex(s),{ecprvhex:a,ecpubhex:s}},this.signWithMessageHash=function(e){return this.signHex(e,this.prvKeyHex)},this.signHex=function(e,t){var n=new r(t,16),o=this.ecparams.n,a=new r(e.substring(0,this.ecparams.keylen/4),16);do{var s=this.getBigRandom(o),c=this.ecparams.G.multiply(s).getX().toBigInteger().mod(o)}while(c.compareTo(r.ZERO)<=0);var u=s.modInverse(o).multiply(a.add(n.multiply(c))).mod(o);return i.biRSSigToASN1Sig(c,u)},this.sign=function(e,t){var n=t,i=this.ecparams.n,o=r.fromByteArrayUnsigned(e);do{var a=this.getBigRandom(i),s=this.ecparams.G.multiply(a).getX().toBigInteger().mod(i)}while(s.compareTo(_.ZERO)<=0);var c=a.modInverse(i).multiply(o.add(n.multiply(s))).mod(i);return this.serializeSig(s,c)},this.verifyWithMessageHash=function(e,t){return this.verifyHex(e,t,this.pubKeyHex)},this.verifyHex=function(e,t,o){try{var a,s,c=i.parseSigHex(t);a=c.r,s=c.s;var u=n.decodeFromHex(this.ecparams.curve,o),l=new r(e.substring(0,this.ecparams.keylen/4),16);return this.verifyRaw(l,a,s,u)}catch(e){return!1}},this.verify=function(e,t,i){var o,a,s;if(Bitcoin.Util.isArray(t)){var c=this.parseSig(t);o=c.r,a=c.s}else{if("object"!==(void 0===t?"undefined":f(t))||!t.r||!t.s)throw"Invalid value for signature";o=t.r,a=t.s}if(i instanceof oe)s=i;else{if(!Bitcoin.Util.isArray(i))throw"Invalid format for pubkey value, must be byte array or ECPointFp";s=n.decodeFrom(this.ecparams.curve,i)}var u=r.fromByteArrayUnsigned(e);return this.verifyRaw(u,o,a,s)},this.verifyRaw=function(e,t,n,i){var o=this.ecparams.n,a=this.ecparams.G;if(t.compareTo(r.ONE)<0||t.compareTo(o)>=0)return!1;if(n.compareTo(r.ONE)<0||n.compareTo(o)>=0)return!1;var s=n.modInverse(o),c=e.multiply(s).mod(o),u=t.multiply(s).mod(o);return a.multiply(c).add(i.multiply(u)).getX().toBigInteger().mod(o).equals(t)},this.serializeSig=function(e,t){var r=e.toByteArraySigned(),n=t.toByteArraySigned(),i=[];return i.push(2),i.push(r.length),(i=i.concat(r)).push(2),i.push(n.length),(i=i.concat(n)).unshift(i.length),i.unshift(48),i},this.parseSig=function(e){var t;if(48!=e[0])throw new Error("Signature not a valid DERSequence");if(2!=e[t=2])throw new Error("First element in signature must be a DERInteger");var n=e.slice(t+2,t+2+e[t+1]);if(2!=e[t+=2+e[t+1]])throw new Error("Second element in signature must be a DERInteger");var i=e.slice(t+2,t+2+e[t+1]);return t+=2+e[t+1],{r:r.fromByteArrayUnsigned(n),s:r.fromByteArrayUnsigned(i)}},this.parseSigCompact=function(e){if(65!==e.length)throw"Signature has the wrong length";var t=e[0]-27;if(t<0||t>7)throw"Invalid signature type";var n=this.ecparams.n;return{r:r.fromByteArrayUnsigned(e.slice(1,33)).mod(n),s:r.fromByteArrayUnsigned(e.slice(33,65)).mod(n),i:t}},this.readPKCS5PrvKeyHex=function(e){if(!1===u(e))throw new Error("not ASN.1 hex string");var t,r,n;try{t=c(e,0,["[0]",0],"06"),r=c(e,0,[1],"04");try{n=c(e,0,["[1]",0],"03")}catch(e){}}catch(e){throw new Error("malformed PKCS#1/5 plain ECC private key")}if(this.curveName=a(t),void 0===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(n),this.setPrivateKeyHex(r),this.isPublic=!1},this.readPKCS8PrvKeyHex=function(e){if(!1===u(e))throw new t("not ASN.1 hex string");var r,n,i;try{c(e,0,[1,0],"06"),r=c(e,0,[1,1],"06"),n=c(e,0,[2,0,1],"04");try{i=c(e,0,[2,0,"[1]",0],"03")}catch(e){}}catch(e){throw new t("malformed PKCS#8 plain ECC private key")}if(this.curveName=a(r),void 0===this.curveName)throw new t("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(i),this.setPrivateKeyHex(n),this.isPublic=!1},this.readPKCS8PubKeyHex=function(e){if(!1===u(e))throw new t("not ASN.1 hex string");var r,n;try{c(e,0,[0,0],"06"),r=c(e,0,[0,1],"06"),n=c(e,0,[1],"03")}catch(e){throw new t("malformed PKCS#8 ECC public key")}if(this.curveName=a(r),null===this.curveName)throw new t("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(n)},this.readCertPubKeyHex=function(e,r){if(!1===u(e))throw new t("not ASN.1 hex string");var n,i;try{n=c(e,0,[0,5,0,1],"06"),i=c(e,0,[0,5,1],"03")}catch(e){throw new t("malformed X.509 certificate ECC public key")}if(this.curveName=a(n),null===this.curveName)throw new t("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(i)},void 0!==e&&void 0!==e.curve&&(this.curveName=e.curve),void 0===this.curveName&&(this.curveName="secp256r1"),this.setNamedCurve(this.curveName),void 0!==e&&(void 0!==e.prv&&this.setPrivateKeyHex(e.prv),void 0!==e.pub&&this.setPublicKeyHex(e.pub))},ce.crypto.ECDSA.parseSigHex=function(e){var t=ce.crypto.ECDSA.parseSigHexInHexRS(e);return{r:new _(t.r,16),s:new _(t.s,16)}},ce.crypto.ECDSA.parseSigHexInHexRS=function(e){var t=de,r=t.getChildIdx,n=t.getV;if(t.checkStrictDER(e,0),"30"!=e.substr(0,2))throw new Error("signature is not a ASN.1 sequence");var i=r(e,0);if(2!=i.length)throw new Error("signature shall have two elements");var o=i[0],a=i[1];if("02"!=e.substr(o,2))throw new Error("1st item not ASN.1 integer");if("02"!=e.substr(a,2))throw new Error("2nd item not ASN.1 integer");return{r:n(e,o),s:n(e,a)}},ce.crypto.ECDSA.asn1SigToConcatSig=function(e){var t=ce.crypto.ECDSA.parseSigHexInHexRS(e),r=t.r,n=t.s;if("00"==r.substr(0,2)&&r.length%32==2&&(r=r.substr(2)),"00"==n.substr(0,2)&&n.length%32==2&&(n=n.substr(2)),r.length%32==30&&(r="00"+r),n.length%32==30&&(n="00"+n),r.length%32!=0)throw"unknown ECDSA sig r length error";if(n.length%32!=0)throw"unknown ECDSA sig s length error";return r+n},ce.crypto.ECDSA.concatSigToASN1Sig=function(e){if(e.length/2*8%128!=0)throw"unknown ECDSA concatinated r-s sig length error";var t=e.substr(0,e.length/2),r=e.substr(e.length/2);return ce.crypto.ECDSA.hexRSSigToASN1Sig(t,r)},ce.crypto.ECDSA.hexRSSigToASN1Sig=function(e,t){var r=new _(e,16),n=new _(t,16);return ce.crypto.ECDSA.biRSSigToASN1Sig(r,n)},ce.crypto.ECDSA.biRSSigToASN1Sig=function(e,t){var r=ce.asn1,n=new r.DERInteger({bigint:e}),i=new r.DERInteger({bigint:t});return new r.DERSequence({array:[n,i]}).getEncodedHex()},ce.crypto.ECDSA.getName=function(e){return"2b8104001f"===e?"secp192k1":"2a8648ce3d030107"===e?"secp256r1":"2b8104000a"===e?"secp256k1":"2b81040021"===e?"secp224r1":"2b81040022"===e?"secp384r1":-1!=="|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(e)?"secp256r1":-1!=="|secp256k1|".indexOf(e)?"secp256k1":-1!=="|secp224r1|NIST P-224|P-224|".indexOf(e)?"secp224r1":-1!=="|secp384r1|NIST P-384|P-384|".indexOf(e)?"secp384r1":null},void 0!==ce&&ce||(t.KJUR=ce={}),void 0!==ce.crypto&&ce.crypto||(ce.crypto={}),ce.crypto.ECParameterDB=new function(){var e={},t={};function r(e){return new _(e,16)}this.getByName=function(r){var n=r;if(void 0!==t[n]&&(n=t[r]),void 0!==e[n])return e[n];throw"unregistered EC curve name: "+n},this.regist=function(n,i,o,a,s,c,u,l,d,p,f,h){e[n]={};var m=r(o),g=r(a),v=r(s),y=r(c),b=r(u),w=new ae(m,g,v),x=w.decodePointHex("04"+l+d);e[n].name=n,e[n].keylen=i,e[n].curve=w,e[n].G=x,e[n].n=y,e[n].h=b,e[n].oid=f,e[n].info=h;for(var _=0;_<p.length;_++)t[p[_]]=n}},ce.crypto.ECParameterDB.regist("secp128r1",128,"FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC","E87579C11079F43DD824993C2CEE5ED3","FFFFFFFE0000000075A30D1B9038A115","1","161FF7528B899B2D0C28607CA52C5B86","CF5AC8395BAFEB13C02DA292DDED7A83",[],"","secp128r1 : SECG curve over a 128 bit prime field"),ce.crypto.ECParameterDB.regist("secp160k1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73","0","7","0100000000000000000001B8FA16DFAB9ACA16B6B3","1","3B4C382CE37AA192A4019E763036F4F5DD4D7EBB","938CF935318FDCED6BC28286531733C3F03C4FEE",[],"","secp160k1 : SECG curve over a 160 bit prime field"),ce.crypto.ECParameterDB.regist("secp160r1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC","1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45","0100000000000000000001F4C8F927AED3CA752257","1","4A96B5688EF573284664698968C38BB913CBFC82","23A628553168947D59DCC912042351377AC5FB32",[],"","secp160r1 : SECG curve over a 160 bit prime field"),ce.crypto.ECParameterDB.regist("secp192k1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37","0","3","FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D","1","DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D","9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",[]),ce.crypto.ECParameterDB.regist("secp192r1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC","64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1","FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831","1","188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012","07192B95FFC8DA78631011ED6B24CDD573F977A11E794811",[]),ce.crypto.ECParameterDB.regist("secp224r1",224,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE","B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4","FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D","1","B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21","BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",[]),ce.crypto.ECParameterDB.regist("secp256k1",256,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","0","7","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","1","79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",[]),ce.crypto.ECParameterDB.regist("secp256r1",256,"FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC","5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B","FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551","1","6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296","4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",["NIST P-256","P-256","prime256v1"]),ce.crypto.ECParameterDB.regist("secp384r1",384,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC","B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973","1","AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7","3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f",["NIST P-384","P-384"]),ce.crypto.ECParameterDB.regist("secp521r1",521,"1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC","051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409","1","C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66","011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650",["NIST P-521","P-521"]);var qe=function(){var e=function(e,r,n){return t(g.AES,e,r,n)},t=function(e,t,r,n){var i=g.enc.Hex.parse(t),o=g.enc.Hex.parse(r),a=g.enc.Hex.parse(n),s={};s.key=o,s.iv=a,s.ciphertext=i;var c=e.decrypt(s,o,{iv:a});return g.enc.Hex.stringify(c)},r=function(e,t,r){return n(g.AES,e,t,r)},n=function(e,t,r,n){var i=g.enc.Hex.parse(t),o=g.enc.Hex.parse(r),a=g.enc.Hex.parse(n),s=e.encrypt(i,o,{iv:a}),c=g.enc.Hex.parse(s.toString());return g.enc.Base64.stringify(c)},i={"AES-256-CBC":{proc:e,eproc:r,keylen:32,ivlen:16},"AES-192-CBC":{proc:e,eproc:r,keylen:24,ivlen:16},"AES-128-CBC":{proc:e,eproc:r,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:function(e,r,n){return t(g.TripleDES,e,r,n)},eproc:function(e,t,r){return n(g.TripleDES,e,t,r)},keylen:24,ivlen:8},"DES-CBC":{proc:function(e,r,n){return t(g.DES,e,r,n)},eproc:function(e,t,r){return n(g.DES,e,t,r)},keylen:8,ivlen:8}},o=function(e){var t={},r=e.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"));r&&(t.cipher=r[1],t.ivsalt=r[2]);var n=e.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));n&&(t.type=n[1]);var i=-1,o=0;-1!=e.indexOf("\r\n\r\n")&&(i=e.indexOf("\r\n\r\n"),o=2),-1!=e.indexOf("\n\n")&&(i=e.indexOf("\n\n"),o=1);var a=e.indexOf("-----END");if(-1!=i&&-1!=a){var s=e.substring(i+2*o,a-o);s=s.replace(/\s+/g,""),t.data=s}return t},a=function(e,t,r){for(var n=r.substring(0,16),o=g.enc.Hex.parse(n),a=g.enc.Utf8.parse(t),s=i[e].keylen+i[e].ivlen,c="",u=null;;){var l=g.algo.MD5.create();if(null!=u&&l.update(u),l.update(a),l.update(o),u=l.finalize(),(c+=g.enc.Hex.stringify(u)).length>=2*s)break}var d={};return d.keyhex=c.substr(0,2*i[e].keylen),d.ivhex=c.substr(2*i[e].keylen,2*i[e].ivlen),d},s=function(e,t,r,n){var o=g.enc.Base64.parse(e),a=g.enc.Hex.stringify(o);return(0,i[t].proc)(a,r,n)};return{version:"1.0.0",parsePKCS5PEM:function(e){return o(e)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(e,t,r){return a(e,t,r)},decryptKeyB64:function(e,t,r,n){return s(e,t,r,n)},getDecryptedKeyHex:function(e,t){var r=o(e),n=(r.type,r.cipher),i=r.ivsalt,c=r.data,u=a(n,t,i).keyhex;return s(c,n,u,i)},getEncryptedPKCS5PEMFromPrvKeyHex:function(e,t,r,n,o){var s="";if(void 0!==n&&null!=n||(n="AES-256-CBC"),void 0===i[n])throw new Error("KEYUTIL unsupported algorithm: "+n);void 0!==o&&null!=o||(o=function(e){var t=g.lib.WordArray.random(e);return g.enc.Hex.stringify(t)}(i[n].ivlen).toUpperCase());var c=function(e,t,r,n){return(0,i[t].eproc)(e,r,n)}(t,n,a(n,r,o).keyhex,o);return s="-----BEGIN "+e+" PRIVATE KEY-----\r\n",s+="Proc-Type: 4,ENCRYPTED\r\n",s+="DEK-Info: "+n+","+o+"\r\n",s+="\r\n",(s+=c.replace(/(.{64})/g,"$1\r\n"))+"\r\n-----END "+e+" PRIVATE KEY-----\r\n"},parseHexOfEncryptedPKCS8:function(e){var t=de,r=t.getChildIdx,n=t.getV,i={},o=r(e,0);if(2!=o.length)throw new Error("malformed format: SEQUENCE(0).items != 2: "+o.length);i.ciphertext=n(e,o[1]);var a=r(e,o[0]);if(2!=a.length)throw new Error("malformed format: SEQUENCE(0.0).items != 2: "+a.length);if("2a864886f70d01050d"!=n(e,a[0]))throw new Error("this only supports pkcs5PBES2");var s=r(e,a[1]);if(2!=a.length)throw new Error("malformed format: SEQUENCE(0.0.1).items != 2: "+s.length);var c=r(e,s[1]);if(2!=c.length)throw new Error("malformed format: SEQUENCE(0.0.1.1).items != 2: "+c.length);if("2a864886f70d0307"!=n(e,c[0]))throw"this only supports TripleDES";i.encryptionSchemeAlg="TripleDES",i.encryptionSchemeIV=n(e,c[1]);var u=r(e,s[0]);if(2!=u.length)throw new Error("malformed format: SEQUENCE(0.0.1.0).items != 2: "+u.length);if("2a864886f70d01050c"!=n(e,u[0]))throw new Error("this only supports pkcs5PBKDF2");var l=r(e,u[1]);if(l.length<2)throw new Error("malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+l.length);i.pbkdf2Salt=n(e,l[0]);var d=n(e,l[1]);try{i.pbkdf2Iter=parseInt(d,16)}catch(e){throw new Error("malformed format pbkdf2Iter: "+d)}return i},getPBKDF2KeyHexFromParam:function(e,t){var r=g.enc.Hex.parse(e.pbkdf2Salt),n=e.pbkdf2Iter,i=g.PBKDF2(t,r,{keySize:6,iterations:n});return g.enc.Hex.stringify(i)},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function(e,t){var r=Te(e,"ENCRYPTED PRIVATE KEY"),n=this.parseHexOfEncryptedPKCS8(r),i=qe.getPBKDF2KeyHexFromParam(n,t),o={};o.ciphertext=g.enc.Hex.parse(n.ciphertext);var a=g.enc.Hex.parse(i),s=g.enc.Hex.parse(n.encryptionSchemeIV),c=g.TripleDES.decrypt(o,a,{iv:s});return g.enc.Hex.stringify(c)},getKeyFromEncryptedPKCS8PEM:function(e,t){var r=this._getPlainPKCS8HexFromEncryptedPKCS8PEM(e,t);return this.getKeyFromPlainPrivatePKCS8Hex(r)},parsePlainPrivatePKCS8Hex:function(e){var t=de,r=t.getChildIdx,n=t.getV,i={algparam:null};if("30"!=e.substr(0,2))throw new Error("malformed plain PKCS8 private key(code:001)");var o=r(e,0);if(o.length<3)throw new Error("malformed plain PKCS8 private key(code:002)");if("30"!=e.substr(o[1],2))throw new Error("malformed PKCS8 private key(code:003)");var a=r(e,o[1]);if(2!=a.length)throw new Error("malformed PKCS8 private key(code:004)");if("06"!=e.substr(a[0],2))throw new Error("malformed PKCS8 private key(code:005)");if(i.algoid=n(e,a[0]),"06"==e.substr(a[1],2)&&(i.algparam=n(e,a[1])),"04"!=e.substr(o[2],2))throw new Error("malformed PKCS8 private key(code:006)");return i.keyidx=t.getVidx(e,o[2]),i},getKeyFromPlainPrivatePKCS8PEM:function(e){var t=Te(e,"PRIVATE KEY");return this.getKeyFromPlainPrivatePKCS8Hex(t)},getKeyFromPlainPrivatePKCS8Hex:function(e){var t,r=this.parsePlainPrivatePKCS8Hex(e);if("2a864886f70d010101"==r.algoid)t=new ne;else if("2a8648ce380401"==r.algoid)t=new ce.crypto.DSA;else{if("2a8648ce3d0201"!=r.algoid)throw new Error("unsupported private key algorithm");t=new ce.crypto.ECDSA}return t.readPKCS8PrvKeyHex(e),t},_getKeyFromPublicPKCS8Hex:function(e){var t,r=de.getVbyList(e,0,[0,0],"06");if("2a864886f70d010101"===r)t=new ne;else if("2a8648ce380401"===r)t=new ce.crypto.DSA;else{if("2a8648ce3d0201"!==r)throw new Error("unsupported PKCS#8 public key hex");t=new ce.crypto.ECDSA}return t.readPKCS8PubKeyHex(e),t},parsePublicRawRSAKeyHex:function(e){var t=de,r=t.getChildIdx,n=t.getV,i={};if("30"!=e.substr(0,2))throw new Error("malformed RSA key(code:001)");var o=r(e,0);if(2!=o.length)throw new Error("malformed RSA key(code:002)");if("02"!=e.substr(o[0],2))throw new Error("malformed RSA key(code:003)");if(i.n=n(e,o[0]),"02"!=e.substr(o[1],2))throw new Error("malformed RSA key(code:004)");return i.e=n(e,o[1]),i},parsePublicPKCS8Hex:function(e){var t=de,r=t.getChildIdx,n=t.getV,i={algparam:null},o=r(e,0);if(2!=o.length)throw new Error("outer DERSequence shall have 2 elements: "+o.length);var a=o[0];if("30"!=e.substr(a,2))throw new Error("malformed PKCS8 public key(code:001)");var s=r(e,a);if(2!=s.length)throw new Error("malformed PKCS8 public key(code:002)");if("06"!=e.substr(s[0],2))throw new Error("malformed PKCS8 public key(code:003)");if(i.algoid=n(e,s[0]),"06"==e.substr(s[1],2)?i.algparam=n(e,s[1]):"30"==e.substr(s[1],2)&&(i.algparam={},i.algparam.p=t.getVbyList(e,s[1],[0],"02"),i.algparam.q=t.getVbyList(e,s[1],[1],"02"),i.algparam.g=t.getVbyList(e,s[1],[2],"02")),"03"!=e.substr(o[1],2))throw new Error("malformed PKCS8 public key(code:004)");return i.key=n(e,o[1]).substr(2),i}}}();function We(e,t){for(var r="",n=t/4-e.length,i=0;i<n;i++)r+="0";return r+e}function Ve(e,t,r){for(var n="",i=0;n.length<t;)n+=_e(r(Ee(e+String.fromCharCode.apply(String,[(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i])))),i+=1;return n}function Ke(e){for(var t in ce.crypto.Util.DIGESTINFOHEAD){var r=ce.crypto.Util.DIGESTINFOHEAD[t],n=r.length;if(e.substring(0,n)==r)return[t,e.substring(n)]}return[]}function Je(e){var t,r=de,n=r.getChildIdx,i=r.getV,o=r.getTLV,a=r.getVbyList,s=r.getVbyListEx,c=r.getTLVbyList,u=r.getTLVbyListEx,l=r.getIdxbyList,d=r.getIdxbyListEx,p=r.getVidx,f=r.getInt,h=r.oidname,m=r.hextooidstr,g=Te;try{t=ce.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV}catch(e){}this.HEX2STAG={"0c":"utf8",13:"prn",16:"ia5","1a":"vis","1e":"bmp"},this.hex=null,this.version=0,this.foffset=0,this.aExtInfo=null,this.getVersion=function(){if(null===this.hex||0!==this.version)return this.version;var e=c(this.hex,0,[0,0]);if("a0"==e.substr(0,2)){var t=c(e,0,[0]),r=f(t,0);if(r<0||2<r)throw new Error("malformed version field");return this.version=r+1,this.version}return this.version=1,this.foffset=-1,1},this.getSerialNumberHex=function(){return s(this.hex,0,[0,0],"02")},this.getSignatureAlgorithmField=function(){var e=u(this.hex,0,[0,1]);return this.getAlgorithmIdentifierName(e)},this.getAlgorithmIdentifierName=function(e){for(var r in t)if(e===t[r])return r;return h(s(e,0,[0],"06"))},this.getIssuer=function(){return this.getX500Name(this.getIssuerHex())},this.getIssuerHex=function(){return c(this.hex,0,[0,3+this.foffset],"30")},this.getIssuerString=function(){return this.getIssuer().str},this.getSubject=function(){return this.getX500Name(this.getSubjectHex())},this.getSubjectHex=function(){return c(this.hex,0,[0,5+this.foffset],"30")},this.getSubjectString=function(){return this.getSubject().str},this.getNotBefore=function(){var e=a(this.hex,0,[0,4+this.foffset,0]);return e=e.replace(/(..)/g,"%$1"),decodeURIComponent(e)},this.getNotAfter=function(){var e=a(this.hex,0,[0,4+this.foffset,1]);return e=e.replace(/(..)/g,"%$1"),decodeURIComponent(e)},this.getPublicKeyHex=function(){return r.getTLVbyList(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyIdx=function(){return l(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyContentIdx=function(){var e=this.getPublicKeyIdx();return l(this.hex,e,[1,0],"30")},this.getPublicKey=function(){return qe.getKey(this.getPublicKeyHex(),null,"pkcs8pub")},this.getSignatureAlgorithmName=function(){var e=c(this.hex,0,[1],"30");return this.getAlgorithmIdentifierName(e)},this.getSignatureValueHex=function(){return a(this.hex,0,[2],"03",!0)},this.verifySignature=function(e){var t=this.getSignatureAlgorithmField(),r=this.getSignatureValueHex(),n=c(this.hex,0,[0],"30"),i=new ce.crypto.Signature({alg:t});return i.init(e),i.updateHex(n),i.verify(r)},this.parseExt=function(e){var t,o,s;if(void 0===e){if(s=this.hex,3!==this.version)return-1;t=l(s,0,[0,7,0],"30"),o=n(s,t)}else{s=Te(e);var c=l(s,0,[0,3,0,0],"06");if("2a864886f70d01090e"!=i(s,c))return void(this.aExtInfo=new Array);t=l(s,0,[0,3,0,1,0],"30"),o=n(s,t),this.hex=s}this.aExtInfo=new Array;for(var u=0;u<o.length;u++){var d={critical:!1},f=0;3===n(s,o[u]).length&&(d.critical=!0,f=1),d.oid=r.hextooidstr(a(s,o[u],[0],"06"));var h=l(s,o[u],[1+f]);d.vidx=p(s,h),this.aExtInfo.push(d)}},this.getExtInfo=function(e){var t=this.aExtInfo,r=e;if(e.match(/^[0-9.]+$/)||(r=ce.asn1.x509.OID.name2oid(e)),""!==r)for(var n=0;n<t.length;n++)if(t[n].oid===r)return t[n]},this.getExtBasicConstraints=function(e,t){if(void 0===e&&void 0===t){var r=this.getExtInfo("basicConstraints");if(void 0===r)return;e=o(this.hex,r.vidx),t=r.critical}var n={extname:"basicConstraints"};if(t&&(n.critical=!0),"3000"===e)return n;if("30030101ff"===e)return n.cA=!0,n;if("30060101ff02"===e.substr(0,12)){var a=i(e,10),s=parseInt(a,16);return n.cA=!0,n.pathLen=s,n}throw new Error("hExtV parse error: "+e)},this.getExtKeyUsage=function(e,t){if(void 0===e&&void 0===t){var r=this.getExtInfo("keyUsage");if(void 0===r)return;e=o(this.hex,r.vidx),t=r.critical}var n={extname:"keyUsage"};return t&&(n.critical=!0),n.names=this.getExtKeyUsageString(e).split(","),n},this.getExtKeyUsageBin=function(e){if(void 0===e){var t=this.getExtInfo("keyUsage");if(void 0===t)return"";e=o(this.hex,t.vidx)}if(8!=e.length&&10!=e.length)throw new Error("malformed key usage value: "+e);var r="000000000000000"+parseInt(e.substr(6),16).toString(2);return 8==e.length&&(r=r.slice(-8)),10==e.length&&(r=r.slice(-16)),""==(r=r.replace(/0+$/,""))&&(r="0"),r},this.getExtKeyUsageString=function(e){for(var t=this.getExtKeyUsageBin(e),r=new Array,n=0;n<t.length;n++)"1"==t.substr(n,1)&&r.push(Je.KEYUSAGE_NAME[n]);return r.join(",")},this.getExtSubjectKeyIdentifier=function(e,t){if(void 0===e&&void 0===t){var r=this.getExtInfo("subjectKeyIdentifier");if(void 0===r)return;e=o(this.hex,r.vidx),t=r.critical}var n={extname:"subjectKeyIdentifier"};t&&(n.critical=!0);var a=i(e,0);return n.kid={hex:a},n},this.getExtAuthorityKeyIdentifier=function(e,t){if(void 0===e&&void 0===t){var r=this.getExtInfo("authorityKeyIdentifier");if(void 0===r)return;e=o(this.hex,r.vidx),t=r.critical}var a={extname:"authorityKeyIdentifier"};t&&(a.critical=!0);for(var s=n(e,0),c=0;c<s.length;c++){var u=e.substr(s[c],2);if("80"===u&&(a.kid={hex:i(e,s[c])}),"a1"===u){var l=o(e,s[c]),d=this.getGeneralNames(l);a.issuer=d[0].dn}"82"===u&&(a.sn={hex:i(e,s[c])})}return a},this.getExtExtKeyUsage=function(e,t){if(void 0===e&&void 0===t){var r=this.getExtInfo("extKeyUsage");if(void 0===r)return;e=o(this.hex,r.vidx),t=r.critical}var a={extname:"extKeyUsage",array:[]};t&&(a.critical=!0);for(var s=n(e,0),c=0;c<s.length;c++)a.array.push(h(i(e,s[c])));return a},this.getExtExtKeyUsageName=function(){var e=this.getExtInfo("extKeyUsage");if(void 0===e)return e;var t=new Array,r=o(this.hex,e.vidx);if(""===r)return t;for(var a=n(r,0),s=0;s<a.length;s++)t.push(h(i(r,a[s])));return t},this.getExtSubjectAltName=function(e,t){if(void 0===e&&void 0===t){var r=this.getExtInfo("subjectAltName");if(void 0===r)return;e=o(this.hex,r.vidx),t=r.critical}var n={extname:"subjectAltName",array:[]};return t&&(n.critical=!0),n.array=this.getGeneralNames(e),n},this.getExtIssuerAltName=function(e,t){if(void 0===e&&void 0===t){var r=this.getExtInfo("issuerAltName");if(void 0===r)return;e=o(this.hex,r.vidx),t=r.critical}var n={extname:"issuerAltName",array:[]};return t&&(n.critical=!0),n.array=this.getGeneralNames(e),n},this.getGeneralNames=function(e){for(var t=n(e,0),r=[],i=0;i<t.length;i++){var a=this.getGeneralName(o(e,t[i]));void 0!==a&&r.push(a)}return r},this.getGeneralName=function(e){var t=e.substr(0,2),r=i(e,0),n=_e(r);return"81"==t?{rfc822:n}:"82"==t?{dns:n}:"86"==t?{uri:n}:"87"==t?{ip:je(r)}:"a4"==t?{dn:this.getX500Name(r)}:void 0},this.getExtSubjectAltName2=function(){var e,t,r,a=this.getExtInfo("subjectAltName");if(void 0===a)return a;for(var s=new Array,c=o(this.hex,a.vidx),u=n(c,0),l=0;l<u.length;l++)r=c.substr(u[l],2),e=i(c,u[l]),"81"===r&&(t=xe(e),s.push(["MAIL",t])),"82"===r&&(t=xe(e),s.push(["DNS",t])),"84"===r&&(t=Je.hex2dn(e,0),s.push(["DN",t])),"86"===r&&(t=xe(e),s.push(["URI",t])),"87"===r&&(t=je(e),s.push(["IP",t]));return s},this.getExtCRLDistributionPoints=function(e,t){if(void 0===e&&void 0===t){var r=this.getExtInfo("cRLDistributionPoints");if(void 0===r)return;e=o(this.hex,r.vidx),t=r.critical}var i={extname:"cRLDistributionPoints",array:[]};t&&(i.critical=!0);for(var a=n(e,0),s=0;s<a.length;s++){var c=o(e,a[s]);i.array.push(this.getDistributionPoint(c))}return i},this.getDistributionPoint=function(e){for(var t={},r=n(e,0),i=0;i<r.length;i++){var a=e.substr(r[i],2),s=o(e,r[i]);"a0"==a&&(t.dpname=this.getDistributionPointName(s))}return t},this.getDistributionPointName=function(e){for(var t={},r=n(e,0),i=0;i<r.length;i++){var a=e.substr(r[i],2),s=o(e,r[i]);"a0"==a&&(t.full=this.getGeneralNames(s))}return t},this.getExtCRLDistributionPointsURI=function(){var e=this.getExtInfo("cRLDistributionPoints");if(void 0===e)return e;for(var t=new Array,r=n(this.hex,e.vidx),i=0;i<r.length;i++)try{var o=xe(a(this.hex,r[i],[0,0,0],"86"));t.push(o)}catch(e){}return t},this.getExtAIAInfo=function(){var e=this.getExtInfo("authorityInfoAccess");if(void 0===e)return e;for(var t={ocsp:[],caissuer:[]},r=n(this.hex,e.vidx),i=0;i<r.length;i++){var o=a(this.hex,r[i],[0],"06"),s=a(this.hex,r[i],[1],"86");"2b06010505073001"===o&&t.ocsp.push(xe(s)),"2b06010505073002"===o&&t.caissuer.push(xe(s))}return t},this.getExtAuthorityInfoAccess=function(e,t){if(void 0===e&&void 0===t){var r=this.getExtInfo("authorityInfoAccess");if(void 0===r)return;e=o(this.hex,r.vidx),t=r.critical}var i={extname:"authorityInfoAccess",array:[]};t&&(i.critical=!0);for(var c=n(e,0),u=0;u<c.length;u++){var l=s(e,c[u],[0],"06"),d=xe(a(e,c[u],[1],"86"));if("2b06010505073001"==l)i.array.push({ocsp:d});else{if("2b06010505073002"!=l)throw new Error("unknown method: "+l);i.array.push({caissuer:d})}}return i},this.getExtCertificatePolicies=function(e,t){if(void 0===e&&void 0===t){var r=this.getExtInfo("certificatePolicies");if(void 0===r)return;e=o(this.hex,r.vidx),t=r.critical}var i={extname:"certificatePolicies",array:[]};t&&(i.critical=!0);for(var a=n(e,0),s=0;s<a.length;s++){var c=o(e,a[s]),u=this.getPolicyInformation(c);i.array.push(u)}return i},this.getPolicyInformation=function(e){var t={},r=a(e,0,[0],"06");t.policyoid=h(r);var i=d(e,0,[1],"30");if(-1!=i){t.array=[];for(var s=n(e,i),c=0;c<s.length;c++){var u=o(e,s[c]),l=this.getPolicyQualifierInfo(u);t.array.push(l)}}return t},this.getPolicyQualifierInfo=function(e){var t={},r=a(e,0,[0],"06");if("2b06010505070201"===r){var n=s(e,0,[1],"16");t.cps=_e(n)}else if("2b06010505070202"===r){var i=c(e,0,[1],"30");t.unotice=this.getUserNotice(i)}return t},this.getUserNotice=function(e){for(var t={},r=n(e,0),i=0;i<r.length;i++){var a=o(e,r[i]);"30"!=a.substr(0,2)&&(t.exptext=this.getDisplayText(a))}return t},this.getDisplayText=function(e){var t={};return t.type={"0c":"utf8",16:"ia5","1a":"vis","1e":"bmp"}[e.substr(0,2)],t.str=_e(i(e,0)),t},this.getExtCRLNumber=function(e,t){var r={extname:"cRLNumber"};if(t&&(r.critical=!0),"02"==e.substr(0,2))return r.num={hex:i(e,0)},r;throw new Error("hExtV parse error: "+e)},this.getExtCRLReason=function(e,t){var r={extname:"cRLReason"};if(t&&(r.critical=!0),"0a"==e.substr(0,2))return r.code=parseInt(i(e,0),16),r;throw new Error("hExtV parse error: "+e)},this.getExtOcspNonce=function(e,t){var r={extname:"ocspNonce"};t&&(r.critical=!0);var n=i(e,0);return r.hex=n,r},this.getExtOcspNoCheck=function(e,t){var r={extname:"ocspNoCheck"};return t&&(r.critical=!0),r},this.getExtAdobeTimeStamp=function(e,t){if(void 0===e&&void 0===t){var r=this.getExtInfo("adobeTimeStamp");if(void 0===r)return;e=o(this.hex,r.vidx),t=r.critical}var i={extname:"adobeTimeStamp"};t&&(i.critical=!0);var a=n(e,0);if(a.length>1){var s=o(e,a[1]),c=this.getGeneralName(s);null!=c.uri&&(i.uri=c.uri)}if(a.length>2){var u=o(e,a[2]);"0101ff"==u&&(i.reqauth=!0),"010100"==u&&(i.reqauth=!1)}return i},this.getX500NameRule=function(e){for(var t=null,r=[],n=0;n<e.length;n++)for(var i=e[n],o=0;o<i.length;o++)r.push(i[o]);for(n=0;n<r.length;n++){var a=r[n],s=a.ds,c=a.value,u=a.type;if("prn"!=s&&"utf8"!=s&&"ia5"!=s)return"mixed";if("ia5"==s){if("CN"!=u)return"mixed";if(ce.lang.String.isMail(c))continue;return"mixed"}if("C"==u){if("prn"==s)continue;return"mixed"}if(null==t)t=s;else if(t!==s)return"mixed"}return null==t?"prn":t},this.getX500Name=function(e){var t=this.getX500NameArray(e);return{array:t,str:this.dnarraytostr(t)}},this.getX500NameArray=function(e){for(var t=[],r=n(e,0),i=0;i<r.length;i++)t.push(this.getRDN(o(e,r[i])));return t},this.getRDN=function(e){for(var t=[],r=n(e,0),i=0;i<r.length;i++)t.push(this.getAttrTypeAndValue(o(e,r[i])));return t},this.getAttrTypeAndValue=function(e){var t={type:null,value:null,ds:null},r=n(e,0),i=a(e,r[0],[],"06"),o=a(e,r[1],[]),s=ce.asn1.ASN1Util.oidHexToInt(i);return t.type=ce.asn1.x509.OID.oid2atype(s),t.ds=this.HEX2STAG[e.substr(r[1],2)],"bmp"!=t.ds?t.value=xe(o):t.value=Le(o),t},this.readCertPEM=function(e){this.readCertHex(g(e))},this.readCertHex=function(e){this.hex=e,this.getVersion();try{l(this.hex,0,[0,7],"a3"),this.parseExt()}catch(e){}},this.getParam=function(){var e={};return e.version=this.getVersion(),e.serial={hex:this.getSerialNumberHex()},e.sigalg=this.getSignatureAlgorithmField(),e.issuer=this.getIssuer(),e.notbefore=this.getNotBefore(),e.notafter=this.getNotAfter(),e.subject=this.getSubject(),e.sbjpubkey=Ce(this.getPublicKeyHex(),"PUBLIC KEY"),this.aExtInfo.length>0&&(e.ext=this.getExtParamArray()),e.sighex=this.getSignatureValueHex(),e},this.getExtParamArray=function(e){null==e&&-1!=d(this.hex,0,[0,"[3]"])&&(e=u(this.hex,0,[0,"[3]",0],"30"));for(var t=[],r=n(e,0),i=0;i<r.length;i++){var a=o(e,r[i]),s=this.getExtParam(a);null!=s&&t.push(s)}return t},this.getExtParam=function(e){var t=n(e,0).length;if(2!=t&&3!=t)throw new Error("wrong number elements in Extension: "+t+" "+e);var r=m(a(e,0,[0],"06")),i=!1;3==t&&"0101ff"==c(e,0,[1])&&(i=!0);var o=c(e,0,[t-1,0]),s=void 0;if("2.5.29.14"==r?s=this.getExtSubjectKeyIdentifier(o,i):"2.5.29.15"==r?s=this.getExtKeyUsage(o,i):"2.5.29.17"==r?s=this.getExtSubjectAltName(o,i):"2.5.29.18"==r?s=this.getExtIssuerAltName(o,i):"2.5.29.19"==r?s=this.getExtBasicConstraints(o,i):"2.5.29.31"==r?s=this.getExtCRLDistributionPoints(o,i):"2.5.29.32"==r?s=this.getExtCertificatePolicies(o,i):"2.5.29.35"==r?s=this.getExtAuthorityKeyIdentifier(o,i):"2.5.29.37"==r?s=this.getExtExtKeyUsage(o,i):"1.3.6.1.5.5.7.1.1"==r?s=this.getExtAuthorityInfoAccess(o,i):"2.5.29.20"==r?s=this.getExtCRLNumber(o,i):"2.5.29.21"==r?s=this.getExtCRLReason(o,i):"1.3.6.1.5.5.7.48.1.2"==r?s=this.getExtOcspNonce(o,i):"1.3.6.1.5.5.7.48.1.5"==r?s=this.getExtOcspNoCheck(o,i):"1.2.840.113583.1.1.9.1"==r&&(s=this.getExtAdobeTimeStamp(o,i)),null!=s)return s;var u={extname:r,extn:o};return i&&(u.critical=!0),u},this.findExt=function(e,t){for(var r=0;r<e.length;r++)if(e[r].extname==t)return e[r];return null},this.updateExtCDPFullURI=function(e,t){var r=this.findExt(e,"cRLDistributionPoints");if(null!=r&&null!=r.array)for(var n=r.array,i=0;i<n.length;i++)if(null!=n[i].dpname&&null!=n[i].dpname.full)for(var o=n[i].dpname.full,a=0;a<o.length;a++){var s=o[i];null!=s.uri&&(s.uri=t)}},this.updateExtAIAOCSP=function(e,t){var r=this.findExt(e,"authorityInfoAccess");if(null!=r&&null!=r.array)for(var n=r.array,i=0;i<n.length;i++)null!=n[i].ocsp&&(n[i].ocsp=t)},this.updateExtAIACAIssuer=function(e,t){var r=this.findExt(e,"authorityInfoAccess");if(null!=r&&null!=r.array)for(var n=r.array,i=0;i<n.length;i++)null!=n[i].caissuer&&(n[i].caissuer=t)},this.dnarraytostr=function(e){return"/"+e.map(function(e){return function(e){return e.map(function(e){return function(e){return e.type+"="+e.value}(e).replace(/\+/,"\\+")}).join("+")}(e).replace(/\//,"\\/")}).join("/")},this.getInfo=function(){var e,t,r,n=function(e){return JSON.stringify(e.array).replace(/[\[\]\{\}\"]/g,"")},i=function(e){for(var t="",r=e.array,n=0;n<r.length;n++){var i=r[n];if(t+=" policy oid: "+i.policyoid+"\n",void 0!==i.array)for(var o=0;o<i.array.length;o++){var a=i.array[o];void 0!==a.cps&&(t+=" cps: "+a.cps+"\n")}}return t},o=function(e){for(var t="",r=e.array,n=0;n<r.length;n++){var i=r[n];try{void 0!==i.dpname.full[0].uri&&(t+=" "+i.dpname.full[0].uri+"\n")}catch(e){}try{void 0!==i.dname.full[0].dn.hex&&(t+=" "+Je.hex2dn(i.dpname.full[0].dn.hex)+"\n")}catch(e){}}return t},a=function(e){for(var t="",r=e.array,n=0;n<r.length;n++){var i=r[n];void 0!==i.caissuer&&(t+=" caissuer: "+i.caissuer+"\n"),void 0!==i.ocsp&&(t+=" ocsp: "+i.ocsp+"\n")}return t};if(e="Basic Fields\n",e+=" serial number: "+this.getSerialNumberHex()+"\n",e+=" signature algorithm: "+this.getSignatureAlgorithmField()+"\n",e+=" issuer: "+this.getIssuerString()+"\n",e+=" notBefore: "+this.getNotBefore()+"\n",e+=" notAfter: "+this.getNotAfter()+"\n",e+=" subject: "+this.getSubjectString()+"\n",e+=" subject public key info: \n",e+=" key algorithm: "+(t=this.getPublicKey()).type+"\n","RSA"===t.type&&(e+=" n="+Me(t.n.toString(16)).substr(0,16)+"...\n",e+=" e="+Me(t.e.toString(16))+"\n"),null!=(r=this.aExtInfo)){e+="X509v3 Extensions:\n";for(var s=0;s<r.length;s++){var c=r[s],u=ce.asn1.x509.OID.oid2name(c.oid);""===u&&(u=c.oid);var l="";if(!0===c.critical&&(l="CRITICAL"),e+=" "+u+" "+l+":\n","basicConstraints"===u){var d=this.getExtBasicConstraints();void 0===d.cA?e+=" {}\n":(e+=" cA=true",void 0!==d.pathLen&&(e+=", pathLen="+d.pathLen),e+="\n")}else if("keyUsage"===u)e+=" "+this.getExtKeyUsageString()+"\n";else if("subjectKeyIdentifier"===u)e+=" "+this.getExtSubjectKeyIdentifier().kid.hex+"\n";else if("authorityKeyIdentifier"===u){var p=this.getExtAuthorityKeyIdentifier();void 0!==p.kid&&(e+=" kid="+p.kid.hex+"\n")}else"extKeyUsage"===u?e+=" "+this.getExtExtKeyUsage().array.join(", ")+"\n":"subjectAltName"===u?e+=" "+n(this.getExtSubjectAltName())+"\n":"cRLDistributionPoints"===u?e+=o(this.getExtCRLDistributionPoints()):"authorityInfoAccess"===u?e+=a(this.getExtAuthorityInfoAccess()):"certificatePolicies"===u&&(e+=i(this.getExtCertificatePolicies()))}}return(e+="signature algorithm: "+this.getSignatureAlgorithmName()+"\n")+"signature: "+this.getSignatureValueHex().substr(0,16)+"...\n"},"string"==typeof e&&(-1!=e.indexOf("-----BEGIN")?this.readCertPEM(e):ce.lang.String.isHex(e)&&this.readCertHex(e))}qe.getKey=function(e,t,r){var n,i=(v=de).getChildIdx,o=(v.getV,v.getVbyList),a=ce.crypto,s=a.ECDSA,c=a.DSA,u=ne,l=Te,d=qe;if(void 0!==u&&e instanceof u)return e;if(void 0!==s&&e instanceof s)return e;if(void 0!==c&&e instanceof c)return e;if(void 0!==e.curve&&void 0!==e.xy&&void 0===e.d)return new s({pub:e.xy,curve:e.curve});if(void 0!==e.curve&&void 0!==e.d)return new s({prv:e.d,curve:e.curve});if(void 0===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0===e.d)return(I=new u).setPublic(e.n,e.e),I;if(void 0===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d&&void 0!==e.p&&void 0!==e.q&&void 0!==e.dp&&void 0!==e.dq&&void 0!==e.co&&void 0===e.qi)return(I=new u).setPrivateEx(e.n,e.e,e.d,e.p,e.q,e.dp,e.dq,e.co),I;if(void 0===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d&&void 0===e.p)return(I=new u).setPrivate(e.n,e.e,e.d),I;if(void 0!==e.p&&void 0!==e.q&&void 0!==e.g&&void 0!==e.y&&void 0===e.x)return(I=new c).setPublic(e.p,e.q,e.g,e.y),I;if(void 0!==e.p&&void 0!==e.q&&void 0!==e.g&&void 0!==e.y&&void 0!==e.x)return(I=new c).setPrivate(e.p,e.q,e.g,e.y,e.x),I;if("RSA"===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0===e.d)return(I=new u).setPublic(be(e.n),be(e.e)),I;if("RSA"===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d&&void 0!==e.p&&void 0!==e.q&&void 0!==e.dp&&void 0!==e.dq&&void 0!==e.qi)return(I=new u).setPrivateEx(be(e.n),be(e.e),be(e.d),be(e.p),be(e.q),be(e.dp),be(e.dq),be(e.qi)),I;if("RSA"===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d)return(I=new u).setPrivate(be(e.n),be(e.e),be(e.d)),I;if("EC"===e.kty&&void 0!==e.crv&&void 0!==e.x&&void 0!==e.y&&void 0===e.d){var p=(T=new s({curve:e.crv})).ecparams.keylen/4,f="04"+("0000000000"+be(e.x)).slice(-p)+("0000000000"+be(e.y)).slice(-p);return T.setPublicKeyHex(f),T}if("EC"===e.kty&&void 0!==e.crv&&void 0!==e.x&&void 0!==e.y&&void 0!==e.d){p=(T=new s({curve:e.crv})).ecparams.keylen/4,f="04"+("0000000000"+be(e.x)).slice(-p)+("0000000000"+be(e.y)).slice(-p);var h=("0000000000"+be(e.d)).slice(-p);return T.setPublicKeyHex(f),T.setPrivateKeyHex(h),T}if("pkcs5prv"===r){var m,g=e,v=de;if(9===(m=i(g,0)).length)(I=new u).readPKCS5PrvKeyHex(g);else if(6===m.length)(I=new c).readPKCS5PrvKeyHex(g);else{if(!(m.length>2&&"04"===g.substr(m[1],2)))throw new Error("unsupported PKCS#1/5 hexadecimal key");(I=new s).readPKCS5PrvKeyHex(g)}return I}if("pkcs8prv"===r)return d.getKeyFromPlainPrivatePKCS8Hex(e);if("pkcs8pub"===r)return d._getKeyFromPublicPKCS8Hex(e);if("x509pub"===r)return Je.getPublicKeyFromCertHex(e);if(-1!=e.indexOf("-END CERTIFICATE-",0)||-1!=e.indexOf("-END X509 CERTIFICATE-",0)||-1!=e.indexOf("-END TRUSTED CERTIFICATE-",0))return Je.getPublicKeyFromCertPEM(e);if(-1!=e.indexOf("-END PUBLIC KEY-")){var y=Te(e,"PUBLIC KEY");return d._getKeyFromPublicPKCS8Hex(y)}if(-1!=e.indexOf("-END RSA PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED")){var b=l(e,"RSA PRIVATE KEY");return d.getKey(b,null,"pkcs5prv")}if(-1!=e.indexOf("-END DSA PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED")){var w=o(n=l(e,"DSA PRIVATE KEY"),0,[1],"02"),x=o(n,0,[2],"02"),E=o(n,0,[3],"02"),S=o(n,0,[4],"02"),A=o(n,0,[5],"02");return(I=new c).setPrivate(new _(w,16),new _(x,16),new _(E,16),new _(S,16),new _(A,16)),I}if(-1!=e.indexOf("-END EC PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED"))return b=l(e,"EC PRIVATE KEY"),d.getKey(b,null,"pkcs5prv");if(-1!=e.indexOf("-END PRIVATE KEY-"))return d.getKeyFromPlainPrivatePKCS8PEM(e);if(-1!=e.indexOf("-END RSA PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED")){var k=d.getDecryptedKeyHex(e,t),C=new ne;return C.readPKCS5PrvKeyHex(k),C}if(-1!=e.indexOf("-END EC PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED")){var T,I=o(n=d.getDecryptedKeyHex(e,t),0,[1],"04"),F=o(n,0,[2,0],"06"),P=o(n,0,[3,0],"03").substr(2);if(void 0===ce.crypto.OID.oidhex2name[F])throw new Error("undefined OID(hex) in KJUR.crypto.OID: "+F);return(T=new s({curve:ce.crypto.OID.oidhex2name[F]})).setPublicKeyHex(P),T.setPrivateKeyHex(I),T.isPublic=!1,T}if(-1!=e.indexOf("-END DSA PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED"))return w=o(n=d.getDecryptedKeyHex(e,t),0,[1],"02"),x=o(n,0,[2],"02"),E=o(n,0,[3],"02"),S=o(n,0,[4],"02"),A=o(n,0,[5],"02"),(I=new c).setPrivate(new _(w,16),new _(x,16),new _(E,16),new _(S,16),new _(A,16)),I;if(-1!=e.indexOf("-END ENCRYPTED PRIVATE KEY-"))return d.getKeyFromEncryptedPKCS8PEM(e,t);throw new Error("not supported argument")},qe.generateKeypair=function(e,t){if("RSA"==e){var r=t;(a=new ne).generate(r,"10001"),a.isPrivate=!0,a.isPublic=!0;var n=new ne,i=a.n.toString(16),o=a.e.toString(16);return n.setPublic(i,o),n.isPrivate=!1,n.isPublic=!0,(s={}).prvKeyObj=a,s.pubKeyObj=n,s}if("EC"==e){var a,s,c=t,u=new ce.crypto.ECDSA({curve:c}).generateKeyPairHex();return(a=new ce.crypto.ECDSA({curve:c})).setPublicKeyHex(u.ecpubhex),a.setPrivateKeyHex(u.ecprvhex),a.isPrivate=!0,a.isPublic=!1,(n=new ce.crypto.ECDSA({curve:c})).setPublicKeyHex(u.ecpubhex),n.isPrivate=!1,n.isPublic=!0,(s={}).prvKeyObj=a,s.pubKeyObj=n,s}throw new Error("unknown algorithm: "+e)},qe.getPEM=function(e,t,r,n,i,o){var a=ce,s=a.asn1,c=s.DERObjectIdentifier,u=s.DERInteger,l=s.ASN1Util.newObject,d=s.x509.SubjectPublicKeyInfo,p=a.crypto,f=p.DSA,h=p.ECDSA,m=ne;function v(e){return l({seq:[{int:0},{int:{bigint:e.n}},{int:e.e},{int:{bigint:e.d}},{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.dmp1}},{int:{bigint:e.dmq1}},{int:{bigint:e.coeff}}]})}function y(e){return l({seq:[{int:1},{octstr:{hex:e.prvKeyHex}},{tag:["a0",!0,{oid:{name:e.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+e.pubKeyHex}}]}]})}function b(e){return l({seq:[{int:0},{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}},{int:{bigint:e.y}},{int:{bigint:e.x}}]})}if((void 0!==m&&e instanceof m||void 0!==f&&e instanceof f||void 0!==h&&e instanceof h)&&1==e.isPublic&&(void 0===t||"PKCS8PUB"==t))return Ce(E=new d(e).getEncodedHex(),"PUBLIC KEY");if("PKCS1PRV"==t&&void 0!==m&&e instanceof m&&(void 0===r||null==r)&&1==e.isPrivate)return Ce(E=v(e).getEncodedHex(),"RSA PRIVATE KEY");if("PKCS1PRV"==t&&void 0!==h&&e instanceof h&&(void 0===r||null==r)&&1==e.isPrivate){var w=new c({name:e.curveName}).getEncodedHex(),x=y(e).getEncodedHex(),_="";return(_+=Ce(w,"EC PARAMETERS"))+Ce(x,"EC PRIVATE KEY")}if("PKCS1PRV"==t&&void 0!==f&&e instanceof f&&(void 0===r||null==r)&&1==e.isPrivate)return Ce(E=b(e).getEncodedHex(),"DSA PRIVATE KEY");if("PKCS5PRV"==t&&void 0!==m&&e instanceof m&&void 0!==r&&null!=r&&1==e.isPrivate){var E=v(e).getEncodedHex();return void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",E,r,n,o)}if("PKCS5PRV"==t&&void 0!==h&&e instanceof h&&void 0!==r&&null!=r&&1==e.isPrivate)return E=y(e).getEncodedHex(),void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",E,r,n,o);if("PKCS5PRV"==t&&void 0!==f&&e instanceof f&&void 0!==r&&null!=r&&1==e.isPrivate)return E=b(e).getEncodedHex(),void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",E,r,n,o);var S=function(e,t){var r=A(e,t);return new l({seq:[{seq:[{oid:{name:"pkcs5PBES2"}},{seq:[{seq:[{oid:{name:"pkcs5PBKDF2"}},{seq:[{octstr:{hex:r.pbkdf2Salt}},{int:r.pbkdf2Iter}]}]},{seq:[{oid:{name:"des-EDE3-CBC"}},{octstr:{hex:r.encryptionSchemeIV}}]}]}]},{octstr:{hex:r.ciphertext}}]}).getEncodedHex()},A=function(e,t){var r=g.lib.WordArray.random(8),n=g.lib.WordArray.random(8),i=g.PBKDF2(t,r,{keySize:6,iterations:100}),o=g.enc.Hex.parse(e),a=g.TripleDES.encrypt(o,i,{iv:n})+"",s={};return s.ciphertext=a,s.pbkdf2Salt=g.enc.Hex.stringify(r),s.pbkdf2Iter=100,s.encryptionSchemeAlg="DES-EDE3-CBC",s.encryptionSchemeIV=g.enc.Hex.stringify(n),s};if("PKCS8PRV"==t&&null!=m&&e instanceof m&&1==e.isPrivate){var k=v(e).getEncodedHex();return E=l({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:k}}]}).getEncodedHex(),void 0===r||null==r?Ce(E,"PRIVATE KEY"):Ce(x=S(E,r),"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==t&&void 0!==h&&e instanceof h&&1==e.isPrivate)return k=new l({seq:[{int:1},{octstr:{hex:e.prvKeyHex}},{tag:["a1",!0,{bitstr:{hex:"00"+e.pubKeyHex}}]}]}).getEncodedHex(),E=l({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:e.curveName}}]},{octstr:{hex:k}}]}).getEncodedHex(),void 0===r||null==r?Ce(E,"PRIVATE KEY"):Ce(x=S(E,r),"ENCRYPTED PRIVATE KEY");if("PKCS8PRV"==t&&void 0!==f&&e instanceof f&&1==e.isPrivate)return k=new u({bigint:e.x}).getEncodedHex(),E=l({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}}]}]},{octstr:{hex:k}}]}).getEncodedHex(),void 0===r||null==r?Ce(E,"PRIVATE KEY"):Ce(x=S(E,r),"ENCRYPTED PRIVATE KEY");throw new Error("unsupported object nor format")},qe.getKeyFromCSRPEM=function(e){var t=Te(e,"CERTIFICATE REQUEST");return qe.getKeyFromCSRHex(t)},qe.getKeyFromCSRHex=function(e){var t=qe.parseCSRHex(e);return qe.getKey(t.p8pubkeyhex,null,"pkcs8pub")},qe.parseCSRHex=function(e){var t=de,r=t.getChildIdx,n=t.getTLV,i={},o=e;if("30"!=o.substr(0,2))throw new Error("malformed CSR(code:001)");var a=r(o,0);if(a.length<1)throw new Error("malformed CSR(code:002)");if("30"!=o.substr(a[0],2))throw new Error("malformed CSR(code:003)");var s=r(o,a[0]);if(s.length<3)throw new Error("malformed CSR(code:004)");return i.p8pubkeyhex=n(o,s[2]),i},qe.getKeyID=function(e){var t=qe,r=de;"string"==typeof e&&-1!=e.indexOf("BEGIN ")&&(e=t.getKey(e));var n=Te(t.getPEM(e)),i=r.getIdxbyList(n,0,[1]),o=r.getV(n,i).substring(2);return ce.crypto.Util.hashHex(o,"sha1")},qe.getJWKFromKey=function(e){var t={};if(e instanceof ne&&e.isPrivate)return t.kty="RSA",t.n=ye(e.n.toString(16)),t.e=ye(e.e.toString(16)),t.d=ye(e.d.toString(16)),t.p=ye(e.p.toString(16)),t.q=ye(e.q.toString(16)),t.dp=ye(e.dmp1.toString(16)),t.dq=ye(e.dmq1.toString(16)),t.qi=ye(e.coeff.toString(16)),t;if(e instanceof ne&&e.isPublic)return t.kty="RSA",t.n=ye(e.n.toString(16)),t.e=ye(e.e.toString(16)),t;if(e instanceof ce.crypto.ECDSA&&e.isPrivate){if("P-256"!==(n=e.getShortNISTPCurveName())&&"P-384"!==n)throw new Error("unsupported curve name for JWT: "+n);var r=e.getPublicKeyXYHex();return t.kty="EC",t.crv=n,t.x=ye(r.x),t.y=ye(r.y),t.d=ye(e.prvKeyHex),t}if(e instanceof ce.crypto.ECDSA&&e.isPublic){var n;if("P-256"!==(n=e.getShortNISTPCurveName())&&"P-384"!==n)throw new Error("unsupported curve name for JWT: "+n);return r=e.getPublicKeyXYHex(),t.kty="EC",t.crv=n,t.x=ye(r.x),t.y=ye(r.y),t}throw new Error("not supported key object")},ne.getPosArrayOfChildrenFromHex=function(e){return de.getChildIdx(e,0)},ne.getHexValueArrayOfChildrenFromHex=function(e){var t,r=de.getV,n=r(e,(t=ne.getPosArrayOfChildrenFromHex(e))[0]),i=r(e,t[1]),o=r(e,t[2]),a=r(e,t[3]),s=r(e,t[4]),c=r(e,t[5]),u=r(e,t[6]),l=r(e,t[7]),d=r(e,t[8]);return(t=new Array).push(n,i,o,a,s,c,u,l,d),t},ne.prototype.readPrivateKeyFromPEMString=function(e){var t=Te(e),r=ne.getHexValueArrayOfChildrenFromHex(t);this.setPrivateEx(r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8])},ne.prototype.readPKCS5PrvKeyHex=function(e){var t=ne.getHexValueArrayOfChildrenFromHex(e);this.setPrivateEx(t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},ne.prototype.readPKCS8PrvKeyHex=function(e){var t,r,n,i,o,a,s,c,u=de,l=u.getVbyListEx;if(!1===u.isASN1HEX(e))throw new Error("not ASN.1 hex string");try{t=l(e,0,[2,0,1],"02"),r=l(e,0,[2,0,2],"02"),n=l(e,0,[2,0,3],"02"),i=l(e,0,[2,0,4],"02"),o=l(e,0,[2,0,5],"02"),a=l(e,0,[2,0,6],"02"),s=l(e,0,[2,0,7],"02"),c=l(e,0,[2,0,8],"02")}catch(e){throw new Error("malformed PKCS#8 plain RSA private key")}this.setPrivateEx(t,r,n,i,o,a,s,c)},ne.prototype.readPKCS5PubKeyHex=function(e){var t=de,r=t.getV;if(!1===t.isASN1HEX(e))throw new Error("keyHex is not ASN.1 hex string");var n=t.getChildIdx(e,0);if(2!==n.length||"02"!==e.substr(n[0],2)||"02"!==e.substr(n[1],2))throw new Error("wrong hex for PKCS#5 public key");var i=r(e,n[0]),o=r(e,n[1]);this.setPublic(i,o)},ne.prototype.readPKCS8PubKeyHex=function(e){var t=de;if(!1===t.isASN1HEX(e))throw new Error("not ASN.1 hex string");if("06092a864886f70d010101"!==t.getTLVbyListEx(e,0,[0,0]))throw new Error("not PKCS8 RSA public key");var r=t.getTLVbyListEx(e,0,[1,0]);this.readPKCS5PubKeyHex(r)},ne.prototype.readCertPubKeyHex=function(e,t){var r,n;(r=new Je).readCertHex(e),n=r.getPublicKeyHex(),this.readPKCS8PubKeyHex(n)},new RegExp("[^0-9a-f]","gi"),ne.prototype.sign=function(e,t){var r=function(e){return ce.crypto.Util.hashString(e,t)}(e);return this.signWithMessageHash(r,t)},ne.prototype.signWithMessageHash=function(e,t){var r=te(ce.crypto.Util.getPaddedDigestInfoHex(e,t,this.n.bitLength()),16);return We(this.doPrivate(r).toString(16),this.n.bitLength())},ne.prototype.signPSS=function(e,t,r){var n=function(e){return ce.crypto.Util.hashHex(e,t)}(Ee(e));return void 0===r&&(r=-1),this.signWithMessageHashPSS(n,t,r)},ne.prototype.signWithMessageHashPSS=function(e,t,r){var n,i=_e(e),o=i.length,a=this.n.bitLength()-1,s=Math.ceil(a/8),c=function(e){return ce.crypto.Util.hashHex(e,t)};if(-1===r||void 0===r)r=o;else if(-2===r)r=s-o-2;else if(r<-2)throw new Error("invalid salt length");if(s<o+r+2)throw new Error("data too long");var u="";r>0&&(u=new Array(r),(new ee).nextBytes(u),u=String.fromCharCode.apply(String,u));var l=_e(c(Ee("\0\0\0\0\0\0\0\0"+i+u))),d=[];for(n=0;n<s-r-o-2;n+=1)d[n]=0;var p=String.fromCharCode.apply(String,d)+""+u,f=Ve(l,p.length,c),h=[];for(n=0;n<p.length;n+=1)h[n]=p.charCodeAt(n)^f.charCodeAt(n);var m=65280>>8*s-a&255;for(h[0]&=~m,n=0;n<o;n++)h.push(l.charCodeAt(n));return h.push(188),We(this.doPrivate(new _(h)).toString(16),this.n.bitLength())},ne.prototype.verify=function(e,t){if(null==(t=t.toLowerCase()).match(/^[0-9a-f]+$/))return!1;var r=te(t,16),n=this.n.bitLength();if(r.bitLength()>n)return!1;var i=this.doPublic(r).toString(16);if(i.length+3!=n/4)return!1;var o=Ke(i.replace(/^1f+00/,""));if(0==o.length)return!1;var a=o[0];return o[1]==function(e){return ce.crypto.Util.hashString(e,a)}(e)},ne.prototype.verifyWithMessageHash=function(e,t){if(t.length!=Math.ceil(this.n.bitLength()/4))return!1;var r=te(t,16);if(r.bitLength()>this.n.bitLength())return 0;var n=Ke(this.doPublic(r).toString(16).replace(/^1f+00/,""));return 0!=n.length&&(n[0],n[1]==e)},ne.prototype.verifyPSS=function(e,t,r,n){var i=function(e){return ce.crypto.Util.hashHex(e,r)}(Ee(e));return void 0===n&&(n=-1),this.verifyWithMessageHashPSS(i,t,r,n)},ne.prototype.verifyWithMessageHashPSS=function(e,t,r,n){if(t.length!=Math.ceil(this.n.bitLength()/4))return!1;var i,o=new _(t,16),a=function(e){return ce.crypto.Util.hashHex(e,r)},s=_e(e),c=s.length,u=this.n.bitLength()-1,l=Math.ceil(u/8);if(-1===n||void 0===n)n=c;else if(-2===n)n=l-c-2;else if(n<-2)throw new Error("invalid salt length");if(l<c+n+2)throw new Error("data too long");var d=this.doPublic(o).toByteArray();for(i=0;i<d.length;i+=1)d[i]&=255;for(;d.length<l;)d.unshift(0);if(188!==d[l-1])throw new Error("encoded message does not end in 0xbc");var p=(d=String.fromCharCode.apply(String,d)).substr(0,l-c-1),f=d.substr(p.length,c),h=65280>>8*l-u&255;if(0!=(p.charCodeAt(0)&h))throw new Error("bits beyond keysize not zero");var m=Ve(f,p.length,a),g=[];for(i=0;i<p.length;i+=1)g[i]=p.charCodeAt(i)^m.charCodeAt(i);g[0]&=~h;var v=l-c-n-2;for(i=0;i<v;i+=1)if(0!==g[i])throw new Error("leftmost octets not zero");if(1!==g[v])throw new Error("0x01 marker not found");return f===_e(a(Ee("\0\0\0\0\0\0\0\0"+s+String.fromCharCode.apply(String,g.slice(-n)))))},ne.SALT_LEN_HLEN=-1,ne.SALT_LEN_MAX=-2,ne.SALT_LEN_RECOVER=-2,Je.hex2dn=function(e,t){void 0===t&&(t=0);var r=new Je;return de.getTLV(e,t),r.getX500Name(e).str},Je.hex2rdn=function(e,t){if(void 0===t&&(t=0),"31"!==e.substr(t,2))throw new Error("malformed RDN");for(var r=new Array,n=de.getChildIdx(e,t),i=0;i<n.length;i++)r.push(Je.hex2attrTypeValue(e,n[i]));return(r=r.map(function(e){return e.replace("+","\\+")})).join("+")},Je.hex2attrTypeValue=function(e,t){var r=de,n=r.getV;if(void 0===t&&(t=0),"30"!==e.substr(t,2))throw new Error("malformed attribute type and value");var i=r.getChildIdx(e,t);2!==i.length||e.substr(i[0],2);var o=n(e,i[0]),a=ce.asn1.ASN1Util.oidHexToInt(o);return ce.asn1.x509.OID.oid2atype(a)+"="+_e(n(e,i[1]))},Je.getPublicKeyFromCertHex=function(e){var t=new Je;return t.readCertHex(e),t.getPublicKey()},Je.getPublicKeyFromCertPEM=function(e){var t=new Je;return t.readCertPEM(e),t.getPublicKey()},Je.getPublicKeyInfoPropOfCertPEM=function(e){var t,r,n=de.getVbyList,i={algparam:null};return(t=new Je).readCertPEM(e),r=t.getPublicKeyHex(),i.keyhex=n(r,0,[1],"03").substr(2),i.algoid=n(r,0,[0,0],"06"),"2a8648ce3d0201"===i.algoid&&(i.algparam=n(r,0,[0,1],"06")),i},Je.KEYUSAGE_NAME=["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment","keyAgreement","keyCertSign","cRLSign","encipherOnly","decipherOnly"],void 0!==ce&&ce||(t.KJUR=ce={}),void 0!==ce.jws&&ce.jws||(ce.jws={}),ce.jws.JWS=function(){var e=ce.jws.JWS.isSafeJSONString;this.parseJWS=function(t,r){if(void 0===this.parsedJWS||!r&&void 0===this.parsedJWS.sigvalH){var n=t.match(/^([^.]+)\.([^.]+)\.([^.]+)$/);if(null==n)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";var i=n[1],o=n[2],a=n[3],s=i+"."+o;if(this.parsedJWS={},this.parsedJWS.headB64U=i,this.parsedJWS.payloadB64U=o,this.parsedJWS.sigvalB64U=a,this.parsedJWS.si=s,!r){var c=be(a),u=te(c,16);this.parsedJWS.sigvalH=c,this.parsedJWS.sigvalBI=u}var l=le(i),d=le(o);if(this.parsedJWS.headS=l,this.parsedJWS.payloadS=d,!e(l,this.parsedJWS,"headP"))throw"malformed JSON string for JWS Head: "+l}}},ce.jws.JWS.sign=function(e,t,r,n,i){var o,a,s,c=ce,u=c.jws.JWS,l=u.readSafeJSONString,d=u.isSafeJSONString,p=c.crypto,h=(p.ECDSA,p.Mac),m=p.Signature,g=JSON;if("string"!=typeof t&&"object"!=(void 0===t?"undefined":f(t)))throw"spHeader must be JSON string or object: "+t;if("object"==(void 0===t?"undefined":f(t))&&(a=t,o=g.stringify(a)),"string"==typeof t){if(!d(o=t))throw"JWS Head is not safe JSON string: "+o;a=l(o)}if(s=r,"object"==(void 0===r?"undefined":f(r))&&(s=g.stringify(r)),""!=e&&null!=e||void 0===a.alg||(e=a.alg),""!=e&&null!=e&&void 0===a.alg&&(a.alg=e,o=g.stringify(a)),e!==a.alg)throw"alg and sHeader.alg doesn't match: "+e+"!="+a.alg;var v=null;if(void 0===u.jwsalg2sigalg[e])throw"unsupported alg name: "+e;v=u.jwsalg2sigalg[e];var y=ue(o)+"."+ue(s),b="";if("Hmac"==v.substr(0,4)){if(void 0===n)throw"mac key shall be specified for HS* alg";var w=new h({alg:v,prov:"cryptojs",pass:n});w.updateString(y),b=w.doFinal()}else if(-1!=v.indexOf("withECDSA")){(_=new m({alg:v})).init(n,i),_.updateString(y);var x=_.sign();b=ce.crypto.ECDSA.asn1SigToConcatSig(x)}else{var _;"none"!=v&&((_=new m({alg:v})).init(n,i),_.updateString(y),b=_.sign())}return y+"."+ye(b)},ce.jws.JWS.verify=function(e,t,r){var n,i=ce,o=i.jws.JWS,a=o.readSafeJSONString,s=i.crypto,c=s.ECDSA,u=s.Mac,l=s.Signature;void 0!==f(ne)&&(n=ne);var d=e.split(".");if(3!==d.length)return!1;var p,h=d[0]+"."+d[1],m=be(d[2]),g=a(le(d[0])),v=null;if(void 0===g.alg)throw"algorithm not specified in header";if(p=(v=g.alg).substr(0,2),null!=r&&"[object Array]"===Object.prototype.toString.call(r)&&r.length>0&&-1==(":"+r.join(":")+":").indexOf(":"+v+":"))throw"algorithm '"+v+"' not accepted in the list";if("none"!=v&&null===t)throw"key shall be specified to verify.";if("string"==typeof t&&-1!=t.indexOf("-----BEGIN ")&&(t=qe.getKey(t)),!("RS"!=p&&"PS"!=p||t instanceof n))throw"key shall be a RSAKey obj for RS* and PS* algs";if("ES"==p&&!(t instanceof c))throw"key shall be a ECDSA obj for ES* algs";var y=null;if(void 0===o.jwsalg2sigalg[g.alg])throw"unsupported alg name: "+v;if("none"==(y=o.jwsalg2sigalg[v]))throw"not supported";if("Hmac"==y.substr(0,4)){if(void 0===t)throw"hexadecimal key shall be specified for HMAC";var b=new u({alg:y,pass:t});return b.updateString(h),m==b.doFinal()}if(-1!=y.indexOf("withECDSA")){var w,x=null;try{x=c.concatSigToASN1Sig(m)}catch(e){return!1}return(w=new l({alg:y})).init(t),w.updateString(h),w.verify(x)}return(w=new l({alg:y})).init(t),w.updateString(h),w.verify(m)},ce.jws.JWS.parse=function(e){var t,r,n,i=e.split("."),o={};if(2!=i.length&&3!=i.length)throw"malformed sJWS: wrong number of '.' splitted elements";return t=i[0],r=i[1],3==i.length&&(n=i[2]),o.headerObj=ce.jws.JWS.readSafeJSONString(le(t)),o.payloadObj=ce.jws.JWS.readSafeJSONString(le(r)),o.headerPP=JSON.stringify(o.headerObj,null," "),null==o.payloadObj?o.payloadPP=le(r):o.payloadPP=JSON.stringify(o.payloadObj,null," "),void 0!==n&&(o.sigHex=be(n)),o},ce.jws.JWS.verifyJWT=function(e,t,r){var n=ce.jws,i=n.JWS,o=i.readSafeJSONString,a=i.inArray,s=i.includedArray,c=e.split("."),u=c[0],l=c[1],d=(be(c[2]),o(le(u))),p=o(le(l));if(void 0===d.alg)return!1;if(void 0===r.alg)throw"acceptField.alg shall be specified";if(!a(d.alg,r.alg))return!1;if(void 0!==p.iss&&"object"===f(r.iss)&&!a(p.iss,r.iss))return!1;if(void 0!==p.sub&&"object"===f(r.sub)&&!a(p.sub,r.sub))return!1;if(void 0!==p.aud&&"object"===f(r.aud))if("string"==typeof p.aud){if(!a(p.aud,r.aud))return!1}else if("object"==f(p.aud)&&!s(p.aud,r.aud))return!1;var h=n.IntDate.getNow();return void 0!==r.verifyAt&&"number"==typeof r.verifyAt&&(h=r.verifyAt),void 0!==r.gracePeriod&&"number"==typeof r.gracePeriod||(r.gracePeriod=0),!(void 0!==p.exp&&"number"==typeof p.exp&&p.exp+r.gracePeriod<h||void 0!==p.nbf&&"number"==typeof p.nbf&&h<p.nbf-r.gracePeriod||void 0!==p.iat&&"number"==typeof p.iat&&h<p.iat-r.gracePeriod||void 0!==p.jti&&void 0!==r.jti&&p.jti!==r.jti||!i.verify(e,t,r.alg))},ce.jws.JWS.includedArray=function(e,t){var r=ce.jws.JWS.inArray;if(null===e)return!1;if("object"!==(void 0===e?"undefined":f(e)))return!1;if("number"!=typeof e.length)return!1;for(var n=0;n<e.length;n++)if(!r(e[n],t))return!1;return!0},ce.jws.JWS.inArray=function(e,t){if(null===t)return!1;if("object"!==(void 0===t?"undefined":f(t)))return!1;if("number"!=typeof t.length)return!1;for(var r=0;r<t.length;r++)if(t[r]==e)return!0;return!1},ce.jws.JWS.jwsalg2sigalg={HS256:"HmacSHA256",HS384:"HmacSHA384",HS512:"HmacSHA512",RS256:"SHA256withRSA",RS384:"SHA384withRSA",RS512:"SHA512withRSA",ES256:"SHA256withECDSA",ES384:"SHA384withECDSA",PS256:"SHA256withRSAandMGF1",PS384:"SHA384withRSAandMGF1",PS512:"SHA512withRSAandMGF1",none:"none"},ce.jws.JWS.isSafeJSONString=function(e,t,r){var n=null;try{return"object"!=(void 0===(n=se(e))?"undefined":f(n))||n.constructor===Array?0:(t&&(t[r]=n),1)}catch(e){return 0}},ce.jws.JWS.readSafeJSONString=function(e){var t=null;try{return"object"!=(void 0===(t=se(e))?"undefined":f(t))||t.constructor===Array?null:t}catch(e){return null}},ce.jws.JWS.getEncodedSignatureValueFromJWS=function(e){var t=e.match(/^[^.]+\.[^.]+\.([^.]+)$/);if(null==t)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";return t[1]},ce.jws.JWS.getJWKthumbprint=function(e){if("RSA"!==e.kty&&"EC"!==e.kty&&"oct"!==e.kty)throw"unsupported algorithm for JWK Thumprint";var t="{";if("RSA"===e.kty){if("string"!=typeof e.n||"string"!=typeof e.e)throw"wrong n and e value for RSA key";t+='"e":"'+e.e+'",',t+='"kty":"'+e.kty+'",',t+='"n":"'+e.n+'"}'}else if("EC"===e.kty){if("string"!=typeof e.crv||"string"!=typeof e.x||"string"!=typeof e.y)throw"wrong crv, x and y value for EC key";t+='"crv":"'+e.crv+'",',t+='"kty":"'+e.kty+'",',t+='"x":"'+e.x+'",',t+='"y":"'+e.y+'"}'}else if("oct"===e.kty){if("string"!=typeof e.k)throw"wrong k value for oct(symmetric) key";t+='"kty":"'+e.kty+'",',t+='"k":"'+e.k+'"}'}var r=Ee(t);return ye(ce.crypto.Util.hashHex(r,"sha256"))},ce.jws.IntDate={},ce.jws.IntDate.get=function(e){var t=ce.jws.IntDate,r=t.getNow,n=t.getZulu;if("now"==e)return r();if("now + 1hour"==e)return r()+3600;if("now + 1day"==e)return r()+86400;if("now + 1month"==e)return r()+2592e3;if("now + 1year"==e)return r()+31536e3;if(e.match(/Z$/))return n(e);if(e.match(/^[0-9]+$/))return parseInt(e);throw"unsupported format: "+e},ce.jws.IntDate.getZulu=function(e){return Fe(e)},ce.jws.IntDate.getNow=function(){return~~(new Date/1e3)},ce.jws.IntDate.intDate2UTCString=function(e){return new Date(1e3*e).toUTCString()},ce.jws.IntDate.intDate2Zulu=function(e){var t=new Date(1e3*e);return("0000"+t.getUTCFullYear()).slice(-4)+("00"+(t.getUTCMonth()+1)).slice(-2)+("00"+t.getUTCDate()).slice(-2)+("00"+t.getUTCHours()).slice(-2)+("00"+t.getUTCMinutes()).slice(-2)+("00"+t.getUTCSeconds()).slice(-2)+"Z"},t.SecureRandom=ee,t.rng_seed_time=$,t.BigInteger=_,t.RSAKey=ne;var ze=ce.crypto.EDSA;t.EDSA=ze;var $e=ce.crypto.DSA;t.DSA=$e;var Ge=ce.crypto.Signature;t.Signature=Ge;var Xe=ce.crypto.MessageDigest;t.MessageDigest=Xe;var Ye=ce.crypto.Mac;t.Mac=Ye;var Qe=ce.crypto.Cipher;t.Cipher=Qe,t.KEYUTIL=qe,t.ASN1HEX=de,t.X509=Je,t.CryptoJS=g,t.b64tohex=w,t.b64toBA=x,t.stoBA=pe,t.BAtos=fe,t.BAtohex=he,t.stohex=me,t.stob64=function(e){return b(me(e))},t.stob64u=function(e){return ge(b(me(e)))},t.b64utos=function(e){return fe(x(ve(e)))},t.b64tob64u=ge,t.b64utob64=ve,t.hex2b64=b,t.hextob64u=ye,t.b64utohex=be,t.utf8tob64u=ue,t.b64utoutf8=le,t.utf8tob64=function(e){return b(Pe(De(e)))},t.b64toutf8=function(e){return decodeURIComponent(Ne(w(e)))},t.utf8tohex=we,t.hextoutf8=xe,t.hextorstr=_e,t.rstrtohex=Ee,t.hextob64=Se,t.hextob64nl=Ae,t.b64nltohex=ke,t.hextopem=Ce,t.pemtohex=Te,t.hextoArrayBuffer=function(e){if(e.length%2!=0)throw"input is not even length";if(null==e.match(/^[0-9A-Fa-f]+$/))throw"input is not hexadecimal";for(var t=new ArrayBuffer(e.length/2),r=new DataView(t),n=0;n<e.length/2;n++)r.setUint8(n,parseInt(e.substr(2*n,2),16));return t},t.ArrayBuffertohex=function(e){for(var t="",r=new DataView(e),n=0;n<e.byteLength;n++)t+=("00"+r.getUint8(n).toString(16)).slice(-2);return t},t.zulutomsec=Ie,t.zulutosec=Fe,t.zulutodate=function(e){return new Date(Ie(e))},t.datetozulu=function(e,t,r){var n,i=e.getUTCFullYear();if(t){if(i<1950||2049<i)throw"not proper year for UTCTime: "+i;n=(""+i).slice(-2)}else n=("000"+i).slice(-4);if(n+=("0"+(e.getUTCMonth()+1)).slice(-2),n+=("0"+e.getUTCDate()).slice(-2),n+=("0"+e.getUTCHours()).slice(-2),n+=("0"+e.getUTCMinutes()).slice(-2),n+=("0"+e.getUTCSeconds()).slice(-2),r){var o=e.getUTCMilliseconds();0!==o&&(n+="."+(o=(o=("00"+o).slice(-3)).replace(/0+$/g,"")))}return n+"Z"},t.uricmptohex=Pe,t.hextouricmp=Ne,t.ipv6tohex=Oe,t.hextoipv6=Re,t.hextoip=je,t.iptohex=function(e){var t="malformed IP address";if(!(e=e.toLowerCase(e)).match(/^[0-9.]+$/)){if(e.match(/^[0-9a-f:]+$/)&&-1!==e.indexOf(":"))return Oe(e);throw t}var r=e.split(".");if(4!==r.length)throw t;var n="";try{for(var i=0;i<4;i++)n+=("0"+parseInt(r[i]).toString(16)).slice(-2);return n}catch(e){throw t}},t.encodeURIComponentAll=De,t.newline_toUnix=function(e){return e.replace(/\r\n/gm,"\n")},t.newline_toDos=function(e){return(e=e.replace(/\r\n/gm,"\n")).replace(/\n/gm,"\r\n")},t.hextoposhex=Me,t.intarystrtohex=function(e){e=(e=(e=e.replace(/^\s*\[\s*/,"")).replace(/\s*\]\s*$/,"")).replace(/\s*/g,"");try{return e.split(/,/).map(function(e,t,r){var n=parseInt(e);if(n<0||255<n)throw"integer not in range 0-255";return("00"+n.toString(16)).slice(-2)}).join("")}catch(e){throw"malformed integer array string: "+e}},t.strdiffidx=function(e,t){var r=e.length;e.length>t.length&&(r=t.length);for(var n=0;n<r;n++)if(e.charCodeAt(n)!=t.charCodeAt(n))return n;return e.length!=t.length?r:-1},t.KJUR=ce;var Ze=ce.crypto;t.crypto=Ze;var et=ce.asn1;t.asn1=et;var tt=ce.jws;t.jws=tt;var rt=ce.lang;t.lang=rt}).call(this,r(28).Buffer)},function(e,t,r){"use strict";(function(e){var n=r(30),i=r(31),o=r(32);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,r){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(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 d(this,e)}return u(this,e,t,r)}function u(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),c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=p(e,t),e}(e,t,r,n):"string"==typeof t?function(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!c.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|h(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(c.isBuffer(t)){var r=0|f(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||function(e){return e!=e}(t.length)?s(e,0):p(e,t);if("Buffer"===t.type&&o(t.data))return p(e,t.data)}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 d(e,t){if(l(t),e=s(e,t<0?0:0|f(t)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function p(e,t){var r=t.length<0?0:0|f(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function f(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(c.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 H(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 H(e).length;t=(""+t).toLowerCase(),n=!0}}function m(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 F(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(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 v(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=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var o,a=1,s=e.length,c=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,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=r;o<s;o++)if(u(e,o)===u(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(r+c>s&&(r=s-c),o=r;o>=0;o--){for(var d=!0,p=0;p<c;p++)if(u(e,o+p)!==u(t,p)){d=!1;break}if(d)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 W(H(t,e.length-r),e,r,n)}function x(e,t,r,n){return W(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 E(e,t,r,n){return W(q(t),e,r,n)}function S(e,t,r,n){return W(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 A(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,c,u=e[i],l=null,d=u>239?4:u>223?3:u>191?2:1;if(i+d<=r)switch(d){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=d}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=C));return r}(n)}t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.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(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,r){return u(null,e,t,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.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)},c.allocUnsafe=function(e){return d(null,e)},c.allocUnsafeSlow=function(e){return d(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.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},c.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}},c.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=c.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},c.byteLength=h,c.prototype._isBuffer=!0,c.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},c.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},c.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},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?k(this,0,e):m.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.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+">"},c.prototype.compare=function(e,t,r,n,i){if(!c.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),u=this.slice(n,i),l=e.slice(t,r),d=0;d<s;++d)if(u[d]!==l[d]){o=u[d],a=l[d];break}return o<a?-1:a<o?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},c.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 E(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}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function T(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 I(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 F(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+=B(e[o]);return i}function P(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 N(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 O(e,t,r,n,i,o){if(!c.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 R(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 j(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 L(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||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,o){return o||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.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),c.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=c.prototype;else{var i=t-e;r=new c(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},c.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},c.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUInt8=function(e,t){return t||N(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||N(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||N(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||N(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},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||N(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},c.prototype.readInt8=function(e,t){return t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||N(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||N(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||N(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||N(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||N(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||N(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||O(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},c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||O(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},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):j(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);O(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},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);O(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},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):j(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},c.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||!c.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},c.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&&!c.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=c.isBuffer(e)?e:H(new c(e,n).toString()),s=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var M=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function H(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(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(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(29))},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){"use strict";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,d=s>0?a-4:a;for(r=0;r<d;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=16383,s=0,c=r-i;s<c;s+=a)o.push(u(e,s,s+a>c?c:s+a));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;s<64;++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 u(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){t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,c=(1<<s)-1,u=c>>1,l=-7,d=r?i-1:0,p=r?-1:1,f=e[t+d];for(d+=p,o=f&(1<<-l)-1,f>>=-l,l+=s;l>0;o=256*o+e[t+d],d+=p,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=p,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,c,u=8*o-i-1,l=(1<<u)-1,d=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,h=n?1:-1,m=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*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?p/c:p*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*c-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&s,f+=h,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[r+f]=255&a,f+=h,a/=256,u-=8);e[r+f-h]|=128*m}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.jws,r=e.KeyUtil,i=e.X509,o=e.crypto,a=e.hextob64u,s=e.b64tohex,c=e.AllowedSigningAlgs;return function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.parseJwt=function e(r){n.Log.debug("JoseUtil.parseJwt");try{var i=t.JWS.parse(r);return{header:i.headerObj,payload:i.payloadObj}}catch(e){n.Log.error(e)}},e.validateJwt=function(t,o,a,c,u,l,d){n.Log.debug("JoseUtil.validateJwt");try{if("RSA"===o.kty)if(o.e&&o.n)o=r.getKey(o);else{if(!o.x5c||!o.x5c.length)return n.Log.error("JoseUtil.validateJwt: RSA key missing key material",o),Promise.reject(new Error("RSA key missing key material"));var p=s(o.x5c[0]);o=i.getPublicKeyFromCertHex(p)}else{if("EC"!==o.kty)return n.Log.error("JoseUtil.validateJwt: Unsupported key type",o&&o.kty),Promise.reject(new Error(o.kty));if(!(o.crv&&o.x&&o.y))return n.Log.error("JoseUtil.validateJwt: EC key missing key material",o),Promise.reject(new Error("EC key missing key material"));o=r.getKey(o)}return e._validateJwt(t,o,a,c,u,l,d)}catch(e){return n.Log.error(e&&e.message||e),Promise.reject("JWT validation failed")}},e.validateJwtAttributes=function(t,r,i,o,a,s){o||(o=0),a||(a=parseInt(Date.now()/1e3));var c=e.parseJwt(t).payload;if(!c.iss)return n.Log.error("JoseUtil._validateJwt: issuer was not provided"),Promise.reject(new Error("issuer was not provided"));if(c.iss!==r)return n.Log.error("JoseUtil._validateJwt: Invalid issuer in token",c.iss),Promise.reject(new Error("Invalid issuer in token: "+c.iss));if(!c.aud)return n.Log.error("JoseUtil._validateJwt: aud was not provided"),Promise.reject(new Error("aud was not provided"));if(!(c.aud===i||Array.isArray(c.aud)&&c.aud.indexOf(i)>=0))return n.Log.error("JoseUtil._validateJwt: Invalid audience in token",c.aud),Promise.reject(new Error("Invalid audience in token: "+c.aud));if(c.azp&&c.azp!==i)return n.Log.error("JoseUtil._validateJwt: Invalid azp in token",c.azp),Promise.reject(new Error("Invalid azp in token: "+c.azp));if(!s){var u=a+o,l=a-o;if(!c.iat)return n.Log.error("JoseUtil._validateJwt: iat was not provided"),Promise.reject(new Error("iat was not provided"));if(u<c.iat)return n.Log.error("JoseUtil._validateJwt: iat is in the future",c.iat),Promise.reject(new Error("iat is in the future: "+c.iat));if(c.nbf&&u<c.nbf)return n.Log.error("JoseUtil._validateJwt: nbf is in the future",c.nbf),Promise.reject(new Error("nbf is in the future: "+c.nbf));if(!c.exp)return n.Log.error("JoseUtil._validateJwt: exp was not provided"),Promise.reject(new Error("exp was not provided"));if(c.exp<l)return n.Log.error("JoseUtil._validateJwt: exp is in the past",c.exp),Promise.reject(new Error("exp is in the past:"+c.exp))}return Promise.resolve(c)},e._validateJwt=function(r,i,o,a,s,u,l){return e.validateJwtAttributes(r,o,a,s,u,l).then(function(e){try{return t.JWS.verify(r,i,c)?e:(n.Log.error("JoseUtil._validateJwt: signature validation failed"),Promise.reject(new Error("signature validation failed")))}catch(e){return n.Log.error(e&&e.message||e),Promise.reject(new Error("signature validation failed"))}})},e.hashString=function e(t,r){try{return o.Util.hashString(t,r)}catch(e){n.Log.error(e)}},e.hexToBase64Url=function e(t){try{return a(t)}catch(e){n.Log.error(e)}},e}()};var n=r(0);e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigninResponse=void 0;var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(3);t.SigninResponse=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=i.UrlUtility.parseUrlFragment(t,r);this.error=n.error,this.error_description=n.error_description,this.error_uri=n.error_uri,this.code=n.code,this.state=n.state,this.id_token=n.id_token,this.session_state=n.session_state,this.access_token=n.access_token,this.token_type=n.token_type,this.scope=n.scope,this.profile=void 0,this.expires_in=n.expires_in}return n(e,[{key:"expires_in",get:function(){if(this.expires_at){var e=parseInt(Date.now()/1e3);return this.expires_at-e}},set:function(e){var t=parseInt(e);if("number"==typeof t&&t>0){var r=parseInt(Date.now()/1e3);this.expires_at=r+t}}},{key:"expired",get:function(){var e=this.expires_in;if(void 0!==e)return e<=0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}},{key:"isOpenIdConnect",get:function(){return this.scopes.indexOf("openid")>=0||!!this.id_token}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignoutRequest=void 0;var n=r(0),i=r(3),o=r(9);t.SignoutRequest=function e(t){var r=t.url,a=t.id_token_hint,s=t.post_logout_redirect_uri,c=t.data,u=t.extraQueryParams,l=t.request_type;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!r)throw n.Log.error("SignoutRequest.ctor: No url passed"),new Error("url");for(var d in a&&(r=i.UrlUtility.addQueryParam(r,"id_token_hint",a)),s&&(r=i.UrlUtility.addQueryParam(r,"post_logout_redirect_uri",s),c&&(this.state=new o.State({data:c,request_type:l}),r=i.UrlUtility.addQueryParam(r,"state",this.state.id))),u)r=i.UrlUtility.addQueryParam(r,d,u[d]);this.url=r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignoutResponse=void 0;var n=r(3);t.SignoutResponse=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=n.UrlUtility.parseUrlFragment(t,"?");this.error=r.error,this.error_description=r.error_description,this.error_uri=r.error_uri,this.state=r.state}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InMemoryWebStorage=void 0;var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0);t.InMemoryWebStorage=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._data={}}return e.prototype.getItem=function(e){return i.Log.debug("InMemoryWebStorage.getItem",e),this._data[e]},e.prototype.setItem=function(e,t){i.Log.debug("InMemoryWebStorage.setItem",e),this._data[e]=t},e.prototype.removeItem=function(e){i.Log.debug("InMemoryWebStorage.removeItem",e),delete this._data[e]},e.prototype.key=function(e){return Object.getOwnPropertyNames(this._data)[e]},n(e,[{key:"length",get:function(){return Object.getOwnPropertyNames(this._data).length}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserManager=void 0;var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(10),a=r(39),s=r(15),c=r(45),u=r(47),l=r(18),d=r(8),p=r(20),f=r(11),h=r(4);t.UserManager=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.SilentRenewService,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.SessionMonitor,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:p.TokenRevocationClient,d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:f.TokenClient,m=arguments.length>5&&void 0!==arguments[5]?arguments[5]:h.JoseUtil;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t),r instanceof a.UserManagerSettings||(r=new a.UserManagerSettings(r));var g=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r));return g._events=new c.UserManagerEvents(r),g._silentRenewService=new n(g),g.settings.automaticSilentRenew&&(i.Log.debug("UserManager.ctor: automaticSilentRenew is configured, setting up silent renew"),g.startSilentRenew()),g.settings.monitorSession&&(i.Log.debug("UserManager.ctor: monitorSession is configured, setting up session monitor"),g._sessionMonitor=new o(g)),g._tokenRevocationClient=new s(g._settings),g._tokenClient=new d(g._settings),g._joseUtil=m,g}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getUser=function(){var e=this;return this._loadUser().then(function(t){return t?(i.Log.info("UserManager.getUser: user loaded"),e._events.load(t,!1),t):(i.Log.info("UserManager.getUser: user not found in storage"),null)})},t.prototype.removeUser=function(){var e=this;return this.storeUser(null).then(function(){i.Log.info("UserManager.removeUser: user removed from storage"),e._events.unload()})},t.prototype.signinRedirect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="si:r";var t={useReplaceToNavigate:e.useReplaceToNavigate};return this._signinStart(e,this._redirectNavigator,t).then(function(){i.Log.info("UserManager.signinRedirect: successful")})},t.prototype.signinRedirectCallback=function(e){return this._signinEnd(e||this._redirectNavigator.url).then(function(e){return e.profile&&e.profile.sub?i.Log.info("UserManager.signinRedirectCallback: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinRedirectCallback: no sub"),e})},t.prototype.signinPopup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="si:p";var t=e.redirect_uri||this.settings.popup_redirect_uri||this.settings.redirect_uri;return t?(e.redirect_uri=t,e.display="popup",this._signin(e,this._popupNavigator,{startUrl:t,popupWindowFeatures:e.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:e.popupWindowTarget||this.settings.popupWindowTarget}).then(function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinPopup: signinPopup successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinPopup: no sub")),e})):(i.Log.error("UserManager.signinPopup: No popup_redirect_uri or redirect_uri configured"),Promise.reject(new Error("No popup_redirect_uri or redirect_uri configured")))},t.prototype.signinPopupCallback=function(e){return this._signinCallback(e,this._popupNavigator).then(function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinPopupCallback: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinPopupCallback: no sub")),e}).catch(function(e){i.Log.error(e.message)})},t.prototype.signinSilent=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=Object.assign({},t),this._loadUser().then(function(r){return r&&r.refresh_token?(t.refresh_token=r.refresh_token,e._useRefreshToken(t)):(t.request_type="si:s",t.id_token_hint=t.id_token_hint||e.settings.includeIdTokenInSilentRenew&&r&&r.id_token,r&&e._settings.validateSubOnSilentRenew&&(i.Log.debug("UserManager.signinSilent, subject prior to silent renew: ",r.profile.sub),t.current_sub=r.profile.sub),e._signinSilentIframe(t))})},t.prototype._useRefreshToken=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._tokenClient.exchangeRefreshToken(t).then(function(t){return t?t.access_token?e._loadUser().then(function(r){if(r){var n=Promise.resolve();return t.id_token&&(n=e._validateIdTokenFromTokenRefreshToken(r.profile,t.id_token)),n.then(function(){return i.Log.debug("UserManager._useRefreshToken: refresh token response success"),r.id_token=t.id_token||r.id_token,r.access_token=t.access_token,r.refresh_token=t.refresh_token||r.refresh_token,r.expires_in=t.expires_in,e.storeUser(r).then(function(){return e._events.load(r),r})})}return null}):(i.Log.error("UserManager._useRefreshToken: No access token returned from token endpoint"),Promise.reject("No access token returned from token endpoint")):(i.Log.error("UserManager._useRefreshToken: No response returned from token endpoint"),Promise.reject("No response returned from token endpoint"))})},t.prototype._validateIdTokenFromTokenRefreshToken=function(e,t){var r=this;return this._metadataService.getIssuer().then(function(n){return r.settings.getEpochTime().then(function(o){return r._joseUtil.validateJwtAttributes(t,n,r._settings.client_id,r._settings.clockSkew,o).then(function(t){return t?t.sub!==e.sub?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: sub in id_token does not match current sub"),Promise.reject(new Error("sub in id_token does not match current sub"))):t.auth_time&&t.auth_time!==e.auth_time?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: auth_time in id_token does not match original auth_time"),Promise.reject(new Error("auth_time in id_token does not match original auth_time"))):t.azp&&t.azp!==e.azp?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp in id_token does not match original azp"),Promise.reject(new Error("azp in id_token does not match original azp"))):!t.azp&&e.azp?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp not in id_token, but present in original id_token"),Promise.reject(new Error("azp not in id_token, but present in original id_token"))):void 0:(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: Failed to validate id_token"),Promise.reject(new Error("Failed to validate id_token")))})})})},t.prototype._signinSilentIframe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.redirect_uri||this.settings.silent_redirect_uri||this.settings.redirect_uri;return t?(e.redirect_uri=t,e.prompt=e.prompt||"none",this._signin(e,this._iframeNavigator,{startUrl:t,silentRequestTimeout:e.silentRequestTimeout||this.settings.silentRequestTimeout}).then(function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinSilent: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinSilent: no sub")),e})):(i.Log.error("UserManager.signinSilent: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},t.prototype.signinSilentCallback=function(e){return this._signinCallback(e,this._iframeNavigator).then(function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinSilentCallback: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinSilentCallback: no sub")),e})},t.prototype.signinCallback=function(e){var t=this;return this.readSigninResponseState(e).then(function(r){var n=r.state;return r.response,"si:r"===n.request_type?t.signinRedirectCallback(e):"si:p"===n.request_type?t.signinPopupCallback(e):"si:s"===n.request_type?t.signinSilentCallback(e):Promise.reject(new Error("invalid response_type in state"))})},t.prototype.signoutCallback=function(e,t){var r=this;return this.readSignoutResponseState(e).then(function(n){var i=n.state,o=n.response;return i?"so:r"===i.request_type?r.signoutRedirectCallback(e):"so:p"===i.request_type?r.signoutPopupCallback(e,t):Promise.reject(new Error("invalid response_type in state")):o})},t.prototype.querySessionStatus=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="si:s";var r=t.redirect_uri||this.settings.silent_redirect_uri||this.settings.redirect_uri;return r?(t.redirect_uri=r,t.prompt="none",t.response_type=t.response_type||this.settings.query_status_response_type,t.scope=t.scope||"openid",t.skipUserInfo=!0,this._signinStart(t,this._iframeNavigator,{startUrl:r,silentRequestTimeout:t.silentRequestTimeout||this.settings.silentRequestTimeout}).then(function(t){return e.processSigninResponse(t.url).then(function(e){if(i.Log.debug("UserManager.querySessionStatus: got signin response"),e.session_state&&e.profile.sub)return i.Log.info("UserManager.querySessionStatus: querySessionStatus success for sub: ",e.profile.sub),{session_state:e.session_state,sub:e.profile.sub,sid:e.profile.sid};i.Log.info("querySessionStatus successful, user not authenticated")}).catch(function(t){if(t.session_state&&e.settings.monitorAnonymousSession&&("login_required"==t.message||"consent_required"==t.message||"interaction_required"==t.message||"account_selection_required"==t.message))return i.Log.info("UserManager.querySessionStatus: querySessionStatus success for anonymous user"),{session_state:t.session_state};throw t})})):(i.Log.error("UserManager.querySessionStatus: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},t.prototype._signin=function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signinStart(e,t,n).then(function(t){return r._signinEnd(t.url,e)})},t.prototype._signinStart=function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.prepare(n).then(function(t){return i.Log.debug("UserManager._signinStart: got navigator window handle"),r.createSigninRequest(e).then(function(e){return i.Log.debug("UserManager._signinStart: got signin request"),n.url=e.url,n.id=e.state.id,t.navigate(n)}).catch(function(e){throw t.close&&(i.Log.debug("UserManager._signinStart: Error after preparing navigator, closing navigator window"),t.close()),e})})},t.prototype._signinEnd=function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.processSigninResponse(e).then(function(e){i.Log.debug("UserManager._signinEnd: got signin response");var n=new s.User(e);if(r.current_sub){if(r.current_sub!==n.profile.sub)return i.Log.debug("UserManager._signinEnd: current user does not match user returned from signin. sub from signin: ",n.profile.sub),Promise.reject(new Error("login_required"));i.Log.debug("UserManager._signinEnd: current user matches user returned from signin")}return t.storeUser(n).then(function(){return i.Log.debug("UserManager._signinEnd: user stored"),t._events.load(n),n})})},t.prototype._signinCallback=function(e,t){i.Log.debug("UserManager._signinCallback");var r="query"===this._settings.response_mode||!this._settings.response_mode&&d.SigninRequest.isCode(this._settings.response_type)?"?":"#";return t.callback(e,void 0,r)},t.prototype.signoutRedirect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="so:r";var t=e.post_logout_redirect_uri||this.settings.post_logout_redirect_uri;t&&(e.post_logout_redirect_uri=t);var r={useReplaceToNavigate:e.useReplaceToNavigate};return this._signoutStart(e,this._redirectNavigator,r).then(function(){i.Log.info("UserManager.signoutRedirect: successful")})},t.prototype.signoutRedirectCallback=function(e){return this._signoutEnd(e||this._redirectNavigator.url).then(function(e){return i.Log.info("UserManager.signoutRedirectCallback: successful"),e})},t.prototype.signoutPopup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="so:p";var t=e.post_logout_redirect_uri||this.settings.popup_post_logout_redirect_uri||this.settings.post_logout_redirect_uri;return e.post_logout_redirect_uri=t,e.display="popup",e.post_logout_redirect_uri&&(e.state=e.state||{}),this._signout(e,this._popupNavigator,{startUrl:t,popupWindowFeatures:e.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:e.popupWindowTarget||this.settings.popupWindowTarget}).then(function(){i.Log.info("UserManager.signoutPopup: successful")})},t.prototype.signoutPopupCallback=function(e,t){return void 0===t&&"boolean"==typeof e&&(t=e,e=null),this._popupNavigator.callback(e,t,"?").then(function(){i.Log.info("UserManager.signoutPopupCallback: successful")})},t.prototype._signout=function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signoutStart(e,t,n).then(function(e){return r._signoutEnd(e.url)})},t.prototype._signoutStart=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return arguments[1].prepare(r).then(function(n){return i.Log.debug("UserManager._signoutStart: got navigator window handle"),t._loadUser().then(function(o){return i.Log.debug("UserManager._signoutStart: loaded current user from storage"),(t._settings.revokeAccessTokenOnSignout?t._revokeInternal(o):Promise.resolve()).then(function(){var a=e.id_token_hint||o&&o.id_token;return a&&(i.Log.debug("UserManager._signoutStart: Setting id_token into signout request"),e.id_token_hint=a),t.removeUser().then(function(){return i.Log.debug("UserManager._signoutStart: user removed, creating signout request"),t.createSignoutRequest(e).then(function(e){return i.Log.debug("UserManager._signoutStart: got signout request"),r.url=e.url,e.state&&(r.id=e.state.id),n.navigate(r)})})})}).catch(function(e){throw n.close&&(i.Log.debug("UserManager._signoutStart: Error after preparing navigator, closing navigator window"),n.close()),e})})},t.prototype._signoutEnd=function(e){return this.processSignoutResponse(e).then(function(e){return i.Log.debug("UserManager._signoutEnd: got signout response"),e})},t.prototype.revokeAccessToken=function(){var e=this;return this._loadUser().then(function(t){return e._revokeInternal(t,!0).then(function(r){if(r)return i.Log.debug("UserManager.revokeAccessToken: removing token properties from user and re-storing"),t.access_token=null,t.refresh_token=null,t.expires_at=null,t.token_type=null,e.storeUser(t).then(function(){i.Log.debug("UserManager.revokeAccessToken: user stored"),e._events.load(t)})})}).then(function(){i.Log.info("UserManager.revokeAccessToken: access token revoked successfully")})},t.prototype._revokeInternal=function(e,t){var r=this;if(e){var n=e.access_token,o=e.refresh_token;return this._revokeAccessTokenInternal(n,t).then(function(e){return r._revokeRefreshTokenInternal(o,t).then(function(t){return e||t||i.Log.debug("UserManager.revokeAccessToken: no need to revoke due to no token(s), or JWT format"),e||t})})}return Promise.resolve(!1)},t.prototype._revokeAccessTokenInternal=function(e,t){return!e||e.indexOf(".")>=0?Promise.resolve(!1):this._tokenRevocationClient.revoke(e,t).then(function(){return!0})},t.prototype._revokeRefreshTokenInternal=function(e,t){return e?this._tokenRevocationClient.revoke(e,t,"refresh_token").then(function(){return!0}):Promise.resolve(!1)},t.prototype.startSilentRenew=function(){this._silentRenewService.start()},t.prototype.stopSilentRenew=function(){this._silentRenewService.stop()},t.prototype._loadUser=function(){return this._userStore.get(this._userStoreKey).then(function(e){return e?(i.Log.debug("UserManager._loadUser: user storageString loaded"),s.User.fromStorageString(e)):(i.Log.debug("UserManager._loadUser: no user storageString"),null)})},t.prototype.storeUser=function(e){if(e){i.Log.debug("UserManager.storeUser: storing user");var t=e.toStorageString();return this._userStore.set(this._userStoreKey,t)}return i.Log.debug("storeUser.storeUser: removing user"),this._userStore.remove(this._userStoreKey)},n(t,[{key:"_redirectNavigator",get:function(){return this.settings.redirectNavigator}},{key:"_popupNavigator",get:function(){return this.settings.popupNavigator}},{key:"_iframeNavigator",get:function(){return this.settings.iframeNavigator}},{key:"_userStore",get:function(){return this.settings.userStore}},{key:"events",get:function(){return this._events}},{key:"_userStoreKey",get:function(){return"user:"+this.settings.authority+":"+this.settings.client_id}}]),t}(o.OidcClient)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserManagerSettings=void 0;var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=(r(0),r(5)),o=r(40),a=r(41),s=r(43),c=r(6),u=r(1),l=r(8);t.UserManagerSettings=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.popup_redirect_uri,i=r.popup_post_logout_redirect_uri,d=r.popupWindowFeatures,p=r.popupWindowTarget,f=r.silent_redirect_uri,h=r.silentRequestTimeout,m=r.automaticSilentRenew,g=void 0!==m&&m,v=r.validateSubOnSilentRenew,y=void 0!==v&&v,b=r.includeIdTokenInSilentRenew,w=void 0===b||b,x=r.monitorSession,_=void 0===x||x,E=r.monitorAnonymousSession,S=void 0!==E&&E,A=r.checkSessionInterval,k=void 0===A?2e3:A,C=r.stopCheckSessionOnError,T=void 0===C||C,I=r.query_status_response_type,F=r.revokeAccessTokenOnSignout,P=void 0!==F&&F,N=r.accessTokenExpiringNotificationTime,O=void 0===N?60:N,R=r.redirectNavigator,j=void 0===R?new o.RedirectNavigator:R,L=r.popupNavigator,D=void 0===L?new a.PopupNavigator:L,U=r.iframeNavigator,M=void 0===U?new s.IFrameNavigator:U,B=r.userStore,H=void 0===B?new c.WebStorageStateStore({store:u.Global.sessionStorage}):B;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var q=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,arguments[0]));return q._popup_redirect_uri=n,q._popup_post_logout_redirect_uri=i,q._popupWindowFeatures=d,q._popupWindowTarget=p,q._silent_redirect_uri=f,q._silentRequestTimeout=h,q._automaticSilentRenew=g,q._validateSubOnSilentRenew=y,q._includeIdTokenInSilentRenew=w,q._accessTokenExpiringNotificationTime=O,q._monitorSession=_,q._monitorAnonymousSession=S,q._checkSessionInterval=k,q._stopCheckSessionOnError=T,I?q._query_status_response_type=I:arguments[0]&&arguments[0].response_type?q._query_status_response_type=l.SigninRequest.isOidc(arguments[0].response_type)?"id_token":"code":q._query_status_response_type="id_token",q._revokeAccessTokenOnSignout=P,q._redirectNavigator=j,q._popupNavigator=D,q._iframeNavigator=M,q._userStore=H,q}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"popup_redirect_uri",get:function(){return this._popup_redirect_uri}},{key:"popup_post_logout_redirect_uri",get:function(){return this._popup_post_logout_redirect_uri}},{key:"popupWindowFeatures",get:function(){return this._popupWindowFeatures}},{key:"popupWindowTarget",get:function(){return this._popupWindowTarget}},{key:"silent_redirect_uri",get:function(){return this._silent_redirect_uri}},{key:"silentRequestTimeout",get:function(){return this._silentRequestTimeout}},{key:"automaticSilentRenew",get:function(){return this._automaticSilentRenew}},{key:"validateSubOnSilentRenew",get:function(){return this._validateSubOnSilentRenew}},{key:"includeIdTokenInSilentRenew",get:function(){return this._includeIdTokenInSilentRenew}},{key:"accessTokenExpiringNotificationTime",get:function(){return this._accessTokenExpiringNotificationTime}},{key:"monitorSession",get:function(){return this._monitorSession}},{key:"monitorAnonymousSession",get:function(){return this._monitorAnonymousSession}},{key:"checkSessionInterval",get:function(){return this._checkSessionInterval}},{key:"stopCheckSessionOnError",get:function(){return this._stopCheckSessionOnError}},{key:"query_status_response_type",get:function(){return this._query_status_response_type}},{key:"revokeAccessTokenOnSignout",get:function(){return this._revokeAccessTokenOnSignout}},{key:"redirectNavigator",get:function(){return this._redirectNavigator}},{key:"popupNavigator",get:function(){return this._popupNavigator}},{key:"iframeNavigator",get:function(){return this._iframeNavigator}},{key:"userStore",get:function(){return this._userStore}}]),t}(i.OidcClientSettings)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RedirectNavigator=void 0;var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0);t.RedirectNavigator=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function(){return Promise.resolve(this)},e.prototype.navigate=function(e){return e&&e.url?(e.useReplaceToNavigate?window.location.replace(e.url):window.location=e.url,Promise.resolve()):(i.Log.error("RedirectNavigator.navigate: No url provided"),Promise.reject(new Error("No url provided")))},n(e,[{key:"url",get:function(){return window.location.href}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PopupNavigator=void 0;var n=r(0),i=r(42);t.PopupNavigator=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function(e){var t=new i.PopupWindow(e);return Promise.resolve(t)},e.prototype.callback=function e(t,r,o){n.Log.debug("PopupNavigator.callback");try{return i.PopupWindow.notifyOpener(t,r,o),Promise.resolve()}catch(e){return Promise.reject(e)}},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PopupWindow=void 0;var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(3);t.PopupWindow=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._promise=new Promise(function(e,t){r._resolve=e,r._reject=t});var n=t.popupWindowTarget||"_blank",o=t.popupWindowFeatures||"location=no,toolbar=no,width=500,height=500,left=100,top=100;";this._popup=window.open("",n,o),this._popup&&(i.Log.debug("PopupWindow.ctor: popup successfully created"),this._checkForPopupClosedTimer=window.setInterval(this._checkForPopupClosed.bind(this),500))}return e.prototype.navigate=function(e){return this._popup?e&&e.url?(i.Log.debug("PopupWindow.navigate: Setting URL in popup"),this._id=e.id,this._id&&(window["popupCallback_"+e.id]=this._callback.bind(this)),this._popup.focus(),this._popup.window.location=e.url):(this._error("PopupWindow.navigate: no url provided"),this._error("No url provided")):this._error("PopupWindow.navigate: Error opening popup window"),this.promise},e.prototype._success=function(e){i.Log.debug("PopupWindow.callback: Successful response from popup window"),this._cleanup(),this._resolve(e)},e.prototype._error=function(e){i.Log.error("PopupWindow.error: ",e),this._cleanup(),this._reject(new Error(e))},e.prototype.close=function(){this._cleanup(!1)},e.prototype._cleanup=function(e){i.Log.debug("PopupWindow.cleanup"),window.clearInterval(this._checkForPopupClosedTimer),this._checkForPopupClosedTimer=null,delete window["popupCallback_"+this._id],this._popup&&!e&&this._popup.close(),this._popup=null},e.prototype._checkForPopupClosed=function(){this._popup&&!this._popup.closed||this._error("Popup window closed")},e.prototype._callback=function(e,t){this._cleanup(t),e?(i.Log.debug("PopupWindow.callback success"),this._success({url:e})):(i.Log.debug("PopupWindow.callback: Invalid response from popup"),this._error("Invalid response from popup"))},e.notifyOpener=function(e,t,r){if(window.opener){if(e=e||window.location.href){var n=o.UrlUtility.parseUrlFragment(e,r);if(n.state){var a="popupCallback_"+n.state,s=window.opener[a];s?(i.Log.debug("PopupWindow.notifyOpener: passing url message to opener"),s(e,t)):i.Log.warn("PopupWindow.notifyOpener: no matching callback found on opener")}else i.Log.warn("PopupWindow.notifyOpener: no state found in response url")}}else i.Log.warn("PopupWindow.notifyOpener: no window.opener. Can't complete notification.")},n(e,[{key:"promise",get:function(){return this._promise}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFrameNavigator=void 0;var n=r(0),i=r(44);t.IFrameNavigator=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function(e){var t=new i.IFrameWindow(e);return Promise.resolve(t)},e.prototype.callback=function e(t){n.Log.debug("IFrameNavigator.callback");try{return i.IFrameWindow.notifyParent(t),Promise.resolve()}catch(e){return Promise.reject(e)}},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFrameWindow=void 0;var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0);t.IFrameWindow=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._promise=new Promise(function(e,t){r._resolve=e,r._reject=t}),this._boundMessageEvent=this._message.bind(this),window.addEventListener("message",this._boundMessageEvent,!1),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.width=0,this._frame.height=0,window.document.body.appendChild(this._frame)}return e.prototype.navigate=function(e){if(e&&e.url){var t=e.silentRequestTimeout||1e4;i.Log.debug("IFrameWindow.navigate: Using timeout of:",t),this._timer=window.setTimeout(this._timeout.bind(this),t),this._frame.src=e.url}else this._error("No url provided");return this.promise},e.prototype._success=function(e){this._cleanup(),i.Log.debug("IFrameWindow: Successful response from frame window"),this._resolve(e)},e.prototype._error=function(e){this._cleanup(),i.Log.error(e),this._reject(new Error(e))},e.prototype.close=function(){this._cleanup()},e.prototype._cleanup=function(){this._frame&&(i.Log.debug("IFrameWindow: cleanup"),window.removeEventListener("message",this._boundMessageEvent,!1),window.clearTimeout(this._timer),window.document.body.removeChild(this._frame),this._timer=null,this._frame=null,this._boundMessageEvent=null)},e.prototype._timeout=function(){i.Log.debug("IFrameWindow.timeout"),this._error("Frame window timed out")},e.prototype._message=function(e){if(i.Log.debug("IFrameWindow.message"),this._timer&&e.origin===this._origin&&e.source===this._frame.contentWindow&&"string"==typeof e.data&&(e.data.startsWith("http://")||e.data.startsWith("https://"))){var t=e.data;t?this._success({url:t}):this._error("Invalid response from frame")}},e.notifyParent=function(e){i.Log.debug("IFrameWindow.notifyParent"),(e=e||window.location.href)&&(i.Log.debug("IFrameWindow.notifyParent: posting url message to parent"),window.parent.postMessage(e,location.protocol+"//"+location.host))},n(e,[{key:"promise",get:function(){return this._promise}},{key:"_origin",get:function(){return location.protocol+"//"+location.host}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserManagerEvents=void 0;var n=r(0),i=r(16),o=r(17);t.UserManagerEvents=function(e){function t(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r));return n._userLoaded=new o.Event("User loaded"),n._userUnloaded=new o.Event("User unloaded"),n._silentRenewError=new o.Event("Silent renew error"),n._userSignedIn=new o.Event("User signed in"),n._userSignedOut=new o.Event("User signed out"),n._userSessionChanged=new o.Event("User session changed"),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.load=function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n.Log.debug("UserManagerEvents.load"),e.prototype.load.call(this,t),r&&this._userLoaded.raise(t)},t.prototype.unload=function(){n.Log.debug("UserManagerEvents.unload"),e.prototype.unload.call(this),this._userUnloaded.raise()},t.prototype.addUserLoaded=function(e){this._userLoaded.addHandler(e)},t.prototype.removeUserLoaded=function(e){this._userLoaded.removeHandler(e)},t.prototype.addUserUnloaded=function(e){this._userUnloaded.addHandler(e)},t.prototype.removeUserUnloaded=function(e){this._userUnloaded.removeHandler(e)},t.prototype.addSilentRenewError=function(e){this._silentRenewError.addHandler(e)},t.prototype.removeSilentRenewError=function(e){this._silentRenewError.removeHandler(e)},t.prototype._raiseSilentRenewError=function(e){n.Log.debug("UserManagerEvents._raiseSilentRenewError",e.message),this._silentRenewError.raise(e)},t.prototype.addUserSignedIn=function(e){this._userSignedIn.addHandler(e)},t.prototype.removeUserSignedIn=function(e){this._userSignedIn.removeHandler(e)},t.prototype._raiseUserSignedIn=function(){n.Log.debug("UserManagerEvents._raiseUserSignedIn"),this._userSignedIn.raise()},t.prototype.addUserSignedOut=function(e){this._userSignedOut.addHandler(e)},t.prototype.removeUserSignedOut=function(e){this._userSignedOut.removeHandler(e)},t.prototype._raiseUserSignedOut=function(){n.Log.debug("UserManagerEvents._raiseUserSignedOut"),this._userSignedOut.raise()},t.prototype.addUserSessionChanged=function(e){this._userSessionChanged.addHandler(e)},t.prototype.removeUserSessionChanged=function(e){this._userSessionChanged.removeHandler(e)},t.prototype._raiseUserSessionChanged=function(){n.Log.debug("UserManagerEvents._raiseUserSessionChanged"),this._userSessionChanged.raise()},t}(i.AccessTokenEvents)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Timer=void 0;var n=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(1),a=r(17);t.Timer=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.Global.timer,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r));return a._timer=n,a._nowFunc=i||function(){return Date.now()/1e3},a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.init=function(e){e<=0&&(e=1),e=parseInt(e);var t=this.now+e;if(this.expiration===t&&this._timerHandle)i.Log.debug("Timer.init timer "+this._name+" skipping initialization since already initialized for expiration:",this.expiration);else{this.cancel(),i.Log.debug("Timer.init timer "+this._name+" for duration:",e),this._expiration=t;var r=5;e<r&&(r=e),this._timerHandle=this._timer.setInterval(this._callback.bind(this),1e3*r)}},t.prototype.cancel=function(){this._timerHandle&&(i.Log.debug("Timer.cancel: ",this._name),this._timer.clearInterval(this._timerHandle),this._timerHandle=null)},t.prototype._callback=function(){var t=this._expiration-this.now;i.Log.debug("Timer.callback; "+this._name+" timer expires in:",t),this._expiration<=this.now&&(this.cancel(),e.prototype.raise.call(this))},n(t,[{key:"now",get:function(){return parseInt(this._nowFunc())}},{key:"expiration",get:function(){return this._expiration}}]),t}(a.Event)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SilentRenewService=void 0;var n=r(0);t.SilentRenewService=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._userManager=t}return e.prototype.start=function(){this._callback||(this._callback=this._tokenExpiring.bind(this),this._userManager.events.addAccessTokenExpiring(this._callback),this._userManager.getUser().then(function(e){}).catch(function(e){n.Log.error("SilentRenewService.start: Error from getUser:",e.message)}))},e.prototype.stop=function(){this._callback&&(this._userManager.events.removeAccessTokenExpiring(this._callback),delete this._callback)},e.prototype._tokenExpiring=function(){var e=this;this._userManager.signinSilent().then(function(e){n.Log.debug("SilentRenewService._tokenExpiring: Silent token renewal successful")},function(t){n.Log.error("SilentRenewService._tokenExpiring: Error from signinSilent:",t.message),e._userManager.events._raiseSilentRenewError(t)})},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CordovaPopupNavigator=void 0;var n=r(21);t.CordovaPopupNavigator=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function(e){var t=new n.CordovaPopupWindow(e);return Promise.resolve(t)},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CordovaIFrameNavigator=void 0;var n=r(21);t.CordovaIFrameNavigator=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function(e){e.popupWindowFeatures="hidden=yes";var t=new n.CordovaPopupWindow(e);return Promise.resolve(t)},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Version="1.11.6"}])},e.exports=t()},6559:(e,t,r)=>{"use strict";var n=r(4582).freeze;t.XML_ENTITIES=n({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=n({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),t.entityMap=t.HTML_ENTITIES},6568:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1797),i=r(6011);t.default=function(e){const t=(r="string"==typeof e?(0,n.default)(e):e,Uint8Array.of((15&r[6])<<4|r[7]>>4&15,(15&r[7])<<4|(240&r[4])>>4,(15&r[4])<<4|(240&r[5])>>4,(15&r[5])<<4|(240&r[0])>>4,(15&r[0])<<4|(240&r[1])>>4,(15&r[1])<<4|(240&r[2])>>4,96|15&r[2],r[3],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]));var r;return"string"==typeof e?(0,i.unsafeStringify)(t):t}},6691:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createLinkForURI=void 0,t.linkIcon=i;var n=r(4901);function i(e,t,r){var i=e.createElement("a");i.setAttribute("href",t.uri),t.uri.startsWith("http")&&i.setAttribute("target","_blank");var o=i.appendChild(e.createElement("img"));return o.setAttribute("src",r||n.originalIconBase+"go-to-this.png"),o.setAttribute("style","margin: 0.3em;"),i}t.createLinkForURI=function(e,t,r){var n=i(e,r);t.appendChild(n).classList.add("HoverControlHide"),t.appendChild(e.createElement("br"))}},6697:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},6711:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(1436),i=r(1020),o=r(7991),a=r(4495),s=r(676);const c=async(e,t,r,n)=>{const c=await(0,s.A)(e,t,"verify");(0,a.A)(e,c);const u=(0,i.A)(e,c.algorithm);try{return await o.A.subtle.verify(u,c,r,n)}catch{return!1}};var u=r(7493),l=r(9095),d=r(9874),p=r(149),f=r(8858),h=r(2168),m=r(4618),g=r(5500),v=r(8278);async function y(e,t,r){if(!(0,p.A)(e))throw new u.JWSInvalid("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new u.JWSInvalid('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new u.JWSInvalid("JWS Protected Header incorrect type");if(void 0===e.payload)throw new u.JWSInvalid("JWS Payload missing");if("string"!=typeof e.signature)throw new u.JWSInvalid("JWS Signature missing or incorrect type");if(void 0!==e.header&&!(0,p.A)(e.header))throw new u.JWSInvalid("JWS Unprotected Header incorrect type");let i={};if(e.protected)try{const t=(0,n.D4)(e.protected);i=JSON.parse(l.D0.decode(t))}catch{throw new u.JWSInvalid("JWS Protected Header is invalid")}if(!(0,d.A)(i,e.header))throw new u.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const o={...i,...e.header};let a=!0;if((0,h.A)(u.JWSInvalid,new Map([["b64",!0]]),r?.crit,i,o).has("b64")&&(a=i.b64,"boolean"!=typeof a))throw new u.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:s}=o;if("string"!=typeof s||!s)throw new u.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');const y=r&&(0,m.A)("algorithms",r.algorithms);if(y&&!y.has(s))throw new u.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed');if(a){if("string"!=typeof e.payload)throw new u.JWSInvalid("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new u.JWSInvalid("JWS Payload must be a string or an Uint8Array instance");let b=!1;"function"==typeof t?(t=await t(i,e),b=!0,(0,f.I)(s,t,"verify"),(0,g.ll)(t)&&(t=await(0,v.Og)(t,s))):(0,f.I)(s,t,"verify");const w=(0,l.xW)(l.Rd.encode(e.protected??""),l.Rd.encode("."),"string"==typeof e.payload?l.Rd.encode(e.payload):e.payload);let x,_;try{x=(0,n.D4)(e.signature)}catch{throw new u.JWSInvalid("Failed to base64url decode the signature")}if(!await c(s,t,x,w))throw new u.JWSSignatureVerificationFailed;if(a)try{_=(0,n.D4)(e.payload)}catch{throw new u.JWSInvalid("Failed to base64url decode the payload")}else _="string"==typeof e.payload?l.Rd.encode(e.payload):e.payload;const E={payload:_};return void 0!==e.protected&&(E.protectedHeader=i),void 0!==e.header&&(E.unprotectedHeader=e.header),b?{...E,key:t}:E}},6957:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});const n=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,i=e=>{const t=n.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const r=parseFloat(t[2]);let i;switch(t[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":i=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":i=Math.round(60*r);break;case"hour":case"hours":case"hr":case"hrs":case"h":i=Math.round(3600*r);break;case"day":case"days":case"d":i=Math.round(86400*r);break;case"week":case"weeks":case"w":i=Math.round(604800*r);break;default:i=Math.round(31557600*r)}return"-"===t[1]||"ago"===t[4]?-i:i}},6971:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.AccessGroups=void 0;var o=n(r(4756)),a=n(r(9293)),s=n(r(5715)),c=n(r(7383)),u=n(r(4579)),l=n(r(3693)),d=r(2209),p=r(9922),f=y(r(1939)),h=y(r(2054)),m=r(9169),g=y(r(2902)),v=y(r(5148));function y(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(y=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var b=h.acl,w={13:"Owners",9:"Owners (write locked)",5:"Editors",3:"Posters",2:"Submitters",1:"Viewers"},x={13:!0,5:!0,3:!0,2:!0,1:!0},_={13:"can read, write, and control sharing.",9:"can read and control sharing, currently write-locked.",5:"can read and change information",3:"can add new information, and read but not change existing information",2:"can add new information but not read any",1:"can read but not change information"};function E(e){for(var t=["Read","Append","Write","Control"],r=[],n=0;n<4;n++)e&1<<n&&r.push("http://www.w3.org/ns/auth/acl#"+t[n]);return r.sort(),r.join("\n")}function S(e,t){var r=(0,d.sym)(e),n=t.findTypeURIs(r);for(var i in n)g.log(" drop object type includes: "+i);if(e.startsWith("http")&&3===e.split("/").length)return{pred:"origin",obj:r};if(e.startsWith("http")&&4===e.split("/").length&&e.endsWith("/"))return g.log("Assuming final slash on dragged origin URI was unintended!"),{pred:"origin",obj:(0,d.sym)(e.slice(0,-1))};if(h.vcard("WebID").uri in n)return{pred:"agent",obj:r};if(h.vcard("Group").uri in n)return{pred:"agentGroup",obj:r};if(r.sameTerm(h.foaf("Agent"))||r.sameTerm(h.acl("AuthenticatedAgent"))||r.sameTerm(h.rdf("Resource"))||r.sameTerm(h.owl("Thing")))return{pred:"agentClass",obj:r};if(h.vcard("Individual").uri in n||h.foaf("Person").uri in n||h.foaf("Agent").uri in n){var o=t.any(r,h.foaf("preferredURI"));return o?{pred:"agent",obj:(0,d.sym)(o)}:{pred:"agent",obj:r}}return h.solid("AppProvider").uri in n?{pred:"origin",obj:r}:h.solid("AppProviderClass").uri in n?{pred:"originClass",obj:r}:(g.log(" Triage fails for "+e),null)}t.AccessGroups=function(){return(0,u.default)(function e(t,r,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};(0,c.default)(this,e),this.doc=t,this.aclDoc=r,this.controller=n,this.options=o,(0,l.default)(this,"defaults",void 0),(0,l.default)(this,"byCombo",void 0),(0,l.default)(this,"aclMap",void 0),(0,l.default)(this,"addAgentButton",void 0),(0,l.default)(this,"rootElement",void 0),(0,l.default)(this,"_store",void 0),this.defaults=o.defaults||!1,this._store=i,this.aclMap=(0,p.readACL)(t,r,i,this.defaults),this.byCombo=(0,p.ACLbyCombination)(this.aclMap),this.addAgentButton=new m.AddAgentButtons(this),this.rootElement=this.controller.dom.createElement("div"),this.rootElement.setAttribute("style",v.accessGroupList)},[{key:"store",get:function(){return this._store},set:function(e){this._store=e,this.aclMap=(0,p.readACL)(this.doc,this.aclDoc,e,this.defaults),this.byCombo=(0,p.ACLbyCombination)(this.aclMap)}},{key:"render",value:function(){var e=this;return this.rootElement.innerHTML="",this.renderGroups().forEach(function(t){return e.rootElement.appendChild(t)}),this.controller.isEditable&&this.rootElement.appendChild(this.addAgentButton.render()),this.rootElement}},{key:"renderGroups",value:function(){for(var e=[],t=15;t>0;t--){var r=E(t);(this.controller.isEditable&&x[t]||this.byCombo[r])&&e.push(this.renderGroup(t,r))}return e}},{key:"renderGroup",value:function(e,t){var r=this,n=this.controller.dom.createElement("div");return n.setAttribute("style",v.accessGroupListItem),f.makeDropTarget(n,function(e){return r.handleDroppedUris(e,t).then(function(){return r.controller.render()}).catch(function(e){return r.controller.renderStatus(e)})}),this.renderGroupElements(e,t).forEach(function(e){return n.appendChild(e)}),n}},{key:"renderGroupElements",value:function(e,t){var r=this,n=this.controller.dom.createElement("div");if(n.setAttribute("style",v.group),this.controller.isEditable)switch(e){case 1:n.setAttribute("style",v.group1);break;case 2:n.setAttribute("style",v.group2);break;case 3:n.setAttribute("style",v.group3);break;case 5:n.setAttribute("style",v.group5);break;case 9:n.setAttribute("style",v.group9);break;case 13:n.setAttribute("style",v.group13);break;default:n.setAttribute("style",v.group)}n.innerText=w[e]||function(e){for(var t="",r=["Read","Append","Write","Control"],n=0;n<4;n++)e&1<<n&&(t+=r[n]);return t}(e);var i=this.controller.dom.createElement("div");if(i.setAttribute("style",v.group),this.controller.isEditable)switch(e){case 1:i.setAttribute("style",v.group1);break;case 2:i.setAttribute("style",v.group2);break;case 3:i.setAttribute("style",v.group3);break;case 5:i.setAttribute("style",v.group5);break;case 9:i.setAttribute("style",v.group9);break;case 13:i.setAttribute("style",v.group13);break;default:i.setAttribute("style",v.group)}var o=i.appendChild(this.controller.dom.createElement("table"));(this.byCombo[t]||[]).map(function(e){var n=(0,s.default)(e,2),i=n[0],a=n[1];return r.renderAgent(o,t,i,a)}).forEach(function(e){return o.appendChild(e)});var a=this.controller.dom.createElement("div");if(a.setAttribute("style",v.group),this.controller.isEditable)switch(e){case 1:a.setAttribute("style",v.group1);break;case 2:a.setAttribute("style",v.group2);break;case 3:a.setAttribute("style",v.group3);break;case 5:a.setAttribute("style",v.group5);break;case 9:a.setAttribute("style",v.group9);break;case 13:a.setAttribute("style",v.group13);break;default:a.setAttribute("style",v.group)}return a.innerText=_[e]||"Unusual combination",[n,i,a]}},{key:"renderAgent",value:function(e,t,r,n){var i=this,o=f.personTR(this.controller.dom,b(r),(0,d.sym)(n),this.controller.isEditable?{deleteFunction:function(){return i.deleteAgent(t,r,n).then(function(){return e.removeChild(o)}).catch(function(e){return i.controller.renderStatus(e)})}}:{});return o}},{key:"deleteAgent",value:(n=(0,a.default)(o.default.mark(function e(t,r,n){var i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=this.byCombo[t]||[],(a=i.find(function(e){var t=(0,s.default)(e,2),i=t[0],o=t[1];return i===r&&o===n}))&&i.splice(i.indexOf(a),1),e.next=1,this.controller.save();case 1:case"end":return e.stop()}},e,this)})),function(e,t,r){return n.apply(this,arguments)})},{key:"addNewURI",value:(r=(0,a.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this.handleDroppedUri(t,E(1));case 1:return e.next=2,this.controller.save();case 2:case"end":return e.stop()}},e,this)})),function(e){return r.apply(this,arguments)})},{key:"handleDroppedUris",value:(t=(0,a.default)(o.default.mark(function e(t,r){var n,i=this;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Promise.all(t.map(function(e){return i.handleDroppedUri(e,r)}));case 1:return e.next=2,this.controller.save();case 2:e.next=4;break;case 3:return e.prev=3,n=e.catch(0),e.abrupt("return",Promise.reject(n));case 4:case"end":return e.stop()}},e,this,[[0,3]])})),function(e,r){return t.apply(this,arguments)})},{key:"handleDroppedUri",value:(e=(0,a.default)(function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return o.default.mark(function i(){var a,s,c,u,l,p;return o.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(a=S(e,r.store),s=(0,d.sym)(e),a||n){i.next=5;break}return g.log(" Not obvious: looking up dropped thing ".concat(s)),i.prev=1,i.next=2,null===(c=r._store)||void 0===c||null===(c=c.fetcher)||void 0===c?void 0:c.load(s.doc());case 2:i.next=4;break;case 3:return i.prev=3,p=i.catch(1),u="Ignore error looking up dropped thing: ".concat(p),g.error(u),i.abrupt("return",Promise.reject(new Error(u)));case 4:return i.abrupt("return",r.handleDroppedUri(e,t,!0));case 5:if(a){i.next=6;break}return l=" Error: Drop fails to drop appropriate thing! ".concat(e),g.error(l),i.abrupt("return",Promise.reject(new Error(l)));case 6:r.setACLCombo(t,e,a,r.controller.subject);case 7:case"end":return i.stop()}},i,null,[[1,3]])})()}),function(t,r){return e.apply(this,arguments)})},{key:"setACLCombo",value:function(e,t,r,n){e in this.byCombo||(this.byCombo[e]=[]),this.removeAgentFromCombos(t),this.byCombo[e].push([r.pred,r.obj.uri]),g.log("ACL: setting access to ".concat(n," by ").concat(r.pred,": ").concat(r.obj))}},{key:"removeAgentFromCombos",value:function(e){for(var t=0;t<16;t++){var r=this.byCombo[E(t)];if(r)for(var n=0;n<r.length;n++)for(;n<r.length&&r[n][1]===e;)r.splice(n,1)}}}]);var e,t,r,n}()},6993:(e,t,r)=>{var n=r(5546);function i(){var t,r,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.toStringTag||"@@toStringTag";function c(e,i,o,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return n(c,"_invoke",function(e,n,i){var o,a,s,c=0,l=i||[],d=!1,p={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,r){return o=e,a=0,s=t,p.n=r,u}};function f(e,n){for(a=e,s=n,r=0;!d&&c&&!i&&r<l.length;r++){var i,o=l[r],f=p.p,h=o[2];e>3?(i=h===n)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=e<2&&f<o[1])?(a=0,p.v=n,p.n=o[1]):f<h&&(i=e<3||o[0]>n||n>h)&&(o[4]=e,o[5]=n,p.n=h,a=0))}if(i||e>1)return u;throw d=!0,n}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&f(l,h),a=l,s=h;(r=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(p.n=-1),f(a,s)):p.n=s:p.v=s);try{if(c=2,o){if(a||(i="next"),r=o[i]){if(!(r=r.call(o,s)))throw TypeError("iterator result is not an object");if(!r.done)return r;s=r.value,a<2&&(a=0)}else 1===a&&(r=o.return)&&r.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((r=(d=p.n<0)?s:e.call(n,p))!==u)break}catch(e){o=t,a=1,s=e}finally{c=1}}return{value:r,done:d}}}(e,o,a),!0),c}var u={};function l(){}function d(){}function p(){}r=Object.getPrototypeOf;var f=[][a]?r(r([][a]())):(n(r={},a,function(){return this}),r),h=p.prototype=l.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,n(e,s,"GeneratorFunction")),e.prototype=Object.create(h),e}return d.prototype=p,n(h,"constructor",p),n(p,"constructor",d),d.displayName="GeneratorFunction",n(p,s,"GeneratorFunction"),n(h),n(h,s,"Generator"),n(h,a,function(){return this}),n(h,"toString",function(){return"[object Generator]"}),(e.exports=i=function(){return{w:c,m}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},7007:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise(function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,i)})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,a,u;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=c(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):h(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function h(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(o){n.once&&e.removeEventListener(t,i),r(o)})}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=h(c,u);for(r=0;r<u;++r)n(l[r],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,a;if(s(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return p(this,e,!0)},o.prototype.rawListeners=function(e){return p(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7016:function(e,t){"use strict";var r=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.getSuggestedIssuers=function(){var e=r([],n,!0),t=new URL(location.href),i=t.host,o=t.origin,a=e.map(function(e){var t=e.uri;return new URL(t).host});return a.includes(i)||a.some(function(e){return r=e,(n=(t=i).length-r.length-1)>0&&"."===t[n]&&t.endsWith(r);var t,r,n})||e.unshift({name:i,uri:o}),e};var n=[{name:"Solid Community",uri:"https://solidcommunity.net"},{name:"Solid Web",uri:"https://solidweb.org"},{name:"Solid Web ME",uri:"https://solidweb.me"},{name:"Inrupt.com",uri:"https://login.inrupt.com"}]},7037:(e,t,r)=>{"use strict";r.d(t,{X:()=>n});let n=function(e){return e.collections="COLLECTIONS",e.defaultGraphType="DEFAULT_GRAPH_TYPE",e.equalsMethod="EQUALS_METHOD",e.id="ID",e.identity="IDENTITY",e.reversibleId="REVERSIBLE_ID",e.variableType="VARIABLE_TYPE",e}({})},7076:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512_224=t.sha512_256=t.sha384=t.sha512=t.sha224=t.sha256=t.SHA512_256=t.SHA512_224=t.SHA384=t.SHA512=t.SHA224=t.SHA256=void 0;const n=r(7202),i=r(2318),o=r(9175),a=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array(64);class c extends n.HashMD{constructor(e=32){super(64,e,8,!1),this.A=0|n.SHA256_IV[0],this.B=0|n.SHA256_IV[1],this.C=0|n.SHA256_IV[2],this.D=0|n.SHA256_IV[3],this.E=0|n.SHA256_IV[4],this.F=0|n.SHA256_IV[5],this.G=0|n.SHA256_IV[6],this.H=0|n.SHA256_IV[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:a,H:s}=this;return[e,t,r,n,i,o,a,s]}set(e,t,r,n,i,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)s[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=s[e-15],r=s[e-2],n=(0,o.rotr)(t,7)^(0,o.rotr)(t,18)^t>>>3,i=(0,o.rotr)(r,17)^(0,o.rotr)(r,19)^r>>>10;s[e]=i+s[e-7]+n+s[e-16]|0}let{A:r,B:i,C:c,D:u,E:l,F:d,G:p,H:f}=this;for(let e=0;e<64;e++){const t=f+((0,o.rotr)(l,6)^(0,o.rotr)(l,11)^(0,o.rotr)(l,25))+(0,n.Chi)(l,d,p)+a[e]+s[e]|0,h=((0,o.rotr)(r,2)^(0,o.rotr)(r,13)^(0,o.rotr)(r,22))+(0,n.Maj)(r,i,c)|0;f=p,p=d,d=l,l=u+t|0,u=c,c=i,i=r,r=t+h|0}r=r+this.A|0,i=i+this.B|0,c=c+this.C|0,u=u+this.D|0,l=l+this.E|0,d=d+this.F|0,p=p+this.G|0,f=f+this.H|0,this.set(r,i,c,u,l,d,p,f)}roundClean(){(0,o.clean)(s)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,o.clean)(this.buffer)}}t.SHA256=c;class u extends c{constructor(){super(28),this.A=0|n.SHA224_IV[0],this.B=0|n.SHA224_IV[1],this.C=0|n.SHA224_IV[2],this.D=0|n.SHA224_IV[3],this.E=0|n.SHA224_IV[4],this.F=0|n.SHA224_IV[5],this.G=0|n.SHA224_IV[6],this.H=0|n.SHA224_IV[7]}}t.SHA224=u;const l=(()=>i.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),d=(()=>l[0])(),p=(()=>l[1])(),f=new Uint32Array(80),h=new Uint32Array(80);class m extends n.HashMD{constructor(e=64){super(128,e,16,!1),this.Ah=0|n.SHA512_IV[0],this.Al=0|n.SHA512_IV[1],this.Bh=0|n.SHA512_IV[2],this.Bl=0|n.SHA512_IV[3],this.Ch=0|n.SHA512_IV[4],this.Cl=0|n.SHA512_IV[5],this.Dh=0|n.SHA512_IV[6],this.Dl=0|n.SHA512_IV[7],this.Eh=0|n.SHA512_IV[8],this.El=0|n.SHA512_IV[9],this.Fh=0|n.SHA512_IV[10],this.Fl=0|n.SHA512_IV[11],this.Gh=0|n.SHA512_IV[12],this.Gl=0|n.SHA512_IV[13],this.Hh=0|n.SHA512_IV[14],this.Hl=0|n.SHA512_IV[15]}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:o,Dh:a,Dl:s,Eh:c,El:u,Fh:l,Fl:d,Gh:p,Gl:f,Hh:h,Hl:m}=this;return[e,t,r,n,i,o,a,s,c,u,l,d,p,f,h,m]}set(e,t,r,n,i,o,a,s,c,u,l,d,p,f,h,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|a,this.Dl=0|s,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|p,this.Gl=0|f,this.Hh=0|h,this.Hl=0|m}process(e,t){for(let r=0;r<16;r++,t+=4)f[r]=e.getUint32(t),h[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|f[e-15],r=0|h[e-15],n=i.rotrSH(t,r,1)^i.rotrSH(t,r,8)^i.shrSH(t,r,7),o=i.rotrSL(t,r,1)^i.rotrSL(t,r,8)^i.shrSL(t,r,7),a=0|f[e-2],s=0|h[e-2],c=i.rotrSH(a,s,19)^i.rotrBH(a,s,61)^i.shrSH(a,s,6),u=i.rotrSL(a,s,19)^i.rotrBL(a,s,61)^i.shrSL(a,s,6),l=i.add4L(o,u,h[e-7],h[e-16]),d=i.add4H(l,n,c,f[e-7],f[e-16]);f[e]=0|d,h[e]=0|l}let{Ah:r,Al:n,Bh:o,Bl:a,Ch:s,Cl:c,Dh:u,Dl:l,Eh:m,El:g,Fh:v,Fl:y,Gh:b,Gl:w,Hh:x,Hl:_}=this;for(let e=0;e<80;e++){const t=i.rotrSH(m,g,14)^i.rotrSH(m,g,18)^i.rotrBH(m,g,41),E=i.rotrSL(m,g,14)^i.rotrSL(m,g,18)^i.rotrBL(m,g,41),S=m&v^~m&b,A=g&y^~g&w,k=i.add5L(_,E,A,p[e],h[e]),C=i.add5H(k,x,t,S,d[e],f[e]),T=0|k,I=i.rotrSH(r,n,28)^i.rotrBH(r,n,34)^i.rotrBH(r,n,39),F=i.rotrSL(r,n,28)^i.rotrBL(r,n,34)^i.rotrBL(r,n,39),P=r&o^r&s^o&s,N=n&a^n&c^a&c;x=0|b,_=0|w,b=0|v,w=0|y,v=0|m,y=0|g,({h:m,l:g}=i.add(0|u,0|l,0|C,0|T)),u=0|s,l=0|c,s=0|o,c=0|a,o=0|r,a=0|n;const O=i.add3L(T,F,N);r=i.add3H(O,C,I,P),n=0|O}({h:r,l:n}=i.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:a}=i.add(0|this.Bh,0|this.Bl,0|o,0|a)),({h:s,l:c}=i.add(0|this.Ch,0|this.Cl,0|s,0|c)),({h:u,l}=i.add(0|this.Dh,0|this.Dl,0|u,0|l)),({h:m,l:g}=i.add(0|this.Eh,0|this.El,0|m,0|g)),({h:v,l:y}=i.add(0|this.Fh,0|this.Fl,0|v,0|y)),({h:b,l:w}=i.add(0|this.Gh,0|this.Gl,0|b,0|w)),({h:x,l:_}=i.add(0|this.Hh,0|this.Hl,0|x,0|_)),this.set(r,n,o,a,s,c,u,l,m,g,v,y,b,w,x,_)}roundClean(){(0,o.clean)(f,h)}destroy(){(0,o.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=m;class g extends m{constructor(){super(48),this.Ah=0|n.SHA384_IV[0],this.Al=0|n.SHA384_IV[1],this.Bh=0|n.SHA384_IV[2],this.Bl=0|n.SHA384_IV[3],this.Ch=0|n.SHA384_IV[4],this.Cl=0|n.SHA384_IV[5],this.Dh=0|n.SHA384_IV[6],this.Dl=0|n.SHA384_IV[7],this.Eh=0|n.SHA384_IV[8],this.El=0|n.SHA384_IV[9],this.Fh=0|n.SHA384_IV[10],this.Fl=0|n.SHA384_IV[11],this.Gh=0|n.SHA384_IV[12],this.Gl=0|n.SHA384_IV[13],this.Hh=0|n.SHA384_IV[14],this.Hl=0|n.SHA384_IV[15]}}t.SHA384=g;const v=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),y=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class b extends m{constructor(){super(28),this.Ah=0|v[0],this.Al=0|v[1],this.Bh=0|v[2],this.Bl=0|v[3],this.Ch=0|v[4],this.Cl=0|v[5],this.Dh=0|v[6],this.Dl=0|v[7],this.Eh=0|v[8],this.El=0|v[9],this.Fh=0|v[10],this.Fl=0|v[11],this.Gh=0|v[12],this.Gl=0|v[13],this.Hh=0|v[14],this.Hl=0|v[15]}}t.SHA512_224=b;class w extends m{constructor(){super(32),this.Ah=0|y[0],this.Al=0|y[1],this.Bh=0|y[2],this.Bl=0|y[3],this.Ch=0|y[4],this.Cl=0|y[5],this.Dh=0|y[6],this.Dl=0|y[7],this.Eh=0|y[8],this.El=0|y[9],this.Fh=0|y[10],this.Fl=0|y[11],this.Gh=0|y[12],this.Gl=0|y[13],this.Hh=0|y[14],this.Hl=0|y[15]}}t.SHA512_256=w,t.sha256=(0,o.createHasher)(()=>new c),t.sha224=(0,o.createHasher)(()=>new u),t.sha512=(0,o.createHasher)(()=>new m),t.sha384=(0,o.createHasher)(()=>new g),t.sha512_256=(0,o.createHasher)(()=>new w),t.sha512_224=(0,o.createHasher)(()=>new b)},7122:(e,t,r)=>{var n=r(79);e.exports=function(e,t){if(e){if("string"==typeof e)return n(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)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},7202:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA512_IV=t.SHA384_IV=t.SHA224_IV=t.SHA256_IV=t.HashMD=void 0,t.setBigUint64=i,t.Chi=function(e,t,r){return e&t^~e&r},t.Maj=function(e,t,r){return e&t^e&r^t&r};const n=r(9175);function i(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),a=Number(r>>i&o),s=Number(r&o),c=n?4:0,u=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+u,s,n)}class o extends n.Hash{constructor(e,t,r,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(e),this.view=(0,n.createView)(this.buffer)}update(e){(0,n.aexists)(this),e=(0,n.toBytes)(e),(0,n.abytes)(e);const{view:t,buffer:r,blockLen:i}=this,o=e.length;for(let a=0;a<o;){const s=Math.min(i-this.pos,o-a);if(s===i){const t=(0,n.createView)(e);for(;i<=o-a;a+=i)this.process(t,a);continue}r.set(e.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===i&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.aexists)(this),(0,n.aoutput)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:o,isLE:a}=this;let{pos:s}=this;t[s++]=128,(0,n.clean)(this.buffer.subarray(s)),this.padOffset>o-s&&(this.process(r,0),s=0);for(let e=s;e<o;e++)t[e]=0;i(r,o-8,BigInt(8*this.length),a),this.process(r,0);const c=(0,n.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)c.setUint32(4*e,d[e],a)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=i,e.length=n,e.pos=a,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}t.HashMD=o,t.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),t.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),t.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),t.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])},7248:(e,t,r)=>{"use strict";r.d(t,{P:()=>s});var n=r(2609),i=r(7493),o=r(9095),a=r(3085);class s extends a.G{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){const r=new n.T(o.Rd.encode(JSON.stringify(this._payload)));if(r.setProtectedHeader(this._protectedHeader),Array.isArray(this._protectedHeader?.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new i.JWTInvalid("JWTs MUST NOT use unencoded payload");return r.sign(e,t)}}},7307:(e,t,r)=>{"use strict";r.d(t,{T:()=>i});var n=r(8793);async function i(e,t){return(0,n.T)(e,t)}},7335:(e,t,r)=>{"use strict";r.d(t,{Do:()=>a,Eu:()=>n,XV:()=>o});const n=["blankNode","defaultGraph","literal","namedNode","quad","variable","supports"],i={first:"http://www.w3.org/1999/02/22-rdf-syntax-ns#first",rest:"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",nil:"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"};function o(e,t,r){const n=[];return r.reduce((t,r,o,a)=>{let s;return n.push(e.quad(t,e.namedNode(i.first),a[o])),o<a.length-1?(s=e.blankNode(),n.push(e.quad(t,e.namedNode(i.rest),s))):n.push(e.quad(t,e.namedNode(i.rest),e.namedNode(i.nil))),s},t),n}function a(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;var n=e.length;for(r<0&&(r=n+r);r<n;r++)if(e[r]===t)return r;return-1}},7383:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},7442:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.Person=t.PeoplePicker=t.GroupPicker=t.GroupBuilder=t.Group=void 0;var o,a=n(r(166)),s=n(r(7383)),c=n(r(4579)),u=n(r(580)),l=n(r(182)),d=v(r(2209)),p=v(r(2902)),f=r(3957),h=r(1302),m=r(4901),g=v(r(2054));function v(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(v=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var y=r(3451).solidLogicSingleton.store,b=(t.PeoplePicker=function(){return(0,c.default)(function e(t,r,n,i){(0,s.default)(this,e),this.options=i||{},this.element=t,this.typeIndex=r,this.groupPickedCb=n,this.selectedgroup=this.options.selectedgroup,this.onSelectGroup=this.onSelectGroup.bind(this)},[{key:"render",value:function(){var e=this,t=document.createElement("div");if(t.style.maxWidth="350px",t.style.minHeight="200px",t.style.outline="1px solid black",t.style.display="flex",this.selectedgroup){t.style.flexDirection="column";var r=document.createElement("div");new w(r,this.selectedgroup).render();var n=document.createElement("button");n.textContent=(0,u.default)("Change group"),n.addEventListener("click",function(t){e.selectedgroup=null,e.render()}),t.appendChild(r),t.appendChild(n)}else this.findAddressBook(this.typeIndex).then(function(r){var n=r.book,i=document.createElement("button");i.textContent=(0,u.default)("Pick an existing group"),i.style.margin="auto",i.addEventListener("click",function(r){new b(t,n,e.onSelectGroup).render()});var o=document.createElement("button");o.textContent=(0,u.default)("Create a new group"),o.style.margin="auto",o.addEventListener("click",function(t){e.createNewGroup(n,e.options.defaultNewGroupName).then(function(t){var r=t.group;new x(e.element,n,r,e.onSelectGroup).render()}).catch(function(t){e.element.appendChild((0,h.errorMessageBlock)(document,(0,u.default)("Error creating a new group. (".concat(t,")"))))})}),t.appendChild(i),t.appendChild(o),e.element.innerHTML="",e.element.appendChild(t)}).catch(function(t){e.element.appendChild((0,h.errorMessageBlock)(document,(0,u.default)("Could find your groups. (".concat(t,")"))))});return this.element.innerHTML="",this.element.appendChild(t),this}},{key:"findAddressBook",value:function(e){return new Promise(function(t,r){y.fetcher.nowOrWhenFetched(e,function(n,i){if(!n)return r(i);var o=y.any(null,g.solid("forClass"),g.vcard("AddressBook"));if(!o)return r(new Error("no address book registered in the solid type index "+e));var a=y.any(o,g.solid("instance"));if(!a)return r(new Error("incomplete address book registration"));y.fetcher.load(a).then(function(e){return t({book:a})}).catch(function(e){return r(new Error("Could not load address book "+e))})})})}},{key:"createNewGroup",value:function(e,t){var r=A(e),n=r.groupIndex,i=r.groupContainer,o=d.sym("".concat(i.uri).concat(l.default.v4().slice(0,8),".ttl#this")),a=t||"Untitled Group",s=[o.doc(),n].map(function(t){var r=d.st(o,g.rdf("type"),g.vcard("Group"),t),i=d.st(o,g.vcard("fn"),a,o.doc(),t),s=d.st(e,g.vcard("includesGroup"),o,t),c=t.equals(n)?[r,i,s]:[r,i];return S(t.uri,{toIns:c}).then(function(){c.forEach(function(e){y.add(e)})})});return Promise.all(s).then(function(){return{group:o}}).catch(function(e){throw p.log("Could not create new group. PATCH failed "+e),new Error("Couldn't create new group. PATCH failed for (".concat(e.xhr?e.xhr.responseURL:""," )"))})}},{key:"onSelectGroup",value:function(e){this.selectedgroup=e,this.groupPickedCb(e),this.render()}}])}(),t.GroupPicker=function(){return(0,c.default)(function e(t,r,n){(0,s.default)(this,e),this.element=t,this.book=r,this.onSelectGroup=n},[{key:"render",value:function(){var e=this;return this.loadGroups().then(function(t){var r=document.createElement("div");r.style.display="flex",r.style.flexDirection="column",t.forEach(function(t){var n=document.createElement("button");n.addEventListener("click",e.handleClickGroup(t)),new w(n,t).render(),r.appendChild(n)}),e.element.innerHTML="",e.element.appendChild(r)}).catch(function(t){e.element.appendChild((0,h.errorMessageBlock)(document,(0,u.default)("There was an error loading your groups. (".concat(t,")"))))}),this}},{key:"loadGroups",value:function(){var e=this;return new Promise(function(t,r){var n=A(e.book).groupIndex;y.fetcher.nowOrWhenFetched(n,function(n,i){if(!n)return r(i);var o=y.each(e.book,g.vcard("includesGroup"));return t(o)})})}},{key:"handleClickGroup",value:function(e){var t=this;return function(r){t.onSelectGroup(e)}}}])}()),w=t.Group=function(){return(0,c.default)(function e(t,r){(0,s.default)(this,e),this.element=t,this.group=r},[{key:"render",value:function(){var e=document.createElement("div");return e.textContent=(0,u.default)(E(this.group,g.vcard("fn"),"[".concat(this.group.value,"]"))),this.element.innerHTML="",this.element.appendChild(e),this}}])}(),x=t.GroupBuilder=function(){return(0,c.default)(function e(t,r,n,i,o){(0,s.default)(this,e),this.element=t,this.book=r,this.group=n,this.onGroupChanged=function(e,t,r){o&&o(e,t,r)},this.groupChangedCb=o,this.doneBuildingCb=i},[{key:"refresh",value:function(){}},{key:"render",value:function(){var e=this,t=document.createElement("div");t.style.maxWidth="350px",t.style.minHeight="200px",t.style.outline="1px solid black",t.style.display="flex",t.style.flexDirection="column",(0,f.makeDropTarget)(t,function(t){t.forEach(function(t){e.add(t).catch(function(t){e.element.appendChild((0,h.errorMessageBlock)(document,(0,u.default)("Could not add the given WebId. (".concat(t,")"))))})})});var r=document.createElement("input");r.type="text",r.value=E(this.group,g.vcard("fn"),"Untitled Group"),r.addEventListener("change",function(t){e.setGroupName(t.target.value).catch(function(t){e.element.appendChild((0,h.errorMessageBlock)(document,"Error changing group name. (".concat(t,")")))})});var n=document.createElement("label");if(n.textContent=(0,u.default)("Group Name:"),n.appendChild(r),t.appendChild(n),y.any(this.group,g.vcard("hasMember")))y.match(this.group,g.vcard("hasMember")).forEach(function(r){var n=r.object,i=document.createElement("div");new _(i,n,e.handleRemove(n)).render(),t.appendChild(i)});else{var i=document.createElement("p");i.textContent=(0,u.default)(o||(o=(0,a.default)(["\n To add someone to this group, drag and drop their WebID URL onto the box.\n "]))),t.appendChild(i)}var s=document.createElement("button");return s.textContent=(0,u.default)("Done"),s.addEventListener("click",function(t){e.doneBuildingCb(e.group)}),t.appendChild(s),this.element.innerHTML="",this.element.appendChild(t),this}},{key:"add",value:function(e){var t=this;return new Promise(function(r,n){y.fetcher.nowOrWhenFetched(e,function(i,o){if(!i)return t.onGroupChanged(o),n(o);var a=d.namedNode(e),s=y.any(a,g.rdf("type"));return s&&s.equals(g.foaf("Person"))?r(a):n(new Error("Only people supported right now. (tried to add something of type ".concat(s.value,")")))})}).then(function(e){var r=d.st(t.group,g.vcard("hasMember"),e);return y.holdsStatement(r)?e:S(t.group.doc().uri,{toIns:[r]}).then(function(){r.why=t.group.doc(),y.add(r),t.onGroupChanged(null,"added",e),t.render()})})}},{key:"handleRemove",value:function(e){var t=this;return function(r){var n=d.st(t.group,g.vcard("hasMember"),e);return S(t.group.doc().uri,{toDel:[n]}).then(function(){return y.remove(n),t.onGroupChanged(null,"removed",e),t.render(),!0}).catch(function(t){var r=y.any(e,g.foaf("name")),n=r&&r.value?"Could not remove ".concat(r.value,". (").concat(t,")"):"Could not remove ".concat(e.value,". (").concat(t,")");throw new Error(n)})}}},{key:"setGroupName",value:function(e){var t=this,r=A(this.book).groupIndex,n=[this.group.doc(),r].map(function(r){var n=y.match(t.group,g.vcard("fn"),null,r),i=d.st(t.group,g.vcard("fn"),d.literal(e));return S(r.value,{toDel:n,toIns:[i]}).then(function(e){y.removeStatements(n),i.why=r,y.add(i)})});return Promise.all(n)}}])}(),_=t.Person=function(){return(0,c.default)(function e(t,r,n){(0,s.default)(this,e),this.webIdNode=r,this.element=t,this.handleRemove=n},[{key:"render",value:function(){var e=this,t=document.createElement("div");t.style.display="flex";var r=E(this.webIdNode,g.foaf("img"),m.iconBase+"noun_15059.svg"),n=document.createElement("img");n.src=(0,u.default)(r),n.width="50",n.height="50",n.style.margin="5px";var i=E(this.webIdNode,g.foaf("name"),"[".concat(this.webIdNode,"]")),o=document.createElement("span");o.innerHTML=(0,u.default)(i),o.style.flexGrow="1",o.style.margin="auto 0";var a=document.createElement("button");return a.textContent="Remove",a.addEventListener("click",function(t){return e.handleRemove().catch(function(t){e.element.appendChild((0,h.errorMessageBlock)(document,(0,u.default)("".concat(t))))})}),a.style.margin="5px",t.appendChild(n),t.appendChild(o),t.appendChild(a),this.element.innerHTML="",this.element.appendChild(t),this}}])}();function E(e,t,r){var n=y.any(e,t);return n?n.value:r}function S(e,t){var r=t.toDel,n=t.toIns;return new Promise(function(e,t){y.updater.update(r,n,function(r,n,i){if(!n)return t(new Error("PATCH failed for resource <".concat(r,">: ").concat(i)));e()})})}function A(e){return{groupIndex:y.any(e,g.vcard("groupIndex")),groupContainer:y.sym(e.dir().uri+"Group/")}}},7472:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.keyContainerAclBody=t.keyAclBody=void 0,t.setAcl=function(e,t){return u.apply(this,arguments)};var o=n(r(4756)),a=n(r(9293)),s=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var r,n,o={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return o;if(r=t){if(r.has(e))return r.get(e);r.set(e,o)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(n.get||n.set)?r(o,a,n):o[a]=e[a]);return o}(e)}(r(2902)),c=r(3451);function u(){return(u=(0,a.default)(o.default.mark(function e(t,r){var n,i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,c.store.fetcher.load(t);case 1:if(n=c.store.any(c.store.sym(t),c.store.sym("http://www.iana.org/assignments/link-relations/acl"))){e.next=2;break}throw new Error("Key ACL doc not found!");case 2:return e.prev=2,e.next=3,c.store.fetcher.webOperation("PUT",n.value,{data:r,contentType:"text/turtle"});case 3:e.next=6;break;case 4:if(e.prev=4,404===(null==(a=e.catch(2))||null===(i=a.response)||void 0===i?void 0:i.status)){e.next=5;break}throw new Error(a);case 5:s.log("delete "+n.value+" "+a.response.status);case 6:case"end":return e.stop()}},e,null,[[2,4]])}))).apply(this,arguments)}t.keyContainerAclBody=function(e){return"\n@prefix : <#>.\n@prefix acl: <http://www.w3.org/ns/auth/acl#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix key: <./>.\n\n:ReadWrite\n a acl:Authorization;\n acl:accessTo key:;\n acl:default key:;\n acl:agent <".concat(e,">;\n acl:mode acl:Read, acl:Write.\n")},t.keyAclBody=function(e,t){var r="acl:agentClass foaf:Agent";return null!=t&&t.length&&(r="acl:agent <".concat(t,">")),"\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix acl: <http://www.w3.org/ns/auth/acl#>.\n<#Read>\n a acl:Authorization;\n ".concat(r,";\n acl:accessTo <").concat(e.split("/").pop(),">;\n acl:mode acl:Read.\n")}},7493:(e,t,r)=>{"use strict";r.r(t),r.d(t,{JOSEAlgNotAllowed:()=>a,JOSEError:()=>n,JOSENotSupported:()=>s,JWEDecryptionFailed:()=>c,JWEInvalid:()=>u,JWKInvalid:()=>p,JWKSInvalid:()=>f,JWKSMultipleMatchingKeys:()=>m,JWKSNoMatchingKey:()=>h,JWKSTimeout:()=>g,JWSInvalid:()=>l,JWSSignatureVerificationFailed:()=>v,JWTClaimValidationFailed:()=>i,JWTExpired:()=>o,JWTInvalid:()=>d});class n extends Error{constructor(e,t){super(e,t),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}n.code="ERR_JOSE_GENERIC";class i extends n{constructor(e,t,r="unspecified",n="unspecified"){super(e,{cause:{claim:r,reason:n,payload:t}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=r,this.reason=n,this.payload=t}}i.code="ERR_JWT_CLAIM_VALIDATION_FAILED";class o extends n{constructor(e,t,r="unspecified",n="unspecified"){super(e,{cause:{claim:r,reason:n,payload:t}}),this.code="ERR_JWT_EXPIRED",this.claim=r,this.reason=n,this.payload=t}}o.code="ERR_JWT_EXPIRED";class a extends n{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}}a.code="ERR_JOSE_ALG_NOT_ALLOWED";class s extends n{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}}s.code="ERR_JOSE_NOT_SUPPORTED";class c extends n{constructor(e="decryption operation failed",t){super(e,t),this.code="ERR_JWE_DECRYPTION_FAILED"}}c.code="ERR_JWE_DECRYPTION_FAILED";class u extends n{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}}u.code="ERR_JWE_INVALID";class l extends n{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}}l.code="ERR_JWS_INVALID";class d extends n{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}}d.code="ERR_JWT_INVALID";class p extends n{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}}p.code="ERR_JWK_INVALID";class f extends n{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}}f.code="ERR_JWKS_INVALID";class h extends n{constructor(e="no applicable key found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_NO_MATCHING_KEY"}}h.code="ERR_JWKS_NO_MATCHING_KEY";class m extends n{constructor(e="multiple matching keys found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}Symbol.asyncIterator,m.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";class g extends n{constructor(e="request timed out",t){super(e,t),this.code="ERR_JWKS_TIMEOUT"}}g.code="ERR_JWKS_TIMEOUT";class v extends n{constructor(e="signature verification failed",t){super(e,t),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}v.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"},7499:(e,t,r)=>{"use strict";var n=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.AJARImage=function(e,t,r,n){n||(n=document);var i=n.createElement("img");return i.setAttribute("src",e),i.addEventListener("copy",function(e){e.clipboardData.setData("text/plain",""),e.clipboardData.setData("text/html",""),e.preventDefault()}),void 0!==r&&i.setAttribute("title",r),i},t.RDFComparePredicateObject=function(e,t){var r=e.predicate.compareTerm(t.predicate);return 0!==r?r:e.object.compareTerm(t.object)},t.RDFComparePredicateSubject=function(e,t){var r=e.predicate.compareTerm(t.predicate);return 0!==r?r:e.subject.compareTerm(t.subject)},t.addLoadEvent=function(e){var t=window.onload;"function"!=typeof window.onload?window.onload=e:window.onload=function(){t(),e()}},t.ancestor=function(e,t){var r;for(r=e;r;r=r.parentNode)try{if(r.tagName===t)return r}catch(e){return}},t.beep=function(){if(l){var e=new l;return function(t,r,n,i){t=+(t||.3),n=n||"sine","function"!=typeof i&&(i=function(){});var o=e.createOscillator();o.type=n,o.frequency.value=r||256,o.connect(e.destination),o.start(0),o.stop(t)}}},t.clearVariableNames=function(){p=0},t.emptyNode=function(e){for(var t=e.childNodes,r=t.length-1;r>=0;r--)e.removeChild(t[r]);return e},t.escapeForXML=g,t.findPos=h,t.genUuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},t.getAbout=f,t.getEyeFocus=function(e,t,r,n){n||(n=window);var i=h(e)[1],o=window.SolidAppContext||{},a=i-(o&&o.scroll||52)-n.scrollY;if(t)return r?void n.scrollBy(0,i+e.clientHeight-(n.scrollY+n.innerHeight)):void n.scrollBy(0,a);var s=n.setInterval(function(){n.scrollBy(0,a/10),10===++c&&n.clearInterval(s)},50),c=0},t.getTarget=function(e){var t;return(e=e||window.event).target?t=e.target:e.srcElement&&(t=e.srcElement),3===t.nodeType&&(t=t.parentNode),t},t.getTerm=function(e){var t=e.parentNode,r=t?t.AJAR_statement:void 0;switch(r?e.className:""){case"pred":case"pred selected":return r.predicate;case"obj":case"obj selected":return t.AJAR_inverse?r.subject:r.object;case"":case"selected":return f(o.store,e);case"undetermined selected":return e.nextSibling?r.predicate:t.AJAR_inverse?r.subject:r.object}},t.hashColor=function(e){return"#"+(16777215&(t=e=e.uri||e,t.split("").reduce(function(e,t){return(e=(e<<5)-e+t.charCodeAt(0))&e},0))|12632256).toString(16);var t},t.include=function(e,t){var r=e.createElement("script");return r.setAttribute("type","text/javascript"),r.setAttribute("src",t),r},Object.defineProperty(t,"label",{enumerable:!0,get:function(){return c.label}}),t.labelForXML=function(e){return g((0,c.label)(e))},t.labelWithOntology=function(e,t){var r=o.store.findTypeURIs(e);return r[d.ns.rdf("Predicate").uri]||r[d.ns.rdfs("Class").uri]?(0,c.label)(e,t)+" ("+m(e)+")":(0,c.label)(e,t)},t.newVariableName=function(){return"v"+p++},t.ontologyLabel=m,t.predParentOf=function(e){for(var t=e;;){if(t.getAttribute("predTR"))return t;if(!t.previousSibling||"TR"!==t.previousSibling.nodeName)return d.log.error("Could not find predParent"),e;t=t.previousSibling}},t.predicateLabel=v,t.predicateLabelForXML=function(e,t){return g(v(e,t))},t.shortName=function(e){var t=e;"#/".indexOf(t[t.length-1])>=0&&(t=t.slice(0,-1));var r,n=[];for(var i in this.prefixes)n[this.prefixes[i]]=i;var o,a=function(e){return"ns"!==e&&(r=e,!0)},s=t.lastIndexOf("#");for(s>=0&&(t=t.slice(s-1));;){var c=t.lastIndexOf("/");for(c>=0&&(t=t.slice(c+1)),o=0;o<t.length&&this.prefixchars.indexOf(t[o]);)o++;if((t=t.slice(0,o)).length<6&&a(t))return r;if(a(t.slice(0,3)))return r;if(a(t.slice(0,2)))return r;if(a(t.slice(0,4)))return r;if(a(t.slice(0,1)))return r;if(a(t.slice(0,5)))return r;for(o=0;;o++)if(a(t.slice(0,3)+o))return r}},t.stackString=function(e){var t,r=e+"\n";if(!e.stack)return r+"No stack available.\n";var n=e.stack.toString().split("\n"),i=[];for(t=0;t<n.length;t++){var o=n[t];if(o.indexOf("ecmaunit.js")>-1)break;"("===o.charAt(0)&&(o="function"+o);var a=o.split("@");i.push(a)}for(t=0;t<i.length;t++)r+=" "+i[t][1]+"\n "+i[t][0];return r},t.syncTableToArray=function(e,t,r){var n,i,o;for(o=0;o<e.children.length;o++)(i=e.children[o]).trashMe=!0;for(var a=0;a<t.length;a++){var s=t[a];for(n=!1,o=0;o<e.children.length;o++)if((i=e.children[o]).subject&&i.subject.sameTerm(s)){i.trashMe=!1,n=!0;break}if(!n){var c=r(s);if(a>=e.children.length)e.appendChild(c);else{var u=e.children[a];e.insertBefore(c,u)}c.subject=s}}for(o=0;o<e.children.length;o++)(i=e.children[o]).trashMe&&e.removeChild(i)},t.syncTableToArrayReOrdered=function(e,t,r){for(var n={},i=0;i<e.children.length;i++){var o=e.children[i];n[o.subject.toNT()]=o}for(var a=0;a<t.length;a++){var s=t[a];if(a>=e.children.length){var c=r(s);c.subject=s,e.appendChild(c)}else{var u=e.children[a];if(u.subject.sameTerm(s));else{var l=n[s.toNT()];if(l)e.removeChild(l),e.insertBefore(l,u);else{var d=r(s);u.before(d),d.subject=s}}}}for(;e.children.length>t.length;)e.removeChild(e.children[e.children.length-1])};var i=u(r(9295)),o=r(3451),a=u(r(2054)),s=u(r(2209)),c=r(8097);function u(e,t){if("function"==typeof WeakMap)var r=new WeakMap,i=new WeakMap;return(u=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return s;if(o=t?i:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var l,d={log:i,ns:a,rdf:s},p=0;function f(e,t){var r,n;for(r=t;r&&1===r.nodeType;r=r.parentNode)if(n=r.getAttribute("about"))return e.fromNT(n);d.log.debug("getAbout: No about found")}function h(e){var t=e.ownerDocument.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return[r.left-t.left,r.top-t.top]}function m(e){if(void 0===e.uri)return"??";var t,r=e.uri,n=[],i=r.lastIndexOf("#");if(i>=0)r=r.slice(0,i+1);else{if(!((i=r.lastIndexOf("/"))>=0))return e.uri+"?!";r=r.slice(0,i+1)}for(var o in d.ns)n[d.ns[o]]=o;try{return n[r]}catch(e){}for(r=r.slice(0,-1);r;){if(!((i=r.lastIndexOf("/"))>=0))return e.uri+"!?";if(t=r.slice(i+1),r=r.slice(0,i),"ns"!==t&&"0123456789".indexOf(t[0])<0)return t}}function g(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;")}function v(e,t){var r=(0,c.label)(e);if(t){var n=o.store.any(e,d.ns.owl("inverseOf"))||o.store.any(void 0,d.ns.owl("inverseOf"),e);return n?(0,c.label)(n):"type"===r?"...":"is "+r+" of"}return r}"undefined"!=typeof AudioContext?l=AudioContext:"undefined"!=typeof window&&(l=window.AudioContext||window.webkitAudioContext)},7526:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],c=o[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,c)),l=0,d=c>0?a-4:a;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,c=n-i;s<c;s+=a)o.push(u(e,s,s+a>c?c:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(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 c(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function u(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(c(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},7532:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.addDefaults=f,t.defaultPreferredLanguages=void 0,t.filterByLanguage=function(e,t){var r={};e.forEach(function(e){var t=e.subject.value;r[t]=r[t]||[],r[t].push(e)});var n=t||p;n.reverse();var i=[];for(var o in r){var a=r[o].map(function(e){var t=e.name["xml:lang"];return[n.indexOf(t),e]});a.sort(),a.reverse(),i.push(a[0][1])}return s.log(" Filter by language: ".concat(e.length," -> ").concat(i.length)),i},t.getPreferredLanguages=function(){return g.apply(this,arguments)},t.getPreferredLanguagesFor=h,t.languageCodeURIBase=void 0;var o=n(r(4756)),a=n(r(9293)),s=l(r(2902)),c=r(3451),u=l(r(2054));function l(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(l=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var d=t.languageCodeURIBase="https://www.w3.org/ns/iana/language-code/",p=t.defaultPreferredLanguages=["en","fr","de","it","ar"];function f(e){return e||(e=[]),e.concat(p.filter(function(t){return!e.includes(t)}))}function h(e){return m.apply(this,arguments)}function m(){return(m=(0,a.default)(o.default.mark(function e(t){var r,n,i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.doc(),e.next=1,null===(r=c.store.fetcher)||void 0===r?void 0:r.load(n);case 1:if(i=c.store.any(t,u.schema("knowsLanguage"),null,n)){e.next=2;break}return e.abrupt("return",p);case 2:if(a=[],i.elements.forEach(function(e){var t=c.store.any(e,u.solid("publicId"),null,n);if(t)if(t.value.startsWith(d)){var r=t.value.slice(d.length);a.push(r)}else console.error("What should be a language code ".concat(t.value," does not start with ").concat(d));else console.warn("getPreferredLanguages: No publiID of language.")}),!(a.length>0)){e.next=3;break}return console.log(' User knows languages with codes: "'.concat(a.join(","),'"')),e.abrupt("return",f(a));case 3:return e.abrupt("return",null);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function g(){return(g=(0,a.default)(o.default.mark(function e(){var t,r;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,c.authn.currentUser();case 1:if(!(t=e.sent)){e.next=3;break}return e.next=2,h(t);case 2:if(!(r=e.sent)){e.next=3;break}return e.abrupt("return",r);case 3:if("undefined"==typeof navigator){e.next=5;break}if(!navigator.languages){e.next=4;break}return e.abrupt("return",f(navigator.languages.map(function(e){return e.split("-")[0]})));case 4:if(!navigator.language){e.next=5;break}return e.abrupt("return",f([navigator.language.split("-")[0]]));case 5:return e.abrupt("return",p);case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)}},7550:e=>{function t(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(e.exports=t=function(){return!!r},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},7598:(e,t,r)=>{e.exports=r(1813)},7736:(e,t,r)=>{var n=r(3738).default,i=r(9045);e.exports=function(e){var t=i(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},7752:e=>{e.exports=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.")},e.exports.__esModule=!0,e.exports.default=e.exports},7822:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.ensureLoadedPreferences=I,t.ensureLoadedProfile=P,t.ensureLoggedIn=T,t.filterAvailablePanes=function(e){return W.apply(this,arguments)},t.findAppInstances=function(e,t,r){return O.apply(this,arguments)},t.getUserRoles=H,t.loginStatusBox=M,t.newAppInstance=function(e,t,r){var n=function(e,t){r(e,t)},i=e.createElement("div"),o=e.createElement("button");return o.setAttribute("type","button"),i.appendChild(o),o.innerHTML="Make new ".concat(t.noun),o.addEventListener("click",function(r){i.appendChild(B(e,t,n))},!1),i.appendChild(o),i},t.registrationControl=function(e,t,r){return j.apply(this,arguments)},t.registrationList=function(e,t){return D.apply(this,arguments)},t.renderScopeHeadingRow=L,t.renderSignInPopup=U,t.scopeLabel=R,t.selectWorkspace=B;var o=n(r(4756)),a=n(r(9293)),s=r(2209),c=r(3451),u=g(r(2902)),l=g(r(5148)),d=r(9295),p=g(r(2054)),f=r(3292),h=g(r(7499)),m=g(r(1939));function g(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(g=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}function v(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 y(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)?y(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 y(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}c.solidLogicSingleton.store;var b=c.solidLogicSingleton.profile,w=b.loadPreferences,x=b.loadProfile,_=c.solidLogicSingleton.typeIndex,E=_.getScopedAppInstances,S=_.getRegistrations,A=_.loadAllTypeIndexes,k=_.getScopedAppsFromIndex,C=_.deleteTypeIndexRegistration;function T(e){var t=c.authn.currentUser();return t?(c.authn.saveUser(t,e),Promise.resolve(e)):new Promise(function(t){c.authn.checkUser().then(function(r){if(r)return u.log("logIn: Already logged in as ".concat(r)),t(e);if(!e.div||!e.dom)return t(e);var n=M(e.dom,function(r){c.authn.saveUser(r,e),t(e)});e.div.appendChild(n)})})}function I(e){return F.apply(this,arguments)}function F(){return(F=(0,a.default)(o.default.mark(function e(t){var r,n,i;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.preferencesFile){e.next=1;break}return e.abrupt("return",Promise.resolve(t));case 1:return e.prev=1,e.next=2,P(t);case 2:return t=e.sent,e.next=3,w(t.me);case 3:r=e.sent,t.preferencesFile=r,e.next=11;break;case 4:if(e.prev=4,!((i=e.catch(1))instanceof c.UnauthorizedError)){e.next=5;break}n="Oops — you are not authenticated (properly logged in), so SolidOS cannot read your preferences file. Try logging out and then logging back in.",(0,d.alert)(n),e.next=11;break;case 5:if(!(i instanceof c.CrossOriginForbiddenError)){e.next=6;break}return n="Unauthorized: Assuming preference file blocked for origin ".concat(window.location.origin),t.preferencesFileError=n,e.abrupt("return",t);case 6:if(!(i instanceof c.SameOriginForbiddenError)){e.next=7;break}return n="You are not authorized to read your preference file. This may be because you are using an untrusted web app.",u.warn(n),e.abrupt("return",t);case 7:if(!(i instanceof c.NotEditableError)){e.next=8;break}return n="You are not authorized to edit your preference file. This may be because you are using an untrusted web app.",u.warn(n),e.abrupt("return",t);case 8:if(!(i instanceof c.WebOperationError)){e.next=9;break}n="You are not authorized to edit your preference file. This may be because you are using an untrusted web app.",u.warn(n),e.next=11;break;case 9:if(!(i instanceof c.FetchError)){e.next=10;break}n="Strange: Error ".concat(i.status," trying to read your preference file.").concat(i.message),(0,d.alert)(n),e.next=11;break;case 10:throw new Error("(via loadPrefs) ".concat(i));case 11:return e.abrupt("return",t);case 12:case"end":return e.stop()}},e,null,[[1,4]])}))).apply(this,arguments)}function P(e){return N.apply(this,arguments)}function N(){return(N=(0,a.default)(o.default.mark(function e(t){var r,n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.publicProfile){e.next=1;break}return e.abrupt("return",t);case 1:return e.prev=1,e.next=2,T(t);case 2:if((r=e.sent).me){e.next=3;break}throw new Error("Could not log in");case 3:return e.next=4,x(r.me);case 4:t.publicProfile=e.sent,e.next=6;break;case 5:throw e.prev=5,n=e.catch(1),t.div&&t.dom&&t.div.appendChild(m.errorMessageBlock(t.dom,n.message)),new Error("Can't log in: ".concat(n));case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}},e,null,[[1,5]])}))).apply(this,arguments)}function O(){return(O=(0,a.default)(o.default.mark(function e(t,r,n){var i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.me){e.next=2;break}return e.next=1,E(r,t.me);case 1:a=e.sent,e.next=3;break;case 2:a=[];case 3:return i=a,!0===n?i=i.filter(function(e){return"public"===e.scope.label}):!1===n&&(i=i.filter(function(e){return"private"===e.scope.label})),t.instances=i.map(function(e){return e.instance}),e.abrupt("return",t);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function R(e,t){var r=e.me&&e.me.sameTerm(t.agent)?"":h.label(t.agent)+" ";return"".concat(r).concat(t.label)}function j(){return(j=(0,a.default)(o.default.mark(function e(t,r,n){var i,a,l,d,f,h,g,y,b,w,x,_,E;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=function(e){var r=i(e.index),n=R(t,e),o="".concat(n," link to this ").concat(t.noun);return m.buildCheckboxForm(t.dom,c.solidLogicSingleton.store,o,null,r,b,e.index)},i=function(e){var t=S(r,n),i=t.length?t[0]:m.newThing(e);return[(0,s.st)(i,p.solid("instance"),r,e),(0,s.st)(i,p.solid("forClass"),n,e)]},(l=t.dom)&&t.div){e.next=1;break}throw new Error("registrationControl: need dom and div");case 1:if(d=l.createElement("div"),t.div.appendChild(d),t.me=c.authn.currentUser(),f=t.me){e.next=2;break}return d.innerHTML='<p style="margin:2em;">(Log in to save a link to this)</p>',e.abrupt("return",t);case 2:return e.prev=2,e.next=3,A(f);case 3:h=e.sent,e.next=5;break;case 4:return e.prev=4,E=e.catch(2),t.div&&t.preferencesFileError?(g="(Lists of stuff not available)",t.div.appendChild(l.createElement("p")).textContent=g):t.div&&(g="registrationControl: Type indexes not available: ".concat(E),t.div.appendChild(m.errorMessageBlock(t.dom,E))),u.log(g),e.abrupt("return",t);case 5:d.innerHTML="<table><tbody></tbody></table>",d.setAttribute("style","font-size: 120%; text-align: right; padding: 1em; border: solid gray 0.05em;"),y=d.children[0].children[0],b=new s.BlankNode,w=v(h);try{for(w.s();!(x=w.n()).done;)_=x.value,y.appendChild(l.createElement("tr")).appendChild(a(_))}catch(e){w.e(e)}finally{w.f()}return e.abrupt("return",t);case 6:case"end":return e.stop()}},e,null,[[2,4]])}))).apply(this,arguments)}function L(e,t,r){var n=e.dom,i=R(e,r),o=n.createElement("tr"),a=o.appendChild(n.createElement("td"));a.setAttribute("colspan","3"),a.style.backgoundColor={private:"#fee",public:"#efe"}[r.label]||"white";var s=a.appendChild(n.createElement("h3"));return s.textContent=i+" links",s.style.textAlign="left",o}function D(){return D=(0,a.default)(o.default.mark(function e(t,r){var n,i,s,u,l,d,f,h,g,y,b,w,x,_,E,S;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.dom,i=t.div,s=n.createElement("div"),i.appendChild(s),t.me=c.authn.currentUser(),t.me){e.next=1;break}return s.innerHTML='<p style="margin:2em;">(Log in list your stuff)</p>',e.abrupt("return",t);case 1:return e.next=2,A(t.me);case 2:u=e.sent,s.innerHTML="<table><tbody></tbody></table>",s.setAttribute("style","font-size: 120%; text-align: right; padding: 1em; border: solid #eee 0.5em;"),l=s.firstChild,d=l.firstChild,f=v(u),e.prev=3,f.s();case 4:if((h=f.n()).done){e.next=13;break}return g=h.value,y=L(t,0,g),d.appendChild(y),e.next=5,k(g,r.type||null);case 5:0===(b=e.sent).length&&(y.style.display="none"),w=v(b),e.prev=6,_=o.default.mark(function e(){var t,r;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=x.value,r=m.personTR(n,p.solid("instance"),t.instance,{deleteFunction:function(){var e=(0,a.default)(o.default.mark(function e(){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,C(t);case 1:d.removeChild(r);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}()}),r.children[0].style.paddingLeft="3em",d.appendChild(r);case 1:case"end":return e.stop()}},e)}),w.s();case 7:if((x=w.n()).done){e.next=9;break}return e.delegateYield(_(),"t0",8);case 8:e.next=7;break;case 9:e.next=11;break;case 10:e.prev=10,E=e.catch(6),w.e(E);case 11:return e.prev=11,w.f(),e.finish(11);case 12:e.next=4;break;case 13:e.next=15;break;case 14:e.prev=14,S=e.catch(3),f.e(S);case 15:return e.prev=15,f.f(),e.finish(15);case 16:return e.abrupt("return",t);case 17:case"end":return e.stop()}},e,null,[[3,14,15,16],[6,10,11,12]])})),D.apply(this,arguments)}function U(e){var t=e.createElement("div");t.setAttribute("style","position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center;"),e.body.appendChild(t);var r=e.createElement("div");r.setAttribute("style","\n background-color: white;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n -moz-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n -o-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n min-width: 400px;\n padding: 10px;\n z-index : 10;\n "),t.appendChild(r);var n=e.createElement("div");n.setAttribute("style","\n border-bottom: 1px solid #DDD;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n "),r.appendChild(n);var i=e.createElement("label");i.setAttribute("style","margin-right: 5px; font-weight: 800"),i.innerText="Select an identity provider";var s=e.createElement("button");s.innerHTML='<img src="https://solidos.github.io/solid-ui/src/icons/noun_1180156.svg" style="width: 2em; height: 2em;" title="Cancel">',s.setAttribute("style","background-color: transparent; border: none;"),s.addEventListener("click",function(){t.remove()}),n.appendChild(i),n.appendChild(s);var u=function(){var e=(0,a.default)(o.default.mark(function e(t){var r,n,i;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,c.solidLogicSingleton.store.updater.flagAuthorizationMetadata(),(r=new URL(window.location.href).hash)&&window.localStorage.setItem("preLoginRedirectHash",r),window.localStorage.setItem("loginIssuer",t),(n=new URL(window.location.href)).hash="",e.next=1,c.authSession.login({redirectUrl:n.href,oidcIssuer:t});case 1:e.next=3;break;case 2:e.prev=2,i=e.catch(0),(0,d.alert)(i.message);case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),l=e.createElement("div");l.setAttribute("style","\n border-bottom: 1px solid #DDD;\n display: flex;\n flex-direction: column;\n padding-top: 10px;\n ");var p=e.createElement("div");p.setAttribute("style","\n display: flex;\n flex-direction: row;\n ");var f=e.createElement("label");f.innerText="Enter the URL of your identity provider:",f.setAttribute("style","color: #888");var h=e.createElement("input");h.setAttribute("type","text"),h.setAttribute("style","margin-left: 0 !important; flex: 1; margin-right: 5px !important"),h.setAttribute("placeholder","https://example.com"),h.value=localStorage.getItem("loginIssuer")||"";var m=e.createElement("button");m.innerText="Go",m.setAttribute("style","margin-top: 12px; margin-bottom: 12px;"),m.addEventListener("click",function(){u(h.value)}),l.appendChild(f),p.appendChild(h),p.appendChild(m),l.appendChild(p),r.appendChild(l);var g=e.createElement("div");g.setAttribute("style","\n display: flex;\n flex-direction: column;\n padding-top: 10px;\n ");var v=e.createElement("label");v.innerText="Or pick an identity provider from the list below:",v.setAttribute("style","color: #888"),g.appendChild(v),(0,c.getSuggestedIssuers)().forEach(function(t){var r=e.createElement("button");r.innerText=t.name,r.setAttribute("style","height: 38px; margin-top: 10px"),r.addEventListener("click",function(){u(t.uri)}),g.appendChild(r)}),r.appendChild(g)}function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=(0,c.offlineTestID)(),i=e.createElement("div");function o(e){e&&(n=c.authn.saveUser(e),i.refresh(),t&&t(n.uri))}function a(e){var r=n;c.authSession.logout().then(function(){var e="Your WebID was ".concat(r,". It has been forgotten.");n=null;try{(0,d.alert)(e)}catch(t){window.alert(e)}i.refresh(),t&&t(null)},function(e){(0,d.alert)("Fail to log out:"+e)})}function s(){n=c.authn.currentUser(),i.refresh()}return i.refresh=function(){var t=c.authSession.info;((n=t&&t.webId&&t.isLoggedIn?c.solidLogicSingleton.store.sym(t.webId):null)&&i.me!==n.uri||!n&&i.me)&&(m.clearElement(i),n?i.appendChild(function(t,r){var n=r.buttonStyle||l.signInAndUpButtonStyle,i="WebID logout";if(t){var o=c.solidLogicSingleton.store.any(t,p.foaf("nick"))||c.solidLogicSingleton.store.any(t,p.foaf("name"));o&&(i="Logout "+o.value)}var s=e.createElement("input");return s.setAttribute("type","button"),s.setAttribute("value",i),s.setAttribute("style","".concat(n)),s.addEventListener("click",a,!1),s}(n,r)):i.appendChild(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=(r=r||{}).buttonStyle||l.signInAndUpButtonStyle,i=e.createElement("div"),o="SolidSignInOrSignUpBox";u.log("widgets.signInOrSignUpBox"),i.setUserCallback=t,i.setAttribute("class",o),i.setAttribute("style","display:flex;");var a=e.createElement("input");i.appendChild(a),a.setAttribute("type","button"),a.setAttribute("value","Log in"),a.setAttribute("style","".concat(n).concat(l.headerBannerLoginInput)+l.signUpBackground),c.authSession.events.on("login",function(){var t=c.authn.currentUser();if(t){var r=t.uri,n=e.getElementsByClassName(o);u.log("Logged in, ".concat(n.length," panels to be serviced"));for(var i=0;i<n.length;i++){var a=n[i];if(a.setUserCallback)try{a.setUserCallback(r);var s=a.parentNode;s&&s.removeChild(a)}catch(t){u.log("## Error satisfying login box: ".concat(t)),a.appendChild(m.errorMessageBlock(e,t))}}}}),a.addEventListener("click",function(){var r=(0,c.offlineTestID)();if(r)return t(r.uri);U(e)},!1);var s=e.createElement("input");return i.appendChild(s),s.setAttribute("type","button"),s.setAttribute("value","Sign Up for Solid"),s.setAttribute("style","".concat(n).concat(l.headerBannerLoginInput)+l.signInBackground),s.addEventListener("click",function(e){(new f.Signup).signup().then(function(e){u.log("signInOrSignUpBox signed up "+e),t(e)})},!1),i}(e,o,r))),i.me=n?n.uri:null},i.refresh(),s(),c.authSession.events.on("login",s),c.authSession.events.on("logout",s),i.me="99999",i.refresh(),i}function B(e,t,r){var n=t.noun,i=t.appPathSegment,d=(0,c.offlineTestID)(),f=e.createElement("div"),h={me:d,dom:e,div:f};function g(t,r){f.appendChild(m.errorMessageBlock(e,t,r))}function v(e){var t,r=c.solidLogicSingleton.store.any(e,p.space("uriPrefix"));"/"!==(t=r?r.value:e.uri.split("#")[0]).slice(-1)&&(u.log("".concat(i,": No / at end of uriPrefix ").concat(t)),t="".concat(t,"/"));var n=new Date;return t+"".concat(i,"/id").concat(n.getTime(),"/")}return I(h).then(function(t){function i(){return i=(0,a.default)(o.default.mark(function r(n){var i,a,u,l,d,f;return o.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return i=w.appendChild(e.createElement("tr")),(a=i.appendChild(e.createElement("td"))).setAttribute("colspan","3"),a.style.padding="0.5em",f=encodeURI,r.next=1,m.askName(e,c.solidLogicSingleton.store,a,p.solid("URL"),p.space("Workspace"),"Workspace");case 1:if(u=f(r.sent),l=m.newThing(t.preferencesFile),d=[(0,s.st)(t.me,p.space("workspace"),l,t.preferencesFile),(0,s.st)(l,p.space("uriPrefix"),u,t.preferencesFile)],c.solidLogicSingleton.store.updater){r.next=2;break}throw new Error("store has no updater");case 2:return r.next=3,c.solidLogicSingleton.store.updater.update([],d);case 3:case"end":return r.stop()}},r)})),i.apply(this,arguments)}var u=t.me,d=t.preferencesFile,h=null,y=c.solidLogicSingleton.store.each(u,p.space("workspace"),void 0,d),b=c.solidLogicSingleton.store.each(u,p.space("storage"));0===y.length&&b&&(g("You don't seem to have any workspaces. You have ".concat(b.length," storage spaces."),"white"),b.map(function(e){return y=y.concat(c.solidLogicSingleton.store.each(e,p.ldp("contains")))}).filter(function(e){return e.id?["public","private"].includes(e.id().toLowerCase()):""})),1===y.length&&(g("Workspace used: ".concat(y[0].uri),"white"),h=v(y[0]));var w=e.createElement("table");w.setAttribute("style","border-collapse:separate; border-spacing: 0.5em;"),f.appendChild(w),f.appendChild(e.createElement("hr"));var x=f.appendChild(e.createElement("p"));x.setAttribute("style",l.commentStyle),x.textContent="Where would you like to store the data for the ".concat(n,"?\n Give the URL of the folder where you would like the data stored.\n It can be anywhere in solid world - this URI is just an idea.");var _=f.appendChild(e.createElement("input"));_.setAttribute("type","text"),_.setAttribute("style",l.textInputStyle),_.size=80,_.label="base URL",_.autocomplete="on",h&&(_.value=h),t.baseField=_,f.appendChild(e.createElement("br"));var E,S,A,k,C,T,I,F=f.appendChild(e.createElement("button"));F.setAttribute("style",l.buttonStyle),F.textContent="Start new ".concat(n," at this URI"),F.addEventListener("click",function(e){var t=_.value.replace(" ","%20");"/"!==t.slice(-1)&&(t+="/"),r(null,t)}),y=y.filter(function(e){return!c.solidLogicSingleton.store.holds(e,p.rdf("type"),p.space("MasterWorkspace"))});for(var P="height: 3em; margin: 1em; padding: 1em white; border-radius: 0.3em;",N="".concat(P,"border: 0px;"),O=0;O<y.length;O++){if(C=y[O],k=e.createElement("tr"),0===O&&((E=e.createElement("td")).setAttribute("rowspan","".concat(y.length)),E.textContent="Choose a workspace for this:",E.setAttribute("style","vertical-align:middle;"),k.appendChild(E)),S=e.createElement("td"),!(T=c.solidLogicSingleton.store.anyValue(C,p.ui("style")))){var R="#".concat((16777215&function(e){return e.split("").reduce(function(e,t){return(e=(e<<5)-e+t.charCodeAt(0))&e},0)}(C.uri)|12632256).toString(16));T="color: black ; background-color: ".concat(R,";")}S.setAttribute("style",N+T),k.target=C.uri;var j=c.solidLogicSingleton.store.any(C,p.rdfs("label"));j||(j=C.uri.split("/").slice(-1)[0]||C.uri.split("/").slice(-2)[0]),S.textContent=j||"???",k.appendChild(S),0===O&&((A=e.createElement("td")).setAttribute("rowspan","".concat(y.length,"1")),A.setAttribute("style","width:50%;"),k.appendChild(A)),w.appendChild(k),I=(I=c.solidLogicSingleton.store.any(C,p.rdfs("comment")))?I.value:"Use this workspace",S.addEventListener("click",function(t){A.textContent=I?I.value:"",A.setAttribute("style",N+T);var n=e.createElement("button");n.textContent="Continue";var i=v(C);_.value=i,n.addEventListener("click",function(e){n.disabled=!0,r(C,i),n.textContent="----\x3e"},!0),A.appendChild(n)},!0)}var L=e.createElement("tr");(S=e.createElement("td")).setAttribute("style",P),S.textContent="+ Make a new workspace",S.addEventListener("click",function(e){return i.apply(this,arguments)}),L.appendChild(S),w.appendChild(L)}).catch(function(e){f.appendChild(m.errorMessageBlock(h.dom,e))}),f}function H(){return q.apply(this,arguments)}function q(){return(q=(0,a.default)(o.default.mark(function e(){var t,r,n,i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,I({});case 1:if(t=e.sent,r=t.me,n=t.preferencesFile,i=t.preferencesFileError,n&&!i){e.next=2;break}throw new Error(i);case 2:return e.abrupt("return",c.solidLogicSingleton.store.each(r,p.rdf("type"),null,n.doc()));case 3:return e.prev=3,a=e.catch(0),u.warn("Unable to fetch your preferences - this was the error: ",a),e.abrupt("return",[]);case 4:case"end":return e.stop()}},e,null,[[0,3]])}))).apply(this,arguments)}function W(){return(W=(0,a.default)(o.default.mark(function e(t){var r;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,H();case 1:return r=e.sent,e.abrupt("return",t.filter(function(e){return V(e,r)}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function V(e,t){return(e.audience||[]).reduce(function(e,r){return e&&!!t.find(function(e){return e.equals(r)})},!0)}c.authSession.events.on("logout",(0,a.default)(o.default.mark(function e(){var t,r,n,i;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=window.localStorage.getItem("loginIssuer"))){e.next=6;break}return e.prev=1,c.solidLogicSingleton.store.updater.flagAuthorizationMetadata(),(r=new URL(t)).pathname="/.well-known/openid-configuration",e.next=2,fetch(r.toString());case 2:if(200!==(n=e.sent).status){e.next=4;break}return e.next=3,n.json();case 3:if(!(i=e.sent)||!i.end_session_endpoint){e.next=4;break}return e.next=4,fetch(i.end_session_endpoint,{credentials:"include"});case 4:e.next=6;break;case 5:e.prev=5,e.catch(1);case 6:window.location.reload();case 7:case"end":return e.stop()}},e,null,[[1,5]])})))},7861:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.createContainerLogic=function(e){function t(t){return e.statementsMatching(t,(0,o.sym)("http://www.w3.org/ns/ldp#contains"),void 0).map(function(e){return e.object})}function r(e){var t=e.value;return"/"===t.charAt(t.length-1)}return{isContainer:r,createContainer:function(t){return n(this,void 0,void 0,function(){var n;return i(this,function(i){switch(i.label){case 0:if(!r((0,o.sym)(t)))throw new Error("Not a container URL ".concat(t));return[4,e.fetcher._fetch(t,{method:"PUT",headers:{"Content-Type":"text/turtle","If-None-Match":"*",Link:'<http://www.w3.org/ns/ldp#BasicContainer>; rel="type"'},body:" "})];case 1:if("2"!==(n=i.sent()).status.toString()[0])throw new Error("Not OK: got ".concat(n.status," response while creating container at ").concat(t));return[2]}})})},getContainerElements:t,getContainerMembers:function(r){return n(this,void 0,void 0,function(){return i(this,function(n){switch(n.label){case 0:return[4,e.fetcher.load(r)];case 1:return n.sent(),[2,t(r)]}})})}}};var o=r(2209)},7919:(e,t,r)=>{"use strict";var n=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.get=function(e){return f[e]},t.getPreferencesForClass=function(e,t,r,n){return new Promise(function(i,o){h(e,n).then(function(n){var a=n.sharedPreferences;if(n.me)u.participationObject(e,e.doc(),n.me).then(function(e){m(t,n).then(function(t){var n=[],o=t.personalDefaults;r.forEach(function(t){var r=p.any(e,t)||p.any(a,t)||p.any(o,t);r&&(n[t.uri]=g(r))}),i(n)},o)},o);else{var s=[];r.forEach(function(e){var t=p.any(a,e);t&&(s[e.uri]=g(t))}),i(s)}})})},t.recordPersonalDefaults=m,t.recordSharedPreferences=h,t.renderPreferencesForm=function(e,t,r,n){var i=n.dom.createElement("div");return u.participationObject(e,e.doc(),n.me).then(function(o){var a=n.dom;function s(e){i.appendChild(a.createElement("h5")).textContent=e}s("My view of this "+n.noun),l.appendForm(a,i,{},o,r,e.doc(),function(e,t){e||l.complain(n,t)}),s("Everyone's view of this "+n.noun),h(e,n).then(function(n){var o=n.sharedPreferences;l.appendForm(a,i,{},o,r,e.doc(),function(e,t){e||l.complain(n,t)}),s("My default view of any "+n.noun),m(t,n).then(function(e){l.appendForm(a,i,{},e.personalDefaults,r,e.preferencesFile,function(t,r){t||l.complain(e,r)})},function(e){l.complain(n,e)})})},function(e){i.appendChild(l.errorMessageBlock(n.dom,e))}),i},t.set=function(e,t){if("string"!=typeof t)throw a.log("Non-string value of preference "+e+": "+t),new Error("Non-string value of preference "+e+": "+t);this.value[e]=t},t.value=void 0;var i=d(r(2209)),o=r(3451),a=d(r(2902)),s=r(7822),c=d(r(2054)),u=d(r(4044)),l=d(r(1939));function d(e,t){if("function"==typeof WeakMap)var r=new WeakMap,i=new WeakMap;return(d=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return s;if(o=t?i:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var p=o.store,f=t.value=[];function h(e,t){return new Promise(function(r,n){var o=p.any(e,c.ui("sharedPreferences"));if(o)t.sharedPreferences=o,r(t);else{p.updater.editable(e.doc())||(a.log(" Cant make shared preferences, may not change ".concat(e.doc)),r(t));var s=i.sym(e.doc().uri+"#SharedPreferences"),u=[i.st(e,c.ui("sharedPreferences"),s,e.doc())];a.log("Creating shared preferences "+s),p.updater.update([],u,function(e,i,o){i?(t.sharedPreferences=s,r(t)):n(new Error("Error creating shared prefs: "+o))})}})}function m(e,t){return new Promise(function(r,n){(0,s.ensureLoadedPreferences)(t).then(function(t){if(t.preferencesFile){var o,s,u=p.each(null,c.solid("forClass"),e,t.preferencesFile),d=[];if(u.length){if(u.forEach(function(e){o=o||p.any(e,c.solid("personalDefaults"))}),o)return t.personalDefaults=o,void r(t);o=l.newThing(t.preferencesFile),s=u[0]}else s=l.newThing(t.preferencesFile),d=[i.st(s,c.rdf("type"),c.solid("TypeRegistration"),t.preferencesFile),i.st(s,c.solid("forClass"),e,t.preferencesFile)];o=l.newThing(t.preferencesFile),d.push(i.st(s,c.solid("personalDefaults"),o,t.preferencesFile)),p.updater.update([],d,function(i,a,s){a?(t.personalDefaults=o,r(t)):n(new Error("Setting preferences for "+e+": "+s))})}else a.log("Not doing private class preferences as no access to preferences file. "+t.preferencesFileError)},function(e){n(e)})})}function g(e){return e.datatype?e.datatype.equals(c.xsd("boolean"))?"1"===e.value:e.datatype.equals(c.xsd("dateTime"))||e.datatype.equals(c.xsd("date"))?new Date(e.value):e.datatype.equals(c.xsd("integer"))||e.datatype.equals(c.xsd("float"))||e.datatype.equals(c.xsd("decimal"))?Number(e.value):e.value:e}},7939:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),a=0;a<r.length;a++)"default"!==r[a]&&i(t,e,r[a]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.createSolidLogic=function(e,t){g.log("SolidLogic: Unique instance created. There should only be one of these.");var r=s.graph();s.fetcher(r,{fetch:e.fetch}),r.updater=new s.UpdateManager(r),r.features=[];var n=new u.SolidAuthnLogic(t),i=(0,c.createAclLogic)(r),o=(0,h.createContainerLogic)(r),a=(0,m.createUtilityLogic)(r,i,o),v=(0,p.createProfileLogic)(r,n,a),y=(0,l.createChatLogic)(r,v),b=(0,d.createInboxLogic)(r,v,a,o,i),w=(0,f.createTypeIndexLogic)(r,n,v,a);return g.log("SolidAuthnLogic initialized"),{store:r,authn:n,acl:i,inbox:b,chat:y,profile:v,typeIndex:w,load:function(e){return r.fetcher.load(e)},updatePromise:function(e,t){return void 0===t&&(t=[]),new Promise(function(n,i){r.updater.update(e,t,function(e,t,r){t?n():i(new Error(r))})})},clearStore:function(){r.statements.slice().forEach(r.remove.bind(r))}}};var s=a(r(2209)),c=r(1888),u=r(1085),l=r(9154),d=r(8476),p=r(9676),f=r(5648),h=r(7861),m=r(4932),g=a(r(8339))},7975:e=>{"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var c=n.lastIndexOf("/");if(c!==n.length-1){-1===c?(n="",i=0):i=(n=n.slice(0,c)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var n={resolve:function(){for(var e,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a;o>=0?a=arguments[o]:(void 0===e&&(e=process.cwd()),a=e),t(a),0!==a.length&&(n=a+"/"+n,i=47===a.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&i&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var o=e.length,a=o-i,s=1;s<r.length&&47===r.charCodeAt(s);++s);for(var c=r.length-s,u=a<c?a:c,l=-1,d=0;d<=u;++d){if(d===u){if(c>u){if(47===r.charCodeAt(s+d))return r.slice(s+d+1);if(0===d)return r.slice(s+d)}else a>u&&(47===e.charCodeAt(i+d)?l=d:0===d&&(l=0));break}var p=e.charCodeAt(i+d);if(p!==r.charCodeAt(s+d))break;47===p&&(l=d)}var f="";for(d=i+l+1;d<=o;++d)d!==o&&47!==e.charCodeAt(d)||(0===f.length?f+="..":f+="/..");return f.length>0?f+r.slice(s+l):(s+=l,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,i=-1,o=!0,a=e.length-1;a>=1;--a)if(47===(r=e.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,i=0,o=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var s=r.length-1,c=-1;for(n=e.length-1;n>=0;--n){var u=e.charCodeAt(n);if(47===u){if(!a){i=n+1;break}}else-1===c&&(a=!1,c=n+1),s>=0&&(u===r.charCodeAt(s)?-1===--s&&(o=n):(s=-1,o=c))}return i===o?o=c:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){i=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname:function(e){t(e);for(var r=-1,n=0,i=-1,o=!0,a=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(47!==c)-1===i&&(o=!1,i=s+1),46===c?-1===r?r=s:1!==a&&(a=1):-1!==r&&(a=-1);else if(!o){n=s+1;break}}return-1===r||-1===i||0===a||1===a&&r===i-1&&r===n+1?"":e.slice(r,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,i=e.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var a=-1,s=0,c=-1,u=!0,l=e.length-1,d=0;l>=n;--l)if(47!==(i=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===i?-1===a?a=l:1!==d&&(d=1):-1!==a&&(d=-1);else if(!u){s=l+1;break}return-1===a||-1===c||0===d||1===d&&a===c-1&&a===s+1?-1!==c&&(r.base=r.name=0===s&&o?e.slice(1,c):e.slice(s,c)):(0===s&&o?(r.name=e.slice(1,a),r.base=e.slice(1,c)):(r.name=e.slice(s,a),r.base=e.slice(s,c)),r.ext=e.slice(a,c)),s>0?r.dir=e.slice(0,s-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},7991:(e,t,r)=>{"use strict";r.d(t,{A:()=>n,R:()=>i});const n=crypto,i=e=>e instanceof CryptoKey},8057:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(7991);const i=n.A.getRandomValues.bind(n.A)},8097:(e,t,r)=>{"use strict";var n=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.label=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function r(e){return t?e.slice(0,1).toUpperCase()+e.slice(1):e}function n(e){var t="";"/"===e.slice(-1)&&(e=e.slice(0,-1));for(var n=0;n<e.length;n++)"_"!==e[n]&&"-"!==e[n]?(t+=e[n],n+1<e.length&&e[n].toUpperCase()!==e[n]&&e[n+1].toLowerCase()!==e[n+1]&&(t+=" ")):t+=" ";return"has "===t.slice(0,4)&&(t=t.slice(4)),r(t)}var i=function(e){return o.store.any(e,s.ns.ui("label"))||o.store.any(e,s.ns.link("message"))||o.store.any(e,s.ns.vcard("fn"))||o.store.any(e,s.ns.foaf("name"))||o.store.any(e,s.ns.dct("title"))||o.store.any(e,s.ns.dc("title"))||o.store.any(e,s.ns.rss("title"))||o.store.any(e,s.ns.contact("fullName"))||o.store.any(e,o.store.sym("http://www.w3.org/2001/04/roadmap/org#name"))||o.store.any(e,s.ns.cal("summary"))||o.store.any(e,s.ns.foaf("nick"))||o.store.any(e,s.ns.as("name"))||o.store.any(e,s.ns.schema("name"))||o.store.any(e,s.ns.rdfs("label"))||o.store.any(e,o.store.sym("http://www.w3.org/2004/02/skos/core#prefLabel"))}(e);if(i)return r(i.value);if("BlankNode"===e.termType)return"...";if("Collection"===e.termType)return"("+e.elements.length+")";var a=e.uri;if(void 0===a)return e.toString();try{a=a.split("/").map(decodeURIComponent).join("/")}catch(e){for(var u=a.length-3;u>0;u--)for(var l="0123456789abcefABCDEF";"%"===a[u]&&l.indexOf(a[u+1])>=0&&l.indexOf(a[u+2])>=0;)a=a.slice(0,u)+String.fromCharCode(parseInt(a.slice(u+1,u+3),16))+a.slice(u+3)}a=c(a,"/profile/card#me"),a=c(a,"#this");var d=(a=c(a,"#me")).indexOf("#");if(d>=0)return n(a.slice(d+1));var p=a.lastIndexOf("/",a.length-2);return p>=0&&p<e.uri.length?n(a.slice(p+1)):r(decodeURIComponent(e.uri))};var i=a(r(9295)),o=r(3451);function a(e,t){if("function"==typeof WeakMap)var r=new WeakMap,i=new WeakMap;return(a=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return s;if(o=t?i:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var s={log:i,ns:a(r(2054)),rdf:a(r(2209))};function c(e,t){var r=-1*t.length;return e.slice(r)===t?e.slice(0,r):e}},8134:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CordovaIFrameNavigator:()=>n.CordovaIFrameNavigator,CordovaPopupNavigator:()=>n.CordovaPopupNavigator,InMemoryWebStorage:()=>n.InMemoryWebStorage,Log:()=>n.Log,OidcClient:()=>n.OidcClient,SessionMonitor:()=>n.SessionMonitor,User:()=>n.User,UserManager:()=>n.UserManager,Version:()=>n.Version,WebStorageStateStore:()=>n.WebStorageStateStore,clearOidcPersistentStorage:()=>C,getTokens:()=>E,normalizeCallbackUrl:()=>k,refresh:()=>A,registerClient:()=>w});var n=r(6516),i=r(9380),o=r(3584),a=r(7248),s=r(7307),c=r(5130);const u={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let l;const d=new Uint8Array(16),p=[];for(let e=0;e<256;++e)p.push((e+256).toString(16).slice(1));const f=function(e,t,r){if(u.randomUUID&&!t&&!e)return u.randomUUID();const n=(e=e||{}).random??e.rng?.()??function(){if(!l){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");l=crypto.getRandomValues.bind(crypto)}return l(d)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((r=r||0)<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(p[e[t+0]]+p[e[t+1]]+p[e[t+2]]+p[e[t+3]]+"-"+p[e[t+4]]+p[e[t+5]]+"-"+p[e[t+6]]+p[e[t+7]]+"-"+p[e[t+8]]+p[e[t+9]]+"-"+p[e[t+10]]+p[e[t+11]]+p[e[t+12]]+p[e[t+13]]+p[e[t+14]]+p[e[t+15]]).toLowerCase()}(n)},h=["ES256","RS256"];async function m(e,t,r,n){let a,s;try{const{payload:s}=await(0,i.V)(e,(0,o.RD)(new URL(t)),{issuer:r,audience:n});a=s}catch(e){throw new Error(`Token verification failed: ${e.stack}`)}if("string"==typeof a.azp&&(s=a.azp),"string"==typeof a.webid)return{webId:a.webid,clientId:s};if("string"!=typeof a.sub)throw new Error(`The token ${JSON.stringify(a)} is invalid: it has no 'webid' claim and no 'sub' claim.`);try{return new URL(a.sub),{webId:a.sub,clientId:s}}catch(e){throw new Error(`The token has no 'webid' claim, and its 'sub' claim of [${a.sub}] is invalid as a URL - error [${e}].`)}}Error,Error;class g extends Error{missingFields;constructor(e){super(`Invalid response from OIDC provider: missing fields ${e}`),this.missingFields=e}}class v extends Error{error;errorDescription;constructor(e,t,r){super(e),this.error=t,this.errorDescription=r}}function y(e){const t=new URL(e);return new URL(t.pathname,t.origin).toString()}async function b(e,t,r){return new a.P({htu:y(e),htm:t.toUpperCase(),jti:f()}).setProtectedHeader({alg:h[0],jwk:r.publicKey,typ:"dpop+jwt"}).setIssuedAt().sign(r.privateKey,{})}async function w(e,t){if(!t.registrationEndpoint)throw new Error("Dynamic Registration could not be completed because the issuer has no registration endpoint.");if(!Array.isArray(t.idTokenSigningAlgValuesSupported))throw new Error("The OIDC issuer discovery profile is missing the 'id_token_signing_alg_values_supported' value, which is mandatory.");const r=(n=t.idTokenSigningAlgValuesSupported,h.find(e=>n.includes(e))??null);var n;const i={client_name:e.clientName,application_type:"web",redirect_uris:[e.redirectUrl?.toString()],subject_type:"public",token_endpoint_auth_method:"client_secret_basic",id_token_signed_response_alg:r,grant_types:["authorization_code","refresh_token"]},o=await fetch(t.registrationEndpoint.toString(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(o.ok){const t=await o.json();return function(e,t){if("string"!=typeof e.client_id)throw new Error(`Dynamic client registration failed: no client_id has been found on ${JSON.stringify(e)}`);if(t.redirectUrl&&(r=e,Array.isArray(r.redirect_uris)&&r.redirect_uris.every(e=>"string"==typeof e))&&e.redirect_uris[0]!==t.redirectUrl.toString())throw new Error(`Dynamic client registration failed: the returned redirect URIs ${JSON.stringify(e.redirect_uris)} don't match the provided ${JSON.stringify([t.redirectUrl.toString()])}`);var r}(t,e),{clientId:t.client_id,clientSecret:t.client_secret,expiresAt:t.client_secret_expires_at,idTokenSignedResponseAlg:t.id_token_signed_response_alg,clientType:"dynamic"}}throw 400===o.status&&function(e,t){if("invalid_redirect_uri"===e.error)throw new Error(`Dynamic client registration failed: the provided redirect uri [${t.redirectUrl?.toString()}] is invalid - ${e.error_description??""}`);if("invalid_client_metadata"===e.error)throw new Error(`Dynamic client registration failed: the provided client metadata ${JSON.stringify(t)} is invalid - ${e.error_description??""}`);throw new Error(`Dynamic client registration failed: ${e.error} - ${e.error_description??""}`)}(await o.json(),e),new Error(`Dynamic client registration failed: the server returned ${o.status} ${o.statusText} - ${await o.text()}`)}function x(e){return void 0!==e.error_description&&"string"==typeof e.error_description}function _(e,t){if(void 0!==(r=e).error&&"string"==typeof r.error)throw new v(`Token endpoint returned error [${e.error}]${x(e)?`: ${e.error_description}`:""}${function(e){return void 0!==e.error_uri&&"string"==typeof e.error_uri}(e)?` (see ${e.error_uri})`:""}`,e.error,x(e)?e.error_description:void 0);var r;if(!function(e){return void 0!==e.access_token&&"string"==typeof e.access_token}(e))throw new g(["access_token"]);if(!function(e){return void 0!==e.id_token&&"string"==typeof e.id_token}(e))throw new g(["id_token"]);if(!function(e){return void 0!==e.token_type&&"string"==typeof e.token_type}(e))throw new g(["token_type"]);if(!function(e){return void 0===e.expires_in||"number"==typeof e.expires_in}(e))throw new g(["expires_in"]);if(!t&&"bearer"!==e.token_type.toLowerCase())throw new Error(`Invalid token endpoint response: requested a [Bearer] token, but got a 'token_type' value of [${e.token_type}].`);return e}async function E(e,t,r,n){!function(e,t){if(t.grantType&&(!e.grantTypesSupported||!e.grantTypesSupported.includes(t.grantType)))throw new Error(`The issuer [${e.issuer}] does not support the [${t.grantType}] grant`);if(!e.tokenEndpoint)throw new Error(`This issuer [${e.issuer}] does not have a token endpoint`)}(e,r);const i={"content-type":"application/x-www-form-urlencoded"};let o;n&&(o=await async function(){const{privateKey:e,publicKey:t}=await(0,s.T)(h[0]),r={privateKey:e,publicKey:await(0,c.JU)(t)};return[r.publicKey.alg]=h,r}(),i.DPoP=await b(e.tokenEndpoint,"POST",o)),t.clientSecret&&(i.Authorization=`Basic ${btoa(`${t.clientId}:${t.clientSecret}`)}`);const a={grant_type:r.grantType,redirect_uri:r.redirectUrl,code:r.code,code_verifier:r.codeVerifier,client_id:t.clientId},u={method:"POST",headers:i,body:new URLSearchParams(a).toString()},l=await fetch(e.tokenEndpoint,u),d=_(await l.json(),n),{webId:p,clientId:f}=await m(d.id_token,e.jwksUri,e.issuer,t.clientId);return{accessToken:d.access_token,idToken:d.id_token,refreshToken:(g=d,void 0!==g.refresh_token&&"string"==typeof g.refresh_token?d.refresh_token:void 0),webId:p,clientId:f,dpopKey:o,expiresIn:d.expires_in};var g}const S=e=>{try{return new URL(e),!0}catch{return!1}};async function A(e,t,r,n){if(void 0===r.clientId)throw new Error("No client ID available when trying to refresh the access token.");const i={grant_type:"refresh_token",refresh_token:e};let o={};void 0!==n&&(o={DPoP:await b(t.tokenEndpoint,"POST",n)});let a={};void 0!==r.clientSecret?a={Authorization:`Basic ${btoa(`${r.clientId}:${r.clientSecret}`)}`}:S(r.clientId)&&(i.client_id=r.clientId);const s=await fetch(t.tokenEndpoint,{method:"POST",body:new URLSearchParams(i).toString(),headers:{...o,...a,"Content-Type":"application/x-www-form-urlencoded"}});let c;try{c=await s.json()}catch(e){throw new Error(`The token endpoint of issuer ${t.issuer} returned a malformed response.`)}const u=_(c,void 0!==n),{webId:l}=await m(u.id_token,t.jwksUri,t.issuer,r.clientId);return{accessToken:u.access_token,idToken:u.id_token,refreshToken:"string"==typeof u.refresh_token?u.refresh_token:void 0,webId:l,dpopKey:n,expiresIn:u.expires_in}}function k(e){const t=function(e){const t=new URL(e);return t.searchParams.delete("state"),t.searchParams.delete("code"),t.searchParams.delete("error"),t.searchParams.delete("error_description"),t.searchParams.delete("iss"),t}(e);return t.hash="",e.includes(`${t.origin}/`)?t.href:`${t.origin}${t.href.substring(t.origin.length+1)}`}async function C(){const e=new n.OidcClient({response_mode:"query"});await e.clearStaleState(new n.WebStorageStateStore({}));const t=window.localStorage,r=[];for(let e=0;e<=t.length;e+=1){const n=t.key(e);n&&(n.match(/^oidc\..+$/)||n.match(/^solidClientAuthenticationUser:.+$/))&&r.push(n)}r.forEach(e=>t.removeItem(e))}},8278:(e,t,r)=>{"use strict";r.d(t,{Lf:()=>l,Mh:()=>u,Og:()=>d,jU:()=>c});var n=r(1436),i=r(5141),o=r(1542),a=r(7493),s=r(149);async function c(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PUBLIC KEY-----"))throw new TypeError('"spki" must be SPKI formatted string');return(0,i.sc)(e,t,r)}async function u(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN CERTIFICATE-----"))throw new TypeError('"x509" must be X.509 formatted string');return(0,i.zp)(e,t,r)}async function l(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return(0,i.IG)(e,t,r)}async function d(e,t){if(!(0,s.A)(e))throw new TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return(0,n.D4)(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new a.JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return(0,o.A)({...e,alg:t});default:throw new a.JOSENotSupported('Unsupported "kty" (Key Type) Parameter value')}}},8286:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3779),i=r(2291),o=r(6011);t.default=function(e,t,r){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();const a=(e=e||{}).random??e.rng?.()??(0,i.default)();if(a.length<16)throw new Error("Random bytes length must be >= 16");if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){if((r=r||0)<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=a[e];return t}return(0,o.unsafeStringify)(a)}},8287:(e,t,r)=>{"use strict";const n=r(7526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,t.IS=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(G(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer))return f(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return f(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|h(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?s(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return l(e),s(e<0?0:0|h(e))}function p(e){const t=e.length<0?0:0|h(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function h(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(i)return n?-1:J(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let 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 F(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const 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),X(r=+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=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let o,a=1,s=e.length,c=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,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(u(e,o)===u(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+c>s&&(r=s-c),o=r;o>=0;o--){let r=!0;for(let n=0;n<c;n++)if(u(e,o+n)!==u(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(X(n))return a;e[r+a]=n}return a}function x(e,t,r,n){return $(J(t,e.length-r),e,r,n)}function _(e,t,r,n){return $(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return $(z(t),e,r,n)}function S(e,t,r,n){return $(function(e,t){let r,n,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function A(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);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,c;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(o=c));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=C));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},c.allocUnsafe=function(e){return d(e)},c.allocUnsafeSlow=function(e){return d(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(G(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let 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},c.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}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(G(t,Uint8Array))i+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(G(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);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;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),u=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<s;++e)if(u[e]!==l[e]){o=u[e],a=l[e];break}return o<a?-1:a<o?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},c.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)}const 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");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return E(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}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function T(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function I(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function F(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=Y[e[n]];return i}function P(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function N(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 O(e,t,r,n,i,o){if(!c.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 R(e,t,r,n,i){q(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function j(e,t,r,n,i){q(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function L(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 t=+t,r>>>=0,o||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,o){return t=+t,r>>>=0,o||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Q(function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))}),c.prototype.readBigUInt64BE=Q(function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Q(function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),c.prototype.readBigInt64BE=Q(function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||N(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||O(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||O(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Q(function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Q(function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Q(function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Q(function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");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("Index out of range");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);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},c.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),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=c.isBuffer(e)?e:c.from(e,n),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};const M={};function B(e,t,r){M[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function H(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function q(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new M.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||V(t,e.length-(r+1))}(n,i,o)}function W(e,t){if("number"!=typeof e)throw new M.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,r){if(Math.floor(e)!==e)throw W(e,r),new M.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new M.ERR_BUFFER_OUT_OF_BOUNDS;throw new M.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}B("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),B("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),B("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=H(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=H(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);const K=/[^+/0-9A-Za-z-_]/g;function J(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>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 z(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function $(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function G(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Q(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},8322:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aclControl=t.acl=void 0;var n=r(9922),i=r(4122);t.acl={adoptACLDefault:n.adoptACLDefault,readACL:n.readACL,sameACL:n.sameACL,ACLunion:n.ACLunion,loadUnionACL:n.loadUnionACL,ACLbyCombination:n.ACLbyCombination,makeACLGraph:n.makeACLGraph,makeACLGraphbyCombo:n.makeACLGraphbyCombo,ACLToString:n.ACLToString,comboToString:n.comboToString,makeACLString:n.makeACLString,putACLObject:n.putACLObject,putACLbyCombo:n.putACLbyCombo,fixIndividualCardACL:n.fixIndividualCardACL,fixIndividualACL:n.fixIndividualACL,setACL:n.setACL,getACLorDefault:n.getACLorDefault,getACL:n.getACL},t.aclControl={preventBrowserDropEvents:i.preventBrowserDropEvents,shortNameForFolder:i.shortNameForFolder,ACLControlBox5:i.ACLControlBox5}},8339:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.log.apply(console,e)},t.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.warn.apply(console,e)},t.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error.apply(console,e)},t.trace=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.trace.apply(console,e)}},8406:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.media=void 0;var n=r(1297);t.media={cameraCaptureControl:n.cameraCaptureControl,cameraButton:n.cameraButton}},8452:(e,t,r)=>{var n=r(3738).default,i=r(2475);e.exports=function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},8476:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.createInboxLogic=function(e,t,r,a,s){return{createInboxFor:function(e,o){return n(this,void 0,void 0,function(){var n,s,c;return i(this,function(i){switch(i.label){case 0:return[4,t.loadMe()];case 1:return n=i.sent(),[4,t.getPodRoot(n)];case 2:return s=i.sent(),c="".concat(s.value,"p2p-inboxes/").concat(encodeURIComponent(o),"/"),[4,a.createContainer(c)];case 3:return i.sent(),[4,r.setSinglePeerAccess({ownerWebId:n.value,peerWebId:e,accessToModes:"acl:Append",target:c})];case 4:return i.sent(),[2,c]}})})},getNewMessages:function(e){return n(this,void 0,void 0,function(){var r;return i(this,function(n){switch(n.label){case 0:return e?[3,2]:[4,t.loadMe()];case 1:e=n.sent(),n.label=2;case 2:return[4,t.getMainInbox(e)];case 3:return r=n.sent(),[4,a.getContainerMembers(r)];case 4:return[2,n.sent().filter(function(e){return!a.isContainer(e)})]}})})},markAsRead:function(t,r){return n(this,void 0,void 0,function(){var n,a,s,c;return i(this,function(i){switch(i.label){case 0:return[4,e.fetcher._fetch(t)];case 1:if(200!==(n=i.sent()).status)throw new Error("Not OK! ".concat(t));return a=(0,o.getArchiveUrl)(t,r),c={method:"PUT"},[4,n.text()];case 2:return c.body=i.sent(),c.headers=[["Content-Type",n.headers.get("Content-Type")||"application/octet-stream"]],s=c,[4,e.fetcher._fetch(a,s)];case 3:return"2"!==i.sent().status.toString()[0]?[3,5]:[4,e.fetcher._fetch(t,{method:"DELETE"})];case 4:i.sent(),i.label=5;case 5:return[2]}})})}}};var o=r(9013)},8510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.secp256k1_hasher=t.schnorr=t.secp256k1=void 0;const n=r(7076),i=r(9175),o=r(3562),a=r(1761),s=r(4967),c=r(1705),u=r(8627),l={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},d={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},p=BigInt(0),f=BigInt(1),h=BigInt(2),m=(0,s.Field)(l.p,{sqrt:function(e){const t=l.p,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),a=BigInt(23),c=BigInt(44),u=BigInt(88),d=e*e*e%t,p=d*d*e%t,f=(0,s.pow2)(p,r,t)*p%t,g=(0,s.pow2)(f,r,t)*p%t,v=(0,s.pow2)(g,h,t)*d%t,y=(0,s.pow2)(v,i,t)*v%t,b=(0,s.pow2)(y,o,t)*y%t,w=(0,s.pow2)(b,c,t)*b%t,x=(0,s.pow2)(w,u,t)*w%t,_=(0,s.pow2)(x,c,t)*b%t,E=(0,s.pow2)(_,r,t)*p%t,S=(0,s.pow2)(E,a,t)*y%t,A=(0,s.pow2)(S,n,t)*d%t,k=(0,s.pow2)(A,h,t);if(!m.eql(m.sqr(k),e))throw new Error("Cannot find square root");return k}});t.secp256k1=(0,o.createCurve)({...l,Fp:m,lowS:!0,endo:d},n.sha256);const g={};function v(e,...t){let r=g[e];if(void 0===r){const t=(0,n.sha256)((0,u.utf8ToBytes)(e));r=(0,u.concatBytes)(t,t),g[e]=r}return(0,n.sha256)((0,u.concatBytes)(r,...t))}const y=e=>e.toBytes(!0).slice(1),b=(()=>t.secp256k1.Point)(),w=e=>e%h===p;function x(e){const{Fn:t,BASE:r}=b,n=(0,c._normFnElement)(t,e),i=r.multiply(n);return{scalar:w(i.y)?n:t.neg(n),bytes:y(i)}}function _(e){const t=m;if(!t.isValidNot0(e))throw new Error("invalid x: Fail if x ≥ p");const r=t.create(e*e),n=t.create(r*e+BigInt(7));let i=t.sqrt(n);w(i)||(i=t.neg(i));const o=b.fromAffine({x:e,y:i});return o.assertValidity(),o}const E=u.bytesToNumberBE;function S(...e){return b.Fn.create(E(v("BIP0340/challenge",...e)))}function A(e){return x(e).bytes}function k(e,t,r=(0,i.randomBytes)(32)){const{Fn:n}=b,o=(0,u.ensureBytes)("message",e),{bytes:a,scalar:s}=x(t),c=(0,u.ensureBytes)("auxRand",r,32),l=n.toBytes(s^E(v("BIP0340/aux",c))),d=v("BIP0340/nonce",l,a,o),{bytes:p,scalar:f}=x(d),h=S(p,a,o),m=new Uint8Array(64);if(m.set(p,0),m.set(n.toBytes(n.create(f+h*s)),32),!C(m,o,a))throw new Error("sign: Invalid signature produced");return m}function C(e,t,r){const{Fn:n,BASE:i}=b,o=(0,u.ensureBytes)("signature",e,64),a=(0,u.ensureBytes)("message",t),s=(0,u.ensureBytes)("publicKey",r,32);try{const e=_(E(s)),t=E(o.subarray(0,32));if(!(0,u.inRange)(t,f,l.p))return!1;const r=E(o.subarray(32,64));if(!(0,u.inRange)(r,f,l.n))return!1;const c=S(n.toBytes(t),y(e),a),d=i.multiplyUnsafe(r).add(e.multiplyUnsafe(n.neg(c))),{x:p,y:h}=d.toAffine();return!(d.is0()||!w(h)||p!==t)}catch(e){return!1}}t.schnorr=(()=>{const e=(e=(0,i.randomBytes)(48))=>(0,s.mapHashToField)(e,l.n);return t.secp256k1.utils.randomSecretKey,{keygen:function(t){const r=e(t);return{secretKey:r,publicKey:A(r)}},getPublicKey:A,sign:k,verify:C,Point:b,utils:{randomSecretKey:e,randomPrivateKey:e,taggedHash:v,lift_x:_,pointToBytes:y,numberToBytesBE:u.numberToBytesBE,bytesToNumberBE:u.bytesToNumberBE,mod:s.mod},lengths:{secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48}}})();const T=(()=>(0,a.isogenyMap)(m,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(e=>BigInt(e)))))(),I=(()=>(0,c.mapToCurveSimpleSWU)(m,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:m.create(BigInt("-11"))}))();t.secp256k1_hasher=(0,a.createHasher)(t.secp256k1.Point,e=>{const{x:t,y:r}=I(m.create(e[0]));return T(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:m.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}),t.hashToCurve=t.secp256k1_hasher.hashToCurve,t.encodeToCurve=t.secp256k1_hasher.encodeToCurve},8616:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(4705),i=r(1059),o=r(5108),a=r(8936),s=r(9403),c=r(2915);const u={boolean:new o.A("http://www.w3.org/2001/XMLSchema#boolean"),dateTime:new o.A("http://www.w3.org/2001/XMLSchema#dateTime"),decimal:new o.A("http://www.w3.org/2001/XMLSchema#decimal"),double:new o.A("http://www.w3.org/2001/XMLSchema#double"),integer:new o.A("http://www.w3.org/2001/XMLSchema#integer"),langString:new o.A("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),string:new o.A("http://www.w3.org/2001/XMLSchema#string")};class l extends a.A{constructor(e,t,r){super(e),(0,n.A)(this,"termType",s.QW),(0,n.A)(this,"classOrder",i.A.Literal),(0,n.A)(this,"datatype",u.string),(0,n.A)(this,"isVar",0),(0,n.A)(this,"language",""),t?(this.language=t,this.datatype=u.langString):this.datatype=r?o.A.fromValue(r):u.string}copy(){return new l(this.value,this.lang,this.datatype)}equals(e){return!!e&&this.termType===e.termType&&this.value===e.value&&this.language===e.language&&(!this.datatype&&!e.datatype||this.datatype&&this.datatype.equals(e.datatype))}get lang(){return this.language}set lang(e){this.language=e||""}toNT(){return l.toNT(this)}static toNT(e){if("number"==typeof e.value)return""+e.value;if("string"!=typeof e.value)throw new Error("Value of RDF literal is not string or number: "+e.value);var t=e.value;return t='"'+(t=(t=(t=(t=t.replace(/\\/g,"\\\\")).replace(/\"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r"))+'"',e.language?t+="@"+e.language:e.datatype.equals(u.string)||(t+="^^"+e.datatype.toCanonical()),t}toString(){return""+this.value}static fromBoolean(e){return new l(e?"1":"0",null,u.boolean)}static fromDate(e){if(!(e instanceof Date))throw new TypeError("Invalid argument to Literal.fromDate()");let t=function(e){return(""+(100+e)).slice(1,3)},r=e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"Z";return new l(r,null,u.dateTime)}static fromNumber(e){if("number"!=typeof e)throw new TypeError("Invalid argument to Literal.fromNumber()");let t;const r=e.toString();return t=r.indexOf("e")<0&&Math.abs(e)<=Number.MAX_SAFE_INTEGER?Number.isInteger(e)?u.integer:u.decimal:u.double,new l(r,null,t)}static fromValue(e){if((0,c.c$)(e))return e;switch(typeof e){case"object":if(e instanceof Date)return l.fromDate(e);case"boolean":return l.fromBoolean(e);case"number":return l.fromNumber(e);case"string":return new l(e)}throw new Error("Can't make literal from "+e+" of type "+typeof e)}}},8627:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notImplemented=t.bitMask=t.utf8ToBytes=t.randomBytes=t.isBytes=t.hexToBytes=t.concatBytes=t.bytesToUtf8=t.bytesToHex=t.anumber=t.abytes=void 0,t.abool=function(e,t){if("boolean"!=typeof t)throw new Error(e+" boolean expected, got "+t)},t._abool2=function(e,t=""){if("boolean"!=typeof e)throw new Error((t&&`"${t}"`)+"expected boolean, got type="+typeof e);return e},t._abytes2=function(e,t,r=""){const i=(0,n.isBytes)(e),o=e?.length,a=void 0!==t;if(!i||a&&o!==t)throw new Error((r&&`"${r}" `)+"expected Uint8Array"+(a?` of length ${t}`:"")+", got "+(i?`length=${o}`:"type="+typeof e));return e},t.numberToHexUnpadded=s,t.hexToNumber=c,t.bytesToNumberBE=function(e){return c((0,n.bytesToHex)(e))},t.bytesToNumberLE=function(e){return(0,n.abytes)(e),c((0,n.bytesToHex)(Uint8Array.from(e).reverse()))},t.numberToBytesBE=u,t.numberToBytesLE=function(e,t){return u(e,t).reverse()},t.numberToVarBytesBE=function(e){return(0,n.hexToBytes)(s(e))},t.ensureBytes=function(e,t,r){let i;if("string"==typeof t)try{i=(0,n.hexToBytes)(t)}catch(t){throw new Error(e+" must be hex string or Uint8Array, cause: "+t)}else{if(!(0,n.isBytes)(t))throw new Error(e+" must be hex string or Uint8Array");i=Uint8Array.from(t)}const o=i.length;if("number"==typeof r&&o!==r)throw new Error(e+" of length "+r+" expected, got "+o);return i},t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r},t.copyBytes=function(e){return Uint8Array.from(e)},t.asciiToBytes=function(e){return Uint8Array.from(e,(t,r)=>{const n=t.charCodeAt(0);if(1!==t.length||n>127)throw new Error(`string contains non-ASCII character "${e[r]}" with code ${n} at position ${r}`);return n})},t.inRange=d,t.aInRange=function(e,t,r,n){if(!d(t,r,n))throw new Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)},t.bitLen=function(e){let t;for(t=0;e>o;e>>=a,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&a},t.bitSet=function(e,t,r){return e|(r?a:o)<<BigInt(t)},t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");const i=e=>new Uint8Array(e),o=e=>Uint8Array.of(e);let a=i(e),s=i(e),c=0;const u=()=>{a.fill(1),s.fill(0),c=0},l=(...e)=>r(s,a,...e),d=(e=i(0))=>{s=l(o(0),e),a=l(),0!==e.length&&(s=l(o(1),e),a=l())},p=()=>{if(c++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){a=l();const t=a.slice();r.push(t),e+=a.length}return(0,n.concatBytes)(...r)};return(e,t)=>{let r;for(u(),d(e);!(r=t(p()));)d();return u(),r}},t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const i=p[r];if("function"!=typeof i)throw new Error("invalid validator function");const o=e[t];if(!(n&&void 0===o||i(o,e)))throw new Error("param "+String(t)+" is invalid. Expected "+r+", got "+o)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e},t.isHash=function(e){return"function"==typeof e&&Number.isSafeInteger(e.outputLen)},t._validateObject=function(e,t,r={}){if(!e||"object"!=typeof e)throw new Error("expected valid options object");function n(t,r,n){const i=e[t];if(n&&void 0===i)return;const o=typeof i;if(o!==r||null===i)throw new Error(`param "${t}" is invalid: expected ${r}, got ${o}`)}Object.entries(t).forEach(([e,t])=>n(e,t,!1)),Object.entries(r).forEach(([e,t])=>n(e,t,!0))},t.memoized=function(e){const t=new WeakMap;return(r,...n)=>{const i=t.get(r);if(void 0!==i)return i;const o=e(r,...n);return t.set(r,o),o}};const n=r(9175);var i=r(9175);Object.defineProperty(t,"abytes",{enumerable:!0,get:function(){return i.abytes}}),Object.defineProperty(t,"anumber",{enumerable:!0,get:function(){return i.anumber}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return i.bytesToHex}}),Object.defineProperty(t,"bytesToUtf8",{enumerable:!0,get:function(){return i.bytesToUtf8}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return i.concatBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return i.hexToBytes}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return i.isBytes}}),Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return i.randomBytes}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return i.utf8ToBytes}});const o=BigInt(0),a=BigInt(1);function s(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function c(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?o:BigInt("0x"+e)}function u(e,t){return(0,n.hexToBytes)(e.toString(16).padStart(2*t,"0"))}const l=e=>"bigint"==typeof e&&o<=e;function d(e,t,r){return l(e)&&l(t)&&l(r)&&t<=e&&e<r}t.bitMask=e=>(a<<BigInt(e))-a;const p={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||(0,n.isBytes)(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.notImplemented=()=>{throw new Error("not implemented")}},8793:(e,t,r)=>{"use strict";r.d(t,{K:()=>a,T:()=>c});var n=r(7991),i=r(7493),o=r(8057);async function a(e,t){let r,a,s;switch(e){case"HS256":case"HS384":case"HS512":r=parseInt(e.slice(-3),10),a={name:"HMAC",hash:`SHA-${r}`,length:r},s=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r=parseInt(e.slice(-3),10),(0,o.A)(new Uint8Array(r>>3));case"A128KW":case"A192KW":case"A256KW":r=parseInt(e.slice(1,4),10),a={name:"AES-KW",length:r},s=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":r=parseInt(e.slice(1,4),10),a={name:"AES-GCM",length:r},s=["encrypt","decrypt"];break;default:throw new i.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return n.A.subtle.generateKey(a,t?.extractable??!1,s)}function s(e){const t=e?.modulusLength??2048;if("number"!=typeof t||t<2048)throw new i.JOSENotSupported("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return t}async function c(e,t){let r,o;switch(e){case"PS256":case"PS384":case"PS512":r={name:"RSA-PSS",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:s(t)},o=["sign","verify"];break;case"RS256":case"RS384":case"RS512":r={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:s(t)},o=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":r={name:"RSA-OAEP",hash:`SHA-${parseInt(e.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:s(t)},o=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":r={name:"ECDSA",namedCurve:"P-256"},o=["sign","verify"];break;case"ES384":r={name:"ECDSA",namedCurve:"P-384"},o=["sign","verify"];break;case"ES512":r={name:"ECDSA",namedCurve:"P-521"},o=["sign","verify"];break;case"Ed25519":r={name:"Ed25519"},o=["sign","verify"];break;case"EdDSA":{o=["sign","verify"];const e=t?.crv??"Ed25519";switch(e){case"Ed25519":case"Ed448":r={name:e};break;default:throw new i.JOSENotSupported("Invalid or unsupported crv option provided")}break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{o=["deriveKey","deriveBits"];const e=t?.crv??"P-256";switch(e){case"P-256":case"P-384":case"P-521":r={name:"ECDH",namedCurve:e};break;case"X25519":case"X448":r={name:e};break;default:throw new i.JOSENotSupported("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new i.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return n.A.subtle.generateKey(r,t?.extractable??!1,o)}},8858:(e,t,r)=>{"use strict";r.d(t,{A:()=>u,I:()=>l});var n=r(1575),i=r(5994),o=r(5500);const a=e=>e?.[Symbol.toStringTag],s=(e,t,r)=>{if(void 0!==t.use&&"sig"!==t.use)throw new TypeError("Invalid key for this operation, when present its use must be sig");if(void 0!==t.key_ops&&!0!==t.key_ops.includes?.(r))throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${r}`);if(void 0!==t.alg&&t.alg!==e)throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);return!0};function c(e,t,r,c){t.startsWith("HS")||"dir"===t||t.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(t)?((e,t,r,c)=>{if(!(t instanceof Uint8Array)){if(c&&o.ll(t)){if(o.t9(t)&&s(e,t,r))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!(0,i.A)(t))throw new TypeError((0,n.t)(e,t,...i.g,"Uint8Array",c?"JSON Web Key":null));if("secret"!==t.type)throw new TypeError(`${a(t)} instances for symmetric algorithms must be of type "secret"`)}})(t,r,c,e):((e,t,r,c)=>{if(c&&o.ll(t))switch(r){case"sign":if(o.W2(t)&&s(e,t,r))return;throw new TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(o.M3(t)&&s(e,t,r))return;throw new TypeError("JSON Web Key for this operation be a public JWK")}if(!(0,i.A)(t))throw new TypeError((0,n.t)(e,t,...i.g,c?"JSON Web Key":null));if("secret"===t.type)throw new TypeError(`${a(t)} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw new TypeError(`${a(t)} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw new TypeError(`${a(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw new TypeError(`${a(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw new TypeError(`${a(t)} instances for asymmetric algorithm encryption must be of type "public"`)})(t,r,c,e)}const u=c.bind(void 0,!1),l=c.bind(void 0,!0)},8921:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(4705),i=r(1059),o=r(8936),a=r(9403);class s extends o.A{static getId(e){if(e){if("string"!=typeof e)throw new Error("Bad id argument to new blank node: "+e);if(e.includes("#")){let t=e.split("#");return t[t.length-1]}return e}return"n"+s.nextId++}constructor(e){super(s.getId(e)),(0,n.A)(this,"termType",a.$Q),(0,n.A)(this,"classOrder",i.A.BlankNode),(0,n.A)(this,"isBlank",1),(0,n.A)(this,"isVar",1)}get id(){return this.value}set id(e){this.value=e}compareTerm(e){return this.classOrder<e.classOrder?-1:this.classOrder>e.classOrder?1:this.id<e.id?-1:this.id>e.id?1:0}copy(e){var t=new s;return e.copyTo(this,t),t}toCanonical(){return s.NTAnonymousNodePrefix+this.value}toString(){return s.NTAnonymousNodePrefix+this.id}}(0,n.A)(s,"nextId",0),(0,n.A)(s,"NTAnonymousNodePrefix","_:")},8936:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(4705);class i{constructor(e){(0,n.A)(this,"termType",void 0),(0,n.A)(this,"classOrder",void 0),(0,n.A)(this,"value",void 0),this.value=e}substitute(e){return this}compareTerm(e){return this.classOrder<e.classOrder?-1:this.classOrder>e.classOrder?1:this.value<e.value?-1:this.value>e.value?1:0}equals(e){return!!e&&this.termType===e.termType&&this.value===e.value}hashString(){return this.toCanonical()}sameTerm(e){return this.equals(e)}toCanonical(){return this.toNT()}toNT(){return this.toString()}toNQ(){return this.toNT()}toString(){throw new Error("Node.toString() is abstract - see the subclasses instead")}}(0,n.A)(i,"fromValue",void 0),(0,n.A)(i,"toJS",void 0)},8978:(e,t,r)=>{var n=r(4722);n.DOMImplementation,n.XMLSerializer,t.DOMParser=r(5752).DOMParser},8998:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.IconicMultiSelect=void 0;var o=n(r(1132)),a=n(r(7383)),s=n(r(4579)),c=n(r(3693)),u=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var r,n,o={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return o;if(r=t){if(r.has(e))return r.get(e);r.set(e,o)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(n.get||n.set)?r(o,a,n):o[a]=e[a]);return o}(e)}(r(9654));t.IconicMultiSelect=function(){return(0,s.default)(function e(t){var r=t.data,n=t.itemTemplate,i=t.noData,o=t.noResults,s=t.placeholder,u=t.select,l=t.container,d=t.tagTemplate,p=t.textField,f=t.valueField;(0,a.default)(this,e),(0,c.default)(this,"_data",void 0),(0,c.default)(this,"_domElements",void 0),(0,c.default)(this,"_event",function(){}),(0,c.default)(this,"_itemTemplate",void 0),(0,c.default)(this,"_multiselect",void 0),(0,c.default)(this,"_noData",void 0),(0,c.default)(this,"_noResults",void 0),(0,c.default)(this,"_options",[]),(0,c.default)(this,"_placeholder",void 0),(0,c.default)(this,"_select",void 0),(0,c.default)(this,"_selectContainer",void 0),(0,c.default)(this,"_selectedOptions",[]),(0,c.default)(this,"_tagTemplate",void 0),(0,c.default)(this,"_textField",void 0),(0,c.default)(this,"_valueField",void 0),(0,c.default)(this,"_cross",'\n <svg\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M6.2253 4.81108C5.83477 4.42056 5.20161 4.42056 4.81108 4.81108C4.42056 5.20161 4.42056 5.83477 4.81108 6.2253L10.5858 12L4.81114 17.7747C4.42062 18.1652 4.42062 18.7984 4.81114 19.1889C5.20167 19.5794 5.83483 19.5794 6.22535 19.1889L12 13.4142L17.7747 19.1889C18.1652 19.5794 18.7984 19.5794 19.1889 19.1889C19.5794 18.7984 19.5794 18.1652 19.1889 17.7747L13.4142 12L19.189 6.2253C19.5795 5.83477 19.5795 5.20161 19.189 4.81108C18.7985 4.42056 18.1653 4.42056 17.7748 4.81108L12 10.5858L6.2253 4.81108Z"\n fill="currentColor"\n />\n </svg>\n '),this._data=null!=r?r:[],this._itemTemplate=null!=n?n:null,this._noData=null!=i?i:"No data found.",this._noResults=null!=o?o:"No results found.",this._placeholder=null!=s?s:"Select...",this._select=u,this._selectContainer=l,this._tagTemplate=null!=d?d:null,this._textField=null!=p?p:null,this._valueField=null!=f?f:null},[{key:"init",value:function(){if(!this._select||"SELECT"!==this._select.nodeName)throw new Error("The selector '".concat(this._select,"' did not select any valid select tag."));if(this._itemTemplate&&0===this._data.length)throw new Error("itemTemplate must be initialized with data from the component settings");if(this._tagTemplate&&0===this._data.length)throw new Error("tagTemplate must be initialized with data from the component settings");this._options=this._data.length>0?this._getDataFromSettings():this._getDataFromSelectTag(),this._renderMultiselect(),this._renderOptionsList(),this._domElements={clear:this._multiselect.querySelector(".multiselect__clear-btn"),input:this._multiselect.querySelector(".multiselect__input"),optionsContainer:this._multiselect.querySelector(".multiselect__options"),optionsContainerList:this._multiselect.querySelector(".multiselect__options > ul"),options:{list:this._multiselect.querySelectorAll(".multiselect__options > ul > li"),find:function(e){for(var t=0;t<this.list.length;t++){var r=this.list[t];if(e(r))return r}},some:function(e){for(var t=0;t<this.list.length;t++)if(e(this.list[t],t))return!0;return!1}}},this._enableEventListenners(),this._initSelectedList()}},{key:"subscribe",value:function(e){if("function"!=typeof e)throw new Error("parameter in the subscribe method is not a function");this._event=e}},{key:"_addOptionToList",value:function(e,t){var r=this,n='<span class="multiselect__selected" style="'.concat(u.multiselect__selected,'" data-value="').concat(e.value,'">').concat(this._tagTemplate?this._processTemplate(this._tagTemplate,t):e.text,'<span class="multiselect__remove-btn" style="').concat(u.multiselect__remove_btn,'">').concat(this._cross,"</span></span>");this._domElements.input.insertAdjacentHTML("beforebegin",n),this._multiselect.querySelector('span[data-value="'.concat(e.value,'"]')).lastElementChild.addEventListener("click",function(){var t=r._domElements.options.find(function(t){return t.dataset.value===e.value});r._handleOption(t)})}},{key:"_clearSelection",value:function(){for(var e=this,t=function(){var t=e._selectedOptions[r],n=e._domElements.options.find(function(e){return e.dataset.value===t.value});n.classList.remove("multiselect__options--selected"),n.setAttribute("style",u.multiselect__options),e._removeOptionFromList(n.dataset.value)},r=0;r<this._selectedOptions.length;r++)t();this._selectedOptions=[],this._handleClearSelectionBtn(),this._handlePlaceholder(),this._dispatchEvent({action:"CLEAR_ALL_OPTIONS",selection:this._selectedOptions})}},{key:"_closeList",value:function(){this._domElements.input.value="",this._domElements.optionsContainer.classList.remove("visible"),this._domElements.optionsContainer.setAttribute("style",u.multiselect__options),this._filterOptions(""),this._removeAllArrowSelected()}},{key:"_dispatchEvent",value:function(e){this._event(e)}},{key:"_enableEventListenners",value:function(){var e=this;document.addEventListener("mouseup",function(t){var r=t.target;e._multiselect.contains(r)||(e._filterOptions(""),e._closeList(),e._handlePlaceholder())}),this._domElements.clear.addEventListener("click",function(){e._clearSelection()});for(var t=0;t<this._domElements.options.list.length;t++)this._domElements.options.list[t].addEventListener("click",function(t){var r=t.target;e._handleOption(r),e._closeList()});this._domElements.input.addEventListener("focus",function(){e._domElements.optionsContainer.classList.add("visible"),e._domElements.optionsContainer.setAttribute("style",u.multiselect__options_visible)}),this._domElements.input.addEventListener("input",function(t){var r=t.target.value;e._domElements.options.list.length>0&&e._filterOptions(r)}),this._domElements.input.addEventListener("keydown",function(t){e._handleArrows(t),e._handleBackspace(t),e._handleEnter(t)})}},{key:"_filterOptions",value:function(e){var t=this,r=this._domElements.optionsContainer.classList.contains("visible"),n=e.toLowerCase();if(!r&&e.length>0&&(this._domElements.optionsContainer.classList.add("visible"),this._domElements.optionsContainer.setAttribute("style",u.multiselect__options_visible)),this._domElements.options.list.length>0){for(var i=0;i<this._domElements.options.list.length;i++){var o=this._domElements.options.list[i];(this._itemTemplate?this._data[i][this._textField]:o.textContent).toLowerCase().substring(0,n.length)===n?this._domElements.optionsContainerList.appendChild(o):o.parentNode&&o.parentNode.removeChild(o)}var a=this._domElements.options.some(function(e,r){return(t._itemTemplate?t._data[r][t._textField]:e.textContent).toLowerCase().substring(0,n.length)===n});this._showNoResults(!a)}}},{key:"_generateId",value:function(e){for(var t="",r=0;r<e;r++)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()));return t}},{key:"_getDataFromSelectTag",value:function(){for(var e=[],t=this._select.options,r=0;r<t.length;r++){var n=t[r];e.push({text:n.text,value:n.value,selected:n.hasAttribute("selected")})}return e}},{key:"_getDataFromSettings",value:function(){if(this._data.length>0&&this._valueField&&this._textField){var e="string"==typeof this._valueField,t="string"==typeof this._textField,r=[];if(!e||!t)throw new Error("textField and valueField must be of type string");for(var n=0;n<this._data.length;n++){var i=this._data[n];r.push({value:i[this._valueField],text:i[this._textField],selected:"boolean"==typeof i.selected&&i.selected})}return r}return null}},{key:"_handleArrows",value:function(e){if(40===e.keyCode||38===e.keyCode){e.preventDefault();var t=this._domElements.optionsContainer.classList.contains("visible"),r=this._multiselect.querySelector(".multiselect__options > ul");if(t){var n=this._multiselect.querySelector(".multiselect__options ul li.arrow-selected"),i={ArrowUp:"previous",Up:"previous",ArrowDown:"next",Down:"next"};if(!n)return r.firstElementChild.classList.add("arrow-selected"),r.firstElementChild.setAttribute("style",u.multiselect__options_ul_li_arrow_selected),void r.firstElementChild.scrollIntoView(!1);if(n.classList.remove("arrow-selected"),n.setAttribute("style",u.multiselect__options_ul_li),!(n=n[i[e.key]+"ElementSibling"]))return(n=r.children["next"===i[e.key]?0:r.children.length-1]).classList.add("arrow-selected"),n.setAttribute("style",u.multiselect__options_ul_li_arrow_selected),void this._scrollIntoView(r,n);n.classList.add("arrow-selected"),n.setAttribute("style",u.multiselect__options_ul_li_arrow_selected),this._scrollIntoView(r,n)}else this._domElements.optionsContainer.classList.add("visible"),this._domElements.optionsContainer.setAttribute("style",u.multiselect__options_visible),r.firstElementChild.classList.add("arrow-selected"),r.firstElementChild.setAttribute("style",u.multiselect__options_ul_li_arrow_selected),r.firstElementChild.scrollIntoView(!1)}}},{key:"_handleBackspace",value:function(e){if(8===e.keyCode&&""===e.target.value){var t=this._selectedOptions.length>0?this._selectedOptions[this._selectedOptions.length-1]:null;if(t){var r=this._multiselect.querySelector('li[data-value="'.concat(t.value,'"]'));this._handleOption(r),0===this._selectedOptions.length&&(this._domElements.optionsContainer.classList.remove("visible"),this._domElements.optionsContainer.setAttribute("style",u.multiselect__options))}}}},{key:"_handleClearSelectionBtn",value:function(){this._selectedOptions.length>0?this._domElements.clear.style.display="flex":this._domElements.clear.style.display="none"}},{key:"_handleEnter",value:function(e){if(13===e.keyCode){var t=this._multiselect.querySelector(".multiselect__options ul li.arrow-selected");t&&(this._handleOption(t),this._closeList())}}},{key:"_handleOption",value:function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=0;r<this._selectedOptions.length;r++)if(this._selectedOptions[r].value===e.dataset.value)return e.classList.remove("multiselect__options--selected"),e.setAttribute("style",u.multiselect__options),this._selectedOptions.splice(r,1),this._removeOptionFromList(e.dataset.value),this._handleClearSelectionBtn(),this._handlePlaceholder(),t&&this._dispatchEvent({action:"REMOVE_OPTION",value:e.dataset.value,selection:this._selectedOptions});for(var n=0;n<this._options.length;n++){var i=this._options[n];if(i.value===e.dataset.value)return e.classList.add("multiselect__options--selected"),e.setAttribute("style",u.multiselect__options_selected),this._selectedOptions=[].concat((0,o.default)(this._selectedOptions),[i]),this._addOptionToList(i,n),this._handleClearSelectionBtn(),this._handlePlaceholder(),t&&this._dispatchEvent({action:"ADD_OPTION",value:e.dataset.value,selection:this._selectedOptions})}}},{key:"_handlePlaceholder",value:function(){this._domElements.input.placeholder=this._placeholder}},{key:"_initSelectedList",value:function(){for(var e=this,t=!1,r=function(){var r=e._options[n];if(r.selected){t=!0;var i=e._domElements.options.find(function(e){return e.dataset.value===r.value});i.classList.add("multiselect__options--selected"),i.setAttribute("style",u.multiselect__options_selected),e._selectedOptions=[].concat((0,o.default)(e._selectedOptions),[r]),e._addOptionToList(r,n)}},n=0;n<this._options.length;n++)r();t&&this._handleClearSelectionBtn(),this._handlePlaceholder()}},{key:"_processTemplate",value:function(e,t){for(var r=e,n=e.match(/\$\{(\w+)\}/g).map(function(e){return e.replace(/\$\{|\}/g,"")}),i=0;i<n.length;i++){var o,a=n[i];r=r.replace("${".concat(a,"}"),null!==(o=this._data[t][a])&&void 0!==o?o:"")}return r}},{key:"_removeAllArrowSelected",value:function(){var e="arrow-selected",t=this._domElements.options.find(function(t){return t.classList.contains(e)});t&&t.classList.remove(e)&&t.setAttribute("style",u.multiselect__options_ul_li)}},{key:"_removeOptionFromList",value:function(e){var t=this._multiselect.querySelector('span[data-value="'.concat(e,'"]'));t&&t.parentNode&&t.parentNode.removeChild(t)}},{key:"_renderOptionsList",value:function(){var e=this,t='\n <div class="multiselect__options" style="'.concat(u.multiselect__options,'">\n <ul style="').concat(u.multiselect__options_ul,'">\n ').concat(this._options.length>0&&!this._itemTemplate?this._options.map(function(e){return'\n <li data-value="'.concat(e.value,'" style="').concat(u.multiselect__options_ul_li,'">').concat(e.text,"</li>\n ")}).join(""):"","\n\n ").concat(this._options.length>0&&this._itemTemplate?this._options.map(function(t,r){return'\n <li data-value="'.concat(t.value,'" style="').concat(u.multiselect__options_ul_li,'">').concat(e._processTemplate(e._itemTemplate,r),"</li>\n ")}).join(""):"","\n ").concat(this._showNoData(0===this._options.length),"\n </ul>\n </div>\n ");this._multiselect.insertAdjacentHTML("beforeend",t)}},{key:"_renderMultiselect",value:function(){this._select.style.display="none";var e="iconic-"+this._generateId(20);this._multiselect=document.createElement("div"),this._multiselect.setAttribute("id",e),this._multiselect.setAttribute("class","multiselect__container"),this._multiselect.setAttribute("style",u.multiselect__container);var t='\n <div class="multiselect__wrapper" style="'.concat(u.multiselect__wrapper,'">\n <input class="multiselect__input" style="').concat(u.multiselect__input,'" placeholder="').concat(this._placeholder,'" />\n </div>\n <span style="display: none;" class="multiselect__clear-btn" style="').concat(u.multiselect__clear_btn,'">').concat(this._cross,"</span>\n ");this._multiselect.innerHTML=t,this._selectContainer.appendChild(this._multiselect)}},{key:"_scrollIntoView",value:function(e,t){var r=e.getBoundingClientRect(),n=t.getBoundingClientRect();r.top<n.bottom-t.offsetHeight||(e.scrollTop=t.clientHeight+(t.offsetTop-t.offsetHeight)),r.bottom>n.top+t.offsetHeight||(e.scrollTop=t.clientHeight+(t.offsetTop-t.offsetHeight)-(e.offsetHeight-(t.offsetHeight+(t.offsetHeight-t.clientHeight))))}},{key:"_showNoData",value:function(e){return e?'<p class="multiselect__options--no-data" style="'.concat(u.multiselect__options_ul_p_multiselect__options_no_data,'">').concat(this._noData,"</p>"):""}},{key:"_showNoResults",value:function(e){var t=this._multiselect.querySelector(".multiselect__options--no-results");if(e){var r='<p class="multiselect__options--no-results" style="'.concat(u.multiselect__options_ul_p_multiselect__options_no_results,'">').concat(this._noResults,"</p>");!t&&this._domElements.optionsContainerList.insertAdjacentHTML("beforeend",r)}else t&&t.parentNode&&t.parentNode.removeChild(t)}}])}()},9013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.newThing=function(e){return(0,n.sym)(e.uri+"#id"+Date.now())},t.uniqueNodes=function(e){var t=e.map(function(e){return e.uri}),r=new Set(t);return Array.from(r).map(function(e){return new n.NamedNode(e)})},t.getArchiveUrl=function(e,t){var r=t.getUTCFullYear(),n=("0"+(t.getUTCMonth()+1)).slice(-2),i=("0"+t.getUTCDate()).slice(-2),o=e.split("/"),a=o[o.length-1];return new URL("./archive/".concat(r,"/").concat(n,"/").concat(i,"/").concat(a),e).toString()},t.differentOrigin=function(e){return!e||"".concat(window.location.origin,"/")!==new URL(e.value).origin},t.suggestPreferencesFile=function(e){var t=e.uri.replace("/profile/","/").replace("/public/","/").split("/").slice(0,-1).join("/")+"/Settings/Preferences.ttl";return(0,n.sym)(t)},t.determineChatContainer=function(e,t){var r=new URL("IndividualChats/".concat(new URL(e.value).host,"/"),t.value).toString();return new n.NamedNode(r)};var n=r(2209)},9045:(e,t,r)=>{var n=r(3738).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},9095:(e,t,r)=>{"use strict";r.d(t,{D0:()=>o,Kp:()=>p,MT:()=>c,Rd:()=>i,VS:()=>d,mx:()=>l,xW:()=>s,yI:()=>f});var n=r(610);const i=new TextEncoder,o=new TextDecoder,a=2**32;function s(...e){const t=e.reduce((e,{length:t})=>e+t,0),r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r}function c(e,t){return s(i.encode(e),new Uint8Array([0]),t)}function u(e,t,r){if(t<0||t>=a)throw new RangeError(`value must be >= 0 and <= ${a-1}. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function l(e){const t=Math.floor(e/a),r=e%a,n=new Uint8Array(8);return u(n,t,0),u(n,r,4),n}function d(e){const t=new Uint8Array(4);return u(t,e),t}function p(e){return s(d(e.length),e)}async function f(e,t,r){const i=Math.ceil((t>>3)/32),o=new Uint8Array(32*i);for(let t=0;t<i;t++){const i=new Uint8Array(4+e.length+r.length);i.set(d(t+1)),i.set(e,4),i.set(r,4+e.length),o.set(await(0,n.A)("sha256",i),32*t)}return o.slice(0,t>>3)}},9129:(e,t,r)=>{"use strict";var n=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.renderTableViewPane=function(e,t){var r,n,o,s,c=t.sourceDocument,d=t.tableClass,p=t.query,h=f.ns,m=a.store,g={},v={"http://www.w3.org/2002/07/owl#sameAs":!0,"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":!0},y={"http://www.w3.org/2001/XMLSchema#decimal":!0,"http://www.w3.org/2001/XMLSchema#float":!0,"http://www.w3.org/2001/XMLSchema#double":!0,"http://www.w3.org/2001/XMLSchema#integer":!0,"http://www.w3.org/2001/XMLSchema#nonNegativeInteger":!0,"http://www.w3.org/2001/XMLSchema#positiveInteger":!0,"http://www.w3.org/2001/XMLSchema#nonPositiveInteger":!0,"http://www.w3.org/2001/XMLSchema#negativeInteger":!0,"http://www.w3.org/2001/XMLSchema#long":!0,"http://www.w3.org/2001/XMLSchema#int":!0,"http://www.w3.org/2001/XMLSchema#short":!0,"http://www.w3.org/2001/XMLSchema#byte":!0,"http://www.w3.org/2001/XMLSchema#unsignedLong":!0,"http://www.w3.org/2001/XMLSchema#unsignedInt":!0,"http://www.w3.org/2001/XMLSchema#unsignedShort":!0,"http://www.w3.org/2001/XMLSchema#unsignedByte":!0},b={"http://www.w3.org/2001/XMLSchema#dateTime":!0,"http://www.w3.org/2001/XMLSchema#date":!0},w={"http://xmlns.com/foaf/0.1/Image":!0,"http://purl.org/dc/terms/Image":!0},x=t.keyVariable||"?_row",_=0,E=null,S=null,A=e.createElement("div");A.className="tableViewPane",A.appendChild(function(){var t=e.createElement("table");t.setAttribute("class","toolbar");var r=e.createElement("tr");return o=e.createElement("td"),r.appendChild(o),s=e.createElement("td"),r.appendChild(s),t.appendChild(r),t}());var k,C=e.createElement("div");if(A.appendChild(C),A.refresh=function(){Q(k.query,k.logicalRows,k.columns,k)},p)k=te(p),C.appendChild(k);else{var T=function(){var e,t,r=function(){for(var e={},t=m.statementsMatching(void 0,f.ns.rdf("type"),d,c),r={},n=0;n<t.length;++n){var i=t[n].object;if("NamedNode"===i.termType){var o=L(e,i);i.uri in r||(r[i.uri]=[]),r[i.uri].push(t[n].subject),o.addUse()}}return[r,e]}();for(var n in e=r[0],t=r[1],e){var i=e[n];U(t[n],i)}return[new P(null),O(t)]}();r=T[0],n=T[1],d||o.appendChild(function(t,r){var n=e.createElement("div");n.appendChild(e.createTextNode("Select type: "));var i=e.createElement("select");for(var o in i.appendChild(R("All types","null")),r)i.appendChild(R(r[o].getLabel(),o));return i.addEventListener("click",function(){I("null"===i.value?t:r[i.value])},!1),n.appendChild(i),n}(r,n)),S=function(e){var t,r=-1,n=null;for(t in e){var i=e[t];i.useCount>r&&(n=i,r=i.useCount)}return n}(n),I(S||r)}return A;function I(t){F(s),s.appendChild(function(t){var r=e.createElement("div"),n=t.getUnusedColumns();if(n.sort(function(e,t){var r=e.sortKey(),n=t.sortKey();return(r>n)-(r<n)}),n.length>0){r.appendChild(e.createTextNode("Add column: "));var i=e.createElement("select");i.appendChild(R("","-1"));for(var o=0;o<n.length;++o){var a=n[o];i.appendChild(R(a.getLabel(),""+o))}r.appendChild(i),i.addEventListener("click",function(){var e=Number(i.value);e>=0&&(t.addColumn(n[e]),I(t))},!1)}return r}(t)),function(e,t){E&&(E.running=!1);var r=te(e,t);F(C),C.appendChild(r),E=e}(function(e){var t=new u.Query,r=m.variable(x.slice(1));return function(e,t){for(var r=t.getColumns(),n=0;n<r.length;++n){var i=m.variable("_col"+n);e.vars.push(i),r[n].setVariable(i)}}(t,e),function(e,t,r){var n=r.type;n||(n=m.variable("_any")),e.pat.add(t,f.ns.rdf("type"),n)}(t,r,e),function(e,t,r){for(var n=r.getColumns(),i=0;i<n.length;++i){var o=n[i],a=m.formula();a.add(t,o.predicate,o.getVariable()),e.pat.optional.push(a)}}(t,r,e),t}(t),t)}function F(e){for(;e.childNodes.length>0;)e.removeChild(e.childNodes[0])}function P(e){this.type=e,this.columns=null,this.allColumns=[],this.useCount=0,this.getAllColumns=function(){return this.allColumns},this.getColumns=function(){if(!this.columns){var e=this.getAllColumns();this.columns=e.slice(0,7)}return this.columns},this.getUnusedColumns=function(){for(var e=this.getAllColumns(),t=this.getColumns(),r=[],n=0;n<e.length;++n)-1===t.indexOf(e[n])&&r.push(e[n]);return r},this.addColumn=function(e){this.columns.push(e)},this.removeColumn=function(e){this.columns=this.columns.filter(function(t){return t!==e})},this.getLabel=function(){return l.label(this.type)},this.addUse=function(){this.useCount+=1}}function N(){this.useCount=0,this.checkedAnyValues=!1,this.possiblyLiteral=!0,this.possiblyNumber=!0,this.constraints=[],this.checkValue=function(e){var t=e.termType;this.possiblyLiteral&&"Literal"!==t&&"NamedNode"!==t?(this.possiblyNumber=!1,this.possiblyLiteral=!1):this.possiblyNumber&&("Literal"!==t?this.possiblyNumber=!1:e.value.match(/^-?\d+(\.\d*)?$/)||(this.possiblyNumber=!1)),this.checkedAnyValues=!0},this.getVariable=function(){return this.variable},this.setVariable=function(e){this.variable=e},this.getKey=function(){return this.variable.toString()},this.addUse=function(){this.useCount+=1},this.getHints=function(){return t&&t.hints&&this.variable&&t.hints[this.variable.toNT()]?t.hints[this.variable.toNT()]:{}},this.getLabel=function(){return this.getHints().label?this.getHints().label:this.predicate?this.predicate.sameTerm(h.rdf("type"))&&this.superClass?l.label(this.superClass,!0):l.label(this.predicate):this.variable?this.variable.toString():"unlabeled column?"},this.setPredicate=function(e,t,r){t?(this.inverse=e,this.constraints=this.constraints.concat(m.each(e,f.ns.rdfs("domain"))),e.sameTerm(h.rdfs("subClassOf"))&&"NamedNode"===r.termType&&(this.superClass=r,this.alternatives=m.each(void 0,h.rdfs("subClassOf"),r))):(this.predicate=e,this.constraints=this.constraints.concat(m.each(e,f.ns.rdfs("range"))))},this.getConstraints=function(){return this.constraints},this.filterFunction=function(){return!0},this.sortKey=function(){return this.getLabel().toLowerCase()},this.isImageColumn=function(){for(var e=0;e<this.constraints.length;e++)if(this.constraints[e].uri in w)return!0;return!1}}function O(e,t){var r=[];for(var n in e){var i=e[n];t&&!t(n,i)||r.push(i)}return r}function R(t,r){var n=e.createElement("option");return n.setAttribute("value",r),n.appendChild(e.createTextNode(t)),n}function j(e,t){var r;return t.uri in e?r=e[t.uri]:((r=new N).setPredicate(t),e[t.uri]=r),r}function L(e,t){var r;return t.uri in e?r=e[t.uri]:(r=new P(t),e[t.uri]=r),r}function D(e,t){for(var r=m.statementsMatching(e,void 0,void 0,c),n={},i=0;i<r.length;++i){var o=r[i].predicate;if(!(o.uri in v)){var a=j(t,o);a.checkValue(r[i].object),n[o.uri]=a}}return n}function U(e,t){for(var r={},n=0;n<t.length;++n){var i=D(t[n],r);for(var o in i)i[o].addUse()}var a=O(r);!function(e){e.sort(function(e,t){return(e.useCount<t.useCount)-(e.useCount>t.useCount)})}(a),e.allColumns=a}function M(t,r){var n=e.createElement("a");return n.appendChild(e.createTextNode("[x]")),n.addEventListener("click",function(){t.removeColumn(r),I(t)},!1),n}function B(e,t){for(var r=!0,n=0;n<t.length;++n){var i=t[n],o=i.getKey(),a=null;if(o in e.values&&(a=e.values[o][0]),!i.filterFunction(a)){r=!1;break}}e._htmlRow.style.display=r?"":"none"}function H(e,t){for(var r=0;r<e.length;++r)B(e[r],t)}function q(e,t,r){function n(e){return e?"Literal"===e.termType?e.value.toLowerCase():"NamedNode"===e.termType?l.label(e).toLowerCase():e.value.toLowerCase():""}!function(e,t,r,i){var o=t.getKey();if(e.sort(function(e,t){var r=null,a=null;o in e.values&&(r=e.values[o][0]),o in t.values&&(a=t.values[o][0]);var s,c,u,l=(s=a,c=n(r),u=n(s),c<u?-1:c>u?1:0);return i?-l:l}),e.length){for(var a=e[0]._htmlRow.parentNode,s=0;s<e.length;++s)a.removeChild(e[s]._htmlRow);for(var c=0;c<e.length;++c)a.appendChild(e[c]._htmlRow)}}(e,t,0,r)}function W(t,r,n){var i=e.createElement("div"),o=e.createElement("input");o.setAttribute("type","text"),o.style.width="70%",i.appendChild(o);var a=e.createElement("span");a.appendChild(e.createTextNode("▼")),a.addEventListener("click",function(){q(t,n,!1)},!1),i.appendChild(a);var s=e.createElement("span");s.appendChild(e.createTextNode("▲")),s.addEventListener("click",function(){q(t,n,!0)},!1),i.appendChild(s);var c=null;return n.filterFunction=function(e){return!c||!!e&&("Literal"===e.termType?e.value:"NamedNode"===e.termType?l.label(e):"").toLowerCase().indexOf(c)>=0},o.addEventListener("keyup",function(){c=""!==o.value?o.value.toLowerCase():null,H(t,r)},!1),i}function V(t,r,n,i){for(var o=e.createElement("div"),a=e.createElement("select"),s={},c=0;c<i.length;++c){var u=i[c];s[u.uri]=!0}var d=$(n).initialSelection;d&&(s=d),a.setAttribute("multiple","true");for(var p=0;p<i.length;++p){var f=i[p],h=R(l.label(f),p);s[f.uri]&&(h.selected=!0),a.appendChild(h)}return o.appendChild(a),n.filterFunction=function(e){return!s||e&&s[e.uri]},a.addEventListener("click",function(){s={};for(var e=a.options,n=0;n<e.length;n++){var o=e[n],c=Number(o.value);e[n].selected&&(s[i[c].uri]=!0)}H(t,r)},!0),o}function K(t,r,n){var i=e.createElement("div"),o=e.createElement("input");o.setAttribute("type","text"),o.style.width="40px",i.appendChild(o);var a=e.createElement("input");a.setAttribute("type","text"),a.style.width="40px",i.appendChild(a);var s=null,c=null;function u(){s=""===o.value?null:Number(o.value),c=""===a.value?null:Number(a.value),H(t,r)}return n.filterFunction=function(e){return e&&(e=Number(e)),!(s&&(!e||e<s)||c&&(!e||e>c))},o.addEventListener("keyup",u,!1),a.addEventListener("keyup",u,!1),i}function J(e,t,r){if(r.superClass&&r.alternatives.length>0)return V(e,t,r,r.alternatives);for(var n,i=r.getConstraints(),o=0;o<i.length;o++){if(n=i[o],r.checkedAnyValues&&r.possiblyNumber||n.uri in y)return K(e,t,r);if("http://www.w3.org/2000/01/rdf-schema#Literal"===n.uri)return W(e,t,r);var a=m.each(n,f.ns.owl("oneOf"));if(a.length>0)return V(e,t,r,a.elements)}return function(e,t,r){return r.checkedAnyValues&&r.possiblyNumber?K(e,t,r):r.possiblyLiteral?W(e,t,r):null}(e,t,r)}function z(t,r,n){n=n||{};var o=e.createElement("a"),a=n.linkFunction;return o.setAttribute("href",t),o.appendChild(e.createTextNode(r)),a?o.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation();var t=l.getTarget(e).getAttribute("href");t||i.log("No href found \n"),a(t)},!0):o.addEventListener("click",f.widgets.openHrefInOutlineMode,!0),o}function $(e){return t&&t.hints&&e.variable&&t.hints[e.variable.toNT()]?t.hints[e.variable.toNT()]:{}}function G(t,r){var n=$(r),i=n.cellFormat;if(!i){if("Literal"===t.termType){if(t.datatype){if(b[t.datatype.uri])return e.createTextNode(f.widgets.shortDate(t.value));if(y[t.datatype.uri]){var o=e.createElement("span");return o.textContent=t.value,o.setAttribute("style","text-align: right"),o}}return e.createTextNode(t.value)}if("NamedNode"===t.termType&&r.isImageColumn())return function(t){var r=e.createElement("img");return r.setAttribute("src",t.uri),r.style.height="40px",r}(t);if("NamedNode"===t.termType||"BlankNode"===t.termType)return function(e,t){var r=!1;return e.uri&&(r=e.uri.match(/^mailto:(.*)/)),z(e.uri,r?r[1]:l.label(e),t)}(t,n);if("Collection"===t.termType){var a=e.createElement("span");return a.appendChild(e.createTextNode("[")),t.elements.forEach(function(t){a.appendChild(G(t,r)),a.appendChild(e.createTextNode(", "))}),a.removeChild(a.lastChild),a.appendChild(e.createTextNode("]")),a}return e.createTextNode("unknown termtype '"+t.termType+"'!")}if("shortDate"===i)return e.createTextNode(f.widgets.shortDate(t.value))}function X(e,t){var r,n=null;if("Literal"===e.termType)n="value";else{if("NamedNode"!==e.termType)return t.indexOf(e)>=0;n="uri"}for(r=0;r<t.length;++r)if(t[r].termType===e.termType&&t[r][n]===e[n])return!0;return!1}function Y(e){if("uri"in e)return e.uri;if("_subject_id"in e)return e._subject_id;var t=""+_;return e._subject_id=t,++_,t}function Q(r,n,o,a){r.running=!0;var s=Date.now(),c=e.createElement("tr");a.appendChild(c),c.textContent="Loading ...";for(var u=0;u<n.length;u++)n[u].original=!0,n[u].originalValues||(n[u].originalValues=n[u].values),n[u].values={};m.query(r,function(t){if(r.running){c.textContent+=".";var i,s=null,u=null;if(x in t&&(i=Y(u=t[x]))in g&&(s=g[i]),!s){var l=e.createElement("tr");a.appendChild(l),s={_htmlRow:l,_subject:u,values:{}},n.push(s),u&&(g[i]=s)}delete s.original,function(t,r,n){var i,o=!1;for(i in n){var a=n[i];i in t.values||(t.values[i]=[]),X(a,t.values[i])||(t.values[i].push(a),o=!0)}o&&(F(t._htmlRow),function(t,r,n){var i=e.createElement("td");r._subject&&"uri"in r._subject&&i.appendChild(z(r._subject.uri,"→")),t.appendChild(i);for(var o=0;o<n.length;++o){var a=n[o],s=e.createElement("td"),c=void 0,u=a.getKey();if(u in r.values){var l=r.values[u],d=!1;r.originalValues&&r.originalValues[u]&&l.length!==r.originalValues[u].length&&(d=!0);for(var p=0;p<l.length;++p){var f=l[p];r.originalValues&&r.originalValues[u]&&r.originalValues[u].length>p&&(c=r.originalValues[u][p],f.toString()!==c.toString()&&(d=!0)),s.appendChild(G(f,a)),p!==l.length-1&&s.appendChild(e.createTextNode(",\n")),d&&(s.style.background="#efe")}}t.appendChild(s)}r._htmlRow=t}(t._htmlRow,t,r)),B(t,r)}(s,o,t)}},void 0,function(){c&&c.parentNode&&c.parentNode.removeChild&&(c.parentNode.removeChild(c),c=null);var e=Date.now()-s;i.log("Query done: "+n.length+" rows, "+e+"ms");for(var r=n.length-1;r>=0;r--)if(n[r].original){i.log(" deleting row "+n[r]._subject);var a=n[r]._htmlRow;a.parentNode.removeChild(a),delete g[Y(n[r]._subject)],n.splice(r,1)}if(t.sortBy){var u=function(e,t){for(var r in e){var n=e[r];if(n.variable.toNT()===t)return n}throw new Error("getColumnForVariable: no column for variable ".concat(t))}(o,t.sortBy);q(n,u,t.sortReverse)}t.onDone&&t.onDone(A)})}function Z(e,t){f.log.debug(">> processing formula");for(var r=0;r<t.statements.length;++r){var n=t.statements[r];if("NamedNode"===n.predicate.termType&&"Variable"===n.object.termType){var i=n.object.toString();i in e&&e[i].setPredicate(n.predicate,!1,n.subject)}if("NamedNode"===n.predicate.termType&&"Variable"===n.subject.termType){var o=n.subject.toString();o in e&&e[o].setPredicate(n.predicate,!0,n.object)}}for(var a=0;a<t.optional.length;++a)f.log.debug("recurse to optional subformula "+a),Z(e,t.optional[a]);f.log.debug("<< finished processing formula")}function ee(e){for(var t=[],r={},n=0;n<e.vars.length;++n){var i=new N,o=e.vars[n];f.log.debug("column "+n+" : "+o),i.setVariable(o),r[o]=i,t.push(i)}return Z(r,e.pat),t}function te(t,r){var n;n=p?ee(t):r.getColumns();var i=[],o=e.createElement("table");return o.appendChild(function(t,r){var n=e.createElement("tr"),i=e.createElement("th");n.appendChild(i);for(var o=0;o<t.length;++o){var a=e.createElement("th"),s=t[o];a.appendChild(e.createTextNode(s.getLabel())),r&&a.appendChild(M(r,s)),n.appendChild(a)}return n}(n,r)),o.appendChild(function(t,r){var n=e.createElement("tr");n.className="selectors",n.appendChild(e.createElement("td"));for(var i=0;i<r.length;++i){var o=e.createElement("td"),a=J(t,r,r[i]);a&&o.appendChild(a),n.appendChild(o)}return n}(i,n)),o.logicalRows=i,o.columns=n,o.query=t,Q(t,i,n,o),o}};var i=p(r(2902)),o=r(4901),a=r(3451),s=p(r(9295)),c=p(r(2054)),u=p(r(2209)),l=p(r(7499)),d=p(r(1939));function p(e,t){if("function"==typeof WeakMap)var r=new WeakMap,i=new WeakMap;return(p=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return s;if(o=t?i:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var f={icons:o.icons,log:s,ns:c,utils:l,widgets:d}},9154:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)},i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.createChatLogic=function(e,t){var r=s.ns;function l(t,r,n){return i(this,void 0,void 0,function(){var i,s;return o(this,function(o){switch(o.label){case 0:return[4,e.fetcher.load(t)];case 1:if(o.sent(),!(i=e.any(t,new a.NamedNode("http://www.iana.org/assignments/link-relations/acl"))))throw new Error("Chat ACL doc not found!");return s="\n @prefix acl: <http://www.w3.org/ns/auth/acl#>.\n <#owner>\n a acl:Authorization;\n acl:agent <".concat(r.value,">;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Write, acl:Control.\n <#invitee>\n a acl:Authorization;\n acl:agent <").concat(n.value,">;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Append.\n "),[4,e.fetcher.webOperation("PUT",i.value,{data:s,contentType:"text/turtle"})];case 2:return o.sent(),[2]}})})}function d(t,n){return i(this,void 0,void 0,function(){var i,s,u;return o(this,function(o){switch(o.label){case 0:if(!(i=e.any(n,r.solid("privateTypeIndex"))))throw new Error("Private type index not found!");return[4,e.fetcher.load(i)];case 1:return o.sent(),s=(0,c.newThing)(i),u=[(0,a.st)(s,r.rdf("type"),r.solid("TypeRegistration"),i.doc()),(0,a.st)(s,r.solid("forClass"),r.meeting("LongChat"),i.doc()),(0,a.st)(s,r.solid("instance"),t,i.doc())],[4,new Promise(function(t,r){e.updater.update([],u,function(e,n,i){n?t(null):r(new Error(i))})})];case 2:return o.sent(),[2]}})})}function p(r){return i(this,void 0,void 0,function(){var n,i,s,u;return o(this,function(o){switch(o.label){case 0:return[4,t.loadMe()];case 1:return n=o.sent(),[4,t.getPodRoot(n)];case 2:i=o.sent(),s=(0,c.determineChatContainer)(r,i),u=!0,o.label=3;case 3:return o.trys.push([3,5,,6]),[4,e.fetcher.load(new a.NamedNode(s.value+"index.ttl#this"))];case 4:return o.sent(),[3,6];case 5:return o.sent(),u=!1,[3,6];case 6:return[2,{me:n,chatContainer:s,exists:u}]}})})}function f(e,t){return i(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:return[4,h({me:t,newBase:e.value})];case 1:return[2,r.sent().newInstance]}})})}function h(t){var i=e,o=i.updater;if(t.me&&!t.me.uri)throw new Error("chat mintNew: Invalid userid "+t.me);var s=t.newInstance=t.newInstance||i.sym(t.newBase+u),c=s.doc();return i.add(s,r.rdf("type"),r.meeting("LongChat"),c),i.add(s,r.dc("title"),"Chat channel",c),i.add(s,r.dc("created"),(0,a.term)(new Date(Date.now())),c),t.me&&i.add(s,r.dc("author"),t.me,c),new Promise(function(e,r){null==o||o.put(c,i.statementsMatching(void 0,void 0,void 0,c),"text/turtle",function(i,o,a){o?e(n(n({},t),{newInstance:s})):r(new Error("FAILED to save new chat channel at: "+i+" : "+a))})})}function m(t,n){return i(this,void 0,void 0,function(){var i,a,s,c;return o(this,function(o){switch(o.label){case 0:return[4,e.fetcher.load(t.doc())];case 1:if(o.sent(),!(i=e.any(t,r.ldp("inbox"),void 0,t.doc())))throw new Error("Invitee inbox not found! ".concat(t.value));return a="\n <> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n ".concat(r.rdf("seeAlso")," <").concat(n.value,"> .\n "),[4,null===(c=e.fetcher)||void 0===c?void 0:c.webOperation("POST",i.value,{data:a,contentType:"text/turtle"})];case 2:if(!(null==(s=o.sent())?void 0:s.headers.get("location")))throw new Error("Invite sending returned a ".concat(null==s?void 0:s.status));return[2]}})})}return{setAcl:l,addToPrivateTypeIndex:d,findChat:p,createChatThing:f,getChat:function(e){return i(this,arguments,void 0,function(e,t){var r,n,i,s;return void 0===t&&(t=!0),o(this,function(o){switch(o.label){case 0:return[4,p(e)];case 1:return r=o.sent(),n=r.me,i=r.chatContainer,r.exists?[2,new a.NamedNode(i.value+u)]:t?[4,f(i,n)]:[3,6];case 2:return s=o.sent(),[4,m(e,s)];case 3:return o.sent(),[4,l(i,n,e)];case 4:return o.sent(),[4,d(s,n)];case 5:return o.sent(),[2,s];case 6:return[2,null]}})})},sendInvite:m,mintNew:h}};var a=r(2209),s=r(733),c=r(9013),u="index.ttl#this"},9169:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.AddAgentButtons=void 0;var o=n(r(4756)),a=n(r(9293)),s=n(r(7383)),c=n(r(4579)),u=n(r(3693)),l=v(r(2902)),d=r(4901),p=r(7822),f=v(r(2054)),h=v(r(7499)),m=v(r(1939)),g=v(r(5148));function v(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(v=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}t.AddAgentButtons=function(){return(0,c.default)(function e(t){(0,s.default)(this,e),this.groupList=t,(0,u.default)(this,"rootElement",void 0),(0,u.default)(this,"barElement",void 0),(0,u.default)(this,"isExpanded",!1),this.rootElement=t.controller.dom.createElement("div"),this.barElement=t.controller.dom.createElement("div")},[{key:"render",value:function(){return this.rootElement.innerHTML="",this.rootElement.appendChild(this.renderAddButton()),this.rootElement.appendChild(this.barElement),this.rootElement}},{key:"renderAddButton",value:function(){var e=this;return m.button(this.groupList.controller.dom,"".concat(d.icons.iconBase,"noun_34653_green.svg"),"Add ...",function(){e.toggleBar(),e.renderBar()})}},{key:"renderBar",value:function(){this.barElement.innerHTML="",this.isExpanded&&(this.barElement.appendChild(this.renderPersonButton()),this.barElement.appendChild(this.renderGroupButton()),this.barElement.appendChild(this.renderPublicButton()),this.barElement.appendChild(this.renderAuthenticatedAgentButton()),this.barElement.appendChild(this.renderBotButton()),this.barElement.appendChild(this.renderAppsButton()))}},{key:"renderSimplifiedBar",value:function(e){var t=this;Array.from(this.barElement.children).filter(function(t){return t!==e}).forEach(function(e){return t.barElement.removeChild(e)})}},{key:"renderPersonButton",value:function(){var e=this;return m.button(this.groupList.controller.dom,d.icons.iconBase+m.iconForClass["vcard:Individual"],"Add Person",function(t){e.renderSimplifiedBar(t.target),e.renderNameForm(f.vcard("Individual"),"person").then(function(t){return e.addPerson(t)}).then(function(){return e.renderCleanup()}).catch(function(t){return e.groupList.controller.renderStatus(t)})})}},{key:"renderGroupButton",value:function(){var e=this;return m.button(this.groupList.controller.dom,d.icons.iconBase+m.iconForClass["vcard:Group"],"Add Group",function(t){e.renderSimplifiedBar(t.target),e.renderNameForm(f.vcard("Group"),"group").then(function(t){return e.addGroup(t)}).then(function(){return e.renderCleanup()}).catch(function(t){return e.groupList.controller.renderStatus(t)})})}},{key:"renderNameForm",value:function(e,t){return m.askName(this.groupList.controller.dom,this.groupList.store,this.barElement,f.vcard("URI"),e,t)}},{key:"renderPublicButton",value:function(){var e=this;return m.button(this.groupList.controller.dom,d.icons.iconBase+m.iconForClass["foaf:Agent"],"Add Everyone",function(){return e.addAgent(f.foaf("Agent").uri).then(function(){return e.groupList.controller.renderTemporaryStatus("Adding the general public to those who can read. Drag the globe to a different level to give them more access.")}).then(function(){return e.renderCleanup()})})}},{key:"renderAuthenticatedAgentButton",value:function(){var e=this;return m.button(this.groupList.controller.dom,"".concat(d.icons.iconBase,"noun_99101.svg"),"Anyone logged In",function(){return e.addAgent(f.acl("AuthenticatedAgent").uri).then(function(){return e.groupList.controller.renderTemporaryStatus("Adding anyone logged in to those who can read. Drag the ID icon to a different level to give them more access.")}).then(function(){return e.renderCleanup()})})}},{key:"renderBotButton",value:function(){var e=this;return m.button(this.groupList.controller.dom,d.icons.iconBase+"noun_Robot_849764.svg","A Software Agent (bot)",function(t){e.renderSimplifiedBar(t.target),e.renderNameForm(f.schema("Application"),"bot").then(function(t){return e.addBot(t)}).then(function(){return e.renderCleanup()})})}},{key:"renderAppsButton",value:function(){var e=this;return m.button(this.groupList.controller.dom,"".concat(d.icons.iconBase,"noun_15177.svg"),"A Web App (origin)",function(t){e.renderSimplifiedBar(t.target);var r={div:e.barElement,dom:e.groupList.controller.dom},n=e.renderAppsTable(r).catch(function(t){return e.groupList.controller.renderStatus(t)});e.renderAppsView();var i=e.renderNameForm(f.schema("WebApplication"),"webapp domain").then(function(t){return e.getOriginFromName(t)});Promise.race([n,i]).then(function(t){t&&e.groupList.addNewURI(t)}).then(function(){return e.renderCleanup()})})}},{key:"renderAppsView",value:function(){var e=this,t=this.groupList.controller.context.session.paneRegistry.byName("trustedApplications");if(t){var r=t.render(null,this.groupList.controller.context);r.setAttribute("style",g.trustedAppController);var n=m.cancelButton(this.groupList.controller.dom,function(){return e.renderCleanup()});n.setAttribute("style",g.trustedAppCancelButton),r.insertBefore(n,r.firstChild),this.barElement.appendChild(r)}}},{key:"renderAppsTable",value:(v=(0,a.default)(o.default.mark(function e(t){var r,n,i=this;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,p.ensureLoadedProfile)(t);case 1:return r=this.groupList.store.each(t.me,f.acl("trustedApp")),n=r.flatMap(function(e){return i.groupList.store.each(e,f.acl("origin"))}),this.barElement.appendChild(this.groupList.controller.dom.createElement("p")).textContent="You have ".concat(n.length," selected web apps."),e.abrupt("return",new Promise(function(e,t){var n=i.barElement.appendChild(i.groupList.controller.dom.createElement("table"));n.setAttribute("style",g.trustedAppAddApplicationsTable),r.forEach(function(r){var o=i.groupList.store.any(r,f.acl("origin"));o||t(new Error("Unable to pick app: ".concat(r.value)));var a=m.personTR(i.groupList.controller.dom,f.acl("origin"),o,{}),s=i.groupList.controller.dom.createElement("table"),c=s.appendChild(i.groupList.controller.dom.createElement("tr"));c.appendChild(i.groupList.controller.dom.createElement("td")).appendChild(a),c.appendChild(i.groupList.controller.dom.createElement("td")).textContent="Give access to ".concat(i.groupList.controller.noun," ").concat(h.label(i.groupList.controller.subject),"?"),c.appendChild(i.groupList.controller.dom.createElement("td")).appendChild(m.continueButton(i.groupList.controller.dom,function(){return e(o.value)})),n.appendChild(s)})}));case 2:case"end":return e.stop()}},e,this)})),function(e){return v.apply(this,arguments)})},{key:"renderCleanup",value:function(){this.renderBar(),this.groupList.render()}},{key:"addPerson",value:(i=(0,a.default)(o.default.mark(function e(t){var r;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=1;break}return e.abrupt("return",this.toggleBar());case 1:if(r=/^https?:/i,t.match(r)){e.next=2;break}return e.abrupt("return",Promise.reject(new Error("Not a http URI")));case 2:return l.log("Adding to ACL person: ".concat(t)),e.next=3,this.groupList.addNewURI(t);case 3:this.toggleBar();case 4:case"end":return e.stop()}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"addGroup",value:(n=(0,a.default)(o.default.mark(function e(t){var r;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=1;break}return e.abrupt("return",this.toggleBar());case 1:if(r=/^https?:/i,t.match(r)){e.next=2;break}return e.abrupt("return",Promise.reject(new Error("Not a http URI")));case 2:return l.log("Adding to ACL group: "+t),e.next=3,this.groupList.addNewURI(t);case 3:this.toggleBar();case 4:case"end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"addAgent",value:(r=(0,a.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this.groupList.addNewURI(t);case 1:this.toggleBar();case 2:case"end":return e.stop()}},e,this)})),function(e){return r.apply(this,arguments)})},{key:"addBot",value:(t=(0,a.default)(o.default.mark(function e(t){var r;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=1;break}return e.abrupt("return",this.toggleBar());case 1:if(r=/^https?:/i,t.match(r)){e.next=2;break}return e.abrupt("return",Promise.reject(new Error("Not a http URI")));case 2:return l.log("Adding to ACL bot: "+t),e.next=3,this.groupList.addNewURI(t);case 3:this.toggleBar();case 4:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"getOriginFromName",value:(e=(0,a.default)(o.default.mark(function e(t){var r,n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=1;break}return e.abrupt("return",Promise.resolve());case 1:if(r=/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i,t.match(r)){e.next=2;break}return e.abrupt("return",Promise.reject(new Error("Not a domain name")));case 2:return n="https://"+t,l.log("Adding to ACL origin: "+n),this.toggleBar(),e.abrupt("return",n);case 3:case"end":return e.stop()}},e,this)})),function(t){return e.apply(this,arguments)})},{key:"toggleBar",value:function(){this.isExpanded=!this.isExpanded}}]);var e,t,r,n,i,v}()},9171:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.field=void 0,t.fieldFunction=function(e,t){var r=c(t),n=s[r];return(0,i.debug)("paneUtils: Going to implement field "+t+" of type "+r),n||function(e,n){var i=(0,o.errorMessageBlock)(e,"No handler for field "+t+" of type "+r);return n&&n.appendChild(i),i}},t.mostSpecificClassURI=c;var n=r(3451),i=r(9295),o=r(1302),a=n.solidLogicSingleton.store,s=t.field={};function c(e){var t=a,r=t.findTypeURIs(e),n=t.bottomTypeURIs(r),i=[];for(var o in n)i.push(o);return i[0]}},9175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.Hash=t.nextTick=t.swap32IfBE=t.byteSwapIfBE=t.swap8IfBE=t.isLE=void 0,t.isBytes=i,t.anumber=o,t.abytes=a,t.ahash=function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");o(e.outputLen),o(e.blockLen)},t.aexists=function(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},t.aoutput=function(e,t){a(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)},t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},t.clean=function(...e){for(let t=0;t<e.length;t++)e[t].fill(0)},t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},t.rotr=function(e,t){return e<<32-t|e>>>t},t.rotl=function(e,t){return e<<t|e>>>32-t>>>0},t.byteSwap=s,t.byteSwap32=c,t.bytesToHex=function(e){if(a(e),u)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=l[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(u)return Uint8Array.fromHex(e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){const r=p(e.charCodeAt(i)),o=p(e.charCodeAt(i+1));if(void 0===r||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}n[t]=16*r+o}return n},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o<e;o++){n(o);const e=Date.now()-i;e>=0&&e<r||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=f,t.bytesToUtf8=function(e){return(new TextDecoder).decode(e)},t.toBytes=h,t.kdfInputToBytes=function(e){return"string"==typeof e&&(e=f(e)),a(e),e},t.concatBytes=function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];a(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r},t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!=={}.toString.call(t))throw new Error("options should be object or undefined");return Object.assign(e,t)},t.createHasher=m,t.createOptHasher=g,t.createXOFer=v,t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));if(n.crypto&&"function"==typeof n.crypto.randomBytes)return Uint8Array.from(n.crypto.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")};const n=r(5145);function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function o(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function a(e,...t){if(!i(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function s(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function c(e){for(let t=0;t<e.length;t++)e[t]=s(e[t]);return e}t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],t.swap8IfBE=t.isLE?e=>e:e=>s(e),t.byteSwapIfBE=t.swap8IfBE,t.swap32IfBE=t.isLE?e=>e:c;const u=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),l=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),d={_0:48,_9:57,A:65,F:70,a:97,f:102};function p(e){return e>=d._0&&e<=d._9?e-d._0:e>=d.A&&e<=d.F?e-(d.A-10):e>=d.a&&e<=d.f?e-(d.a-10):void 0}function f(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function h(e){return"string"==typeof e&&(e=f(e)),a(e),e}function m(e){const t=t=>e().update(h(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function g(e){const t=(t,r)=>e(r).update(h(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}function v(e){const t=(t,r)=>e(r).update(h(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}t.nextTick=async()=>{},t.Hash=class{},t.wrapConstructor=m,t.wrapConstructorWithOpts=g,t.wrapXOFConstructorWithOpts=v},9288:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),a=0;a<r.length;a++)"default"!==r[a]&&i(t,e,r[a]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.appContext=void 0,t.offlineTestID=function(){var e=window.$SolidTestEnvironment;if(void 0!==e&&e.username)return c.log("Assuming the user is "+e.username),(0,s.sym)(e.username);if("undefined"!=typeof document&&document.location&&"http://localhost"===(""+document.location).slice(0,16)){var t=document.getElementById("appTarget");if(!t)return null;var r=t.getAttribute("testID");return r?(c.log("Assuming user is "+r),(0,s.sym)(r)):null}return null};var s=r(2209),c=a(r(8339));t.appContext=function(){var e=window.SolidAppContext;if(e||(e={}),e.viewingNoAuthPage=!1,e.noAuth&&window.document&&window.document.location.href.startsWith(e.noAuth)){e.viewingNoAuthPage=!0;var t=new URLSearchParams(window.document.location.search);if(t){var r=e.viewedPage=t.get("uri")||null;if(r&&!(r=decodeURI(r)).startsWith(e.noAuth)){var n=r.split(/\//);e.idp=n[0]+"//"+n[2],e.viewingNoAuthPage=!1}}}return e}},9291:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},9293:e=>{function t(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise(function(i,o){var a=e.apply(r,n);function s(e){t(a,i,o,s,c,"next",e)}function c(e){t(a,i,o,s,c,"throw",e)}s(void 0)})}},e.exports.__esModule=!0,e.exports.default=e.exports},9295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,t.alert=function(e){p&&void 0!==p.alert?p.alert(e):h(e)},t.clear=function(){var e,t=null===(e=d)||void 0===e?void 0:e.getElementById("status");t&&(t.innerHTML="")},t.debug=m,t.dumpHTML=function(){var e;if(d){var t=u;u=c,m((null===(e=d)||void 0===e||null===(e=e.body)||void 0===e?void 0:e.innerHTML)||""),u=t}},t.error=function(e){f(e,r,"eror")},t.escapeForXML=g,t.info=function(e){f(e,a,"info")},t.logAscending=function(){l=!0},t.logDescending=function(){l=!1},t.msg=function(e){f(e)},t.setInternals=function(e,t){p=e,d=t},t.setLevel=function(e){u=c,m("Log level is now "+e),u=e},t.success=function(e){f(e,o,"good")},t.warn=h;var r=1,n=2,i=4,o=8,a=16,s=32,c=63,u=(t.LogLevel=function(e){return e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Message=4]="Message",e[e.Success=8]="Success",e[e.Info=16]="Info",e[e.Debug=32]="Debug",e[e.All=63]="All",e}({}),r+n+i),l=!1,d=document,p=window;function f(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mesg";if(u&(arguments.length>1&&void 0!==arguments[1]?arguments[1]:i))if(void 0!==d){var r=d.getElementById("status");if(!r)return;var n=d.createElement("span");n.setAttribute("class",t);var o=new Date;n.innerHTML="".concat(o.getHours(),":").concat(o.getMinutes(),":").concat(o.getSeconds()," [").concat(t,"] ").concat(g(e),"<br/>"),l?r.insertBefore(n,r.firstChild):r.appendChild(n)}else"undefined"!=typeof console&&console.log(e)}function h(e){f(e,n,"warn")}function m(e){f(e,s,"dbug")}function g(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}},9380:(e,t,r)=>{"use strict";r.d(t,{V:()=>a});var n=r(5609),i=r(9803),o=r(7493);async function a(e,t,r){const a=await(0,n.B)(e,t,r);if(a.protectedHeader.crit?.includes("b64")&&!1===a.protectedHeader.b64)throw new o.JWTInvalid("JWTs MUST NOT use unencoded payload");const s={payload:(0,i.A)(a.protectedHeader,a.payload,r),protectedHeader:a.protectedHeader};return"function"==typeof t?{...s,key:a.key}:s}},9400:(e,t,r)=>{"use strict";var n=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.setFieldStyle=function(e,t){var r=(0,s.mostSpecificClassURI)(t),n=a.fieldParams[r]||{},u=o.store.any(t,i.ui("style"));u?"Literal"===u.termType?u&&e.setAttribute("style",u.value):o.store.statementsMatching(u,null,null,t.doc()).forEach(function(t){if(t.predicate.uri&&t.predicate.uri.startsWith(c)){var r=t.predicate.uri.slice(c.length);try{e.style[r]=t.object.value}catch(n){console.warn("setFieldStyle: Error setting element style ".concat(r,' to "').concat(t.object.value,'"')),console.warn('setFieldStyle: ... Element tagName was "'.concat(e.tagName||"???",'"'))}}}):n.style&&e.setAttribute("style",n.style)};var i=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var r,i,o={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return o;if(r=t){if(r.has(e))return r.get(e);r.set(e,o)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((i=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(i.get||i.set)?r(o,a,i):o[a]=e[a]);return o}(e)}(r(2054)),o=r(3451),a=r(1949),s=r(9171),c="https://www.w3.org/ns/css#"},9403:(e,t,r)=>{"use strict";r.d(t,{$Q:()=>i,BR:()=>m,Fn:()=>w,H:()=>E,JG:()=>y,K9:()=>b,Kk:()=>n,MG:()=>h,P2:()=>a,QW:()=>o,S:()=>u,_0:()=>g,bD:()=>l,bM:()=>v,hu:()=>_,i2:()=>p,ic:()=>s,lc:()=>d,ny:()=>f,r0:()=>c,sT:()=>x});const n="NamedNode",i="BlankNode",o="Literal",a="Variable",s="DefaultGraph",c="Collection",u="Empty",l="Graph",d="text/html",p="application/ld+json",f="text/n3",h="application/n3",m="application/nquads",g="application/n-quads",v="application/n-triples",y="application/rdf+xml",b="application/sparql-update",w="application/sparql-update-single-match",x="text/turtle",_="application/x-turtle",E="application/xhtml+xml"},9511:(e,t,r)=>{var n=r(5636);e.exports=function(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&&n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},9552:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.ActionClassFromEmoji=function(e){for(var t in w)if(w[t]===e)return d.sym(t.slice(1,-1));return null},t.emojiFromAction=_,t.emojiFromActionClass=x,t.messageToolbar=function(e,t,r,n){return A.apply(this,arguments)},t.sentimentStrip=function(e,t){return E.apply(this,arguments)},t.sentimentStripLinked=function(e,t){return S.apply(this,arguments)};var o=n(r(4756)),a=n(r(5715)),s=n(r(9293)),c=y(r(2902)),u=r(4901),l=y(r(2054)),d=y(r(2209)),p=y(r(7499)),f=y(r(1939)),h=r(3909),m=r(3451),g=r(6472),v=r(1255);function y(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(y=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var b=window.document,w={};function x(e){return w[e]||null}function _(e){var t=m.store.any(e,l.sioc("content"),null,e.doc());if(t)return t;var r=m.store.any(e,l.rdf("type"),null,e.doc());if(r){var n=x(r);if(n)return n}return"⬜️"}function E(){return(E=(0,s.default)(o.default.mark(function e(t,r){var n,i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,g.allVersions)(t);case 1:return n=e.sent,i=n.map(function(e){return m.store.each(null,l.schema("target"),e,r)}).flat(),a=i.map(function(e){return _(e)||""}),e.abrupt("return",b.createTextNode(a.join(" ")));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function S(){return S=(0,s.default)(o.default.mark(function e(t,r){var n,i,u;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=function(){return(u=(0,s.default)(o.default.mark(function e(){var i,s,c;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n.innerHTML="",!(0,g.isDeleted)(t)){e.next=1;break}return e.abrupt("return",n);case 1:return e.next=2,(0,g.allVersions)(t);case 2:if(i=e.sent,0!==(s=i.map(function(e){return m.store.each(null,l.schema("target"),e,r)}).flat()).length){e.next=3;break}return e.abrupt("return",n);case 3:(c=s.map(function(e){return[m.store.any(e,l.rdf("type"),null,r),m.store.any(e,l.sioc("content"),null,r),m.store.any(e,l.schema("agent"),null,r)]})).sort(),c.forEach(function(e){var t,r=(0,a.default)(e,3),i=r[0],o=r[1],s=r[2];s?(t=b.createElement("a")).setAttribute("href",s.uri):t=b.createTextNode(""),t.textContent=o||w[i]||"⬜️",n.appendChild(t)});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)},i=function(){return u.apply(this,arguments)},n=b.createElement("span"),i().then(c.log("sentimentStripLinked: sentimentStripLinked async refreshed")),n.refresh=i,e.abrupt("return",n);case 1:case"end":return e.stop()}},e)})),S.apply(this,arguments)}function A(){return A=(0,s.default)(o.default.mark(function e(t,r,n,i){var a,y,w,x,_,E,S,A,k,C,T,I,F,P,N,O,R,j,L;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return I=function(e,t,n,i,a,c){function u(){g.style.backgroundColor=h?"yellow":"white"}var h,g=f.button(b,n,p.label(i),function(){var n=(0,s.default)(o.default.mark(function n(s){var p,g,y,b;return o.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!h){n.next=2;break}return n.next=1,k(h);case 1:h=null,u(),n.next=8;break;case 2:return h=f.newThing(a),p=[d.st(h,l.schema("agent"),e.me,a),d.st(h,l.rdf("type"),i,a),d.st(h,l.schema("target"),t,a)],n.next=3,m.store.updater.update([],p);case 3:if(u(),!c){n.next=8;break}g=!1,y=0;case 4:if(!(y<c.length)){n.next=7;break}if(!(b=v(c[y]))){n.next=6;break}return n.next=5,k(b);case 5:g=!0;case 6:y++,n.next=4;break;case 7:g&&f.refreshTree(r);case 8:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}());function v(r){var n=m.store.each(null,l.schema("agent"),e.me,a).filter(function(e){return m.store.holds(e,l.rdf("type"),r,a)}).filter(function(e){return m.store.holds(e,l.schema("target"),t,a)});return n.length?n[0]:null}function y(){h=v(i),u()}return g.refresh=y,y(),g},C=function(){return(C=(0,s.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,m.store.updater.update(m.store.connectedStatements(t),[]);case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)},k=function(e){return C.apply(this,arguments)},A=function(){S.parentElement.parentElement.removeChild(S.parentElement)},E=function(){return(E=(0,s.default)(o.default.mark(function e(){var r,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,i.createThread(t);case 1:if(r=e.sent,a=n.chatOptions){e.next=2;break}throw new Error("replyInThread: missing options");case 2:a.showThread(r,a),A();case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)},_=function(){return E.apply(this,arguments)},x=function(){return x=(0,s.default)(o.default.mark(function e(r){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(T.value!==m.store.any(t,l.foaf("maker")).value){e.next=1;break}return A(),e.next=1,(0,v.switchToEditor)(r,t,i,n);case 1:case"end":return e.stop()}},e)})),x.apply(this,arguments)},w=function(e){return x.apply(this,arguments)},y=function(){return(y=(0,s.default)(o.default.mark(function e(){var a,s,u;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=m.store.any(t,l.foaf("maker")),T){e.next=1;break}alert("You can't delete the message, you are not logged in."),e.next=7;break;case 1:if(!T.sameTerm(a)){e.next=6;break}return e.prev=2,e.next=3,i.deleteMessage(t);case 3:e.next=5;break;case 4:e.prev=4,u=e.catch(2),s="Error deleting messaage "+u,c.warn(s),alert(s),(n.statusArea||r.parentNode).appendChild(f.errorMessageBlock(b,s));case 5:r.parentNode.removeChild(r),e.next=7;break;case 6:alert("You can't delete the message, you are not logged in as the author, "+a);case 7:A();case 8:case"end":return e.stop()}},e,null,[[2,4]])}))).apply(this,arguments)},a=function(){return y.apply(this,arguments)},S=b.createElement("div"),e.next=1,(0,g.mostRecentVersion)(t).value;case 1:if(N=e.sent,O=l.schema("dateDeleted").value,N!==O){e.next=2;break}return e.abrupt("return",S);case 2:if((T=m.authn.currentUser())&&m.store.holds(t,l.foaf("maker"),T)&&(S.appendChild(f.deleteButtonWithCheck(b,S,"message",a)),S.appendChild(f.button(b,u.icons.iconBase+"noun_253504.svg","edit",function(){return w(r)}))),(0,h.renderBookmarksButton)(n).then(function(e){e&&S.appendChild(e)}),T=m.authn.currentUser(),!(R=T)){e.next=4;break}return e.next=3,(0,g.mostRecentVersion)(t).value;case 3:j=e.sent,L=l.schema("dateDeleted").value,R=j!==L;case 4:if(!R){e.next=5;break}F={me:T,dom:b,div:S},S.appendChild(I(F,t,u.icons.iconBase+"noun_1384132.svg",l.schema("AgreeAction"),t.doc(),[l.schema("DisagreeAction")])),S.appendChild(I(F,t,u.icons.iconBase+"noun_1384135.svg",l.schema("DisagreeAction"),t.doc(),[l.schema("AgreeAction")]));case 5:return m.store.any(t,l.dct("created"))&&S.appendChild(f.button(b,u.icons.iconBase+"noun-reply-5506924.svg","Reply in thread",(0,s.default)(o.default.mark(function e(){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,_();case 1:case"end":return e.stop()}},e)})))),(P=S.appendChild(f.cancelButton(b))).style.float="right",P.firstChild.style.opacity="0.3",P.addEventListener("click",A),e.abrupt("return",S);case 6:case"end":return e.stop()}},e)})),A.apply(this,arguments)}w[l.schema("AgreeAction")]="👍",w[l.schema("DisagreeAction")]="👎",w[l.schema("EndorseAction")]="⭐️",w[l.schema("LikeAction")]="❤️"},9615:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const n=r(9175);class i extends n.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.ahash)(e);const r=(0,n.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(r.length>i?e.create().update(r).digest():r);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),(0,n.clean)(o)}update(e){return(0,n.aexists)(this),this.iHash.update(e),this}digestInto(e){(0,n.aexists)(this),(0,n.abytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:a}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=i,t.hmac=(e,t,r)=>new i(e,t).update(r).digest(),t.hmac.create=(e,t)=>new i(e,t)},9646:(e,t,r)=>{var n=r(7550),i=r(5636);e.exports=function(e,t,r){if(n())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var a=new(e.bind.apply(e,o));return r&&i(a,r.prototype),a},e.exports.__esModule=!0,e.exports.default=e.exports},9654:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.style=void 0;var r=t.style={multiselect__container:"\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n background-color: #fff;\n border-radius: 2px;\n -webkit-box-shadow: 0 1px 3px 0 #d1d1d2, 0 0 0 1px #d1d1d2;\n box-shadow: 0 1px 3px 0 #d1d1d2, 0 0 0 1px #d1d1d2;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n min-height: 36px;\n padding: 4px 8px 0 8px;\n position: relative;\n width: 354px;\n margin-bottom: 5px;\n font-size: 100%\n ",multiselect__wrapper:"\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n height: 100%;\n width: 100%;\n ",multiselect__clear_btn:"\n cursor: pointer;\n align-items: center;\n margin-bottom: 4px;\n margin-left: 4px;\n ",multiselect__options:"\n background-color: #f6f6f6;\n border-radius: 2px;\n left: 0;\n max-height: 0;\n overflow: hidden;\n position: absolute;\n top: calc(100% + 3px);\n z-index: 9999;\n width: 100%;\n opacity: 0;\n transition: max-height 0.1s ease;\n ",multiselect__options_visible:"\n background-color: #f6f6f6;\n border-radius: 2px;\n left: 0;\n max-height: 0;\n overflow: hidden;\n position: absolute;\n top: calc(100% + 3px);\n z-index: 9999;\n width: 100%;\n opacity: 0;\n transition: max-height 0.1s ease;\n max-height: 200px;\n -webkit-box-shadow: 0 1px 3px 0 #d1d1d2, 0 0 0 1px #d1d1d2;\n box-shadow: 0 1px 3px 0 #d1d1d2, 0 0 0 1px #d1d1d2;\n opacity: 1;\n transition: max-height 0.2s ease;\n ",multiselect__options_ul:"\n list-style: none;\n margin: 0;\n padding: 2px 0;\n max-height: 200px;\n overflow: auto;\n ",multiselect__options_ul_li:"\n cursor: pointer;\n padding: 4px 8px;\n ",multiselect__options_ul_li_hover:"\n background-color: #dedede;\n ",multiselect__options_ul_p_multiselect__options_no_results:"\n margin: 0;\n padding: 8px;\n text-align: center;\n ",multiselect__options_ul_p_multiselect__options_no_data:"\n margin: 0;\n padding: 8px;\n text-align: center;\n ",multiselect__options_ul_li_multiselect__options_selected:"\n background-color: #656565;\n color: #fff;\n ",multiselect__options_ul_li_multiselect__options_selected_hover:"\n background-color: #656565;\n ",multiselect__options_ul_li_arrow_selected:"\n border: 2px solid rgba(101, 101, 101, 0.5);\n ",multiselect__selected:"\n background-color: #656565;\n border-radius: 2px;\n color: #fff;\n margin-bottom: 4px;\n margin-right: 4px;\n padding: 4px 8px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n ",multiselect__selected_multiselect__remove_btn:"\n cursor: pointer;\n display: flex;\n margin-left: 6px;\n ",multiselect__input:"\n border: none;\n -ms-flex-preferred-size: 40%;\n flex-basis: 40%;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n height: 5px; \n margin-bottom: 4px;\n min-width: 40%;\n outline: none; \n "};r.setStyle=function(e,t){e.style=r[t]},e.exports=r},9676:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),a=0;a<r.length;a++)"default"!==r[a]&&i(t,e,r[a]);return o(t,e),t}),s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},c=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.createProfileLogic=function(e,t,r){var n=d.ns;function i(t){return s(this,void 0,void 0,function(){var i,a,s,d,f,h;return c(this,function(c){switch(c.label){case 0:return[4,o(t)];case 1:c.sent(),i=(0,p.suggestPreferencesFile)(t),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,r.followOrCreateLink(t,n.space("preferencesFile"),i,t.doc())];case 3:return a=c.sent(),[3,5];case 4:if(s=c.sent(),d="User ".concat(t," has no pointer in profile to preferences file."),l.warn(d),s instanceof u.NotEditableError)throw s;if(s instanceof u.WebOperationError)throw s;if(s instanceof u.UnauthorizedError)throw s;if(s instanceof u.CrossOriginForbiddenError)throw s;if(s instanceof u.SameOriginForbiddenError)throw s;if(s instanceof u.FetchError)throw s;throw s;case 5:return c.trys.push([5,7,,8]),[4,e.fetcher.load(a)];case 6:return c.sent(),[3,8];case 7:if(f=c.sent(),h="Unable to load preference of user ".concat(t,": ").concat(f),l.warn(h),401===f.response.status)throw new u.UnauthorizedError;if(403===f.response.status){if((0,p.differentOrigin)(a))throw new u.CrossOriginForbiddenError;throw new u.SameOriginForbiddenError}throw new Error(h);case 8:return[2,a]}})})}function o(t){return s(this,void 0,void 0,function(){var r;return c(this,function(n){switch(n.label){case 0:if(!t)throw new Error("loadProfile: no user given.");n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.fetcher.load(t.doc())];case 2:return n.sent(),[3,4];case 3:throw r=n.sent(),new Error("Unable to load profile of user ".concat(t,": ").concat(r));case 4:return[2,t.doc()]}})})}function a(t){return e.any(t,n.space("storage"),void 0,t.doc())}return{loadMe:function(){return s(this,void 0,void 0,function(){var r;return c(this,function(n){switch(n.label){case 0:if(null===(r=t.currentUser()))throw new Error("Current user not found! Not logged in?");return[4,e.fetcher.load(r.doc())];case 1:return n.sent(),[2,r]}})})},getPodRoot:function(e){var t=a(e);if(!t)throw new Error("User pod root not found!");return t},getMainInbox:function(t){return s(this,void 0,void 0,function(){var r;return c(this,function(i){switch(i.label){case 0:return[4,e.fetcher.load(t)];case 1:if(i.sent(),!(r=e.any(t,n.ldp("inbox"),void 0,t.doc())))throw new Error("User main inbox not found!");return[2,r]}})})},findStorage:a,loadPreferences:i,loadProfile:o,silencedLoadPreferences:function(e){return s(this,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,i(e)];case 1:return[2,t.sent()];case 2:return t.sent(),[2,void 0];case 3:return[2]}})})}}};var u=r(1033),l=a(r(8339)),d=r(733),p=r(9013)},9746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6697);t.default=function(e){return"string"==typeof e&&n.default.test(e)}},9755:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(4705),i=r(8936),o=r(9403),a=r(3078);const s=new a.A;class c{constructor(e,t,r,o){(0,n.A)(this,"subject",void 0),(0,n.A)(this,"predicate",void 0),(0,n.A)(this,"object",void 0),(0,n.A)(this,"graph",void 0),this.subject=i.A.fromValue(e),this.predicate=i.A.fromValue(t),this.object=i.A.fromValue(r),this.graph=null==o?s:i.A.fromValue(o)}get why(){return this.graph}set why(e){this.graph=e}equals(e){return e.subject.equals(this.subject)&&e.predicate.equals(this.predicate)&&e.object.equals(this.object)&&e.graph.equals(this.graph)}substitute(e){return new c(this.subject.substitute(e),this.predicate.substitute(e),this.object.substitute(e),(0,a.U)(this.graph)?this.graph:this.graph.substitute(e))}toCanonical(){let e=[this.subject.toCanonical(),this.predicate.toCanonical(),this.object.toCanonical()];return this.graph&&this.graph.termType!==o.ic&&e.push(this.graph.toCanonical()),e.join(" ")+" ."}toNT(){return[this.subject.toNT(),this.predicate.toNT(),this.object.toNT()].join(" ")+" ."}toNQ(){return[this.subject.toNT(),this.predicate.toNT(),this.object.toNT(),(0,a.U)(this.graph)?"":this.graph.toNT()].join(" ")+" ."}toString(){return this.toNT()}}},9803:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(7493),i=r(9095),o=r(2222),a=r(6957),s=r(149);const c=e=>e.toLowerCase().replace(/^application\//,""),u=(e,t,r={})=>{let u;try{u=JSON.parse(i.D0.decode(t))}catch{}if(!(0,s.A)(u))throw new n.JWTInvalid("JWT Claims Set must be a top-level JSON object");const{typ:l}=r;if(l&&("string"!=typeof e.typ||c(e.typ)!==c(l)))throw new n.JWTClaimValidationFailed('unexpected "typ" JWT header value',u,"typ","check_failed");const{requiredClaims:d=[],issuer:p,subject:f,audience:h,maxTokenAge:m}=r,g=[...d];void 0!==m&&g.push("iat"),void 0!==h&&g.push("aud"),void 0!==f&&g.push("sub"),void 0!==p&&g.push("iss");for(const e of new Set(g.reverse()))if(!(e in u))throw new n.JWTClaimValidationFailed(`missing required "${e}" claim`,u,e,"missing");if(p&&!(Array.isArray(p)?p:[p]).includes(u.iss))throw new n.JWTClaimValidationFailed('unexpected "iss" claim value',u,"iss","check_failed");if(f&&u.sub!==f)throw new n.JWTClaimValidationFailed('unexpected "sub" claim value',u,"sub","check_failed");if(h&&(y="string"==typeof h?[h]:h,!("string"==typeof(v=u.aud)?y.includes(v):Array.isArray(v)&&y.some(Set.prototype.has.bind(new Set(v))))))throw new n.JWTClaimValidationFailed('unexpected "aud" claim value',u,"aud","check_failed");var v,y;let b;switch(typeof r.clockTolerance){case"string":b=(0,a.A)(r.clockTolerance);break;case"number":b=r.clockTolerance;break;case"undefined":b=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:w}=r,x=(0,o.A)(w||new Date);if((void 0!==u.iat||m)&&"number"!=typeof u.iat)throw new n.JWTClaimValidationFailed('"iat" claim must be a number',u,"iat","invalid");if(void 0!==u.nbf){if("number"!=typeof u.nbf)throw new n.JWTClaimValidationFailed('"nbf" claim must be a number',u,"nbf","invalid");if(u.nbf>x+b)throw new n.JWTClaimValidationFailed('"nbf" claim timestamp check failed',u,"nbf","check_failed")}if(void 0!==u.exp){if("number"!=typeof u.exp)throw new n.JWTClaimValidationFailed('"exp" claim must be a number',u,"exp","invalid");if(u.exp<=x-b)throw new n.JWTExpired('"exp" claim timestamp check failed',u,"exp","check_failed")}if(m){const e=x-u.iat;if(e-b>("number"==typeof m?m:(0,a.A)(m)))throw new n.JWTExpired('"iat" claim timestamp check failed (too far in the past)',u,"iat","check_failed");if(e<0-b)throw new n.JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)',u,"iat","check_failed")}return u}},9814:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(3476),i=r(437),o=r(9403),a=r(7037),s=r(2915),c=r(6320);const u={...i.A,supports:{[a.X.collections]:!0,[a.X.defaultGraphType]:!1,[a.X.equalsMethod]:!0,[a.X.identity]:!1,[a.X.id]:!0,[a.X.reversibleId]:!1,[a.X.variableType]:!0},collection:e=>new n.A(e),id(e){return(0,s.P3)(e)?`( ${e.elements.map(e=>this.id(e)).join(", ")} )`:(0,s.DZ)(e)?c.A.toString(e):i.A.id(e)},termToNQ:e=>e.termType===o.r0?n.A.toNT(e):i.A.termToNQ(e)}},9874:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let r;for(const e of t){const t=Object.keys(e);if(r&&0!==r.size)for(const e of t){if(r.has(e))return!1;r.add(e)}else r=new Set(t)}return!0}},9922:(e,t,r)=>{"use strict";var n=r(4994),i=r(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.ACLToString=function(e){return x(y(e))},t.ACLbyCombination=y,t.ACLunion=g,t.adoptACLDefault=function(e,t,r,n){var i=s.acl,o="/"===e.uri.slice(-1),a=f.each(void 0,i("default"),r,n).concat(f.each(void 0,i("defaultForNew"),r,n)).reduce(function(t,r){return t.concat(f.statementsMatching(r,s.rdf("type"),i("Authorization"),n)).concat(f.statementsMatching(r,i("agent"),void 0,n)).concat(f.statementsMatching(r,i("agentClass"),void 0,n)).concat(f.statementsMatching(r,i("agentGroup"),void 0,n)).concat(f.statementsMatching(r,i("origin"),void 0,n)).concat(f.statementsMatching(r,i("originClass"),void 0,n)).concat(f.statementsMatching(r,i("mode"),void 0,n)).concat((0,d.st)(r,i("accessTo"),e,n)).concat(o?(0,d.st)(r,i("default"),e,n):[])},[]),c=(0,d.graph)();return a.forEach(function(e){return c.add(u(e.subject),u(e.predicate),u(e.object),(0,d.sym)(t.uri))}),c;function u(e){var r=n.uri.length;return(0,d.sym)(e.uri.slice(0,r)===n.uri?t.uri+e.uri.slice(r):e.uri)}},t.comboToString=x,t.fixIndividualACL=S,t.fixIndividualCardACL=function(e,t,r){var n=f.each(void 0,s.vcard("hasMember"),e);n?S(e,n,t,r):(t("This card is in no groups"),r(!0))},t.getACL=k,t.getACLorDefault=A,t.getProspectiveHolder=function(e){return C.apply(this,arguments)},t.loadUnionACL=v,t.makeACLGraph=b,t.makeACLGraphbyCombo=w,t.makeACLString=function(e,t,r){var n=(0,d.graph)();return b(n,e,t,r),(0,d.serialize)(r,n,r.uri,"text/turtle")||""},t.putACLObject=_,t.putACLbyCombo=E,t.readACL=h,t.sameACL=m,t.setACL=function(e,t,r){var n=f.any(e,c.ACL_LINK);if(!f.fetcher)throw new Error("Store has no fetcher");n?f.fetcher.webOperation("PUT",n.value,{data:t,contentType:"text/turtle"}).then(function(e){r(e.ok,e.error||"")}):f.fetcher.nowOrWhenFetched(e,void 0,function(n,i){if(!n)return r(n,"Gettting headers for ACL: "+i);var o=f.any(e,c.ACL_LINK);if(o){if(!f.fetcher)throw new Error("Store has no fetcher");f.fetcher.webOperation("PUT",o.value,{data:t,contentType:"text/turtle"}).then(function(e){r(e.ok,e.error||"")})}else r(!1,"No Link rel=ACL header for "+e)})};var o=n(r(4756)),a=n(r(9293)),s=p(r(2054)),c=r(3451),u=p(r(7499)),l=p(r(2902)),d=r(2209);function p(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(p=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return s;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,s)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?o(s,c,a):s[c]=e[c]);return s})(e,t)}var f=c.solidLogicSingleton.store;function h(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?function(t,r){return t.each(void 0,r.acl("default"),e).concat(t.each(void 0,r.acl("defaultForNew"),e))}(r,s):r.each(void 0,s.acl("accessTo"),e),i=s.acl,o={agent:{},agentClass:{},agentGroup:{},origin:{},originClass:{}};return Object.keys(o).forEach(function(e){n.forEach(function(t){r.each(t,i("mode")).forEach(function(n){r.each(t,i(e)).forEach(function(r){o[e][r.uri]=o[e][r.uri]||{},o[e][r.uri][n.uri]=t})})})}),o}function m(e,t){var r=function(e,t){for(var r in{agent:!0,agentClass:!0,agentGroup:!0,origin:!0,originClass:!0})if(e[r])for(var n in e[r])for(var i in e[r][n])if(!t[r][n]||!t[r][n][i])return!1;return!0};return r(e,t)&&r(t,e)}function g(e){for(var t,r,n=e[0],i=function(i){["agent","agentClass","agentGroup","origin","originClass"].forEach(function(o){if((t=e[i])[o])for(r in t[o])for(var a in t[o][r])n[o][r]||(n[o][r]=[]),n[o][r][a]=!0})},o=1;o<e.length;o++)i(o);return n}function v(e,t){var r=[],n=function(e){e.length?A(e.shift().doc(),function(i,o,a,s,c,u){var l=!o;if(!i||!c||!u)return t(i,s);var d=l?h(c,u):h(a,s);r.push(d),n(e.slice(1))}):t(!0,g(r))};n(e)}function y(e){var t={};return["agent","agentClass","agentGroup","origin","originClass"].forEach(function(r){for(var n in e[r]){var i=[];for(var o in e[r][n])i.push(o);i.sort();var a=i.join("\n");t[a]||(t[a]=[]),t[a].push([r,n])}}),t}function b(e,t,r,n){return w(e,t,y(r),n)}function w(e,t,r,n,i,o){var a=s.acl;for(var c in r){var u=r[c];if(u.length){var l=c.split("\n"),d=l.map(function(e){return e.split("#")[1]}).join("");o&&!i&&(d+="Default");var p=e.sym(n.uri+"#"+d);e.add(p,s.rdf("type"),a("Authorization"),n),i&&e.add(p,a("accessTo"),t,n),o&&e.add(p,a("default"),t,n);for(var f=0;f<l.length;f++)e.add(p,a("mode"),e.sym(l[f]),n);for(var h=0;h<u.length;h++){var m=u[h][0],g=u[h][1];e.add(p,a(m),e.sym(g),n)}}}}function x(e){var t="";for(var r in e){t+=r.split("\n").map(function(e){return e.split("#")[1][0]}).join("")+":";for(var n=e[r],i=0;i<n.length;i++){var o=n[i][0],a=(0,d.sym)(n[i][1]);t+="agent"===o?"@":"",t+=a.sameTerm(s.foaf("Agent"))?"*":u.label(a),i<n.length-1&&(t+=",")}t+=";"}return"{"+t.slice(0,-1)+"}"}function _(e,t,r,n,i){return E(e,t,y(r),n,i)}function E(e,t,r,n,i){var o,a=(0,d.graph)();w(a,t,r,n,!0),null===(o=e.updater)||void 0===o||o.put(n,a.statementsMatching(void 0,void 0,void 0,n),"text/turtle",function(o,a,s){var c;a?(null===(c=e.fetcher)||void 0===c||c.unload(n),w(e,t,r,n,!0),e.fetcher.requested[n.uri]="done",i(a)):i(a,s)})}function S(e,t,r,n){r=r||l.log;var i=e.doc();A(i,function(o,a,s,c,l,d){if(!o||!l||!d)return n(!1,c);var p=a?h(s,c):h(l,d);v(t,function(t,o){if(!t)return n(!1,o);m(o,p)?r("Nice - same ACL. no change "+u.label(e)+" "+i):(r("Group ACLs differ for "+u.label(e)+" "+i),_(f,s,o,c,n))})})}function A(e,t){k(e,function(r,n,i,o){var a=s.acl;if(!r)return t(!1,!1,n,o);var c=function(r){"/"===r.slice(-1)&&(r=r.slice(0,-1));var n=r.lastIndexOf("/");if(r.indexOf("/",r.indexOf("//")+2)>n)return t(!1,!0,404,"Found no ACL resource");r=r.slice(0,n+1);var o=(0,d.sym)(r);k(o,function(n,s,u){if(!n)return t(!1,!0,s,"( No ACL pointer ".concat(r," ").concat(s,")").concat(u));if(403===s)return t(!1,!0,s,"( default ACL file FORBIDDEN. Stop.".concat(r,")"));if(404===s)return c(r);if(200!==s)return t(!1,!0,s,"Error status '".concat(s,"' searching for default for ").concat(o));if(!f.each(void 0,a("default"),f.sym(r),u).concat(f.each(void 0,a("defaultForNew"),f.sym(r),u)).length)return c(r);var l=f.sym(r);return t(!0,!1,e,i,l,u)})};return r?404!==n?403===n?t(!1,!1,n,"(Sharing not available to you)".concat(o)):200!==n?t(!1,!1,n,"Error ".concat(n," accessing Access Control information for ").concat(e,": ").concat(o)):t(!0,!0,e,i):void c(e.uri):t(!1,!1,n,"Error accessing Access Control information for ".concat(e,") ").concat(o))})}function k(e,t){if(!f.fetcher)throw new Error("kb has no fetcher");f.fetcher.nowOrWhenFetched(e,void 0,function(r,n){if(!r)return t(r,"Can't get headers to find ACL for ".concat(e,": ").concat(n));var i=f.any(e,c.ACL_LINK);if(i){if(!f.fetcher)throw new Error("kb has no fetcher");if(f.fetcher.nonexistent[i.value])return t(!0,404,i,"ACL file ".concat(i," does not exist."));f.fetcher.nowOrWhenFetched(i,void 0,function(e,r,n){e?t(!0,200,i):t(!0,n.status,i,"Can't read Access Control File ".concat(i,": ").concat(r))})}else t(!1,900,"No Link rel=ACL header for ".concat(e))})}function C(){return(C=(0,a.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){return A((0,d.sym)(t),function(n,i,o,a,s){return n?e(i?o:s):r(new Error("Error loading ".concat(t)))})}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={id:e,loaded:!1,exports:{}};return i[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=i,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var i=Object.create(null);a.r(i);var o={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&r;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>o[e]=()=>r[e]);return o.default=()=>r,a.d(i,o),i},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,r)=>(a.f[r](e,t),t),[])),a.u=e=>e+".meetingPane.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},n="MeetingPane:",a.l=(e,t,i,o)=>{if(r[e])r[e].push(t);else{var s,c;if(void 0!==i)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var d=u[l];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==n+i){s=d;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",n+i),s.src=e),r[e]=[t];var p=(t,n)=>{s.onerror=s.onload=null,clearTimeout(f);var i=r[e];if(delete r[e],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach(e=>e(n)),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),c&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{var e={792:0};a.f.j=(t,r)=>{var n=a.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise((r,i)=>n=e[t]=[r,i]);r.push(n[2]=i);var o=a.p+a.u(t),s=new Error;a.l(o,r=>{if(a.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",s.name="ChunkLoadError",s.type=i,s.request=o,n[1](s)}},"chunk-"+t,t)}};var t=(t,r)=>{var n,i,[o,s,c]=r,u=0;if(o.some(t=>0!==e[t])){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);c&&c(a)}for(t&&t(r);u<o.length;u++)i=o[u],a.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=this.webpackChunkMeetingPane=this.webpackChunkMeetingPane||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var s={};return(()=>{"use strict";a.r(s),a.d(s,{default:()=>d});var e=a(3451),t=a(2361),r=a(3476),n=a(8616),i=a(2209),o=a(5796),c=a(4478),u=a.n(c);const l=t.ns,d={icon:t.icons.iconBase+"noun_66617.svg",name:"meeting",audience:[l.solid("PowerUser")],label:function(e,r){const n=r.session.store,i=t.ns;return n.holds(e,i.rdf("type"),i.meeting("Meeting"))?"Meeting":null},mintClass:t.ns.meeting("Meeting"),mintNew:function(i,o){return new Promise(function(a,s){const c=i.session.store,u=t.ns;o.newInstance=o.newInstance||c.sym(o.newBase+"index.ttl#this");const l=o.newInstance,d=l.doc(),p=e.authn.currentUser();p&&c.add(l,u.dc("author"),p,d),c.add(l,u.rdf("type"),u.meeting("Meeting"),d),c.add(l,u.dc("created"),new Date,d),c.add(l,u.ui("backgroundColor"),new n.A("#ddddcc",void 0,u.xsd("color")),d);const f=new r.A;c.add(l,u.meeting("toolList"),f,d),f.elements.push(l),c.updater.put(d,c.statementsMatching(void 0,void 0,void 0,d),"text/turtle",function(e,t,r){t?a(o):s(new Error("Error writing meeting configuration: "+r))})})},render:function(r,n){const a=n.dom,s=n.session.store,c=t.ns,l=s.updater,d=this,p=function(e,t){console.log(e);const r=a.createElement("pre");r.setAttribute("style","background-color: "+t||0),v.appendChild(r),r.appendChild(a.createTextNode(e))},f=function(e,t){e||p(t)},h=r,m=r.doc(),g=r.dir().uri,v=a.createElement("div"),y=v.appendChild(a.createElement("table"));y.style="width: 100%; height: 100%; margin:0;";const b=y.appendChild(a.createElement("tr"));b.appendChild(a.createElement("div"));const w=y.appendChild(a.createElement("tr")),x=y.appendChild(a.createElement("td")).appendChild(a.createElement("table")).appendChild(a.createElement("tr"));b.setAttribute("style","height: 2em;");let _=null;const E=function(){l.put(m,s.statementsMatching(void 0,void 0,void 0,m),"text/turtle",function(e,t,r){t?($.refresh(),K()):p(r="FAILED to save new thing at: "+m+" : "+r)})},S=function(e,t,r){const n=t.doc();r&&s.add(h,r,t,n),s.add(t,c.meeting("parentMeeting"),h,n),l.put(n,s.statementsMatching(void 0,void 0,void 0,n),"text/turtle",function(e,r,n){r?E():p("FAILED to save new tool at: "+t+" : "+n)})},A=function(e,r,n,i){r&&s.add(h,r,e,m);const o=t.widgets.newThing(m);return n&&s.add(o,c.rdfs("label"),n,m),i&&s.add(o,c.meeting("icon"),s.sym(i),m),s.add(o,c.rdf("type"),c.meeting("Tool"),m),s.add(o,c.meeting("target"),e,m),s.the(h,c.meeting("toolList")).elements.push(o),o};function k(e){const t=/https:\/\/www\.google\..*\/maps\//,r="https://www.google.com/maps/embed/v1/",n=e.uri;if(!n.match(t))return e;if(n.startsWith(r))return e;const o=n.replace(t,r)+"&key=AIzaSyB8aaT6bY9tcLCmc2oPCkdUYLmTOWM8R54";return console.log("Converted Google Map URI! "+o),i.sym(o)}const C=function(e){Promise.all(e.map(function(e){return function(e){return new Promise(function(o){console.log("Dropped on thing "+e);const a=e.uri;if(a.startsWith("http:")&&a.indexOf("#")<0)return function(e){const t=c.wf("attachment");s.add(r,t,e,r.doc()),N({icon:"noun_160581.svg",limit:1,shareTab:!0},{newInstance:r,pane:n.session.paneRegistry.byName("link"),predicate:c.meeting("attachmentTool"),tabTitle:"Links",view:"link",noIndexHTML:!0})}(e),o(e);s.fetcher.nowOrWhenFetched(e,function(r,n){function u(e){e=k(e),console.log("make web page attachement tab "+e);const r=A(e,t.ns.wf("attachment"),t.utils.label(e),null);return s.add(r,t.ns.meeting("view"),"iframe",m),o(e)}if(r){const r=e,n=s.findTypeURIs(r);for(const e in n)console.log(" drop object type includes: "+e);if(c.vcard("Individual").uri in n||c.foaf("Person").uri in n||c.foaf("Agent").uri in n)return function(e){const r=s.any(e,c.foaf("preferredURI")),n=r?s.sym(r):e,o=s.any(h,c.meeting("attendeeGroup")),a=function(e,r){const n=[i.st(r,t.ns.vcard("hasMember"),e,r.doc())],o=s.any(e,c.vcard("fn"))||s.any(e,c.foaf("name"));o&&n.push(i.st(e,t.ns.vcard("fn"),o,r.doc())),s.fetcher.nowOrWhenFetched(r.doc(),void 0,function(t,i){t?s.updater.update([],n,function(t,r,n){f(r,n),r&&console.log("Addded to particpants OK: "+e)}):p("Can't read group to add person"+r)})};o?a(n,o):P().then(function(e){const t=e.newInstance;a(n,t),s.fetcher.putBack(m,{contentType:"text/turtle"}).then(function(e){console.log("Particiants Group created: "+t)})}).catch(function(e){p(e)})}(e),o(e);if(a.startsWith("https:")&&a.indexOf("#")<0){const r=s.fetcher.getHeader(e,"x-frame-options");let n=!0;if(r)for(let e=0;e<r.length;e++)console.log("x-frame-options: "+r[e]),r[e].indexOf("sameorigin")<0&&(n=!1),r[e].indexOf("deny")<0&&(n=!1);if(n)return function(e){const r=A(e,t.ns.wf("attachment"),t.utils.label(e),null);s.add(r,t.ns.meeting("view"),"iframe",m)}(e=k(e)),o(e)}return console.log("Default: assume web page attachement "+e),u(e)}return console.log("Error looking up dropped thing, will just add it anyway. "+e+": "+n),u(e)})})}(i.sym(e))})).then(function(e){E()})},T=function(e){t.widgets.uploadFiles(s.fetcher,e,h.dir().uri+"Files",h.dir().uri+"Pictures",function(e,t){e.type.startsWith("image/")?I("Files"):F("Pictures")})},I=function(e){return N({icon:"noun_598334.svg",limit:1,shareTab:!0},{newInstance:s.sym(h.dir().uri+e+"/"),pane:n.session.paneRegistry.byName("folder"),predicate:c.meeting("pictures"),shareTab:!0,tabTitle:e,view:"slideshow",noIndexHTML:!0})},F=function(e){return N({icon:"noun_681601.svg",limit:1,shareTab:!0},{newInstance:s.sym(h.dir().uri+"Files/"),pane:n.session.paneRegistry.byName("folder"),predicate:c.meeting("materialsFolder"),tabTitle:"Materials",noIndexHTML:!0})},P=function(){return N({icon:"noun_339237.svg",limit:1,shareTab:!0},{newInstance:s.sym(h.dir().uri+"Attendees/index.ttl#this"),pane:n.session.paneRegistry.byName("contact"),predicate:c.meeting("attendeeGroup"),tabTitle:"Attendees",instanceClass:c.vcard("Group"),instanceName:t.utils.label(r)+" attendees",noIndexHTML:!0})};function N(e,r){return new Promise(function(i,o){const a=n.session.store;if(!r.useExisting){const n=a.any(h,r.predicate);if(n){if(e.limit&&1===e.limit&&!e.shareTab)return p("Already have "+n+" as "+t.utils.label(r.predicate)),p("Cant have two"),i(null);if(e.shareTab)return console.log("Using existing "+n+" as "+t.utils.label(r.predicate)),i({me:_,newInstance:n,instanceClass:r.instanceClass})}}_||r.me||o(new Error("Username not defined for new tool")),r.me=r.me||_,r.newInstance=r.useExisting||r.newInstance||a.sym(r.newBase+"index.ttl#this"),r.pane.mintNew(n,r).then(function(e){const r=A(e.newInstance,e.predicate,e.tabTitle,e.pane.icon);e.view&&a.add(r,t.ns.meeting("view"),e.view,m),E(),a.fetcher.putBack(m,{contentType:"text/turtle"}).then(function(t){i(e)}).catch(function(e){o(e)})}).catch(function(e){p(e),o(e)})})}const O=function(){const e=t.login.selectWorkspace(a,{noun:"meeting"},function(r,i){d.mintNew(n,{newBase:i}).then(function(t){const r=t.newInstance;U.removeChild(e);const n=U.appendChild(a.createElement("p"));n.setAttribute("style","font-size: 140%;"),n.innerHTML="Your <a target='_blank' href='"+r.uri+"'><b>new meeting</b></a> is ready to be set up. <br/><br/><a target='_blank' href='"+r.uri+"'>Go to your new meeting.</a>"}).catch(function(r){U.removeChild(e),U.appendChild(t.widgets.errorMessageBlock(a,r))})});U.appendChild(e)},R=[{icon:"noun_339237.svg",maker:function(e){const r=g+"Group/",o=n.session.store;let a=o.any(h,c.meeting("particpants"));a||(a=i.sym(r+"index.ttl#this")),console.log("Participant group: "+a);const s=A(a,c.meeting("particpants"),"Particpants",t.icons.iconBase+"noun_339237.svg");o.add(s,t.ns.meeting("view"),"peoplePicker",m),E()},hint:"Make a group of people",limit:1},{icon:"noun_346777.svg",maker:function(e){return N(e,{useExisting:h,pane:n.session.paneRegistry.byName("schedule"),view:"schedule",tabTitle:"Schedule poll",noIndexHTML:!0})},hint:"Make a poll to schedule the meeting"},{icon:"noun_48218.svg",maker:function(e){},limit:1,hint:"Add an agenda list",disabled:!0},{icon:"noun_79217.svg",maker:function(e){return N(e,{newBase:g+"SharedNotes/",predicate:t.ns.meeting("sharedNotes"),tabTitle:"Shared Notes",pane:n.session.paneRegistry.byName("pad")})},hint:"Add a shared notepad"},{icon:"noun_346319.svg",maker:function(e){const r=g+"Chat/",i=n.session.store;if(i.holds(h,c.meeting("chat")))return void console.log("Ignored - already have chat");const o=i.sym(r+"chat.ttl");i.add(o,c.rdf("type"),c.meeting("Chat"),o),A(o,c.meeting("chat"),"Chat",t.icons.iconBase+"noun_346319.svg"),S(0,o,c.meeting("chat"))},limit:1,hint:"Add a chat channel for the meeting"},{icon:"noun_17020.svg",maker:function(e){const r=g+"Actions/",i=n.session.store;if(i.holds(h,c.meeting("actions")))return void console.log("Ignored - already have actions");const o=i.sym(r+"config.ttl"),a=i.sym(r+"config.ttl#this"),s=i.sym(r+"state.ttl");i.add(a,c.dc("title"),(i.anyValue(h,c.cal("summary"))||"Meeting ")+" actions",o),i.add(a,c.wf("issueClass"),c.wf("Task"),o),i.add(a,c.wf("initialState"),c.wf("Open"),o),i.add(a,c.wf("stateStore"),s,o),i.add(a,c.wf("assigneeClass"),c.foaf("Person"),o),i.add(a,c.rdf("type"),c.wf("Tracker"),o),i.add(a,c.rdf("type"),c.wf("Tracker"),o),A(a,c.meeting("actions"),"Actions",t.icons.iconBase+"noun_17020.svg"),S(0,a,c.meeting("actions"))},limit:1,hint:"Add a list of action items"},{icon:"noun_260227.svg",maker:function(e){const r=n.session.store,o=i.sym("https://meet.jit.si/"+t.utils.genUuid());if(r.holds(h,c.meeting("videoCallPage")))return void console.log("Ignored - already have a videoCallPage");r.add(o,c.rdf("type"),c.meeting("VideoCallPage"),m);const a=A(o,c.meeting("videoCallPage"),"Video call",t.icons.iconBase+"noun_260227.svg");r.add(a,c.meeting("view"),"iframe",m),E()},limit:1,hint:"Add a video call for the meeting"},{icon:"noun_25830.svg",maker:function(e){t.widgets.askName(a,s,U,c.log("uri"),t.ns.rdf("Resource")).then(function(e){if(!e)return K();const r=n.session.store,i=t.ns,o=r.sym(e),a=A(o,i.wf("attachment"),t.utils.label(o),null);r.add(a,i.meeting("view"),"iframe",m),E()}).catch(function(e){p("Error making new sub-meeting: "+e)})},hint:"Attach meeting materials",disabled:!1},{icon:"noun_123691.svg",maker:function(e){const r=n.session.store,i=t.ns,o=h.dir();if(e.limit&&1===e.limit&&r.holds(h,i.wf("sharingControl")))return void p("Ignored - already have "+t.utils.label(z.predicate));const a=A(o,i.wf("sharingControl"),"Sharing",t.icons.iconBase+"noun_123691.svg");r.add(a,i.meeting("view"),"sharing",m),E()},limit:1,hint:"Control Sharing",disabled:!1},{icon:"noun_66617.svg",maker:function(e){t.widgets.askName(a,s,U,c.foaf("name"),t.ns.meeting("Meeting")).then(function(r){if(!r)return K();const i=encodeURIComponent(r),o={newBase:g+i+"/",predicate:t.ns.meeting("subMeeting"),tabTitle:r,pane:n.session.paneRegistry.byName("meeting")};return N(e,o)}).catch(function(e){p("Error making new sub-meeting: "+e)})},hint:"Make a sub meeting",disabled:!1}],j=i.sym("https://solid.github.io/solid-panes/meeting/meetingDetailsForm.ttl#settings");o.A(u(),s,j.doc().uri,"text/turtle");const L="padding: 1em; width: 3em; height: 3em;",D=x.appendChild(a.createElement("td")),U=x.appendChild(a.createElement("td")),M=D.appendChild(a.createElement("img"));let B=!1;M.setAttribute("src",t.icons.iconBase+"noun_19460_green.svg"),M.setAttribute("style",L+"opacity: 50%;"),M.setAttribute("title","Add another tool to the meeting");const H=function(e){B=!B,M.setAttribute("style",L+(B?"background-color: yellow;":"")),V(B?"":"display: none;")};let q;e.authn.checkUser().then(e=>{if(e)return _=e,M.addEventListener("click",H),void M.setAttribute("style",L);q=t.login.loginStatusBox(a,e=>{e?(_=s.sym(e),U.removeChild(q),M.addEventListener("click",H),M.setAttribute("style",L)):(console.log("(Logged out)"),_=null)}),q.setAttribute("style","margin: 0.5em 1em;"),U.appendChild(q)});const W=[];for(let e=0;e<R.length;e++)(function(){const r=R[e],n=D.appendChild(a.createElement("img"));n.setAttribute("src",t.icons.iconBase+r.icon),n.setAttribute("style",L+"display: none;"),W.push(n),n.tool=r;const i=r.maker;r.disabled||n.addEventListener("click",function(e){J(n),i(r)})})();const V=function(e){for(let t=0;t<W.length;t++){let r=L+e;R[t].disabled&&(r+="opacity: 0.3;"),W[t].setAttribute("style",r)}},K=function(){V("display: none;"),M.setAttribute("style",L)},J=function(e){V("display: none;"),e.setAttribute("style",L+"background-color: yellow;")},z={dom:a};z.predicate=c.meeting("toolList"),z.subject=r,z.ordered=!0,z.orientation=1,z.renderMain=function(r,o){let u,l=null,d=null;r.innerHTML="";const f=function(e,t){e||(r.textContent=""+t)},g=function(){r.appendChild(a.createElement("h3")).textContent="Details of meeting";const n=i.sym("https://solid.github.io/solid-panes/meeting/meetingDetailsForm.ttl#main");t.widgets.appendForm(document,r,{},h,n,h.doc(),f),r.appendChild(function(){const e=a.createElement("div"),t=e.appendChild(a.createElement("p"));return t.setAttribute("style","margin: 0em; padding:3em; color: #888;"),t.textContent="Tip: Drag URL-bar icons of web pages into the tab bar on the left to add new meeting materials.",e}()),_=e.authn.currentUser(),_&&s.add(h,c.dc("author"),_,m);const o={noun:"meeting",me:_,statusArea:r,div:r,dom:a};t.login.registrationControl(o,h,c.meeting("Meeting")).then(function(e){console.log("Registration control finsished.")}),t.pad.manageParticipation(a,r,m,h,_,{});const u="height: 2em; width: 2em; margin:0.5em;",l=r.appendChild(a.createElement("div")),d=l.appendChild(a.createElement("img"));d.setAttribute("src",t.icons.iconBase+"noun_145978.svg"),d.setAttribute("title","Make a fresh new meeting"),d.addEventListener("click",O),d.setAttribute("style",u);const p=l.appendChild(a.createElement("a"));p.setAttribute("href","https://github.com/solid/solid-panes"),p.setAttribute("target","_blank");const g=p.appendChild(a.createElement("img"));g.setAttribute("src",t.icons.iconBase+"noun_368567.svg"),g.setAttribute("title","Fork me on github"),g.setAttribute("style",u+"opacity: 50%;")};if(s.holds(o,c.rdf("type"),c.meeting("Tool"))){const f=s.any(o,c.meeting("target"));if(f.sameTerm(h)&&!s.any(o,c.meeting("view")))g();else{let m=s.any(o,c.meeting("view"));m=m?m.value:null,"details"===m?g():"peoplePicker"===m?function(){const n={div:r,dom:a};r.appendChild(a.createElement("h4")).textContent="Meeting Participants";const o=function(e){const t=[i.st(h,c.meeting("particpantGroup"),e,h.doc())];s.updater.update([],t,function(t,r,n){r?d=e:p("Cant save participants group: "+n)})};d=s.any(h,c.meeting("particpantGroup")),e.createTypeIndexLogic.loadTypeIndexesFor(n).then(function(){const e={defaultNewGroupName:"Meeting Participants",selectedGroup:d};new t.widgets.PeoplePicker(n.div,n.index.private[0],o,e).render()})}():"iframe"===m?function(e){const t=r.appendChild(a.createElement("iframe"));t.setAttribute("src",e.uri),t.setAttribute("style","border: none; margin: 0; padding: 0; height: 100%; width: 100%;"),t.setAttribute("allow","microphone camera"),t.setAttribute("name","disable-x-frame-options"),r.style.padding=0}(f):(l=m?n.session.paneRegistry.byName(m):null,u=r.appendChild(a.createElement("table")),u.style.width="100%",n.getOutliner(a).GotoSubject(f,!0,l,!1,void 0,u))}}else o.sameTerm(h)?g():(!o.sameTerm(o.doc())||s.holds(o,t.ns.rdf("type"),t.ns.meeting("Chat"))||s.holds(o,t.ns.rdf("type"),t.ns.meeting("PaneView")))&&(u=r.appendChild(a.createElement("table")),n.getOutliner(a).GotoSubject(o,!0,void 0,!1,void 0,u))},z.renderTab=function(e,r){if(s.holds(r,c.rdf("type"),c.meeting("Tool"))){const n=s.any(r,c.meeting("target"));let i=s.any(r,c.rdfs("label"));i=i?i.value:t.utils.label(n);const o=e.appendChild(a.createElement("div"));o.textContent=i,o.setAttribute("style","margin-left: 0.7em");const u=s.any(r,c.meeting("icon"));if(u){const t=e.appendChild(a.createElement("table")).appendChild(a.createElement("tr")),r=t.appendChild(a.createElement("td")),n=t.appendChild(a.createElement("td")),s=r.appendChild(a.createElement("img"));s.setAttribute("src",u.uri),s.setAttribute("style","width: 1.5em; height: 1.5em;"),s.setAttribute("title",i),n.appendChild(o)}else e.appendChild(o)}else e.textContent=t.utils.label(r)},z.renderTabSettings=function(e,r){if(e.innerHTML="",e.style+="border-color: #eed;",e.appendChild(a.createElement("h3")).textContent="Adjust this tab",s.holds(r,c.rdf("type"),c.meeting("Tool"))){const n=i.sym("https://solid.github.io/solid-panes/meeting/meetingDetailsForm.ttl#settings");t.widgets.appendForm(document,e,{},r,n,h.doc(),f),t.widgets.deleteButtonWithCheck(a,e,"tab",function(){const e=s.the(h,c.meeting("toolList"));for(let t=0;t<e.elements.length;t++)if(e.elements[t].sameTerm(r)){e.elements.splice(t,1);break}const t=s.any(r,c.meeting("target")),n=s.statementsMatching(r).concat(s.statementsMatching(void 0,void 0,r)).concat(s.statementsMatching(h,void 0,t));s.remove(n),E()}).setAttribute("style","width: 1.5em; height: 1.5em;")}else e.appendChild(a.createElement("h4")).textContent="(No adjustments available)"},z.backgroundColor=s.anyValue(r,c.ui("backgroundColor"))||"#ddddcc";const $=w.appendChild(t.tabs.tabWidget(z));return t.aclControl.preventBrowserDropEvents(a),t.widgets.makeDropTarget($.tabContainer,C,T),t.widgets.makeDropTarget(D,C,T),v}}})(),s})());
3
- //# sourceMappingURL=meetingPane.js.map
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("UI"),require("$rdf"),require("SolidLogic")):"function"==typeof define&&define.amd?define(["UI","$rdf","SolidLogic"],t):"object"==typeof exports?exports.MeetingPane=t(require("UI"),require("$rdf"),require("SolidLogic")):e.MeetingPane=t(e.UI,e.$rdf,e.SolidLogic)}(this,(e,t,n)=>(()=>{"use strict";var i={264:e=>{e.exports=t},426:t=>{t.exports=e},663:e=>{e.exports=n}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return i[e](n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};a.r(s),a.d(s,{default:()=>p});var r=a(426),l=a(264),d=a(663);const{typeIndex:c}=d.solidLogicSingleton,{loadTypeIndexesFor:u}=c,m=r.ns,p={icon:r.icons.iconBase+"noun_66617.svg",name:"meeting",audience:[m.solid("PowerUser")],label:function(e,t){const n=t.session.store,i=r.ns;return n.holds(e,i.rdf("type"),i.meeting("Meeting"))?"Meeting":null},mintClass:r.ns.meeting("Meeting"),mintNew:function(e,t){return new Promise(function(n,i){const o=e.session.store,a=r.ns;t.newInstance=t.newInstance||o.sym(t.newBase+"index.ttl#this");const s=t.newInstance,c=s.doc(),u=d.authn.currentUser();u&&o.add(s,a.dc("author"),u,c),o.add(s,a.rdf("type"),a.meeting("Meeting"),c),o.add(s,a.dc("created"),new Date,c),o.add(s,a.ui("backgroundColor"),new l.Literal("#ddddcc",void 0,a.xsd("color")),c);const m=new l.Collection;o.add(s,a.meeting("toolList"),m,c),m.elements.push(s),o.updater.put(c,o.statementsMatching(void 0,void 0,void 0,c),"text/turtle",function(e,o,a){o?n(t):i(new Error("Error writing meeting configuration: "+a))})})},render:function(e,t){const n=t.dom,i=t.session.store,o=r.ns,a=i.updater,s=this,c=function(e,t){console.log(e);const i=n.createElement("pre");i.setAttribute("style","background-color: "+t||0),h.appendChild(i),i.appendChild(n.createTextNode(e))},m=function(e,t){e||c(t)},p=e,g=e.doc(),f=e.dir().uri,h=n.createElement("div"),b=h.appendChild(n.createElement("table"));b.style="width: 100%; height: 100%; margin:0;";const w=b.appendChild(n.createElement("tr"));w.appendChild(n.createElement("div"));const y=b.appendChild(n.createElement("tr")),v=b.appendChild(n.createElement("td")).appendChild(n.createElement("table")).appendChild(n.createElement("tr"));w.setAttribute("style","height: 2em;");let C=null;const x=function(){a.put(g,i.statementsMatching(void 0,void 0,void 0,g),"text/turtle",function(e,t,n){t?($.refresh(),z()):c(n="FAILED to save new thing at: "+g+" : "+n)})},k=function(e,t,n){const s=t.doc();n&&i.add(p,n,t,s),i.add(t,o.meeting("parentMeeting"),p,s),a.put(s,i.statementsMatching(void 0,void 0,void 0,s),"text/turtle",function(e,n,i){n?x():c("FAILED to save new tool at: "+t+" : "+i)})},T=function(e,t,n,a){t&&i.add(p,t,e,g);const s=r.widgets.newThing(g);return n&&i.add(s,o.rdfs("label"),n,g),a&&i.add(s,o.meeting("icon"),i.sym(a),g),i.add(s,o.rdf("type"),o.meeting("Tool"),g),i.add(s,o.meeting("target"),e,g),i.the(p,o.meeting("toolList")).elements.push(s),s};function A(e){const t=/https:\/\/www\.google\..*\/maps\//,n="https://www.google.com/maps/embed/v1/",i=e.uri;if(!i.match(t))return e;if(i.startsWith(n))return e;const o=i.replace(t,n)+"&key=AIzaSyB8aaT6bY9tcLCmc2oPCkdUYLmTOWM8R54";return console.log("Converted Google Map URI! "+o),l.sym(o)}const E=function(n){Promise.all(n.map(function(n){return function(n){return new Promise(function(a){console.log("Dropped on thing "+n);const s=n.uri;if(s.startsWith("http:")&&s.indexOf("#")<0)return function(n){const a=o.wf("attachment");i.add(e,a,n,e.doc()),P({icon:"noun_160581.svg",limit:1,shareTab:!0},{newInstance:e,pane:t.session.paneRegistry.byName("link"),predicate:o.meeting("attachmentTool"),tabTitle:"Links",view:"link",noIndexHTML:!0})}(n),a(n);i.fetcher.nowOrWhenFetched(n,function(e,t){function d(e){e=A(e),console.log("make web page attachement tab "+e);const t=T(e,r.ns.wf("attachment"),r.utils.label(e),null);return i.add(t,r.ns.meeting("view"),"iframe",g),a(e)}if(e){const e=n,t=i.findTypeURIs(e);for(const e in t)console.log(" drop object type includes: "+e);if(o.vcard("Individual").uri in t||o.foaf("Person").uri in t||o.foaf("Agent").uri in t)return function(e){const t=i.any(e,o.foaf("preferredURI")),n=t?i.sym(t):e,a=i.any(p,o.meeting("attendeeGroup")),s=function(e,t){const n=[l.st(t,r.ns.vcard("hasMember"),e,t.doc())],a=i.any(e,o.vcard("fn"))||i.any(e,o.foaf("name"));a&&n.push(l.st(e,r.ns.vcard("fn"),a,t.doc())),i.fetcher.nowOrWhenFetched(t.doc(),void 0,function(o,a){o?i.updater.update([],n,function(t,n,i){m(n,i),n&&console.log("Addded to particpants OK: "+e)}):c("Can't read group to add person"+t)})};a?s(n,a):I().then(function(e){const t=e.newInstance;s(n,t),i.fetcher.putBack(g,{contentType:"text/turtle"}).then(function(e){console.log("Particiants Group created: "+t)})}).catch(function(e){c(e)})}(n),a(n);if(s.startsWith("https:")&&s.indexOf("#")<0){const e=i.fetcher.getHeader(n,"x-frame-options");let t=!0;if(e)for(let n=0;n<e.length;n++)console.log("x-frame-options: "+e[n]),e[n].indexOf("sameorigin")<0&&(t=!1),e[n].indexOf("deny")<0&&(t=!1);if(t)return function(e){const t=T(e,r.ns.wf("attachment"),r.utils.label(e),null);i.add(t,r.ns.meeting("view"),"iframe",g)}(n=A(n)),a(n)}return console.log("Default: assume web page attachement "+n),d(n)}return console.log("Error looking up dropped thing, will just add it anyway. "+n+": "+t),d(n)})})}(l.sym(n))})).then(function(e){x()})},F=function(e){r.widgets.uploadFiles(i.fetcher,e,p.dir().uri+"Files",p.dir().uri+"Pictures",function(e,t){e.type.startsWith("image/")?L("Files"):M("Pictures")})},L=function(e){return P({icon:"noun_598334.svg",limit:1,shareTab:!0},{newInstance:i.sym(p.dir().uri+e+"/"),pane:t.session.paneRegistry.byName("folder"),predicate:o.meeting("pictures"),shareTab:!0,tabTitle:e,view:"slideshow",noIndexHTML:!0})},M=function(e){return P({icon:"noun_681601.svg",limit:1,shareTab:!0},{newInstance:i.sym(p.dir().uri+"Files/"),pane:t.session.paneRegistry.byName("folder"),predicate:o.meeting("materialsFolder"),tabTitle:"Materials",noIndexHTML:!0})},I=function(){return P({icon:"noun_339237.svg",limit:1,shareTab:!0},{newInstance:i.sym(p.dir().uri+"Attendees/index.ttl#this"),pane:t.session.paneRegistry.byName("contact"),predicate:o.meeting("attendeeGroup"),tabTitle:"Attendees",instanceClass:o.vcard("Group"),instanceName:r.utils.label(e)+" attendees",noIndexHTML:!0})};function P(e,n){return new Promise(function(i,o){const a=t.session.store;if(!n.useExisting){const t=a.any(p,n.predicate);if(t){if(e.limit&&1===e.limit&&!e.shareTab)return c("Already have "+t+" as "+r.utils.label(n.predicate)),c("Cant have two"),i(null);if(e.shareTab)return console.log("Using existing "+t+" as "+r.utils.label(n.predicate)),i({me:C,newInstance:t,instanceClass:n.instanceClass})}}C||n.me||o(new Error("Username not defined for new tool")),n.me=n.me||C,n.newInstance=n.useExisting||n.newInstance||a.sym(n.newBase+"index.ttl#this"),n.pane.mintNew(t,n).then(function(e){const t=T(e.newInstance,e.predicate,e.tabTitle,e.pane.icon);e.view&&a.add(t,r.ns.meeting("view"),e.view,g),x(),a.fetcher.putBack(g,{contentType:"text/turtle"}).then(function(t){i(e)}).catch(function(e){o(e)})}).catch(function(e){c(e),o(e)})})}const _=function(){const e=r.login.selectWorkspace(n,{noun:"meeting"},function(i,o){s.mintNew(t,{newBase:o}).then(function(t){const i=t.newInstance;R.removeChild(e);const o=R.appendChild(n.createElement("p"));o.setAttribute("style","font-size: 140%;"),o.innerHTML="Your <a target='_blank' href='"+i.uri+"'><b>new meeting</b></a> is ready to be set up. <br/><br/><a target='_blank' href='"+i.uri+"'>Go to your new meeting.</a>"}).catch(function(t){R.removeChild(e),R.appendChild(r.widgets.errorMessageBlock(n,t))})});R.appendChild(e)},S=[{icon:"noun_339237.svg",maker:function(e){const n=f+"Group/",i=t.session.store;let a=i.any(p,o.meeting("particpants"));a||(a=l.sym(n+"index.ttl#this")),console.log("Participant group: "+a);const s=T(a,o.meeting("particpants"),"Particpants",r.icons.iconBase+"noun_339237.svg");i.add(s,r.ns.meeting("view"),"peoplePicker",g),x()},hint:"Make a group of people",limit:1},{icon:"noun_346777.svg",maker:function(e){return P(e,{useExisting:p,pane:t.session.paneRegistry.byName("schedule"),view:"schedule",tabTitle:"Schedule poll",noIndexHTML:!0})},hint:"Make a poll to schedule the meeting"},{icon:"noun_48218.svg",maker:function(e){},limit:1,hint:"Add an agenda list",disabled:!0},{icon:"noun_79217.svg",maker:function(e){return P(e,{newBase:f+"SharedNotes/",predicate:r.ns.meeting("sharedNotes"),tabTitle:"Shared Notes",pane:t.session.paneRegistry.byName("pad")})},hint:"Add a shared notepad"},{icon:"noun_346319.svg",maker:function(e){const n=f+"Chat/",i=t.session.store;if(i.holds(p,o.meeting("chat")))return void console.log("Ignored - already have chat");const a=i.sym(n+"chat.ttl");i.add(a,o.rdf("type"),o.meeting("Chat"),a),T(a,o.meeting("chat"),"Chat",r.icons.iconBase+"noun_346319.svg"),k(0,a,o.meeting("chat"))},limit:1,hint:"Add a chat channel for the meeting"},{icon:"noun_17020.svg",maker:function(e){const n=f+"Actions/",i=t.session.store;if(i.holds(p,o.meeting("actions")))return void console.log("Ignored - already have actions");const a=i.sym(n+"config.ttl"),s=i.sym(n+"config.ttl#this"),l=i.sym(n+"state.ttl");i.add(s,o.dc("title"),(i.anyValue(p,o.cal("summary"))||"Meeting ")+" actions",a),i.add(s,o.wf("issueClass"),o.wf("Task"),a),i.add(s,o.wf("initialState"),o.wf("Open"),a),i.add(s,o.wf("stateStore"),l,a),i.add(s,o.wf("assigneeClass"),o.foaf("Person"),a),i.add(s,o.rdf("type"),o.wf("Tracker"),a),i.add(s,o.rdf("type"),o.wf("Tracker"),a),T(s,o.meeting("actions"),"Actions",r.icons.iconBase+"noun_17020.svg"),k(0,s,o.meeting("actions"))},limit:1,hint:"Add a list of action items"},{icon:"noun_260227.svg",maker:function(e){const n=t.session.store,i=l.sym("https://meet.jit.si/"+r.utils.genUuid());if(n.holds(p,o.meeting("videoCallPage")))return void console.log("Ignored - already have a videoCallPage");n.add(i,o.rdf("type"),o.meeting("VideoCallPage"),g);const a=T(i,o.meeting("videoCallPage"),"Video call",r.icons.iconBase+"noun_260227.svg");n.add(a,o.meeting("view"),"iframe",g),x()},limit:1,hint:"Add a video call for the meeting"},{icon:"noun_25830.svg",maker:function(e){r.widgets.askName(n,i,R,o.log("uri"),r.ns.rdf("Resource")).then(function(e){if(!e)return z();const n=t.session.store,i=r.ns,o=n.sym(e),a=T(o,i.wf("attachment"),r.utils.label(o),null);n.add(a,i.meeting("view"),"iframe",g),x()}).catch(function(e){c("Error making new sub-meeting: "+e)})},hint:"Attach meeting materials",disabled:!1},{icon:"noun_123691.svg",maker:function(e){const n=t.session.store,i=r.ns,o=p.dir();if(e.limit&&1===e.limit&&n.holds(p,i.wf("sharingControl")))return void c("Ignored - already have "+r.utils.label(V.predicate));const a=T(o,i.wf("sharingControl"),"Sharing",r.icons.iconBase+"noun_123691.svg");n.add(a,i.meeting("view"),"sharing",g),x()},limit:1,hint:"Control Sharing",disabled:!1},{icon:"noun_66617.svg",maker:function(e){r.widgets.askName(n,i,R,o.foaf("name"),r.ns.meeting("Meeting")).then(function(n){if(!n)return z();const i=encodeURIComponent(n),o={newBase:f+i+"/",predicate:r.ns.meeting("subMeeting"),tabTitle:n,pane:t.session.paneRegistry.byName("meeting")};return P(e,o)}).catch(function(e){c("Error making new sub-meeting: "+e)})},hint:"Make a sub meeting",disabled:!1}],N=l.sym("https://solid.github.io/solid-panes/meeting/meetingDetailsForm.ttl#settings");l.parse('@prefix : <http://www.w3.org/ns/ui#> .\n@prefix f: <#> .\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix cal: <http://www.w3.org/2002/12/cal/ical#>.\n@prefix meeting: <http://www.w3.org/ns/pim/meeting#>.\n@prefix ns: <http://www.w3.org/2006/vcard/ns#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix te: <http://purl.org/dc/terms/> .\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n\n f:main a :Form;\n cal:summary "Meeting Details";\n :part f:titleField, f:locationField, f:startField,\n f:endField, f:eventComment, f:colorField .\n\n f:titleField a :SingleLineTextField;\n :maxLength 256;\n :property cal:summary;\n :label "Name of meeting";\n :size 80 .\n\n f:locationField a :SingleLineTextField;\n :maxLength 128;\n :property cal:location;\n :size 40 .\n\n f:startField a :DateField;\n :label "Start";\n :property cal:dtstart .\n\n f:endField a :DateField;\n :label "End";\n :property cal:dtend .\n\n f:colorField a :ColorField;\n :label "Tab color";\n # :default "#ddddcc"^^xsd:color;\n :property ui:backgroundColor .\n\n f:eventComment\n a ui:MultiLineTextField;\n # ui:maxLength\n # "1048";\n # ui:size\n # "40".\n ui:property\n cal:comment.\n\n###################################################\n\nf:settings a :Form;\n dc:title "Tab settings";\n :part f:labelField, f:targetField, f:viewField.\n\n f:labelField a :SingleLineTextField;\n :maxLength 128;\n :property rdfs:label;\n :label "Label on tab";\n :size 40 .\n\n f:targetField a :NamedNodeURIField;\n :maxLength 1024; # Longer?\n :property meeting:target;\n :label "URL of resource";\n :size 80 .\n\n f:colorField2 a :ColorField;\n :label "Tab color";\n # :default "#ddddcc"^^xsd:color;\n :property ui:backgroundColor .\n\n f:viewField a :SingleLineTextField;\n :maxLength 128;\n :property meeting:view;\n :label "View mode (experts only)";\n :size 40 .\n\n#\n',i,N.doc().uri,"text/turtle");const B="padding: 1em; width: 3em; height: 3em;",U=v.appendChild(n.createElement("td")),R=v.appendChild(n.createElement("td")),D=U.appendChild(n.createElement("img"));let O=!1;D.setAttribute("src",r.icons.iconBase+"noun_19460_green.svg"),D.setAttribute("style",B+"opacity: 50%;"),D.setAttribute("title","Add another tool to the meeting");const j=function(e){O=!O,D.setAttribute("style",B+(O?"background-color: yellow;":"")),H(O?"":"display: none;")};let G;d.authn.checkUser().then(e=>{if(e)return C=e,D.addEventListener("click",j),void D.setAttribute("style",B);G=r.login.loginStatusBox(n,e=>{e?(C=i.sym(e),R.removeChild(G),D.addEventListener("click",j),D.setAttribute("style",B)):(console.log("(Logged out)"),C=null)}),G.setAttribute("style","margin: 0.5em 1em;"),R.appendChild(G)});const W=[];for(let e=0;e<S.length;e++)(function(){const t=S[e],i=U.appendChild(n.createElement("img"));i.setAttribute("src",r.icons.iconBase+t.icon),i.setAttribute("style",B+"display: none;"),W.push(i),i.tool=t;const o=t.maker;t.disabled||i.addEventListener("click",function(e){q(i),o(t)})})();const H=function(e){for(let t=0;t<W.length;t++){let n=B+e;S[t].disabled&&(n+="opacity: 0.3;"),W[t].setAttribute("style",n)}},z=function(){H("display: none;"),D.setAttribute("style",B)},q=function(e){H("display: none;"),e.setAttribute("style",B+"background-color: yellow;")},V={dom:n};V.predicate=o.meeting("toolList"),V.subject=e,V.ordered=!0,V.orientation=1,V.renderMain=function(e,a){let s,m=null,f=null;e.innerHTML="";const h=function(t,n){t||(e.textContent=""+n)},b=function(){e.appendChild(n.createElement("h3")).textContent="Details of meeting";const t=l.sym("https://solid.github.io/solid-panes/meeting/meetingDetailsForm.ttl#main");r.widgets.appendForm(document,e,{},p,t,p.doc(),h),e.appendChild(function(){const e=n.createElement("div"),t=e.appendChild(n.createElement("p"));return t.setAttribute("style","margin: 0em; padding:3em; color: #888;"),t.textContent="Tip: Drag URL-bar icons of web pages into the tab bar on the left to add new meeting materials.",e}()),C=d.authn.currentUser(),C&&i.add(p,o.dc("author"),C,g);const a={noun:"meeting",me:C,statusArea:e,div:e,dom:n};r.login.registrationControl(a,p,o.meeting("Meeting")).then(function(e){console.log("Registration control finsished.")}),r.pad.manageParticipation(n,e,g,p,C,{});const s="height: 2em; width: 2em; margin:0.5em;",c=e.appendChild(n.createElement("div")),u=c.appendChild(n.createElement("img"));u.setAttribute("src",r.icons.iconBase+"noun_145978.svg"),u.setAttribute("title","Make a fresh new meeting"),u.addEventListener("click",_),u.setAttribute("style",s);const m=c.appendChild(n.createElement("a"));m.setAttribute("href","https://github.com/solid/solid-panes"),m.setAttribute("target","_blank");const f=m.appendChild(n.createElement("img"));f.setAttribute("src",r.icons.iconBase+"noun_368567.svg"),f.setAttribute("title","Fork me on github"),f.setAttribute("style",s+"opacity: 50%;")};if(i.holds(a,o.rdf("type"),o.meeting("Tool"))){const g=i.any(a,o.meeting("target"));if(g.sameTerm(p)&&!i.any(a,o.meeting("view")))b();else{let h=i.any(a,o.meeting("view"));h=h?h.value:null,"details"===h?b():"peoplePicker"===h?function(){const t={div:e,dom:n};e.appendChild(n.createElement("h4")).textContent="Meeting Participants";const a=function(e){const t=[l.st(p,o.meeting("particpantGroup"),e,p.doc())];i.updater.update([],t,function(t,n,i){n?f=e:c("Cant save participants group: "+i)})};f=i.any(p,o.meeting("particpantGroup")),d.authn.checkUser().then(e=>{e&&u(i.sym(e)).then(function(){const e={defaultNewGroupName:"Meeting Participants",selectedGroup:f};new r.widgets.PeoplePicker(t.div,t.index.private[0],a,e).render()})})}():"iframe"===h?function(t){const i=e.appendChild(n.createElement("iframe"));i.setAttribute("src",t.uri),i.setAttribute("style","border: none; margin: 0; padding: 0; height: 100%; width: 100%;"),i.setAttribute("allow","microphone camera"),i.setAttribute("name","disable-x-frame-options"),e.style.padding=0}(g):(m=h?t.session.paneRegistry.byName(h):null,s=e.appendChild(n.createElement("table")),s.style.width="100%",t.getOutliner(n).GotoSubject(g,!0,m,!1,void 0,s))}}else a.sameTerm(p)?b():(!a.sameTerm(a.doc())||i.holds(a,r.ns.rdf("type"),r.ns.meeting("Chat"))||i.holds(a,r.ns.rdf("type"),r.ns.meeting("PaneView")))&&(s=e.appendChild(n.createElement("table")),t.getOutliner(n).GotoSubject(a,!0,void 0,!1,void 0,s))},V.renderTab=function(e,t){if(i.holds(t,o.rdf("type"),o.meeting("Tool"))){const a=i.any(t,o.meeting("target"));let s=i.any(t,o.rdfs("label"));s=s?s.value:r.utils.label(a);const l=e.appendChild(n.createElement("div"));l.textContent=s,l.setAttribute("style","margin-left: 0.7em");const d=i.any(t,o.meeting("icon"));if(d){const t=e.appendChild(n.createElement("table")).appendChild(n.createElement("tr")),i=t.appendChild(n.createElement("td")),o=t.appendChild(n.createElement("td")),a=i.appendChild(n.createElement("img"));a.setAttribute("src",d.uri),a.setAttribute("style","width: 1.5em; height: 1.5em;"),a.setAttribute("title",s),o.appendChild(l)}else e.appendChild(l)}else e.textContent=r.utils.label(t)},V.renderTabSettings=function(e,t){if(e.innerHTML="",e.style+="border-color: #eed;",e.appendChild(n.createElement("h3")).textContent="Adjust this tab",i.holds(t,o.rdf("type"),o.meeting("Tool"))){const a=l.sym("https://solid.github.io/solid-panes/meeting/meetingDetailsForm.ttl#settings");r.widgets.appendForm(document,e,{},t,a,p.doc(),m),r.widgets.deleteButtonWithCheck(n,e,"tab",function(){const e=i.the(p,o.meeting("toolList"));for(let n=0;n<e.elements.length;n++)if(e.elements[n].sameTerm(t)){e.elements.splice(n,1);break}const n=i.any(t,o.meeting("target")),a=i.statementsMatching(t).concat(i.statementsMatching(void 0,void 0,t)).concat(i.statementsMatching(p,void 0,n));i.remove(a),x()}).setAttribute("style","width: 1.5em; height: 1.5em;")}else e.appendChild(n.createElement("h4")).textContent="(No adjustments available)"},V.backgroundColor=i.anyValue(e,o.ui("backgroundColor"))||"#ddddcc";const $=y.appendChild(r.tabs.tabWidget(V));return r.aclControl.preventBrowserDropEvents(n),r.widgets.makeDropTarget($.tabContainer,E,F),r.widgets.makeDropTarget(U,E,F),h}};return s})());