solid-ui 5.0.2-7 → 5.0.2-8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acl/add-agent-buttons.cjs.js +1 -1
- package/dist/acl/add-agent-buttons.cjs.js.map +1 -1
- package/dist/acl/add-agent-buttons.d.ts.map +1 -1
- package/dist/acl/add-agent-buttons.esm.js +22 -20
- package/dist/acl/add-agent-buttons.esm.js.map +1 -1
- package/dist/chunks/{DialogProvider-CcyasSmM.js → DialogProvider-DwymaGN5.js} +3 -3
- package/dist/chunks/{DialogProvider-CcyasSmM.js.map → DialogProvider-DwymaGN5.js.map} +1 -1
- package/dist/chunks/{ResourceActionsMenu-Dm1hvIj5.js → ResourceActionsMenu-mLMf4fAa.js} +9 -9
- package/dist/chunks/{ResourceActionsMenu-Dm1hvIj5.js.map → ResourceActionsMenu-mLMf4fAa.js.map} +1 -1
- package/dist/chunks/{access-control-modal-XJm3Czd5.js → access-control-modal-BR7HhqpN.js} +29 -29
- package/dist/chunks/{access-control-modal-XJm3Czd5.js.map → access-control-modal-BR7HhqpN.js.map} +1 -1
- package/dist/chunks/{account-BqJdA0tO.js → account-Dtv8-QEH.js} +10 -10
- package/dist/chunks/{account-BqJdA0tO.js.map → account-Dtv8-QEH.js.map} +1 -1
- package/dist/chunks/{auth-CCrvazv_.js → auth-Cj-J-3Nf.js} +26 -26
- package/dist/chunks/auth-Cj-J-3Nf.js.map +1 -0
- package/dist/chunks/{avatar-DHC_B7vJ.js → avatar-D_bHMV5F.js} +3 -3
- package/dist/chunks/{avatar-DHC_B7vJ.js.map → avatar-D_bHMV5F.js.map} +1 -1
- package/dist/chunks/{button-DFgsOHBh.js → button-D7XurXfj.js} +2 -2
- package/dist/chunks/{button-DFgsOHBh.js.map → button-D7XurXfj.js.map} +1 -1
- package/dist/chunks/{chunk.UEBQI7VV-DVcxHNfV.js → chunk.UEBQI7VV-CrSDe9uN.js} +2 -2
- package/dist/chunks/{chunk.UEBQI7VV-DVcxHNfV.js.map → chunk.UEBQI7VV-CrSDe9uN.js.map} +1 -1
- package/dist/chunks/{combobox-CtFy7qwi.js → combobox-CHli5LVO.js} +3 -3
- package/dist/chunks/{combobox-CtFy7qwi.js.map → combobox-CHli5LVO.js.map} +1 -1
- package/dist/chunks/{combobox-option-B8b1khQy.js → combobox-option-lOJdg5cD.js} +2 -2
- package/dist/chunks/{combobox-option-B8b1khQy.js.map → combobox-option-lOJdg5cD.js.map} +1 -1
- package/dist/chunks/{components-CmnPlcEi.js → components-CVuqsI0R.js} +2 -2
- package/dist/chunks/{components-CmnPlcEi.js.map → components-CVuqsI0R.js.map} +1 -1
- package/dist/chunks/{context-Dr-MkMP6.js → context-0sxUfxf7.js} +2 -2
- package/dist/chunks/{context-Dr-MkMP6.js.map → context-0sxUfxf7.js.map} +1 -1
- package/dist/chunks/{dialog-BY_pM7CM.js → dialog-BTlq_YfO.js} +4 -4
- package/dist/chunks/{dialog-BY_pM7CM.js.map → dialog-BTlq_YfO.js.map} +1 -1
- package/dist/chunks/{dialog-content-DfTs9gaK.js → dialog-content-DHim135-.js} +2 -2
- package/dist/chunks/{dialog-content-DfTs9gaK.js.map → dialog-content-DHim135-.js.map} +1 -1
- package/dist/chunks/{dialog-footer-oZsrnodi.js → dialog-footer-B8uRmp3J.js} +2 -2
- package/dist/chunks/{dialog-footer-oZsrnodi.js.map → dialog-footer-B8uRmp3J.js.map} +1 -1
- package/dist/chunks/{dialog-header-_6It5zCM.js → dialog-header-CQ2jzzUd.js} +2 -2
- package/dist/chunks/{dialog-header-_6It5zCM.js.map → dialog-header-CQ2jzzUd.js.map} +1 -1
- package/dist/chunks/{dialogs-DP4-6e8A.js → dialogs-gEIIeLi6.js} +2 -2
- package/dist/chunks/{dialogs-DP4-6e8A.js.map → dialogs-gEIIeLi6.js.map} +1 -1
- package/dist/chunks/{dialogs-root-B-yfITRL.js → dialogs-root-DuRAjRjg.js} +3 -3
- package/dist/chunks/{dialogs-root-B-yfITRL.js.map → dialogs-root-DuRAjRjg.js.map} +1 -1
- package/dist/chunks/{error-state-CaxNmA0L.js → error-state-Y-Fe0JiX.js} +3 -3
- package/dist/chunks/{error-state-CaxNmA0L.js.map → error-state-Y-Fe0JiX.js.map} +1 -1
- package/dist/chunks/{file-explorer-header-Bu06_N7G.js → file-explorer-header-DGcG6Agk.js} +8 -8
- package/dist/chunks/{file-explorer-header-Bu06_N7G.js.map → file-explorer-header-DGcG6Agk.js.map} +1 -1
- package/dist/chunks/{file-explorer-provider-DqZDDpUX.js → file-explorer-provider-CIAJV8hq.js} +4 -4
- package/dist/chunks/{file-explorer-provider-DqZDDpUX.js.map → file-explorer-provider-CIAJV8hq.js.map} +1 -1
- package/dist/chunks/{guard-R26Y08Rq.js → guard-53kvhglh.js} +3 -3
- package/dist/chunks/{guard-R26Y08Rq.js.map → guard-53kvhglh.js.map} +1 -1
- package/dist/chunks/index.esm-BYrQu5rV.js +6 -0
- package/dist/chunks/index.esm-BYrQu5rV.js.map +1 -0
- package/dist/chunks/{input-BlwhSsYC.js → input-MtTyDieA.js} +2 -2
- package/dist/chunks/{input-BlwhSsYC.js.map → input-MtTyDieA.js.map} +1 -1
- package/dist/chunks/{jsonld-C6IOQ1Tg.js → jsonld-lAxnRr2L.js} +2 -2
- package/dist/chunks/{jsonld-C6IOQ1Tg.js.map → jsonld-lAxnRr2L.js.map} +1 -1
- package/dist/chunks/{login-button-BZH27kcX.js → login-button-Dx58UUyH.js} +4 -4
- package/dist/chunks/{login-button-BZH27kcX.js.map → login-button-Dx58UUyH.js.map} +1 -1
- package/dist/chunks/{logout-button-CrTKHw_t.js → logout-button-Vrn0nLVQ.js} +4 -4
- package/dist/chunks/{logout-button-CrTKHw_t.js.map → logout-button-Vrn0nLVQ.js.map} +1 -1
- package/dist/chunks/{menu-item-DmQ4ZQQ2.js → menu-item-EARrOY8C.js} +2 -2
- package/dist/chunks/{menu-item-DmQ4ZQQ2.js.map → menu-item-EARrOY8C.js.map} +1 -1
- package/dist/chunks/{menu-clQ0N3ba.js → menu-pe4NxtfD.js} +3 -3
- package/dist/chunks/{menu-clQ0N3ba.js.map → menu-pe4NxtfD.js.map} +1 -1
- package/dist/chunks/{photo-capture-KYEqSWFH.js → photo-capture-B8ponMpE.js} +4 -4
- package/dist/chunks/{photo-capture-KYEqSWFH.js.map → photo-capture-B8ponMpE.js.map} +1 -1
- package/dist/chunks/{photo-capture-modal-YmzRHhUg.js → photo-capture-modal-SOcYsArw.js} +6 -6
- package/dist/chunks/{photo-capture-modal-YmzRHhUg.js.map → photo-capture-modal-SOcYsArw.js.map} +1 -1
- package/dist/chunks/{provide-1sJJkgCO.js → provide-BQN7o60i.js} +2 -2
- package/dist/chunks/{provide-1sJJkgCO.js.map → provide-BQN7o60i.js.map} +1 -1
- package/dist/chunks/{provider-DC-qEkao.js → provider-CnOHE-B-.js} +5 -5
- package/dist/chunks/{provider-DC-qEkao.js.map → provider-CnOHE-B-.js.map} +1 -1
- package/dist/chunks/{rdf-form-BhevRpHy.js → rdf-form-CtskuSp2.js} +4 -4
- package/dist/chunks/{rdf-form-BhevRpHy.js.map → rdf-form-CtskuSp2.js.map} +1 -1
- package/dist/chunks/{rdf-input-2s3O54hm.js → rdf-input-DfTBeaCB.js} +8 -8
- package/dist/chunks/{rdf-input-2s3O54hm.js.map → rdf-input-DfTBeaCB.js.map} +1 -1
- package/dist/chunks/{select-DQtYJhLc.js → select-BKXrVwJC.js} +2 -2
- package/dist/chunks/{select-DQtYJhLc.js.map → select-BKXrVwJC.js.map} +1 -1
- package/dist/chunks/{select-option-BdE45Q3h.js → select-option-SlgG53he.js} +2 -2
- package/dist/chunks/{select-option-BdE45Q3h.js.map → select-option-SlgG53he.js.map} +1 -1
- package/dist/chunks/{signup-button-yONuztWR.js → signup-button-C-dLsqr8.js} +4 -4
- package/dist/chunks/{signup-button-yONuztWR.js.map → signup-button-C-dLsqr8.js.map} +1 -1
- package/dist/chunks/{solid-emblem-Dc1cwhXb.js → solid-emblem-BmFc2G2B.js} +2 -2
- package/dist/chunks/{solid-emblem-Dc1cwhXb.js.map → solid-emblem-BmFc2G2B.js.map} +1 -1
- package/dist/chunks/{solidLogicSingleton.esm-Bvt7E7Vl.js → solidLogicSingleton.esm-CKYdvLzf.js} +12317 -4363
- package/dist/chunks/solidLogicSingleton.esm-CKYdvLzf.js.map +1 -0
- package/dist/chunks/{src-BUfVUeNt.js → src-CiHeLI_K.js} +2302 -2301
- package/dist/chunks/src-CiHeLI_K.js.map +1 -0
- package/dist/chunks/{style-Dlw9-wPn.js → style-Du-nyh8u.js} +7 -7
- package/dist/chunks/{style-Dlw9-wPn.js.map → style-Du-nyh8u.js.map} +1 -1
- package/dist/chunks/widgets-CTH3oXJI.js +2762 -0
- package/dist/chunks/widgets-CTH3oXJI.js.map +1 -0
- package/dist/components/access-control-modal.js +1 -1
- package/dist/components/account.js +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/combobox-option.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/dialog-content.js +1 -1
- package/dist/components/dialog-footer.js +1 -1
- package/dist/components/dialog-header.js +1 -1
- package/dist/components/dialog-provider.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialogs-root.js +1 -1
- package/dist/components/error-state.js +1 -1
- package/dist/components/file-explorer-header.js +1 -1
- package/dist/components/file-explorer-provider.js +1 -1
- package/dist/components/guard.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/login-button.js +1 -1
- package/dist/components/login-modal.js +1 -1
- package/dist/components/logout-button.js +1 -1
- package/dist/components/menu-item.js +1 -1
- package/dist/components/menu.js +1 -1
- package/dist/components/photo-capture-modal.js +1 -1
- package/dist/components/photo-capture.js +1 -1
- package/dist/components/provider.js +1 -1
- package/dist/components/rdf-form.js +1 -1
- package/dist/components/rdf-input.js +1 -1
- package/dist/components/resource-actions-menu.js +1 -1
- package/dist/components/select-option.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/signup-button.js +1 -1
- package/dist/components/solid-emblem.js +1 -1
- package/dist/components.js +30 -30
- package/dist/index.js +8 -8
- package/dist/lib/components/web-component/WebComponent.styles.cjs.js +1 -1
- package/dist/lib/components/web-component/WebComponent.styles.esm.js +1 -1
- package/dist/loader.js +8 -8
- package/dist/solid-ui.js +2 -2
- package/dist/solid-ui.min.js +2 -2
- package/dist/solid-ui.min.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunks/auth-CCrvazv_.js.map +0 -1
- package/dist/chunks/index.esm-BQrkxchZ.js +0 -6
- package/dist/chunks/index.esm-BQrkxchZ.js.map +0 -1
- package/dist/chunks/solidLogicSingleton.esm-Bvt7E7Vl.js.map +0 -1
- package/dist/chunks/src-BUfVUeNt.js.map +0 -1
- package/dist/chunks/widgets-C92ihtlF.js +0 -10628
- package/dist/chunks/widgets-C92ihtlF.js.map +0 -1
package/dist/solid-ui.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("rdflib"),require("solid-logic")):typeof define==`function`&&define.amd?define([`exports`,`rdflib`,`solid-logic`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UI={},e.$rdf,e.SolidLogic))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},u=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),d=(e,t)=>{let n={};for(var r in e)i(n,r,{get:e[r],enumerable:!0});return t||i(n,Symbol.toStringTag,{value:`Module`}),n},f=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e},p=(e,t,n)=>(n=e==null?{}:r(s(e)),f(t||!e||!e.__esModule||!c.call(e,`default`)?i(n,`default`,{value:e,enumerable:!0}):n,e)),m=e=>c.call(e,`module.exports`)?e[`module.exports`]:f(i({},`__esModule`,{value:!0}),e);t=p(t);function h(e,t){customElements.get(e)||customElements.define(e,t)}function g(e){return(t,n)=>{n?n.addInitializer(()=>h(e,t)):h(e,t)}}var _=`solid-ui:close-dialog`,v=class e extends Event{static eventName=_;constructor(t,n){super(e.eventName,{bubbles:!0,composed:!0}),this.id=t,this.data=n}};function y(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e){var t=x(e,`string`);return typeof t==`symbol`?t:t+``}function x(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var S=class{constructor(e,t){y(this,`target`,void 0),y(this,`config`,void 0),this.target=e,this.config=t}close(e){window.dispatchEvent(new v(this.config.getContext().id,e))}},C=class extends Event{constructor(e,t,n,r){super(`context-request`,{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t,this.callback=n,this.subscribe=r??!1}};function w(e){return e}var T=class{constructor(e,t,n,r){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(e,t)=>{this.unsubscribe&&(this.unsubscribe!==t&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=e,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(e,t)),this.unsubscribe=t},this.host=e,t.context!==void 0){let e=t;this.context=e.context,this.callback=e.callback,this.subscribe=e.subscribe??!1}else this.context=t,this.callback=n,this.subscribe=r??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&=(this.unsubscribe(),void 0)}dispatchRequest(){this.host.dispatchEvent(new C(this.context,this.host,this.t,this.subscribe))}},E=class{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,t=!1){let n=t||!Object.is(e,this.o);this.o=e,n&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(let[e,{disposer:t}]of this.subscriptions)e(this.o,t)},e!==void 0&&(this.value=e)}addCallback(e,t,n){if(!n)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:t});let{disposer:r}=this.subscriptions.get(e);e(this.value,r)}clearCallbacks(){this.subscriptions.clear()}},D=class extends Event{constructor(e,t){super(`context-provider`,{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t}},O=class extends E{constructor(e,t,n){super(t.context===void 0?n:t.initialValue),this.onContextRequest=e=>{if(e.context!==this.context)return;let t=e.contextTarget??e.composedPath()[0];t!==this.host&&(e.stopPropagation(),this.addCallback(e.callback,t,e.subscribe))},this.onProviderRequest=e=>{if(e.context!==this.context||(e.contextTarget??e.composedPath()[0])===this.host)return;let t=new Set;for(let[e,{consumerHost:n}]of this.subscriptions)t.has(e)||(t.add(e),n.dispatchEvent(new C(this.context,n,e,!0)));e.stopPropagation()},this.host=e,this.context=t.context===void 0?t:t.context,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener(`context-request`,this.onContextRequest),this.host.addEventListener(`context-provider`,this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new D(this.context,this.host))}};function k({context:e}){return(t,n)=>{let r=new WeakMap;if(typeof n==`object`)return{get(){return t.get.call(this)},set(e){return r.get(this).setValue(e),t.set.call(this,e)},init(t){return r.set(this,new O(this,{context:e,initialValue:t})),t}};{t.constructor.addInitializer((t=>{r.set(t,new O(t,{context:e}))}));let i=Object.getOwnPropertyDescriptor(t,n),a;if(i===void 0){let e=new WeakMap;a={get(){return e.get(this)},set(t){r.get(this).setValue(t),e.set(this,t)},configurable:!0,enumerable:!0}}else{let e=i.set;a={...i,set(t){r.get(this).setValue(t),e?.call(this,t)}}}Object.defineProperty(t,n,a);return}}}function A({context:e,subscribe:t}){return(n,r)=>{typeof r==`object`?r.addInitializer((function(){new T(this,{context:e,callback:e=>{n.set.call(this,e)},subscribe:t})})):n.constructor.addInitializer((n=>{new T(n,{context:e,callback:e=>{n[r]=e},subscribe:t})}))}}function j(){return Math.random().toString(36).substring(2,15)}var ee={id:`noop-${j()}`},te=w(Symbol(`dialog`)),ne=globalThis,re=ne.ShadowRoot&&(ne.ShadyCSS===void 0||ne.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,ie=Symbol(),ae=new WeakMap,oe=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==ie)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(re&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=ae.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&ae.set(t,e))}return e}toString(){return this.cssText}},se=e=>new oe(typeof e==`string`?e:e+``,void 0,ie),ce=(e,...t)=>new oe(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,ie),le=(e,t)=>{if(re)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let n of t){let t=document.createElement(`style`),r=ne.litNonce;r!==void 0&&t.setAttribute(`nonce`,r),t.textContent=n.cssText,e.appendChild(t)}},ue=re?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return se(t)})(e):e,{is:de,defineProperty:fe,getOwnPropertyDescriptor:pe,getOwnPropertyNames:me,getOwnPropertySymbols:he,getPrototypeOf:ge}=Object,_e=globalThis,ve=_e.trustedTypes,ye=ve?ve.emptyScript:``,be=_e.reactiveElementPolyfillSupport,xe=(e,t)=>e,Se={toAttribute(e,t){switch(t){case Boolean:e=e?ye:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},Ce=(e,t)=>!de(e,t),we={attribute:!0,type:String,converter:Se,reflect:!1,useDefault:!1,hasChanged:Ce};Symbol.metadata??=Symbol(`metadata`),_e.litPropertyMetadata??=new WeakMap;var Te=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=we){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&fe(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=pe(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??we}static _$Ei(){if(this.hasOwnProperty(xe(`elementProperties`)))return;let e=ge(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(xe(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(xe(`properties`))){let e=this.properties,t=[...me(e),...he(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(ue(e))}else e!==void 0&&t.push(ue(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return le(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?Se:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?Se:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??Ce)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};Te.elementStyles=[],Te.shadowRootOptions={mode:`open`},Te[xe(`elementProperties`)]=new Map,Te[xe(`finalized`)]=new Map,be?.({ReactiveElement:Te}),(_e.reactiveElementVersions??=[]).push(`2.1.2`);var Ee=globalThis,De=e=>e,Oe=Ee.trustedTypes,ke=Oe?Oe.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,Ae=`$lit$`,je=`lit$${Math.random().toFixed(9).slice(2)}$`,Me=`?`+je,Ne=`<${Me}>`,Pe=document,Fe=()=>Pe.createComment(``),Ie=e=>e===null||typeof e!=`object`&&typeof e!=`function`,Le=Array.isArray,Re=e=>Le(e)||typeof e?.[Symbol.iterator]==`function`,ze=`[
|
|
2
|
-
\f\r]`,Be=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ve=/-->/g,He=/>/g,Ue=RegExp(`>|${ze}(?:([^\\s"'>=/]+)(${ze}*=${ze}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),We=/'/g,Ge=/"/g,Ke=/^(?:script|style|textarea|title)$/i,M=(e=>(t,...n)=>({_$litType$:e,strings:t,values:n}))(1),qe=Symbol.for(`lit-noChange`),N=Symbol.for(`lit-nothing`),Je=new WeakMap,Ye=Pe.createTreeWalker(Pe,129);function Xe(e,t){if(!Le(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return ke===void 0?t:ke.createHTML(t)}var Ze=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=Be;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===Be?c[1]===`!--`?o=Ve:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=Ue):(Ke.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=Ue):o=He:o===Ue?c[0]===`>`?(o=i??Be,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?Ue:c[3]===`"`?Ge:We):o===Ge||o===We?o=Ue:o===Ve||o===He?o=Be:(o=Ue,i=void 0);let d=o===Ue&&e[t+1].startsWith(`/>`)?` `:``;a+=o===Be?n+Ne:l>=0?(r.push(s),n.slice(0,l)+Ae+n.slice(l)+je+d):n+je+(l===-2?t:d)}return[Xe(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},Qe=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=Ze(t,n);if(this.el=e.createElement(l,r),Ye.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=Ye.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(Ae)){let t=u[o++],n=i.getAttribute(e).split(je),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?rt:r[1]===`?`?it:r[1]===`@`?at:nt}),i.removeAttribute(e)}else e.startsWith(je)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(Ke.test(i.tagName)){let e=i.textContent.split(je),t=e.length-1;if(t>0){i.textContent=Oe?Oe.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],Fe()),Ye.nextNode(),c.push({type:2,index:++a});i.append(e[t],Fe())}}}else if(i.nodeType===8){if(i.data===Me)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(je,e+1))!==-1;)c.push({type:7,index:a}),e+=je.length-1}}a++}}static createElement(e,t){let n=Pe.createElement(`template`);return n.innerHTML=e,n}};function $e(e,t,n=e,r){if(t===qe)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=Ie(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=$e(e,i._$AS(e,t.values),i,r)),t}var et=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??Pe).importNode(t,!0);Ye.currentNode=r;let i=Ye.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new tt(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new ot(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=Ye.nextNode(),a++)}return Ye.currentNode=Pe,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},tt=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=N,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=$e(this,e,t),Ie(e)?e===N||e==null||e===``?(this._$AH!==N&&this._$AR(),this._$AH=N):e!==this._$AH&&e!==qe&&this._(e):e._$litType$===void 0?e.nodeType===void 0?Re(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==N&&Ie(this._$AH)?this._$AA.nextSibling.data=e:this.T(Pe.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=Qe.createElement(Xe(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new et(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=Je.get(e.strings);return t===void 0&&Je.set(e.strings,t=new Qe(e)),t}k(t){Le(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(Fe()),this.O(Fe()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=De(e).nextSibling;De(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},nt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=N,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=N}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=$e(this,e,t,0),a=!Ie(e)||e!==this._$AH&&e!==qe,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=$e(this,r[n+o],t,o),s===qe&&(s=this._$AH[o]),a||=!Ie(s)||s!==this._$AH[o],s===N?e=N:e!==N&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===N?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},rt=class extends nt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===N?void 0:e}},it=class extends nt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==N)}},at=class extends nt{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=$e(this,e,t,0)??N)===qe)return;let n=this._$AH,r=e===N&&n!==N||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==N&&(n===N||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ot=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){$e(this,e)}},st={M:Ae,P:je,A:Me,C:1,L:Ze,R:et,D:Re,V:$e,I:tt,H:nt,N:it,U:at,B:rt,F:ot},ct=Ee.litHtmlPolyfillSupport;ct?.(Qe,tt),(Ee.litHtmlVersions??=[]).push(`3.3.3`);var lt=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new tt(t.insertBefore(Fe(),e),e,void 0,n??{})}return i._$AI(e),i},ut=globalThis,dt=class extends Te{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=lt(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return qe}};dt._$litElement$=!0,dt.finalized=!0,ut.litElementHydrateSupport?.({LitElement:dt});var ft=ut.litElementPolyfillSupport;ft?.({LitElement:dt}),(ut.litElementVersions??=[]).push(`4.2.2`);var pt=ce`/*! tailwindcss v4.3.4 | MIT License | https://tailwindcss.com */\n*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid}::file-selector-button{box-sizing:border-box;border:0 solid}a,abbr,address,area,article,aside,audio,b,base,bdi,bdo,blockquote,body,br,button,canvas,caption,cite,code,col,colgroup,data,datalist,dd,del,details,dfn,dialog,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,i,iframe,img,input,ins,kbd,label,legend,li,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,optgroup,option,output,p,picture,pre,progress,q,rp,rt,ruby,s,samp,script,search,section,select,slot,small,source,span,strong,style,sub,summary,sup,table,tbody,td,template,textarea,tfoot,th,thead,time,title,tr,track,u,ul,var,video,wbr,:after,:before,::backdrop{margin:0;padding:0}::file-selector-button{margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}`;function mt(e,t,n){return(t=ht(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ht(e){var t=gt(e,`string`);return typeof t==`symbol`?t:t+``}function gt(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var _t=Symbol(`WebComponentMetadata`),P=class extends dt{constructor(...e){super(...e),mt(this,_t,void 0),mt(this,`internals`,void 0),mt(this,`globalListeners`,[]),mt(this,`traits`,[])}static finalizeStyles(e){return[pt,...super.finalizeStyles(e)]}disconnectedCallback(){super.disconnectedCallback();for(let[e,t]of this.globalListeners)window.removeEventListener(e,t);this.globalListeners=[]}addTrait(e){return this.traits.push(e),e}firstUpdated(){this.forwardMethodCall(`firstUpdated`)}updated(e){this.forwardMethodCall(`updated`,e)}formResetCallback(){this.forwardMethodCall(`formResetCallback`)}willUpdate(e){super.willUpdate(e);let t=this.static().states;if(t)for(let[e,n]of Object.entries(t))this.toggleAttribute(`data-state-${e}`,!!n(this))}addGlobalEventListener(e,t){this.globalListeners.push([e,t]),window.addEventListener(e,t)}render(){return M`<slot></slot>`}getInternals(){return this.internals??=this.attachInternals(),this.internals}static(){return this.constructor}forwardMethodCall(e,...t){for(let n of this.traits)n[e]?.(...t)}};mt(P,`states`,void 0);var vt,yt,bt,xt,St;function Ct(e,t,n){wt(e,t),t.set(e,n)}function wt(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function Tt(e,t,n){return(t=At(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Et(e,t,n){return e.set(Ot(e,t),n),n}function Dt(e,t){return e.get(Ot(e,t))}function Ot(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function kt(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:Mt(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||Mt(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return Nt(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:At(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function At(e){var t=jt(e,`string`);return typeof t==`symbol`?t:t+``}function jt(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Mt(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function Nt(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}var Pt=new WeakMap;St=(bt=A({context:te,subscribe:!0}),`dialogTrait`);var Ft=class extends P{get context(){return Dt(Pt,this)}set context(e){Et(Pt,this,e)}constructor(){super(),Tt(this,St,void yt(this)),Ct(this,Pt,xt(this,ee)),this.dialogTrait=this.addTrait(new S(this,{getContext:()=>this.context}))}close(e){this.dialogTrait.close(e)}};vt=Ft,[xt,yt]=kt(vt,[[bt,1,`context`]],[],0,void 0,P).e;var It=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})},Lt={attribute:!0,type:String,converter:Se,reflect:!1,hasChanged:Ce},Rt=(e=Lt,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function F(e){return(t,n)=>typeof n==`object`?Rt(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function I(e){return F({...e,state:!0,attribute:!1})}var zt=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function Bt(e,t){return(n,r,i)=>{let a=t=>t.renderRoot?.querySelector(e)??null;if(t){let{get:e,set:t}=typeof r==`object`?n:i??(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return zt(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return zt(n,r,{get(){return a(this)}})}}function Vt(e,t,n){return(t=Ht(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ht(e){var t=Ut(e,`string`);return typeof t==`symbol`?t:t+``}function Ut(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Wt=class{constructor(e,t){Vt(this,`controlId`,void 0),Vt(this,`labelId`,void 0),Vt(this,`target`,void 0),Vt(this,`config`,void 0),this.config=t,this.controlId=`control-${j()}`,this.labelId=`label-${this.controlId}`,this.target=e}firstUpdated(){this.config.getInternals().setFormValue(this.target.value??``),this.updateValidity()}updated(e){(e.has(`value`)||e.has(`required`))&&this.updateValidity()}formResetCallback(){this.target.value=``,this.config.getInternals().setFormValue(``),this.updateValidity()}renderLabel(){return this.target.label?M`<label id="${this.labelId}" for="${this.controlId}" class=${this.target.srOnlyLabel?`sr-only`:N}>${this.target.label}</label>`:N}onInput(){this.setValue(this.config.getControlElement()?.value??null)}onSubmit(){this.config.getInternals().form?.requestSubmit()}setValue(e){this.target.value=e,this.config.getInternals().setFormValue(this.target.value??``),this.target.dispatchEvent(new InputEvent(`input`,{bubbles:!0,composed:!0}))}updateValidity(){let e=this.config.getInternals();this.target.required&&(this.target.value??``)===``?e.setValidity({valueMissing:!0},`Please fill out this field.`,this.config.getControlElement()??void 0):e.setValidity({})}},Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn;function ln(e,t,n){un(e,t),t.set(e,n)}function un(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function dn(e,t,n){return(t=gn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fn(e,t,n){return e.set(mn(e,t),n),n}function pn(e,t){return e.get(mn(e,t))}function mn(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function hn(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:vn(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||vn(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return yn(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:gn(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function gn(e){var t=_n(e,`string`);return typeof t==`symbol`?t:t+``}function _n(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function vn(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function yn(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}var bn=new WeakMap,xn=new WeakMap,Sn=new WeakMap,Cn=new WeakMap,wn=new WeakMap,Tn=new WeakMap,En=new WeakMap;cn=(qt=F({type:String,reflect:!0}),Yt=F({type:Boolean,reflect:!0,attribute:`sr-only-label`}),Zt=F({type:String,reflect:!0}),$t=F(),tn=F({type:String,reflect:!0}),rn=F({type:Boolean,reflect:!0}),on=F({type:Boolean,reflect:!0}),`formAssociated`);var Dn=class extends P{get label(){return pn(bn,this)}set label(e){fn(bn,this,e)}get srOnlyLabel(){return pn(xn,this)}set srOnlyLabel(e){fn(xn,this,e)}get name(){return pn(Sn,this)}set name(e){fn(Sn,this,e)}get value(){return pn(Cn,this)}set value(e){fn(Cn,this,e)}get placeholder(){return pn(wn,this)}set placeholder(e){fn(wn,this,e)}get required(){return pn(Tn,this)}set required(e){fn(Tn,this,e)}get disabled(){return pn(En,this)}set disabled(e){fn(En,this,e)}constructor(){super(),ln(this,bn,(Kt(this),Jt(this,``))),ln(this,xn,Xt(this,!1)),ln(this,Sn,Qt(this,``)),ln(this,Cn,en(this,null)),ln(this,wn,nn(this,``)),ln(this,Tn,an(this,!1)),ln(this,En,sn(this,!1)),dn(this,`controlTrait`,void 0),this.controlTrait=this.addTrait(new Wt(this,{getControlElement:()=>this.controlElement,getInternals:()=>this.getInternals()}))}};Gt=Dn,[Jt,Xt,Qt,en,nn,an,sn,Kt]=hn(Gt,[[qt,1,`label`],[Yt,1,`srOnlyLabel`],[Zt,1,`name`],[$t,1,`value`],[tn,1,`placeholder`],[rn,1,`required`],[on,1,`disabled`]],[],0,void 0,P).e,dn(Dn,cn,!0);var On=class{webId;avatarUrl;constructor(e,t){this.webId=e,this.avatarUrl=t}},kn=class{initialized=!1;account=null;async login(){throw Error(`Can't use auth, missing context provider`)}async signup(){throw Error(`Can't use auth, missing context provider`)}async logout(){throw Error(`Can't use auth, missing context provider`)}onSessionUpdated(){return()=>void 0}},An=new kn,jn=w(Symbol(`auth`)),L=(0,p(u(((e,t)=>{var n={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#`};function r(e={namedNode:e=>e}){let t={};for(let r in n){let i=n[r];t[r]=function(t=``){return e.namedNode(i+t)}}return t}t.exports=r}))()).default)(t),Mn=class{id;element;config;constructor(e,t={}){this.id=j(),this.config=t,this.element=e}closed(e){this.config.onClose?.(e)}},Nn=`solid-ui:show-dialog`,Pn=class e extends Event{static eventName=Nn;constructor(t){super(e.eventName,{bubbles:!0,composed:!0}),this.dialog=t}};function Fn(e,t){let n=new e;Object.assign(n,t?.props);let r=new Mn(n,t);return document.dispatchEvent(new Pn(r)),r.element}var In=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m6 9l6 6l6-6"/></svg>`}};customElements.get(`icon-lucide-chevron-down`)||customElements.define(`icon-lucide-chevron-down`,In);var Ln=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6L6 18M6 6l12 12"/></svg>`}};customElements.get(`icon-lucide-x`)||customElements.define(`icon-lucide-x`,Ln);var Rn=ce`:host{background:var(--solid-ui-color-slate-50);border-bottom:1px solid var(--solid-ui-color-slate-200);font-size:var(--solid-ui-font-size-lg);justify-content:space-between;align-items:center;gap:15px;padding:15px;font-weight:500;display:flex}`,zn,Bn,Vn,Hn,Un;function Wn(e,t,n){return(t=Kn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gn(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:Jn(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||Jn(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return Yn(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:Kn(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function Kn(e){var t=qn(e,`string`);return typeof t==`symbol`?t:t+``}function qn(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Jn(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function Yn(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function Xn(e){return e}Hn=[g(`solid-ui-dialog-header`)];var Zn;new(Un=(Bn=class extends P{},[Zn,Vn]=Gn(Bn,[],Hn,0,void 0,P).c,Bn),zn=class extends Xn{constructor(){super(Zn),Wn(this,`styles`,Rn),Vn()}},Wn(zn,Un,void 0),zn);var Qn=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><path fill="currentColor" d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z"><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></svg>`}};customElements.get(`icon-svg-spinners-180-ring`)||customElements.define(`icon-svg-spinners-180-ring`,Qn);var $n=ce`:host{--text-color:var(--solid-ui-color-white);--border-color:var(--solid-ui-color-primary);--background-color:var(--solid-ui-color-primary);--hover-text-color:var(--text-color);--hover-border-color:var(--solid-ui-color-tertiary);--hover-background-color:var(--solid-ui-color-tertiary);display:inline-flex;& button{font-size:var(--solid-ui-font-size-md);color:var(--text-color);background:var(--background-color);border:1px solid var(--border-color);border-radius:5px;flex:1;justify-content:center;align-items:center;gap:5px;padding:7px 12px;font-weight:600;display:flex;position:relative;&:disabled{opacity:.5;cursor:not-allowed}&:hover:not(:disabled){color:var(--hover-text-color);background:var(--hover-background-color);border-color:var(--hover-border-color)}& icon-svg-spinners-180-ring,& ::slotted([slot=left-icon]),& ::slotted([slot=right-icon]){width:var(--solid-ui-font-size-md);height:var(--solid-ui-font-size-md)}&:after{content:\"\";width:var(--solid-ui-clickable-area);height:var(--solid-ui-clickable-area);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}}}:host([data-has-icon-slot]) button{padding:4px;& ::slotted([slot=icon]){width:var(--solid-ui-font-size-2xl);height:var(--solid-ui-font-size-2xl)}}:host([variant=secondary]) button{--text-color:var(--solid-ui-color-gray-800);--border-color:var(--solid-ui-color-slate-400);--background-color:var(--solid-ui-color-white);--hover-text-color:var(--solid-ui-color-white);--hover-background-color:var(--solid-ui-color-tertiary);--hover-border-color:var(--solid-ui-color-tertiary)}:host([variant=tertiary]) button{--text-color:var(--solid-ui-color-primary);--border-color:transparent;--background-color:transparent;--hover-text-color:var(--solid-ui-color-tertiary);--hover-border-color:var(--solid-ui-color-tertiary);--hover-background-color:transparent;border-width:0 0 1px;border-radius:0;padding:0}:host([variant=outline]) button{--text-color:currentColor;--border-color:currentColor;--background-color:transparent;--hover-text-color:currentColor;--hover-border-color:currentColor;--hover-background-color:color-mix(in srgb, currentColor 25%, transparent)}:host([variant=ghost]) button{--text-color:currentColor;--border-color:transparent;--background-color:transparent;--hover-text-color:currentColor;--hover-border-color:transparent;--hover-background-color:var(--solid-ui-color-primary-hover)}`,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr;function yr(e,t,n){br(e,t),t.set(e,n)}function br(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function xr(e,t,n){return e.set(Cr(e,t),n),n}function Sr(e,t){return e.get(Cr(e,t))}function Cr(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function wr(e,t,n){return(t=Er(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tr(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:Or(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||Or(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return kr(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:Er(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function Er(e){var t=Dr(e,`string`);return typeof t==`symbol`?t:t+``}function Dr(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Or(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function kr(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function Ar(e){return e}cr=[g(`solid-ui-button`)];var jr;new(_r=(nr=new WeakMap,rr=new WeakMap,ir=new WeakMap,ar=new WeakMap,vr=(lr=F({type:String,reflect:!0}),dr=F({type:String,reflect:!0}),pr=F({type:Boolean}),hr=F({type:Boolean}),`variant`),tr=class extends P{constructor(...e){super(...e),yr(this,nr,(or(this),ur(this,`primary`))),yr(this,rr,fr(this,`button`)),yr(this,ir,mr(this,void 0)),yr(this,ar,gr(this,!1))}get[vr](){return Sr(nr,this)}set variant(e){xr(nr,this,e)}get type(){return Sr(rr,this)}set type(e){xr(rr,this,e)}get disabled(){return Sr(ir,this)}set disabled(e){xr(ir,this,e)}get loading(){return Sr(ar,this)}set loading(e){xr(ar,this,e)}render(){let e=this.disabled??this.loading;return M`
|
|
2
|
+
\f\r]`,Be=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ve=/-->/g,He=/>/g,Ue=RegExp(`>|${ze}(?:([^\\s"'>=/]+)(${ze}*=${ze}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),We=/'/g,Ge=/"/g,Ke=/^(?:script|style|textarea|title)$/i,M=(e=>(t,...n)=>({_$litType$:e,strings:t,values:n}))(1),qe=Symbol.for(`lit-noChange`),N=Symbol.for(`lit-nothing`),Je=new WeakMap,Ye=Pe.createTreeWalker(Pe,129);function Xe(e,t){if(!Le(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return ke===void 0?t:ke.createHTML(t)}var Ze=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=Be;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===Be?c[1]===`!--`?o=Ve:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=Ue):(Ke.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=Ue):o=He:o===Ue?c[0]===`>`?(o=i??Be,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?Ue:c[3]===`"`?Ge:We):o===Ge||o===We?o=Ue:o===Ve||o===He?o=Be:(o=Ue,i=void 0);let d=o===Ue&&e[t+1].startsWith(`/>`)?` `:``;a+=o===Be?n+Ne:l>=0?(r.push(s),n.slice(0,l)+Ae+n.slice(l)+je+d):n+je+(l===-2?t:d)}return[Xe(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},Qe=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=Ze(t,n);if(this.el=e.createElement(l,r),Ye.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=Ye.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(Ae)){let t=u[o++],n=i.getAttribute(e).split(je),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?rt:r[1]===`?`?it:r[1]===`@`?at:nt}),i.removeAttribute(e)}else e.startsWith(je)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(Ke.test(i.tagName)){let e=i.textContent.split(je),t=e.length-1;if(t>0){i.textContent=Oe?Oe.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],Fe()),Ye.nextNode(),c.push({type:2,index:++a});i.append(e[t],Fe())}}}else if(i.nodeType===8){if(i.data===Me)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(je,e+1))!==-1;)c.push({type:7,index:a}),e+=je.length-1}}a++}}static createElement(e,t){let n=Pe.createElement(`template`);return n.innerHTML=e,n}};function $e(e,t,n=e,r){if(t===qe)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=Ie(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=$e(e,i._$AS(e,t.values),i,r)),t}var et=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??Pe).importNode(t,!0);Ye.currentNode=r;let i=Ye.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new tt(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new ot(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=Ye.nextNode(),a++)}return Ye.currentNode=Pe,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},tt=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=N,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=$e(this,e,t),Ie(e)?e===N||e==null||e===``?(this._$AH!==N&&this._$AR(),this._$AH=N):e!==this._$AH&&e!==qe&&this._(e):e._$litType$===void 0?e.nodeType===void 0?Re(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==N&&Ie(this._$AH)?this._$AA.nextSibling.data=e:this.T(Pe.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=Qe.createElement(Xe(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new et(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=Je.get(e.strings);return t===void 0&&Je.set(e.strings,t=new Qe(e)),t}k(t){Le(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(Fe()),this.O(Fe()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=De(e).nextSibling;De(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},nt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=N,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=N}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=$e(this,e,t,0),a=!Ie(e)||e!==this._$AH&&e!==qe,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=$e(this,r[n+o],t,o),s===qe&&(s=this._$AH[o]),a||=!Ie(s)||s!==this._$AH[o],s===N?e=N:e!==N&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===N?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},rt=class extends nt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===N?void 0:e}},it=class extends nt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==N)}},at=class extends nt{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=$e(this,e,t,0)??N)===qe)return;let n=this._$AH,r=e===N&&n!==N||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==N&&(n===N||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ot=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){$e(this,e)}},st={M:Ae,P:je,A:Me,C:1,L:Ze,R:et,D:Re,V:$e,I:tt,H:nt,N:it,U:at,B:rt,F:ot},ct=Ee.litHtmlPolyfillSupport;ct?.(Qe,tt),(Ee.litHtmlVersions??=[]).push(`3.3.3`);var lt=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new tt(t.insertBefore(Fe(),e),e,void 0,n??{})}return i._$AI(e),i},ut=globalThis,dt=class extends Te{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=lt(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return qe}};dt._$litElement$=!0,dt.finalized=!0,ut.litElementHydrateSupport?.({LitElement:dt});var ft=ut.litElementPolyfillSupport;ft?.({LitElement:dt}),(ut.litElementVersions??=[]).push(`4.2.2`);var pt=ce`/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid}::file-selector-button{box-sizing:border-box;border:0 solid}a,abbr,address,area,article,aside,audio,b,base,bdi,bdo,blockquote,body,br,button,canvas,caption,cite,code,col,colgroup,data,datalist,dd,del,details,dfn,dialog,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,i,iframe,img,input,ins,kbd,label,legend,li,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,optgroup,option,output,p,picture,pre,progress,q,rp,rt,ruby,s,samp,script,search,section,select,slot,small,source,span,strong,style,sub,summary,sup,table,tbody,td,template,textarea,tfoot,th,thead,time,title,tr,track,u,ul,var,video,wbr,:after,:before,::backdrop{margin:0;padding:0}::file-selector-button{margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}`;function mt(e,t,n){return(t=ht(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ht(e){var t=gt(e,`string`);return typeof t==`symbol`?t:t+``}function gt(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var _t=Symbol(`WebComponentMetadata`),P=class extends dt{constructor(...e){super(...e),mt(this,_t,void 0),mt(this,`internals`,void 0),mt(this,`globalListeners`,[]),mt(this,`traits`,[])}static finalizeStyles(e){return[pt,...super.finalizeStyles(e)]}disconnectedCallback(){super.disconnectedCallback();for(let[e,t]of this.globalListeners)window.removeEventListener(e,t);this.globalListeners=[]}addTrait(e){return this.traits.push(e),e}firstUpdated(){this.forwardMethodCall(`firstUpdated`)}updated(e){this.forwardMethodCall(`updated`,e)}formResetCallback(){this.forwardMethodCall(`formResetCallback`)}willUpdate(e){super.willUpdate(e);let t=this.static().states;if(t)for(let[e,n]of Object.entries(t))this.toggleAttribute(`data-state-${e}`,!!n(this))}addGlobalEventListener(e,t){this.globalListeners.push([e,t]),window.addEventListener(e,t)}render(){return M`<slot></slot>`}getInternals(){return this.internals??=this.attachInternals(),this.internals}static(){return this.constructor}forwardMethodCall(e,...t){for(let n of this.traits)n[e]?.(...t)}};mt(P,`states`,void 0);var vt,yt,bt,xt,St;function Ct(e,t,n){wt(e,t),t.set(e,n)}function wt(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function Tt(e,t,n){return(t=At(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Et(e,t,n){return e.set(Ot(e,t),n),n}function Dt(e,t){return e.get(Ot(e,t))}function Ot(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function kt(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:Mt(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||Mt(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return Nt(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:At(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function At(e){var t=jt(e,`string`);return typeof t==`symbol`?t:t+``}function jt(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Mt(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function Nt(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}var Pt=new WeakMap;St=(bt=A({context:te,subscribe:!0}),`dialogTrait`);var Ft=class extends P{get context(){return Dt(Pt,this)}set context(e){Et(Pt,this,e)}constructor(){super(),Tt(this,St,void yt(this)),Ct(this,Pt,xt(this,ee)),this.dialogTrait=this.addTrait(new S(this,{getContext:()=>this.context}))}close(e){this.dialogTrait.close(e)}};vt=Ft,[xt,yt]=kt(vt,[[bt,1,`context`]],[],0,void 0,P).e;var It=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})},Lt={attribute:!0,type:String,converter:Se,reflect:!1,hasChanged:Ce},Rt=(e=Lt,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function F(e){return(t,n)=>typeof n==`object`?Rt(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function I(e){return F({...e,state:!0,attribute:!1})}var zt=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function Bt(e,t){return(n,r,i)=>{let a=t=>t.renderRoot?.querySelector(e)??null;if(t){let{get:e,set:t}=typeof r==`object`?n:i??(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return zt(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return zt(n,r,{get(){return a(this)}})}}function Vt(e,t,n){return(t=Ht(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ht(e){var t=Ut(e,`string`);return typeof t==`symbol`?t:t+``}function Ut(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Wt=class{constructor(e,t){Vt(this,`controlId`,void 0),Vt(this,`labelId`,void 0),Vt(this,`target`,void 0),Vt(this,`config`,void 0),this.config=t,this.controlId=`control-${j()}`,this.labelId=`label-${this.controlId}`,this.target=e}firstUpdated(){this.config.getInternals().setFormValue(this.target.value??``),this.updateValidity()}updated(e){(e.has(`value`)||e.has(`required`))&&this.updateValidity()}formResetCallback(){this.target.value=``,this.config.getInternals().setFormValue(``),this.updateValidity()}renderLabel(){return this.target.label?M`<label id="${this.labelId}" for="${this.controlId}" class=${this.target.srOnlyLabel?`sr-only`:N}>${this.target.label}</label>`:N}onInput(){this.setValue(this.config.getControlElement()?.value??null)}onSubmit(){this.config.getInternals().form?.requestSubmit()}setValue(e){this.target.value=e,this.config.getInternals().setFormValue(this.target.value??``),this.target.dispatchEvent(new InputEvent(`input`,{bubbles:!0,composed:!0}))}updateValidity(){let e=this.config.getInternals();this.target.required&&(this.target.value??``)===``?e.setValidity({valueMissing:!0},`Please fill out this field.`,this.config.getControlElement()??void 0):e.setValidity({})}},Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn;function ln(e,t,n){un(e,t),t.set(e,n)}function un(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function dn(e,t,n){return(t=gn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fn(e,t,n){return e.set(mn(e,t),n),n}function pn(e,t){return e.get(mn(e,t))}function mn(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function hn(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:vn(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||vn(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return yn(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:gn(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function gn(e){var t=_n(e,`string`);return typeof t==`symbol`?t:t+``}function _n(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function vn(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function yn(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}var bn=new WeakMap,xn=new WeakMap,Sn=new WeakMap,Cn=new WeakMap,wn=new WeakMap,Tn=new WeakMap,En=new WeakMap;cn=(qt=F({type:String,reflect:!0}),Yt=F({type:Boolean,reflect:!0,attribute:`sr-only-label`}),Zt=F({type:String,reflect:!0}),$t=F(),tn=F({type:String,reflect:!0}),rn=F({type:Boolean,reflect:!0}),on=F({type:Boolean,reflect:!0}),`formAssociated`);var Dn=class extends P{get label(){return pn(bn,this)}set label(e){fn(bn,this,e)}get srOnlyLabel(){return pn(xn,this)}set srOnlyLabel(e){fn(xn,this,e)}get name(){return pn(Sn,this)}set name(e){fn(Sn,this,e)}get value(){return pn(Cn,this)}set value(e){fn(Cn,this,e)}get placeholder(){return pn(wn,this)}set placeholder(e){fn(wn,this,e)}get required(){return pn(Tn,this)}set required(e){fn(Tn,this,e)}get disabled(){return pn(En,this)}set disabled(e){fn(En,this,e)}constructor(){super(),ln(this,bn,(Kt(this),Jt(this,``))),ln(this,xn,Xt(this,!1)),ln(this,Sn,Qt(this,``)),ln(this,Cn,en(this,null)),ln(this,wn,nn(this,``)),ln(this,Tn,an(this,!1)),ln(this,En,sn(this,!1)),dn(this,`controlTrait`,void 0),this.controlTrait=this.addTrait(new Wt(this,{getControlElement:()=>this.controlElement,getInternals:()=>this.getInternals()}))}};Gt=Dn,[Jt,Xt,Qt,en,nn,an,sn,Kt]=hn(Gt,[[qt,1,`label`],[Yt,1,`srOnlyLabel`],[Zt,1,`name`],[$t,1,`value`],[tn,1,`placeholder`],[rn,1,`required`],[on,1,`disabled`]],[],0,void 0,P).e,dn(Dn,cn,!0);var On=class{webId;avatarUrl;constructor(e,t){this.webId=e,this.avatarUrl=t}},kn=class{initialized=!1;account=null;async login(){throw Error(`Can't use auth, missing context provider`)}async signup(){throw Error(`Can't use auth, missing context provider`)}async logout(){throw Error(`Can't use auth, missing context provider`)}onSessionUpdated(){return()=>void 0}},An=new kn,jn=w(Symbol(`auth`)),L=(0,p(u(((e,t)=>{var n={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#`};function r(e={namedNode:e=>e}){let t={};for(let r in n){let i=n[r];t[r]=function(t=``){return e.namedNode(i+t)}}return t}t.exports=r}))()).default)(t),Mn=class{id;element;config;constructor(e,t={}){this.id=j(),this.config=t,this.element=e}closed(e){this.config.onClose?.(e)}},Nn=`solid-ui:show-dialog`,Pn=class e extends Event{static eventName=Nn;constructor(t){super(e.eventName,{bubbles:!0,composed:!0}),this.dialog=t}};function Fn(e,t){let n=new e;Object.assign(n,t?.props);let r=new Mn(n,t);return document.dispatchEvent(new Pn(r)),r.element}var In=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m6 9l6 6l6-6"/></svg>`}};customElements.get(`icon-lucide-chevron-down`)||customElements.define(`icon-lucide-chevron-down`,In);var Ln=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6L6 18M6 6l12 12"/></svg>`}};customElements.get(`icon-lucide-x`)||customElements.define(`icon-lucide-x`,Ln);var Rn=ce`:host{background:var(--solid-ui-color-slate-50);border-bottom:1px solid var(--solid-ui-color-slate-200);font-size:var(--solid-ui-font-size-lg);justify-content:space-between;align-items:center;gap:15px;padding:15px;font-weight:500;display:flex}`,zn,Bn,Vn,Hn,Un;function Wn(e,t,n){return(t=Kn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gn(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:Jn(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||Jn(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return Yn(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:Kn(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function Kn(e){var t=qn(e,`string`);return typeof t==`symbol`?t:t+``}function qn(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Jn(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function Yn(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function Xn(e){return e}Hn=[g(`solid-ui-dialog-header`)];var Zn;new(Un=(Bn=class extends P{},[Zn,Vn]=Gn(Bn,[],Hn,0,void 0,P).c,Bn),zn=class extends Xn{constructor(){super(Zn),Wn(this,`styles`,Rn),Vn()}},Wn(zn,Un,void 0),zn);var Qn=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><path fill="currentColor" d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z"><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></svg>`}};customElements.get(`icon-svg-spinners-180-ring`)||customElements.define(`icon-svg-spinners-180-ring`,Qn);var $n=ce`:host{--text-color:var(--solid-ui-color-white);--border-color:var(--solid-ui-color-primary);--background-color:var(--solid-ui-color-primary);--hover-text-color:var(--text-color);--hover-border-color:var(--solid-ui-color-tertiary);--hover-background-color:var(--solid-ui-color-tertiary);display:inline-flex;& button{font-size:var(--solid-ui-font-size-md);color:var(--text-color);background:var(--background-color);border:1px solid var(--border-color);border-radius:5px;flex:1;justify-content:center;align-items:center;gap:5px;padding:7px 12px;font-weight:600;display:flex;position:relative;&:disabled{opacity:.5;cursor:not-allowed}&:hover:not(:disabled){color:var(--hover-text-color);background:var(--hover-background-color);border-color:var(--hover-border-color)}& icon-svg-spinners-180-ring,& ::slotted([slot=left-icon]),& ::slotted([slot=right-icon]){width:var(--solid-ui-font-size-md);height:var(--solid-ui-font-size-md)}&:after{content:\"\";width:var(--solid-ui-clickable-area);height:var(--solid-ui-clickable-area);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}}}:host([data-has-icon-slot]) button{padding:4px;& ::slotted([slot=icon]){width:var(--solid-ui-font-size-2xl);height:var(--solid-ui-font-size-2xl)}}:host([variant=secondary]) button{--text-color:var(--solid-ui-color-gray-800);--border-color:var(--solid-ui-color-slate-400);--background-color:var(--solid-ui-color-white);--hover-text-color:var(--solid-ui-color-white);--hover-background-color:var(--solid-ui-color-tertiary);--hover-border-color:var(--solid-ui-color-tertiary)}:host([variant=tertiary]) button{--text-color:var(--solid-ui-color-primary);--border-color:transparent;--background-color:transparent;--hover-text-color:var(--solid-ui-color-tertiary);--hover-border-color:var(--solid-ui-color-tertiary);--hover-background-color:transparent;border-width:0 0 1px;border-radius:0;padding:0}:host([variant=outline]) button{--text-color:currentColor;--border-color:currentColor;--background-color:transparent;--hover-text-color:currentColor;--hover-border-color:currentColor;--hover-background-color:color-mix(in srgb, currentColor 25%, transparent)}:host([variant=ghost]) button{--text-color:currentColor;--border-color:transparent;--background-color:transparent;--hover-text-color:currentColor;--hover-border-color:transparent;--hover-background-color:var(--solid-ui-color-primary-hover)}`,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr;function yr(e,t,n){br(e,t),t.set(e,n)}function br(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function xr(e,t,n){return e.set(Cr(e,t),n),n}function Sr(e,t){return e.get(Cr(e,t))}function Cr(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function wr(e,t,n){return(t=Er(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tr(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:Or(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||Or(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return kr(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:Er(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function Er(e){var t=Dr(e,`string`);return typeof t==`symbol`?t:t+``}function Dr(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Or(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function kr(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function Ar(e){return e}cr=[g(`solid-ui-button`)];var jr;new(_r=(nr=new WeakMap,rr=new WeakMap,ir=new WeakMap,ar=new WeakMap,vr=(lr=F({type:String,reflect:!0}),dr=F({type:String,reflect:!0}),pr=F({type:Boolean}),hr=F({type:Boolean}),`variant`),tr=class extends P{constructor(...e){super(...e),yr(this,nr,(or(this),ur(this,`primary`))),yr(this,rr,fr(this,`button`)),yr(this,ir,mr(this,void 0)),yr(this,ar,gr(this,!1))}get[vr](){return Sr(nr,this)}set variant(e){xr(nr,this,e)}get type(){return Sr(rr,this)}set type(e){xr(rr,this,e)}get disabled(){return Sr(ir,this)}set disabled(e){xr(ir,this,e)}get loading(){return Sr(ar,this)}set loading(e){xr(ar,this,e)}render(){let e=this.disabled??this.loading;return M`
|
|
3
3
|
<button type=${this.type} ?disabled=${e} @click=${this.onClick}>
|
|
4
4
|
${this.loading?M`<icon-svg-spinners-180-ring></icon-svg-spinners-180-ring>`:N}
|
|
5
5
|
<slot name="left-icon"></slot>
|
|
@@ -2515,7 +2515,7 @@ optional { ?location wdt:P17 ?country }
|
|
|
2515
2515
|
padding-top: 10px;
|
|
2516
2516
|
`);let m=e.createElement(`label`);m.innerText=`Or pick an identity provider from the list below:`,m.setAttribute(`style`,`color: #888`),p.appendChild(m),(0,n.getSuggestedIssuers)().forEach(t=>{let n=e.createElement(`button`);n.innerText=t.name,n.setAttribute(`style`,`height: 38px; margin-top: 10px`),n.addEventListener(`click`,()=>{s(t.uri)}),p.appendChild(n)}),r.appendChild(p)}function OF(e,t=null,r={}){let i=(0,n.offlineTestID)(),a=e.createElement(`div`);function o(e){e&&(i=n.authn.saveUser(e),a.refresh(),t&&t(i.uri))}function s(e){let r=i;n.authSession.logout().then(function(){let e=`Your WebID was ${r}. It has been forgotten.`;i=null;try{Xd(e)}catch{window.alert(e)}a.refresh(),t&&t(null)},e=>{Xd(`Fail to log out:`+e)})}function c(t,r){let i=r.buttonStyle||V.signInAndUpButtonStyle,a=`WebID logout`;if(t){let e=n.solidLogicSingleton.store.any(t,L.foaf(`nick`))||n.solidLogicSingleton.store.any(t,L.foaf(`name`));e&&(a=`Logout `+e.value)}let o=e.createElement(`input`);return o.setAttribute(`type`,`button`),o.setAttribute(`value`,a),o.setAttribute(`style`,`${i}`),o.addEventListener(`click`,s,!1),o}a.refresh=function(){let t=n.authSession.webId;i=t?n.solidLogicSingleton.store.sym(t):null,(i&&a.me!==i.uri||!i&&a.me)&&(Fp(a),i?a.appendChild(c(i,r)):a.appendChild(EF(e,o,r))),a.me=i?i.uri:null},a.refresh();function l(){i=n.authn.currentUser(),a.refresh()}return l(),n.authSession.events.on(`login`,l),n.authSession.events.on(`logout`,l),a.me=`99999`,a.refresh(),a}n.authSession.events.on(`logout`,async()=>{let e=window.localStorage.getItem(`loginIssuer`);if(e)try{n.solidLogicSingleton.store.updater.flagAuthorizationMetadata();let t=new URL(e);t.pathname=`/.well-known/openid-configuration`;let r=await fetch(t.toString());if(r.status===200){let e=await r.json();e&&e.end_session_endpoint&&await fetch(e.end_session_endpoint,{credentials:`include`})}try{await fetch(`/.well-known/solid/logout`,{credentials:`include`})}catch{}}catch{}window.location.reload()});function kF(e,r,i){let a=r.noun,o=r.appPathSegment,s=(0,n.offlineTestID)(),c=e.createElement(`div`),l={me:s,dom:e,div:c};function u(t,n){c.appendChild(H(e,t,n))}function d(e){let t=n.solidLogicSingleton.store.any(e,L.space(`uriPrefix`)),r;return r=t?t.value:e.uri.split(`#`)[0],r.slice(-1)!==`/`&&(B(`${o}: No / at end of uriPrefix ${r}`),r=`${r}/`),r+=`${o}/id${new Date().getTime()}/`,r}function f(r){async function o(i){let a=h.appendChild(e.createElement(`tr`)).appendChild(e.createElement(`td`));a.setAttribute(`colspan`,`3`),a.style.padding=`0.5em`;let o=encodeURI(await tm(e,n.solidLogicSingleton.store,a,L.solid(`URL`),L.space(`Workspace`),`Workspace`)),s=Qh(r.preferencesFile),c=[(0,t.st)(r.me,L.space(`workspace`),s,r.preferencesFile),(0,t.st)(s,L.space(`uriPrefix`),o,r.preferencesFile)];if(!n.solidLogicSingleton.store.updater)throw Error(`store has no updater`);await n.solidLogicSingleton.store.updater.update([],c)}let s=r.me,l=r.preferencesFile,f=null,p=n.solidLogicSingleton.store.each(s,L.space(`workspace`),void 0,l),m=n.solidLogicSingleton.store.each(s,L.space(`storage`));p.length===0&&m&&(u(`You don't seem to have any workspaces. You have ${m.length} storage spaces.`,`white`),m.map(function(e){return p=p.concat(n.solidLogicSingleton.store.each(e,L.ldp(`contains`))),p}).filter(e=>e.id?[`public`,`private`].includes(e.id().toLowerCase()):``)),p.length===1&&(u(`Workspace used: ${p[0].uri}`,`white`),f=d(p[0]));let h=e.createElement(`table`);h.setAttribute(`style`,`border-collapse:separate; border-spacing: 0.5em;`),c.appendChild(h),c.appendChild(e.createElement(`hr`));let g=c.appendChild(e.createElement(`p`));g.setAttribute(`style`,V.commentStyle),g.textContent=`Where would you like to store the data for the ${a}?
|
|
2517
2517
|
Give the URL of the folder where you would like the data stored.
|
|
2518
|
-
It can be anywhere in solid world - this URI is just an idea.`;let _=c.appendChild(e.createElement(`input`));_.setAttribute(`type`,`text`),_.setAttribute(`style`,V.textInputStyle),_.size=80,_.label=`base URL`,_.autocomplete=`on`,f&&(_.value=f),r.baseField=_,c.appendChild(e.createElement(`br`));let v=c.appendChild(e.createElement(`button`));v.setAttribute(`style`,V.buttonStyle),v.textContent=`Start new ${a} at this URI`,v.addEventListener(`click`,function(e){let t=_.value.replace(` `,`%20`);t.slice(-1)!==`/`&&(t+=`/`),i(null,t)}),p=p.filter(function(e){return!n.solidLogicSingleton.store.holds(e,L.rdf(`type`),L.space(`MasterWorkspace`))});let y,b,x,S,C,w,T,E=`height: 3em; margin: 1em; padding: 1em white; border-radius: 0.3em;`,D=`${E}border: 0px;`;for(let t=0;t<p.length;t++){C=p[t],S=e.createElement(`tr`),t===0&&(y=e.createElement(`td`),y.setAttribute(`rowspan`,`${p.length}`),y.textContent=`Choose a workspace for this:`,y.setAttribute(`style`,`vertical-align:middle;`),S.appendChild(y)),b=e.createElement(`td`),w=n.solidLogicSingleton.store.anyValue(C,L.ui(`style`)),w||=`color: black ; background-color: ${`#${(function(e){return e.split(``).reduce(function(e,t){return e=(e<<5)-e+t.charCodeAt(0),e&e},0)}(C.uri)&16777215|12632256).toString(16)}`};`,b.setAttribute(`style`,D+w),S.target=C.uri;let r=n.solidLogicSingleton.store.any(C,L.rdfs(`label`));r||=C.uri.split(`/`).slice(-1)[0]||C.uri.split(`/`).slice(-2)[0],b.textContent=r||`???`,S.appendChild(b),t===0&&(x=e.createElement(`td`),x.setAttribute(`rowspan`,`${p.length}1`),x.setAttribute(`style`,`width:50%;`),S.appendChild(x)),h.appendChild(S),T=n.solidLogicSingleton.store.any(C,L.rdfs(`comment`)),T=T?T.value:`Use this workspace`,b.addEventListener(`click`,function(t){x.textContent=T?T.value:``,x.setAttribute(`style`,D+w);let n=e.createElement(`button`);n.textContent=`Continue`;let r=d(C);_.value=r,n.addEventListener(`click`,function(e){n.disabled=!0,i(C,r),n.textContent=`---->`},!0),x.appendChild(n)},!0)}let O=e.createElement(`tr`);b=e.createElement(`td`),b.setAttribute(`style`,E),b.textContent=`+ Make a new workspace`,b.addEventListener(`click`,o),O.appendChild(b),h.appendChild(O)}return yF(l).then(f).catch(e=>{c.appendChild(H(l.dom,e))}),c}function AF(e,t,n){let r=function(e,t){n(e,t)},i=e.createElement(`div`),a=e.createElement(`button`);return a.setAttribute(`type`,`button`),i.appendChild(a),a.innerHTML=`Make new ${t.noun}`,a.addEventListener(`click`,n=>{i.appendChild(kF(e,t,r))},!1),i.appendChild(a),i}async function jF(){try{let{me:e,preferencesFile:t,preferencesFileError:r}=await yF({});if(!t||r)throw Error(r);return n.solidLogicSingleton.store.each(e,L.rdf(`type`),null,t.doc())}catch(e){cf(`Unable to fetch your preferences - this was the error: `,e)}return[]}async function MF(e){let t=await jF();return e.filter(e=>NF(e,t))}function NF(e,t){return(e.audience||[]).reduce((e,n)=>e&&!!t.find(e=>e.equals(n)),!0)}var PF=class{rootElement;barElement;isExpanded=!1;constructor(e){this.groupList=e,this.rootElement=e.controller.dom.createElement(`div`),this.barElement=e.controller.dom.createElement(`div`)}render(){return this.rootElement.innerHTML=``,this.rootElement.appendChild(this.renderAddButton()),this.rootElement.appendChild(this.barElement),this.rootElement}renderAddButton(){return Qp(this.groupList.controller.dom,`${U.iconBase}noun_34653_green.svg`,`Add ...`,()=>{this.toggleBar(),this.renderBar()})}renderBar(){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()))}renderSimplifiedBar(e){Array.from(this.barElement.children).filter(t=>t!==e).forEach(e=>this.barElement.removeChild(e))}renderPersonButton(){return Qp(this.groupList.controller.dom,U.iconBase+Up[`vcard:Individual`],`Add Person`,e=>{this.renderSimplifiedBar(e.target),this.renderNameForm(L.vcard(`Individual`),`person`).then(e=>this.addPerson(e)).then(()=>this.renderCleanup()).catch(e=>this.groupList.controller.renderStatus(e))})}renderGroupButton(){return Qp(this.groupList.controller.dom,U.iconBase+Up[`vcard:Group`],`Add Group`,e=>{this.renderSimplifiedBar(e.target),this.renderNameForm(L.vcard(`Group`),`group`).then(e=>this.addGroup(e)).then(()=>this.renderCleanup()).catch(e=>this.groupList.controller.renderStatus(e))})}renderNameForm(e,t){return tm(this.groupList.controller.dom,this.groupList.store,this.barElement,L.vcard(`URI`),e,t)}renderPublicButton(){return Qp(this.groupList.controller.dom,U.iconBase+Up[`foaf:Agent`],`Add Everyone`,()=>this.addAgent(L.foaf(`Agent`).uri).then(()=>this.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(()=>this.renderCleanup()))}renderAuthenticatedAgentButton(){return Qp(this.groupList.controller.dom,`${U.iconBase}noun_99101.svg`,`Anyone logged In`,()=>this.addAgent(L.acl(`AuthenticatedAgent`).uri).then(()=>this.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(()=>this.renderCleanup()))}renderBotButton(){return Qp(this.groupList.controller.dom,U.iconBase+`noun_Robot_849764.svg`,`A Software Agent (bot)`,e=>{this.renderSimplifiedBar(e.target),this.renderNameForm(L.schema(`Application`),`bot`).then(e=>this.addBot(e)).then(()=>this.renderCleanup())})}renderAppsButton(){return Qp(this.groupList.controller.dom,`${U.iconBase}noun_15177.svg`,`A Web App (origin)`,e=>{this.renderSimplifiedBar(e.target);let t={div:this.barElement,dom:this.groupList.controller.dom},n=this.renderAppsTable(t).catch(e=>this.groupList.controller.renderStatus(e));this.renderAppsView();let r=this.renderNameForm(L.schema(`WebApplication`),`webapp domain`).then(e=>this.getOriginFromName(e));Promise.race([n,r]).then(e=>{e&&this.groupList.addNewURI(e)}).then(()=>this.renderCleanup())})}renderAppsView(){let e=this.groupList.controller.context.session.paneRegistry.byName(`trustedApplications`);if(e){let t=e.render(null,this.groupList.controller.context);t.setAttribute(`style`,V.trustedAppController);let n=$p(this.groupList.controller.dom,()=>this.renderCleanup());n.setAttribute(`style`,V.trustedAppCancelButton),t.insertBefore(n,t.firstChild),this.barElement.appendChild(t)}}async renderAppsTable(e){await bF(e);let t=this.groupList.store.each(e.me,L.acl(`trustedApp`)),n=t.flatMap(e=>this.groupList.store.each(e,L.acl(`origin`)));return this.barElement.appendChild(this.groupList.controller.dom.createElement(`p`)).textContent=`You have ${n.length} selected web apps.`,new Promise((e,n)=>{let r=this.barElement.appendChild(this.groupList.controller.dom.createElement(`table`));r.setAttribute(`style`,V.trustedAppAddApplicationsTable),t.forEach(t=>{let i=this.groupList.store.any(t,L.acl(`origin`));i||n(Error(`Unable to pick app: ${t.value}`));let a=nm(this.groupList.controller.dom,L.acl(`origin`),i,{}),o=this.groupList.controller.dom.createElement(`table`),s=o.appendChild(this.groupList.controller.dom.createElement(`tr`));s.appendChild(this.groupList.controller.dom.createElement(`td`)).appendChild(a);let c=s.appendChild(this.groupList.controller.dom.createElement(`td`));c.textContent=`Give access to ${this.groupList.controller.noun} ${z(this.groupList.controller.subject)}?`,s.appendChild(this.groupList.controller.dom.createElement(`td`)).appendChild(em(this.groupList.controller.dom,()=>e(i.value))),r.appendChild(o)})})}renderCleanup(){this.renderBar(),this.groupList.render()}async addPerson(e){if(!e)return this.toggleBar();if(!e.match(/^https?:/i))return Promise.reject(Error(`Not a http URI`));B(`Adding to ACL person: ${e}`),await this.groupList.addNewURI(e),this.toggleBar()}async addGroup(e){if(!e)return this.toggleBar();if(!e.match(/^https?:/i))return Promise.reject(Error(`Not a http URI`));B(`Adding to ACL group: `+e),await this.groupList.addNewURI(e),this.toggleBar()}async addAgent(e){await this.groupList.addNewURI(e),this.toggleBar()}async addBot(e){if(!e)return this.toggleBar();if(!e.match(/^https?:/i))return Promise.reject(Error(`Not a http URI`));B(`Adding to ACL bot: `+e),await this.groupList.addNewURI(e),this.toggleBar()}async getOriginFromName(e){if(!e)return Promise.resolve();if(!e.match(/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i))return Promise.reject(Error(`Not a domain name`));let t=`https://`+e;return B(`Adding to ACL origin: `+t),this.toggleBar(),t}toggleBar(){this.isExpanded=!this.isExpanded}},FF=L.acl,IF={13:`Owners`,9:`Owners (write locked)`,5:`Editors`,3:`Posters`,2:`Submitters`,1:`Viewers`},LF={13:!0,5:!0,3:!0,2:!0,1:!0},RF={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`},zF=class{defaults;byCombo;aclMap;addAgentButton;rootElement;_store;constructor(e,t,n,r,i={}){this.doc=e,this.aclDoc=t,this.controller=n,this._options=i,this.defaults=this._options.defaults||!1,this._store=r,this.aclMap=UP(e,t,r,this.defaults),this.byCombo=qP(this.aclMap),this.addAgentButton=new PF(this),this.rootElement=this.controller.dom.createElement(`div`),this.rootElement.setAttribute(`style`,V.accessGroupList)}get store(){return this._store}set store(e){this._store=e,this.aclMap=UP(this.doc,this.aclDoc,e,this.defaults),this.byCombo=qP(this.aclMap)}render(){return this.rootElement.innerHTML=``,this.renderGroups().forEach(e=>this.rootElement.appendChild(e)),this.controller.isEditable&&this.rootElement.appendChild(this.addAgentButton.render()),this.rootElement}renderGroups(){let e=[];for(let t=15;t>0;t--){let n=BF(t);(this.controller.isEditable&&LF[t]||this.byCombo[n])&&e.push(this.renderGroup(t,n))}return e}renderGroup(e,t){let n=this.controller.dom.createElement(`div`);return n.setAttribute(`style`,V.accessGroupListItem),jf(n,e=>this.handleDroppedUris(e,t).then(()=>this.controller.render()).catch(e=>this.controller.renderStatus(e))),this.renderGroupElements(e,t).forEach(e=>n.appendChild(e)),n}renderGroupElements(e,t){let 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=IF[e]||VF(e);let r=this.controller.dom.createElement(`div`);if(r.setAttribute(`style`,V.group),this.controller.isEditable)switch(e){case 1:r.setAttribute(`style`,V.group1);break;case 2:r.setAttribute(`style`,V.group2);break;case 3:r.setAttribute(`style`,V.group3);break;case 5:r.setAttribute(`style`,V.group5);break;case 9:r.setAttribute(`style`,V.group9);break;case 13:r.setAttribute(`style`,V.group13);break;default:r.setAttribute(`style`,V.group)}let i=r.appendChild(this.controller.dom.createElement(`table`));(this.byCombo[t]||[]).map(([e,n])=>this.renderAgent(i,t,e,n)).forEach(e=>i.appendChild(e));let 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=RF[e]||`Unusual combination`,[n,r,a]}renderAgent(e,n,r,i){let a=nm(this.controller.dom,FF(r),(0,t.sym)(i),this.controller.isEditable?{deleteFunction:()=>this.deleteAgent(n,r,i).then(()=>e.removeChild(a)).catch(e=>this.controller.renderStatus(e))}:{});return a}async deleteAgent(e,t,n){let r=this.byCombo[e]||[],i=r.find(([e,r])=>e===t&&r===n);i&&r.splice(r.indexOf(i),1),await this.controller.save()}async addNewURI(e){await this.handleDroppedUri(e,BF(1)),await this.controller.save()}async handleDroppedUris(e,t){try{await Promise.all(e.map(e=>this.handleDroppedUri(e,t))),await this.controller.save()}catch(e){return Promise.reject(e)}}async handleDroppedUri(e,n,r=!1){let i=HF(e,this.store),a=(0,t.sym)(e);if(!i&&!r){B(` Not obvious: looking up dropped thing ${a}`);try{await this._store?.fetcher?.load(a.doc())}catch(e){let t=`Ignore error looking up dropped thing: ${e}`;return lf(t),Promise.reject(Error(t))}return this.handleDroppedUri(e,n,!0)}if(!i){let t=Object.keys(this.store.findTypeURIs(a)),n=t.length>0?`Detected RDF types: ${t.join(`, `)}`:`No RDF type was detected for this URI.`,r=`Error: Failed to add access target: ${e} is not a recognized ACL target type. Expected one of: vcard:WebID, vcard:Group, foaf:Person, foaf:Agent, solid:AppProvider, solid:AppProviderClass, or recognized ACL classes. Hint: try dropping a WebID profile URI, a vcard:Group URI, or a web app origin.`+n;return lf(r),Promise.reject(Error(r))}this.setACLCombo(n,e,i,this.controller.subject)}setACLCombo(e,t,n,r){e in this.byCombo||(this.byCombo[e]=[]),this.removeAgentFromCombos(t),this.byCombo[e].push([n.pred,n.obj.uri]),B(`ACL: setting access to ${r} by ${n.pred}: ${n.obj}`)}removeAgentFromCombos(e){for(let t=0;t<16;t++){let n=this.byCombo[BF(t)];if(n)for(let t=0;t<n.length;t++)for(;t<n.length&&n[t][1]===e;)n.splice(t,1)}}};function BF(e){let t=[`Read`,`Append`,`Write`,`Control`],n=[];for(let r=0;r<4;r++)e&1<<r&&n.push(`http://www.w3.org/ns/auth/acl#`+t[r]);return n.sort(),n.join(`
|
|
2518
|
+
It can be anywhere in solid world - this URI is just an idea.`;let _=c.appendChild(e.createElement(`input`));_.setAttribute(`type`,`text`),_.setAttribute(`style`,V.textInputStyle),_.size=80,_.label=`base URL`,_.autocomplete=`on`,f&&(_.value=f),r.baseField=_,c.appendChild(e.createElement(`br`));let v=c.appendChild(e.createElement(`button`));v.setAttribute(`style`,V.buttonStyle),v.textContent=`Start new ${a} at this URI`,v.addEventListener(`click`,function(e){let t=_.value.replace(` `,`%20`);t.slice(-1)!==`/`&&(t+=`/`),i(null,t)}),p=p.filter(function(e){return!n.solidLogicSingleton.store.holds(e,L.rdf(`type`),L.space(`MasterWorkspace`))});let y,b,x,S,C,w,T,E=`height: 3em; margin: 1em; padding: 1em white; border-radius: 0.3em;`,D=`${E}border: 0px;`;for(let t=0;t<p.length;t++){C=p[t],S=e.createElement(`tr`),t===0&&(y=e.createElement(`td`),y.setAttribute(`rowspan`,`${p.length}`),y.textContent=`Choose a workspace for this:`,y.setAttribute(`style`,`vertical-align:middle;`),S.appendChild(y)),b=e.createElement(`td`),w=n.solidLogicSingleton.store.anyValue(C,L.ui(`style`)),w||=`color: black ; background-color: ${`#${(function(e){return e.split(``).reduce(function(e,t){return e=(e<<5)-e+t.charCodeAt(0),e&e},0)}(C.uri)&16777215|12632256).toString(16)}`};`,b.setAttribute(`style`,D+w),S.target=C.uri;let r=n.solidLogicSingleton.store.any(C,L.rdfs(`label`));r||=C.uri.split(`/`).slice(-1)[0]||C.uri.split(`/`).slice(-2)[0],b.textContent=r||`???`,S.appendChild(b),t===0&&(x=e.createElement(`td`),x.setAttribute(`rowspan`,`${p.length}1`),x.setAttribute(`style`,`width:50%;`),S.appendChild(x)),h.appendChild(S),T=n.solidLogicSingleton.store.any(C,L.rdfs(`comment`)),T=T?T.value:`Use this workspace`,b.addEventListener(`click`,function(t){x.textContent=T?T.value:``,x.setAttribute(`style`,D+w);let n=e.createElement(`button`);n.textContent=`Continue`;let r=d(C);_.value=r,n.addEventListener(`click`,function(e){n.disabled=!0,i(C,r),n.textContent=`---->`},!0),x.appendChild(n)},!0)}let O=e.createElement(`tr`);b=e.createElement(`td`),b.setAttribute(`style`,E),b.textContent=`+ Make a new workspace`,b.addEventListener(`click`,o),O.appendChild(b),h.appendChild(O)}return yF(l).then(f).catch(e=>{c.appendChild(H(l.dom,e))}),c}function AF(e,t,n){let r=function(e,t){n(e,t)},i=e.createElement(`div`),a=e.createElement(`button`);return a.setAttribute(`type`,`button`),i.appendChild(a),a.innerHTML=`Make new ${t.noun}`,a.addEventListener(`click`,n=>{i.appendChild(kF(e,t,r))},!1),i.appendChild(a),i}async function jF(){try{let{me:e,preferencesFile:t,preferencesFileError:r}=await yF({});if(!t||r)throw Error(r);return n.solidLogicSingleton.store.each(e,L.rdf(`type`),null,t.doc())}catch(e){cf(`Unable to fetch your preferences - this was the error: `,e)}return[]}async function MF(e){let t=await jF();return e.filter(e=>NF(e,t))}function NF(e,t){return(e.audience||[]).reduce((e,n)=>e&&!!t.find(e=>e.equals(n)),!0)}var PF=class{rootElement;barElement;isExpanded=!1;constructor(e){this.groupList=e,this.rootElement=e.controller.dom.createElement(`div`),this.barElement=e.controller.dom.createElement(`div`)}render(){return this.rootElement.innerHTML=``,this.rootElement.appendChild(this.renderAddButton()),this.rootElement.appendChild(this.barElement),this.rootElement}renderAddButton(){return Qp(this.groupList.controller.dom,`${U.iconBase}noun_34653_green.svg`,`Add ...`,()=>{this.toggleBar(),this.renderBar()})}renderBar(){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()))}renderSimplifiedBar(e){Array.from(this.barElement.children).filter(t=>t!==e).forEach(e=>this.barElement.removeChild(e))}renderPersonButton(){return Qp(this.groupList.controller.dom,U.iconBase+Up[`vcard:Individual`],`Add Person`,e=>{this.renderSimplifiedBar(e.target),this.renderNameForm(L.vcard(`Individual`),`person`).then(e=>this.addPerson(e)).then(()=>this.renderCleanup()).catch(e=>this.groupList.controller.renderStatus(e))})}renderGroupButton(){return Qp(this.groupList.controller.dom,U.iconBase+Up[`vcard:Group`],`Add Group`,e=>{this.renderSimplifiedBar(e.target),this.renderNameForm(L.vcard(`Group`),`group`).then(e=>this.addGroup(e)).then(()=>this.renderCleanup()).catch(e=>this.groupList.controller.renderStatus(e))})}renderNameForm(e,t){return tm(this.groupList.controller.dom,this.groupList.store,this.barElement,L.vcard(`URI`),e,t)}renderPublicButton(){let e=Qp(this.groupList.controller.dom,U.iconBase+Up[`foaf:Agent`],`Add Everyone`,()=>this.addAgent(L.foaf(`Agent`).uri).then(()=>this.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(()=>this.renderCleanup()));return e.querySelector(`img`)?.setAttribute(`draggable`,`false`),Mf(e,L.foaf(`Agent`)),e}renderAuthenticatedAgentButton(){return Qp(this.groupList.controller.dom,`${U.iconBase}noun_99101.svg`,`Anyone logged In`,()=>this.addAgent(L.acl(`AuthenticatedAgent`).uri).then(()=>this.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(()=>this.renderCleanup()))}renderBotButton(){return Qp(this.groupList.controller.dom,U.iconBase+`noun_Robot_849764.svg`,`A Software Agent (bot)`,e=>{this.renderSimplifiedBar(e.target),this.renderNameForm(L.schema(`Application`),`bot`).then(e=>this.addBot(e)).then(()=>this.renderCleanup())})}renderAppsButton(){return Qp(this.groupList.controller.dom,`${U.iconBase}noun_15177.svg`,`A Web App (origin)`,e=>{this.renderSimplifiedBar(e.target);let t={div:this.barElement,dom:this.groupList.controller.dom},n=this.renderAppsTable(t).catch(e=>this.groupList.controller.renderStatus(e));this.renderAppsView();let r=this.renderNameForm(L.schema(`WebApplication`),`webapp domain`).then(e=>this.getOriginFromName(e));Promise.race([n,r]).then(e=>{e&&this.groupList.addNewURI(e)}).then(()=>this.renderCleanup())})}renderAppsView(){let e=this.groupList.controller.context.session.paneRegistry.byName(`trustedApplications`);if(e){let t=e.render(null,this.groupList.controller.context);t.setAttribute(`style`,V.trustedAppController);let n=$p(this.groupList.controller.dom,()=>this.renderCleanup());n.setAttribute(`style`,V.trustedAppCancelButton),t.insertBefore(n,t.firstChild),this.barElement.appendChild(t)}}async renderAppsTable(e){await bF(e);let t=this.groupList.store.each(e.me,L.acl(`trustedApp`)),n=t.flatMap(e=>this.groupList.store.each(e,L.acl(`origin`)));return this.barElement.appendChild(this.groupList.controller.dom.createElement(`p`)).textContent=`You have ${n.length} selected web apps.`,new Promise((e,n)=>{let r=this.barElement.appendChild(this.groupList.controller.dom.createElement(`table`));r.setAttribute(`style`,V.trustedAppAddApplicationsTable),t.forEach(t=>{let i=this.groupList.store.any(t,L.acl(`origin`));i||n(Error(`Unable to pick app: ${t.value}`));let a=nm(this.groupList.controller.dom,L.acl(`origin`),i,{}),o=this.groupList.controller.dom.createElement(`table`),s=o.appendChild(this.groupList.controller.dom.createElement(`tr`));s.appendChild(this.groupList.controller.dom.createElement(`td`)).appendChild(a);let c=s.appendChild(this.groupList.controller.dom.createElement(`td`));c.textContent=`Give access to ${this.groupList.controller.noun} ${z(this.groupList.controller.subject)}?`,s.appendChild(this.groupList.controller.dom.createElement(`td`)).appendChild(em(this.groupList.controller.dom,()=>e(i.value))),r.appendChild(o)})})}renderCleanup(){this.renderBar(),this.groupList.render()}async addPerson(e){if(!e)return this.toggleBar();if(!e.match(/^https?:/i))return Promise.reject(Error(`Not a http URI`));B(`Adding to ACL person: ${e}`),await this.groupList.addNewURI(e),this.toggleBar()}async addGroup(e){if(!e)return this.toggleBar();if(!e.match(/^https?:/i))return Promise.reject(Error(`Not a http URI`));B(`Adding to ACL group: `+e),await this.groupList.addNewURI(e),this.toggleBar()}async addAgent(e){await this.groupList.addNewURI(e),this.toggleBar()}async addBot(e){if(!e)return this.toggleBar();if(!e.match(/^https?:/i))return Promise.reject(Error(`Not a http URI`));B(`Adding to ACL bot: `+e),await this.groupList.addNewURI(e),this.toggleBar()}async getOriginFromName(e){if(!e)return Promise.resolve();if(!e.match(/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i))return Promise.reject(Error(`Not a domain name`));let t=`https://`+e;return B(`Adding to ACL origin: `+t),this.toggleBar(),t}toggleBar(){this.isExpanded=!this.isExpanded}},FF=L.acl,IF={13:`Owners`,9:`Owners (write locked)`,5:`Editors`,3:`Posters`,2:`Submitters`,1:`Viewers`},LF={13:!0,5:!0,3:!0,2:!0,1:!0},RF={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`},zF=class{defaults;byCombo;aclMap;addAgentButton;rootElement;_store;constructor(e,t,n,r,i={}){this.doc=e,this.aclDoc=t,this.controller=n,this._options=i,this.defaults=this._options.defaults||!1,this._store=r,this.aclMap=UP(e,t,r,this.defaults),this.byCombo=qP(this.aclMap),this.addAgentButton=new PF(this),this.rootElement=this.controller.dom.createElement(`div`),this.rootElement.setAttribute(`style`,V.accessGroupList)}get store(){return this._store}set store(e){this._store=e,this.aclMap=UP(this.doc,this.aclDoc,e,this.defaults),this.byCombo=qP(this.aclMap)}render(){return this.rootElement.innerHTML=``,this.renderGroups().forEach(e=>this.rootElement.appendChild(e)),this.controller.isEditable&&this.rootElement.appendChild(this.addAgentButton.render()),this.rootElement}renderGroups(){let e=[];for(let t=15;t>0;t--){let n=BF(t);(this.controller.isEditable&&LF[t]||this.byCombo[n])&&e.push(this.renderGroup(t,n))}return e}renderGroup(e,t){let n=this.controller.dom.createElement(`div`);return n.setAttribute(`style`,V.accessGroupListItem),jf(n,e=>this.handleDroppedUris(e,t).then(()=>this.controller.render()).catch(e=>this.controller.renderStatus(e))),this.renderGroupElements(e,t).forEach(e=>n.appendChild(e)),n}renderGroupElements(e,t){let 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=IF[e]||VF(e);let r=this.controller.dom.createElement(`div`);if(r.setAttribute(`style`,V.group),this.controller.isEditable)switch(e){case 1:r.setAttribute(`style`,V.group1);break;case 2:r.setAttribute(`style`,V.group2);break;case 3:r.setAttribute(`style`,V.group3);break;case 5:r.setAttribute(`style`,V.group5);break;case 9:r.setAttribute(`style`,V.group9);break;case 13:r.setAttribute(`style`,V.group13);break;default:r.setAttribute(`style`,V.group)}let i=r.appendChild(this.controller.dom.createElement(`table`));(this.byCombo[t]||[]).map(([e,n])=>this.renderAgent(i,t,e,n)).forEach(e=>i.appendChild(e));let 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=RF[e]||`Unusual combination`,[n,r,a]}renderAgent(e,n,r,i){let a=nm(this.controller.dom,FF(r),(0,t.sym)(i),this.controller.isEditable?{deleteFunction:()=>this.deleteAgent(n,r,i).then(()=>e.removeChild(a)).catch(e=>this.controller.renderStatus(e))}:{});return a}async deleteAgent(e,t,n){let r=this.byCombo[e]||[],i=r.find(([e,r])=>e===t&&r===n);i&&r.splice(r.indexOf(i),1),await this.controller.save()}async addNewURI(e){await this.handleDroppedUri(e,BF(1)),await this.controller.save()}async handleDroppedUris(e,t){try{await Promise.all(e.map(e=>this.handleDroppedUri(e,t))),await this.controller.save()}catch(e){return Promise.reject(e)}}async handleDroppedUri(e,n,r=!1){let i=HF(e,this.store),a=(0,t.sym)(e);if(!i&&!r){B(` Not obvious: looking up dropped thing ${a}`);try{await this._store?.fetcher?.load(a.doc())}catch(e){let t=`Ignore error looking up dropped thing: ${e}`;return lf(t),Promise.reject(Error(t))}return this.handleDroppedUri(e,n,!0)}if(!i){let t=Object.keys(this.store.findTypeURIs(a)),n=t.length>0?`Detected RDF types: ${t.join(`, `)}`:`No RDF type was detected for this URI.`,r=`Error: Failed to add access target: ${e} is not a recognized ACL target type. Expected one of: vcard:WebID, vcard:Group, foaf:Person, foaf:Agent, solid:AppProvider, solid:AppProviderClass, or recognized ACL classes. Hint: try dropping a WebID profile URI, a vcard:Group URI, or a web app origin.`+n;return lf(r),Promise.reject(Error(r))}this.setACLCombo(n,e,i,this.controller.subject)}setACLCombo(e,t,n,r){e in this.byCombo||(this.byCombo[e]=[]),this.removeAgentFromCombos(t),this.byCombo[e].push([n.pred,n.obj.uri]),B(`ACL: setting access to ${r} by ${n.pred}: ${n.obj}`)}removeAgentFromCombos(e){for(let t=0;t<16;t++){let n=this.byCombo[BF(t)];if(n)for(let t=0;t<n.length;t++)for(;t<n.length&&n[t][1]===e;)n.splice(t,1)}}};function BF(e){let t=[`Read`,`Append`,`Write`,`Control`],n=[];for(let r=0;r<4;r++)e&1<<r&&n.push(`http://www.w3.org/ns/auth/acl#`+t[r]);return n.sort(),n.join(`
|
|
2519
2519
|
`)}function VF(e){let t=``,n=[`Read`,`Append`,`Write`,`Control`];for(let r=0;r<4;r++)e&1<<r&&(t+=n[r]);return t}function HF(e,n){let r=(0,t.sym)(e),i=n.findTypeURIs(r);for(let e in i)B(` drop object type includes: `+e);if(e.startsWith(`http`)&&e.split(`/`).length===3)return{pred:`origin`,obj:r};if(e.startsWith(`http`)&&e.split(`/`).length===4&&e.endsWith(`/`))return B(`Assuming final slash on dragged origin URI was unintended!`),{pred:`origin`,obj:(0,t.sym)(e.slice(0,-1))};if(L.vcard(`WebID`).uri in i)return{pred:`agent`,obj:r};if(L.vcard(`Group`).uri in i)return{pred:`agentGroup`,obj:r};if(r.sameTerm(L.foaf(`Agent`))||r.sameTerm(L.acl(`AuthenticatedAgent`))||r.sameTerm(L.rdf(`Resource`))||r.sameTerm(L.owl(`Thing`)))return{pred:`agentClass`,obj:r};if(L.vcard(`Individual`).uri in i||L.foaf(`Person`).uri in i||L.foaf(`Agent`).uri in i){let e=n.any(r,L.foaf(`preferredURI`));return e?{pred:`agent`,obj:(0,t.sym)(e)}:{pred:`agent`,obj:r}}return L.solid(`AppProvider`).uri in i?{pred:`origin`,obj:r}:L.solid(`AppProviderClass`).uri in i?{pred:`originClass`,obj:r}:(B(` Triage fails for `+e),null)}var UF=class{mainCombo;defaultsCombo;isContainer;defaultsDiffer;rootElement;isUsingDefaults;constructor(e,t,n,r,i,a,o,s,c,l,u,d){if(this.subject=e,this.noun=t,this.context=n,this.statusElement=r,this.targetIsProtected=i,this.targetDoc=a,this.targetACLDoc=o,this.defaultHolder=s,this.defaultACLDoc=c,this.prospectiveDefaultHolder=l,this.store=u,this.dom=d,this.rootElement=d.createElement(`div`),this.rootElement.setAttribute(`style`,V.aclGroupContent),this.isContainer=a.uri.slice(-1)===`/`,s&&c){this.isUsingDefaults=!0;let e=HP(this.targetDoc,o,s,c);this.mainCombo=new zF(a,o,this,e,{defaults:this.isContainer}),this.defaultsCombo=null,this.defaultsDiffer=!1}else this.isUsingDefaults=!1,this.mainCombo=new zF(a,o,this,u),this.defaultsCombo=new zF(a,o,this,u,{defaults:this.isContainer}),this.defaultsDiffer=!WP(this.mainCombo.aclMap,this.defaultsCombo.aclMap)}get isEditable(){return!this.isUsingDefaults}render(){if(this.rootElement.innerHTML=``,this.isUsingDefaults){if(this.renderStatus(`The sharing for this ${this.noun} is the default for folder `),this.defaultHolder){let e=this.statusElement.appendChild(this.dom.createElement(`a`));e.href=this.defaultHolder.uri,e.innerText=YF(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}renderRemoveAclsController(){let e=this.dom.createElement(`button`);return e.innerText=`Remove custom sharing settings for this ${this.noun} -- just use default${this.prospectiveDefaultHolder?` for ${z(this.prospectiveDefaultHolder)}`:``}`,e.setAttribute(`style`,V.bigButton),e.addEventListener(`click`,()=>this.removeAcls().then(()=>this.render()).catch(e=>this.renderStatus(e))),e}renderAddAclsController(){let e=this.dom.createElement(`button`);return e.innerText=`Set specific sharing for this ${this.noun}`,e.setAttribute(`style`,V.bigButton),e.addEventListener(`click`,()=>this.addAcls().then(()=>this.render()).catch(e=>this.renderStatus(e))),e}renderAddDefaultsController(){let e=this.dom.createElement(`div`);e.setAttribute(`style`,V.defaultsController);let t=e.appendChild(this.dom.createElement(`div`));t.innerText=`Sharing for things within the folder currently tracks sharing for the folder.`,t.setAttribute(`style`,V.defaultsControllerNotice);let n=e.appendChild(this.dom.createElement(`button`));return n.innerText=`Set the sharing of folder contents separately from the sharing for the folder`,n.setAttribute(`style`,V.bigButton),n.addEventListener(`click`,()=>this.addDefaults().then(()=>this.render())),e}renderRemoveDefaultsController(){let e=this.dom.createElement(`div`);e.setAttribute(`style`,V.defaultsController);let t=e.appendChild(this.dom.createElement(`div`));t.innerText=`Access to things within this folder:`,t.setAttribute(`style`,V.defaultsControllerNotice);let n=e.appendChild(this.dom.createElement(`button`));return n.innerText=`Set default for folder contents to just track the sharing for the folder`,n.setAttribute(`style`,V.bigButton),n.addEventListener(`click`,()=>this.removeDefaults().then(()=>this.render()).catch(e=>this.renderStatus(e))),e}renderTemporaryStatus(e){this.statusElement.setAttribute(`style`,V.aclControlBoxStatusRevealed),this.statusElement.innerText=e,this.statusElement.setAttribute(`style`,V.temporaryStatusInit),setTimeout(()=>{this.statusElement.setAttribute(`style`,V.temporaryStatusEnd)}),setTimeout(()=>{this.statusElement.innerText=``},5e3)}renderStatus(e){e||this.statusElement.setAttribute(`style`,V.aclControlBoxStatusRevealed),this.statusElement.innerText=e}async addAcls(){if(!this.defaultHolder||!this.defaultACLDoc){let e=`Unable to find defaults to copy`;return lf(e),Promise.reject(e)}HP(this.targetDoc,this.targetACLDoc,this.defaultHolder,this.defaultACLDoc).statements.forEach(e=>this.store.add(e.subject,e.predicate,e.object,this.targetACLDoc));try{return await this.store.fetcher.putBack(this.targetACLDoc),this.isUsingDefaults=!1,Promise.resolve()}catch(e){let t=` Error writing back access control file! ${e}`;return lf(t),Promise.reject(t)}}async addDefaults(){this.defaultsCombo=new zF(this.targetDoc,this.targetACLDoc,this,this.store,{defaults:!0}),this.defaultsDiffer=!0}async removeAcls(){try{await this.store.fetcher.delete(this.targetACLDoc.uri,{}),this.isUsingDefaults=!0;try{this.prospectiveDefaultHolder=await oF(this.targetDoc.uri)}catch(e){cf(e)}}catch(e){let t=`Error deleting access control file: ${this.targetACLDoc}: ${e}`;return lf(t),Promise.reject(t)}}async removeDefaults(){let e=this.defaultsCombo;try{this.defaultsCombo=null,this.defaultsDiffer=!1,await this.save()}catch(t){return this.defaultsCombo=e,this.defaultsDiffer=!0,lf(t),Promise.reject(t)}}save(){let e=(0,t.graph)();this.isContainer?this.defaultsCombo&&this.defaultsDiffer?(YP(e,this.targetDoc,this.mainCombo.byCombo,this.targetACLDoc,!0),YP(e,this.targetDoc,this.defaultsCombo.byCombo,this.targetACLDoc,!1,!0)):YP(e,this.targetDoc,this.mainCombo.byCombo,this.targetACLDoc,!0,!0):YP(e,this.targetDoc,this.mainCombo.byCombo,this.targetACLDoc,!0),e.fetcher=(0,t.fetcher)(e,{fetch:this.store.fetcher._fetch});let n=e.updater||new t.UpdateManager(e);return new Promise((t,r)=>{n.put(this.targetACLDoc,e.statementsMatching(void 0,void 0,void 0,this.targetACLDoc),`text/turtle`,(n,i,a)=>{if(!i)return r(Error(`ACL file save failed: ${a}`));this.store.fetcher.unload(this.targetACLDoc),this.store.add(e.statements),this.store.fetcher.requested[this.targetACLDoc.uri]=`done`,this.mainCombo.store=this.store,this.defaultsCombo&&(this.defaultsCombo.store=this.store),this.defaultsDiffer=!!this.defaultsCombo&&!WP(this.mainCombo.aclMap,this.defaultsCombo.aclMap),B(`ACL modification: success!`),t()})})}},WF=window,GF=Symbol(`prevent double triggering of drop event`);function KF(e){if(B(`preventBrowserDropEvents called.`),WF!==void 0){if(WF[GF])return;WF[GF]=!0}e.addEventListener(`drop`,JF,!1),e.addEventListener(`dragenter`,qF,!1),e.addEventListener(`dragover`,qF,!1)}function qF(e){e.stopPropagation(),e.preventDefault()}function JF(e){e.dataTransfer.files.length>0&&(WF.confirm(`Are you sure you want to drop this file here? (Cancel opens it in a new tab)`)||(e.stopPropagation(),e.preventDefault(),B(`@@@@ document-level DROP suppressed: `+e.dataTransfer.dropEffect)))}function YF(e){let t=e.uri;t.slice(-1)===`/`&&(t=t.slice(0,-1));let n=t.lastIndexOf(`/`);return n>=0&&(t=t.slice(n+1)),t||`/`}function XF(e,t,n,r){let i=t.dom,a=e.doc(),o=i.createElement(`div`);o.setAttribute(`style`,V.aclControlBoxContainer);let s=o.appendChild(i.createElement(`h1`));s.textContent=`Sharing for ${n} ${z(e)}`,s.setAttribute(`style`,V.aclControlBoxHeader);let c=o.appendChild(i.createElement(`div`));c.setAttribute(`style`,V.aclControlBoxStatus);try{ZF(a,r,e,n,t,i,c).then(e=>o.appendChild(e.render()))}catch(e){c.innerText=e}return o}async function ZF(e,t,n,r,i,a,o){return new Promise((s,c)=>iF(e,async(e,l,u,d,f,p)=>{if(!e)return c(Error(`Error reading ${l?``:` default `}ACL. status ${u}: ${d}`));let m=QF(u),h=$F(u,d,t)||eI(u);if(!h&&m)try{return s(g(await oF(m)))}catch(e){cf(e)}return s(g());function g(e){return new UF(n,r,i,o,h,u,d,f,p,e,t,a)}}))}function QF(e){let t=e.uri.split(`#`)[0],n=t.slice(0,-1).lastIndexOf(`/`),r=t.indexOf(`//`);return r>=0&&n<r+2||n<0?null:t.slice(0,n+1)}function $F(e,t,n){return n.holds(e,L.rdf(`type`),L.space(`Storage`),t)}function eI(e){return e.uri===e.site().uri}var tI={adoptACLDefault:HP,readACL:UP,sameACL:WP,ACLunion:GP,loadUnionACL:KP,ACLbyCombination:qP,makeACLGraph:JP,makeACLGraphbyCombo:YP,ACLToString:XP,comboToString:ZP,makeACLString:QP,putACLObject:$P,putACLbyCombo:eF,fixIndividualCardACL:tF,fixIndividualACL:nF,setACL:rF,getACLorDefault:iF,getACL:aF},nI={preventBrowserDropEvents:KF,shortNameForFolder:YF,ACLControlBox5:XF},rI=n.solidLogicSingleton.store;function iI(e,t,n){let r=e.dom,i=e.div;if(e.me&&!e.me.uri)throw Error(`newThingUI: Invalid userid: `+e.me);let a=`padding: 0.7em; width: 2em; height: 2em;`,o=i.appendChild(r.createElement(`img`)),s=!1;o.setAttribute(`src`,U.iconBase+`noun_34653_green.svg`),o.setAttribute(`style`,a),o.setAttribute(`title`,`Add another tool`);let c=function(e){let t=i.appendChild(r.createElement(`pre`));t.setAttribute(`style`,`background-color: pink`),t.appendChild(r.createTextNode(e))};function l(e){for(let t=0;t<p.length;t++){let n=a+e;p[t].disabled&&(n+=`opacity: 0.3;`),p[t].setAttribute(`style`,n)}}function u(e){l(`display: none;`),e.setAttribute(`style`,a+`background-color: yellow;`)}function d(e){s=!s,o.setAttribute(`style`,a+(s?`background-color: yellow;`:``)),l(s?``:`display: none;`)}o.addEventListener(`click`,d);function f(n){return new Promise(function(i,a){let o;function s(i,o){bF(e).then(e=>{let s=Object.assign({newBase:o,folder:n.folder||void 0,workspace:i},n);for(let e in n)s[e]=n[e];B(`newThingUI: Minting new ${s.pane.name} at ${s.newBase}`),n.pane.mintNew(t,s).then(function(e){if(!e||!e.newInstance)throw Error(`Cannot mint new - missing newInstance`);if(e.folder){let t=e.newInstance.uri.slice(e.folder.uri.length).includes(`/`);B(` new thing is packge? `+t),t?rI.add(e.folder,L.ldp(`contains`),rI.sym(e.newBase),e.folder.doc()):rI.add(e.folder,L.ldp(`contains`),e.newInstance,e.folder.doc()),e.refreshTarget&&e.refreshTarget.refresh&&e.refreshTarget.refresh()}else{let t=n.div.appendChild(r.createElement(`p`));t.setAttribute(`style`,`font-size: 120%;`),t.innerHTML=`Your <a target='_blank' href='`+e.newInstance.uri+`'><b>new `+n.noun+`</b></a> is ready to be set up. <br/><br/><a target='_blank' href='`+e.newInstance.uri+`'>Go to your new `+n.noun+`.</a>`}d()}).catch(function(e){c(e),a(e)})},e=>{c(`Error logging on: `+e)})}let l=n.pane;n.noun=l.mintClass?z(l.mintClass):l.name,n.appPathSegment=n.noun.slice(0,1).toUpperCase()+n.noun.slice(1),n.folder?tm(r,rI,n.div,L.foaf(`name`),null,n.noun).then(function(e){if(!e)d();else{let t=n.folder.uri;t.endsWith(`/`)||(t+=`/`),t=t+encodeURIComponent(e)+`/`,s(null,t)}}):(o=kF(r,{noun:n.noun,appPathSegment:n.appPathSegment},s),n.div.appendChild(o))})}let p=[],m=Object.values(n).filter(e=>e.mintNew),h=m.reduce((e,t)=>(t.mintClass&&(e[t.mintClass.uri]=(e[t.mintClass.uri]||0)+1),e),{});m.forEach(t=>{let n=e.div.appendChild(r.createElement(`img`));n.setAttribute(`src`,t.icon);let i=t.mintClass?h[t.mintClass.uri]>1?`${z(t.mintClass)} (using ${t.name} pane)`:z(t.mintClass):t.name+` @@`;n.setAttribute(`title`,`Make new `+i),n.setAttribute(`style`,a+`display: none;`),p.push(n),n.disabled||n.addEventListener(`click`,function(r){u(n),f({event:r,folder:e.folder||null,iconEle:n,pane:t,noun:i,noIndexHTML:!0,div:e.div,me:e.me,dom:e.dom,refreshTarget:e.refreshTarget})})})}var aI={newThingUI:iI},oI=n.solidLogicSingleton.store;function sI(e,n,r,i,a,o,s){let c=e.createElement(`table`),l=e.createElement(`tr`);l.appendChild(e.createElement(`td`)).setAttribute(`class`,`MatrixCorner`),c.appendChild(l),c.lastHeader=l;let u=[],d=[],f=function(e,t,n,r){for(;e.firstChild;)e.removeChild(e.firstChild);e.setAttribute(`style`,``),e.style.textAlign=`center`,o.cellFunction?o.cellFunction(e,t,n,r):(e.textContent=z(r),e.setAttribute(`style`,`padding: 0.3em`)),delete e.old},p=function(n){let r=n.toNT();if(d[r])return d[r];let i=e.createElement(`tr`),a=i.appendChild(e.createElement(`td`));a.setAttribute(`style`,`padding: 0.3em;`),a.textContent=z(n),n.termType===`NamedNode`&&oI.fetcher.nowOrWhenFetched(n.uri.split(`#`)[0],void 0,function(e,t,r){e&&(a.textContent=z(n))});for(let r=0;r<u.length;r++)f(i.appendChild(e.createElement(`td`)),t.fromNT(u[r]),n,null);i.dataValueNT=r,d[r]=i;for(let e=c.lastHeader.nextSibling;e;e=e.nextSibling)if(r>e.dataValueNT&&o&&o.yDecreasing||r<e.dataValueNT&&!(o&&o.yDecreasing))return c.insertBefore(i,e);return c.appendChild(i)},m=function(n){let r=n.toNT(),i=null;for(let e=0;e<u.length;e++){if(u[e]===r)return e;if(r>u[e]&&o.xDecreasing||r<u[e]&&!o.xDecreasing){u=u.slice(0,e).concat([r]).concat(u.slice(e)),i=e;break}}i===null&&(i=u.length,u.push(r));for(let r=c.firstChild;r;r=r.nextSibling){let a=r.dataValueNT,o=e.createElement(`td`);if(o.style.textAlign=`center`,r===c.firstChild?o.textContent=z(n):f(o,n,t.fromNT(a),null),i===u.length-1)r.appendChild(o);else{let e=r.firstChild;for(let t=0;t<i+1;t++)e=e.nextSibling;r.insertBefore(o,e)}}return i},h=function(){for(let e=1;e<c.children.length;e++){let t=c.children[e];for(let e=1;e<t.children.length;e++)t.children[e].old=!0}},g=function(){let e,n,r=[],i=[];if(o.set_y)for(let e=0;e<o.set_y.length;e++)i[o.set_y[e]]=!0;if(o.set_x)for(let e=0;e<o.set_x.length;e++)r[m(o.set_x[e])+1]=!0;for(let a=1;a<c.children.length;a++){e=c.children[a];for(let a=1;a<e.children.length;a++)if(n=e.children[a],n.old){let r=t.fromNT(e.dataValueNT),i=t.fromNT(u[a-1]);f(n,i,r,null)}else i[e.dataValueNT]=!0,r[a]=!0}for(let t=0;t<c.children.length;t++)if(e=c.children[t],t>0&&!i[e.dataValueNT])delete d[e.dataValueNT],c.removeChild(e);else for(let t=e.children.length-1;t>0;t--){let n=e.children[t];r[t]||e.removeChild(n)}let a=[];for(let e=0;e<u.length;e++)r[e+1]&&a.push(u[e]);u=a};c.refresh=function(){h(),oI.query(n,_,void 0,g)};let _=function(e){let t=e[r.toString()],n=e[i.toString()],o=e[a.toString()],s=p(n),c=m(t),l=s.children[c+1];f(l,t,n,o)};if(o.set_y)for(let e=0;e<o.set_y.length;e++)p(o.set_y[e]);if(o.set_x)for(let e=0;e<o.set_x.length;e++)m(o.set_x[e]);return oI.query(n,_,void 0,s),c}var cI={matrixForQuery:sI},lI=U.iconBase+`noun_Camera_1618446_000000.svg`,uI=U.iconBase+`noun_479395.svg`,dI=`image/png`;function fI(e,t,n,r){let i=e.createElement(`div`),a,o,s,c,l=i.appendChild(e.createElement(`table`)),u=l.appendChild(e.createElement(`tr`)).appendChild(e.createElement(`td`));u.setAttribute(`colspan`,`4`);let d=l.appendChild(e.createElement(`tr`));d.appendChild(e.createElement(`td`)).appendChild($p(e)).addEventListener(`click`,e=>{b(),r(null)});let f=d.appendChild(e.createElement(`td`)).appendChild(Qp(e,uI,`Retake`));f.addEventListener(`click`,e=>{_()}),f.style.visibility=`collapse`;let p=d.appendChild(e.createElement(`td`)).appendChild(Qp(e,U.iconBase+`noun_10636.svg`,`Snap`));p.addEventListener(`click`,v),p.style.visibility=`collapse`;let m=d.appendChild(e.createElement(`td`)).appendChild(em(e));m.addEventListener(`click`,e=>{x(o,a)}),m.style.visibility=`collapse`;function h(){if(s=u.appendChild(e.createElement(`video`)),s.setAttribute(`controls`,`1`),s.setAttribute(`autoplay`,`1`),s.setAttribute(`style`,V.controlStyle),!navigator.mediaDevices)throw Error(`navigator.mediaDevices not available`);navigator.mediaDevices.getUserMedia(g).then(e=>{s.srcObject=e,p.style.visibility=`visible`,m.style.visibility=`collapse`,f.style.visibility=`collapse`})}let g={video:!0};function _(){u.removeChild(c),h()}function v(){c=e.createElement(`canvas`),c.setAttribute(`width`,V.canvasWidth),c.setAttribute(`height`,V.canvasHeight),c.setAttribute(`style`,V.controlStyle),u.appendChild(c),c.getContext(`2d`).drawImage(s,0,0,c.width,c.height),s.parentNode.removeChild(s),c.toBlob(e=>{B(`got blob type ${e.type} size ${e.size}`),a=n(),o=e,y()},dI)}function y(){m.style.visibility=`visible`,f.style.visibility=`visible`,p.style.visibility=`collapse`}function b(){s&&s.srcObject&&s.srcObject.getVideoTracks().forEach(e=>e.stop())}function x(e,n){let i=e.type;B(`Putting `+e.size+` bytes of `+i+` to `+n),t.fetcher.webOperation(`PUT`,n.uri,{data:e,contentType:i}).then(e=>{B(`ok saved `+n),b(),r(n)},e=>{b(),alert(e)})}return h(),i}function pI(e,t,n,r){let i=e.createElement(`div`),a=Qp(e,lI,`Take picture`),o;async function s(e){i.removeChild(o),i.appendChild(a),r(e)}return i.appendChild(a),a.addEventListener(`click`,r=>{i.removeChild(a),o=fI(e,t,n,s),i.appendChild(o)}),i}var mI={cameraCaptureControl:fI,cameraButton:pI},hI={icons:U,ns:L,rdf:t,style:V,widgets:ng};function gI(e,r,i,a,o){r||=n.solidLogicSingleton.store,a=a.doc();let s=hI.ns,c=t.Namespace(`http://www.w3.org/2005/01/wf/flow#`),l=t.Namespace(`http://purl.org/dc/terms/`);o||={};let u=!!o.newestFirst,d=`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;`,f=e.createElement(`div`),p,m,h=n.solidLogicSingleton.store.updater,g=function(t,n){let r=e.createElement(`a`);return n&&n.uri&&(r.setAttribute(`href`,n.uri),r.addEventListener(`click`,hI.widgets.openHrefInOutlineMode,!0),r.setAttribute(`style`,`color: #3B5998; text-decoration: none; `)),r.textContent=t,r},_=function(t,n){let r=e.createElement(`pre`);return r.setAttribute(`style`,n||`color: grey`),f.appendChild(r),r.appendChild(e.createTextNode(t)),r},v={log:function(e){_(e,`color: #111;`)},warn:function(e){_(e,`color: #880;`)},error:function(e){_(e,`color: #800;`)}},y=function(){let n=e.createElement(`tr`),o=e.createElement(`td`),c=e.createElement(`td`),u=e.createElement(`td`);n.appendChild(o),n.appendChild(c),n.appendChild(u),n.AJAR_date=`9999-01-01T00:00:00Z`;let f=function(){p.setAttribute(`class`,`pendingedit`),p.disabled=!0;let o=[],c=new Date,u=``+c.getTime(),d=t.term(c),f=r.sym(a.uri+`#Msg`+u);o.push(new t.Statement(i,s.wf(`message`),f,a)),o.push(new t.Statement(f,s.sioc(`content`),r.literal(p.value),a)),o.push(new t.Statement(f,l(`created`),d,a)),m&&o.push(new t.Statement(f,s.foaf(`maker`),m,a)),h.update([],o,function(t,i,a){if(!i)n.appendChild(hI.widgets.errorMessageBlock(e,`Error writing message: `+a));else{let e={"?msg":f,"?content":r.literal(p.value),"?date":d,"?creator":m};T(e,!1),p.value=``,p.setAttribute(`class`,``),p.disabled=!1}})};n.appendChild(e.createElement(`br`));let p,g,_=function(){x(o,m,``,null),p=e.createElement(`textarea`),c.innerHTML=``,c.appendChild(p),p.rows=3,p.setAttribute(`style`,d+`background-color: #eef;`),p.addEventListener(`keyup`,function(e){e.keyCode===13&&(e.altKey||f())},!1),u.innerHTML=``,g=hI.widgets.button(e,hI.icons.iconBase+`noun_383448.svg`,`Send`),g.setAttribute(`style`,hI.style.buttonStyle+`float: right;`),g.addEventListener(`click`,f,!1),u.appendChild(g)};return vF({div:c,dom:e}).then(e=>{m=e.me,_()}),n};function b(e){let t=n.solidLogicSingleton.store.any(e,hI.ns.foaf(`nick`));return t?``+t.value:``+z(e)}function x(t,r,i,a){let o=t.appendChild(g(b(r),r));r.uri&&n.solidLogicSingleton.store.fetcher.nowOrWhenFetched(r.doc(),void 0,function(e,t){o.textContent=b(r)}),t.appendChild(e.createElement(`br`)),t.appendChild(g(i,a))}function S(e,t){let n={},i,a;for(i=t.firstChild;i;i=i.nextSibling)i.AJAR_subject&&(n[i.AJAR_subject.uri]=!0);let o=r.each(e,s.wf(`message`)),c={};for(o.forEach(function(e){c[e.uri]=!0,n[e.uri]||w(e)}),i=t.firstChild;i;)a=i.nextSibling,i.AJAR_subject&&!c[i.AJAR_subject.uri]&&t.removeChild(i),i=a}let C=function(e){let t=r.statementsMatching(e).concat(r.statementsMatching(void 0,void 0,e));h.update(t,[],function(e,t,n){t?S(i,p):v.error(`Cant delete messages:`+n)})},w=function(e){let t={"?msg":e,"?creator":r.any(e,s.foaf(`maker`)),"?date":r.any(e,l(`created`)),"?content":r.any(e,s.sioc(`content`))};T(t,!0)},T=function(t,n){let r=t[`?creator`],i=t[`?msg`],a=t[`?date`],o=t[`?content`],s=a.value,c=e.createElement(`tr`);c.AJAR_date=s,c.AJAR_subject=i;let l=!1;for(let e=p.firstChild;e;e=e.nextSibling)if(s>e.AJAR_date&&u||s<e.AJAR_date&&!u){p.insertBefore(c,e),l=!0;break}l||p.appendChild(c);let f=e.createElement(`td`);c.appendChild(f),x(f,r,hI.widgets.shortDate(s),i);let m=e.createElement(`td`);c.appendChild(m);let h=e.createElement(`p`);h.setAttribute(`style`,d+(n?`background-color: #e8ffe8;`:`background-color: #white;`)),m.appendChild(h),h.textContent=o.value;let g=e.createElement(`td`);c.appendChild(g);let _=e.createElement(`button`);g.appendChild(_),_.textContent=`-`,c.setAttribute(`class`,`hoverControl`),_.setAttribute(`class`,`hoverControlHide`),_.setAttribute(`style`,`color: red;`),_.addEventListener(`click`,function(t){g.removeChild(_);let n=e.createElement(`button`);n.textContent=`cancel`,g.appendChild(n).addEventListener(`click`,function(e){g.removeChild(r),g.removeChild(n),g.appendChild(_)},!1);let r=e.createElement(`button`);r.textContent=`Delete message`,g.appendChild(r).addEventListener(`click`,function(e){g.removeChild(r),g.removeChild(n),C(i)},!1)},!1)};p=e.createElement(`table`),p.fresh=!1,f.appendChild(p),p.setAttribute(`style`,`width: 100%;`);let E=y();u?p.insertBefore(E,p.firstChild):p.appendChild(E);let D;if(o.query)D=o.query;else{D=new t.Query(`Messages`);let e={};[`msg`,`date`,`creator`,`content`].forEach(function(n){D.vars.push(e[n]=t.variable(n))}),D.pat.add(i,c(`message`),e.msg),D.pat.add(e.msg,s.dct(`created`),e.date),D.pat.add(e.msg,s.foaf(`maker`),e.creator),D.pat.add(e.msg,s.sioc(`content`),e.content)}function O(){p.fresh=!0}return r.query(D,T,void 0,O),f.refresh=function(){S(i,p)},f}async function _I(e){return await n.store.fetcher.load(e),!(n.store.statementsMatching(null,L.dct(`created`),null,e).length>0)}var vI=class{constructor(e,t,n){this.root=e,this.rootFolder=e.dir(),this.leafFileName=t||`index.ttl`,this.membershipProperty=n||L.wf(`leafObject`)}leafDocumentFromDate(e){let t=e.toISOString().split(`T`)[0].replace(/-/g,`/`);return t=this.root.dir().uri+t+`/`+this.leafFileName,n.store.sym(t)}dateFromLeafDocument(e){let t=this.rootFolder.uri.length,n=e.uri.slice(t,t+10).replace(/\//g,`-`);return new Date(n)}async loadPrevious(e,t){async function r(e,i){function a(n){return!(t?n.uri>=e.uri:n.uri<=e.uri)}function o(e){let t=e.uri.slice(0,-1).split(`/`).slice(-1)[0];return!!`0123456789`.includes(t[0])}function s(e){return e=e.filter(o),e.sort(),t||e.reverse(),e.pop()}let c=e.dir();try{await n.store.fetcher.load(c);let e=n.store.each(c,L.ldp(`contains`));e=e.filter(a);let t=s(e);if(t)return t}catch(e){if(e.response&&e.response.status&&e.response.status===404)B(`Error 404 for chat parent file `+c);else throw B(`*** Error NON 404 for chat parent file `+c),Error(`*** ${e.message} for chat folder ${c}`)}if(i===0)return null;let l=await r(c,i-1);return l?(await n.store.fetcher.load(l),s(n.store.each(l,L.ldp(`contains`)))):null}let i=this.leafDocumentFromDate(e).dir();for(;;){let t=await r(i,3);if(t){let r=n.store.sym(t.uri+this.leafFileName),a=this.dateFromLeafDocument(r);if(await _I(r))e=a,i=this.leafDocumentFromDate(e).dir();else return a}else return null}}async firstLeaf(e){let n=t.graph(),r=new t.Fetcher(n);async function i(t){function i(e){let t=e.uri.slice(0,-1).split(`/`).slice(-1)[0];return!!`0123456789`.includes(t[0])}delete r.requested[t.uri],await r.load(t,{force:!0});let a=n.each(t,L.ldp(`contains`));if(a=a.filter(i),a.length===0)throw Error(` @@@ No children to parent2 `+t);return a.sort(),e&&a.reverse(),a[0]}let a=await i(await i(await i(this.root.dir()))),o=t.sym(a.uri+`chat.ttl`);await r.load(o);let s=n.each(this.root,this.membershipProperty,null,o);if(s.length===0){let e=` INCONSISTENCY -- no chat leafObject in file `+o;throw uf(e),Error(e)}let c=s.map(e=>[n.any(e,L.dct(`created`)),e]);return c.sort(),e&&c.reverse(),c[0][1]}},yI=e=>e/2**32|0,bI=e=>e>>>0;function xI(e,t,n,r){let i=yI(n),a=bI(n);e.setUint32(t,r?a:i,r),e.setUint32(t+4,r?i:a,r)}function SI(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`&&`BYTES_PER_ELEMENT`in e&&e.BYTES_PER_ELEMENT===1}var CI=e=>e?`"${e}" `:``;function wI(e,t=``){if(typeof e!=`number`)throw TypeError(CI(t)+`expected number, got `+typeof e);if(!Number.isSafeInteger(e)||e<0)throw RangeError(CI(t)+`expected integer >= 0, got `+e);return e}function TI(e,t,n=``){if(SI(e)&&(t===void 0||e.length===t))return e;t!==void 0&&wI(t,`length`);let r=SI(e),i=t===void 0?``:` of length ${t}`,a=r?`length=${e.length}`:`type=${typeof e}`,o=CI(n)+`expected Uint8Array`+i+`, got `+a;throw r?RangeError(o):TypeError(o)}var EI=(e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError((t===`object`?``:`"${t}" `)+`expected object, got type=`+typeof e)},DI=(e,t)=>{EI(e,t);let n=Object.getPrototypeOf(e);if(n!==Object.prototype&&n!==null)throw TypeError(`"${t}" expected plain object`);if(Object.hasOwn(e,`__proto__`))throw TypeError(`"${t}.__proto__" is not allowed`)};function OI(e,t=!0){if(e.destroyed)throw Error(`hash was destroyed`);if(t&&e.finished)throw Error(`digest() was already called`)}function kI(e,t){TI(e,void 0,`output`);let n=t.outputLen;if(!(e.length>=n))throw RangeError(`"output" expected length >= `+n)}function AI(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function jI(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function MI(e,t){return e<<32-t|e>>>t}var NI=typeof Uint8Array.from([]).toHex==`function`&&typeof Uint8Array.fromHex==`function`,PI=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function FI(e){if(TI(e),NI)return e.toHex();let t=``;for(let n=0;n<e.length;n++)t+=PI[e[n]];return t}function II(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function LI(e){if(typeof e!=`string`)throw TypeError(`hex string expected, got `+typeof e);if(NI)try{return Uint8Array.fromHex(e)}catch(e){throw e instanceof SyntaxError?RangeError(e.message):e}let t=e.length,n=t/2;if(t%2)throw RangeError(`hex string expected, got unpadded hex of length `+t);let r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){let n=II(e.charCodeAt(i)),a=II(e.charCodeAt(i+1));if(n===void 0||a===void 0){let t=e[i]+e[i+1];throw RangeError(`hex string expected, got non-hex character "`+t+`" at index `+i)}r[t]=n*16+a}return r}function RI(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];TI(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let i=e[t];n.set(i,r),r+=i.length}return n}function zI(e,t,n=`opts`){return DI(e,`defaults`),t!==void 0&&DI(t,n),Object.assign(Object.create(null),e,t)}function BI(e,t={}){if(typeof e!=`function`)throw TypeError(`"hashCons" expected function, got type=`+typeof e);t=zI({},t,`info`);let n=(t,n)=>e(n).update(t).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=t=>e(t),Object.assign(n,t),Object.freeze(n)}function VI(e=32){wI(e,`bytesLength`);let t=typeof globalThis==`object`?globalThis.crypto:null;if(typeof t?.getRandomValues!=`function`)throw Error(`crypto.getRandomValues must be defined`);if(e>65536)throw RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}var HI=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function UI(e,t,n){return e&t^~e&n}function WI(e,t,n){return e&t^e&n^t&n}var GI=class{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,n,r){this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=jI(this.buffer)}update(e){OI(this),TI(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length,a=!1;for(let o=0;o<i;){let s=Math.min(r-this.pos,i-o);if(s===r){let t=jI(e);for(;r<=i-o;o+=r)this.process(t,o);a=!0}else n.set(o===0&&s===i?e:e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===r&&(this.process(t,0),this.pos=0,a=!0)}return this.length+=e.length,a&&this.roundClean(),this}digestInto(e){OI(this),kI(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,t.fill(0,a),this.padOffset>r-a&&(this.process(n,0),t.fill(0)),xI(n,r-8,this.length*8,i),this.process(n,0),this.roundClean();let o=e===t?n:jI(e),s=this.outputLen,c=s/4,l=this.get();if(s%4||c>l.length)throw Error(`invalid outputLen`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneIntoMeta(e){let{buffer:t,length:n,finished:r,destroyed:i,pos:a}=this;return e.destroyed=i,e.finished=r,e.length=n,e.pos=a,a&&e.buffer.set(t),e}clone(){return this._cloneInto()}},KI=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),qI=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]),JI=new Uint32Array(64),YI=class extends GI{A=0;B=0;C=0;D=0;E=0;F=0;G=0;H=0;constructor(e,t){super(64,e,8,!1),this.A=t[0]|0,this.B=t[1]|0,this.C=t[2]|0,this.D=t[3]|0,this.E=t[4]|0,this.F=t[5]|0,this.G=t[6]|0,this.H=t[7]|0}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}_cloneInto(e){return(e||=new this.constructor).set(...this.get()),this._cloneIntoMeta(e)}process(e,t){for(let n=0;n<16;n++,t+=4)JI[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=JI[e-15],n=JI[e-2],r=MI(t,7)^MI(t,18)^t>>>3,i=MI(n,17)^MI(n,19)^n>>>10;JI[e]=i+JI[e-7]+r+JI[e-16]|0}let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=MI(o,6)^MI(o,11)^MI(o,25),u=l+t+UI(o,s,c)+qI[e]+JI[e]|0,d=(MI(n,2)^MI(n,13)^MI(n,22))+WI(n,r,i)|0;l=c,c=s,s=o,o=a+u|0,a=i,i=r,r=n,n=u+d|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){AI(JI)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),AI(this.buffer)}},XI=class extends YI{constructor(){super(32,KI)}},ZI=BI(()=>new XI,HI(1));function QI(e,t,n=()=>{}){if(!Array.isArray(e))throw TypeError(`"${t}" expected array, got type=${typeof e}`);for(let r=0;r<e.length;r++)n(e[r],`${t}[${r}]`);return e}var $I=(e,t,n)=>TI(e,t,n),eL=wI;function tL(e,t=`object`){if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(t===`object`?`expected valid options object`:`"${t}" expected object, got type=${typeof e}`);return e}function nL(e,t){if(typeof e!=`function`)throw TypeError(`"${t}" is invalid: expected function, got ${typeof e}`);return e}var rL=FI,iL=(...e)=>RI(...e),aL=e=>LI(e),oL=SI,sL=e=>VI(e),cL=BigInt(0),lL=BigInt(1),uL=e=>e?`"${e}" `:``;function dL(e,t=``){if(typeof e!=`boolean`)throw TypeError(uL(t)+`expected boolean, got type=`+typeof e);return e}function fL(e){if(typeof e==`bigint`){if(!xL(e))throw RangeError(`positive bigint expected, got `+e)}else eL(e);return e}function pL(e,t=``){if(typeof e!=`number`){let n=t&&`"${t}" `;throw TypeError(n+`expected number, got type=`+typeof e)}if(!Number.isSafeInteger(e)){let n=t&&`"${t}" `;throw RangeError(n+`expected safe integer, got `+e)}}function mL(e){if(typeof e!=`string`)throw TypeError(`hex string expected, got `+typeof e);return e===``?cL:BigInt(`0x`+e)}function hL(e){return mL(FI(e))}function gL(e){return mL(FI(yL(TI(e)).reverse()))}function _L(e,t){if(wI(t),t===0)throw Error(`zero output length is invalid`);e=fL(e);let n=t*2,r=e.toString(16);if(r.length>n)throw RangeError(`number is too large`);return LI(r.padStart(n,`0`))}function vL(e,t){return _L(e,t).reverse()}function yL(e){return Uint8Array.from($I(e))}function bL(e){if(typeof e!=`string`)throw TypeError(`ascii string expected, got `+typeof e);return Uint8Array.from(e,(t,n)=>{let r=t.charCodeAt(0);if(t.length!==1||r>127)throw RangeError(`string contains non-ASCII character "${e[n]}" with code ${r} at position ${n}`);return r})}function xL(e){return typeof e==`bigint`&&cL<=e}function SL(e,t,n){return xL(e)&&xL(t)&&xL(n)&&t<=e&&e<n}function CL(e,t,n,r){if(!SL(t,n,r))throw RangeError(`expected valid `+e+`: `+n+` <= n < `+r+`, got `+t)}function wL(e){if(e<cL)throw Error(`expected non-negative bigint, got `+e);return e===cL?0:e.toString(2).length}var TL=e=>(pL(e,`n`),(lL<<BigInt(e))-lL);function EL(e,t={},n={},r=`object`){tL(e,r),tL(t,`fields`),tL(n,`optFields`);function i(t,n,i){let a=r===`object`?`param "${String(t)}"`:`"${r}.${String(t)}"`,o=e[t];if(!Object.hasOwn(e,t)&&(i?o!==void 0:n!==`function`))throw TypeError(`${a} is invalid: expected own property`);if(i&&o===void 0)return;let s=typeof o;if(s!==n||o===null)throw TypeError(`${a} is invalid: expected ${n}, got ${s}`)}let a=(e,t)=>Object.entries(e).forEach(([e,n])=>i(e,n,t));a(t,!1),a(n,!0)}var DL=BigInt(0),OL=BigInt(1),kL=BigInt(2),AL=BigInt(3),jL=BigInt(4),ML=BigInt(5),NL=BigInt(7),PL=BigInt(8),FL=BigInt(9),IL=BigInt(15),LL=BigInt(16),RL=BigInt(`0x10000000000000000`);function zL(e,t){if(t<=DL)throw Error(`mod: expected positive modulus, got `+t);let n=e%t;return n>=DL?n:t+n}function BL(e,t,n){if(n<=OL)throw Error(`pow: expected modulus > 1, got `+n);if(typeof t!=`bigint`)throw TypeError(`invalid exponent: expected bigint, got `+typeof t);if(t<DL)throw Error(`invalid exponent, negatives unsupported`);if(t===DL)return OL;if(t===OL)return e;let r=e%n;if(r<DL&&(r+=n),t<RL){let e=OL;for(;t>DL;)t&OL&&(e=e*r%n),r=r*r%n,t>>=OL;return e}let i=[];for(;t>DL;)i.push(Number(t&IL)),t>>=jL;let a=Array(16);a[0]=OL,a[1]=r;for(let e=2;e<16;e++)a[e]=a[e-1]*r%n;let o=a[i[i.length-1]];for(let e=i.length-2;e>=0;e--){o=o*o%n,o=o*o%n,o=o*o%n,o=o*o%n;let t=i[e];t!==0&&(o=o*a[t]%n)}return o}function VL(e,t,n){if(n<=OL)throw Error(`pow2: expected modulus > 1, got `+n);if(t<DL)throw Error(`pow2: expected non-negative exponent, got `+t);let r=e;for(;t-->DL;)r*=r,r%=n;return r}function HL(e,t){if(e===DL)throw Error(`invert: expected non-zero number`);if(t<=OL)throw Error(`invert: expected modulus > 1, got `+t);let n=zL(e,t),r=t,i=DL,a=OL;for(;n!==DL;){let e=r/n,t=r-n*e,o=i-a*e;r=n,n=t,i=a,a=o}if(r!==OL)throw Error(`invert: does not exist`);return zL(i,t)}function UL(e,t,n){let r=e;if(!r.eql(r.sqr(t),n))throw Error(`Cannot find square root`)}function WL(e,t){if((e&OL)===DL)throw Error(t+`: expected odd modulus, got `+e)}function GL(e,t){let n=e,r=(n.ORDER+OL)/jL,i=n.pow(t,r);return UL(n,i,t),i}function KL(e,t){let n=e,r=(n.ORDER-ML)/PL,i=n.mul(t,kL),a=n.pow(i,r),o=n.mul(t,a),s=n.mul(n.mul(o,kL),a),c=n.mul(o,n.sub(s,n.ONE));return UL(n,c,t),c}function qL(e){let t=rR(e),n=JL(e),r=n(t,t.neg(t.ONE)),i=n(t,r),a=n(t,t.neg(r)),o=(e+NL)/LL;return((e,t)=>{let n=e,s=n.pow(t,o),c=n.mul(s,r),l=n.mul(s,i),u=n.mul(s,a),d=n.eql(n.sqr(c),t),f=n.eql(n.sqr(l),t);s=n.cmov(s,c,d),c=n.cmov(u,l,f);let p=n.eql(n.sqr(c),t),m=n.cmov(s,c,p);return UL(n,m,t),m})}function JL(e){if(e<AL)throw Error(`sqrt is not defined for small field`);WL(e,`tonelliShanks`);let t=e-OL,n=0;for(;t%kL===DL;)t/=kL,n++;let r=kL,i=rR(e);for(;$L(i,r)===1;)if(r++>1e3)throw Error(`Cannot find square root: probably non-prime P`);if(n===1)return GL;let a=i.pow(r,t),o=(t+OL)/kL;return function(e,r){let i=e;if(i.is0(r))return r;if($L(i,r)!==1)throw Error(`Cannot find square root`);let s=n,c=i.mul(i.ONE,a),l=i.pow(r,t),u=i.pow(r,o);for(;!i.eql(l,i.ONE);){if(i.is0(l))throw Error(`Cannot find square root: probably non-prime P`);let e=1,t=i.sqr(l);for(;!i.eql(t,i.ONE);)if(e++,t=i.sqr(t),e===s)throw Error(`Cannot find square root`);let n=OL<<BigInt(s-e-1),r=i.pow(c,n);s=e,c=i.sqr(r),l=i.mul(l,c),u=i.mul(u,r)}return u}}function YL(e){return WL(e,`Fp.sqrt`),e%jL===AL?GL:e%PL===ML?KL:e%LL===FL?qL(e):JL(e)}var XL=[`create`,`isValid`,`is0`,`neg`,`inv`,`sqrt`,`sqr`,`eql`,`add`,`sub`,`mul`,`pow`,`div`,`addN`,`subN`,`mulN`,`sqrN`];function ZL(e){if(tL(e,`field`),typeof e.ORDER!=`bigint`)throw TypeError(`param "ORDER" is invalid: expected bigint, got `+typeof e.ORDER);pL(e.BYTES,`BYTES`),pL(e.BITS,`BITS`);for(let t of XL)nL(e[t],`field.`+t);if(e.BYTES<1||e.BITS<1)throw Error(`invalid field: expected BYTES/BITS > 0`);if(e.ORDER<=OL)throw Error(`invalid field: expected ORDER > 1, got `+e.ORDER);return e}function QL(e,t,n=!1){ZL(e),QI(t,`nums`),dL(n,`passZero`);let r=e,i=Array(t.length).fill(n?r.ZERO:void 0),a=t.reduce((e,t,n)=>r.is0(t)?e:(i[n]=e,r.mul(e,t)),r.ONE),o=r.inv(a);return t.reduceRight((e,t,n)=>r.is0(t)?e:(i[n]=r.mul(e,i[n]),r.mul(e,t)),o),i}function $L(e,t){ZL(e);let n=e;WL(n.ORDER,`FpLegendre`);let r=(n.ORDER-OL)/kL,i=n.pow(t,r),a=n.eql(i,n.ONE),o=n.eql(i,n.ZERO),s=n.eql(i,n.neg(n.ONE));if(!a&&!o&&!s)throw Error(`invalid Legendre symbol result`);return a?1:o?0:-1}function eR(e,t){if(t!==void 0&&eL(t),e<=DL)throw Error(`invalid n length: expected positive n, got `+e);if(t!==void 0&&t<1)throw Error(`invalid n length: expected positive bit length, got `+t);let n=wL(e);if(t!==void 0&&t<n)throw Error(`invalid n length: expected nBitLength (${t}) >= bitLen(n) (${n})`);let r=t===void 0?n:t;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}var tR=new WeakMap,nR=class{ORDER;BITS;BYTES;isLE;ZERO=DL;ONE=OL;_lengths;_mod;constructor(e,t={}){if(e<=OL)throw Error(`invalid field: expected ORDER > 1, got `+e);let n;this.isLE=!1,typeof t==`object`&&t&&(typeof t.BITS==`number`&&(n=t.BITS),typeof t.sqrt==`function`&&Object.defineProperty(this,"sqrt",{value:t.sqrt,enumerable:!0}),typeof t.isLE==`boolean`&&(this.isLE=t.isLE),t.allowedLengths&&(this._lengths=Object.freeze(t.allowedLengths.slice())),typeof t.modFromBytes==`boolean`&&(this._mod=t.modFromBytes));let{nBitLength:r,nByteLength:i}=eR(e,n);if(i>2048)throw Error(`invalid field: expected ORDER of <= 2048 bytes`);this.ORDER=e,this.BITS=r,this.BYTES=i,Object.freeze(this)}create(e){return zL(e,this.ORDER)}isValid(e){if(typeof e!=`bigint`)throw TypeError(`invalid field element: expected bigint, got `+typeof e);return DL<=e&&e<this.ORDER}is0(e){return e===DL}isValidNot0(e){return!this.is0(e)&&this.isValid(e)}isOdd(e){return(e&OL)===OL}neg(e){return zL(-e,this.ORDER)}eql(e,t){return e===t}sqr(e){return zL(e*e,this.ORDER)}add(e,t){return zL(e+t,this.ORDER)}sub(e,t){return zL(e-t,this.ORDER)}mul(e,t){return zL(e*t,this.ORDER)}pow(e,t){return BL(e,t,this.ORDER)}div(e,t){return zL(e*HL(t,this.ORDER),this.ORDER)}sqrN(e){return e*e}addN(e,t){return e+t}subN(e,t){return e-t}mulN(e,t){return e*t}inv(e){return HL(e,this.ORDER)}sqrt(e){let t=tR.get(this);return t||tR.set(this,t=YL(this.ORDER)),t(this,e)}toBytes(e){return this.isLE?vL(e,this.BYTES):_L(e,this.BYTES)}fromBytes(e,t=!1){$I(e);let{_lengths:n,BYTES:r,isLE:i,ORDER:a,_mod:o}=this;if(n){if(e.length<1||!n.includes(e.length)||e.length>r)throw Error(`Field.fromBytes: expected `+n+` bytes, got `+e.length);let t=new Uint8Array(r);t.set(e,i?0:t.length-e.length),e=t}if(e.length!==r)throw Error(`Field.fromBytes: expected `+r+` bytes, got `+e.length);let s=i?gL(e):hL(e);if(o&&(s=zL(s,a)),!t&&!this.isValid(s))throw Error(`invalid field element: outside of range 0..ORDER`);return s}invertBatch(e){return QL(this,e,!0)}cmov(e,t,n){return dL(n,`condition`),n?t:e}};function rR(e,t={}){return Object.freeze(nR.prototype),new nR(e,t)}function iR(e){if(typeof e!=`bigint`)throw Error(`field order must be bigint`);if(e<=OL)throw Error(`field order must be greater than 1`);let t=wL(e-OL);return Math.ceil(t/8)}function aR(e){let t=iR(e);return t+Math.ceil(t/2)}function oR(e,t,n=!1){$I(e);let r=e.length,i=iR(t),a=Math.max(aR(t),16);if(r<a||r>1024)throw Error(`expected `+a+`-1024 bytes of input, got `+r);let o=zL(n?gL(e):hL(e),t-OL)+OL;return n?vL(o,i):_L(o,i)}var sR=BigInt(0),cR=BigInt(1),lR=BigInt(4),uR=16,dR=128,fR=5,pR=2**31;function mR(e){let t=e;if(typeof t!=`function`)throw TypeError(`"Point" expected constructor, got type=`+typeof e);nL(t.fromAffine,`Point.fromAffine`),nL(t.fromBytes,`Point.fromBytes`),nL(t.fromHex,`Point.fromHex`),tL(t.BASE,`Point.BASE`),tL(t.ZERO,`Point.ZERO`),ZL(t.Fp),ZL(t.Fn)}function hR(e,t){mR(e),yR(t,e);let n=QL(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))}function gR(e,t,n=1){if(!Number.isSafeInteger(e)||e<n||e>t)throw Error(`invalid window size, expected [`+n+`..`+t+`], got W=`+e)}function _R(e,t){let n=e*(4*t+128);if(n>pR)throw Error(`invalid window size: table would need ~`+Math.ceil(n/2**20)+` MiB, max `+pR/2**20+` MiB`)}function vR(e,t){if(e!==void 0){nL(e,`randomBytes`);try{let n=e(t);if(!oL(n)||n.length!==t)return}catch{return}return e}}function yR(e,t){QI(e,`points`),e.forEach((e,n)=>{if(!(e instanceof t))throw Error(`invalid point at index `+n)})}function bR(e,t,n){if(!Array.isArray(e))throw Error(`array of scalars expected`);e.forEach((e,r)=>{if(!(n===void 0?t.isValid(e):xL(e)&&e<n))throw Error(`invalid scalar at index `+r)})}var xR=new WeakMap;function SR(e){return xR.get(e)||1}function CR(e,t){let n=e.double(),r=[e];for(let e=1;e<t;e++)r.push(r[e-1].add(n));return r}function wR(e,t){let n=2**t,r=n/2,i=BigInt(n-1),a=[];for(;e>sR;){let t=0;e&cR&&(t=Number(e&i),t>=r&&(t-=n),e-=BigInt(t)),a.push(t),e>>=cR}return a}function TR(e,t,n){let r=2**t,i=r/2,a=BigInt(r-1),o=BigInt(t),s=[];for(let t=0;t<n;t++){let t=Number(e&a);e>>=o,t>i&&(t-=r,e+=cR),s.push(t)}if(e!==sR)throw Error(`invalid wnaf`);return s}function ER(e,t,n){let r=0;for(let e of n)r=Math.max(r,e.length);let i=e;for(let e=r-1;e>=0;e--){e!==r-1&&(i=i.double());for(let r=0;r<n.length;r++){let a=n[r][e];if(a){let e=t[r][Math.abs(a)-1>>1];i=i.add(a<0?e.negate():e)}}}return i}var DR=class{Point;BASE;ZERO;randomBytes;wnafPrecomputes=new WeakMap;baseCanBeBlinded;bits;constructor(e,t){mR(e),this.randomBytes=vR(t,uR),this.Point=e,this.BASE=e.BASE,this.ZERO=e.ZERO,this.bits=e.Fn.BITS}buildWnafTable(e,t,n){let r=Math.ceil(n/t)+1,i=2**(t-1),a=[],o=e;for(let e=0;e<r;e++){let e=o;for(let t=0;t<i;t++)a.push(e),e=e.add(o);o=a[a.length-1].double()}return{W:t,bits:n,windows:r,comp:a}}wnafCachedCT(e,t){let{W:n,windows:r,comp:i}=e,a=2**(n-1),o=TR(t,n,r),s=this.ZERO,c=this.BASE;for(let e=0;e<r;e++){let t=o[e],n=e*a,r=Math.abs(t)-1,l=i[n];for(let e=1;e<a;e++)l=e===r?i[n+e]:l;let u=l.negate();t===0?c=c.add(i[n]):s=s.add(t<0?u:l)}return{p:s,f:c}}getWnafPrecomputes(e,t,n,r){let i=this.wnafPrecomputes.get(t),a=i?.find(t=>t.W===e&&t.bits===n);return a||(a=this.buildWnafTable(t,e,n),typeof r==`function`&&(a={...a,comp:r(a.comp)}),i||(i=[],this.wnafPrecomputes.set(t,i)),i.push(a)),a}assertPoint(e){if(!(e instanceof this.Point))throw TypeError(`"point" expected Point instance, got type=`+typeof e)}validateMulInput(e,t){if(this.assertPoint(e),!SL(t,cR,this.Point.Fn.ORDER))throw Error(`invalid scalar`)}runCT(e,t,n,r){let i=SR(e);return i===1?this.fixedWindowCT(e,t,n):this.wnafCachedCT(this.getWnafPrecomputes(i,e,n,r),t)}mulCT(e,t,n){return this.validateMulInput(e,t),this.runCT(e,t,this.bits,n)}mulCTBlinded(e,t,n){if(this.validateMulInput(e,t),this.randomBytes===void 0)throw Error(`randomBytes is required for scalar blinding`);let r=this.Point.Fn.BITS+dR,i=this.randomBytes(uR);if(!oL(i)||i.length!==uR)throw Error(`randomBytes returned invalid byte array`);i[0]=i[0]&63|128;let a=t+hL(i)*this.Point.Fn.ORDER;return this.runCT(e,a,r,n)}fixedWindowCT(e,t,n){let r=fR,i=TL(r),a=Array(32);a[0]=this.ZERO;for(let t=1;t<32;t++)a[t]=a[t-1].add(e);let o=Math.ceil(n/r),s=this.ZERO;for(let e=o-1;e>=0;e--){if(e!==o-1)for(let e=0;e<r;e++)s=s.double();let n=Number(t>>BigInt(e*r)&i),c=a[0];for(let e=1;e<32;e++)c=e===n?a[e]:c;s=s.add(c)}return{p:s,f:s}}shouldBlind(e,t){return this.randomBytes===void 0?!1:t===cR||e===this.BASE&&(this.baseCanBeBlinded===void 0&&(this.baseCanBeBlinded=this.mulUnsafe(this.BASE,this.Point.Fn.ORDER).is0()),this.baseCanBeBlinded)}mulSecret(e,t,n,r){return this.shouldBlind(e,n)?this.mulCTBlinded(e,t,r):this.mulCT(e,t,r)}mulUnsafe(e,t,n){if(this.assertPoint(e),!xL(t))throw Error(`invalid scalar`);let r=SR(e);if(r===1||t>=this.Point.Fn.ORDER)return OR(this.Point,[e],[t],!0);let i=this.getWnafPrecomputes(r,e,this.bits,n);return this.wnafCachedCT(i,t).p}setWindowSize(e,t){this.assertPoint(e),gR(t,this.bits),_R((Math.ceil((this.bits+dR)/t)+1)*2**(t-1),this.Point.Fp.BYTES),xR.set(e,t),this.wnafPrecomputes.delete(e)}hasWindowSize(e){return SR(e)!==1}};function OR(e,t,n,r=!1){if(mR(e),yR(t,e),dL(r,`allowOversized`),bR(n,e.Fn,r?e.Fn.ORDER**lR:void 0),t.length!==n.length)throw Error(`arrays of points and scalars must have equal length`);let i=t.map(e=>CR(e,4)),a=n.map(e=>wR(e,4));return ER(e.ZERO,i,a)}function kR(e,t,n){if(t){if(t.ORDER!==e)throw Error(`Field.ORDER must match order: Fp == p, Fn == n`);return ZL(t),t}return rR(e,{isLE:n})}function AR(e,t,n={},r){if(e!==`weierstrass`&&e!==`edwards`)throw Error(`expected curve type "weierstrass" or "edwards"`);if(r===void 0&&(r=e===`edwards`),!t||typeof t!=`object`)throw Error(`expected valid ${e} CURVE object`);EL(n);for(let e of[`p`,`n`,`h`]){let n=t[e];if(!(xL(n)&&n!==sR))throw Error(`CURVE.${e} must be positive bigint`)}let i=kR(t.p,n.Fp,r),a=kR(t.n,n.Fn,r),o=[`Gx`,`Gy`,`a`,e===`weierstrass`?`b`:`d`];for(let e of o)if(!i.isValid(t[e]))throw Error(`CURVE.${e} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:i,Fn:a}}function jR(e,t){return function(n){let r=e(n);return{secretKey:r,publicKey:t(r)}}}var MR=(e,t)=>(e+(e>=0?t:-t)/IR)/t;function NR(e,t,n){CL(`scalar`,e,PR,n);let[[r,i],[a,o]]=t,s=MR(o*e,n),c=MR(-i*e,n),l=e-s*r-c*a,u=-s*i-c*o,d=l<PR,f=u<PR;d&&(l=-l),f&&(u=-u);let p=TL(Math.ceil(wL(n)/2))+FR;if(l<PR||l>=p||u<PR||u>=p)throw Error(`splitScalar (endomorphism): failed for k`);return{k1neg:d,k1:l,k2neg:f,k2:u}}var PR=BigInt(0),FR=BigInt(1),IR=BigInt(2),LR=BigInt(3),RR=BigInt(4);function zR(e,t={}){let n=AR(`weierstrass`,e,t),r=n.Fp,i=n.Fn,a=n.CURVE,{h:o,n:s}=a;EL(t,{},{allowInfinityPoint:`boolean`,clearCofactor:`function`,isTorsionFree:`function`,fromBytes:`function`,toBytes:`function`,endo:`object`,randomBytes:`function`});let{endo:c,allowInfinityPoint:l,clearCofactor:u,isTorsionFree:d,fromBytes:f,toBytes:p}=t,m=t.randomBytes===void 0?sL:t.randomBytes;if(c&&(!r.is0(a.a)||typeof c.beta!=`bigint`||!Array.isArray(c.basises)))throw Error(`invalid endo: expected "beta": bigint and "basises": array`);let h=c?{beta:c.beta,basises:c.basises.map(e=>[...e])}:void 0,g=VR(r,i);function _(){if(!r.isOdd)throw Error(`compression is not supported: Field does not have .isOdd()`)}function v(e,t,n){if(t.is0()){if(!l)throw Error(`bad point: ZERO`);return Uint8Array.of(0)}let{x:i,y:a}=t.toAffine(),o=r.toBytes(i);return dL(n,`isCompressed`),n?(_(),iL(BR(!r.isOdd(a)),o)):iL(Uint8Array.of(4),o,r.toBytes(a))}function y(e){$I(e,void 0,`Point`);let{publicKey:t,publicKeyUncompressed:n}=g,i=e.length,a=e[0],o=e.subarray(1);if(l&&i===1&&a===0)return{x:r.ZERO,y:r.ZERO};if(i===t&&(a===2||a===3)){let e=r.fromBytes(o);if(!r.isValid(e))throw Error(`bad point: is not on curve, wrong x`);let t=w(e),n;try{n=r.sqrt(t)}catch(e){let t=e instanceof Error?`: `+e.message:``;throw Error(`bad point: is not on curve, sqrt error`+t)}_();let i=r.isOdd(n);return(a&1)==1!==i&&(n=r.neg(n)),{x:e,y:n}}if(i===n&&a===4){let e=r.BYTES,t=r.fromBytes(o.subarray(0,e)),n=r.fromBytes(o.subarray(e,e*2));if(!T(t,n))throw Error(`bad point: is not on curve`);return{x:t,y:n}}throw Error(`bad point: got length ${i}, expected compressed=${t} or uncompressed=${n}`)}let b=p===void 0?v:p,x=f===void 0?y:f,S=r.mul(a.b,LR),C=r.is0(a.a)?e=>r.ZERO:e=>r.mul(a.a,e);function w(e){let t=r.sqr(e),n=r.mul(t,e);return r.add(r.add(n,r.mul(e,a.a)),a.b)}function T(e,t){let n=r.sqr(t),i=w(e);return r.eql(n,i)}if(!T(a.Gx,a.Gy))throw Error(`bad curve params: generator point`);let E=r.mul(r.pow(a.a,LR),RR),D=r.mul(r.sqr(a.b),BigInt(27));if(r.is0(r.add(E,D)))throw Error(`bad curve params: a or b`);function O(e,t,n=!1){if(!r.isValid(t)||n&&r.is0(t))throw Error(`bad point coordinate ${e}`);return typeof t==`object`&&t?r.create(t):t}function k(e){if(!(e instanceof te))throw Error(`Weierstrass Point expected`)}function A(e){if(!h||!h.basises)throw Error(`no endo`);return NR(e,h.basises,i.ORDER)}function j(e,t,n,a){if(!i.isValid(a))throw RangeError(`invalid scalar: out of range`);if(h){let{k1neg:i,k1:o,k2neg:s,k2:c}=A(a),l=new te(r.mul(n.X,h.beta),n.Y,n.Z);e.push(i?n.negate():n,s?l.negate():l),t.push(o,c)}else e.push(n),t.push(a)}let ee=new WeakSet;class te{static BASE=new te(a.Gx,a.Gy,r.ONE);static ZERO=new te(r.ZERO,r.ONE,r.ZERO);static Fp=r;static Fn=i;X;Y;Z;constructor(e,t,n){this.X=O(`x`,e),this.Y=O(`y`,t,!0),this.Z=O(`z`,n),Object.freeze(this)}static CURVE(){return a}static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw Error(`invalid affine point`);if(e instanceof te)throw Error(`projective point not allowed`);return r.is0(t)&&r.is0(n)?te.ZERO:new te(t,n,r.ONE)}static fromBytes(e){let t=te.fromAffine(x($I(e,void 0,`point`)));return t.assertValidity(),t}static fromHex(e){return te.fromBytes(aL(e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=6,t=!0){return re.setWindowSize(this,e),t||this.multiply(LR),this}assertValidity(){let e=this;if(e.is0()){if(l&&r.is0(e.X)&&r.eql(e.Y,r.ONE)&&r.is0(e.Z))return;throw Error(`bad point: ZERO`)}if(ee.has(e))return;let{x:t,y:n}=e.toAffine();if(!r.isValid(t)||!r.isValid(n))throw Error(`bad point: x or y not field elements`);if(!T(t,n))throw Error(`bad point: equation left != right`);if(!e.isTorsionFree())throw Error(`bad point: not in prime-order subgroup`);ee.add(e)}hasEvenY(){let{y:e}=this.toAffine();if(!r.isOdd)throw Error(`Field doesn't support isOdd`);return!r.isOdd(e)}equals(e){k(e);let{X:t,Y:n,Z:i}=this,{X:a,Y:o,Z:s}=e,c=r.eql(r.mul(t,s),r.mul(a,i)),l=r.eql(r.mul(n,s),r.mul(o,i));return c&&l}negate(){return new te(this.X,r.neg(this.Y),this.Z)}double(){let{X:e,Y:t,Z:n}=this,i=r.ZERO,a=r.ZERO,o=r.ZERO,s=r.mul(e,e),c=r.mul(t,t),l=r.mul(n,n),u=r.mul(e,t);return u=r.add(u,u),o=r.mul(e,n),o=r.add(o,o),i=C(o),a=r.mul(S,l),a=r.add(i,a),i=r.sub(c,a),a=r.add(c,a),a=r.mul(i,a),i=r.mul(u,i),o=r.mul(S,o),l=C(l),u=r.sub(s,l),u=C(u),u=r.add(u,o),o=r.add(s,s),s=r.add(o,s),s=r.add(s,l),s=r.mul(s,u),a=r.add(a,s),l=r.mul(t,n),l=r.add(l,l),s=r.mul(l,u),i=r.sub(i,s),o=r.mul(l,c),o=r.add(o,o),o=r.add(o,o),new te(i,a,o)}add(e){k(e);let{X:t,Y:n,Z:i}=this,{X:a,Y:o,Z:s}=e,c=r.ZERO,l=r.ZERO,u=r.ZERO,d=r.mul(t,a),f=r.mul(n,o),p=r.mul(i,s),m=r.add(t,n),h=r.add(a,o);m=r.mul(m,h),h=r.add(d,f),m=r.sub(m,h),h=r.add(t,i);let g=r.add(a,s);return h=r.mul(h,g),g=r.add(d,p),h=r.sub(h,g),g=r.add(n,i),c=r.add(o,s),g=r.mul(g,c),c=r.add(f,p),g=r.sub(g,c),u=C(h),c=r.mul(S,p),u=r.add(c,u),c=r.sub(f,u),u=r.add(f,u),l=r.mul(c,u),f=r.add(d,d),f=r.add(f,d),p=C(p),h=r.mul(S,h),f=r.add(f,p),p=r.sub(d,p),p=C(p),h=r.add(h,p),d=r.mul(f,h),l=r.add(l,d),d=r.mul(g,h),c=r.mul(m,c),c=r.sub(c,d),d=r.mul(m,f),u=r.mul(g,u),u=r.add(u,d),new te(c,l,u)}subtract(e){return k(e),this.add(e.negate())}is0(){return this.equals(te.ZERO)}multiply(e){if(!i.isValidNot0(e))throw RangeError(`invalid scalar: out of range`);let{p:t,f:n}=re.mulSecret(this,e,o,ne);return ne([t,n])[0]}multiplyUnsafe(e){let t=this,n=e;if(!i.isValid(n))throw RangeError(`invalid scalar: out of range`);if(n===PR||t.is0())return te.ZERO;if(n===FR)return t;if(re.hasWindowSize(this))return re.mulUnsafe(t,n,ne);let r=[],a=[];return j(r,a,t,n),OR(te,r,a)}mulAddUnsafe(e,t,n){k(t);let r=[],i=[];return j(r,i,this,e),j(r,i,t,n),OR(te,r,i)}toAffine(e){let t=this,n=e;if(n!=null&&!r.isValid(n))throw RangeError(`"invertedZ" expected valid field element`);let{X:i,Y:a,Z:o}=t;if(r.eql(o,r.ONE))return{x:i,y:a};let s=t.is0();n??=s?r.ONE:r.inv(o);let c=r.mul(i,n),l=r.mul(a,n),u=r.mul(o,n);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw Error(`invZ was invalid`);return{x:c,y:l}}isTorsionFree(){return o===FR?!0:d?d(te,this):re.mulUnsafe(this,s).is0()}clearCofactor(){return o===FR?this:u?u(te,this):this.multiplyUnsafe(o)}isSmallOrder(){return o===FR?this.is0():this.clearCofactor().is0()}toBytes(e=!0){return dL(e,`isCompressed`),this.assertValidity(),b(te,this,e)}toHex(e=!0){return rL(this.toBytes(e))}toString(){return`<Point ${this.is0()?`ZERO`:this.toHex()}>`}}let ne=e=>hR(te,e),re=new DR(te,m);return re.bits>=6&&te.BASE.precompute(6),Object.freeze(te.prototype),Object.freeze(te),te}function BR(e){return Uint8Array.of(e?2:3)}function VR(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}var HR={p:BigInt(`0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f`),n:BigInt(`0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141`),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt(`0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798`),Gy:BigInt(`0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8`)},UR={beta:BigInt(`0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee`),basises:[[BigInt(`0x3086d221a7d46bcde86c90e49284eb15`),-BigInt(`0xe4437ed6010e88286f547fa90abfe4c3`)],[BigInt(`0x114ca50f7a8e2f3f657c1108d9d44cfd8`),BigInt(`0x3086d221a7d46bcde86c90e49284eb15`)]]},WR=BigInt(0),GR=BigInt(2);function KR(e){let t=HR.p,n=BigInt(3),r=BigInt(6),i=BigInt(11),a=BigInt(22),o=BigInt(23),s=BigInt(44),c=BigInt(88),l=e*e*e%t,u=l*l*e%t,d=VL(VL(VL(u,n,t)*u%t,n,t)*u%t,GR,t)*l%t,f=VL(d,i,t)*d%t,p=VL(f,a,t)*f%t,m=VL(p,s,t)*p%t,h=VL(VL(VL(VL(VL(VL(m,c,t)*m%t,s,t)*p%t,n,t)*u%t,o,t)*f%t,r,t)*l%t,GR,t);if(!qR.eql(qR.sqr(h),e))throw Error(`Cannot find square root`);return h}var qR=rR(HR.p,{sqrt:KR}),JR=zR(HR,{Fp:qR,endo:UR}),YR=Object.create(null);function XR(e,...t){let n=YR[e];if(n===void 0){let t=ZI(bL(e));n=iL(t,t),YR[e]=n}return ZI(iL(n,...t))}var ZR=e=>e.toBytes(!0).slice(1),QR=({x:e})=>qR.toBytes(e),$R=e=>!qR.isOdd(e);function ez(e){let{Fn:t,BASE:n}=JR,r=t.fromBytes($I(e,32,`secretKey`)),i=n.multiply(r).toAffine();return{scalar:$R(i.y)?r:t.neg(r),bytes:QR(i)}}function tz(e){let t=qR;if(!t.isValidNot0(e))throw Error(`invalid x: Fail if x ≥ p`);let n=t.sqr(e),r=t.add(t.mulN(n,e),BigInt(7)),i=t.sqrt(r);$R(i)||(i=t.neg(i));let a=JR.fromAffine({x:e,y:i});return a.assertValidity(),a}var nz=hL;function rz(...e){return JR.Fn.create(nz(XR(`BIP0340/challenge`,...e)))}function iz(e){return ez(e).bytes}function az(e,t,n=VI(32)){let{Fn:r,BASE:i}=JR,a=yL($I(e,void 0,`message`)),{bytes:o,scalar:s}=ez(t),c=$I(n,32,`auxRand`),l=XR(`BIP0340/nonce`,r.toBytes(s^nz(XR(`BIP0340/aux`,c))),o,a),u=r.create(nz(l));if(u===WR)throw Error(`sign failed: k is zero`);let d=i.multiply(u).toAffine(),f=$R(d.y)?u:r.neg(u),p=QR(d),m=rz(p,o,a),h=new Uint8Array(64);if(h.set(p,0),h.set(r.toBytes(r.create(f+m*s)),32),!oz(h,a,o))throw Error(`sign: Invalid signature produced`);return h}function oz(e,t,n){let{Fp:r,Fn:i,BASE:a}=JR,o=$I(e,64,`signature`),s=$I(t,void 0,`message`),c=$I(n,32,`publicKey`);try{let e=tz(nz(c)),t=o.subarray(0,32),n=nz(t);if(!r.isValidNot0(n))return!1;let l=nz(o.subarray(32,64));if(!i.isValidNot0(l))return!1;let u=rz(t,ZR(e),s),d=a.mulAddUnsafe(l,e,i.neg(u)),{x:f,y:p}=d.toAffine();return!(d.is0()||!$R(p)||!r.eql(f,n))}catch{return!1}}var sz=(()=>{let e=e=>(e=e===void 0?VI(48):e,oR($I(e,48,`seed`),HR.n));return Object.freeze({keygen:jR(e,iz),getPublicKey:iz,sign:az,verify:oz,Point:JR,utils:Object.freeze({randomSecretKey:e,taggedHash:XR,lift_x:tz,pointToBytes:ZR}),lengths:Object.freeze({secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48})})})();new TextDecoder(`utf-8`);var cz=new TextEncoder,lz=`https://w3id.org/security#`;function uz(){return{id:``,created:``,dateDeleted:``,content:``,maker:``,sig:``}}function dz(e){return JSON.stringify(e)}function fz(e){return FI(ZI(cz.encode(dz(e))))}function pz(e,t,n){return sz.verify(LI(e),LI(fz(t)),LI(n))}function mz(e,t){return FI(sz.sign(LI(fz(e)),LI(t)))}var hz=e=>{let t=n.store.any(e,L.space(`preferencesFile`),null,e.doc())?.value;if(t=t?.split(`/`).slice(0,-2).join(`/`),!t)throw Error(`prefererencesFile is expected to exist in ${e}`);return t},gz=e=>{let t;try{t=`${hz(e)}/profile/keys/publicKey.ttl`}catch(e){lf(e)}return t},_z=e=>{let t;try{t=`${hz(e)}/settings/keys/privateKey.ttl`}catch(e){lf(e)}return t};async function vz(e,t){return await bz(e,t,`publicKey`)}async function yz(e,t){return await bz(e,t,`privateKey`)}async function bz(e,t,r){try{return await n.store.fetcher.load(t),n.store.any(e,L.solid(r))?.value}catch(e){if(e.response.status===404){B(`createIfNotExists: doc does NOT exist, will create... `+t);try{await n.store.fetcher.webOperation(`PUT`,t,{data:``,contentType:`text/turtle`})}catch(e){throw B(`createIfNotExists doc FAILED: `+t+`: `+e),e}delete n.store.fetcher.requested[t];return}throw B(`createIfNotExists doc FAILED: `+t+`: `+e),e}}async function xz(e,t){await n.store.fetcher.load(e);let r=n.store.any(n.store.sym(e),n.store.sym(`http://www.iana.org/assignments/link-relations/acl`));if(!r)throw Error(`Key ACL doc not found!`);try{await n.store.fetcher.webOperation(`PUT`,r.value,{data:t,contentType:`text/turtle`})}catch(e){if(e?.response?.status!==404)throw Error(e);B(`delete `+r.value+` `+e.response.status)}}var Sz=e=>`
|
|
2520
2520
|
@prefix : <#>.
|
|
2521
2521
|
@prefix acl: <http://www.w3.org/ns/auth/acl#>.
|