@ulb-darmstadt/shacl-form 1.9.0 → 1.9.1

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.
@@ -73,7 +73,7 @@ a, a:visited { color: inherit; }
73
73
  .ref-link { cursor: pointer; }
74
74
  .ref-link:hover { text-decoration: underline; }
75
75
  .node-id-display { color: #999; font-size: 11px; }`;class bg{constructor(e){let t=gg;e&&(t+=`
76
- `+e),this.stylesheet=new CSSStyleSheet,this.stylesheet.replaceSync(t)}apply(e){}createViewer(e,t,r){const n=document.createElement("div"),s=document.createElement("label");s.innerHTML=e+":",r.description&&s.setAttribute("title",r.description.value),n.appendChild(s);let o=t.value,a=null;if(t instanceof Mo){const l=r.config.store.getQuads(o,null,null,null);if(l.length){const d=js(l,r.config.languages);d&&(o=d)}}else t instanceof yi&&(t.language?(a=document.createElement("span"),a.classList.add("lang"),a.innerText=`@${t.language}`):t.datatype.value===`${br}date`?o=new Date(Date.parse(t.value)).toDateString():t.datatype.value===`${br}dateTime`&&(o=new Date(Date.parse(t.value)).toLocaleString()));let c;return ec(t.value)?(c=document.createElement("a"),c.setAttribute("href",t.value)):c=document.createElement("div"),c.classList.add("d-flex"),c.innerText=o,a&&c.appendChild(a),n.appendChild(c),n}}function yg(i,e,t){if(t){const r=i.minCount!==void 0&&i.minCount>0;if(i.class)return i.config.theme.createListEditor(i.label,e,r,qc(i.class,i),i);if(i.shaclIn){const n=i.config.lists[i.shaclIn];if(n?.length){const s=rp(n,i.config.store,i.config.languages);return i.config.theme.createListEditor(i.label,e,r,s,i)}else console.error("list not found:",i.shaclIn,"existing lists:",i.config.lists)}if(i.datatype?.value===`${Pc}langString`||i.languageIn?.length)return i.config.theme.createLangStringEditor(i.label,e,r,i);switch(i.datatype?.value.replace(br,"")){case"integer":case"float":case"double":case"decimal":return i.config.theme.createNumberEditor(i.label,e,r,i);case"date":case"dateTime":return i.config.theme.createDateEditor(i.label,e,r,i);case"boolean":return i.config.theme.createBooleanEditor(i.label,e,r,i);case"base64Binary":return i.config.theme.createFileEditor(i.label,e,r,i)}return i.config.theme.createTextEditor(i.label,e,r,i)}else{if(e)return i.config.theme.createViewer(i.label,e,i);const r=document.createElement("div");return r.innerHTML="No value",r}}function vg(i,e,t){if(e==="application/ld+json")return wg(i);{const r=new Nc({format:e,prefixes:t});r.addQuads(i);let n="";return r.end((s,o)=>{s&&console.error(s),n=o}),n}}function wg(i){const e=[];for(const t of i){const r={"@id":t.subject.id};if(t.predicate===qt)r["@type"]=t.object.id;else{let n=t.object.value;t.object instanceof yi?t.object.language?n={"@language":t.object.language,"@value":t.object.value}:t.object.datatype&&t.object.datatype.value!==`${br}#string`&&(n={"@type":t.object.datatype.value,"@value":t.object.value}):n={"@id":t.object.id},r[t.predicate.value]=n}e.push(r)}return JSON.stringify(e)}function _g(i){let e=i.shaclDatatype,t=i.value;if(t){if(i.dataset.class||i.dataset.nodeKind===Oe+"IRI")return He.namedNode(t);if(i.dataset.link)return JSON.parse(i.dataset.link);if(i.dataset.lang?e=i.dataset.lang:i.type==="number"?t=parseFloat(t):i.type==="file"&&i.binaryData?t=i.binaryData:i.type==="datetime-local"&&(t=new Date(t).toISOString().slice(0,19)),!e&&typeof t=="string"){const r=t.split("^^");r.length===2&&(r[0].startsWith('"')&&r[0].endsWith('"')||r[0].startsWith("'")&&r[0].endsWith("'"))&&r[1].split(":").length===2&&(t=r[0].substring(1,r[0].length-1),e=He.namedNode(r[1]))}return He.literal(t,e)}else if((i.type==="checkbox"||i.getAttribute("type")==="checkbox")&&(i.checked||parseInt(i.dataset.minCount||"0")>0))return He.literal(i.checked?"true":"false",e)}const bs={};function xg(i){i.predicate===void 0&&i.datatype===void 0?console.warn('not registering plugin because it does neither define "predicate" nor "datatype"',i):bs[`${i.predicate}^${i.datatype}`]=i}function Eg(){return Object.entries(bs).map(i=>i[1])}function Sg(i,e){let t=bs[`${i}^${e}`];return t||(t=bs[`${i}^undefined`],t)?t:bs[`undefined^${e}`]}class ix{constructor(e,t){this.predicate=e.predicate,this.datatype=e.datatype,t&&(this.stylesheet=new CSSStyleSheet,this.stylesheet.replaceSync(t))}createViewer(e,t){return e.config.theme.createViewer(e.label,t,e)}}/**
76
+ `+e),this.stylesheet=new CSSStyleSheet,this.stylesheet.replaceSync(t)}apply(e){}createViewer(e,t,r){const n=document.createElement("div"),s=document.createElement("label");s.innerHTML=e+":",r.description&&s.setAttribute("title",r.description.value),n.appendChild(s);let o=t.value,a=null;if(t instanceof Mo){const l=r.config.store.getQuads(o,null,null,null);if(l.length){const d=js(l,r.config.languages);d&&(o=d)}}else t instanceof yi&&(t.language?(a=document.createElement("span"),a.classList.add("lang"),a.innerText=`@${t.language}`):t.datatype.value===`${br}date`?o=new Date(Date.parse(t.value)).toDateString():t.datatype.value===`${br}dateTime`&&(o=new Date(Date.parse(t.value)).toLocaleString()));let c;return ec(t.value)?(c=document.createElement("a"),c.setAttribute("href",t.value)):c=document.createElement("div"),c.classList.add("d-flex"),c.innerText=o,a&&c.appendChild(a),n.appendChild(c),n}}function yg(i,e,t){if(t){const r=i.minCount!==void 0&&i.minCount>0;if(i.class)return i.config.theme.createListEditor(i.label,e,r,qc(i.class,i),i);if(i.shaclIn){const n=i.config.lists[i.shaclIn];if(n?.length){const s=rp(n,i.config.store,i.config.languages);return i.config.theme.createListEditor(i.label,e,r,s,i)}else console.error("list not found:",i.shaclIn,"existing lists:",i.config.lists)}if(i.datatype?.value===`${Pc}langString`||i.languageIn?.length)return i.config.theme.createLangStringEditor(i.label,e,r,i);switch(i.datatype?.value.replace(br,"")){case"integer":case"float":case"double":case"decimal":return i.config.theme.createNumberEditor(i.label,e,r,i);case"date":case"dateTime":return i.config.theme.createDateEditor(i.label,e,r,i);case"boolean":return i.config.theme.createBooleanEditor(i.label,e,r,i);case"base64Binary":return i.config.theme.createFileEditor(i.label,e,r,i)}return i.config.theme.createTextEditor(i.label,e,r,i)}else{if(e)return i.config.theme.createViewer(i.label,e,i);const r=document.createElement("div");return r.innerHTML="No value",r}}function vg(i,e,t){if(e==="application/ld+json")return wg(i);{const r=new Nc({format:e,prefixes:t});r.addQuads(i);let n="";return r.end((s,o)=>{s&&console.error(s),n=o}),n}}function wg(i){const e=[];for(const t of i){const r={"@id":t.subject.id};if(t.predicate===qt)r["@type"]=t.object.id;else{let n=t.object.value;t.object instanceof yi?t.object.language?n={"@language":t.object.language,"@value":t.object.value}:t.object.datatype&&t.object.datatype.value!==`${br}#string`&&(n={"@type":t.object.datatype.value,"@value":t.object.value}):n={"@id":t.object.id},r[t.predicate.value]=n}e.push(r)}return JSON.stringify(e)}function _g(i){let e=i.shaclDatatype,t=i.value;if(t){if(i.dataset.class||i.dataset.nodeKind===Oe+"IRI")return He.namedNode(t);if(i.dataset.link)return JSON.parse(i.dataset.link);if(i.dataset.lang?e=i.dataset.lang:i.type==="number"?t=parseFloat(t):i.type==="file"&&i.binaryData?t=i.binaryData:i.type==="datetime-local"&&(t=new Date(t).toISOString().slice(0,19)),!e&&typeof t=="string"){const r=t.split("^^");r.length===2&&(r[0].startsWith('"')&&r[0].endsWith('"')||r[0].startsWith("'")&&r[0].endsWith("'"))&&r[1].split(":").length===2&&(t=r[0].substring(1,r[0].length-1),e=He.namedNode(r[1]))}return He.literal(t,e)}else if((i.type==="checkbox"||i.getAttribute("type")==="checkbox")&&(i.checked||parseInt(i.dataset.minCount||"0")>0))return He.literal(i.checked?"true":"false",e)}const bs={};function xg(i){i.predicate===void 0&&i.datatype===void 0?console.warn('not registering plugin because it does neither define "predicate" nor "datatype"',i):bs[`${i.predicate}^${i.datatype}`]=i}function Eg(){return Object.entries(bs).map(i=>i[1])}function Sg(i,e){let t=bs[`${i}^${e}`];return t||(t=bs[`${i}^undefined`],t)?t:bs[`undefined^${e}`]}class tx{constructor(e,t){this.predicate=e.predicate,this.datatype=e.datatype,t&&(this.stylesheet=new CSSStyleSheet,this.stylesheet.replaceSync(t))}createViewer(e,t){return e.config.theme.createViewer(e.label,t,e)}}/**
77
77
  * @license
78
78
  * Copyright 2019 Google LLC
79
79
  * SPDX-License-Identifier: BSD-3-Clause
@@ -364,16 +364,16 @@ if("@preserve"in h)return h["@preserve"][0];if(e.isValue(h))return h;if(e.isList
364
364
  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
365
365
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
366
366
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
367
- */var _l,jh;function dy(){if(jh)return _l;jh=1;const i=td(),e=Jb(),t=vi(),r=ey(),n=t.IdentifierIssuer,s=Ei(),o=Op(),a=ty(),{expand:c}=iy(),{flatten:l}=ry(),{fromRDF:d}=ny(),{toRDF:u}=oy(),{frameMergedOrDefault:p,cleanupNull:g}=ay(),{isArray:v,isObject:_,isString:E}=mi(),{isSubjectReference:x}=ar(),{expandIri:k,getInitialContext:y,process:h,processingMode:m}=Vr(),{compact:T,compactIri:N}=ly(),{createNodeMap:C,createMergedNodeMap:F,mergeNodeMaps:I}=Go(),{logEventHandler:O,logWarningEventHandler:U,safeEventHandler:R,setDefaultEventHandler:D,setupEventHandler:Q,strictEventHandler:$,unhandledEventHandler:Y}=Bs(),B=function(S){const H={},J=new o({max:100});S.compact=async function(W,G,X){if(arguments.length<2)throw new TypeError("Could not compact, too few arguments.");if(G===null)throw new s("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"});if(W===null)return null;X=he(X,{base:E(W)?W:"",compactArrays:!0,compactToRelative:!0,graph:!1,skipExpansion:!1,link:!1,issuer:new n("_:b"),contextResolver:new r({sharedCache:J})}),X.link&&(X.skipExpansion=!0),X.compactToRelative||delete X.base;let z;X.skipExpansion?z=W:z=await S.expand(W,X);const ne=await S.processContext(y(X),G,X);let se=await T({activeCtx:ne,element:z,options:X});X.compactArrays&&!X.graph&&v(se)?se.length===1?se=se[0]:se.length===0&&(se={}):X.graph&&_(se)&&(se=[se]),_(G)&&"@context"in G&&(G=G["@context"]),G=t.clone(G),v(G)||(G=[G]);const ye=G;G=[];for(let M=0;M<ye.length;++M)(!_(ye[M])||Object.keys(ye[M]).length>0)&&G.push(ye[M]);const _e=G.length>0;if(G.length===1&&(G=G[0]),v(se)){const M=N({activeCtx:ne,iri:"@graph",relativeTo:{vocab:!0}}),K=se;se={},_e&&(se["@context"]=G),se[M]=K}else if(_(se)&&_e){const M=se;se={"@context":G};for(const K in M)se[K]=M[K]}return se},S.expand=async function(W,G){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");G=he(G,{keepFreeFloatingNodes:!1,contextResolver:new r({sharedCache:J})});const X={},z=[];if("expandContext"in G){const _e=t.clone(G.expandContext);_(_e)&&"@context"in _e?X.expandContext=_e:X.expandContext={"@context":_e},z.push(X.expandContext)}let ne;if(!E(W))X.input=t.clone(W);else{const _e=await S.get(W,G);ne=_e.documentUrl,X.input=_e.document,_e.contextUrl&&(X.remoteContext={"@context":_e.contextUrl},z.push(X.remoteContext))}"base"in G||(G.base=ne||"");let se=y(G);for(const _e of z)se=await h({activeCtx:se,localCtx:_e,options:G});let ye=await c({activeCtx:se,element:X.input,options:G});return _(ye)&&"@graph"in ye&&Object.keys(ye).length===1?ye=ye["@graph"]:ye===null&&(ye=[]),v(ye)||(ye=[ye]),ye},S.flatten=async function(W,G,X){if(arguments.length<1)return new TypeError("Could not flatten, too few arguments.");typeof G=="function"?G=null:G=G||null,X=he(X,{base:E(W)?W:"",contextResolver:new r({sharedCache:J})});const z=await S.expand(W,X),ne=l(z);return G===null?ne:(X.graph=!0,X.skipExpansion=!0,await S.compact(ne,G,X))},S.frame=async function(W,G,X){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");if(X=he(X,{base:E(W)?W:"",embed:"@once",explicit:!1,requireAll:!1,omitDefault:!1,bnodesToClear:[],contextResolver:new r({sharedCache:J})}),E(G)){const be=await S.get(G,X);if(G=be.document,be.contextUrl){let ve=G["@context"];ve?v(ve)?ve.push(be.contextUrl):ve=[ve,be.contextUrl]:ve=be.contextUrl,G["@context"]=ve}}const z=G?G["@context"]||{}:{},ne=await S.processContext(y(X),z,X);X.hasOwnProperty("omitGraph")||(X.omitGraph=m(ne,1.1)),X.hasOwnProperty("pruneBlankNodeIdentifiers")||(X.pruneBlankNodeIdentifiers=m(ne,1.1));const se=await S.expand(W,X),ye={...X};ye.isFrame=!0,ye.keepFreeFloatingNodes=!0;const _e=await S.expand(G,ye),M=Object.keys(G).map(be=>k(ne,be,{vocab:!0}));ye.merged=!M.includes("@graph"),ye.is11=m(ne,1.1);const K=p(se,_e,ye);ye.graph=!X.omitGraph,ye.skipExpansion=!0,ye.link={},ye.framing=!0;let ce=await S.compact(K,z,ye);return ye.link={},ce=g(ce,ye),ce},S.link=async function(W,G,X){const z={};return G&&(z["@context"]=G),z["@embed"]="@link",S.frame(W,z,X)},S.normalize=S.canonize=async function(W,G){if(arguments.length<1)throw new TypeError("Could not canonize, too few arguments.");if(G=he(G,{base:E(W)?W:null,algorithm:"URDNA2015",skipExpansion:!1,safe:!0,contextResolver:new r({sharedCache:J})}),"inputFormat"in G){if(G.inputFormat!=="application/n-quads"&&G.inputFormat!=="application/nquads")throw new s("Unknown canonicalization input format.","jsonld.CanonizeError");const ne=a.parse(W);return i.canonize(ne,G)}const X={...G};delete X.format,X.produceGeneralizedRdf=!1;const z=await S.toRDF(W,X);return i.canonize(z,G)},S.fromRDF=async function(W,G){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");G=he(G,{format:E(W)?"application/n-quads":void 0});const{format:X}=G;let{rdfParser:z}=G;if(X){if(z=z||H[X],!z)throw new s("Unknown input format.","jsonld.UnknownFormat",{format:X})}else z=()=>W;const ne=await z(W);return d(ne,G)},S.toRDF=async function(W,G){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");G=he(G,{base:E(W)?W:"",skipExpansion:!1,contextResolver:new r({sharedCache:J})});let X;G.skipExpansion?X=W:X=await S.expand(W,G);const z=u(X,G);if(G.format){if(G.format==="application/n-quads"||G.format==="application/nquads")return a.serialize(z);throw new s("Unknown output format.","jsonld.UnknownFormat",{format:G.format})}return z},S.createNodeMap=async function(W,G){if(arguments.length<1)throw new TypeError("Could not create node map, too few arguments.");G=he(G,{base:E(W)?W:"",contextResolver:new r({sharedCache:J})});const X=await S.expand(W,G);return F(X,G)},S.merge=async function(W,G,X){if(arguments.length<1)throw new TypeError("Could not merge, too few arguments.");if(!v(W))throw new TypeError('Could not merge, "docs" must be an array.');typeof G=="function"?G=null:G=G||null,X=he(X,{contextResolver:new r({sharedCache:J})});const z=await Promise.all(W.map(be=>{const ve={...X};return S.expand(be,ve)}));let ne=!0;"mergeNodes"in X&&(ne=X.mergeNodes);const se=X.issuer||new n("_:b"),ye={"@default":{}};for(let be=0;be<z.length;++be){const ve=t.relabelBlankNodes(z[be],{issuer:new n("_:b"+be+"-")}),xe=ne||be===0?ye:{"@default":{}};if(C(ve,xe,"@default",se),xe!==ye)for(const ie in xe){const me=xe[ie];if(!(ie in ye)){ye[ie]=me;continue}const Ee=ye[ie];for(const fe in me)fe in Ee||(Ee[fe]=me[fe])}}const _e=I(ye),M=[],K=Object.keys(_e).sort();for(let be=0;be<K.length;++be){const ve=_e[K[be]];x(ve)||M.push(ve)}return G===null?M:(X.graph=!0,X.skipExpansion=!0,await S.compact(M,G,X))},Object.defineProperty(S,"documentLoader",{get:()=>S._documentLoader,set:W=>S._documentLoader=W}),S.documentLoader=async W=>{throw new s("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:W})},S.get=async function(W,G){let X;typeof G.documentLoader=="function"?X=G.documentLoader:X=S.documentLoader;const z=await X(W);try{if(!z.document)throw new s("No remote document found at the given URL.","jsonld.NullRemoteDocument");E(z.document)&&(z.document=JSON.parse(z.document))}catch(ne){throw new s("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:ne,remoteDoc:z})}return z},S.processContext=async function(W,G,X){return X=he(X,{base:"",contextResolver:new r({sharedCache:J})}),G===null?y(X):(G=t.clone(G),_(G)&&"@context"in G||(G={"@context":G}),h({activeCtx:W,localCtx:G,options:X}))},S.getContextValue=Vr().getContextValue,S.documentLoaders={},S.useDocumentLoader=function(W){if(!(W in S.documentLoaders))throw new s('Unknown document loader type: "'+W+'"',"jsonld.UnknownDocumentLoader",{type:W});S.documentLoader=S.documentLoaders[W].apply(S,Array.prototype.slice.call(arguments,1))},S.registerRDFParser=function(W,G){H[W]=G},S.unregisterRDFParser=function(W){delete H[W]},S.registerRDFParser("application/n-quads",a.parse),S.registerRDFParser("application/nquads",a.parse),S.url=xr(),S.logEventHandler=O,S.logWarningEventHandler=U,S.safeEventHandler=R,S.setDefaultEventHandler=D,S.strictEventHandler=$,S.unhandledEventHandler=Y,S.util=t,Object.assign(S,t),S.promises=S,S.RequestQueue=Lp(),S.JsonLdProcessor=cy()(S),e.setupGlobals(S),e.setupDocumentLoaders(S);function he(W,{documentLoader:G=S.documentLoader,...X}){if(W&&"compactionMap"in W)throw new s('"compactionMap" not supported.',"jsonld.OptionsError");if(W&&"expansionMap"in W)throw new s('"expansionMap" not supported.',"jsonld.OptionsError");return Object.assign({},{documentLoader:G},X,W,{eventHandler:Q({options:W})})}return S},re=function(){return B(function(){return re()})};return B(re),_l=re,_l}var uy=dy();const xl={},El={},hy=new zf;let nc;class fy{constructor(e){this.loadedExternalUrls=[],this.loadedClasses=[],this.config=e}async loadGraphs(){this.loadedExternalUrls=[],this.loadedClasses=[];let e=nc;this.config.prefixes={};const t=[];if(e||(e=new jt,t.push(this.importRDF(this.config.attributes.shapes?this.config.attributes.shapes:this.config.attributes.shapesUrl?ao(this.config.attributes.shapesUrl):"",e,xo))),t.push(this.importRDF(this.config.attributes.values?this.config.attributes.values:this.config.attributes.valuesUrl?ao(this.config.attributes.valuesUrl):"",e,Fi)),await Promise.all(t),!nc&&e?.size==0&&this.config.attributes.valuesSubject){const r=[...e.getObjects(this.config.attributes.valuesSubject,qt,Fi),...e.getObjects(this.config.attributes.valuesSubject,Yl,Fi)],n=[];for(const s of r){const o=this.toURL(s.value);o&&this.loadedExternalUrls.indexOf(o)<0&&(this.loadedExternalUrls.push(o),n.push(this.importRDF(ao(o),e,xo)))}try{await Promise.allSettled(n)}catch(s){console.warn(s)}}this.config.store=e}async importRDF(e,t,r){const n=async s=>{const o=[];await new Promise((a,c)=>{const l=u=>{if(t.add(new Fo(u.subject,u.predicate,u.object,r)),this.config.attributes.ignoreOwlImports===null&&jc.equals(u.predicate)){const p=this.toURL(u.object.value);p&&this.loadedExternalUrls.indexOf(p)<0&&(this.loadedExternalUrls.push(p),o.push(this.importRDF(ao(p),t,He.namedNode(p))))}if(this.config.classInstanceProvider&&Bc.equals(u.predicate)){const p=u.object.value;if(this.loadedClasses.indexOf(p)<0){let g;p in El?g=El[p]:(g=this.config.classInstanceProvider(p),El[p]=g),this.loadedClasses.push(p),o.push(this.importRDF(g,t,r))}}};if(Bh(s)==="xml"){const u=new qb.RdfXmlParser;u.on("data",p=>{l(p)}).on("error",p=>{console.warn("failed parsing graph",r,p.message),c(p)}).on("prefix",(p,g)=>{p&&(this.config.prefixes[p]=g)}).on("end",()=>{a(null)}),u.write(s),u.end()}else hy.parse(s,(u,p,g)=>{if(u)return console.warn("failed parsing graph",r,u.message),c(u);if(p){l(p);return}g&&this.config.registerPrefixes(g),a(null)})});try{await Promise.allSettled(o)}catch(a){console.warn(a)}};if(e instanceof Promise&&(e=await e),e){if(Bh(e)==="json")try{e=await uy.toRDF(JSON.parse(e),{format:"application/n-quads"})}catch(s){console.error(s)}await n(e)}}toURL(e){if(ec(e))return e;if(this.config.prefixes){const t=e.split(":");if(t.length===2){const r=this.config.prefixes[t[0]];if(r&&(e=e.replace(`${t[0]}:`,r),ec(e)))return e}}return null}}async function ao(i){if(i in xl)return xl[i];const e=fetch(i,{headers:{Accept:"text/turtle, application/trig, application/n-triples, application/n-quads, text/n3, application/ld+json"}}).then(t=>t.text());return xl[i]=e,e}function Bh(i){return/^\s*\{/.test(i)?"json":/^\s*<\?xml/.test(i)?"xml":"ttl"}function py(i){nc=i}class Sl{constructor(){this.shapes=null,this.shapesUrl=null,this.shapeSubject=null,this.values=null,this.valuesUrl=null,this.valueSubject=null,this.valuesSubject=null,this.valuesNamespace="",this.valuesGraph=null,this.view=null,this.language=null,this.loading="Loading…",this.ignoreOwlImports=null,this.collapse=null,this.submitButton=null,this.generateNodeShapeReference=null,this.showNodeIds=null}}class qh{constructor(e,t){this.attributes=new Sl,this.loader=new fy(this),this.prefixes={},this.editMode=!0,this.lists={},this.groups=[],this.renderedNodes=new Set,this._store=new jt,this.theme=e,this.form=t,this.languages=[...new Set(navigator.languages.flatMap(r=>r.length>2?[r.toLocaleLowerCase(),r.substring(0,2)]:r)),""]}updateAttributes(e){const t=new Sl;if(Object.keys(t).forEach(r=>{const n=e.dataset[r];n!==void 0&&(t[r]=n)}),this.editMode=t.view===null,this.attributes=t,this.attributes.valueSubject&&!this.attributes.valuesSubject&&(this.attributes.valuesSubject=this.attributes.valueSubject),t.language){const r=this.languages.indexOf(t.language);r>-1&&this.languages.splice(r,1),this.languages.unshift(t.language)}t.valuesGraph&&(this.valuesGraphId=He.namedNode(t.valuesGraph))}static dataAttributes(){const e=new Sl;return Object.keys(e).map(t=>(t=t.replace(/[A-Z]/g,r=>"-"+r.toLowerCase()),"data-"+t))}get store(){return this._store}set store(e){this._store=e,this.lists=e.extractLists(),this.groups=[],e.forSubjects(t=>{this.groups.push(t.id)},qt,`${Oe}PropertyGroup`,null)}registerPrefixes(e){for(const t in e)t&&(this.prefixes[t]=e[t])}}function my(i){return"_:"+i.value}function gy(i,e){return[...i].map(t=>e(t)).join(`
367
+ */var _l,jh;function dy(){if(jh)return _l;jh=1;const i=td(),e=Jb(),t=vi(),r=ey(),n=t.IdentifierIssuer,s=Ei(),o=Op(),a=ty(),{expand:c}=iy(),{flatten:l}=ry(),{fromRDF:d}=ny(),{toRDF:u}=oy(),{frameMergedOrDefault:p,cleanupNull:g}=ay(),{isArray:v,isObject:_,isString:E}=mi(),{isSubjectReference:x}=ar(),{expandIri:k,getInitialContext:y,process:h,processingMode:m}=Vr(),{compact:T,compactIri:N}=ly(),{createNodeMap:C,createMergedNodeMap:F,mergeNodeMaps:I}=Go(),{logEventHandler:O,logWarningEventHandler:U,safeEventHandler:R,setDefaultEventHandler:D,setupEventHandler:Q,strictEventHandler:$,unhandledEventHandler:Y}=Bs(),B=function(S){const H={},J=new o({max:100});S.compact=async function(W,G,X){if(arguments.length<2)throw new TypeError("Could not compact, too few arguments.");if(G===null)throw new s("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"});if(W===null)return null;X=he(X,{base:E(W)?W:"",compactArrays:!0,compactToRelative:!0,graph:!1,skipExpansion:!1,link:!1,issuer:new n("_:b"),contextResolver:new r({sharedCache:J})}),X.link&&(X.skipExpansion=!0),X.compactToRelative||delete X.base;let z;X.skipExpansion?z=W:z=await S.expand(W,X);const ne=await S.processContext(y(X),G,X);let se=await T({activeCtx:ne,element:z,options:X});X.compactArrays&&!X.graph&&v(se)?se.length===1?se=se[0]:se.length===0&&(se={}):X.graph&&_(se)&&(se=[se]),_(G)&&"@context"in G&&(G=G["@context"]),G=t.clone(G),v(G)||(G=[G]);const ye=G;G=[];for(let M=0;M<ye.length;++M)(!_(ye[M])||Object.keys(ye[M]).length>0)&&G.push(ye[M]);const _e=G.length>0;if(G.length===1&&(G=G[0]),v(se)){const M=N({activeCtx:ne,iri:"@graph",relativeTo:{vocab:!0}}),K=se;se={},_e&&(se["@context"]=G),se[M]=K}else if(_(se)&&_e){const M=se;se={"@context":G};for(const K in M)se[K]=M[K]}return se},S.expand=async function(W,G){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");G=he(G,{keepFreeFloatingNodes:!1,contextResolver:new r({sharedCache:J})});const X={},z=[];if("expandContext"in G){const _e=t.clone(G.expandContext);_(_e)&&"@context"in _e?X.expandContext=_e:X.expandContext={"@context":_e},z.push(X.expandContext)}let ne;if(!E(W))X.input=t.clone(W);else{const _e=await S.get(W,G);ne=_e.documentUrl,X.input=_e.document,_e.contextUrl&&(X.remoteContext={"@context":_e.contextUrl},z.push(X.remoteContext))}"base"in G||(G.base=ne||"");let se=y(G);for(const _e of z)se=await h({activeCtx:se,localCtx:_e,options:G});let ye=await c({activeCtx:se,element:X.input,options:G});return _(ye)&&"@graph"in ye&&Object.keys(ye).length===1?ye=ye["@graph"]:ye===null&&(ye=[]),v(ye)||(ye=[ye]),ye},S.flatten=async function(W,G,X){if(arguments.length<1)return new TypeError("Could not flatten, too few arguments.");typeof G=="function"?G=null:G=G||null,X=he(X,{base:E(W)?W:"",contextResolver:new r({sharedCache:J})});const z=await S.expand(W,X),ne=l(z);return G===null?ne:(X.graph=!0,X.skipExpansion=!0,await S.compact(ne,G,X))},S.frame=async function(W,G,X){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");if(X=he(X,{base:E(W)?W:"",embed:"@once",explicit:!1,requireAll:!1,omitDefault:!1,bnodesToClear:[],contextResolver:new r({sharedCache:J})}),E(G)){const be=await S.get(G,X);if(G=be.document,be.contextUrl){let ve=G["@context"];ve?v(ve)?ve.push(be.contextUrl):ve=[ve,be.contextUrl]:ve=be.contextUrl,G["@context"]=ve}}const z=G?G["@context"]||{}:{},ne=await S.processContext(y(X),z,X);X.hasOwnProperty("omitGraph")||(X.omitGraph=m(ne,1.1)),X.hasOwnProperty("pruneBlankNodeIdentifiers")||(X.pruneBlankNodeIdentifiers=m(ne,1.1));const se=await S.expand(W,X),ye={...X};ye.isFrame=!0,ye.keepFreeFloatingNodes=!0;const _e=await S.expand(G,ye),M=Object.keys(G).map(be=>k(ne,be,{vocab:!0}));ye.merged=!M.includes("@graph"),ye.is11=m(ne,1.1);const K=p(se,_e,ye);ye.graph=!X.omitGraph,ye.skipExpansion=!0,ye.link={},ye.framing=!0;let ce=await S.compact(K,z,ye);return ye.link={},ce=g(ce,ye),ce},S.link=async function(W,G,X){const z={};return G&&(z["@context"]=G),z["@embed"]="@link",S.frame(W,z,X)},S.normalize=S.canonize=async function(W,G){if(arguments.length<1)throw new TypeError("Could not canonize, too few arguments.");if(G=he(G,{base:E(W)?W:null,algorithm:"URDNA2015",skipExpansion:!1,safe:!0,contextResolver:new r({sharedCache:J})}),"inputFormat"in G){if(G.inputFormat!=="application/n-quads"&&G.inputFormat!=="application/nquads")throw new s("Unknown canonicalization input format.","jsonld.CanonizeError");const ne=a.parse(W);return i.canonize(ne,G)}const X={...G};delete X.format,X.produceGeneralizedRdf=!1;const z=await S.toRDF(W,X);return i.canonize(z,G)},S.fromRDF=async function(W,G){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");G=he(G,{format:E(W)?"application/n-quads":void 0});const{format:X}=G;let{rdfParser:z}=G;if(X){if(z=z||H[X],!z)throw new s("Unknown input format.","jsonld.UnknownFormat",{format:X})}else z=()=>W;const ne=await z(W);return d(ne,G)},S.toRDF=async function(W,G){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");G=he(G,{base:E(W)?W:"",skipExpansion:!1,contextResolver:new r({sharedCache:J})});let X;G.skipExpansion?X=W:X=await S.expand(W,G);const z=u(X,G);if(G.format){if(G.format==="application/n-quads"||G.format==="application/nquads")return a.serialize(z);throw new s("Unknown output format.","jsonld.UnknownFormat",{format:G.format})}return z},S.createNodeMap=async function(W,G){if(arguments.length<1)throw new TypeError("Could not create node map, too few arguments.");G=he(G,{base:E(W)?W:"",contextResolver:new r({sharedCache:J})});const X=await S.expand(W,G);return F(X,G)},S.merge=async function(W,G,X){if(arguments.length<1)throw new TypeError("Could not merge, too few arguments.");if(!v(W))throw new TypeError('Could not merge, "docs" must be an array.');typeof G=="function"?G=null:G=G||null,X=he(X,{contextResolver:new r({sharedCache:J})});const z=await Promise.all(W.map(be=>{const ve={...X};return S.expand(be,ve)}));let ne=!0;"mergeNodes"in X&&(ne=X.mergeNodes);const se=X.issuer||new n("_:b"),ye={"@default":{}};for(let be=0;be<z.length;++be){const ve=t.relabelBlankNodes(z[be],{issuer:new n("_:b"+be+"-")}),xe=ne||be===0?ye:{"@default":{}};if(C(ve,xe,"@default",se),xe!==ye)for(const ie in xe){const me=xe[ie];if(!(ie in ye)){ye[ie]=me;continue}const Ee=ye[ie];for(const fe in me)fe in Ee||(Ee[fe]=me[fe])}}const _e=I(ye),M=[],K=Object.keys(_e).sort();for(let be=0;be<K.length;++be){const ve=_e[K[be]];x(ve)||M.push(ve)}return G===null?M:(X.graph=!0,X.skipExpansion=!0,await S.compact(M,G,X))},Object.defineProperty(S,"documentLoader",{get:()=>S._documentLoader,set:W=>S._documentLoader=W}),S.documentLoader=async W=>{throw new s("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:W})},S.get=async function(W,G){let X;typeof G.documentLoader=="function"?X=G.documentLoader:X=S.documentLoader;const z=await X(W);try{if(!z.document)throw new s("No remote document found at the given URL.","jsonld.NullRemoteDocument");E(z.document)&&(z.document=JSON.parse(z.document))}catch(ne){throw new s("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:ne,remoteDoc:z})}return z},S.processContext=async function(W,G,X){return X=he(X,{base:"",contextResolver:new r({sharedCache:J})}),G===null?y(X):(G=t.clone(G),_(G)&&"@context"in G||(G={"@context":G}),h({activeCtx:W,localCtx:G,options:X}))},S.getContextValue=Vr().getContextValue,S.documentLoaders={},S.useDocumentLoader=function(W){if(!(W in S.documentLoaders))throw new s('Unknown document loader type: "'+W+'"',"jsonld.UnknownDocumentLoader",{type:W});S.documentLoader=S.documentLoaders[W].apply(S,Array.prototype.slice.call(arguments,1))},S.registerRDFParser=function(W,G){H[W]=G},S.unregisterRDFParser=function(W){delete H[W]},S.registerRDFParser("application/n-quads",a.parse),S.registerRDFParser("application/nquads",a.parse),S.url=xr(),S.logEventHandler=O,S.logWarningEventHandler=U,S.safeEventHandler=R,S.setDefaultEventHandler=D,S.strictEventHandler=$,S.unhandledEventHandler=Y,S.util=t,Object.assign(S,t),S.promises=S,S.RequestQueue=Lp(),S.JsonLdProcessor=cy()(S),e.setupGlobals(S),e.setupDocumentLoaders(S);function he(W,{documentLoader:G=S.documentLoader,...X}){if(W&&"compactionMap"in W)throw new s('"compactionMap" not supported.',"jsonld.OptionsError");if(W&&"expansionMap"in W)throw new s('"expansionMap" not supported.',"jsonld.OptionsError");return Object.assign({},{documentLoader:G},X,W,{eventHandler:Q({options:W})})}return S},re=function(){return B(function(){return re()})};return B(re),_l=re,_l}var uy=dy();const xl={},El={};let nc;class hy{constructor(e){this.loadedExternalUrls=[],this.loadedClasses=[],this.config=e}async loadGraphs(){this.loadedExternalUrls=[],this.loadedClasses=[];let e=nc;this.config.prefixes={};const t=[];if(e||(e=new jt,t.push(this.importRDF(this.config.attributes.shapes?this.config.attributes.shapes:this.config.attributes.shapesUrl?ao(this.config.attributes.shapesUrl):"",e,xo))),t.push(this.importRDF(this.config.attributes.values?this.config.attributes.values:this.config.attributes.valuesUrl?ao(this.config.attributes.valuesUrl):"",e,Fi)),await Promise.all(t),!nc&&e?.size==0&&this.config.attributes.valuesSubject){const r=[...e.getObjects(this.config.attributes.valuesSubject,qt,Fi),...e.getObjects(this.config.attributes.valuesSubject,Yl,Fi)],n=[];for(const s of r){const o=this.toURL(s.value);o&&this.loadedExternalUrls.indexOf(o)<0&&(this.loadedExternalUrls.push(o),n.push(this.importRDF(ao(o),e,xo)))}try{await Promise.allSettled(n)}catch(s){console.warn(s)}}this.config.store=e}async importRDF(e,t,r){const n=async s=>{const o=[];await new Promise((a,c)=>{const l=u=>{if(t.add(new Fo(u.subject,u.predicate,u.object,r)),this.config.attributes.ignoreOwlImports===null&&jc.equals(u.predicate)){const p=this.toURL(u.object.value);p&&this.loadedExternalUrls.indexOf(p)<0&&(this.loadedExternalUrls.push(p),o.push(this.importRDF(ao(p),t,He.namedNode(p))))}if(this.config.classInstanceProvider&&Bc.equals(u.predicate)){const p=u.object.value;if(this.loadedClasses.indexOf(p)<0){let g;p in El?g=El[p]:(g=this.config.classInstanceProvider(p),El[p]=g),this.loadedClasses.push(p),o.push(this.importRDF(g,t,r))}}};if(Bh(s)==="xml"){const u=new qb.RdfXmlParser;u.on("data",p=>{l(p)}).on("error",p=>{console.warn("failed parsing graph",r,p.message),c(p)}).on("prefix",(p,g)=>{p&&(this.config.prefixes[p]=g)}).on("end",()=>{a(null)}),u.write(s),u.end()}else try{console.log("--- parsing",s,r),new zf().parse(s,(u,p,g)=>{if(u)return console.warn("failed parsing graph",r,u.message),c(u);if(p){l(p);return}g&&this.config.registerPrefixes(g),a(null)})}catch(u){c(u)}});try{await Promise.allSettled(o)}catch(a){console.warn(a)}};if(e instanceof Promise&&(e=await e),e){if(Bh(e)==="json")try{e=await uy.toRDF(JSON.parse(e),{format:"application/n-quads"})}catch(s){console.error(s)}await n(e)}}toURL(e){if(ec(e))return e;if(this.config.prefixes){const t=e.split(":");if(t.length===2){const r=this.config.prefixes[t[0]];if(r&&(e=e.replace(`${t[0]}:`,r),ec(e)))return e}}return null}}async function ao(i){if(i in xl)return xl[i];const e=fetch(i,{headers:{Accept:"text/turtle, application/trig, application/n-triples, application/n-quads, text/n3, application/ld+json"}}).then(t=>t.text());return xl[i]=e,e}function Bh(i){return/^\s*\{/.test(i)?"json":/^\s*<\?xml/.test(i)?"xml":"ttl"}function fy(i){nc=i}class Sl{constructor(){this.shapes=null,this.shapesUrl=null,this.shapeSubject=null,this.values=null,this.valuesUrl=null,this.valueSubject=null,this.valuesSubject=null,this.valuesNamespace="",this.valuesGraph=null,this.view=null,this.language=null,this.loading="Loading…",this.ignoreOwlImports=null,this.collapse=null,this.submitButton=null,this.generateNodeShapeReference=null,this.showNodeIds=null}}class qh{constructor(e,t){this.attributes=new Sl,this.loader=new hy(this),this.prefixes={},this.editMode=!0,this.lists={},this.groups=[],this.renderedNodes=new Set,this._store=new jt,this.theme=e,this.form=t,this.languages=[...new Set(navigator.languages.flatMap(r=>r.length>2?[r.toLocaleLowerCase(),r.substring(0,2)]:r)),""]}updateAttributes(e){const t=new Sl;if(Object.keys(t).forEach(r=>{const n=e.dataset[r];n!==void 0&&(t[r]=n)}),this.editMode=t.view===null,this.attributes=t,this.attributes.valueSubject&&!this.attributes.valuesSubject&&(this.attributes.valuesSubject=this.attributes.valueSubject),t.language){const r=this.languages.indexOf(t.language);r>-1&&this.languages.splice(r,1),this.languages.unshift(t.language)}t.valuesGraph&&(this.valuesGraphId=He.namedNode(t.valuesGraph))}static dataAttributes(){const e=new Sl;return Object.keys(e).map(t=>(t=t.replace(/[A-Z]/g,r=>"-"+r.toLowerCase()),"data-"+t))}get store(){return this._store}set store(e){this._store=e,this.lists=e.extractLists(),this.groups=[],e.forSubjects(t=>{this.groups.push(t.id)},qt,`${Oe}PropertyGroup`,null)}registerPrefixes(e){for(const t in e)t&&(this.prefixes[t]=e[t])}}function py(i){return"_:"+i.value}function my(i,e){return[...i].map(t=>e(t)).join(`
368
368
  `)+`
369
- `}function by(){return""}function Pp(i){return"<"+i.value+">"}const yy=/["\\\\\n\r]/,vy=/["\\\\\n\r]/g,wy={'"':'\\"',"\\":"\\\\","\n":"\\n","\r":"\\r"};function _y(i){return wy[i]}function xy(i){return yy.test(i)?i.replace(vy,_y):i}function Ey(i){const e=xy(i.value);return i.datatype.value==="http://www.w3.org/2001/XMLSchema#string"?'"'+e+'"':i.datatype.value==="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"?'"'+e+'"@'+i.language:'"'+e+'"^^'+Pp(i.datatype)}function Sy(i,e){const t=e(i.subject),r=e(i.predicate),n=e(i.object),s=e(i.graph);return`${t} ${r} ${n} ${s?s+" ":""}.`}function ky(i){return"?"+i.value}function ci(i){if(!i)return null;if(i.termType==="BlankNode")return my(i);if(i.termType==="DefaultGraph")return by();if(i.termType==="Literal")return Ey(i);if(i.termType==="NamedNode")return Pp(i);if(i.termType==="Quad"||i.subject&&i.predicate&&i.object&&i.graph)return Sy(i,ci);if(i.termType==="Variable")return ky(i);if(i[Symbol.iterator])return gy(i,ci);throw new Error(`unknown termType ${i.termType}`)}class An{constructor(e){if(this.index=new Map,e)for(const[t,r]of e)this.set(t,r)}get size(){return this.index.size}clear(){this.index.clear()}delete(e){return this.index.delete(ci(e))}*entries(){for(const[,{term:e,value:t}]of this.index)yield[e,t]}forEach(e,t){for(const r of this.entries())e.call(t,r[1],r[0],this)}get(e){const t=this.index.get(ci(e));return t&&t.value}has(e){return this.index.has(ci(e))}*keys(){for(const[,{term:e}]of this.index)yield e}set(e,t){const r=ci(e);return this.index.set(r,{term:e,value:t}),this}*values(){for(const[,{value:e}]of this.index)yield e}[Symbol.iterator](){return this.entries()[Symbol.iterator]()}}class Uh{constructor({dataset:e,end:t,quad:r,start:n}){this.dataset=e,this.end=t,this.quad=r,this.start=n}get term(){return this.quad[this.end]}get graph(){return this.quad.graph}get startTerm(){return this.quad[this.start]}}function Vh(i){try{return ci(i)}catch{return null}}class wi{constructor(e){if(this.index=new Map,e)for(const t of e)this.add(t)}get size(){return this.index.size}add(e){const t=ci(e);return this.index.has(t)||this.index.set(t,e),this}clear(){this.index.clear()}delete(e){return e?this.index.delete(Vh(e)):!1}entries(){return this.values().entries()}forEach(e,t){return this.values().forEach(e,t)}has(e){return e?this.index.has(Vh(e)):!1}values(){return new Set(this.index.values())}keys(){return this.values()}[Symbol.iterator](){return this.index.values()}}class Mp{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}Mp.prototype.termType="BlankNode";class rd{equals(e){return!!e&&e.termType===this.termType}}rd.prototype.termType="DefaultGraph";rd.prototype.value="";function zh(i,e){if(!e)return null;if(e.termType==="BlankNode")return i.blankNode(e.value);if(e.termType==="DefaultGraph")return i.defaultGraph();if(e.termType==="Literal")return i.literal(e.value,e.language||i.namedNode(e.datatype.value));if(e.termType==="NamedNode")return i.namedNode(e.value);if(e.termType==="Quad"){const t=i.fromTerm(e.subject),r=i.fromTerm(e.predicate),n=i.fromTerm(e.object),s=i.fromTerm(e.graph);return i.quad(t,r,n,s)}if(e.termType==="Variable")return i.variable(e.value);throw new Error(`unknown termType ${e.termType}`)}class yo{constructor(e,t,r,n=""){this.value=e,this.language=t,this.datatype=r,this.direction=n}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value&&e.language===this.language&&e.datatype.equals(this.datatype)&&(e.direction||"")===this.direction}}yo.prototype.termType="Literal";class qs{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}qs.prototype.termType="NamedNode";class nd{constructor(e,t,r,n){this.subject=e,this.predicate=t,this.object=r,this.graph=n}equals(e){return!!e&&(e.termType==="Quad"||!e.termType)&&e.subject.equals(this.subject)&&e.predicate.equals(this.predicate)&&e.object.equals(this.object)&&e.graph.equals(this.graph)}}nd.prototype.termType="Quad";nd.prototype.value="";class Fp{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}Fp.prototype.termType="Variable";const Ry=new qs("http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString"),Hh=new qs("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),Iy=new qs("http://www.w3.org/2001/XMLSchema#string");class jp{constructor(){this.init()}init(){this._data={blankNodeCounter:0,defaultGraph:new rd}}namedNode(e){return new qs(e)}blankNode(e){return e=e||"b"+ ++this._data.blankNodeCounter,new Mp(e)}literal(e,t){return typeof t=="string"?new yo(e,t,Hh):typeof t?.language=="string"?new yo(e,t.language,t.direction?Ry:Hh,t.direction):new yo(e,"",t||Iy)}variable(e){return new Fp(e)}defaultGraph(){return this._data.defaultGraph}quad(e,t,r,n=this.defaultGraph()){return new nd(e,t,r,n)}fromTerm(e){return zh(this,e)}fromQuad(e){return zh(this,e)}}jp.exports=["blankNode","defaultGraph","fromQuad","fromTerm","literal","namedNode","quad","variable"];const sd=new jp,Ty={apply:(i,e,t)=>i(t[0]),get:(i,e)=>i(e)};function Si(i,{factory:e=sd}={}){const t=(r="")=>e.namedNode(`${i}${r.raw||r}`);return typeof Proxy>"u"?t:new Proxy(t,Ty)}Si("http://www.w3.org/2001/XMLSchema#");const Li=Si("http://www.w3.org/1999/02/22-rdf-syntax-ns#");Si("http://www.w3.org/2000/01/rdf-schema#");class rt{static add({ptr:e,start:t,end:r,subjects:n=[null],predicates:s=[null],objects:o=[null],graphs:a,callback:c}={}){if(!e.factory)throw new Error("add operation requires a factory");let l=()=>{};c&&(l=d=>{c(new Uh({dataset:e.dataset,start:t,end:r,quad:d}))});for(const d of n)for(const u of s)for(const p of o)for(const g of a){const v={subject:d,predicate:u,object:p,graph:g};v[t]=e.term;const _=e.factory.quad(v.subject,v.predicate,v.object,v.graph);e.dataset.add(_),l(_)}return e}static addList({ptr:e,predicates:t,items:r,graphs:n}){if(e.isAny())throw new Error("can't attach a list to an any ptr");for(const s of t)for(const o of n){const a=r.map(()=>e.factory.blankNode());e.dataset.add(e.factory.quad(e.term,s,a[0]||Li.nil,o));for(let c=0;c<a.length;c++)e.dataset.add(e.factory.quad(a[c],Li.first,r[c],o)),e.dataset.add(e.factory.quad(a[c],Li.rest,a[c+1]||Li.nil,o))}return e}static delete({ptr:e,start:t,subjects:r=[null],predicates:n=[null],objects:s=[null]}){for(const o of r)for(const a of n)for(const c of s){const l={subject:o,predicate:a,object:c};l[t]=e.term;const d=e.dataset.match(l.subject,l.predicate,l.object);for(const u of d)e.dataset.delete(u)}return e}static deleteList({ptr:e,predicates:t}){const r=[];for(const n of t)for(const s of e.dataset.match(e.term,n)){let o=s.object;for(r.push(s);!Li.nil.equals(o);){o=r[r.length-1].object;const a=e.dataset.match(o);if(a.size===0)break;for(const c of a)r.push(c)}}for(const n of r)e.dataset.delete(n);return e}static execute({ptr:e,operation:t="traverse",quantifier:r,start:n,end:s,subjects:o,predicates:a,objects:c,graphs:l,items:d,callback:u}={}){if(t==="add")return rt.add({ptr:e,start:n,end:s,subjects:o,predicates:a,objects:c,graphs:l,callback:u});if(t==="addList")return rt.addList({ptr:e,predicates:a,items:d,graphs:l});if(t==="delete")return rt.delete({ptr:e,start:n,subjects:o,predicates:a,objects:c});if(t==="deleteList")return rt.deleteList({ptr:e,predicates:a});if(t==="isList")return rt.isList({ptr:e});if(t==="list")return rt.list({ptr:e});if(t==="traverse")return rt.traverse({ptr:e,quantifier:r,start:n,end:s,subjects:o,predicates:a,objects:c,graphs:l});throw new Error(`unknown operation ${t}`)}static isList({ptr:e}){return e.isAny()?!1:!!(Li.nil.equals(e.term)||rt.traverse({ptr:e,predicates:[Li.first]}).length===1)}static list({ptr:e}){if(e.isList())return{*[Symbol.iterator](){for(;e&&!e.term.equals(Li.nil);){const t=e.out([Li.first]);if(t.length!==1)throw new Error(`Invalid list: rdf:first count not equals one on ${e.value}`);const r=e.out([Li.rest]);if(r.length!==1)throw new Error(`Invalid list: rdf:rest count not equals one on ${e.value}`);yield t[0],e=r[0]}}}}static traverse({ptr:e,quantifier:t="one",start:r="subject",end:n="object",subjects:s=[null],predicates:o=[null],objects:a=[null],graphs:c=[null],callback:l}){if(t==="one")return rt.traverseOne({ptr:e,start:r,end:n,subjects:s,predicates:o,objects:a,graphs:c,callback:l});if(t==="oneOrMore"){const d=rt.traverse({ptr:e,end:n,start:r,subjects:s,predicates:o,objects:a,graphs:c,callback:l});return rt.traverseMore({ptrs:d,end:n,start:r,subjects:s,predicates:o,objects:a,graphs:c,callback:l})}if(t==="zeroOrMore")return rt.traverseMore({ptrs:[e],end:n,start:r,subjects:s,predicates:o,objects:a,graphs:c,callback:l});if(t==="zeroOrOne")return[e,...rt.traverse({ptr:e,end:n,start:r,subjects:s,predicates:o,objects:a,graphs:c,callback:l})];throw new Error(`unknown quantifier ${t}`)}static traverseMore({ptrs:e,end:t,start:r,subjects:n,predicates:s,objects:o,graphs:a,callback:c}={}){let l=[...e],d,u;do{d=[];for(const p of e)d=[...d,...rt.traverseOne({ptr:p,end:t,start:r,subjects:n,predicates:s,objects:o,graphs:a,callback:c})];u&&(d=d.filter(p=>!u.has(p.term))),e=d,l=[...l,...d],u=new wi(l.map(p=>p.term))}while(d.length>0);return l}static traverseOne({ptr:e,start:t,end:r,subjects:n,predicates:s,objects:o,graphs:a,callback:c=(l,d)=>d.extend(l)}={}){const l=[];for(const d of n)for(const u of s)for(const p of o)for(const g of a){const v={subject:d,predicate:u,object:p,graph:g};v[t]=e.term;for(const _ of e.dataset.match(v.subject,v.predicate,v.object,v.graph))l.push(c(new Uh({dataset:e.dataset,end:r,quad:_,start:t}),e))}return l}}function Wh(i,e){return e?t=>e(i.extend(t)):()=>{}}class Gh{constructor({dataset:e,edges:t=[],factory:r,graph:n,term:s}){if(!e&&t.length===0)throw new Error("dataset or edges is required");if(t.length===0&&typeof s>"u")throw new Error("edges or term must be given");if(t.length>0&&s)throw new Error("edges or term must be given");this.dataset=e||t[t.length-1].dataset,this.edges=t,this.factory=r,this._graph=n,t.length===0&&(this._term=s)}get edge(){return this.edges[this.edges.length-1]}get graph(){return typeof this._graph=="object"?this._graph:this.edge&&this.edge.graph}get length(){return this._term!==void 0?1:this.edges.length+1}get startTerm(){return this._term||this.edges[0].startTerm}get term(){return this._term!==void 0?this._term:this.edge.term}get value(){const e=this.term;return e===null?void 0:e.value}addIn(e,t,r){return rt.add({ptr:this,start:"object",end:"subject",subjects:t,predicates:e,graphs:[this.graph||this.factory.defaultGraph()],callback:Wh(this,r)})}addList(e,t){return rt.addList({ptr:this,predicates:e,graphs:[this.graph||this.factory.defaultGraph()],items:t})}addOut(e,t,r){return rt.add({ptr:this,start:"subject",end:"object",predicates:e,objects:t,graphs:[this.graph||this.factory.defaultGraph()],callback:Wh(this,r)})}deleteIn(e,t){return rt.delete({ptr:this,start:"object",subjects:t,predicates:e})}deleteList(e){return rt.deleteList({ptr:this,predicates:e})}deleteOut(e,t){return rt.delete({ptr:this,start:"subject",predicates:e,objects:t})}execute({operation:e,quantifier:t,start:r,end:n,subjects:s,predicates:o,objects:a,graphs:c,items:l,callback:d}){return rt.execute({ptr:this,operation:e,quantifier:t,start:r,end:n,subjects:s,predicates:o,objects:a,graphs:c,items:l,callback:d})}extend(e){return new this.constructor({dataset:this.dataset,edges:[...this.edges,e],factory:this.factory,graph:this._graph})}hasIn(e,t){return rt.traverse({ptr:this,start:"object",end:"object",subjects:t,predicates:e,graphs:[this.graph]})}hasOut(e,t){return rt.traverse({ptr:this,start:"subject",end:"subject",predicates:e,objects:t,graphs:[this.graph]})}in(e,t){return rt.traverse({ptr:this,start:"object",end:"subject",subjects:t,predicates:e,graphs:[this.graph]})}isAny(){return!this.term}isList(){return rt.isList({ptr:this})}list(){return rt.list({ptr:this})}*nodes(){for(let e=0;e<this.length;e++)this._term!==void 0?yield{dataset:this.dataset,term:this._term}:this.edges.length>e?yield{dataset:this.edges[e].dataset,term:this.edges[e].startTerm}:this.edges.length===e&&(yield{dataset:this.edges[e-1].dataset,term:this.edges[e-1].term})}out(e,t){return rt.traverse({ptr:this,predicates:e,objects:t,graphs:[this.graph]})}*quads(){for(const{quad:e}of this.edges)yield e}trim(){return new this.constructor({dataset:this.dataset,factory:this.factory,graph:this.graph,term:this.term})}}function Kh(i,e){return i?i.equals(e):i===e}function Cy(i,e){return!(i.dataset!==e.dataset||!Kh(i.graph,e.graph)||!Kh(i.term,e.term))}function Xh(i,e){return e?t=>e(new i.constructor({factory:i.factory,ptrs:[t]})):()=>{}}class Io{constructor({dataset:e,factory:t,ptrs:r,terms:n,graphs:s}){if(this.factory=t,r)this.ptrs=[...r];else{this.ptrs=[];for(const o of n||[null])for(const a of s||[null])this.ptrs.push(new Gh({dataset:e,factory:t,graph:a,term:o}))}}get dataset(){const e=new Set(this.datasets);return e.size!==1?null:e[Symbol.iterator]().next().value}get datasets(){return this.ptrs.map(e=>e.dataset)}get term(){const e=new wi(this.terms);if(e.size===1)return e[Symbol.iterator]().next().value}get terms(){return this.ptrs.map(e=>e.term)}get value(){const e=this.term;return e?.value}get values(){return this.ptrs.map(e=>e.value)}addIn(e,t,r){const n=Xh(this,r);for(const s of this.ptrs)s.addIn(e,t,n);return this}addList(e,t){if(this.isAny())throw new Error("can't attach a list to an any ptr");for(const r of this.ptrs)r.addList(e,t);return this}addOut(e,t,r){const n=Xh(this,r);for(const s of this.ptrs)s.addOut(e,t,n);return this}clone(e){return new this.constructor({factory:this.factory,ptrs:this.ptrs,...e})}deleteIn(e,t){for(const r of this.ptrs)r.deleteIn(e,t);return this}deleteList(e){for(const t of this.ptrs)t.deleteList(e);return this}deleteOut(e,t){for(const r of this.ptrs)r.deleteOut(e,t);return this}distinct(){const e=this.ptrs.reduce((t,r)=>(t.some(n=>Cy(n,r))||t.push(r.trim()),t),[]);return this.clone({ptrs:e})}execute(e){return this.clone({ptrs:this.ptrs.flatMap(t=>t.execute(e))})}executeAll(e){let t=this;for(const r of e)t=t.execute(r);return t}filter(e){return this.clone({ptrs:[...this].filter(e).map(t=>t.ptrs[0])})}hasIn(e,t){return this.clone({ptrs:this.ptrs.flatMap(r=>r.hasIn(e,t))})}hasOut(e,t){return this.clone({ptrs:this.ptrs.flatMap(r=>r.hasOut(e,t))})}in(e,t){return this.clone({ptrs:this.ptrs.flatMap(r=>r.in(e,t))})}isAny(){return this.ptrs.length>0&&this.ptrs.some(e=>e.isAny())}isList(){return this.ptrs.length!==1?!1:this.ptrs[0].isList()}list(){if(!this.isList())return;const e=this.ptrs[0].list(),t=this;return function*(){for(const r of e)yield t.clone({ptrs:[r]})}()}map(e){return[...this].map(e)}node(e){const t=this.dataset,r=[...e].map(n=>new Gh({dataset:t,factory:this.factory,term:n}));return this.clone({ptrs:r})}out(e,t){return this.clone({ptrs:this.ptrs.flatMap(r=>r.out(e,t))})}*quads(){for(const{edges:e}of this.ptrs)for(const{quad:t}of e)yield t}trim(){return this.clone({ptrs:this.ptrs.map(e=>e.trim())})}*[Symbol.iterator](){for(const e of this.ptrs)yield this.clone({ptrs:[e]})}}Si("http://www.w3.org/2002/07/owl#");const zr=Si("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),$y=Si("http://www.w3.org/2000/01/rdf-schema#"),de=Si("http://www.w3.org/ns/shacl#"),sc=Si("https://schemas.link/shacl-next#"),od=Si("http://www.w3.org/2001/XMLSchema#");function Ay(i){return i?`{${[...i.quads()].map(e=>ci(e)).join(" ")}}`:"{}"}function Ny(i){return i?`{${i.map(e=>Ay(e)).join(" ")}}`:"{}"}var kl,Jh;function Dy(){if(Jh)return kl;Jh=1;var i=/\s/;function e(t){for(var r=t.length;r--&&i.test(t.charAt(r)););return r}return kl=e,kl}var Rl,Qh;function Ly(){if(Qh)return Rl;Qh=1;var i=Dy(),e=/^\s+/;function t(r){return r&&r.slice(0,i(r)+1).replace(e,"")}return Rl=t,Rl}var Il,Yh;function Oy(){if(Yh)return Il;Yh=1;function i(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return Il=i,Il}var Tl,Zh;function Py(){if(Zh)return Tl;Zh=1;var i=typeof cn=="object"&&cn&&cn.Object===Object&&cn;return Tl=i,Tl}var Cl,ef;function My(){if(ef)return Cl;ef=1;var i=Py(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=i||e||Function("return this")();return Cl=t,Cl}var $l,tf;function Bp(){if(tf)return $l;tf=1;var i=My(),e=i.Symbol;return $l=e,$l}var Al,rf;function Fy(){if(rf)return Al;rf=1;var i=Bp(),e=Object.prototype,t=e.hasOwnProperty,r=e.toString,n=i?i.toStringTag:void 0;function s(o){var a=t.call(o,n),c=o[n];try{o[n]=void 0;var l=!0}catch{}var d=r.call(o);return l&&(a?o[n]=c:delete o[n]),d}return Al=s,Al}var Nl,nf;function jy(){if(nf)return Nl;nf=1;var i=Object.prototype,e=i.toString;function t(r){return e.call(r)}return Nl=t,Nl}var Dl,sf;function By(){if(sf)return Dl;sf=1;var i=Bp(),e=Fy(),t=jy(),r="[object Null]",n="[object Undefined]",s=i?i.toStringTag:void 0;function o(a){return a==null?a===void 0?n:r:s&&s in Object(a)?e(a):t(a)}return Dl=o,Dl}var Ll,of;function qy(){if(of)return Ll;of=1;function i(e){return e!=null&&typeof e=="object"}return Ll=i,Ll}var Ol,af;function Uy(){if(af)return Ol;af=1;var i=By(),e=qy(),t="[object Symbol]";function r(n){return typeof n=="symbol"||e(n)&&i(n)==t}return Ol=r,Ol}var Pl,lf;function Vy(){if(lf)return Pl;lf=1;var i=Ly(),e=Oy(),t=Uy(),r=NaN,n=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt;function c(l){if(typeof l=="number")return l;if(t(l))return r;if(e(l)){var d=typeof l.valueOf=="function"?l.valueOf():l;l=e(d)?d+"":d}if(typeof l!="string")return l===0?l:+l;l=i(l);var u=s.test(l);return u||o.test(l)?a(l.slice(2),u?2:8):n.test(l)?r:+l}return Pl=c,Pl}var Ml,cf;function zy(){if(cf)return Ml;cf=1;var i=Vy(),e=1/0,t=17976931348623157e292;function r(n){if(!n)return n===0?n:0;if(n=i(n),n===e||n===-e){var s=n<0?-1:1;return s*t}return n===n?n:0}return Ml=r,Ml}var Fl,df;function Hy(){if(df)return Fl;df=1;var i=zy();function e(t){var r=i(t),n=r%1;return r===r?n?r-n:r:0}return Fl=e,Fl}var jl,uf;function Wy(){if(uf)return jl;uf=1;var i=Hy(),e="Expected a function";function t(r,n){var s;if(typeof n!="function")throw new TypeError(e);return r=i(r),function(){return--r>0&&(s=n.apply(this,arguments)),r<=1&&(n=void 0),s}}return jl=t,jl}var Bl,hf;function Gy(){if(hf)return Bl;hf=1;var i=Wy();function e(t){return i(2,t)}return Bl=e,Bl}var Ky=Gy();const Ci=Tm(Ky);let ff=class{constructor({details:e,factory:t,options:r,results:n=[]}={}){this.details=e,this.factory=t,this.options=r,this.results=n,this._conforms=Ci(()=>!this.results.some(s=>s.severity.equals(de.Info)||s.severity.equals(de.Violation)||s.severity.equals(de.Warning))),this._ptr=Ci(()=>this.build())}get conforms(){return this._conforms()}get dataset(){return this.ptr.dataset}get ptr(){return this._ptr()}get term(){return this.ptr.term}build(){const e=new Io({dataset:this.factory.dataset(),factory:this.factory,terms:[this.factory.blankNode()]});e.addOut([zr.type],[de.ValidationReport]).addOut([de.conforms],[this.factory.literal(this.conforms.toString(),od.boolean)]);for(const t of this.results)e.addOut([de.result],[this.factory.blankNode()],r=>{t.build(r,this.options)});return e}coverage(){return this.results.flatMap(e=>e.coverage())}};function Xy(i,e){return Object.entries(e).reduce((t,[r,n])=>(n&&n.termType&&(n=ci(n)),t.replace(`{$${r}}`,n).replace(`{?${r}}`,n)),i)}let Jy=class{constructor({args:e={},constraintComponent:t,factory:r,focusNode:n,message:s=[],path:o,results:a=[],severity:c,shape:l,source:d=[],value:u,valuePaths:p=[]}={}){this.args=e,this.constraintComponent=t,this.factory=r,this.focusNode=n,this.path=o||l.path,this.results=a,this.severity=c,this.shape=l,this.source=d,this.value=u,this.valuePaths=p,this._message=Ci(()=>(this.shape.message.length>0&&(s=this.shape.message),s.length===0&&(s=this.shape.ptr.node([this.constraintComponent]).out([de.message]).terms),s.map(g=>r.literal(Xy(g.value,e),g.language||null))))}get message(){return this._message()}build(e,{details:t}={}){e.addOut([zr.type],[de.ValidationResult]).addOut([de.focusNode],this.focusNode.terms).addOut([de.resultSeverity],[this.severity]).addOut([de.sourceConstraint],this.source).addOut([de.sourceConstraintComponent],[this.constraintComponent]).addOut([de.sourceShape],this.shape.ptr.terms),this.message&&e.addOut([de.resultMessage],this.message);const r=n=>{if(n.quantifier==="one")return n.predicates.length>1?e.node([this.factory.blankNode()]).addList([de.alternativePath],n.predicates):n.start==="object"?e.node([this.factory.blankNode()]).addOut([de.inversePath],[n.predicates[0]]):e.node([n.predicates[0]]);if(n.quantifier==="oneOrMore")return e.node([this.factory.blankNode()]).addOut([de.oneOrMorePath],[n.predicates[0]]);if(n.quantifier==="zeroOrMore")return e.node([this.factory.blankNode()]).addOut([de.zeroOrMorePath],[n.predicates[0]]);if(n.quantifier==="zeroOrOne")return e.node([this.factory.blankNode()]).addOut([de.zeroOrOnePath],[n.predicates[0]])};if(this.path&&(this.path.length===1?e.addOut([de.resultPath],r(this.path[0]).terms):e.addList([de.resultPath],this.path.map(n=>r(n).term))),typeof this.value<"u"&&e.addOut([de.value],this.value.terms),t)for(const n of this.results)e.addOut([de.detail],[this.factory.blankNode()],s=>{n.build(s,{details:t})})}coverage(){return[...this.valuePaths.flatMap(e=>[...e.quads()]),...this.results.flatMap(e=>e.coverage())]}};class ad{constructor({factory:e,focusNode:t,options:r={debug:!1,details:!1},processed:n=new Set,report:s=new ff({factory:e,options:r}),results:o=new Map,shape:a,value:c,valueOrNode:l,valuePaths:d,values:u}={}){this.factory=e,this.focusNode=t,this.options=r,this.processed=n,this.report=s,this.results=o,this.shape=a,this.value=c,this.valuePaths=d,this.valueOrNode=l,this.values=u}create({child:e,focusNode:t=this.focusNode,shape:r=this.shape,value:n=this.value,valueOrNode:s=this.valueOrNode,valuePaths:o=this.valuePaths,values:a=this.values}={}){return new ad({factory:this.factory,focusNode:t,options:this.options,processed:this.processed,report:e?new ff({factory:this.factory,options:this.options}):this.report,results:this.results,shape:r,value:n,valueOrNode:s,valuePaths:o,values:a})}id({shape:e=this.shape}={}){return`${ci(e.ptr.term)} - ${ci(this.focusNode.term)} - ${Ny(this.valuePaths)}`}result(e){const t=new Jy({factory:this.factory,focusNode:this.focusNode,shape:this.shape,value:this.value,valuePaths:this.valuePaths,...e}),r=this.id();this.results.has(r)?this.results.get(r).add(t):this.results.set(r,new Set([t])),this.report.results.push(t)}debug(e,t){this.options.debug&&this.result({severity:sc.Debug,constraintComponent:e,...t})}trace(e,t){this.options.trace&&this.result({severity:sc.Trace,constraintComponent:e,...t})}test(e,t,r){e?this.debug(t,r):this.violation(t,r)}violation(e,t){this.result({constraintComponent:e,severity:this.shape.severity||de.Violation,...t})}}function Qy(){return{generic:Yy()}}function Yy(){return i=>{i.trace(sc.TraversalConstraintComponent,{args:{},message:[i.factory.literal("Traversal")],value:i.valueOrNode})}}class Zy{constructor(e){this.validations=new An(e)}compile(e){const t=e.validator.options.coverage;if(e.deactivated)return[];let r=!1;const n=new Set;for(const s of e.ptr.execute({start:"subject",end:"predicate"})){const o=this.validations.get(s.term);o&&(n.add(o),s.term.equals(de.property)&&(r=!0))}return t&&e.isPropertyShape&&!r&&n.add(Qy),[...n].map(s=>s(e)).filter(Boolean)}}var Or={},Pr={},rs={},ns={},pf;function wn(){if(pf)return ns;pf=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.Translator=void 0;let i=class{constructor(){this.supportedRdfDatatypes=[],this.fromRdfHandlers={},this.toRdfHandlers={}}static incorrectRdfDataType(t){throw new Error(`Invalid RDF ${t.datatype.value} value: '${t.value}'`)}registerHandler(t,r,n){for(const s of r)this.supportedRdfDatatypes.push(s),this.fromRdfHandlers[s.value]=t;for(const s of n){let o=this.toRdfHandlers[s];o||(this.toRdfHandlers[s]=o=[]),o.push(t)}}fromRdf(t,r){const n=this.fromRdfHandlers[t.datatype.value];return n?n.fromRdf(t,r):t.value}toRdf(t,r){const n=this.toRdfHandlers[typeof t];if(n)for(const s of n){const o=s.toRdf(t,r);if(o)return o}throw new Error(`Invalid JavaScript value: '${t}'`)}getSupportedRdfDatatypes(){return this.supportedRdfDatatypes}getSupportedJavaScriptPrimitives(){return Object.keys(this.toRdfHandlers)}};return ns.Translator=i,ns}var mf;function e0(){if(mf)return rs;mf=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.TypeHandlerBoolean=void 0;const i=wn();let e=class qp{fromRdf(r,n){switch(r.value){case"true":return!0;case"false":return!1;case"1":return!0;case"0":return!1}return n&&i.Translator.incorrectRdfDataType(r),!1}toRdf(r,{datatype:n,dataFactory:s}){return s.literal(r?"true":"false",n||s.namedNode(qp.TYPE))}};return rs.TypeHandlerBoolean=e,e.TYPE="http://www.w3.org/2001/XMLSchema#boolean",rs}var ss={},gf;function t0(){if(gf)return ss;gf=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.TypeHandlerDate=void 0;const i=wn();let e=class oc{fromRdf(r,n){switch(n&&!r.value.match(oc.VALIDATORS[r.datatype.value.substr(33,r.datatype.value.length)])&&i.Translator.incorrectRdfDataType(r),r.datatype.value){case"http://www.w3.org/2001/XMLSchema#gDay":return new Date(0,0,parseInt(r.value,10));case"http://www.w3.org/2001/XMLSchema#gMonthDay":const s=r.value.split("-");return new Date(0,parseInt(s[0],10)-1,parseInt(s[1],10));case"http://www.w3.org/2001/XMLSchema#gYear":return new Date(r.value+"-01-01");case"http://www.w3.org/2001/XMLSchema#gYearMonth":return new Date(r.value+"-01");default:return new Date(r.value)}}toRdf(r,{datatype:n,dataFactory:s}){if(n=n||s.namedNode(oc.TYPES[0]),!(r instanceof Date))return null;const o=r;let a;switch(n.value){case"http://www.w3.org/2001/XMLSchema#gDay":a=String(o.getUTCDate());break;case"http://www.w3.org/2001/XMLSchema#gMonthDay":a=o.getUTCMonth()+1+"-"+o.getUTCDate();break;case"http://www.w3.org/2001/XMLSchema#gYear":a=String(o.getUTCFullYear());break;case"http://www.w3.org/2001/XMLSchema#gYearMonth":a=o.getUTCFullYear()+"-"+(o.getUTCMonth()+1);break;case"http://www.w3.org/2001/XMLSchema#date":a=o.toISOString().replace(/T.*$/,"");break;default:a=o.toISOString()}return s.literal(a,n)}};return ss.TypeHandlerDate=e,e.TYPES=["http://www.w3.org/2001/XMLSchema#dateTime","http://www.w3.org/2001/XMLSchema#date","http://www.w3.org/2001/XMLSchema#gDay","http://www.w3.org/2001/XMLSchema#gMonthDay","http://www.w3.org/2001/XMLSchema#gYear","http://www.w3.org/2001/XMLSchema#gYearMonth"],e.VALIDATORS={date:/^[0-9]+-[0-9][0-9]-[0-9][0-9]Z?$/,dateTime:/^[0-9]+-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9](\.[0-9][0-9][0-9])?((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,gDay:/^[0-9]+$/,gMonthDay:/^[0-9]+-[0-9][0-9]$/,gYear:/^[0-9]+$/,gYearMonth:/^[0-9]+-[0-9][0-9]$/},ss}var os={},bf;function i0(){if(bf)return os;bf=1,Object.defineProperty(os,"__esModule",{value:!0}),os.TypeHandlerNumberDouble=void 0;const i=wn();let e=class Up{fromRdf(r,n){const s=parseFloat(r.value);return n&&isNaN(s)&&i.Translator.incorrectRdfDataType(r),s}toRdf(r,{datatype:n,dataFactory:s}){return n=n||s.namedNode(Up.TYPES[0]),isNaN(r)?s.literal("NaN",n):isFinite(r)?r%1===0?null:s.literal(r.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),n):s.literal(r>0?"INF":"-INF",n)}};return os.TypeHandlerNumberDouble=e,e.TYPES=["http://www.w3.org/2001/XMLSchema#double","http://www.w3.org/2001/XMLSchema#decimal","http://www.w3.org/2001/XMLSchema#float"],os}var as={},yf;function r0(){if(yf)return as;yf=1,Object.defineProperty(as,"__esModule",{value:!0}),as.TypeHandlerNumberInteger=void 0;const i=wn();let e=class ps{fromRdf(r,n){const s=parseInt(r.value,10);return n&&(isNaN(s)||r.value.indexOf(".")>=0)&&i.Translator.incorrectRdfDataType(r),s}toRdf(r,{datatype:n,dataFactory:s}){return s.literal(String(r),n||(r<=ps.MAX_INT&&r>=ps.MIN_INT?s.namedNode(ps.TYPES[0]):s.namedNode(ps.TYPES[1])))}};return as.TypeHandlerNumberInteger=e,e.TYPES=["http://www.w3.org/2001/XMLSchema#integer","http://www.w3.org/2001/XMLSchema#long","http://www.w3.org/2001/XMLSchema#int","http://www.w3.org/2001/XMLSchema#byte","http://www.w3.org/2001/XMLSchema#short","http://www.w3.org/2001/XMLSchema#negativeInteger","http://www.w3.org/2001/XMLSchema#nonNegativeInteger","http://www.w3.org/2001/XMLSchema#nonPositiveInteger","http://www.w3.org/2001/XMLSchema#positiveInteger","http://www.w3.org/2001/XMLSchema#unsignedByte","http://www.w3.org/2001/XMLSchema#unsignedInt","http://www.w3.org/2001/XMLSchema#unsignedLong","http://www.w3.org/2001/XMLSchema#unsignedShort"],e.MAX_INT=2147483647,e.MIN_INT=-2147483648,as}var ls={},vf;function n0(){if(vf)return ls;vf=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.TypeHandlerString=void 0;let i=class{fromRdf(t){return t.value}toRdf(t,{datatype:r,dataFactory:n}){return n.literal(t,r)}};return ls.TypeHandlerString=i,i.TYPES=["http://www.w3.org/2001/XMLSchema#string","http://www.w3.org/2001/XMLSchema#normalizedString","http://www.w3.org/2001/XMLSchema#anyURI","http://www.w3.org/2001/XMLSchema#base64Binary","http://www.w3.org/2001/XMLSchema#language","http://www.w3.org/2001/XMLSchema#Name","http://www.w3.org/2001/XMLSchema#NCName","http://www.w3.org/2001/XMLSchema#NMTOKEN","http://www.w3.org/2001/XMLSchema#token","http://www.w3.org/2001/XMLSchema#hexBinary","http://www.w3.org/1999/02/22-rdf-syntax-ns#langString","http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString","http://www.w3.org/2001/XMLSchema#time","http://www.w3.org/2001/XMLSchema#duration"],ls}var wf;function _f(){return wf||(wf=1,function(i){var e=Pr&&Pr.__createBinding||(Object.create?function(r,n,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(n,s);(!a||("get"in a?!n.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return n[s]}}),Object.defineProperty(r,o,a)}:function(r,n,s,o){o===void 0&&(o=s),r[o]=n[s]}),t=Pr&&Pr.__exportStar||function(r,n){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(n,s)&&e(n,r,s)};Object.defineProperty(i,"__esModule",{value:!0}),t(e0(),i),t(t0(),i),t(i0(),i),t(r0(),i),t(n0(),i)}(Pr)),Pr}var ql={},xf;function s0(){return xf||(xf=1,Object.defineProperty(ql,"__esModule",{value:!0})),ql}var Ef;function o0(){return Ef||(Ef=1,function(i){var e=Or&&Or.__createBinding||(Object.create?function(g,v,_,E){E===void 0&&(E=_);var x=Object.getOwnPropertyDescriptor(v,_);(!x||("get"in x?!v.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return v[_]}}),Object.defineProperty(g,E,x)}:function(g,v,_,E){E===void 0&&(E=_),g[E]=v[_]}),t=Or&&Or.__exportStar||function(g,v){for(var _ in g)_!=="default"&&!Object.prototype.hasOwnProperty.call(v,_)&&e(v,g,_)};Object.defineProperty(i,"__esModule",{value:!0}),i.fromRdf=c,i.toRdf=l,i.getTermRaw=d,i.getSupportedRdfDatatypes=u,i.getSupportedJavaScriptPrimitives=p;const r=Cp(),n=_f(),s=wn();t(_f(),i),t(s0(),i),t(wn(),i);const o=new r.DataFactory,a=new s.Translator;a.registerHandler(new n.TypeHandlerString,n.TypeHandlerString.TYPES.map(g=>o.namedNode(g)),["string"]),a.registerHandler(new n.TypeHandlerBoolean,[n.TypeHandlerBoolean.TYPE].map(g=>o.namedNode(g)),["boolean"]),a.registerHandler(new n.TypeHandlerNumberDouble,n.TypeHandlerNumberDouble.TYPES.map(g=>o.namedNode(g)),["number"]),a.registerHandler(new n.TypeHandlerNumberInteger,n.TypeHandlerNumberInteger.TYPES.map(g=>o.namedNode(g)),["number"]),a.registerHandler(new n.TypeHandlerDate,n.TypeHandlerDate.TYPES.map(g=>o.namedNode(g)),["object"]);function c(g,v){return a.fromRdf(g,v)}function l(g,v){return v&&"namedNode"in v&&(v={dataFactory:v}),v=v||{},v&&!v.dataFactory&&(v.dataFactory=o),a.toRdf(g,v)}function d(g,v){return g.termType==="Literal"?c(g,v):g.value}function u(){return a.getSupportedRdfDatatypes()}function p(){return a.getSupportedJavaScriptPrimitives()}}(Or)),Or}var $s=o0();function Sf(i){if(i.term.termType!=="BlankNode")return{quantifier:"one",start:"subject",end:"object",predicates:[i.term]};const e=i.out([de.alternativePath]);if(e.ptrs.length===1&&e.ptrs[0].isList())return{quantifier:"one",start:"subject",end:"object",predicates:[...e.list()].map(o=>o.term)};const t=i.out([de.inversePath]);if(t.term)return{quantifier:"one",start:"object",end:"subject",predicates:[t.term]};const r=i.out([de.oneOrMorePath]);if(r.term)return{quantifier:"oneOrMore",start:"subject",end:"object",predicates:[r.term]};const n=i.out([de.zeroOrMorePath]);if(n.term)return{quantifier:"zeroOrMore",start:"subject",end:"object",predicates:[n.term]};const s=i.out([de.zeroOrOnePath]);if(s.term)return{quantifier:"zeroOrOne",start:"subject",end:"object",predicates:[s.term]}}function a0(i){return i.terms.length===0?null:i.ptrs[0].isList()?[...i.list()].map(e=>Sf(e)):[Sf(i)]}class l0{constructor(e){this.shape=e,this._compiled=Ci(()=>this.shape.validator.registry.compile(e))}get compiled(){return this._compiled()}async validate(e){return e.focusNode.dataset.size===0||(this.shape.isPropertyShape?await this.validateProperty(e):await this.validateNode(e)),e}async validateNode(e){const t=e.create({shape:this.shape,valueOrNode:e.value||e.focusNode});for(const r of this.compiled)r.node&&await r.node(t),r.generic&&await r.generic(t)}async validateProperty(e){let t;this.shape.isSparqlShape?t=e.focusNode:t=e.focusNode.executeAll(this.shape.path);const r=t.node(new wi(t.terms)),n=[...t].reduce((o,a)=>{const c=a.term,l=t.node([c]);return o.has(c)||o.set(c,{value:l,valuePaths:[]}),o.get(c).valuePaths.push(a),o},new An).values(),s=e.create({shape:this.shape,values:r});for(const o of this.compiled)o.property&&await o.property(s);for(const{value:o,valuePaths:a}of n){const c=e.create({shape:this.shape,value:o,valueOrNode:o,valuePaths:a});for(const l of this.compiled)l.generic&&await l.generic(c)}}}function ac(i){const e=new wi,r=new Io({dataset:i.dataset,terms:i.terms}).execute({quantifier:"zeroOrMore",start:"object",end:"subject",predicates:[$y.subClassOf]});for(const n of r.ptrs)for(const{term:s}of n.nodes())e.add(s);return e}class c0{constructor(e){this.targetClass=new wi([...ac(e.hasOut([zr.type],[de.NodeShape])),...ac(e.out([de.targetClass]))]),this.targetNode=e.out([de.targetNode]).terms,this.targetObjectsOf=e.out([de.targetObjectsOf]).terms,this.targetSubjectsOf=e.out([de.targetSubjectsOf]).terms}resolve(e){const t=e.focusNode.node([null]),r=[...e.focusNode.hasOut([zr.type],this.targetClass).ptrs,...e.focusNode.node(this.targetNode).ptrs,...t.execute({start:"object",end:"object",predicates:this.targetObjectsOf}).ptrs,...t.execute({start:"subject",end:"subject",predicates:this.targetSubjectsOf}).ptrs],n=e.focusNode.clone({ptrs:r});return n.node([...new wi(n.terms)])}}class d0{constructor(e,{validator:t}){this.ptr=e,this.validator=t,this._deactivated=Ci(()=>{const r=this.ptr.out([de.deactivated]).term;return r&&$s.fromRdf(r)}),this._message=Ci(()=>this.ptr.out([de.message]).terms),this._path=Ci(()=>a0(this.ptr.out([de.path]))),this._severity=Ci(()=>this.ptr.out([de.severity]).term),this._shapeValidator=Ci(()=>new l0(this)),this._sparql=Ci(()=>this.ptr.out([de.sparql])),this._targetResolver=Ci(()=>new c0(this.ptr))}get deactivated(){return this._deactivated()}get isPropertyShape(){return!!this.path}get isSparqlShape(){return this.sparql.terms.length>0}get path(){return this._path()}get targetResolver(){return this._targetResolver()}get message(){return this._message()}get severity(){return this._severity()}get shapeValidator(){return this._shapeValidator()}get sparql(){return this._sparql()}resolveTargets(e){return this.targetResolver.resolve(e)}async validate(e){const t=e.id({shape:this});if(e.processed.has(t)){if(e.results.has(t))for(const r of e.results.get(t))e.report.results.push(r);return e}return e.processed.add(t),this.shapeValidator.validate(e)}}function u0(i){const e=parseInt(i.ptr.out([de.maxCount]).value);return{property:h0(e)}}function h0(i){return e=>{e.test(e.values.terms.length<=i,de.MaxCountConstraintComponent,{args:{maxCount:i},message:[e.factory.literal("More than {$maxCount} values")]})}}function f0(i){const e=parseInt(i.ptr.out([de.minCount]).value);return{property:p0(e)}}function p0(i){return e=>{e.test(e.values.terms.length>=i,de.MinCountConstraintComponent,{args:{minCount:i},message:[e.factory.literal("Less than {$minCount} values")]})}}async function m0(i,e){for(const t of i)if(!await e(t))return!1;return!0}async function g0(i,e){return(await Promise.all(i.map(t=>e(t)))).filter(Boolean)}async function Ko(i,e){return Promise.all(i.map(e))}async function b0(i,e){for(const t of i)if(await e(t))return!0;return!1}function y0(i){const e=[...i.ptr.out([de.and])].flatMap(t=>[...t.list()]).map(t=>i.validator.shape(t));return{generic:v0(e)}}function v0(i){return async e=>{const t=await Ko(i,async n=>(await n.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report),r=t.every(n=>n.conforms);e.test(r,de.AndConstraintComponent,{results:t.flatMap(n=>n.results),value:e.valueOrNode})}}function w0(i){const e=i.validator.shape(i.ptr.out([de.not]));return{generic:_0(e)}}function _0(i){return async e=>{const t=(await i.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report,r=!t.conforms;e.test(r,de.NotConstraintComponent,{args:{not:i.ptr.term},message:[e.factory.literal("Value does have shape {$not}")],results:t.results,value:e.valueOrNode})}}function x0(i){const e=[...i.ptr.out([de.or])].flatMap(t=>[...t.list()]).map(t=>i.validator.shape(t));return{generic:E0(e)}}function E0(i){return async e=>{let t=[],r;if(e.options.debug||e.options.details){const n=await Ko(i,async s=>(await s.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report);t=n.flatMap(s=>s.results),r=n.some(s=>s.conforms)}else r=await b0(i,async n=>(await n.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report.conforms);e.test(r,de.OrConstraintComponent,{results:t,value:e.valueOrNode})}}function S0(i){const e=[...i.ptr.out([de.xone])].flatMap(t=>[...t.list()]).map(t=>i.validator.shape(t));return{generic:k0(e)}}function k0(i){return async e=>{const t=await Ko(i,async n=>(await n.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report),r=t.filter(n=>n.conforms).length===1;e.test(r,de.XoneConstraintComponent,{results:t.flatMap(n=>n.results),value:e.valueOrNode})}}function R0(i){if(!$s.fromRdf(i.ptr.out([de.closed]).term))return null;const t=i.ptr.out([de.property]).map(s=>i.validator.shape(s)),r=new wi(t.filter(s=>!s.deactivated).map(s=>s.path[0].predicates[0])),n=new wi([...i.ptr.out([de.ignoredProperties]).list()||[]].map(s=>s.term));return{node:I0(r,n)}}function I0(i,e){return t=>{const r=t.focusNode.execute({start:"subject",end:"predicate"}).filter(n=>e.has(n.term)?!1:!i.has(n.term));if(r.ptrs.length>0)for(const n of r)t.violation(de.ClosedConstraintComponent,{message:[t.factory.literal("Predicate is not allowed (closed shape)")],path:[{quantifier:"one",start:"subject",end:"object",predicates:[n.term]}],value:t.focusNode.node([[...n.quads()][0].object])});else t.debug(de.ClosedConstraintComponent)}}function T0(i){const e=i.ptr.out([de.hasValue]).term;return{node:C0(e),property:$0(e)}}function C0(i){return e=>{e.test(i.equals(e.valueOrNode.term),de.HasValueConstraintComponent,{args:{hasValue:i},message:[e.factory.literal("Value must be {$hasValue}")]})}}function $0(i){return e=>{const t=[...e.values].some(r=>i.equals(r.term));e.test(t,de.HasValueConstraintComponent,{args:{hasValue:i},message:[e.factory.literal("Missing expected value {$hasValue}")]})}}function A0(i){const e=new wi([...i.ptr.out([de.in]).list()].map(t=>t.term));return{generic:N0(e)}}function N0(i){return e=>{e.test(i.has(e.valueOrNode.term),de.InConstraintComponent,{args:{in:[...i].map(t=>t.value).join(", ")},message:[e.factory.literal("Value is not in {$in}")],value:e.valueOrNode})}}function Nn(i,e){if(!i||i.termType!=="Literal"||!e||e.termType!=="Literal"||kf(i)!==kf(e))return null;const t=$s.fromRdf(i),r=$s.fromRdf(e);return typeof t!=typeof r?null:typeof t=="string"?t.localeCompare(r):t-r}function kf(i){const e=/^.*(((\+|-)\d{2}:\d{2})|Z)$/;return od.dateTime.equals(i.datatype)&&e.test(i.value)}function D0(i){const e=i.ptr.out([de.disjoint]).term;return{generic:L0(e)}}function L0(i){return e=>{const t=e.focusNode.dataset.match(e.focusNode.term,i,e.valueOrNode.term);e.test(t.size===0,de.DisjointConstraintComponent,{args:{disjoint:i},message:[e.factory.literal("Value node must not also be one of the values of {$disjoint}")],value:e.valueOrNode})}}function O0(i){const e=i.ptr.out([de.equals]).term;return{node:P0(e),property:M0(e)}}function P0(i){return e=>{const t=e.focusNode.out([i]),r=t.filter(s=>!s.term.equals(e.focusNode.term)),n=t.terms.length!==0&&r.terms.length===0;e.test(n,de.EqualsConstraintComponent,{args:{equals:i},message:[e.factory.literal("Must have same values as {$equals}")],value:r.terms[0]&&e.focusNode.node([r.terms[0]])||e.focusNode})}}function M0(i){return e=>{const t=new wi(e.focusNode.out([i]).terms),r=new wi(e.values.terms),n=[...r].filter(a=>!t.has(a)),s=[...t].filter(a=>!r.has(a)),o=[...n,...s];for(const a of o)e.violation(de.EqualsConstraintComponent,{args:{equals:i},message:[e.factory.literal("Must have same values as {$equals}")],value:e.focusNode.node([a])});o.length===0&&e.debug(de.EqualsConstraintComponent,{args:{equals:i},message:[e.factory.literal("Must have same values as {$equals}")]})}}function F0(i){const e=i.ptr.out([de.lessThan]).term;return{property:j0(e)}}function j0(i){return e=>{const t=e.focusNode.out([i]).terms;for(const r of e.values)for(const n of t){const s=Nn(r.term,n);s===null||s>=0?e.violation(de.LessThanConstraintComponent,{args:{lessThan:i},message:[e.factory.literal("Value is not less than value of {$lessThan}")],value:r}):e.debug(de.LessThanConstraintComponent,{args:{lessThan:i},message:[e.factory.literal("Value is not less than value of {$lessThan}")],value:r})}}}function B0(i){const e=i.ptr.out([de.lessThanOrEquals]).term;return{property:q0(e)}}function q0(i){return e=>{const t=e.focusNode.out([i]).terms;for(const r of e.values)for(const n of t){const s=Nn(r.term,n);s===null||s>0?e.violation(de.LessThanOrEqualsConstraintComponent,{args:{lessThanOrEquals:i},message:[e.factory.literal("Value is not less than or equal to value of {$lessThanOrEquals}")],value:r}):e.debug(de.LessThanOrEqualsConstraintComponent,{args:{lessThanOrEquals:i},message:[e.factory.literal("Value is not less than or equal to value of {$lessThanOrEquals}")],value:r})}}}function U0(i){const e=i.ptr.out([de.maxExclusive]).term;return{generic:V0(e)}}function V0(i){return e=>{const t=Nn(e.valueOrNode.term,i);e.test(t!==null&&t<0,de.MaxExclusiveConstraintComponent,{args:{maxExclusive:i},message:[e.factory.literal("Value is not less than {$maxExclusive}")],value:e.valueOrNode})}}function z0(i){const e=i.ptr.out([de.maxInclusive]).term;return{generic:H0(e)}}function H0(i){return e=>{const t=Nn(e.valueOrNode.term,i);e.test(t!==null&&t<=0,de.MaxInclusiveConstraintComponent,{args:{maxInclusive:i},message:[e.factory.literal("Value is not less than or equal to {$maxInclusive}")],value:e.valueOrNode})}}function W0(i){const e=i.ptr.out([de.minExclusive]).term;return{generic:G0(e)}}function G0(i){return e=>{const t=Nn(e.valueOrNode.term,i);e.test(t!==null&&t>0,de.MinExclusiveConstraintComponent,{args:{minExclusive:i},message:[e.factory.literal("Value is not greater than {$minExclusive}")],value:e.valueOrNode})}}function K0(i){const e=i.ptr.out([de.minInclusive]).term;return{generic:X0(e)}}function X0(i){return e=>{const t=Nn(e.valueOrNode.term,i);e.test(t!==null&&t>=0,de.MinInclusiveConstraintComponent,{args:{minInclusive:i},message:[e.factory.literal("Value is not greater than or equal to {$minInclusive}")],value:e.valueOrNode})}}function J0(i){const e=[...i.ptr.out([de.node])].map(t=>i.validator.shape(t));return{generic:Q0(e)}}function Q0(i){return async e=>{for(const t of i){const r=await t.validate(e.create({child:!0,focusNode:e.valueOrNode}));e.test(r.report.conforms,de.NodeConstraintComponent,{args:{node:t.ptr.term},message:[e.factory.literal("Value does not have shape {$node}")],results:r.report.results,value:e.valueOrNode})}}}function Y0(i){const e=[...i.ptr.out([de.property])].map(t=>i.validator.shape(t));return{generic:Z0(e)}}function Z0(i){return async e=>{const t=e.create({focusNode:e.valueOrNode});for(const r of i)await r.validate(t)}}function ev(i){const e=i.validator.shape(i.ptr.out([de.qualifiedValueShape])),t=i.ptr.out([de.qualifiedValueShapesDisjoint]).term,r=t?$s.fromRdf(t):!1,n=i.ptr.out([de.qualifiedMaxCount]).term,s=n?parseInt(n.value):null,o=i.ptr.out([de.qualifiedMinCount]).term,a=o?parseInt(o.value):null;return{property:tv(e,r,s,a)}}function tv(i,e,t,r){return async n=>{const s=[];let o=[];e&&(o=new Set(n.shape.ptr.in([de.property]).out([de.property]).out([de.qualifiedValueShape]).filter(c=>!c.term.equals(i.ptr.term)).map(c=>n.shape.validator.shape(c))));const a=(await g0(n.values,async c=>{const l=(await i.validate(n.create({child:!0,focusNode:c}))).report;if(s.push(l.results),!l.conforms)return!1;if(o.length===0)return!0;if(n.options.debug||n.options.details){const d=await Ko([...o],async u=>(await u.validate(n.create({child:!0,focusNode:c}))).report);return s.push(d.flatMap(u=>u.results)),!d.every(u=>u.conforms)}else return!await m0([...o],async d=>(await d.validate(n.create({child:!0,focusNode:c}))).report.conforms)})).length;t!==null&&n.test(a<=t,de.QualifiedMaxCountConstraintComponent,{args:{qualifiedMaxCount:t,qualifiedValueShape:i.ptr.term,qualifiedValueShapesDisjoint:e},message:[n.factory.literal("More than {$qualifiedMaxCount} values have shape {$qualifiedValueShape}")],results:s.flat()}),r!==null&&n.test(a>=r,de.QualifiedMinCountConstraintComponent,{args:{qualifiedMinCount:r,qualifiedValueShape:i.ptr.term,qualifiedValueShapesDisjoint:e},message:[n.factory.literal("Less than {$qualifiedMinCount} values have shape {$qualifiedValueShape}")],results:s.flat()})}}function iv(i,e){return e?e.slice(0,i.length)===i:!1}function rv(i){const e=[...new Set([...i.ptr.out([de.languageIn]).list()].map(t=>t.value))];return{generic:nv(e)}}function nv(i){return e=>{const t=i.some(r=>iv(r,e.valueOrNode.term.language));e.test(t,de.LanguageInConstraintComponent,{args:{languageIn:i.join(", ")},message:[e.factory.literal("Language does not match any of {$languageIn}")],value:e.valueOrNode})}}function sv(i){const e=parseInt(i.ptr.out([de.maxLength]).value);return{generic:ov(e)}}function ov(i){return e=>{const t=e.valueOrNode.term.termType!=="BlankNode"&&e.valueOrNode.value.length<=i;e.test(t,de.MaxLengthConstraintComponent,{args:{maxLength:i},message:[e.factory.literal("Value has more than {$maxLength} characters")],value:e.valueOrNode})}}function av(i){const e=parseInt(i.ptr.out([de.minLength]).value);return{generic:lv(e)}}function lv(i){return e=>{const t=e.valueOrNode.term.termType!=="BlankNode"&&e.valueOrNode.value.length>=i;e.test(t,de.MinLengthConstraintComponent,{args:{minLength:i},message:[e.factory.literal("Value has less than {$minLength} characters")],value:e.valueOrNode})}}function cv(i){const e=i.ptr.out([de.pattern]).value,t=i.ptr.out([de.flags]).value,r=new RegExp(e,t);return{generic:dv(e,t,r)}}function dv(i,e,t){return r=>{r.test(t.test(r.valueOrNode.term.value),de.PatternConstraintComponent,{args:{flags:e,pattern:i},message:[r.factory.literal('Value does not match pattern "{$pattern}"')],value:r.valueOrNode})}}function uv(i){const e=i.ptr.out([de.uniqueLang]).term;return e.value==="true"&&od.boolean.equals(e.datatype)?{property:hv()}:null}function hv(){return i=>{const t=Object.entries(i.values.terms.reduce((r,n)=>(n.language&&(r[n.language]=(r[n.language]||0)+1),r),{})).filter(([,r])=>r>1);for(const[r]of t)i.violation(de.UniqueLangConstraintComponent,{args:{lang:r},message:[i.factory.literal('Language "{?lang}" used more than once')]});t.length===0&&i.debug(de.UniqueLangConstraintComponent)}}const vo=Si("http://www.w3.org/ns/shacl#"),Vp=Si("https://schemas.link/shacl-next#");class _n{constructor({results:e=[]}={}){this.results=e}get conforms(){return!this.results.some(e=>e.severity.equals(vo.Info)||e.severity.equals(vo.Violation)||e.severity.equals(vo.Warning))}}function fv(i,e){return Object.entries(e).reduce((t,[r,n])=>(n&&n.termType&&(n=ci(n)),t.replace(`{$${r}}`,n).replace(`{?${r}}`,n)),i)}class To{constructor({args:e={},factory:t,message:r=[],severity:n=vo.Violation}={}){this.severity=n,this.message=r.map(s=>t.literal(fv(s.value,e),s.language||null))}}class ld{constructor({factory:e=sd}={}){this.factory=e}clone({factory:e}={}){return new ld({factory:e||this.factory})}validate(){return new _n}validateSimple(){return!0}}class Dn extends ld{constructor({datatypes:e,factory:t}={}){super({factory:t}),this.datatypes=[];for(const r of Array.isArray(e)?e:[e])r&&this.datatypes.push(this.factory.fromTerm(r))}clone({factory:e}={}){return new Dn({datatypes:this.datatypes,factory:e||this.factory})}}class pv{constructor({factory:e=sd,validations:t}={}){if(this.factory=e,this.validations=new An,t)for(const r of Object.values(t)){const n=r.clone({factory:this.factory});for(const s of n.datatypes)this.validations.set(s,n)}}validate(e){const t=this.validations.get(e.datatype);return t?t.validate(e):new _n}validateSimple(e){const t=this.validations.get(e.datatype);return t?t.validateSimple(e):!0}}class lt extends Dn{constructor(e,t,{factory:r}={}){super({datatypes:t,factory:r}),this.message=[this.factory.literal("term value {$this} matches pattern {$pattern}")],this.patterns=Array.isArray(e)?e:[e]}clone({factory:e}={}){return new lt(this.patterns,this.datatypes,{factory:e||this.factory})}validate(e){const t=this.patterns.map(r=>{let n;r.test(e.value)&&(n=Vp.Debug);const s={pattern:this.factory.literal(r.toString()),this:e};return new To({args:s,factory:this.factory,message:this.message,severity:n})});return new _n({results:t})}validateSimple(e){return this.patterns.every(t=>t.test(e.value))}}const mv=/^([-+]?[0-9]+)$/;class Qt extends lt{constructor(e=null,t=null,r,{factory:n}={}){super(mv,r,{factory:n}),this.maxInclusive=null,this.minInclusive=null,typeof t=="string"&&(this.maxInclusive=BigInt(t)),typeof e=="string"&&(this.minInclusive=BigInt(e))}clone({factory:e}={}){return new Qt(this.minInclusive?.toString(),this.maxInclusive?.toString(),this.datatypes,{factory:e||this.factory})}validate(e){const t=super.validate(e).results;if(!Vp.Debug.equals(t[0].severity))return new _n({results:t});const r=BigInt(e.value);if(this.minInclusive!==null&&r<this.minInclusive){const n=`term value "${e.value}" is less than "${this.minInclusive.toString()}"`,s=[this.factory.literal(n)];t.push(new To({factory:this.factory,message:s}))}if(this.maxInclusive!==null&&r>this.maxInclusive){const n=`term value "${e.value}" is greater than "${this.maxInclusive.toString()}"`,s=[this.factory.literal(n)];t.push(new To({factory:this.factory,message:s}))}return new _n({results:t})}validateSimple(e){if(!super.validateSimple(e))return!1;const t=BigInt(e.value);return!(this.minInclusive!==null&&t<this.minInclusive||this.maxInclusive!==null&&t>this.maxInclusive)}}class cd extends Dn{constructor(e,t,{factory:r}={}){super({datatypes:t,factory:r}),this.values=new Set(e)}clone({factory:e}={}){return new cd(this.values,this.datatypes,{factory:e||this.factory})}validate(e){const t=[];if(!this.values.has(e.value)){const r=`term value "${e.value}" is not included in the list: ${[...this.values].join(",")}`,n=[this.factory.literal(r)];t.push(new To({factory:this.factory,message:n}))}return new _n({results:t})}validateSimple(e){return this.values.has(e.value)}}const We={xsd:Si("http://www.w3.org/2001/XMLSchema#")},gv=new Dn({datatypes:We.xsd.anySimpleType}),bv=new Dn({datatypes:We.xsd.anyAtomicType}),Xo=/^([^\ud8ff-\udfff\ufffe-\uffff]*)$/,yv=/^((\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+))$/,zp=/^((\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+)([Ee](\+|-)?[0-9]+)?|(\+|-)?INF|NaN)$/,dd=/^(-?P((([0-9]+Y([0-9]+M)?([0-9]+D)?|([0-9]+M)([0-9]+D)?|([0-9]+D))(T(([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)?|([0-9]+M)([0-9]+(\.[0-9]+)?S)?|([0-9]+(\.[0-9]+)?S)))?)|(T(([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)?|([0-9]+M)([0-9]+(\.[0-9]+)?S)?|([0-9]+(\.[0-9]+)?S)))))$/,Hp=/^(-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,vv=/^((([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,wv=/^(-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,_v=/^(-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,xv=/^(-?([1-9][0-9]{3,}|0[0-9]{3})(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,Ev=/^(--(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,Sv=/^(---(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,kv=/^(--(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,Rv=/^(([0-9a-fA-F]{2})*)$/,Iv=/^(((([A-Za-z0-9+/] ?){4})*(([A-Za-z0-9+/] ?){3}[A-Za-z0-9+/]|([A-Za-z0-9+/] ?){2}[AEIMQUYcgkosw048] ?=|[A-Za-z0-9+/] ?[AQgw] ?= ?=))?)$/,Tv=new lt(Xo,We.xsd.string),Cv=new cd(["1","true","0","false"],We.xsd.boolean),$v=new lt(yv,We.xsd.decimal),Av=new lt(zp,We.xsd.float),Nv=new lt(zp,We.xsd.double),Dv=new lt(dd,We.xsd.duration),Lv=new lt(Hp,We.xsd.dateTime),Ov=new lt(vv,We.xsd.time),Pv=new lt(wv,We.xsd.date),Mv=new lt(_v,We.xsd.gYearMonth),Fv=new lt(xv,We.xsd.gYear),jv=new lt(Ev,We.xsd.gMonthDay),Bv=new lt(Sv,We.xsd.gDay),qv=new lt(kv,We.xsd.gMonth),Uv=new lt(Rv,We.xsd.hexBinary),Vv=new lt(Iv,We.xsd.base64Binary),zv=new lt(Xo,We.xsd.anyURI),Wp=/^([^\u000d\u000a\u0009]*)$/,Hv=/^([^ ]+( [^ ]+)*)*$/,Wv=/^([a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*)$/,Gv=/^([^DT]*)$/,Kv=/^([^YM]*[DT].*)$/,Xv=/^(.*(Z|(\+|-)[0-9][0-9]:[0-9][0-9]))$/,Jv=new lt([Xo,Wp],We.xsd.normalizedString),Qv=new lt([Xo,Wp,Hv],We.xsd.token),Yv=new lt(Wv,We.xsd.language),Zv=new Qt(null,null,We.xsd.integer),ew=new Qt(null,"0",We.xsd.nonPositiveInteger),tw=new Qt(null,"-1",We.xsd.negativeInteger),iw=new Qt("-9223372036854775808","9223372036854775807",We.xsd.long),rw=new Qt("-2147483648","2147483647",We.xsd.int),nw=new Qt("-32768","32767",We.xsd.short),sw=new Qt("-128","127",We.xsd.byte),ow=new Qt("0",null,We.xsd.nonNegativeInteger),aw=new Qt("0","18446744073709551615",We.xsd.unsignedLong),lw=new Qt("0","4294967295",We.xsd.unsignedInt),cw=new Qt("0","65535",We.xsd.unsignedShort),dw=new Qt("0","255",We.xsd.unsignedByte),uw=new Qt("1",null,We.xsd.positiveInteger),hw=new lt([dd,Gv],We.xsd.yearMonthDuration),fw=new lt([dd,Kv],We.xsd.dayTimeDuration),pw=new lt([Hp,Xv],We.xsd.dateTimeStamp),mw=Object.freeze(Object.defineProperty({__proto__:null,anyAtomicType:bv,anySimpleType:gv,anyURI:zv,base64Binary:Vv,boolean:Cv,byte:sw,date:Pv,dateTime:Lv,dateTimeStamp:pw,dayTimeDuration:fw,decimal:$v,double:Nv,duration:Dv,float:Av,gDay:Bv,gMonth:qv,gMonthDay:jv,gYear:Fv,gYearMonth:Mv,hexBinary:Uv,int:rw,integer:Zv,language:Yv,long:iw,negativeInteger:tw,nonNegativeInteger:ow,nonPositiveInteger:ew,normalizedString:Jv,positiveInteger:uw,short:nw,string:Tv,time:Ov,token:Qv,unsignedByte:dw,unsignedInt:lw,unsignedLong:aw,unsignedShort:cw,yearMonthDuration:hw},Symbol.toStringTag,{value:"Module"}));class gw extends pv{constructor({factory:e}={}){super({factory:e,validations:{...mw}})}}const bw=new An([[de.BlankNode,new Set(["BlankNode"])],[de.BlankNodeOrIRI,new Set(["BlankNode","NamedNode"])],[de.BlankNodeOrLiteral,new Set(["BlankNode","Literal"])],[de.IRI,new Set(["NamedNode"])],[de.IRIOrLiteral,new Set(["NamedNode","Literal"])],[de.Literal,new Set(["Literal"])]]);function yw(i){const e=i.ptr.out([de.class]).map(t=>ac(t));return{generic:vw(e)}}function vw(i){return e=>{const t=new wi(e.valueOrNode.out([zr.type]).terms);for(const r of i){const n=[...t].some(s=>r.has(s));e.test(n,de.ClassConstraintComponent,{value:e.valueOrNode})}}}function ww(i){const e=i.ptr.out([de.datatype]).term,t=new gw;return{generic:_w(e,t)}}function _w(i,e){return t=>{const r=i.equals(t.valueOrNode.term.datatype)&&e.validateSimple(t.valueOrNode.term);t.test(r,de.DatatypeConstraintComponent,{args:{datatype:i},message:[t.factory.literal("Value does not have datatype {$datatype}")],value:t.valueOrNode})}}function xw(i){const e=i.ptr.out([de.nodeKind]).term,t=bw.get(e);return{generic:Ew(e,t)}}function Ew(i,e){return t=>{t.test(e.has(t.valueOrNode.term.termType),de.NodeKindConstraintComponent,{args:{nodeKind:i},message:[t.factory.literal("Value does not have node kind {$nodeKind}")],value:t.valueOrNode})}}const Sw=new An([[de.maxCount,u0],[de.minCount,f0],[de.and,y0],[de.not,w0],[de.or,x0],[de.xone,S0],[de.closed,R0],[de.hasValue,T0],[de.in,A0],[de.disjoint,D0],[de.equals,O0],[de.lessThan,F0],[de.lessThanOrEquals,B0],[de.maxExclusive,U0],[de.maxInclusive,z0],[de.minExclusive,W0],[de.minInclusive,K0],[de.node,J0],[de.property,Y0],[de.qualifiedValueShape,ev],[de.languageIn,rv],[de.maxLength,sv],[de.minLength,av],[de.pattern,cv],[de.uniqueLang,uv],[de.class,yw],[de.datatype,ww],[de.nodeKind,xw]]);class kw{constructor(e,{factory:t,...r}){if(this.factory=t,this.options=r,this.registry=new Zy(Sw),this.shapesPtr=new Io({dataset:e,factory:t}),this.shapes=new An,this.options.coverage&&(this.options.debug=!0,this.options.details=!0,this.options.trace=!0),this.options.validations)for(const[s,o]of this.options.validations)this.registry.validations.set(s,o);const n=[...this.shapesPtr.hasOut([de.targetClass]),...this.shapesPtr.hasOut([de.targetNode]),...this.shapesPtr.hasOut([de.targetObjectsOf]),...this.shapesPtr.hasOut([de.targetSubjectsOf]),...this.shapesPtr.hasOut([zr.type],[de.NodeShape]),...this.shapesPtr.hasOut([zr.type],[de.PropertyShape])];for(const s of n)this.shape(s)}shape(e){if(!e.term)return null;let t=this.shapes.get(e.term);return t||(t=new d0(e,{validator:this}),this.shapes.set(e.term,t)),t}async validate(e,t){const r=new Io({...e,factory:this.factory}),n=new ad({factory:this.factory,focusNode:r,options:this.options,validator:this});t?t=t.map(s=>this.shape(this.shapesPtr.node(s.terms))):t=this.shapes.values();for(const s of t){const o=n.create({shape:s});let a;r.isAny()?a=s.resolveTargets(o):a=r;for(const c of a)await s.validate(o.create({focusNode:c}))}return n.report}}let Rw=class extends HTMLElement{constructor(e){super(),this.shape=null,this.attachShadow({mode:"open"}),this.form=document.createElement("form"),this.config=new qh(e,this.form),this.form.addEventListener("change",t=>{t.stopPropagation(),this.config.editMode&&this.validate(!0).then(r=>{this.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1,composed:!0,detail:{valid:r.conforms,report:r}}))}).catch(r=>{console.warn(r)})})}static get observedAttributes(){return qh.dataAttributes()}connectedCallback(){this.shadowRoot.prepend(this.form)}attributeChangedCallback(){this.config.updateAttributes(this),this.initialize()}initialize(){clearTimeout(this.initDebounceTimeout),this.initDebounceTimeout=setTimeout(async()=>{this.form.replaceChildren(document.createTextNode(this.config.attributes.loading));try{await this.config.loader.loadGraphs(),this.form.replaceChildren(),this.config.renderedNodes.clear();const e=this.findRootShaclShapeSubject();if(e){this.form.classList.forEach(r=>{this.form.classList.remove(r)}),this.form.classList.toggle("mode-edit",this.config.editMode),this.form.classList.toggle("mode-view",!this.config.editMode),this.config.theme.apply(this.form);const t=[this.config.theme.stylesheet];for(const r of Eg())r.stylesheet&&t.push(r.stylesheet);if(this.shadowRoot.adoptedStyleSheets=t,this.shape=new yr(e,this.config,this.config.attributes.valuesSubject?He.namedNode(this.config.attributes.valuesSubject):void 0),this.form.appendChild(this.shape),this.config.editMode){if(this.config.attributes.submitButton!==null){const r=this.config.theme.createButton(this.config.attributes.submitButton||"Submit",!0);r.addEventListener("click",n=>{n.preventDefault(),this.form.reportValidity()&&this.validate().then(s=>{if(s?.conforms)this.dispatchEvent(new Event("submit",{bubbles:!0,cancelable:!0}));else{let o=this.form.querySelector(":scope .invalid > .editor");o?o.focus():this.form.querySelector(":scope .invalid")?.scrollIntoView()}})}),this.form.appendChild(r)}this.config.attributes.valuesSubject&&this.removeFromDataGraph(He.namedNode(this.config.attributes.valuesSubject)),await this.validate(!0)}}else if(this.config.store.countQuads(null,null,null,xo)>0)throw new Error("shacl root node shape not found")}catch(e){console.error(e);const t=document.createElement("div");t.innerText=String(e),this.form.replaceChildren(t)}},200)}serialize(e="text/turtle",t=this.toRDF()){const r=t.getQuads(null,null,null,null);return vg(r,e,this.config.prefixes)}toRDF(e=new jt){return this.shape?.toRDF(e),e}registerPlugin(e){xg(e),this.initialize()}setTheme(e){this.config.theme=e,this.initialize()}setSharedShapesGraph(e){py(e),this.initialize()}setClassInstanceProvider(e){this.config.classInstanceProvider=e,this.initialize()}async validate(e=!1){for(const t of this.form.querySelectorAll(":scope .validation-error"))t.remove();for(const t of this.form.querySelectorAll(":scope .property-instance"))t.classList.remove("invalid"),t.querySelector(":scope > .editor")?.value?t.classList.add("valid"):t.classList.remove("valid");this.config.store.deleteGraph(this.config.valuesGraphId||""),this.shape?.toRDF(this.config.store),this.shape&&this.config.store.add(new Fo(this.shape.shaclSubject,He.namedNode(Oe+"targetNode"),this.shape.nodeId,this.config.valuesGraphId));try{const t=this.config.store,r=await new kw(t,{details:!0,factory:He}).validate({dataset:t});for(const n of r.results)if(n.focusNode?.ptrs?.length)for(const s of n.focusNode.ptrs){const o=s._term;if(n.path?.length){const a=n.path[0].predicates[0];let c=this.form.querySelectorAll(`
369
+ `}function gy(){return""}function Pp(i){return"<"+i.value+">"}const by=/["\\\\\n\r]/,yy=/["\\\\\n\r]/g,vy={'"':'\\"',"\\":"\\\\","\n":"\\n","\r":"\\r"};function wy(i){return vy[i]}function _y(i){return by.test(i)?i.replace(yy,wy):i}function xy(i){const e=_y(i.value);return i.datatype.value==="http://www.w3.org/2001/XMLSchema#string"?'"'+e+'"':i.datatype.value==="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"?'"'+e+'"@'+i.language:'"'+e+'"^^'+Pp(i.datatype)}function Ey(i,e){const t=e(i.subject),r=e(i.predicate),n=e(i.object),s=e(i.graph);return`${t} ${r} ${n} ${s?s+" ":""}.`}function Sy(i){return"?"+i.value}function ci(i){if(!i)return null;if(i.termType==="BlankNode")return py(i);if(i.termType==="DefaultGraph")return gy();if(i.termType==="Literal")return xy(i);if(i.termType==="NamedNode")return Pp(i);if(i.termType==="Quad"||i.subject&&i.predicate&&i.object&&i.graph)return Ey(i,ci);if(i.termType==="Variable")return Sy(i);if(i[Symbol.iterator])return my(i,ci);throw new Error(`unknown termType ${i.termType}`)}class An{constructor(e){if(this.index=new Map,e)for(const[t,r]of e)this.set(t,r)}get size(){return this.index.size}clear(){this.index.clear()}delete(e){return this.index.delete(ci(e))}*entries(){for(const[,{term:e,value:t}]of this.index)yield[e,t]}forEach(e,t){for(const r of this.entries())e.call(t,r[1],r[0],this)}get(e){const t=this.index.get(ci(e));return t&&t.value}has(e){return this.index.has(ci(e))}*keys(){for(const[,{term:e}]of this.index)yield e}set(e,t){const r=ci(e);return this.index.set(r,{term:e,value:t}),this}*values(){for(const[,{value:e}]of this.index)yield e}[Symbol.iterator](){return this.entries()[Symbol.iterator]()}}class Uh{constructor({dataset:e,end:t,quad:r,start:n}){this.dataset=e,this.end=t,this.quad=r,this.start=n}get term(){return this.quad[this.end]}get graph(){return this.quad.graph}get startTerm(){return this.quad[this.start]}}function Vh(i){try{return ci(i)}catch{return null}}class wi{constructor(e){if(this.index=new Map,e)for(const t of e)this.add(t)}get size(){return this.index.size}add(e){const t=ci(e);return this.index.has(t)||this.index.set(t,e),this}clear(){this.index.clear()}delete(e){return e?this.index.delete(Vh(e)):!1}entries(){return this.values().entries()}forEach(e,t){return this.values().forEach(e,t)}has(e){return e?this.index.has(Vh(e)):!1}values(){return new Set(this.index.values())}keys(){return this.values()}[Symbol.iterator](){return this.index.values()}}class Mp{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}Mp.prototype.termType="BlankNode";class rd{equals(e){return!!e&&e.termType===this.termType}}rd.prototype.termType="DefaultGraph";rd.prototype.value="";function zh(i,e){if(!e)return null;if(e.termType==="BlankNode")return i.blankNode(e.value);if(e.termType==="DefaultGraph")return i.defaultGraph();if(e.termType==="Literal")return i.literal(e.value,e.language||i.namedNode(e.datatype.value));if(e.termType==="NamedNode")return i.namedNode(e.value);if(e.termType==="Quad"){const t=i.fromTerm(e.subject),r=i.fromTerm(e.predicate),n=i.fromTerm(e.object),s=i.fromTerm(e.graph);return i.quad(t,r,n,s)}if(e.termType==="Variable")return i.variable(e.value);throw new Error(`unknown termType ${e.termType}`)}class yo{constructor(e,t,r,n=""){this.value=e,this.language=t,this.datatype=r,this.direction=n}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value&&e.language===this.language&&e.datatype.equals(this.datatype)&&(e.direction||"")===this.direction}}yo.prototype.termType="Literal";class qs{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}qs.prototype.termType="NamedNode";class nd{constructor(e,t,r,n){this.subject=e,this.predicate=t,this.object=r,this.graph=n}equals(e){return!!e&&(e.termType==="Quad"||!e.termType)&&e.subject.equals(this.subject)&&e.predicate.equals(this.predicate)&&e.object.equals(this.object)&&e.graph.equals(this.graph)}}nd.prototype.termType="Quad";nd.prototype.value="";class Fp{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}Fp.prototype.termType="Variable";const ky=new qs("http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString"),Hh=new qs("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),Ry=new qs("http://www.w3.org/2001/XMLSchema#string");class jp{constructor(){this.init()}init(){this._data={blankNodeCounter:0,defaultGraph:new rd}}namedNode(e){return new qs(e)}blankNode(e){return e=e||"b"+ ++this._data.blankNodeCounter,new Mp(e)}literal(e,t){return typeof t=="string"?new yo(e,t,Hh):typeof t?.language=="string"?new yo(e,t.language,t.direction?ky:Hh,t.direction):new yo(e,"",t||Ry)}variable(e){return new Fp(e)}defaultGraph(){return this._data.defaultGraph}quad(e,t,r,n=this.defaultGraph()){return new nd(e,t,r,n)}fromTerm(e){return zh(this,e)}fromQuad(e){return zh(this,e)}}jp.exports=["blankNode","defaultGraph","fromQuad","fromTerm","literal","namedNode","quad","variable"];const sd=new jp,Iy={apply:(i,e,t)=>i(t[0]),get:(i,e)=>i(e)};function Si(i,{factory:e=sd}={}){const t=(r="")=>e.namedNode(`${i}${r.raw||r}`);return typeof Proxy>"u"?t:new Proxy(t,Iy)}Si("http://www.w3.org/2001/XMLSchema#");const Li=Si("http://www.w3.org/1999/02/22-rdf-syntax-ns#");Si("http://www.w3.org/2000/01/rdf-schema#");class rt{static add({ptr:e,start:t,end:r,subjects:n=[null],predicates:s=[null],objects:o=[null],graphs:a,callback:c}={}){if(!e.factory)throw new Error("add operation requires a factory");let l=()=>{};c&&(l=d=>{c(new Uh({dataset:e.dataset,start:t,end:r,quad:d}))});for(const d of n)for(const u of s)for(const p of o)for(const g of a){const v={subject:d,predicate:u,object:p,graph:g};v[t]=e.term;const _=e.factory.quad(v.subject,v.predicate,v.object,v.graph);e.dataset.add(_),l(_)}return e}static addList({ptr:e,predicates:t,items:r,graphs:n}){if(e.isAny())throw new Error("can't attach a list to an any ptr");for(const s of t)for(const o of n){const a=r.map(()=>e.factory.blankNode());e.dataset.add(e.factory.quad(e.term,s,a[0]||Li.nil,o));for(let c=0;c<a.length;c++)e.dataset.add(e.factory.quad(a[c],Li.first,r[c],o)),e.dataset.add(e.factory.quad(a[c],Li.rest,a[c+1]||Li.nil,o))}return e}static delete({ptr:e,start:t,subjects:r=[null],predicates:n=[null],objects:s=[null]}){for(const o of r)for(const a of n)for(const c of s){const l={subject:o,predicate:a,object:c};l[t]=e.term;const d=e.dataset.match(l.subject,l.predicate,l.object);for(const u of d)e.dataset.delete(u)}return e}static deleteList({ptr:e,predicates:t}){const r=[];for(const n of t)for(const s of e.dataset.match(e.term,n)){let o=s.object;for(r.push(s);!Li.nil.equals(o);){o=r[r.length-1].object;const a=e.dataset.match(o);if(a.size===0)break;for(const c of a)r.push(c)}}for(const n of r)e.dataset.delete(n);return e}static execute({ptr:e,operation:t="traverse",quantifier:r,start:n,end:s,subjects:o,predicates:a,objects:c,graphs:l,items:d,callback:u}={}){if(t==="add")return rt.add({ptr:e,start:n,end:s,subjects:o,predicates:a,objects:c,graphs:l,callback:u});if(t==="addList")return rt.addList({ptr:e,predicates:a,items:d,graphs:l});if(t==="delete")return rt.delete({ptr:e,start:n,subjects:o,predicates:a,objects:c});if(t==="deleteList")return rt.deleteList({ptr:e,predicates:a});if(t==="isList")return rt.isList({ptr:e});if(t==="list")return rt.list({ptr:e});if(t==="traverse")return rt.traverse({ptr:e,quantifier:r,start:n,end:s,subjects:o,predicates:a,objects:c,graphs:l});throw new Error(`unknown operation ${t}`)}static isList({ptr:e}){return e.isAny()?!1:!!(Li.nil.equals(e.term)||rt.traverse({ptr:e,predicates:[Li.first]}).length===1)}static list({ptr:e}){if(e.isList())return{*[Symbol.iterator](){for(;e&&!e.term.equals(Li.nil);){const t=e.out([Li.first]);if(t.length!==1)throw new Error(`Invalid list: rdf:first count not equals one on ${e.value}`);const r=e.out([Li.rest]);if(r.length!==1)throw new Error(`Invalid list: rdf:rest count not equals one on ${e.value}`);yield t[0],e=r[0]}}}}static traverse({ptr:e,quantifier:t="one",start:r="subject",end:n="object",subjects:s=[null],predicates:o=[null],objects:a=[null],graphs:c=[null],callback:l}){if(t==="one")return rt.traverseOne({ptr:e,start:r,end:n,subjects:s,predicates:o,objects:a,graphs:c,callback:l});if(t==="oneOrMore"){const d=rt.traverse({ptr:e,end:n,start:r,subjects:s,predicates:o,objects:a,graphs:c,callback:l});return rt.traverseMore({ptrs:d,end:n,start:r,subjects:s,predicates:o,objects:a,graphs:c,callback:l})}if(t==="zeroOrMore")return rt.traverseMore({ptrs:[e],end:n,start:r,subjects:s,predicates:o,objects:a,graphs:c,callback:l});if(t==="zeroOrOne")return[e,...rt.traverse({ptr:e,end:n,start:r,subjects:s,predicates:o,objects:a,graphs:c,callback:l})];throw new Error(`unknown quantifier ${t}`)}static traverseMore({ptrs:e,end:t,start:r,subjects:n,predicates:s,objects:o,graphs:a,callback:c}={}){let l=[...e],d,u;do{d=[];for(const p of e)d=[...d,...rt.traverseOne({ptr:p,end:t,start:r,subjects:n,predicates:s,objects:o,graphs:a,callback:c})];u&&(d=d.filter(p=>!u.has(p.term))),e=d,l=[...l,...d],u=new wi(l.map(p=>p.term))}while(d.length>0);return l}static traverseOne({ptr:e,start:t,end:r,subjects:n,predicates:s,objects:o,graphs:a,callback:c=(l,d)=>d.extend(l)}={}){const l=[];for(const d of n)for(const u of s)for(const p of o)for(const g of a){const v={subject:d,predicate:u,object:p,graph:g};v[t]=e.term;for(const _ of e.dataset.match(v.subject,v.predicate,v.object,v.graph))l.push(c(new Uh({dataset:e.dataset,end:r,quad:_,start:t}),e))}return l}}function Wh(i,e){return e?t=>e(i.extend(t)):()=>{}}class Gh{constructor({dataset:e,edges:t=[],factory:r,graph:n,term:s}){if(!e&&t.length===0)throw new Error("dataset or edges is required");if(t.length===0&&typeof s>"u")throw new Error("edges or term must be given");if(t.length>0&&s)throw new Error("edges or term must be given");this.dataset=e||t[t.length-1].dataset,this.edges=t,this.factory=r,this._graph=n,t.length===0&&(this._term=s)}get edge(){return this.edges[this.edges.length-1]}get graph(){return typeof this._graph=="object"?this._graph:this.edge&&this.edge.graph}get length(){return this._term!==void 0?1:this.edges.length+1}get startTerm(){return this._term||this.edges[0].startTerm}get term(){return this._term!==void 0?this._term:this.edge.term}get value(){const e=this.term;return e===null?void 0:e.value}addIn(e,t,r){return rt.add({ptr:this,start:"object",end:"subject",subjects:t,predicates:e,graphs:[this.graph||this.factory.defaultGraph()],callback:Wh(this,r)})}addList(e,t){return rt.addList({ptr:this,predicates:e,graphs:[this.graph||this.factory.defaultGraph()],items:t})}addOut(e,t,r){return rt.add({ptr:this,start:"subject",end:"object",predicates:e,objects:t,graphs:[this.graph||this.factory.defaultGraph()],callback:Wh(this,r)})}deleteIn(e,t){return rt.delete({ptr:this,start:"object",subjects:t,predicates:e})}deleteList(e){return rt.deleteList({ptr:this,predicates:e})}deleteOut(e,t){return rt.delete({ptr:this,start:"subject",predicates:e,objects:t})}execute({operation:e,quantifier:t,start:r,end:n,subjects:s,predicates:o,objects:a,graphs:c,items:l,callback:d}){return rt.execute({ptr:this,operation:e,quantifier:t,start:r,end:n,subjects:s,predicates:o,objects:a,graphs:c,items:l,callback:d})}extend(e){return new this.constructor({dataset:this.dataset,edges:[...this.edges,e],factory:this.factory,graph:this._graph})}hasIn(e,t){return rt.traverse({ptr:this,start:"object",end:"object",subjects:t,predicates:e,graphs:[this.graph]})}hasOut(e,t){return rt.traverse({ptr:this,start:"subject",end:"subject",predicates:e,objects:t,graphs:[this.graph]})}in(e,t){return rt.traverse({ptr:this,start:"object",end:"subject",subjects:t,predicates:e,graphs:[this.graph]})}isAny(){return!this.term}isList(){return rt.isList({ptr:this})}list(){return rt.list({ptr:this})}*nodes(){for(let e=0;e<this.length;e++)this._term!==void 0?yield{dataset:this.dataset,term:this._term}:this.edges.length>e?yield{dataset:this.edges[e].dataset,term:this.edges[e].startTerm}:this.edges.length===e&&(yield{dataset:this.edges[e-1].dataset,term:this.edges[e-1].term})}out(e,t){return rt.traverse({ptr:this,predicates:e,objects:t,graphs:[this.graph]})}*quads(){for(const{quad:e}of this.edges)yield e}trim(){return new this.constructor({dataset:this.dataset,factory:this.factory,graph:this.graph,term:this.term})}}function Kh(i,e){return i?i.equals(e):i===e}function Ty(i,e){return!(i.dataset!==e.dataset||!Kh(i.graph,e.graph)||!Kh(i.term,e.term))}function Xh(i,e){return e?t=>e(new i.constructor({factory:i.factory,ptrs:[t]})):()=>{}}class Io{constructor({dataset:e,factory:t,ptrs:r,terms:n,graphs:s}){if(this.factory=t,r)this.ptrs=[...r];else{this.ptrs=[];for(const o of n||[null])for(const a of s||[null])this.ptrs.push(new Gh({dataset:e,factory:t,graph:a,term:o}))}}get dataset(){const e=new Set(this.datasets);return e.size!==1?null:e[Symbol.iterator]().next().value}get datasets(){return this.ptrs.map(e=>e.dataset)}get term(){const e=new wi(this.terms);if(e.size===1)return e[Symbol.iterator]().next().value}get terms(){return this.ptrs.map(e=>e.term)}get value(){const e=this.term;return e?.value}get values(){return this.ptrs.map(e=>e.value)}addIn(e,t,r){const n=Xh(this,r);for(const s of this.ptrs)s.addIn(e,t,n);return this}addList(e,t){if(this.isAny())throw new Error("can't attach a list to an any ptr");for(const r of this.ptrs)r.addList(e,t);return this}addOut(e,t,r){const n=Xh(this,r);for(const s of this.ptrs)s.addOut(e,t,n);return this}clone(e){return new this.constructor({factory:this.factory,ptrs:this.ptrs,...e})}deleteIn(e,t){for(const r of this.ptrs)r.deleteIn(e,t);return this}deleteList(e){for(const t of this.ptrs)t.deleteList(e);return this}deleteOut(e,t){for(const r of this.ptrs)r.deleteOut(e,t);return this}distinct(){const e=this.ptrs.reduce((t,r)=>(t.some(n=>Ty(n,r))||t.push(r.trim()),t),[]);return this.clone({ptrs:e})}execute(e){return this.clone({ptrs:this.ptrs.flatMap(t=>t.execute(e))})}executeAll(e){let t=this;for(const r of e)t=t.execute(r);return t}filter(e){return this.clone({ptrs:[...this].filter(e).map(t=>t.ptrs[0])})}hasIn(e,t){return this.clone({ptrs:this.ptrs.flatMap(r=>r.hasIn(e,t))})}hasOut(e,t){return this.clone({ptrs:this.ptrs.flatMap(r=>r.hasOut(e,t))})}in(e,t){return this.clone({ptrs:this.ptrs.flatMap(r=>r.in(e,t))})}isAny(){return this.ptrs.length>0&&this.ptrs.some(e=>e.isAny())}isList(){return this.ptrs.length!==1?!1:this.ptrs[0].isList()}list(){if(!this.isList())return;const e=this.ptrs[0].list(),t=this;return function*(){for(const r of e)yield t.clone({ptrs:[r]})}()}map(e){return[...this].map(e)}node(e){const t=this.dataset,r=[...e].map(n=>new Gh({dataset:t,factory:this.factory,term:n}));return this.clone({ptrs:r})}out(e,t){return this.clone({ptrs:this.ptrs.flatMap(r=>r.out(e,t))})}*quads(){for(const{edges:e}of this.ptrs)for(const{quad:t}of e)yield t}trim(){return this.clone({ptrs:this.ptrs.map(e=>e.trim())})}*[Symbol.iterator](){for(const e of this.ptrs)yield this.clone({ptrs:[e]})}}Si("http://www.w3.org/2002/07/owl#");const zr=Si("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),Cy=Si("http://www.w3.org/2000/01/rdf-schema#"),de=Si("http://www.w3.org/ns/shacl#"),sc=Si("https://schemas.link/shacl-next#"),od=Si("http://www.w3.org/2001/XMLSchema#");function $y(i){return i?`{${[...i.quads()].map(e=>ci(e)).join(" ")}}`:"{}"}function Ay(i){return i?`{${i.map(e=>$y(e)).join(" ")}}`:"{}"}var kl,Jh;function Ny(){if(Jh)return kl;Jh=1;var i=/\s/;function e(t){for(var r=t.length;r--&&i.test(t.charAt(r)););return r}return kl=e,kl}var Rl,Qh;function Dy(){if(Qh)return Rl;Qh=1;var i=Ny(),e=/^\s+/;function t(r){return r&&r.slice(0,i(r)+1).replace(e,"")}return Rl=t,Rl}var Il,Yh;function Ly(){if(Yh)return Il;Yh=1;function i(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return Il=i,Il}var Tl,Zh;function Oy(){if(Zh)return Tl;Zh=1;var i=typeof cn=="object"&&cn&&cn.Object===Object&&cn;return Tl=i,Tl}var Cl,ef;function Py(){if(ef)return Cl;ef=1;var i=Oy(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=i||e||Function("return this")();return Cl=t,Cl}var $l,tf;function Bp(){if(tf)return $l;tf=1;var i=Py(),e=i.Symbol;return $l=e,$l}var Al,rf;function My(){if(rf)return Al;rf=1;var i=Bp(),e=Object.prototype,t=e.hasOwnProperty,r=e.toString,n=i?i.toStringTag:void 0;function s(o){var a=t.call(o,n),c=o[n];try{o[n]=void 0;var l=!0}catch{}var d=r.call(o);return l&&(a?o[n]=c:delete o[n]),d}return Al=s,Al}var Nl,nf;function Fy(){if(nf)return Nl;nf=1;var i=Object.prototype,e=i.toString;function t(r){return e.call(r)}return Nl=t,Nl}var Dl,sf;function jy(){if(sf)return Dl;sf=1;var i=Bp(),e=My(),t=Fy(),r="[object Null]",n="[object Undefined]",s=i?i.toStringTag:void 0;function o(a){return a==null?a===void 0?n:r:s&&s in Object(a)?e(a):t(a)}return Dl=o,Dl}var Ll,of;function By(){if(of)return Ll;of=1;function i(e){return e!=null&&typeof e=="object"}return Ll=i,Ll}var Ol,af;function qy(){if(af)return Ol;af=1;var i=jy(),e=By(),t="[object Symbol]";function r(n){return typeof n=="symbol"||e(n)&&i(n)==t}return Ol=r,Ol}var Pl,lf;function Uy(){if(lf)return Pl;lf=1;var i=Dy(),e=Ly(),t=qy(),r=NaN,n=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt;function c(l){if(typeof l=="number")return l;if(t(l))return r;if(e(l)){var d=typeof l.valueOf=="function"?l.valueOf():l;l=e(d)?d+"":d}if(typeof l!="string")return l===0?l:+l;l=i(l);var u=s.test(l);return u||o.test(l)?a(l.slice(2),u?2:8):n.test(l)?r:+l}return Pl=c,Pl}var Ml,cf;function Vy(){if(cf)return Ml;cf=1;var i=Uy(),e=1/0,t=17976931348623157e292;function r(n){if(!n)return n===0?n:0;if(n=i(n),n===e||n===-e){var s=n<0?-1:1;return s*t}return n===n?n:0}return Ml=r,Ml}var Fl,df;function zy(){if(df)return Fl;df=1;var i=Vy();function e(t){var r=i(t),n=r%1;return r===r?n?r-n:r:0}return Fl=e,Fl}var jl,uf;function Hy(){if(uf)return jl;uf=1;var i=zy(),e="Expected a function";function t(r,n){var s;if(typeof n!="function")throw new TypeError(e);return r=i(r),function(){return--r>0&&(s=n.apply(this,arguments)),r<=1&&(n=void 0),s}}return jl=t,jl}var Bl,hf;function Wy(){if(hf)return Bl;hf=1;var i=Hy();function e(t){return i(2,t)}return Bl=e,Bl}var Gy=Wy();const Ci=Tm(Gy);let ff=class{constructor({details:e,factory:t,options:r,results:n=[]}={}){this.details=e,this.factory=t,this.options=r,this.results=n,this._conforms=Ci(()=>!this.results.some(s=>s.severity.equals(de.Info)||s.severity.equals(de.Violation)||s.severity.equals(de.Warning))),this._ptr=Ci(()=>this.build())}get conforms(){return this._conforms()}get dataset(){return this.ptr.dataset}get ptr(){return this._ptr()}get term(){return this.ptr.term}build(){const e=new Io({dataset:this.factory.dataset(),factory:this.factory,terms:[this.factory.blankNode()]});e.addOut([zr.type],[de.ValidationReport]).addOut([de.conforms],[this.factory.literal(this.conforms.toString(),od.boolean)]);for(const t of this.results)e.addOut([de.result],[this.factory.blankNode()],r=>{t.build(r,this.options)});return e}coverage(){return this.results.flatMap(e=>e.coverage())}};function Ky(i,e){return Object.entries(e).reduce((t,[r,n])=>(n&&n.termType&&(n=ci(n)),t.replace(`{$${r}}`,n).replace(`{?${r}}`,n)),i)}let Xy=class{constructor({args:e={},constraintComponent:t,factory:r,focusNode:n,message:s=[],path:o,results:a=[],severity:c,shape:l,source:d=[],value:u,valuePaths:p=[]}={}){this.args=e,this.constraintComponent=t,this.factory=r,this.focusNode=n,this.path=o||l.path,this.results=a,this.severity=c,this.shape=l,this.source=d,this.value=u,this.valuePaths=p,this._message=Ci(()=>(this.shape.message.length>0&&(s=this.shape.message),s.length===0&&(s=this.shape.ptr.node([this.constraintComponent]).out([de.message]).terms),s.map(g=>r.literal(Ky(g.value,e),g.language||null))))}get message(){return this._message()}build(e,{details:t}={}){e.addOut([zr.type],[de.ValidationResult]).addOut([de.focusNode],this.focusNode.terms).addOut([de.resultSeverity],[this.severity]).addOut([de.sourceConstraint],this.source).addOut([de.sourceConstraintComponent],[this.constraintComponent]).addOut([de.sourceShape],this.shape.ptr.terms),this.message&&e.addOut([de.resultMessage],this.message);const r=n=>{if(n.quantifier==="one")return n.predicates.length>1?e.node([this.factory.blankNode()]).addList([de.alternativePath],n.predicates):n.start==="object"?e.node([this.factory.blankNode()]).addOut([de.inversePath],[n.predicates[0]]):e.node([n.predicates[0]]);if(n.quantifier==="oneOrMore")return e.node([this.factory.blankNode()]).addOut([de.oneOrMorePath],[n.predicates[0]]);if(n.quantifier==="zeroOrMore")return e.node([this.factory.blankNode()]).addOut([de.zeroOrMorePath],[n.predicates[0]]);if(n.quantifier==="zeroOrOne")return e.node([this.factory.blankNode()]).addOut([de.zeroOrOnePath],[n.predicates[0]])};if(this.path&&(this.path.length===1?e.addOut([de.resultPath],r(this.path[0]).terms):e.addList([de.resultPath],this.path.map(n=>r(n).term))),typeof this.value<"u"&&e.addOut([de.value],this.value.terms),t)for(const n of this.results)e.addOut([de.detail],[this.factory.blankNode()],s=>{n.build(s,{details:t})})}coverage(){return[...this.valuePaths.flatMap(e=>[...e.quads()]),...this.results.flatMap(e=>e.coverage())]}};class ad{constructor({factory:e,focusNode:t,options:r={debug:!1,details:!1},processed:n=new Set,report:s=new ff({factory:e,options:r}),results:o=new Map,shape:a,value:c,valueOrNode:l,valuePaths:d,values:u}={}){this.factory=e,this.focusNode=t,this.options=r,this.processed=n,this.report=s,this.results=o,this.shape=a,this.value=c,this.valuePaths=d,this.valueOrNode=l,this.values=u}create({child:e,focusNode:t=this.focusNode,shape:r=this.shape,value:n=this.value,valueOrNode:s=this.valueOrNode,valuePaths:o=this.valuePaths,values:a=this.values}={}){return new ad({factory:this.factory,focusNode:t,options:this.options,processed:this.processed,report:e?new ff({factory:this.factory,options:this.options}):this.report,results:this.results,shape:r,value:n,valueOrNode:s,valuePaths:o,values:a})}id({shape:e=this.shape}={}){return`${ci(e.ptr.term)} - ${ci(this.focusNode.term)} - ${Ay(this.valuePaths)}`}result(e){const t=new Xy({factory:this.factory,focusNode:this.focusNode,shape:this.shape,value:this.value,valuePaths:this.valuePaths,...e}),r=this.id();this.results.has(r)?this.results.get(r).add(t):this.results.set(r,new Set([t])),this.report.results.push(t)}debug(e,t){this.options.debug&&this.result({severity:sc.Debug,constraintComponent:e,...t})}trace(e,t){this.options.trace&&this.result({severity:sc.Trace,constraintComponent:e,...t})}test(e,t,r){e?this.debug(t,r):this.violation(t,r)}violation(e,t){this.result({constraintComponent:e,severity:this.shape.severity||de.Violation,...t})}}function Jy(){return{generic:Qy()}}function Qy(){return i=>{i.trace(sc.TraversalConstraintComponent,{args:{},message:[i.factory.literal("Traversal")],value:i.valueOrNode})}}class Yy{constructor(e){this.validations=new An(e)}compile(e){const t=e.validator.options.coverage;if(e.deactivated)return[];let r=!1;const n=new Set;for(const s of e.ptr.execute({start:"subject",end:"predicate"})){const o=this.validations.get(s.term);o&&(n.add(o),s.term.equals(de.property)&&(r=!0))}return t&&e.isPropertyShape&&!r&&n.add(Jy),[...n].map(s=>s(e)).filter(Boolean)}}var Or={},Pr={},rs={},ns={},pf;function wn(){if(pf)return ns;pf=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.Translator=void 0;let i=class{constructor(){this.supportedRdfDatatypes=[],this.fromRdfHandlers={},this.toRdfHandlers={}}static incorrectRdfDataType(t){throw new Error(`Invalid RDF ${t.datatype.value} value: '${t.value}'`)}registerHandler(t,r,n){for(const s of r)this.supportedRdfDatatypes.push(s),this.fromRdfHandlers[s.value]=t;for(const s of n){let o=this.toRdfHandlers[s];o||(this.toRdfHandlers[s]=o=[]),o.push(t)}}fromRdf(t,r){const n=this.fromRdfHandlers[t.datatype.value];return n?n.fromRdf(t,r):t.value}toRdf(t,r){const n=this.toRdfHandlers[typeof t];if(n)for(const s of n){const o=s.toRdf(t,r);if(o)return o}throw new Error(`Invalid JavaScript value: '${t}'`)}getSupportedRdfDatatypes(){return this.supportedRdfDatatypes}getSupportedJavaScriptPrimitives(){return Object.keys(this.toRdfHandlers)}};return ns.Translator=i,ns}var mf;function Zy(){if(mf)return rs;mf=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.TypeHandlerBoolean=void 0;const i=wn();let e=class qp{fromRdf(r,n){switch(r.value){case"true":return!0;case"false":return!1;case"1":return!0;case"0":return!1}return n&&i.Translator.incorrectRdfDataType(r),!1}toRdf(r,{datatype:n,dataFactory:s}){return s.literal(r?"true":"false",n||s.namedNode(qp.TYPE))}};return rs.TypeHandlerBoolean=e,e.TYPE="http://www.w3.org/2001/XMLSchema#boolean",rs}var ss={},gf;function e0(){if(gf)return ss;gf=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.TypeHandlerDate=void 0;const i=wn();let e=class oc{fromRdf(r,n){switch(n&&!r.value.match(oc.VALIDATORS[r.datatype.value.substr(33,r.datatype.value.length)])&&i.Translator.incorrectRdfDataType(r),r.datatype.value){case"http://www.w3.org/2001/XMLSchema#gDay":return new Date(0,0,parseInt(r.value,10));case"http://www.w3.org/2001/XMLSchema#gMonthDay":const s=r.value.split("-");return new Date(0,parseInt(s[0],10)-1,parseInt(s[1],10));case"http://www.w3.org/2001/XMLSchema#gYear":return new Date(r.value+"-01-01");case"http://www.w3.org/2001/XMLSchema#gYearMonth":return new Date(r.value+"-01");default:return new Date(r.value)}}toRdf(r,{datatype:n,dataFactory:s}){if(n=n||s.namedNode(oc.TYPES[0]),!(r instanceof Date))return null;const o=r;let a;switch(n.value){case"http://www.w3.org/2001/XMLSchema#gDay":a=String(o.getUTCDate());break;case"http://www.w3.org/2001/XMLSchema#gMonthDay":a=o.getUTCMonth()+1+"-"+o.getUTCDate();break;case"http://www.w3.org/2001/XMLSchema#gYear":a=String(o.getUTCFullYear());break;case"http://www.w3.org/2001/XMLSchema#gYearMonth":a=o.getUTCFullYear()+"-"+(o.getUTCMonth()+1);break;case"http://www.w3.org/2001/XMLSchema#date":a=o.toISOString().replace(/T.*$/,"");break;default:a=o.toISOString()}return s.literal(a,n)}};return ss.TypeHandlerDate=e,e.TYPES=["http://www.w3.org/2001/XMLSchema#dateTime","http://www.w3.org/2001/XMLSchema#date","http://www.w3.org/2001/XMLSchema#gDay","http://www.w3.org/2001/XMLSchema#gMonthDay","http://www.w3.org/2001/XMLSchema#gYear","http://www.w3.org/2001/XMLSchema#gYearMonth"],e.VALIDATORS={date:/^[0-9]+-[0-9][0-9]-[0-9][0-9]Z?$/,dateTime:/^[0-9]+-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9](\.[0-9][0-9][0-9])?((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,gDay:/^[0-9]+$/,gMonthDay:/^[0-9]+-[0-9][0-9]$/,gYear:/^[0-9]+$/,gYearMonth:/^[0-9]+-[0-9][0-9]$/},ss}var os={},bf;function t0(){if(bf)return os;bf=1,Object.defineProperty(os,"__esModule",{value:!0}),os.TypeHandlerNumberDouble=void 0;const i=wn();let e=class Up{fromRdf(r,n){const s=parseFloat(r.value);return n&&isNaN(s)&&i.Translator.incorrectRdfDataType(r),s}toRdf(r,{datatype:n,dataFactory:s}){return n=n||s.namedNode(Up.TYPES[0]),isNaN(r)?s.literal("NaN",n):isFinite(r)?r%1===0?null:s.literal(r.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),n):s.literal(r>0?"INF":"-INF",n)}};return os.TypeHandlerNumberDouble=e,e.TYPES=["http://www.w3.org/2001/XMLSchema#double","http://www.w3.org/2001/XMLSchema#decimal","http://www.w3.org/2001/XMLSchema#float"],os}var as={},yf;function i0(){if(yf)return as;yf=1,Object.defineProperty(as,"__esModule",{value:!0}),as.TypeHandlerNumberInteger=void 0;const i=wn();let e=class ps{fromRdf(r,n){const s=parseInt(r.value,10);return n&&(isNaN(s)||r.value.indexOf(".")>=0)&&i.Translator.incorrectRdfDataType(r),s}toRdf(r,{datatype:n,dataFactory:s}){return s.literal(String(r),n||(r<=ps.MAX_INT&&r>=ps.MIN_INT?s.namedNode(ps.TYPES[0]):s.namedNode(ps.TYPES[1])))}};return as.TypeHandlerNumberInteger=e,e.TYPES=["http://www.w3.org/2001/XMLSchema#integer","http://www.w3.org/2001/XMLSchema#long","http://www.w3.org/2001/XMLSchema#int","http://www.w3.org/2001/XMLSchema#byte","http://www.w3.org/2001/XMLSchema#short","http://www.w3.org/2001/XMLSchema#negativeInteger","http://www.w3.org/2001/XMLSchema#nonNegativeInteger","http://www.w3.org/2001/XMLSchema#nonPositiveInteger","http://www.w3.org/2001/XMLSchema#positiveInteger","http://www.w3.org/2001/XMLSchema#unsignedByte","http://www.w3.org/2001/XMLSchema#unsignedInt","http://www.w3.org/2001/XMLSchema#unsignedLong","http://www.w3.org/2001/XMLSchema#unsignedShort"],e.MAX_INT=2147483647,e.MIN_INT=-2147483648,as}var ls={},vf;function r0(){if(vf)return ls;vf=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.TypeHandlerString=void 0;let i=class{fromRdf(t){return t.value}toRdf(t,{datatype:r,dataFactory:n}){return n.literal(t,r)}};return ls.TypeHandlerString=i,i.TYPES=["http://www.w3.org/2001/XMLSchema#string","http://www.w3.org/2001/XMLSchema#normalizedString","http://www.w3.org/2001/XMLSchema#anyURI","http://www.w3.org/2001/XMLSchema#base64Binary","http://www.w3.org/2001/XMLSchema#language","http://www.w3.org/2001/XMLSchema#Name","http://www.w3.org/2001/XMLSchema#NCName","http://www.w3.org/2001/XMLSchema#NMTOKEN","http://www.w3.org/2001/XMLSchema#token","http://www.w3.org/2001/XMLSchema#hexBinary","http://www.w3.org/1999/02/22-rdf-syntax-ns#langString","http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString","http://www.w3.org/2001/XMLSchema#time","http://www.w3.org/2001/XMLSchema#duration"],ls}var wf;function _f(){return wf||(wf=1,function(i){var e=Pr&&Pr.__createBinding||(Object.create?function(r,n,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(n,s);(!a||("get"in a?!n.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return n[s]}}),Object.defineProperty(r,o,a)}:function(r,n,s,o){o===void 0&&(o=s),r[o]=n[s]}),t=Pr&&Pr.__exportStar||function(r,n){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(n,s)&&e(n,r,s)};Object.defineProperty(i,"__esModule",{value:!0}),t(Zy(),i),t(e0(),i),t(t0(),i),t(i0(),i),t(r0(),i)}(Pr)),Pr}var ql={},xf;function n0(){return xf||(xf=1,Object.defineProperty(ql,"__esModule",{value:!0})),ql}var Ef;function s0(){return Ef||(Ef=1,function(i){var e=Or&&Or.__createBinding||(Object.create?function(g,v,_,E){E===void 0&&(E=_);var x=Object.getOwnPropertyDescriptor(v,_);(!x||("get"in x?!v.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return v[_]}}),Object.defineProperty(g,E,x)}:function(g,v,_,E){E===void 0&&(E=_),g[E]=v[_]}),t=Or&&Or.__exportStar||function(g,v){for(var _ in g)_!=="default"&&!Object.prototype.hasOwnProperty.call(v,_)&&e(v,g,_)};Object.defineProperty(i,"__esModule",{value:!0}),i.fromRdf=c,i.toRdf=l,i.getTermRaw=d,i.getSupportedRdfDatatypes=u,i.getSupportedJavaScriptPrimitives=p;const r=Cp(),n=_f(),s=wn();t(_f(),i),t(n0(),i),t(wn(),i);const o=new r.DataFactory,a=new s.Translator;a.registerHandler(new n.TypeHandlerString,n.TypeHandlerString.TYPES.map(g=>o.namedNode(g)),["string"]),a.registerHandler(new n.TypeHandlerBoolean,[n.TypeHandlerBoolean.TYPE].map(g=>o.namedNode(g)),["boolean"]),a.registerHandler(new n.TypeHandlerNumberDouble,n.TypeHandlerNumberDouble.TYPES.map(g=>o.namedNode(g)),["number"]),a.registerHandler(new n.TypeHandlerNumberInteger,n.TypeHandlerNumberInteger.TYPES.map(g=>o.namedNode(g)),["number"]),a.registerHandler(new n.TypeHandlerDate,n.TypeHandlerDate.TYPES.map(g=>o.namedNode(g)),["object"]);function c(g,v){return a.fromRdf(g,v)}function l(g,v){return v&&"namedNode"in v&&(v={dataFactory:v}),v=v||{},v&&!v.dataFactory&&(v.dataFactory=o),a.toRdf(g,v)}function d(g,v){return g.termType==="Literal"?c(g,v):g.value}function u(){return a.getSupportedRdfDatatypes()}function p(){return a.getSupportedJavaScriptPrimitives()}}(Or)),Or}var $s=s0();function Sf(i){if(i.term.termType!=="BlankNode")return{quantifier:"one",start:"subject",end:"object",predicates:[i.term]};const e=i.out([de.alternativePath]);if(e.ptrs.length===1&&e.ptrs[0].isList())return{quantifier:"one",start:"subject",end:"object",predicates:[...e.list()].map(o=>o.term)};const t=i.out([de.inversePath]);if(t.term)return{quantifier:"one",start:"object",end:"subject",predicates:[t.term]};const r=i.out([de.oneOrMorePath]);if(r.term)return{quantifier:"oneOrMore",start:"subject",end:"object",predicates:[r.term]};const n=i.out([de.zeroOrMorePath]);if(n.term)return{quantifier:"zeroOrMore",start:"subject",end:"object",predicates:[n.term]};const s=i.out([de.zeroOrOnePath]);if(s.term)return{quantifier:"zeroOrOne",start:"subject",end:"object",predicates:[s.term]}}function o0(i){return i.terms.length===0?null:i.ptrs[0].isList()?[...i.list()].map(e=>Sf(e)):[Sf(i)]}class a0{constructor(e){this.shape=e,this._compiled=Ci(()=>this.shape.validator.registry.compile(e))}get compiled(){return this._compiled()}async validate(e){return e.focusNode.dataset.size===0||(this.shape.isPropertyShape?await this.validateProperty(e):await this.validateNode(e)),e}async validateNode(e){const t=e.create({shape:this.shape,valueOrNode:e.value||e.focusNode});for(const r of this.compiled)r.node&&await r.node(t),r.generic&&await r.generic(t)}async validateProperty(e){let t;this.shape.isSparqlShape?t=e.focusNode:t=e.focusNode.executeAll(this.shape.path);const r=t.node(new wi(t.terms)),n=[...t].reduce((o,a)=>{const c=a.term,l=t.node([c]);return o.has(c)||o.set(c,{value:l,valuePaths:[]}),o.get(c).valuePaths.push(a),o},new An).values(),s=e.create({shape:this.shape,values:r});for(const o of this.compiled)o.property&&await o.property(s);for(const{value:o,valuePaths:a}of n){const c=e.create({shape:this.shape,value:o,valueOrNode:o,valuePaths:a});for(const l of this.compiled)l.generic&&await l.generic(c)}}}function ac(i){const e=new wi,r=new Io({dataset:i.dataset,terms:i.terms}).execute({quantifier:"zeroOrMore",start:"object",end:"subject",predicates:[Cy.subClassOf]});for(const n of r.ptrs)for(const{term:s}of n.nodes())e.add(s);return e}class l0{constructor(e){this.targetClass=new wi([...ac(e.hasOut([zr.type],[de.NodeShape])),...ac(e.out([de.targetClass]))]),this.targetNode=e.out([de.targetNode]).terms,this.targetObjectsOf=e.out([de.targetObjectsOf]).terms,this.targetSubjectsOf=e.out([de.targetSubjectsOf]).terms}resolve(e){const t=e.focusNode.node([null]),r=[...e.focusNode.hasOut([zr.type],this.targetClass).ptrs,...e.focusNode.node(this.targetNode).ptrs,...t.execute({start:"object",end:"object",predicates:this.targetObjectsOf}).ptrs,...t.execute({start:"subject",end:"subject",predicates:this.targetSubjectsOf}).ptrs],n=e.focusNode.clone({ptrs:r});return n.node([...new wi(n.terms)])}}class c0{constructor(e,{validator:t}){this.ptr=e,this.validator=t,this._deactivated=Ci(()=>{const r=this.ptr.out([de.deactivated]).term;return r&&$s.fromRdf(r)}),this._message=Ci(()=>this.ptr.out([de.message]).terms),this._path=Ci(()=>o0(this.ptr.out([de.path]))),this._severity=Ci(()=>this.ptr.out([de.severity]).term),this._shapeValidator=Ci(()=>new a0(this)),this._sparql=Ci(()=>this.ptr.out([de.sparql])),this._targetResolver=Ci(()=>new l0(this.ptr))}get deactivated(){return this._deactivated()}get isPropertyShape(){return!!this.path}get isSparqlShape(){return this.sparql.terms.length>0}get path(){return this._path()}get targetResolver(){return this._targetResolver()}get message(){return this._message()}get severity(){return this._severity()}get shapeValidator(){return this._shapeValidator()}get sparql(){return this._sparql()}resolveTargets(e){return this.targetResolver.resolve(e)}async validate(e){const t=e.id({shape:this});if(e.processed.has(t)){if(e.results.has(t))for(const r of e.results.get(t))e.report.results.push(r);return e}return e.processed.add(t),this.shapeValidator.validate(e)}}function d0(i){const e=parseInt(i.ptr.out([de.maxCount]).value);return{property:u0(e)}}function u0(i){return e=>{e.test(e.values.terms.length<=i,de.MaxCountConstraintComponent,{args:{maxCount:i},message:[e.factory.literal("More than {$maxCount} values")]})}}function h0(i){const e=parseInt(i.ptr.out([de.minCount]).value);return{property:f0(e)}}function f0(i){return e=>{e.test(e.values.terms.length>=i,de.MinCountConstraintComponent,{args:{minCount:i},message:[e.factory.literal("Less than {$minCount} values")]})}}async function p0(i,e){for(const t of i)if(!await e(t))return!1;return!0}async function m0(i,e){return(await Promise.all(i.map(t=>e(t)))).filter(Boolean)}async function Ko(i,e){return Promise.all(i.map(e))}async function g0(i,e){for(const t of i)if(await e(t))return!0;return!1}function b0(i){const e=[...i.ptr.out([de.and])].flatMap(t=>[...t.list()]).map(t=>i.validator.shape(t));return{generic:y0(e)}}function y0(i){return async e=>{const t=await Ko(i,async n=>(await n.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report),r=t.every(n=>n.conforms);e.test(r,de.AndConstraintComponent,{results:t.flatMap(n=>n.results),value:e.valueOrNode})}}function v0(i){const e=i.validator.shape(i.ptr.out([de.not]));return{generic:w0(e)}}function w0(i){return async e=>{const t=(await i.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report,r=!t.conforms;e.test(r,de.NotConstraintComponent,{args:{not:i.ptr.term},message:[e.factory.literal("Value does have shape {$not}")],results:t.results,value:e.valueOrNode})}}function _0(i){const e=[...i.ptr.out([de.or])].flatMap(t=>[...t.list()]).map(t=>i.validator.shape(t));return{generic:x0(e)}}function x0(i){return async e=>{let t=[],r;if(e.options.debug||e.options.details){const n=await Ko(i,async s=>(await s.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report);t=n.flatMap(s=>s.results),r=n.some(s=>s.conforms)}else r=await g0(i,async n=>(await n.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report.conforms);e.test(r,de.OrConstraintComponent,{results:t,value:e.valueOrNode})}}function E0(i){const e=[...i.ptr.out([de.xone])].flatMap(t=>[...t.list()]).map(t=>i.validator.shape(t));return{generic:S0(e)}}function S0(i){return async e=>{const t=await Ko(i,async n=>(await n.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report),r=t.filter(n=>n.conforms).length===1;e.test(r,de.XoneConstraintComponent,{results:t.flatMap(n=>n.results),value:e.valueOrNode})}}function k0(i){if(!$s.fromRdf(i.ptr.out([de.closed]).term))return null;const t=i.ptr.out([de.property]).map(s=>i.validator.shape(s)),r=new wi(t.filter(s=>!s.deactivated).map(s=>s.path[0].predicates[0])),n=new wi([...i.ptr.out([de.ignoredProperties]).list()||[]].map(s=>s.term));return{node:R0(r,n)}}function R0(i,e){return t=>{const r=t.focusNode.execute({start:"subject",end:"predicate"}).filter(n=>e.has(n.term)?!1:!i.has(n.term));if(r.ptrs.length>0)for(const n of r)t.violation(de.ClosedConstraintComponent,{message:[t.factory.literal("Predicate is not allowed (closed shape)")],path:[{quantifier:"one",start:"subject",end:"object",predicates:[n.term]}],value:t.focusNode.node([[...n.quads()][0].object])});else t.debug(de.ClosedConstraintComponent)}}function I0(i){const e=i.ptr.out([de.hasValue]).term;return{node:T0(e),property:C0(e)}}function T0(i){return e=>{e.test(i.equals(e.valueOrNode.term),de.HasValueConstraintComponent,{args:{hasValue:i},message:[e.factory.literal("Value must be {$hasValue}")]})}}function C0(i){return e=>{const t=[...e.values].some(r=>i.equals(r.term));e.test(t,de.HasValueConstraintComponent,{args:{hasValue:i},message:[e.factory.literal("Missing expected value {$hasValue}")]})}}function $0(i){const e=new wi([...i.ptr.out([de.in]).list()].map(t=>t.term));return{generic:A0(e)}}function A0(i){return e=>{e.test(i.has(e.valueOrNode.term),de.InConstraintComponent,{args:{in:[...i].map(t=>t.value).join(", ")},message:[e.factory.literal("Value is not in {$in}")],value:e.valueOrNode})}}function Nn(i,e){if(!i||i.termType!=="Literal"||!e||e.termType!=="Literal"||kf(i)!==kf(e))return null;const t=$s.fromRdf(i),r=$s.fromRdf(e);return typeof t!=typeof r?null:typeof t=="string"?t.localeCompare(r):t-r}function kf(i){const e=/^.*(((\+|-)\d{2}:\d{2})|Z)$/;return od.dateTime.equals(i.datatype)&&e.test(i.value)}function N0(i){const e=i.ptr.out([de.disjoint]).term;return{generic:D0(e)}}function D0(i){return e=>{const t=e.focusNode.dataset.match(e.focusNode.term,i,e.valueOrNode.term);e.test(t.size===0,de.DisjointConstraintComponent,{args:{disjoint:i},message:[e.factory.literal("Value node must not also be one of the values of {$disjoint}")],value:e.valueOrNode})}}function L0(i){const e=i.ptr.out([de.equals]).term;return{node:O0(e),property:P0(e)}}function O0(i){return e=>{const t=e.focusNode.out([i]),r=t.filter(s=>!s.term.equals(e.focusNode.term)),n=t.terms.length!==0&&r.terms.length===0;e.test(n,de.EqualsConstraintComponent,{args:{equals:i},message:[e.factory.literal("Must have same values as {$equals}")],value:r.terms[0]&&e.focusNode.node([r.terms[0]])||e.focusNode})}}function P0(i){return e=>{const t=new wi(e.focusNode.out([i]).terms),r=new wi(e.values.terms),n=[...r].filter(a=>!t.has(a)),s=[...t].filter(a=>!r.has(a)),o=[...n,...s];for(const a of o)e.violation(de.EqualsConstraintComponent,{args:{equals:i},message:[e.factory.literal("Must have same values as {$equals}")],value:e.focusNode.node([a])});o.length===0&&e.debug(de.EqualsConstraintComponent,{args:{equals:i},message:[e.factory.literal("Must have same values as {$equals}")]})}}function M0(i){const e=i.ptr.out([de.lessThan]).term;return{property:F0(e)}}function F0(i){return e=>{const t=e.focusNode.out([i]).terms;for(const r of e.values)for(const n of t){const s=Nn(r.term,n);s===null||s>=0?e.violation(de.LessThanConstraintComponent,{args:{lessThan:i},message:[e.factory.literal("Value is not less than value of {$lessThan}")],value:r}):e.debug(de.LessThanConstraintComponent,{args:{lessThan:i},message:[e.factory.literal("Value is not less than value of {$lessThan}")],value:r})}}}function j0(i){const e=i.ptr.out([de.lessThanOrEquals]).term;return{property:B0(e)}}function B0(i){return e=>{const t=e.focusNode.out([i]).terms;for(const r of e.values)for(const n of t){const s=Nn(r.term,n);s===null||s>0?e.violation(de.LessThanOrEqualsConstraintComponent,{args:{lessThanOrEquals:i},message:[e.factory.literal("Value is not less than or equal to value of {$lessThanOrEquals}")],value:r}):e.debug(de.LessThanOrEqualsConstraintComponent,{args:{lessThanOrEquals:i},message:[e.factory.literal("Value is not less than or equal to value of {$lessThanOrEquals}")],value:r})}}}function q0(i){const e=i.ptr.out([de.maxExclusive]).term;return{generic:U0(e)}}function U0(i){return e=>{const t=Nn(e.valueOrNode.term,i);e.test(t!==null&&t<0,de.MaxExclusiveConstraintComponent,{args:{maxExclusive:i},message:[e.factory.literal("Value is not less than {$maxExclusive}")],value:e.valueOrNode})}}function V0(i){const e=i.ptr.out([de.maxInclusive]).term;return{generic:z0(e)}}function z0(i){return e=>{const t=Nn(e.valueOrNode.term,i);e.test(t!==null&&t<=0,de.MaxInclusiveConstraintComponent,{args:{maxInclusive:i},message:[e.factory.literal("Value is not less than or equal to {$maxInclusive}")],value:e.valueOrNode})}}function H0(i){const e=i.ptr.out([de.minExclusive]).term;return{generic:W0(e)}}function W0(i){return e=>{const t=Nn(e.valueOrNode.term,i);e.test(t!==null&&t>0,de.MinExclusiveConstraintComponent,{args:{minExclusive:i},message:[e.factory.literal("Value is not greater than {$minExclusive}")],value:e.valueOrNode})}}function G0(i){const e=i.ptr.out([de.minInclusive]).term;return{generic:K0(e)}}function K0(i){return e=>{const t=Nn(e.valueOrNode.term,i);e.test(t!==null&&t>=0,de.MinInclusiveConstraintComponent,{args:{minInclusive:i},message:[e.factory.literal("Value is not greater than or equal to {$minInclusive}")],value:e.valueOrNode})}}function X0(i){const e=[...i.ptr.out([de.node])].map(t=>i.validator.shape(t));return{generic:J0(e)}}function J0(i){return async e=>{for(const t of i){const r=await t.validate(e.create({child:!0,focusNode:e.valueOrNode}));e.test(r.report.conforms,de.NodeConstraintComponent,{args:{node:t.ptr.term},message:[e.factory.literal("Value does not have shape {$node}")],results:r.report.results,value:e.valueOrNode})}}}function Q0(i){const e=[...i.ptr.out([de.property])].map(t=>i.validator.shape(t));return{generic:Y0(e)}}function Y0(i){return async e=>{const t=e.create({focusNode:e.valueOrNode});for(const r of i)await r.validate(t)}}function Z0(i){const e=i.validator.shape(i.ptr.out([de.qualifiedValueShape])),t=i.ptr.out([de.qualifiedValueShapesDisjoint]).term,r=t?$s.fromRdf(t):!1,n=i.ptr.out([de.qualifiedMaxCount]).term,s=n?parseInt(n.value):null,o=i.ptr.out([de.qualifiedMinCount]).term,a=o?parseInt(o.value):null;return{property:ev(e,r,s,a)}}function ev(i,e,t,r){return async n=>{const s=[];let o=[];e&&(o=new Set(n.shape.ptr.in([de.property]).out([de.property]).out([de.qualifiedValueShape]).filter(c=>!c.term.equals(i.ptr.term)).map(c=>n.shape.validator.shape(c))));const a=(await m0(n.values,async c=>{const l=(await i.validate(n.create({child:!0,focusNode:c}))).report;if(s.push(l.results),!l.conforms)return!1;if(o.length===0)return!0;if(n.options.debug||n.options.details){const d=await Ko([...o],async u=>(await u.validate(n.create({child:!0,focusNode:c}))).report);return s.push(d.flatMap(u=>u.results)),!d.every(u=>u.conforms)}else return!await p0([...o],async d=>(await d.validate(n.create({child:!0,focusNode:c}))).report.conforms)})).length;t!==null&&n.test(a<=t,de.QualifiedMaxCountConstraintComponent,{args:{qualifiedMaxCount:t,qualifiedValueShape:i.ptr.term,qualifiedValueShapesDisjoint:e},message:[n.factory.literal("More than {$qualifiedMaxCount} values have shape {$qualifiedValueShape}")],results:s.flat()}),r!==null&&n.test(a>=r,de.QualifiedMinCountConstraintComponent,{args:{qualifiedMinCount:r,qualifiedValueShape:i.ptr.term,qualifiedValueShapesDisjoint:e},message:[n.factory.literal("Less than {$qualifiedMinCount} values have shape {$qualifiedValueShape}")],results:s.flat()})}}function tv(i,e){return e?e.slice(0,i.length)===i:!1}function iv(i){const e=[...new Set([...i.ptr.out([de.languageIn]).list()].map(t=>t.value))];return{generic:rv(e)}}function rv(i){return e=>{const t=i.some(r=>tv(r,e.valueOrNode.term.language));e.test(t,de.LanguageInConstraintComponent,{args:{languageIn:i.join(", ")},message:[e.factory.literal("Language does not match any of {$languageIn}")],value:e.valueOrNode})}}function nv(i){const e=parseInt(i.ptr.out([de.maxLength]).value);return{generic:sv(e)}}function sv(i){return e=>{const t=e.valueOrNode.term.termType!=="BlankNode"&&e.valueOrNode.value.length<=i;e.test(t,de.MaxLengthConstraintComponent,{args:{maxLength:i},message:[e.factory.literal("Value has more than {$maxLength} characters")],value:e.valueOrNode})}}function ov(i){const e=parseInt(i.ptr.out([de.minLength]).value);return{generic:av(e)}}function av(i){return e=>{const t=e.valueOrNode.term.termType!=="BlankNode"&&e.valueOrNode.value.length>=i;e.test(t,de.MinLengthConstraintComponent,{args:{minLength:i},message:[e.factory.literal("Value has less than {$minLength} characters")],value:e.valueOrNode})}}function lv(i){const e=i.ptr.out([de.pattern]).value,t=i.ptr.out([de.flags]).value,r=new RegExp(e,t);return{generic:cv(e,t,r)}}function cv(i,e,t){return r=>{r.test(t.test(r.valueOrNode.term.value),de.PatternConstraintComponent,{args:{flags:e,pattern:i},message:[r.factory.literal('Value does not match pattern "{$pattern}"')],value:r.valueOrNode})}}function dv(i){const e=i.ptr.out([de.uniqueLang]).term;return e.value==="true"&&od.boolean.equals(e.datatype)?{property:uv()}:null}function uv(){return i=>{const t=Object.entries(i.values.terms.reduce((r,n)=>(n.language&&(r[n.language]=(r[n.language]||0)+1),r),{})).filter(([,r])=>r>1);for(const[r]of t)i.violation(de.UniqueLangConstraintComponent,{args:{lang:r},message:[i.factory.literal('Language "{?lang}" used more than once')]});t.length===0&&i.debug(de.UniqueLangConstraintComponent)}}const vo=Si("http://www.w3.org/ns/shacl#"),Vp=Si("https://schemas.link/shacl-next#");class _n{constructor({results:e=[]}={}){this.results=e}get conforms(){return!this.results.some(e=>e.severity.equals(vo.Info)||e.severity.equals(vo.Violation)||e.severity.equals(vo.Warning))}}function hv(i,e){return Object.entries(e).reduce((t,[r,n])=>(n&&n.termType&&(n=ci(n)),t.replace(`{$${r}}`,n).replace(`{?${r}}`,n)),i)}class To{constructor({args:e={},factory:t,message:r=[],severity:n=vo.Violation}={}){this.severity=n,this.message=r.map(s=>t.literal(hv(s.value,e),s.language||null))}}class ld{constructor({factory:e=sd}={}){this.factory=e}clone({factory:e}={}){return new ld({factory:e||this.factory})}validate(){return new _n}validateSimple(){return!0}}class Dn extends ld{constructor({datatypes:e,factory:t}={}){super({factory:t}),this.datatypes=[];for(const r of Array.isArray(e)?e:[e])r&&this.datatypes.push(this.factory.fromTerm(r))}clone({factory:e}={}){return new Dn({datatypes:this.datatypes,factory:e||this.factory})}}class fv{constructor({factory:e=sd,validations:t}={}){if(this.factory=e,this.validations=new An,t)for(const r of Object.values(t)){const n=r.clone({factory:this.factory});for(const s of n.datatypes)this.validations.set(s,n)}}validate(e){const t=this.validations.get(e.datatype);return t?t.validate(e):new _n}validateSimple(e){const t=this.validations.get(e.datatype);return t?t.validateSimple(e):!0}}class lt extends Dn{constructor(e,t,{factory:r}={}){super({datatypes:t,factory:r}),this.message=[this.factory.literal("term value {$this} matches pattern {$pattern}")],this.patterns=Array.isArray(e)?e:[e]}clone({factory:e}={}){return new lt(this.patterns,this.datatypes,{factory:e||this.factory})}validate(e){const t=this.patterns.map(r=>{let n;r.test(e.value)&&(n=Vp.Debug);const s={pattern:this.factory.literal(r.toString()),this:e};return new To({args:s,factory:this.factory,message:this.message,severity:n})});return new _n({results:t})}validateSimple(e){return this.patterns.every(t=>t.test(e.value))}}const pv=/^([-+]?[0-9]+)$/;class Qt extends lt{constructor(e=null,t=null,r,{factory:n}={}){super(pv,r,{factory:n}),this.maxInclusive=null,this.minInclusive=null,typeof t=="string"&&(this.maxInclusive=BigInt(t)),typeof e=="string"&&(this.minInclusive=BigInt(e))}clone({factory:e}={}){return new Qt(this.minInclusive?.toString(),this.maxInclusive?.toString(),this.datatypes,{factory:e||this.factory})}validate(e){const t=super.validate(e).results;if(!Vp.Debug.equals(t[0].severity))return new _n({results:t});const r=BigInt(e.value);if(this.minInclusive!==null&&r<this.minInclusive){const n=`term value "${e.value}" is less than "${this.minInclusive.toString()}"`,s=[this.factory.literal(n)];t.push(new To({factory:this.factory,message:s}))}if(this.maxInclusive!==null&&r>this.maxInclusive){const n=`term value "${e.value}" is greater than "${this.maxInclusive.toString()}"`,s=[this.factory.literal(n)];t.push(new To({factory:this.factory,message:s}))}return new _n({results:t})}validateSimple(e){if(!super.validateSimple(e))return!1;const t=BigInt(e.value);return!(this.minInclusive!==null&&t<this.minInclusive||this.maxInclusive!==null&&t>this.maxInclusive)}}class cd extends Dn{constructor(e,t,{factory:r}={}){super({datatypes:t,factory:r}),this.values=new Set(e)}clone({factory:e}={}){return new cd(this.values,this.datatypes,{factory:e||this.factory})}validate(e){const t=[];if(!this.values.has(e.value)){const r=`term value "${e.value}" is not included in the list: ${[...this.values].join(",")}`,n=[this.factory.literal(r)];t.push(new To({factory:this.factory,message:n}))}return new _n({results:t})}validateSimple(e){return this.values.has(e.value)}}const We={xsd:Si("http://www.w3.org/2001/XMLSchema#")},mv=new Dn({datatypes:We.xsd.anySimpleType}),gv=new Dn({datatypes:We.xsd.anyAtomicType}),Xo=/^([^\ud8ff-\udfff\ufffe-\uffff]*)$/,bv=/^((\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+))$/,zp=/^((\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+)([Ee](\+|-)?[0-9]+)?|(\+|-)?INF|NaN)$/,dd=/^(-?P((([0-9]+Y([0-9]+M)?([0-9]+D)?|([0-9]+M)([0-9]+D)?|([0-9]+D))(T(([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)?|([0-9]+M)([0-9]+(\.[0-9]+)?S)?|([0-9]+(\.[0-9]+)?S)))?)|(T(([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)?|([0-9]+M)([0-9]+(\.[0-9]+)?S)?|([0-9]+(\.[0-9]+)?S)))))$/,Hp=/^(-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,yv=/^((([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,vv=/^(-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,wv=/^(-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,_v=/^(-?([1-9][0-9]{3,}|0[0-9]{3})(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,xv=/^(--(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,Ev=/^(---(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,Sv=/^(--(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,kv=/^(([0-9a-fA-F]{2})*)$/,Rv=/^(((([A-Za-z0-9+/] ?){4})*(([A-Za-z0-9+/] ?){3}[A-Za-z0-9+/]|([A-Za-z0-9+/] ?){2}[AEIMQUYcgkosw048] ?=|[A-Za-z0-9+/] ?[AQgw] ?= ?=))?)$/,Iv=new lt(Xo,We.xsd.string),Tv=new cd(["1","true","0","false"],We.xsd.boolean),Cv=new lt(bv,We.xsd.decimal),$v=new lt(zp,We.xsd.float),Av=new lt(zp,We.xsd.double),Nv=new lt(dd,We.xsd.duration),Dv=new lt(Hp,We.xsd.dateTime),Lv=new lt(yv,We.xsd.time),Ov=new lt(vv,We.xsd.date),Pv=new lt(wv,We.xsd.gYearMonth),Mv=new lt(_v,We.xsd.gYear),Fv=new lt(xv,We.xsd.gMonthDay),jv=new lt(Ev,We.xsd.gDay),Bv=new lt(Sv,We.xsd.gMonth),qv=new lt(kv,We.xsd.hexBinary),Uv=new lt(Rv,We.xsd.base64Binary),Vv=new lt(Xo,We.xsd.anyURI),Wp=/^([^\u000d\u000a\u0009]*)$/,zv=/^([^ ]+( [^ ]+)*)*$/,Hv=/^([a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*)$/,Wv=/^([^DT]*)$/,Gv=/^([^YM]*[DT].*)$/,Kv=/^(.*(Z|(\+|-)[0-9][0-9]:[0-9][0-9]))$/,Xv=new lt([Xo,Wp],We.xsd.normalizedString),Jv=new lt([Xo,Wp,zv],We.xsd.token),Qv=new lt(Hv,We.xsd.language),Yv=new Qt(null,null,We.xsd.integer),Zv=new Qt(null,"0",We.xsd.nonPositiveInteger),ew=new Qt(null,"-1",We.xsd.negativeInteger),tw=new Qt("-9223372036854775808","9223372036854775807",We.xsd.long),iw=new Qt("-2147483648","2147483647",We.xsd.int),rw=new Qt("-32768","32767",We.xsd.short),nw=new Qt("-128","127",We.xsd.byte),sw=new Qt("0",null,We.xsd.nonNegativeInteger),ow=new Qt("0","18446744073709551615",We.xsd.unsignedLong),aw=new Qt("0","4294967295",We.xsd.unsignedInt),lw=new Qt("0","65535",We.xsd.unsignedShort),cw=new Qt("0","255",We.xsd.unsignedByte),dw=new Qt("1",null,We.xsd.positiveInteger),uw=new lt([dd,Wv],We.xsd.yearMonthDuration),hw=new lt([dd,Gv],We.xsd.dayTimeDuration),fw=new lt([Hp,Kv],We.xsd.dateTimeStamp),pw=Object.freeze(Object.defineProperty({__proto__:null,anyAtomicType:gv,anySimpleType:mv,anyURI:Vv,base64Binary:Uv,boolean:Tv,byte:nw,date:Ov,dateTime:Dv,dateTimeStamp:fw,dayTimeDuration:hw,decimal:Cv,double:Av,duration:Nv,float:$v,gDay:jv,gMonth:Bv,gMonthDay:Fv,gYear:Mv,gYearMonth:Pv,hexBinary:qv,int:iw,integer:Yv,language:Qv,long:tw,negativeInteger:ew,nonNegativeInteger:sw,nonPositiveInteger:Zv,normalizedString:Xv,positiveInteger:dw,short:rw,string:Iv,time:Lv,token:Jv,unsignedByte:cw,unsignedInt:aw,unsignedLong:ow,unsignedShort:lw,yearMonthDuration:uw},Symbol.toStringTag,{value:"Module"}));class mw extends fv{constructor({factory:e}={}){super({factory:e,validations:{...pw}})}}const gw=new An([[de.BlankNode,new Set(["BlankNode"])],[de.BlankNodeOrIRI,new Set(["BlankNode","NamedNode"])],[de.BlankNodeOrLiteral,new Set(["BlankNode","Literal"])],[de.IRI,new Set(["NamedNode"])],[de.IRIOrLiteral,new Set(["NamedNode","Literal"])],[de.Literal,new Set(["Literal"])]]);function bw(i){const e=i.ptr.out([de.class]).map(t=>ac(t));return{generic:yw(e)}}function yw(i){return e=>{const t=new wi(e.valueOrNode.out([zr.type]).terms);for(const r of i){const n=[...t].some(s=>r.has(s));e.test(n,de.ClassConstraintComponent,{value:e.valueOrNode})}}}function vw(i){const e=i.ptr.out([de.datatype]).term,t=new mw;return{generic:ww(e,t)}}function ww(i,e){return t=>{const r=i.equals(t.valueOrNode.term.datatype)&&e.validateSimple(t.valueOrNode.term);t.test(r,de.DatatypeConstraintComponent,{args:{datatype:i},message:[t.factory.literal("Value does not have datatype {$datatype}")],value:t.valueOrNode})}}function _w(i){const e=i.ptr.out([de.nodeKind]).term,t=gw.get(e);return{generic:xw(e,t)}}function xw(i,e){return t=>{t.test(e.has(t.valueOrNode.term.termType),de.NodeKindConstraintComponent,{args:{nodeKind:i},message:[t.factory.literal("Value does not have node kind {$nodeKind}")],value:t.valueOrNode})}}const Ew=new An([[de.maxCount,d0],[de.minCount,h0],[de.and,b0],[de.not,v0],[de.or,_0],[de.xone,E0],[de.closed,k0],[de.hasValue,I0],[de.in,$0],[de.disjoint,N0],[de.equals,L0],[de.lessThan,M0],[de.lessThanOrEquals,j0],[de.maxExclusive,q0],[de.maxInclusive,V0],[de.minExclusive,H0],[de.minInclusive,G0],[de.node,X0],[de.property,Q0],[de.qualifiedValueShape,Z0],[de.languageIn,iv],[de.maxLength,nv],[de.minLength,ov],[de.pattern,lv],[de.uniqueLang,dv],[de.class,bw],[de.datatype,vw],[de.nodeKind,_w]]);class Sw{constructor(e,{factory:t,...r}){if(this.factory=t,this.options=r,this.registry=new Yy(Ew),this.shapesPtr=new Io({dataset:e,factory:t}),this.shapes=new An,this.options.coverage&&(this.options.debug=!0,this.options.details=!0,this.options.trace=!0),this.options.validations)for(const[s,o]of this.options.validations)this.registry.validations.set(s,o);const n=[...this.shapesPtr.hasOut([de.targetClass]),...this.shapesPtr.hasOut([de.targetNode]),...this.shapesPtr.hasOut([de.targetObjectsOf]),...this.shapesPtr.hasOut([de.targetSubjectsOf]),...this.shapesPtr.hasOut([zr.type],[de.NodeShape]),...this.shapesPtr.hasOut([zr.type],[de.PropertyShape])];for(const s of n)this.shape(s)}shape(e){if(!e.term)return null;let t=this.shapes.get(e.term);return t||(t=new c0(e,{validator:this}),this.shapes.set(e.term,t)),t}async validate(e,t){const r=new Io({...e,factory:this.factory}),n=new ad({factory:this.factory,focusNode:r,options:this.options,validator:this});t?t=t.map(s=>this.shape(this.shapesPtr.node(s.terms))):t=this.shapes.values();for(const s of t){const o=n.create({shape:s});let a;r.isAny()?a=s.resolveTargets(o):a=r;for(const c of a)await s.validate(o.create({focusNode:c}))}return n.report}}let kw=class extends HTMLElement{constructor(e){super(),this.shape=null,this.attachShadow({mode:"open"}),this.form=document.createElement("form"),this.config=new qh(e,this.form),this.form.addEventListener("change",t=>{t.stopPropagation(),this.config.editMode&&this.validate(!0).then(r=>{this.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1,composed:!0,detail:{valid:r.conforms,report:r}}))}).catch(r=>{console.warn(r)})})}static get observedAttributes(){return qh.dataAttributes()}connectedCallback(){this.shadowRoot.prepend(this.form)}attributeChangedCallback(){this.config.updateAttributes(this),this.initialize()}initialize(){clearTimeout(this.initDebounceTimeout),this.initDebounceTimeout=setTimeout(async()=>{this.form.replaceChildren(document.createTextNode(this.config.attributes.loading));try{await this.config.loader.loadGraphs(),this.form.replaceChildren(),this.config.renderedNodes.clear();const e=this.findRootShaclShapeSubject();if(e){this.form.classList.forEach(r=>{this.form.classList.remove(r)}),this.form.classList.toggle("mode-edit",this.config.editMode),this.form.classList.toggle("mode-view",!this.config.editMode),this.config.theme.apply(this.form);const t=[this.config.theme.stylesheet];for(const r of Eg())r.stylesheet&&t.push(r.stylesheet);if(this.shadowRoot.adoptedStyleSheets=t,this.shape=new yr(e,this.config,this.config.attributes.valuesSubject?He.namedNode(this.config.attributes.valuesSubject):void 0),this.form.appendChild(this.shape),this.config.editMode){if(this.config.attributes.submitButton!==null){const r=this.config.theme.createButton(this.config.attributes.submitButton||"Submit",!0);r.addEventListener("click",n=>{n.preventDefault(),this.form.reportValidity()&&this.validate().then(s=>{if(s?.conforms)this.dispatchEvent(new Event("submit",{bubbles:!0,cancelable:!0}));else{let o=this.form.querySelector(":scope .invalid > .editor");o?o.focus():this.form.querySelector(":scope .invalid")?.scrollIntoView()}})}),this.form.appendChild(r)}this.config.attributes.valuesSubject&&this.removeFromDataGraph(He.namedNode(this.config.attributes.valuesSubject)),await this.validate(!0)}}else if(this.config.store.countQuads(null,null,null,xo)>0)throw new Error("shacl root node shape not found")}catch(e){console.error(e);const t=document.createElement("div");t.innerText=String(e),this.form.replaceChildren(t)}},200)}serialize(e="text/turtle",t=this.toRDF()){const r=t.getQuads(null,null,null,null);return vg(r,e,this.config.prefixes)}toRDF(e=new jt){return this.shape?.toRDF(e),e}registerPlugin(e){xg(e),this.initialize()}setTheme(e){this.config.theme=e,this.initialize()}setSharedShapesGraph(e){fy(e),this.initialize()}setClassInstanceProvider(e){this.config.classInstanceProvider=e,this.initialize()}async validate(e=!1){for(const t of this.form.querySelectorAll(":scope .validation-error"))t.remove();for(const t of this.form.querySelectorAll(":scope .property-instance"))t.classList.remove("invalid"),t.querySelector(":scope > .editor")?.value?t.classList.add("valid"):t.classList.remove("valid");this.config.store.deleteGraph(this.config.valuesGraphId||""),this.shape?.toRDF(this.config.store),this.shape&&this.config.store.add(new Fo(this.shape.shaclSubject,He.namedNode(Oe+"targetNode"),this.shape.nodeId,this.config.valuesGraphId));try{const t=this.config.store,r=await new Sw(t,{details:!0,factory:He}).validate({dataset:t});for(const n of r.results)if(n.focusNode?.ptrs?.length)for(const s of n.focusNode.ptrs){const o=s._term;if(n.path?.length){const a=n.path[0].predicates[0];let c=this.form.querySelectorAll(`
370
370
  :scope shacl-node[data-node-id='${o.id}'] > shacl-property > .property-instance[data-path='${a.id}'] > .editor,
371
371
  :scope shacl-node[data-node-id='${o.id}'] > shacl-property > .shacl-group > .property-instance[data-path='${a.id}'] > .editor,
372
372
  :scope shacl-node[data-node-id='${o.id}'] > .shacl-group > shacl-property > .property-instance[data-path='${a.id}'] > .editor,
373
373
  :scope shacl-node[data-node-id='${o.id}'] > .shacl-group > shacl-property > .shacl-group > .property-instance[data-path='${a.id}'] > .editor`);c.length===0&&(c=this.form.querySelectorAll(`
374
374
  :scope [data-node-id='${o.id}'] > shacl-property > .property-instance[data-path='${a.id}'],
375
375
  :scope [data-node-id='${o.id}'] > shacl-property > .shacl-group > .property-instance[data-path='${a.id}']`));for(const l of c)if(l.classList.contains("editor")){if(!e||l.value){let d=l.parentElement;d.classList.add("invalid"),d.classList.remove("valid"),d.appendChild(this.createValidationErrorDisplay(n));do d instanceof di&&(d.open=!0),d=d.parentElement;while(d)}}else e||(l.classList.add("invalid"),l.classList.remove("valid"),l.appendChild(this.createValidationErrorDisplay(n,"node")))}else e||this.form.querySelector(`:scope [data-node-id='${o.id}']`)?.prepend(this.createValidationErrorDisplay(n,"node"))}return r}catch(t){return console.error(t),!1}}createValidationErrorDisplay(e,t){const r=document.createElement("span");if(r.classList.add("validation-error"),t&&r.classList.add(t),e)if(e.message?.length>0)for(const n of e.message)r.title+=n.value+`
376
- `;else r.title=e.sourceConstraintComponent?.value;return r}findRootShaclShapeSubject(){let e=null;if(this.config.attributes.shapeSubject){if(e=He.namedNode(this.config.attributes.shapeSubject),this.config.store.getQuads(e,qt,no,null).length===0){console.warn(`shapes graph does not contain requested root shape ${this.config.attributes.shapeSubject}`);return}}else if(this.config.attributes.valuesSubject&&this.config.store.countQuads(null,null,null,Fi)>0){const t=He.namedNode(this.config.attributes.valuesSubject),r=[...this.config.store.getQuads(t,qt,null,Fi),...this.config.store.getQuads(t,Yl,null,Fi)];if(r.length===0){console.warn(`value subject '${this.config.attributes.valuesSubject}' has neither ${qt.id} nor ${Yl.id} statement`);return}for(const n of r)if(this.config.store.getQuads(n.object,qt,no,null).length>0){e=n.object;break}if(!e){const n=this.config.store.getQuads(null,Is,r[0].object,null);if(n.length===0){console.error(`value subject '${this.config.attributes.valuesSubject}' has no shacl shape definition in the shapes graph`);return}if(n.length>1&&console.warn(`value subject '${this.config.attributes.valuesSubject}' has multiple shacl shape definitions in the shapes graph, choosing the first found (${n[0].subject})`),this.config.store.getQuads(n[0].subject,qt,no,null).length===0){console.error(`value subject '${this.config.attributes.valuesSubject}' references a shape which is not a NodeShape (${n[0].subject})`);return}e=n[0].subject}}else{const t=this.config.store.getQuads(null,qt,no,null);if(t.length==0){console.warn("shapes graph does not contain any root shapes");return}t.length>1&&(console.warn("shapes graph contains",t.length,"root shapes. choosing first found which is",t[0].subject.value),console.info('hint: set the shape to use with attribute "data-shape-subject"')),e=t[0].subject}return e}removeFromDataGraph(e){this.config.attributes.valuesSubject;for(const t of this.config.store.getQuads(e,null,null,Fi))this.config.store.delete(t),(t.object.termType==="NamedNode"||t.object.termType==="BlankNode")&&this.removeFromDataGraph(t.object)}};function Rf(i){return i!==null&&typeof i=="object"&&"constructor"in i&&i.constructor===Object}function ud(i={},e={}){const t=["__proto__","constructor","prototype"];Object.keys(e).filter(r=>t.indexOf(r)<0).forEach(r=>{typeof i[r]>"u"?i[r]=e[r]:Rf(e[r])&&Rf(i[r])&&Object.keys(e[r]).length>0&&ud(i[r],e[r])})}const Gp={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function ii(){const i=typeof document<"u"?document:{};return ud(i,Gp),i}const Iw={document:Gp,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(i){return typeof setTimeout>"u"?(i(),null):setTimeout(i,0)},cancelAnimationFrame(i){typeof setTimeout>"u"||clearTimeout(i)}};function Er(){const i=typeof window<"u"?window:{};return ud(i,Iw),i}const Tw=i=>i?.nodeName.toLowerCase()??"",Us=(i,e)=>i?.nodeName.toLowerCase()===e.toLowerCase(),vt=i=>typeof i=="function",wt=i=>typeof i=="string",Jo=i=>typeof i=="number",Cw=i=>typeof i=="boolean",gt=i=>typeof i>"u",hd=i=>i===null,fd=i=>typeof Window<"u"&&i instanceof Window,pd=i=>typeof Document<"u"&&i instanceof Document,tr=i=>typeof Element<"u"&&i instanceof Element,$w=i=>typeof Node<"u"&&i instanceof Node,un=i=>!vt(i)&&!fd(i)&&Jo(i.length),Yi=i=>typeof i=="object"&&i!==null,Co=i=>pd(i)?i.documentElement:i,Qo=i=>i.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),Kp=i=>i&&i.replace(/^./,i[0].toLowerCase()).replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),Xp=()=>!1,dt=(i,e)=>{for(let t=0;t<i.length;t+=1)if(e.call(i[t],i[t],t)===!1)return i;return i},zt=(i,e)=>{const t=Object.keys(i);for(let r=0;r<t.length;r+=1){const n=t[r];if(e.call(i[n],n,i[n])===!1)return i}return i};class Bt{constructor(e){return this.length=0,e?(dt(e,(t,r)=>{this[r]=t}),this.length=e.length,this):this}}const $o=(i=ii())=>/complete|interactive/.test(i.readyState),Yo=i=>ii().createElement(i),md=(i,e)=>i.appendChild(e),gd=i=>i.parentNode?i.parentNode.removeChild(i):i,Jp=(i,e)=>{const t=Yo(e);return t.innerHTML=i,[].slice.call(t.childNodes)},Aw=()=>{const i=function(e){if(!e)return new Bt;if(e instanceof Bt)return e;if(vt(e)){const t=ii();return $o(t)?e.call(t,i):t.addEventListener("DOMContentLoaded",()=>e.call(t,i),{once:!0}),new Bt([t])}if(wt(e)){const t=e.trim();if(t.startsWith("<")&&t.endsWith(">")){let n="div";return zt({li:"ul",tr:"tbody",td:"tr",th:"tr",tbody:"table",option:"select"},(o,a)=>{if(t.startsWith(`<${o}`))return n=a,!1}),new Bt(Jp(t,n))}const r=ii();return new Bt(r.querySelectorAll(e))}return un(e)&&!$w(e)?new Bt(e):new Bt([e])};return i.fn=Bt.prototype,i},oe=Aw(),bd=(i,e)=>(dt(e,t=>{i.push(t)}),i),Vs=i=>[...new Set(i)];oe.fn.get=function(i){return i===void 0?[].slice.call(this):this[i>=0?i:i+this.length]};oe.fn.add=function(i){return new Bt(Vs(bd(this.get(),oe(i).get())))};const Qp=(i,e,t)=>{const r=i.getAttribute(e);return hd(r)?t:r},Yp=(i,e)=>{i.removeAttribute(e)},Zp=(i,e,t)=>{hd(t)?Yp(i,e):i.setAttribute(e,t)};oe.fn.each=function(i){return dt(this,(e,t)=>i.call(e,t,e))};dt(["add","remove","toggle"],i=>{oe.fn[`${i}Class`]=function(e){return i==="remove"&&!arguments.length?this.each((t,r)=>{Zp(r,"class","")}):this.each((t,r)=>{if(!tr(r))return;const n=(vt(e)?e.call(r,t,Qp(r,"class","")):e).split(" ").filter(s=>s);dt(n,s=>{r.classList[i](s)})})}});dt(["insertBefore","insertAfter"],(i,e)=>{oe.fn[i]=function(t){const r=e?oe(this.get().reverse()):this,n=oe(t),s=[];return n.each((o,a)=>{a.parentNode&&r.each((c,l)=>{const d=o?l.cloneNode(!0):l,u=e?a.nextSibling:a;s.push(d),a.parentNode.insertBefore(d,u)})}),oe(e?s.reverse():s)}});const Nw=i=>wt(i)&&!(i.startsWith("<")&&i.endsWith(">"));dt(["before","after"],(i,e)=>{oe.fn[i]=function(...t){return e===1&&(t=t.reverse()),this.each((r,n)=>{const s=vt(t[0])?[t[0].call(n,r,n.innerHTML)]:t;dt(s,o=>{let a;Nw(o)?a=oe(Jp(o,"div")):r&&tr(o)?a=oe(o.cloneNode(!0)):a=oe(o),a[e?"insertAfter":"insertBefore"](n)})})}});function em(i,e){return un(i)?dt(i,(t,r)=>e.call(t,r,t)):zt(i,e)}function ws(i,e){const t=Er();let r;const n=[];return em(i,(s,o)=>{r=e.call(t,o,s),r!=null&&n.push(r)}),[].concat(...n)}oe.fn.map=function(i){return new Bt(ws(this,(e,t)=>i.call(e,t,e)))};oe.fn.clone=function(){return this.map(function(){return this.cloneNode(!0)})};oe.fn.is=function(i){let e=!1;if(vt(i))return this.each((r,n)=>{i.call(n,r,n)&&(e=!0)}),e;if(wt(i))return this.each((r,n)=>{pd(n)||fd(n)||n.matches.call(n,i)&&(e=!0)}),e;const t=oe(i);return this.each((r,n)=>{t.each((s,o)=>{n===o&&(e=!0)})}),e};oe.fn.remove=function(i){return this.each((e,t)=>{(!i||oe(t).is(i))&&gd(t)})};dt(["prepend","append"],(i,e)=>{oe.fn[i]=function(...t){return this.each((r,n)=>{const s=n.childNodes,o=s.length,a=o?s[e?o-1:0]:Yo("div");o||md(n,a);let c=vt(t[0])?[t[0].call(n,r,n.innerHTML)]:t;r&&(c=c.map(l=>wt(l)?l:oe(l).clone())),oe(a)[e?"after":"before"](...c),o||gd(a)})}});dt(["appendTo","prependTo"],(i,e)=>{oe.fn[i]=function(t){const r=[],n=oe(t).map((o,a)=>{const c=a.childNodes,l=c.length;if(l)return c[e?0:l-1];const d=Yo("div");return md(a,d),r.push(d),d}),s=this[e?"insertBefore":"insertAfter"](n);return oe(r).remove(),s}});const Zo=(i,e)=>Er().getComputedStyle(i).getPropertyValue(Kp(e)),tm=i=>Zo(i,"box-sizing")==="border-box",lc=(i,e,t)=>{const r=e==="width"?["Left","Right"]:["Top","Bottom"];return[0,1].reduce((n,s,o)=>{let a=t+r[o];return t==="border"&&(a+="Width"),n+parseFloat(Zo(i,a)||"0")},0)},ea=(i,e)=>{if(e==="width"||e==="height"){const t=i.getBoundingClientRect()[e];return tm(i)?`${t}px`:`${t-lc(i,e,"border")-lc(i,e,"padding")}px`}return Zo(i,e)},Dw=["animation-iteration-count","column-count","fill-opacity","flex-grow","flex-shrink","font-weight","grid-area","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","line-height","opacity","order","orphans","widows","z-index","zoom"];dt(["attr","prop","css"],(i,e)=>{const t=(n,s,o)=>{if(gt(o))return;if(e===0)return Zp(n,s,o);if(e===1){n[s]=o;return}s=Kp(s);const a=()=>s.startsWith("--")||Dw.includes(s)?"":"px";n.style.setProperty(s,Jo(o)?`${o}${a()}`:o)},r=(n,s)=>e===0?Qp(n,s):e===1?n[s]:ea(n,s);oe.fn[i]=function(n,s){if(Yi(n))return zt(n,(o,a)=>{this[i](o,a)}),this;if(arguments.length===1){const o=this[0];return tr(o)?r(o,n):void 0}return this.each((o,a)=>{t(a,n,vt(s)?s.call(a,o,r(a,n)):s)})}});oe.fn.children=function(i){const e=[];return this.each((t,r)=>{dt(r.childNodes,n=>{tr(n)&&(!i||oe(n).is(i))&&e.push(n)})}),new Bt(Vs(e))};oe.fn.slice=function(...i){return new Bt([].slice.apply(this,i))};oe.fn.eq=function(i){const e=i===-1?this.slice(i):this.slice(i,+i+1);return new Bt(e)};const yd=(i,e,t,r,n)=>{const s=[];let o;return i.each((a,c)=>{for(o=c[t];o&&tr(o);){if(e===2){if(r&&oe(o).is(r))break;(!n||oe(o).is(n))&&s.push(o)}else if(e===0){(!r||oe(o).is(r))&&s.push(o);break}else(!r||oe(o).is(r))&&s.push(o);o=o[t]}}),new Bt(Vs(s))};dt(["","s","sUntil"],(i,e)=>{oe.fn[`parent${i}`]=function(t,r){const n=e?oe(this.get().reverse()):this;return yd(n,e,"parentNode",t,r)}});oe.fn.closest=function(i){if(this.is(i))return this;const e=[];return this.parents().each((t,r)=>{if(oe(r).is(i))return e.push(r),!1}),new Bt(e)};const ta=new WeakMap,zs=i=>ta.get(i)??{},im=(i,e)=>{const t=zs(i),r=Qo(e);return r in t?t[r]:void 0},vd=(i,e)=>{const t=zs(i);zt(e,(r,n)=>{t[Qo(r)]=n}),ta.set(i,t)},rm=(i,e,t)=>{vd(i,{[e]:t})},Lw=i=>{ta.delete(i)},Ow=(i,e)=>{const t=zs(i);dt(e,r=>{const n=Qo(r);delete t[n]}),ta.set(i,t)},Pw=/^(?:{[\w\W]*\}|\[[\w\W]*\])$/,Mw=i=>i==="true"?!0:i==="false"?!1:i==="null"?null:i===+i+""?+i:Pw.test(i)?JSON.parse(i):i,If=(i,e,t)=>{if(gt(t)&&i.nodeType===1&&(t=i.dataset[e],wt(t)))try{t=Mw(t)}catch{}return t};oe.fn.data=function(i,e){if(gt(i)){if(!this.length)return;const t=this[0],r=zs(t);return t.nodeType!==1||zt(t.dataset,n=>{r[n]=If(t,n,r[n])}),r}if(Yi(i))return this.each(function(){vd(this,i)});if(arguments.length===2&&gt(e))return this;if(!gt(e))return this.each(function(){rm(this,i,e)});if(this.length)return If(this[0],Qo(i),im(this[0],i))};oe.fn.empty=function(){return this.each((i,e)=>{e.innerHTML=""})};oe.fn.extend=function(i){return zt(i,(e,t)=>{oe.fn[e]=t}),this};oe.fn.filter=function(i){if(vt(i))return this.map((t,r)=>i.call(r,t,r)?r:void 0);if(wt(i))return this.map((t,r)=>oe(r).is(i)?r:void 0);const e=oe(i);return this.map((t,r)=>e.get().includes(r)?r:void 0)};oe.fn.find=function(i){const e=[];return this.each((t,r)=>{bd(e,oe(r.querySelectorAll(i)).get())}),new Bt(e)};oe.fn.first=function(){return this.eq(0)};const wd=(i,e)=>i!==e&&Co(i).contains(e);oe.fn.has=function(i){const e=wt(i)?this.find(i):oe(i),{length:t}=e;return this.map(function(){for(let r=0;r<t;r+=1)if(wd(this,e[r]))return this})};oe.fn.hasClass=function(i){return this[0].classList.contains(i)};const nm=(i,e,t,r,n,s)=>{const o=a=>lc(i,e.toLowerCase(),a)*s;return r===2&&n&&(t+=o("margin")),tm(i)?(r===0&&(t-=o("border")),r===1&&(t-=o("border"),t-=o("padding"))):(r===0&&(t+=o("padding")),r===2&&(t+=o("border"),t+=o("padding"))),t},sm=(i,e,t,r)=>{const n=ii(),s=`client${e}`,o=`scroll${e}`,a=`offset${e}`,c=`inner${e}`;if(fd(i))return t===2?i[c]:Co(n)[s];if(pd(i)){const d=Co(i);return Math.max(i.body[o],d[o],i.body[a],d[a],d[s])}const l=parseFloat(Zo(i,e.toLowerCase())||"0");return nm(i,e,l,t,r,1)},Fw=(i,e,t,r,n,s)=>{let o=vt(s)?s.call(i,e,sm(i,t,r,n)):s;if(o==null)return;const a=oe(i),c=t.toLowerCase();if(wt(o)&&["auto","inherit",""].includes(o)){a.css(c,o);return}const l=o.toString().replace(/\b[0-9.]*/,""),d=parseFloat(o);o=nm(i,t,d,r,n,-1)+(l||"px"),a.css(c,o)};dt(["Width","Height"],i=>{dt([`inner${i}`,i.toLowerCase(),`outer${i}`],(e,t)=>{oe.fn[e]=function(r,n){const s=arguments.length&&(t<2||!Cw(r)),o=r===!0||n===!0;return s?this.each((a,c)=>Fw(c,a,i,t,o,r)):this.length?sm(this[0],i,t,o):void 0}})});oe.fn.hide=function(){return this.each((i,e)=>{e.style.display="none"})};dt(["val","html","text"],(i,e)=>{const r=["value","innerHTML","textContent"][e],n=o=>{if(e===2)return ws(o,l=>Co(l)[r]).join("");if(!o.length)return;const a=o[0],c=oe(a);return e===0&&c.is("select[multiple]")?ws(c.find("option:checked"),l=>l.value):a[r]},s=(o,a)=>{if(gt(a)){if(e!==0)return;a=""}e===1&&tr(a)&&(a=a.outerHTML),o[r]=a};oe.fn[i]=function(o){return arguments.length?this.each((a,c)=>{const l=oe(c),d=vt(o)?o.call(c,a,n(l)):o;e===0&&Array.isArray(d)?l.is("select[multiple]")?ws(l.find("option"),u=>u.selected=d.includes(u.value)):c.checked=d.includes(c.value):s(c,d)}):n(this)}});oe.fn.index=function(i){return arguments.length?wt(i)?oe(i).get().indexOf(this[0]):this.get().indexOf(oe(i)[0]):this.eq(0).parent().children().get().indexOf(this[0])};oe.fn.last=function(){return this.eq(-1)};dt(["","All","Until"],(i,e)=>{oe.fn[`next${i}`]=function(t,r){return yd(this,e,"nextElementSibling",t,r)}});oe.fn.not=function(i){const e=this.filter(i);return this.map((t,r)=>e.index(r)>-1?void 0:r)};const jw=Er().CustomEvent;class Bw extends jw{constructor(e,t){super(e,t),this.data=t.data,this.namespace=t.namespace}}const Ul=new WeakMap;let qw=1;const cc=i=>(Ul.has(i)||Ul.set(i,++qw),Ul.get(i)),Tf=new Map,Ao=i=>{const e=cc(i);return Tf.get(e)||Tf.set(e,[]).get(e)},_d=i=>{const e=i.split(".");return{type:e[0],namespace:e.slice(1).sort().join(" ")}},om=i=>new RegExp("(?:^| )"+i.replace(" "," .* ?")+"(?: |$)"),Uw=(i,e,t,r)=>{const n=_d(e);return Ao(i).filter(s=>s&&(!n.type||s.type===n.type)&&(!n.namespace||om(n.namespace).test(s.namespace))&&(!t||cc(s.func)===cc(t))&&(!r||s.selector===r))},Vw=(i,e,t,r,n)=>{let s=!1;Yi(r)&&r.useCapture&&(s=!0),e.split(" ").forEach(o=>{if(!o)return;const a=_d(o),c=(u,p)=>{t.apply(p,u.detail===null?[u]:[u].concat(u.detail))===!1&&(u.preventDefault(),u.stopPropagation())},l=u=>{u.namespace&&!om(u.namespace).test(a.namespace)||(u.data=r,n?oe(i).find(n).get().reverse().forEach(p=>{(p===u.target||wd(p,u.target))&&c(u,p)}):c(u,i))},d={type:a.type,namespace:a.namespace,func:t,selector:n,id:Ao(i).length,proxy:l};Ao(i).push(d),i.addEventListener(d.type,l,s)})},zw=(i,e,t,r)=>{const n=Ao(i),s=o=>{delete n[o.id],i.removeEventListener(o.type,o.proxy,!1)};e?e.split(" ").forEach(o=>{o&&Uw(i,o,t,r).forEach(a=>{s(a)})}):n.forEach(o=>{s(o)})};oe.fn.off=function(i,e,t){return Yi(i)?(zt(i,(r,n)=>{this.off(r,e,n)}),this):((e===!1||vt(e))&&(t=e,e=void 0),t===!1&&(t=Xp),this.each(function(){zw(this,i,t,e)}))};function ia(i,...e){return dt(e,t=>{zt(t,(r,n)=>{gt(n)||(i[r]=n)})}),i}oe.fn.offsetParent=function(){const i=ii();return this.map(function(){let e=this.offsetParent;for(;e&&oe(e).css("position")==="static";)e=e.offsetParent;return e||i.documentElement})};const lo=(i,e)=>parseFloat(i.css(e));oe.fn.position=function(){if(!this.length)return;const i=this.eq(0);let e,t={left:0,top:0};if(i.css("position")==="fixed")e=i[0].getBoundingClientRect();else{e=i.offset();const r=i.offsetParent();t=r.offset(),t.top+=lo(r,"border-top-width"),t.left+=lo(r,"border-left-width")}return{top:e.top-t.top-lo(i,"margin-top"),left:e.left-t.left-lo(i,"margin-left")}};const am=i=>{if(!i.getClientRects().length)return{top:0,left:0};const{top:e,left:t}=i.getBoundingClientRect(),{pageYOffset:r,pageXOffset:n}=i.ownerDocument.defaultView;return{top:e+r,left:t+n}},Hw=(i,e,t)=>{const r=oe(i),n=r.css("position");n==="static"&&r.css("position","relative");const s=am(i),o=r.css("top"),a=r.css("left");let c,l;if((n==="absolute"||n==="fixed")&&(o+a).includes("auto")){const p=r.position();c=p.top,l=p.left}else c=parseFloat(o),l=parseFloat(a);const u=vt(e)?e.call(i,t,ia({},s)):e;r.css({top:u.top!=null?u.top-s.top+c:void 0,left:u.left!=null?u.left-s.left+l:void 0})};oe.fn.offset=function(i){return arguments.length?this.each(function(e){Hw(this,i,e)}):this.length?am(this[0]):void 0};oe.fn.on=function(i,e,t,r,n){if(Yi(i))return wt(e)||(t=t||e,e=void 0),zt(i,(s,o)=>{this.on(s,e,t,o,n)}),this;if(t==null&&r==null?(r=e,t=e=void 0):r==null&&(wt(e)?(r=t,t=void 0):(r=t,t=e,e=void 0)),r===!1)r=Xp;else if(!r)return this;if(n){const s=this,o=r;r=function(a,...c){return s.off(a.type,e,r),o.call(this,a,...c)}}return this.each(function(){Vw(this,i,r,t,e)})};oe.fn.one=function(i,e,t,r){return this.on(i,e,t,r,!0)};dt(["","All","Until"],(i,e)=>{oe.fn[`prev${i}`]=function(t,r){const n=e?oe(this.get().reverse()):this;return yd(n,e,"previousElementSibling",t,r)}});oe.fn.removeAttr=function(i){const e=i.split(" ").filter(t=>t);return this.each(function(){dt(e,t=>{Yp(this,t)})})};const lm=(i,e)=>{if(gt(e))return Lw(i);const t=wt(e)?e.split(" ").filter(r=>r):e;Ow(i,t)};oe.fn.removeData=function(i){return this.each((e,t)=>{lm(t,i)})};oe.fn.removeProp=function(i){return this.each((e,t)=>{try{delete t[i]}catch{}})};oe.fn.replaceWith=function(i){return this.each((e,t)=>{let r=i;vt(r)?r=r.call(t,e,t.innerHTML):e&&!wt(r)&&(r=oe(r).clone()),oe(t).before(r)}),this.remove()};oe.fn.replaceAll=function(i){return oe(i).map((e,t)=>(oe(t).replaceWith(e?this.clone():this),this.get()))};const xd=i=>{if(!Yi(i)&&!Array.isArray(i))return"";const e=[],t=(r,n)=>{let s;Yi(n)?zt(n,(o,a)=>{s=Array.isArray(n)&&!Yi(a)?"":o,t(`${r}[${s}]`,a)}):(s=n==null||n===""?"=":`=${encodeURIComponent(n)}`,e.push(encodeURIComponent(r)+s))};return Array.isArray(i)?dt(i,({name:r,value:n})=>t(r,n)):zt(i,t),e.join("&")},ln=new WeakMap,cm=i=>{const e=[...i.elements],t=ln.get(i)||[],r=(n,s)=>n.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1;return[...e,...t].sort(r)},dm=i=>{const e=[];return i.each((t,r)=>{const n=r instanceof HTMLFormElement?cm(r):[r];oe(n).each((s,o)=>{const a=oe(o),c=o.type,l=o.nodeName.toLowerCase();l!=="fieldset"&&o.name&&!o.disabled&&["input","select","textarea","keygen","mdui-checkbox","mdui-radio-group","mdui-switch","mdui-text-field","mdui-select","mdui-slider","mdui-range-slider","mdui-segmented-button-group"].includes(l)&&!["submit","button","image","reset","file"].includes(c)&&(!["radio","checkbox"].includes(c)||o.checked)&&(!["mdui-checkbox","mdui-switch"].includes(l)||o.checked)&&e.push({name:o.name,value:a.val()})})}),e};oe.fn.serializeArray=function(){return dm(this).map(i=>Array.isArray(i.value)?i.value.map(e=>({name:i.name,value:e})):i).flat()};oe.fn.serialize=function(){return xd(this.serializeArray())};oe.fn.serializeObject=function(){const i={};return dm(this).forEach(e=>{const{name:t,value:r}=e;if(!Object.prototype.hasOwnProperty.call(i,t))i[t]=r;else{const n=i[t];Array.isArray(n)||(i[t]=[n]),Array.isArray(r)?i[t].push(...r):i[t].push(r)}}),i};const Vl={},Ww=i=>{const e=ii();let t,r;return Vl[i]||(t=Yo(i),md(e.body,t),r=ea(t,"display"),gd(t),r==="none"&&(r="block"),Vl[i]=r),Vl[i]};oe.fn.show=function(){return this.each((i,e)=>{e.style.display==="none"&&(e.style.display=""),ea(e,"display")==="none"&&(e.style.display=Ww(e.nodeName))})};oe.fn.siblings=function(i){return this.prevAll(i).add(this.nextAll(i))};oe.fn.toggle=function(){return this.each((i,e)=>{ea(e,"display")==="none"?oe(e).show():oe(e).hide()})};oe.fn.trigger=function(i,e=null,t){const{type:r,namespace:n}=_d(i),s=new Bw(r,{detail:e,data:null,namespace:n,bubbles:!0,cancelable:!1,composed:!0,...t});return this.each((o,a)=>{a.dispatchEvent(s)})};const Gw="ajaxStart",Cf="ajaxSuccess",co="ajaxError",zl="ajaxComplete",_s={},Kw=i=>["GET","HEAD"].includes(i),$f=(i,e)=>`${i}&${e}`.replace(/[&?]{1,2}/,"?"),Xw=i=>{const e=Er();return/^([\w-]+:)?\/\/([^/]+)/.test(i)&&RegExp.$2!==e.location.host},Jw=i=>i>=200&&i<300||[0,304].includes(i),Qw=i=>{const e={url:"",method:"GET",data:"",processData:!0,async:!0,cache:!0,username:"",password:"",headers:{},xhrFields:{},statusCode:{},dataType:"",contentType:"application/x-www-form-urlencoded",timeout:0,global:!0};return zt(_s,(t,r)=>{!["beforeSend","success","error","complete","statusCode"].includes(t)&&!gt(r)&&(e[t]=r)}),ia({},e,i)},um=i=>{const e=ii(),t=Er();let r=!1;const n={},s={},o=Qw(i),a=o.method.toUpperCase();let{data:c,url:l}=o;l=l||t.location.toString();const{processData:d,async:u,cache:p,username:g,password:v,headers:_,xhrFields:E,statusCode:x,dataType:k,contentType:y,timeout:h,global:m}=o,T=Kw(a);c&&(T||d)&&!wt(c)&&!(c instanceof ArrayBuffer)&&!(c instanceof Blob)&&!(c instanceof Document)&&!(c instanceof FormData)&&(c=xd(c)),c&&T&&(l=$f(l,c),c=null);const N=(F,I,...O)=>{m&&oe(e).trigger(F,I==="success"?s:n);let U,R;I in _s&&(U=_s[I](...O)),o[I]&&(R=o[I](...O)),I==="beforeSend"&&[U,R].includes(!1)&&(r=!0)};return(()=>{let F;return new Promise((I,O)=>{const U=Q=>O(new Error(Q));T&&!p&&(l=$f(l,`_=${Date.now()}`));const R=new XMLHttpRequest;R.open(a,l,u,g,v),(y||c&&!T&&y!==!1)&&R.setRequestHeader("Content-Type",y),k==="json"&&R.setRequestHeader("Accept","application/json, text/javascript"),zt(_,(Q,$)=>{gt($)||R.setRequestHeader(Q,$+"")}),Xw(l)||R.setRequestHeader("X-Requested-With","XMLHttpRequest"),zt(E,(Q,$)=>{R[Q]=$}),n.xhr=s.xhr=R,n.options=s.options=o;let D;if(R.onload=()=>{D&&clearTimeout(D);const Q=Jw(R.status);let $;if(Q)if(F=R.status===204||a==="HEAD"?"nocontent":R.status===304?"notmodified":"success",k==="json"||!k&&(R.getResponseHeader("content-type")||"").includes("json")){try{$=a==="HEAD"?void 0:JSON.parse(R.responseText),s.response=$}catch{F="parsererror",N(co,"error",R,F),U(F)}F!=="parsererror"&&(N(Cf,"success",$,F,R),I($))}else $=a==="HEAD"?void 0:R.responseType==="text"||R.responseType===""?R.responseText:R.response,s.response=$,N(Cf,"success",$,F,R),I($);else F="error",N(co,"error",R,F),U(F);dt([_s.statusCode??{},x],Y=>{Y[R.status]&&(Q?Y[R.status]($,F,R):Y[R.status](R,F))}),N(zl,"complete",R,F)},R.onerror=()=>{D&&clearTimeout(D),N(co,"error",R,R.statusText),N(zl,"complete",R,"error"),U(R.statusText)},R.onabort=()=>{let Q="abort";D&&(Q="timeout",clearTimeout(D)),N(co,"error",R,Q),N(zl,"complete",R,Q),U(Q)},N(Gw,"beforeSend",R,o),r)return U("cancel");h>0&&(D=t.setTimeout(()=>R.abort(),h)),R.send(c)})})()};oe.ajax=um;const Yw=i=>ia(_s,i);oe.ajaxSetup=Yw;oe.contains=wd;function Zw(i,e,t){return Yi(e)?(vd(i,e),e):gt(t)?gt(e)?zs(i):im(i,e):(rm(i,e,t),t)}oe.data=Zw;oe.each=em;oe.extend=function(i,...e){return e.length?ia(i,...e):(zt(i,(t,r)=>{this[t]=r}),this)};oe.map=ws;oe.merge=bd;oe.param=xd;oe.removeData=lm;oe.unique=Vs;function w(i,e,t,r){var n=arguments.length,s=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s}/**
376
+ `;else r.title=e.sourceConstraintComponent?.value;return r}findRootShaclShapeSubject(){let e=null;if(this.config.attributes.shapeSubject){if(e=He.namedNode(this.config.attributes.shapeSubject),this.config.store.getQuads(e,qt,no,null).length===0){console.warn(`shapes graph does not contain requested root shape ${this.config.attributes.shapeSubject}`);return}}else if(this.config.attributes.valuesSubject&&this.config.store.countQuads(null,null,null,Fi)>0){const t=He.namedNode(this.config.attributes.valuesSubject),r=[...this.config.store.getQuads(t,qt,null,Fi),...this.config.store.getQuads(t,Yl,null,Fi)];if(r.length===0){console.warn(`value subject '${this.config.attributes.valuesSubject}' has neither ${qt.id} nor ${Yl.id} statement`);return}for(const n of r)if(this.config.store.getQuads(n.object,qt,no,null).length>0){e=n.object;break}if(!e){const n=this.config.store.getQuads(null,Is,r[0].object,null);if(n.length===0){console.error(`value subject '${this.config.attributes.valuesSubject}' has no shacl shape definition in the shapes graph`);return}if(n.length>1&&console.warn(`value subject '${this.config.attributes.valuesSubject}' has multiple shacl shape definitions in the shapes graph, choosing the first found (${n[0].subject})`),this.config.store.getQuads(n[0].subject,qt,no,null).length===0){console.error(`value subject '${this.config.attributes.valuesSubject}' references a shape which is not a NodeShape (${n[0].subject})`);return}e=n[0].subject}}else{const t=this.config.store.getQuads(null,qt,no,null);if(t.length==0){console.warn("shapes graph does not contain any root shapes");return}t.length>1&&(console.warn("shapes graph contains",t.length,"root shapes. choosing first found which is",t[0].subject.value),console.info('hint: set the shape to use with attribute "data-shape-subject"')),e=t[0].subject}return e}removeFromDataGraph(e){this.config.attributes.valuesSubject;for(const t of this.config.store.getQuads(e,null,null,Fi))this.config.store.delete(t),(t.object.termType==="NamedNode"||t.object.termType==="BlankNode")&&this.removeFromDataGraph(t.object)}};function Rf(i){return i!==null&&typeof i=="object"&&"constructor"in i&&i.constructor===Object}function ud(i={},e={}){const t=["__proto__","constructor","prototype"];Object.keys(e).filter(r=>t.indexOf(r)<0).forEach(r=>{typeof i[r]>"u"?i[r]=e[r]:Rf(e[r])&&Rf(i[r])&&Object.keys(e[r]).length>0&&ud(i[r],e[r])})}const Gp={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function ii(){const i=typeof document<"u"?document:{};return ud(i,Gp),i}const Rw={document:Gp,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(i){return typeof setTimeout>"u"?(i(),null):setTimeout(i,0)},cancelAnimationFrame(i){typeof setTimeout>"u"||clearTimeout(i)}};function Er(){const i=typeof window<"u"?window:{};return ud(i,Rw),i}const Iw=i=>i?.nodeName.toLowerCase()??"",Us=(i,e)=>i?.nodeName.toLowerCase()===e.toLowerCase(),vt=i=>typeof i=="function",wt=i=>typeof i=="string",Jo=i=>typeof i=="number",Tw=i=>typeof i=="boolean",gt=i=>typeof i>"u",hd=i=>i===null,fd=i=>typeof Window<"u"&&i instanceof Window,pd=i=>typeof Document<"u"&&i instanceof Document,tr=i=>typeof Element<"u"&&i instanceof Element,Cw=i=>typeof Node<"u"&&i instanceof Node,un=i=>!vt(i)&&!fd(i)&&Jo(i.length),Yi=i=>typeof i=="object"&&i!==null,Co=i=>pd(i)?i.documentElement:i,Qo=i=>i.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),Kp=i=>i&&i.replace(/^./,i[0].toLowerCase()).replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),Xp=()=>!1,dt=(i,e)=>{for(let t=0;t<i.length;t+=1)if(e.call(i[t],i[t],t)===!1)return i;return i},zt=(i,e)=>{const t=Object.keys(i);for(let r=0;r<t.length;r+=1){const n=t[r];if(e.call(i[n],n,i[n])===!1)return i}return i};class Bt{constructor(e){return this.length=0,e?(dt(e,(t,r)=>{this[r]=t}),this.length=e.length,this):this}}const $o=(i=ii())=>/complete|interactive/.test(i.readyState),Yo=i=>ii().createElement(i),md=(i,e)=>i.appendChild(e),gd=i=>i.parentNode?i.parentNode.removeChild(i):i,Jp=(i,e)=>{const t=Yo(e);return t.innerHTML=i,[].slice.call(t.childNodes)},$w=()=>{const i=function(e){if(!e)return new Bt;if(e instanceof Bt)return e;if(vt(e)){const t=ii();return $o(t)?e.call(t,i):t.addEventListener("DOMContentLoaded",()=>e.call(t,i),{once:!0}),new Bt([t])}if(wt(e)){const t=e.trim();if(t.startsWith("<")&&t.endsWith(">")){let n="div";return zt({li:"ul",tr:"tbody",td:"tr",th:"tr",tbody:"table",option:"select"},(o,a)=>{if(t.startsWith(`<${o}`))return n=a,!1}),new Bt(Jp(t,n))}const r=ii();return new Bt(r.querySelectorAll(e))}return un(e)&&!Cw(e)?new Bt(e):new Bt([e])};return i.fn=Bt.prototype,i},oe=$w(),bd=(i,e)=>(dt(e,t=>{i.push(t)}),i),Vs=i=>[...new Set(i)];oe.fn.get=function(i){return i===void 0?[].slice.call(this):this[i>=0?i:i+this.length]};oe.fn.add=function(i){return new Bt(Vs(bd(this.get(),oe(i).get())))};const Qp=(i,e,t)=>{const r=i.getAttribute(e);return hd(r)?t:r},Yp=(i,e)=>{i.removeAttribute(e)},Zp=(i,e,t)=>{hd(t)?Yp(i,e):i.setAttribute(e,t)};oe.fn.each=function(i){return dt(this,(e,t)=>i.call(e,t,e))};dt(["add","remove","toggle"],i=>{oe.fn[`${i}Class`]=function(e){return i==="remove"&&!arguments.length?this.each((t,r)=>{Zp(r,"class","")}):this.each((t,r)=>{if(!tr(r))return;const n=(vt(e)?e.call(r,t,Qp(r,"class","")):e).split(" ").filter(s=>s);dt(n,s=>{r.classList[i](s)})})}});dt(["insertBefore","insertAfter"],(i,e)=>{oe.fn[i]=function(t){const r=e?oe(this.get().reverse()):this,n=oe(t),s=[];return n.each((o,a)=>{a.parentNode&&r.each((c,l)=>{const d=o?l.cloneNode(!0):l,u=e?a.nextSibling:a;s.push(d),a.parentNode.insertBefore(d,u)})}),oe(e?s.reverse():s)}});const Aw=i=>wt(i)&&!(i.startsWith("<")&&i.endsWith(">"));dt(["before","after"],(i,e)=>{oe.fn[i]=function(...t){return e===1&&(t=t.reverse()),this.each((r,n)=>{const s=vt(t[0])?[t[0].call(n,r,n.innerHTML)]:t;dt(s,o=>{let a;Aw(o)?a=oe(Jp(o,"div")):r&&tr(o)?a=oe(o.cloneNode(!0)):a=oe(o),a[e?"insertAfter":"insertBefore"](n)})})}});function em(i,e){return un(i)?dt(i,(t,r)=>e.call(t,r,t)):zt(i,e)}function ws(i,e){const t=Er();let r;const n=[];return em(i,(s,o)=>{r=e.call(t,o,s),r!=null&&n.push(r)}),[].concat(...n)}oe.fn.map=function(i){return new Bt(ws(this,(e,t)=>i.call(e,t,e)))};oe.fn.clone=function(){return this.map(function(){return this.cloneNode(!0)})};oe.fn.is=function(i){let e=!1;if(vt(i))return this.each((r,n)=>{i.call(n,r,n)&&(e=!0)}),e;if(wt(i))return this.each((r,n)=>{pd(n)||fd(n)||n.matches.call(n,i)&&(e=!0)}),e;const t=oe(i);return this.each((r,n)=>{t.each((s,o)=>{n===o&&(e=!0)})}),e};oe.fn.remove=function(i){return this.each((e,t)=>{(!i||oe(t).is(i))&&gd(t)})};dt(["prepend","append"],(i,e)=>{oe.fn[i]=function(...t){return this.each((r,n)=>{const s=n.childNodes,o=s.length,a=o?s[e?o-1:0]:Yo("div");o||md(n,a);let c=vt(t[0])?[t[0].call(n,r,n.innerHTML)]:t;r&&(c=c.map(l=>wt(l)?l:oe(l).clone())),oe(a)[e?"after":"before"](...c),o||gd(a)})}});dt(["appendTo","prependTo"],(i,e)=>{oe.fn[i]=function(t){const r=[],n=oe(t).map((o,a)=>{const c=a.childNodes,l=c.length;if(l)return c[e?0:l-1];const d=Yo("div");return md(a,d),r.push(d),d}),s=this[e?"insertBefore":"insertAfter"](n);return oe(r).remove(),s}});const Zo=(i,e)=>Er().getComputedStyle(i).getPropertyValue(Kp(e)),tm=i=>Zo(i,"box-sizing")==="border-box",lc=(i,e,t)=>{const r=e==="width"?["Left","Right"]:["Top","Bottom"];return[0,1].reduce((n,s,o)=>{let a=t+r[o];return t==="border"&&(a+="Width"),n+parseFloat(Zo(i,a)||"0")},0)},ea=(i,e)=>{if(e==="width"||e==="height"){const t=i.getBoundingClientRect()[e];return tm(i)?`${t}px`:`${t-lc(i,e,"border")-lc(i,e,"padding")}px`}return Zo(i,e)},Nw=["animation-iteration-count","column-count","fill-opacity","flex-grow","flex-shrink","font-weight","grid-area","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","line-height","opacity","order","orphans","widows","z-index","zoom"];dt(["attr","prop","css"],(i,e)=>{const t=(n,s,o)=>{if(gt(o))return;if(e===0)return Zp(n,s,o);if(e===1){n[s]=o;return}s=Kp(s);const a=()=>s.startsWith("--")||Nw.includes(s)?"":"px";n.style.setProperty(s,Jo(o)?`${o}${a()}`:o)},r=(n,s)=>e===0?Qp(n,s):e===1?n[s]:ea(n,s);oe.fn[i]=function(n,s){if(Yi(n))return zt(n,(o,a)=>{this[i](o,a)}),this;if(arguments.length===1){const o=this[0];return tr(o)?r(o,n):void 0}return this.each((o,a)=>{t(a,n,vt(s)?s.call(a,o,r(a,n)):s)})}});oe.fn.children=function(i){const e=[];return this.each((t,r)=>{dt(r.childNodes,n=>{tr(n)&&(!i||oe(n).is(i))&&e.push(n)})}),new Bt(Vs(e))};oe.fn.slice=function(...i){return new Bt([].slice.apply(this,i))};oe.fn.eq=function(i){const e=i===-1?this.slice(i):this.slice(i,+i+1);return new Bt(e)};const yd=(i,e,t,r,n)=>{const s=[];let o;return i.each((a,c)=>{for(o=c[t];o&&tr(o);){if(e===2){if(r&&oe(o).is(r))break;(!n||oe(o).is(n))&&s.push(o)}else if(e===0){(!r||oe(o).is(r))&&s.push(o);break}else(!r||oe(o).is(r))&&s.push(o);o=o[t]}}),new Bt(Vs(s))};dt(["","s","sUntil"],(i,e)=>{oe.fn[`parent${i}`]=function(t,r){const n=e?oe(this.get().reverse()):this;return yd(n,e,"parentNode",t,r)}});oe.fn.closest=function(i){if(this.is(i))return this;const e=[];return this.parents().each((t,r)=>{if(oe(r).is(i))return e.push(r),!1}),new Bt(e)};const ta=new WeakMap,zs=i=>ta.get(i)??{},im=(i,e)=>{const t=zs(i),r=Qo(e);return r in t?t[r]:void 0},vd=(i,e)=>{const t=zs(i);zt(e,(r,n)=>{t[Qo(r)]=n}),ta.set(i,t)},rm=(i,e,t)=>{vd(i,{[e]:t})},Dw=i=>{ta.delete(i)},Lw=(i,e)=>{const t=zs(i);dt(e,r=>{const n=Qo(r);delete t[n]}),ta.set(i,t)},Ow=/^(?:{[\w\W]*\}|\[[\w\W]*\])$/,Pw=i=>i==="true"?!0:i==="false"?!1:i==="null"?null:i===+i+""?+i:Ow.test(i)?JSON.parse(i):i,If=(i,e,t)=>{if(gt(t)&&i.nodeType===1&&(t=i.dataset[e],wt(t)))try{t=Pw(t)}catch{}return t};oe.fn.data=function(i,e){if(gt(i)){if(!this.length)return;const t=this[0],r=zs(t);return t.nodeType!==1||zt(t.dataset,n=>{r[n]=If(t,n,r[n])}),r}if(Yi(i))return this.each(function(){vd(this,i)});if(arguments.length===2&&gt(e))return this;if(!gt(e))return this.each(function(){rm(this,i,e)});if(this.length)return If(this[0],Qo(i),im(this[0],i))};oe.fn.empty=function(){return this.each((i,e)=>{e.innerHTML=""})};oe.fn.extend=function(i){return zt(i,(e,t)=>{oe.fn[e]=t}),this};oe.fn.filter=function(i){if(vt(i))return this.map((t,r)=>i.call(r,t,r)?r:void 0);if(wt(i))return this.map((t,r)=>oe(r).is(i)?r:void 0);const e=oe(i);return this.map((t,r)=>e.get().includes(r)?r:void 0)};oe.fn.find=function(i){const e=[];return this.each((t,r)=>{bd(e,oe(r.querySelectorAll(i)).get())}),new Bt(e)};oe.fn.first=function(){return this.eq(0)};const wd=(i,e)=>i!==e&&Co(i).contains(e);oe.fn.has=function(i){const e=wt(i)?this.find(i):oe(i),{length:t}=e;return this.map(function(){for(let r=0;r<t;r+=1)if(wd(this,e[r]))return this})};oe.fn.hasClass=function(i){return this[0].classList.contains(i)};const nm=(i,e,t,r,n,s)=>{const o=a=>lc(i,e.toLowerCase(),a)*s;return r===2&&n&&(t+=o("margin")),tm(i)?(r===0&&(t-=o("border")),r===1&&(t-=o("border"),t-=o("padding"))):(r===0&&(t+=o("padding")),r===2&&(t+=o("border"),t+=o("padding"))),t},sm=(i,e,t,r)=>{const n=ii(),s=`client${e}`,o=`scroll${e}`,a=`offset${e}`,c=`inner${e}`;if(fd(i))return t===2?i[c]:Co(n)[s];if(pd(i)){const d=Co(i);return Math.max(i.body[o],d[o],i.body[a],d[a],d[s])}const l=parseFloat(Zo(i,e.toLowerCase())||"0");return nm(i,e,l,t,r,1)},Mw=(i,e,t,r,n,s)=>{let o=vt(s)?s.call(i,e,sm(i,t,r,n)):s;if(o==null)return;const a=oe(i),c=t.toLowerCase();if(wt(o)&&["auto","inherit",""].includes(o)){a.css(c,o);return}const l=o.toString().replace(/\b[0-9.]*/,""),d=parseFloat(o);o=nm(i,t,d,r,n,-1)+(l||"px"),a.css(c,o)};dt(["Width","Height"],i=>{dt([`inner${i}`,i.toLowerCase(),`outer${i}`],(e,t)=>{oe.fn[e]=function(r,n){const s=arguments.length&&(t<2||!Tw(r)),o=r===!0||n===!0;return s?this.each((a,c)=>Mw(c,a,i,t,o,r)):this.length?sm(this[0],i,t,o):void 0}})});oe.fn.hide=function(){return this.each((i,e)=>{e.style.display="none"})};dt(["val","html","text"],(i,e)=>{const r=["value","innerHTML","textContent"][e],n=o=>{if(e===2)return ws(o,l=>Co(l)[r]).join("");if(!o.length)return;const a=o[0],c=oe(a);return e===0&&c.is("select[multiple]")?ws(c.find("option:checked"),l=>l.value):a[r]},s=(o,a)=>{if(gt(a)){if(e!==0)return;a=""}e===1&&tr(a)&&(a=a.outerHTML),o[r]=a};oe.fn[i]=function(o){return arguments.length?this.each((a,c)=>{const l=oe(c),d=vt(o)?o.call(c,a,n(l)):o;e===0&&Array.isArray(d)?l.is("select[multiple]")?ws(l.find("option"),u=>u.selected=d.includes(u.value)):c.checked=d.includes(c.value):s(c,d)}):n(this)}});oe.fn.index=function(i){return arguments.length?wt(i)?oe(i).get().indexOf(this[0]):this.get().indexOf(oe(i)[0]):this.eq(0).parent().children().get().indexOf(this[0])};oe.fn.last=function(){return this.eq(-1)};dt(["","All","Until"],(i,e)=>{oe.fn[`next${i}`]=function(t,r){return yd(this,e,"nextElementSibling",t,r)}});oe.fn.not=function(i){const e=this.filter(i);return this.map((t,r)=>e.index(r)>-1?void 0:r)};const Fw=Er().CustomEvent;class jw extends Fw{constructor(e,t){super(e,t),this.data=t.data,this.namespace=t.namespace}}const Ul=new WeakMap;let Bw=1;const cc=i=>(Ul.has(i)||Ul.set(i,++Bw),Ul.get(i)),Tf=new Map,Ao=i=>{const e=cc(i);return Tf.get(e)||Tf.set(e,[]).get(e)},_d=i=>{const e=i.split(".");return{type:e[0],namespace:e.slice(1).sort().join(" ")}},om=i=>new RegExp("(?:^| )"+i.replace(" "," .* ?")+"(?: |$)"),qw=(i,e,t,r)=>{const n=_d(e);return Ao(i).filter(s=>s&&(!n.type||s.type===n.type)&&(!n.namespace||om(n.namespace).test(s.namespace))&&(!t||cc(s.func)===cc(t))&&(!r||s.selector===r))},Uw=(i,e,t,r,n)=>{let s=!1;Yi(r)&&r.useCapture&&(s=!0),e.split(" ").forEach(o=>{if(!o)return;const a=_d(o),c=(u,p)=>{t.apply(p,u.detail===null?[u]:[u].concat(u.detail))===!1&&(u.preventDefault(),u.stopPropagation())},l=u=>{u.namespace&&!om(u.namespace).test(a.namespace)||(u.data=r,n?oe(i).find(n).get().reverse().forEach(p=>{(p===u.target||wd(p,u.target))&&c(u,p)}):c(u,i))},d={type:a.type,namespace:a.namespace,func:t,selector:n,id:Ao(i).length,proxy:l};Ao(i).push(d),i.addEventListener(d.type,l,s)})},Vw=(i,e,t,r)=>{const n=Ao(i),s=o=>{delete n[o.id],i.removeEventListener(o.type,o.proxy,!1)};e?e.split(" ").forEach(o=>{o&&qw(i,o,t,r).forEach(a=>{s(a)})}):n.forEach(o=>{s(o)})};oe.fn.off=function(i,e,t){return Yi(i)?(zt(i,(r,n)=>{this.off(r,e,n)}),this):((e===!1||vt(e))&&(t=e,e=void 0),t===!1&&(t=Xp),this.each(function(){Vw(this,i,t,e)}))};function ia(i,...e){return dt(e,t=>{zt(t,(r,n)=>{gt(n)||(i[r]=n)})}),i}oe.fn.offsetParent=function(){const i=ii();return this.map(function(){let e=this.offsetParent;for(;e&&oe(e).css("position")==="static";)e=e.offsetParent;return e||i.documentElement})};const lo=(i,e)=>parseFloat(i.css(e));oe.fn.position=function(){if(!this.length)return;const i=this.eq(0);let e,t={left:0,top:0};if(i.css("position")==="fixed")e=i[0].getBoundingClientRect();else{e=i.offset();const r=i.offsetParent();t=r.offset(),t.top+=lo(r,"border-top-width"),t.left+=lo(r,"border-left-width")}return{top:e.top-t.top-lo(i,"margin-top"),left:e.left-t.left-lo(i,"margin-left")}};const am=i=>{if(!i.getClientRects().length)return{top:0,left:0};const{top:e,left:t}=i.getBoundingClientRect(),{pageYOffset:r,pageXOffset:n}=i.ownerDocument.defaultView;return{top:e+r,left:t+n}},zw=(i,e,t)=>{const r=oe(i),n=r.css("position");n==="static"&&r.css("position","relative");const s=am(i),o=r.css("top"),a=r.css("left");let c,l;if((n==="absolute"||n==="fixed")&&(o+a).includes("auto")){const p=r.position();c=p.top,l=p.left}else c=parseFloat(o),l=parseFloat(a);const u=vt(e)?e.call(i,t,ia({},s)):e;r.css({top:u.top!=null?u.top-s.top+c:void 0,left:u.left!=null?u.left-s.left+l:void 0})};oe.fn.offset=function(i){return arguments.length?this.each(function(e){zw(this,i,e)}):this.length?am(this[0]):void 0};oe.fn.on=function(i,e,t,r,n){if(Yi(i))return wt(e)||(t=t||e,e=void 0),zt(i,(s,o)=>{this.on(s,e,t,o,n)}),this;if(t==null&&r==null?(r=e,t=e=void 0):r==null&&(wt(e)?(r=t,t=void 0):(r=t,t=e,e=void 0)),r===!1)r=Xp;else if(!r)return this;if(n){const s=this,o=r;r=function(a,...c){return s.off(a.type,e,r),o.call(this,a,...c)}}return this.each(function(){Uw(this,i,r,t,e)})};oe.fn.one=function(i,e,t,r){return this.on(i,e,t,r,!0)};dt(["","All","Until"],(i,e)=>{oe.fn[`prev${i}`]=function(t,r){const n=e?oe(this.get().reverse()):this;return yd(n,e,"previousElementSibling",t,r)}});oe.fn.removeAttr=function(i){const e=i.split(" ").filter(t=>t);return this.each(function(){dt(e,t=>{Yp(this,t)})})};const lm=(i,e)=>{if(gt(e))return Dw(i);const t=wt(e)?e.split(" ").filter(r=>r):e;Lw(i,t)};oe.fn.removeData=function(i){return this.each((e,t)=>{lm(t,i)})};oe.fn.removeProp=function(i){return this.each((e,t)=>{try{delete t[i]}catch{}})};oe.fn.replaceWith=function(i){return this.each((e,t)=>{let r=i;vt(r)?r=r.call(t,e,t.innerHTML):e&&!wt(r)&&(r=oe(r).clone()),oe(t).before(r)}),this.remove()};oe.fn.replaceAll=function(i){return oe(i).map((e,t)=>(oe(t).replaceWith(e?this.clone():this),this.get()))};const xd=i=>{if(!Yi(i)&&!Array.isArray(i))return"";const e=[],t=(r,n)=>{let s;Yi(n)?zt(n,(o,a)=>{s=Array.isArray(n)&&!Yi(a)?"":o,t(`${r}[${s}]`,a)}):(s=n==null||n===""?"=":`=${encodeURIComponent(n)}`,e.push(encodeURIComponent(r)+s))};return Array.isArray(i)?dt(i,({name:r,value:n})=>t(r,n)):zt(i,t),e.join("&")},ln=new WeakMap,cm=i=>{const e=[...i.elements],t=ln.get(i)||[],r=(n,s)=>n.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1;return[...e,...t].sort(r)},dm=i=>{const e=[];return i.each((t,r)=>{const n=r instanceof HTMLFormElement?cm(r):[r];oe(n).each((s,o)=>{const a=oe(o),c=o.type,l=o.nodeName.toLowerCase();l!=="fieldset"&&o.name&&!o.disabled&&["input","select","textarea","keygen","mdui-checkbox","mdui-radio-group","mdui-switch","mdui-text-field","mdui-select","mdui-slider","mdui-range-slider","mdui-segmented-button-group"].includes(l)&&!["submit","button","image","reset","file"].includes(c)&&(!["radio","checkbox"].includes(c)||o.checked)&&(!["mdui-checkbox","mdui-switch"].includes(l)||o.checked)&&e.push({name:o.name,value:a.val()})})}),e};oe.fn.serializeArray=function(){return dm(this).map(i=>Array.isArray(i.value)?i.value.map(e=>({name:i.name,value:e})):i).flat()};oe.fn.serialize=function(){return xd(this.serializeArray())};oe.fn.serializeObject=function(){const i={};return dm(this).forEach(e=>{const{name:t,value:r}=e;if(!Object.prototype.hasOwnProperty.call(i,t))i[t]=r;else{const n=i[t];Array.isArray(n)||(i[t]=[n]),Array.isArray(r)?i[t].push(...r):i[t].push(r)}}),i};const Vl={},Hw=i=>{const e=ii();let t,r;return Vl[i]||(t=Yo(i),md(e.body,t),r=ea(t,"display"),gd(t),r==="none"&&(r="block"),Vl[i]=r),Vl[i]};oe.fn.show=function(){return this.each((i,e)=>{e.style.display==="none"&&(e.style.display=""),ea(e,"display")==="none"&&(e.style.display=Hw(e.nodeName))})};oe.fn.siblings=function(i){return this.prevAll(i).add(this.nextAll(i))};oe.fn.toggle=function(){return this.each((i,e)=>{ea(e,"display")==="none"?oe(e).show():oe(e).hide()})};oe.fn.trigger=function(i,e=null,t){const{type:r,namespace:n}=_d(i),s=new jw(r,{detail:e,data:null,namespace:n,bubbles:!0,cancelable:!1,composed:!0,...t});return this.each((o,a)=>{a.dispatchEvent(s)})};const Ww="ajaxStart",Cf="ajaxSuccess",co="ajaxError",zl="ajaxComplete",_s={},Gw=i=>["GET","HEAD"].includes(i),$f=(i,e)=>`${i}&${e}`.replace(/[&?]{1,2}/,"?"),Kw=i=>{const e=Er();return/^([\w-]+:)?\/\/([^/]+)/.test(i)&&RegExp.$2!==e.location.host},Xw=i=>i>=200&&i<300||[0,304].includes(i),Jw=i=>{const e={url:"",method:"GET",data:"",processData:!0,async:!0,cache:!0,username:"",password:"",headers:{},xhrFields:{},statusCode:{},dataType:"",contentType:"application/x-www-form-urlencoded",timeout:0,global:!0};return zt(_s,(t,r)=>{!["beforeSend","success","error","complete","statusCode"].includes(t)&&!gt(r)&&(e[t]=r)}),ia({},e,i)},um=i=>{const e=ii(),t=Er();let r=!1;const n={},s={},o=Jw(i),a=o.method.toUpperCase();let{data:c,url:l}=o;l=l||t.location.toString();const{processData:d,async:u,cache:p,username:g,password:v,headers:_,xhrFields:E,statusCode:x,dataType:k,contentType:y,timeout:h,global:m}=o,T=Gw(a);c&&(T||d)&&!wt(c)&&!(c instanceof ArrayBuffer)&&!(c instanceof Blob)&&!(c instanceof Document)&&!(c instanceof FormData)&&(c=xd(c)),c&&T&&(l=$f(l,c),c=null);const N=(F,I,...O)=>{m&&oe(e).trigger(F,I==="success"?s:n);let U,R;I in _s&&(U=_s[I](...O)),o[I]&&(R=o[I](...O)),I==="beforeSend"&&[U,R].includes(!1)&&(r=!0)};return(()=>{let F;return new Promise((I,O)=>{const U=Q=>O(new Error(Q));T&&!p&&(l=$f(l,`_=${Date.now()}`));const R=new XMLHttpRequest;R.open(a,l,u,g,v),(y||c&&!T&&y!==!1)&&R.setRequestHeader("Content-Type",y),k==="json"&&R.setRequestHeader("Accept","application/json, text/javascript"),zt(_,(Q,$)=>{gt($)||R.setRequestHeader(Q,$+"")}),Kw(l)||R.setRequestHeader("X-Requested-With","XMLHttpRequest"),zt(E,(Q,$)=>{R[Q]=$}),n.xhr=s.xhr=R,n.options=s.options=o;let D;if(R.onload=()=>{D&&clearTimeout(D);const Q=Xw(R.status);let $;if(Q)if(F=R.status===204||a==="HEAD"?"nocontent":R.status===304?"notmodified":"success",k==="json"||!k&&(R.getResponseHeader("content-type")||"").includes("json")){try{$=a==="HEAD"?void 0:JSON.parse(R.responseText),s.response=$}catch{F="parsererror",N(co,"error",R,F),U(F)}F!=="parsererror"&&(N(Cf,"success",$,F,R),I($))}else $=a==="HEAD"?void 0:R.responseType==="text"||R.responseType===""?R.responseText:R.response,s.response=$,N(Cf,"success",$,F,R),I($);else F="error",N(co,"error",R,F),U(F);dt([_s.statusCode??{},x],Y=>{Y[R.status]&&(Q?Y[R.status]($,F,R):Y[R.status](R,F))}),N(zl,"complete",R,F)},R.onerror=()=>{D&&clearTimeout(D),N(co,"error",R,R.statusText),N(zl,"complete",R,"error"),U(R.statusText)},R.onabort=()=>{let Q="abort";D&&(Q="timeout",clearTimeout(D)),N(co,"error",R,Q),N(zl,"complete",R,Q),U(Q)},N(Ww,"beforeSend",R,o),r)return U("cancel");h>0&&(D=t.setTimeout(()=>R.abort(),h)),R.send(c)})})()};oe.ajax=um;const Qw=i=>ia(_s,i);oe.ajaxSetup=Qw;oe.contains=wd;function Yw(i,e,t){return Yi(e)?(vd(i,e),e):gt(t)?gt(e)?zs(i):im(i,e):(rm(i,e,t),t)}oe.data=Yw;oe.each=em;oe.extend=function(i,...e){return e.length?ia(i,...e):(zt(i,(t,r)=>{this[t]=r}),this)};oe.map=ws;oe.merge=bd;oe.param=xd;oe.removeData=lm;oe.unique=Vs;function w(i,e,t,r){var n=arguments.length,s=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s}/**
377
377
  * @license
378
378
  * Copyright 2017 Google LLC
379
379
  * SPDX-License-Identifier: BSD-3-Clause
@@ -381,7 +381,7 @@ if("@preserve"in h)return h["@preserve"][0];if(e.isValue(h))return h;if(e.isList
381
381
  * @license
382
382
  * Copyright 2017 Google LLC
383
383
  * SPDX-License-Identifier: BSD-3-Clause
384
- */const e1={attribute:!0,type:String,converter:pn,reflect:!1,hasChanged:zc},t1=(i=e1,e,t)=>{const{kind:r,metadata:n}=t;let s=globalThis.litPropertyMetadata.get(n);if(s===void 0&&globalThis.litPropertyMetadata.set(n,s=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),s.set(t.name,i),r==="accessor"){const{name:o}=t;return{set(a){const c=e.get.call(this);e.set.call(this,a),this.requestUpdate(o,c,i)},init(a){return a!==void 0&&this.C(o,void 0,i,a),a}}}if(r==="setter"){const{name:o}=t;return function(a){const c=this[o];e.call(this,a),this.requestUpdate(o,c,i)}}throw Error("Unsupported decorator location: "+r)};function L(i){return(e,t)=>typeof t=="object"?t1(i,e,t):((r,n,s)=>{const o=n.hasOwnProperty(s);return n.constructor.createProperty(s,r),o?Object.getOwnPropertyDescriptor(n,s):void 0})(i,e,t)}/**
384
+ */const Zw={attribute:!0,type:String,converter:pn,reflect:!1,hasChanged:zc},e1=(i=Zw,e,t)=>{const{kind:r,metadata:n}=t;let s=globalThis.litPropertyMetadata.get(n);if(s===void 0&&globalThis.litPropertyMetadata.set(n,s=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),s.set(t.name,i),r==="accessor"){const{name:o}=t;return{set(a){const c=e.get.call(this);e.set.call(this,a),this.requestUpdate(o,c,i)},init(a){return a!==void 0&&this.C(o,void 0,i,a),a}}}if(r==="setter"){const{name:o}=t;return function(a){const c=this[o];e.call(this,a),this.requestUpdate(o,c,i)}}throw Error("Unsupported decorator location: "+r)};function L(i){return(e,t)=>typeof t=="object"?e1(i,e,t):((r,n,s)=>{const o=n.hasOwnProperty(s);return n.constructor.createProperty(s,r),o?Object.getOwnPropertyDescriptor(n,s):void 0})(i,e,t)}/**
385
385
  * @license
386
386
  * Copyright 2017 Google LLC
387
387
  * SPDX-License-Identifier: BSD-3-Clause
@@ -389,11 +389,11 @@ if("@preserve"in h)return h["@preserve"][0];if(e.isValue(h))return h;if(e.isList
389
389
  * @license
390
390
  * Copyright 2017 Google LLC
391
391
  * SPDX-License-Identifier: BSD-3-Clause
392
- */const i1=(i,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(i,e,t),t);/**
392
+ */const t1=(i,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(i,e,t),t);/**
393
393
  * @license
394
394
  * Copyright 2021 Google LLC
395
395
  * SPDX-License-Identifier: BSD-3-Clause
396
- */function gi(i){return(e,t)=>{const{slot:r,selector:n}=i??{},s="slot"+(r?`[name=${r}]`:":not([name])");return i1(e,t,{get(){const o=this.renderRoot?.querySelector(s),a=o?.assignedElements(i)??[];return n===void 0?a:a.filter(c=>c.matches(n))}})}}/**
396
+ */function gi(i){return(e,t)=>{const{slot:r,selector:n}=i??{},s="slot"+(r?`[name=${r}]`:":not([name])");return t1(e,t,{get(){const o=this.renderRoot?.querySelector(s),a=o?.assignedElements(i)??[];return n===void 0?a:a.filter(c=>c.matches(n))}})}}/**
397
397
  * @license
398
398
  * Copyright 2018 Google LLC
399
399
  * SPDX-License-Identifier: BSD-3-Clause
@@ -405,7 +405,7 @@ if("@preserve"in h)return h["@preserve"][0];if(e.isValue(h))return h;if(e.isList
405
405
  * @license
406
406
  * Copyright 2018 Google LLC
407
407
  * SPDX-License-Identifier: BSD-3-Clause
408
- */const hm="important",r1=" !"+hm,jr=Ln(class extends Hs{constructor(i){if(super(i),i.type!==Mi.ATTRIBUTE||i.name!=="style"||i.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce((e,t)=>{const r=i[t];return r==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(i,[e]){const{style:t}=i.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(const r in e){const n=e[r];if(n!=null){this.ft.add(r);const s=typeof n=="string"&&n.endsWith(r1);r.includes("-")||s?t.setProperty(r,s?n.slice(0,-11):n,s?hm:""):t[r]=n}}return Vt}});class Ke extends yt{emit(e,t){const r=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(r)}}class $t{constructor(e,...t){this.slotNames=[],(this.host=e).addController(this),this.slotNames=t,this.onSlotChange=this.onSlotChange.bind(this)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.onSlotChange),$o()||oe(()=>{this.host.requestUpdate()})}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.onSlotChange)}test(e){return e==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(e)}hasDefaultSlot(){return[...this.host.childNodes].some(e=>e.nodeType===e.TEXT_NODE&&e.textContent.trim()!==""||e.nodeType===e.ELEMENT_NODE&&!e.hasAttribute("slot"))}hasNamedSlot(e){return this.host.querySelector(`:scope > [slot="${e}"]`)!==null}onSlotChange(e){const t=e.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()}}const Qe=Z`${it}`,qe=$e`:host{box-sizing:border-box}:host *,:host ::after,:host ::before{box-sizing:inherit}:host :focus,:host :focus-visible,:host(:focus),:host(:focus-visible){outline:0}[hidden]{display:none!important}`;/**
408
+ */const hm="important",i1=" !"+hm,jr=Ln(class extends Hs{constructor(i){if(super(i),i.type!==Mi.ATTRIBUTE||i.name!=="style"||i.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce((e,t)=>{const r=i[t];return r==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(i,[e]){const{style:t}=i.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(const r in e){const n=e[r];if(n!=null){this.ft.add(r);const s=typeof n=="string"&&n.endsWith(i1);r.includes("-")||s?t.setProperty(r,s?n.slice(0,-11):n,s?hm:""):t[r]=n}}return Vt}});class Ke extends yt{emit(e,t){const r=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(r)}}class $t{constructor(e,...t){this.slotNames=[],(this.host=e).addController(this),this.slotNames=t,this.onSlotChange=this.onSlotChange.bind(this)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.onSlotChange),$o()||oe(()=>{this.host.requestUpdate()})}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.onSlotChange)}test(e){return e==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(e)}hasDefaultSlot(){return[...this.host.childNodes].some(e=>e.nodeType===e.TEXT_NODE&&e.textContent.trim()!==""||e.nodeType===e.ELEMENT_NODE&&!e.hasAttribute("slot"))}hasNamedSlot(e){return this.host.querySelector(`:scope > [slot="${e}"]`)!==null}onSlotChange(e){const t=e.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()}}const Qe=Z`${it}`,qe=$e`:host{box-sizing:border-box}:host *,:host ::after,:host ::before{box-sizing:inherit}:host :focus,:host :focus-visible,:host(:focus),:host(:focus-visible){outline:0}[hidden]{display:none!important}`;/**
409
409
  * @license
410
410
  * Copyright 2017 Google LLC
411
411
  * SPDX-License-Identifier: BSD-3-Clause
@@ -417,57 +417,57 @@ if("@preserve"in h)return h["@preserve"][0];if(e.isValue(h))return h;if(e.isList
417
417
  * @license
418
418
  * Copyright 2020 Google LLC
419
419
  * SPDX-License-Identifier: BSD-3-Clause
420
- */const n1=i=>i===null||typeof i!="object"&&typeof i!="function",pm=i=>i.strings===void 0,s1={},o1=(i,e=s1)=>i._$AH=e;/**
420
+ */const r1=i=>i===null||typeof i!="object"&&typeof i!="function",pm=i=>i.strings===void 0,n1={},s1=(i,e=n1)=>i._$AH=e;/**
421
421
  * @license
422
422
  * Copyright 2017 Google LLC
423
423
  * SPDX-License-Identifier: BSD-3-Clause
424
- */const xs=(i,e)=>{const t=i._$AN;if(t===void 0)return!1;for(const r of t)r._$AO?.(e,!1),xs(r,e);return!0},No=i=>{let e,t;do{if((e=i._$AM)===void 0)break;t=e._$AN,t.delete(i),i=e}while(t?.size===0)},mm=i=>{for(let e;e=i._$AM;i=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(i))break;t.add(i),c1(e)}};function a1(i){this._$AN!==void 0?(No(this),this._$AM=i,mm(this)):this._$AM=i}function l1(i,e=!1,t=0){const r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(e)if(Array.isArray(r))for(let s=t;s<r.length;s++)xs(r[s],!1),No(r[s]);else r!=null&&(xs(r,!1),No(r));else xs(this,i)}const c1=i=>{i.type==Mi.CHILD&&(i._$AP??=l1,i._$AQ??=a1)};class gm extends Hs{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),mm(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(xs(this,e),No(this))}setValue(e){if(pm(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}/**
424
+ */const xs=(i,e)=>{const t=i._$AN;if(t===void 0)return!1;for(const r of t)r._$AO?.(e,!1),xs(r,e);return!0},No=i=>{let e,t;do{if((e=i._$AM)===void 0)break;t=e._$AN,t.delete(i),i=e}while(t?.size===0)},mm=i=>{for(let e;e=i._$AM;i=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(i))break;t.add(i),l1(e)}};function o1(i){this._$AN!==void 0?(No(this),this._$AM=i,mm(this)):this._$AM=i}function a1(i,e=!1,t=0){const r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(e)if(Array.isArray(r))for(let s=t;s<r.length;s++)xs(r[s],!1),No(r[s]);else r!=null&&(xs(r,!1),No(r));else xs(this,i)}const l1=i=>{i.type==Mi.CHILD&&(i._$AP??=a1,i._$AQ??=o1)};class gm extends Hs{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),mm(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(xs(this,e),No(this))}setValue(e){if(pm(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}/**
425
425
  * @license
426
426
  * Copyright 2021 Google LLC
427
427
  * SPDX-License-Identifier: BSD-3-Clause
428
- */class d1{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}}class u1{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??=new Promise(e=>this.Z=e)}resume(){this.Z?.(),this.Y=this.Z=void 0}}/**
428
+ */class c1{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}}class d1{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??=new Promise(e=>this.Z=e)}resume(){this.Z?.(),this.Y=this.Z=void 0}}/**
429
429
  * @license
430
430
  * Copyright 2017 Google LLC
431
431
  * SPDX-License-Identifier: BSD-3-Clause
432
- */const Af=i=>!n1(i)&&typeof i.then=="function",Nf=1073741823;class h1 extends gm{constructor(){super(...arguments),this._$Cwt=Nf,this._$Cbt=[],this._$CK=new d1(this),this._$CX=new u1}render(...e){return e.find(t=>!Af(t))??Vt}update(e,t){const r=this._$Cbt;let n=r.length;this._$Cbt=t;const s=this._$CK,o=this._$CX;this.isConnected||this.disconnected();for(let a=0;a<t.length&&!(a>this._$Cwt);a++){const c=t[a];if(!Af(c))return this._$Cwt=a,c;a<n&&c===r[a]||(this._$Cwt=Nf,n=0,Promise.resolve(c).then(async l=>{for(;o.get();)await o.get();const d=s.deref();if(d!==void 0){const u=d._$Cbt.indexOf(c);u>-1&&u<d._$Cwt&&(d._$Cwt=u,d.setValue(l))}}))}return Vt}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const f1=Ln(h1),p1=$e`:host{display:inline-block;width:1em;height:1em;font-weight:400;font-family:'Material Icons';font-display:block;font-style:normal;line-height:1;direction:ltr;letter-spacing:normal;white-space:nowrap;text-transform:none;word-wrap:normal;-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;-moz-osx-font-smoothing:grayscale;font-size:1.5rem}::slotted(svg),svg{width:100%;height:100%;fill:currentcolor}`;let As=class extends Ke{constructor(){super(...arguments),this.hasSlotController=new $t(this,"[default]")}render(){const e=()=>{if(this.name){const[t,r]=this.name.split("--");return Z`<span translate="no" style="${jr({fontFamily:new Map([["outlined","Material Icons Outlined"],["filled","Material Icons"],["rounded","Material Icons Round"],["sharp","Material Icons Sharp"],["two-tone","Material Icons Two Tone"]]).get(r)})}">${t}</span>`}return this.src?Z`${f1(um({url:this.src}).then(fm))}`:Z``};return this.hasSlotController.test("[default]")?Z`<slot></slot>`:e()}};As.styles=[qe,p1];w([L({reflect:!0})],As.prototype,"name",void 0);w([L({reflect:!0})],As.prototype,"src",void 0);As=w([Ae("mdui-icon")],As);const m1=$e`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;white-space:nowrap;vertical-align:middle;border-radius:var(--shape-corner);-webkit-user-select:none;user-select:none;width:2.5rem;height:2.5rem;background-color:rgb(var(--mdui-color-primary-container));color:rgb(var(--mdui-color-on-primary-container));font-size:var(--mdui-typescale-title-medium-size);font-weight:var(--mdui-typescale-title-medium-weight);letter-spacing:var(--mdui-typescale-title-medium-tracking);line-height:var(--mdui-typescale-title-medium-line-height)}img{width:100%;height:100%}::slotted(mdui-icon),mdui-icon{font-size:1.5em}`;let Hr=class extends Ke{constructor(){super(...arguments),this.hasSlotController=new $t(this,"[default]")}render(){return this.hasSlotController.test("[default]")?Z`<slot></slot>`:this.src?Z`<img part="image" alt="${je(this.label)}" src="${this.src}" style="${jr({objectFit:this.fit})}">`:this.icon?Z`<mdui-icon part="icon" name="${this.icon}"></mdui-icon>`:Qe}};Hr.styles=[qe,m1];w([L({reflect:!0})],Hr.prototype,"src",void 0);w([L({reflect:!0})],Hr.prototype,"fit",void 0);w([L({reflect:!0})],Hr.prototype,"icon",void 0);w([L({reflect:!0})],Hr.prototype,"label",void 0);Hr=w([Ae("mdui-avatar")],Hr);const g1=$e`:host{--shape-corner:var(--mdui-shape-corner-full);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:var(--shape-corner);padding-left:.25rem;padding-right:.25rem;color:rgb(var(--mdui-color-on-error));background-color:rgb(var(--mdui-color-error));height:1rem;min-width:1rem;font-size:var(--mdui-typescale-label-small-size);font-weight:var(--mdui-typescale-label-small-weight);letter-spacing:var(--mdui-typescale-label-small-tracking);line-height:var(--mdui-typescale-label-small-line-height)}:host([variant=small]){min-width:0;padding:0;width:.375rem;height:.375rem}`;let Do=class extends Ke{constructor(){super(...arguments),this.variant="large"}render(){return this.variant==="small"?Qe:Z`<slot></slot>`}};Do.styles=[qe,g1];w([L({reflect:!0})],Do.prototype,"variant",void 0);Do=w([Ae("mdui-badge")],Do);const we=i=>i!==null&&i.toLowerCase()!=="false";class At{constructor(e,t){this.defined=!1,(this.host=e).addController(this),this.relatedElements=t.relatedElements,this.needDomReady=t.needDomReady||!!t.relatedElements,this.onSlotChange=this.onSlotChange.bind(this)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.onSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.onSlotChange)}isDefined(){return this.defined?!0:(this.defined=(!this.needDomReady||$o())&&!this.getUndefinedLocalNames().length,this.defined)}async whenDefined(){if(this.defined)return Promise.resolve();const e=ii();this.needDomReady&&!$o(e)&&await new Promise(r=>{e.addEventListener("DOMContentLoaded",()=>r(),{once:!0})});const t=this.getUndefinedLocalNames();if(t.length){const r=[];t.forEach(n=>{r.push(customElements.whenDefined(n))}),await Promise.all(r)}this.defined=!0}getScopeLocalNameSelector(){const e=this.relatedElements;return e?Array.isArray(e)?e.map(t=>`${t}:not(:defined)`).join(","):Object.keys(e).filter(t=>!e[t]).map(t=>`${t}:not(:defined)`).join(","):null}getGlobalLocalNameSelector(){const e=this.relatedElements;return!e||Array.isArray(e)?null:Object.keys(e).filter(t=>e[t]).map(t=>`${t}:not(:defined)`).join(",")}getUndefinedLocalNames(){const e=this.getScopeLocalNameSelector(),t=this.getGlobalLocalNameSelector(),r=e?[...this.host.querySelectorAll(e)]:[],n=t?[...ii().querySelectorAll(t)]:[],s=[...r,...n].map(o=>o.localName);return Vs(s)}onSlotChange(){const e=this.getScopeLocalNameSelector();e&&this.host.querySelectorAll(e).length&&(this.defined=!1)}}function Re(i,e=!1){return(t,r)=>{const{update:n}=t;i in t&&(t.update=function(s){if(s.has(i)){const o=s.get(i),a=this[i];o!==a&&(!e||this.hasUpdated)&&this[r](o,a)}n.call(this,s)})}}const uo=new WeakMap,Ed=i=>{class e extends i{constructor(...r){super(...r),this.scrollBehaviorDefinedController=new At(this,{needDomReady:!0}),this.lastScrollTopThreshold=0,this.lastScrollTopNoThreshold=0,this.isParentLayout=!1,this.onListeningScroll=this.onListeningScroll.bind(this)}get scrollPaddingPosition(){throw new Error("Must implement scrollPaddingPosition getter")}async onScrollTargetChange(r,n){const s=this.hasUpdated;if(await this.scrollBehaviorDefinedController.whenDefined(),s&&(this.setContainerPadding("remove",r),this.setContainerPadding("add",n)),!this.scrollBehavior)return;const o=this.getListening(r);o&&o.removeEventListener("scroll",this.onListeningScroll);const a=this.getListening(n);a&&(this.updateScrollTop(a),a.addEventListener("scroll",this.onListeningScroll))}async onScrollBehaviorChange(){await this.scrollBehaviorDefinedController.whenDefined();const r=this.getListening(this.scrollTarget);r&&(this.scrollBehavior?(this.updateScrollTop(r),r.addEventListener("scroll",this.onListeningScroll)):r.removeEventListener("scroll",this.onListeningScroll))}connectedCallback(){super.connectedCallback(),this.scrollBehaviorDefinedController.whenDefined().then(()=>{this.isParentLayout=Us(this.parentElement,"mdui-layout"),this.setContainerPadding("add",this.scrollTarget)})}disconnectedCallback(){super.disconnectedCallback(),this.scrollBehaviorDefinedController.whenDefined().then(()=>{this.setContainerPadding("remove",this.scrollTarget)})}hasScrollBehavior(r){const n=this.scrollBehavior?.split(" ")??[];return Array.isArray(r)?!!n.filter(s=>r.includes(s)).length:n.includes(r)}runScrollThreshold(r,n){}runScrollNoThreshold(r,n){}setContainerPadding(r,n){const s=this.getContainer(n);if(!s||this.isParentLayout)return;const o=this.scrollPaddingPosition,a=o==="top"?"paddingTop":"paddingBottom";if(r==="add"||r==="update"){const c=["fixed","absolute"].includes(oe(this).css("position"))?this.offsetHeight:null;if(oe(s).css({[a]:c}),r==="add"&&c!==null){const l=uo.get(s)??{top:[],bottom:[]};l[o].push(this),uo.set(s,l)}}if(r==="remove"){const c=uo.get(s);if(!c)return;const l=c[o].indexOf(this);l>-1&&(c[o].splice(l,1),uo.set(s,c)),c[o].length||oe(s).css({[a]:null})}}onListeningScroll(){const r=this.getListening(this.scrollTarget);window.requestAnimationFrame(()=>this.onScroll(r))}onScroll(r){const n=r.scrollY??r.scrollTop;this.lastScrollTopNoThreshold!==n&&(this.runScrollNoThreshold(n<this.lastScrollTopNoThreshold,n),this.lastScrollTopNoThreshold=n),Math.abs(n-this.lastScrollTopThreshold)>(this.scrollThreshold||0)&&(this.runScrollThreshold(n<this.lastScrollTopThreshold,n),this.lastScrollTopThreshold=n)}updateScrollTop(r){this.lastScrollTopThreshold=this.lastScrollTopNoThreshold=r.scrollY??r.scrollTop}getListening(r){return r?oe(r)[0]:window}getContainer(r){return r?oe(r)[0]:document.body}}return w([L({attribute:"scroll-target"})],e.prototype,"scrollTarget",void 0),w([L({reflect:!0,attribute:"scroll-behavior"})],e.prototype,"scrollBehavior",void 0),w([L({type:Number,reflect:!0,attribute:"scroll-threshold"})],e.prototype,"scrollThreshold",void 0),w([Re("scrollTarget")],e.prototype,"onScrollTargetChange",null),w([Re("scrollBehavior")],e.prototype,"onScrollBehaviorChange",null),e};let b1=0;const Sr=()=>++b1;let hr,Hl;const kr=(i,e)=>{const t=oe(i),r=Sr(),n={unobserve:()=>{t.each((s,o)=>{const a=hr.get(o),c=a.coArr.findIndex(l=>l.key===r);c!==-1&&a.coArr.splice(c,1),a.coArr.length?hr.set(o,a):(Hl.unobserve(o),hr.delete(o))})}};return hr||(hr=new WeakMap,Hl=new ResizeObserver(s=>{s.forEach(o=>{const a=o.target,c=hr.get(a);c.entry=o,c.coArr.forEach(l=>{l.callback.call(n,o,n)})})})),t.each((s,o)=>{const a=hr.get(o)??{coArr:[]};a.coArr.length&&a.entry&&e.call(n,a.entry,n),a.coArr.push({callback:e,key:r}),hr.set(o,a),Hl.observe(o)}),n};class y1{constructor(){this.states=[]}registerMain(e){this.$main=oe(e)}unregisterMain(){this.$main=void 0}registerItem(e){const t={element:e};this.states.push(t),t.observeResize=kr(t.element,()=>{this.updateLayout(t.element,{width:this.isNoWidth(t)?0:void 0})}),this.items=void 0,this.resort(),this.updateLayout()}unregisterItem(e){const t=this.states.findIndex(n=>n.element===e);if(t<0)return;this.states[t].observeResize?.unobserve(),this.items=void 0,this.states.splice(t,1),this.states[t]&&this.updateLayout(this.states[t].element)}getItems(){if(!this.items){const e=this.states.map(t=>t.element);this.items=e.sort((t,r)=>{const n=t.compareDocumentPosition(r);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0})}return this.items}getMain(){return this.$main?this.$main[0]:void 0}getItemsAndMain(){return[...this.getItems(),this.getMain()].filter(e=>e)}updateOrder(){this.resort(),this.updateLayout()}updateLayout(e,t){const r=e?{element:e,width:t?.width,height:t?.height}:void 0,n=r?this.states.findIndex(o=>o.element===r.element):0;if(n<0)return;Object.assign(this.states[n],r),this.states.forEach((o,a)=>{if(a<n)return;const c=o.element.layoutPlacement,l=a>0?this.states[a-1]:void 0,d=l?.top??0,u=l?.right??0,p=l?.bottom??0,g=l?.left??0;switch(Object.assign(o,{top:d,right:u,bottom:p,left:g}),c){case"top":case"bottom":o[c]+=o.height??o.element.offsetHeight;break;case"right":case"left":o[c]+=(this.isNoWidth(o)?0:o.width)??o.element.offsetWidth;break}o.height=o.width=void 0,oe(o.element).css({position:"absolute",top:c==="bottom"?null:d,right:c==="left"?null:u,bottom:c==="top"?null:p,left:c==="right"?null:g})});const s=this.states[this.states.length-1];this.$main&&this.$main.css({paddingTop:s.top,paddingRight:s.right,paddingBottom:s.bottom,paddingLeft:s.left})}resort(){const e=this.getItems();this.states.sort((t,r)=>{const n=t.element.order??0,s=r.element.order??0;return n>s?1:n<s?-1:e.indexOf(t.element)>e.indexOf(r.element)?1:e.indexOf(t.element)<e.indexOf(r.element)?-1:0})}isNoWidth(e){return Us(e.element,"mdui-navigation-drawer")&&e.element.isModal}}const Wl=new WeakMap,bm=i=>(Wl.has(i)||Wl.set(i,new y1),Wl.get(i));class Rr extends Ke{constructor(){super(...arguments),this.isParentLayout=!1}get layoutPlacement(){throw new Error("Must implement placement getter!")}onOrderChange(){this.layoutManager?.updateOrder()}connectedCallback(){super.connectedCallback();const e=this.parentElement;this.isParentLayout=Us(e,"mdui-layout"),this.isParentLayout&&(this.layoutManager=bm(e),this.layoutManager.registerItem(this))}disconnectedCallback(){super.disconnectedCallback(),this.layoutManager&&this.layoutManager.unregisterItem(this)}}w([L({type:Number,reflect:!0})],Rr.prototype,"order",void 0);w([Re("order",!0)],Rr.prototype,"onOrderChange",null);const v1=$e`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;right:0;bottom:0;left:0;display:flex;flex:0 0 auto;align-items:center;justify-content:flex-start;border-radius:var(--shape-corner) var(--shape-corner) 0 0;z-index:var(--z-index);transition:bottom var(--mdui-motion-duration-long2) var(--mdui-motion-easing-emphasized);padding:0 1rem;height:5rem;background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2)}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([hide]:not([hide=false i])){transition-duration:var(--mdui-motion-duration-short4);bottom:-5.625rem}::slotted(:not(:first-child)){margin-left:.5rem}::slotted(mdui-fab){box-shadow:var(--mdui-elevation-level0)}:host([fab-detach]:not([fab-detach=false i])) ::slotted(mdui-fab){position:absolute;transition:bottom var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard);right:1rem;bottom:.75rem}:host([fab-detach][hide][scroll-behavior~=hide]:not([hide=false i],[fab-detach=false i])) ::slotted(mdui-fab){transition-duration:var(--mdui-motion-duration-short4);bottom:1rem;box-shadow:var(--mdui-elevation-level2)}:host([fab-detach][hide][scroll-behavior~=hide][scroll-target]:not([fab-detach=false i],[hide=false i],[scroll-target=''])) ::slotted(mdui-fab){bottom:6.625rem}:host([hide]:not([hide=false i])) ::slotted(:not(mdui-fab)),:host([hide]:not([hide=false i],[fab-detach])) ::slotted(mdui-fab),:host([hide][fab-detach=false i]:not([hide=false i])) ::slotted(mdui-fab){transform:translateY(8.75rem);transition:transform var(--mdui-motion-duration-0) var(--mdui-motion-easing-emphasized-accelerate) var(--mdui-motion-duration-short4)}::slotted(:first-child){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-short1)}::slotted(:nth-child(2)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-short3)}::slotted(:nth-child(3)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-short4)}::slotted(:nth-child(4)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-medium1)}::slotted(:nth-child(5)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-medium2)}::slotted(:nth-child(6)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-medium3)}`;let xn=class extends Ed(Rr){constructor(){super(...arguments),this.hide=!1,this.fabDetach=!1}get scrollPaddingPosition(){return"bottom"}get layoutPlacement(){return"bottom"}firstUpdated(e){super.firstUpdated(e),this.addEventListener("transitionend",t=>{t.target===this&&this.emit(this.hide?"hidden":"shown")})}render(){return Z`<slot></slot>`}runScrollThreshold(e){!e&&!this.hide&&this.emit("hide",{cancelable:!0})&&(this.hide=!0),e&&this.hide&&this.emit("show",{cancelable:!0})&&(this.hide=!1)}};xn.styles=[qe,v1];w([L({type:Boolean,reflect:!0,converter:we})],xn.prototype,"hide",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"fab-detach"})],xn.prototype,"fabDetach",void 0);w([L({reflect:!0,attribute:"scroll-behavior"})],xn.prototype,"scrollBehavior",void 0);xn=w([Ae("mdui-bottom-app-bar")],xn);/**
432
+ */const Af=i=>!r1(i)&&typeof i.then=="function",Nf=1073741823;class u1 extends gm{constructor(){super(...arguments),this._$Cwt=Nf,this._$Cbt=[],this._$CK=new c1(this),this._$CX=new d1}render(...e){return e.find(t=>!Af(t))??Vt}update(e,t){const r=this._$Cbt;let n=r.length;this._$Cbt=t;const s=this._$CK,o=this._$CX;this.isConnected||this.disconnected();for(let a=0;a<t.length&&!(a>this._$Cwt);a++){const c=t[a];if(!Af(c))return this._$Cwt=a,c;a<n&&c===r[a]||(this._$Cwt=Nf,n=0,Promise.resolve(c).then(async l=>{for(;o.get();)await o.get();const d=s.deref();if(d!==void 0){const u=d._$Cbt.indexOf(c);u>-1&&u<d._$Cwt&&(d._$Cwt=u,d.setValue(l))}}))}return Vt}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const h1=Ln(u1),f1=$e`:host{display:inline-block;width:1em;height:1em;font-weight:400;font-family:'Material Icons';font-display:block;font-style:normal;line-height:1;direction:ltr;letter-spacing:normal;white-space:nowrap;text-transform:none;word-wrap:normal;-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;-moz-osx-font-smoothing:grayscale;font-size:1.5rem}::slotted(svg),svg{width:100%;height:100%;fill:currentcolor}`;let As=class extends Ke{constructor(){super(...arguments),this.hasSlotController=new $t(this,"[default]")}render(){const e=()=>{if(this.name){const[t,r]=this.name.split("--");return Z`<span translate="no" style="${jr({fontFamily:new Map([["outlined","Material Icons Outlined"],["filled","Material Icons"],["rounded","Material Icons Round"],["sharp","Material Icons Sharp"],["two-tone","Material Icons Two Tone"]]).get(r)})}">${t}</span>`}return this.src?Z`${h1(um({url:this.src}).then(fm))}`:Z``};return this.hasSlotController.test("[default]")?Z`<slot></slot>`:e()}};As.styles=[qe,f1];w([L({reflect:!0})],As.prototype,"name",void 0);w([L({reflect:!0})],As.prototype,"src",void 0);As=w([Ae("mdui-icon")],As);const p1=$e`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;white-space:nowrap;vertical-align:middle;border-radius:var(--shape-corner);-webkit-user-select:none;user-select:none;width:2.5rem;height:2.5rem;background-color:rgb(var(--mdui-color-primary-container));color:rgb(var(--mdui-color-on-primary-container));font-size:var(--mdui-typescale-title-medium-size);font-weight:var(--mdui-typescale-title-medium-weight);letter-spacing:var(--mdui-typescale-title-medium-tracking);line-height:var(--mdui-typescale-title-medium-line-height)}img{width:100%;height:100%}::slotted(mdui-icon),mdui-icon{font-size:1.5em}`;let Hr=class extends Ke{constructor(){super(...arguments),this.hasSlotController=new $t(this,"[default]")}render(){return this.hasSlotController.test("[default]")?Z`<slot></slot>`:this.src?Z`<img part="image" alt="${je(this.label)}" src="${this.src}" style="${jr({objectFit:this.fit})}">`:this.icon?Z`<mdui-icon part="icon" name="${this.icon}"></mdui-icon>`:Qe}};Hr.styles=[qe,p1];w([L({reflect:!0})],Hr.prototype,"src",void 0);w([L({reflect:!0})],Hr.prototype,"fit",void 0);w([L({reflect:!0})],Hr.prototype,"icon",void 0);w([L({reflect:!0})],Hr.prototype,"label",void 0);Hr=w([Ae("mdui-avatar")],Hr);const m1=$e`:host{--shape-corner:var(--mdui-shape-corner-full);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:var(--shape-corner);padding-left:.25rem;padding-right:.25rem;color:rgb(var(--mdui-color-on-error));background-color:rgb(var(--mdui-color-error));height:1rem;min-width:1rem;font-size:var(--mdui-typescale-label-small-size);font-weight:var(--mdui-typescale-label-small-weight);letter-spacing:var(--mdui-typescale-label-small-tracking);line-height:var(--mdui-typescale-label-small-line-height)}:host([variant=small]){min-width:0;padding:0;width:.375rem;height:.375rem}`;let Do=class extends Ke{constructor(){super(...arguments),this.variant="large"}render(){return this.variant==="small"?Qe:Z`<slot></slot>`}};Do.styles=[qe,m1];w([L({reflect:!0})],Do.prototype,"variant",void 0);Do=w([Ae("mdui-badge")],Do);const we=i=>i!==null&&i.toLowerCase()!=="false";class At{constructor(e,t){this.defined=!1,(this.host=e).addController(this),this.relatedElements=t.relatedElements,this.needDomReady=t.needDomReady||!!t.relatedElements,this.onSlotChange=this.onSlotChange.bind(this)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.onSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.onSlotChange)}isDefined(){return this.defined?!0:(this.defined=(!this.needDomReady||$o())&&!this.getUndefinedLocalNames().length,this.defined)}async whenDefined(){if(this.defined)return Promise.resolve();const e=ii();this.needDomReady&&!$o(e)&&await new Promise(r=>{e.addEventListener("DOMContentLoaded",()=>r(),{once:!0})});const t=this.getUndefinedLocalNames();if(t.length){const r=[];t.forEach(n=>{r.push(customElements.whenDefined(n))}),await Promise.all(r)}this.defined=!0}getScopeLocalNameSelector(){const e=this.relatedElements;return e?Array.isArray(e)?e.map(t=>`${t}:not(:defined)`).join(","):Object.keys(e).filter(t=>!e[t]).map(t=>`${t}:not(:defined)`).join(","):null}getGlobalLocalNameSelector(){const e=this.relatedElements;return!e||Array.isArray(e)?null:Object.keys(e).filter(t=>e[t]).map(t=>`${t}:not(:defined)`).join(",")}getUndefinedLocalNames(){const e=this.getScopeLocalNameSelector(),t=this.getGlobalLocalNameSelector(),r=e?[...this.host.querySelectorAll(e)]:[],n=t?[...ii().querySelectorAll(t)]:[],s=[...r,...n].map(o=>o.localName);return Vs(s)}onSlotChange(){const e=this.getScopeLocalNameSelector();e&&this.host.querySelectorAll(e).length&&(this.defined=!1)}}function Re(i,e=!1){return(t,r)=>{const{update:n}=t;i in t&&(t.update=function(s){if(s.has(i)){const o=s.get(i),a=this[i];o!==a&&(!e||this.hasUpdated)&&this[r](o,a)}n.call(this,s)})}}const uo=new WeakMap,Ed=i=>{class e extends i{constructor(...r){super(...r),this.scrollBehaviorDefinedController=new At(this,{needDomReady:!0}),this.lastScrollTopThreshold=0,this.lastScrollTopNoThreshold=0,this.isParentLayout=!1,this.onListeningScroll=this.onListeningScroll.bind(this)}get scrollPaddingPosition(){throw new Error("Must implement scrollPaddingPosition getter")}async onScrollTargetChange(r,n){const s=this.hasUpdated;if(await this.scrollBehaviorDefinedController.whenDefined(),s&&(this.setContainerPadding("remove",r),this.setContainerPadding("add",n)),!this.scrollBehavior)return;const o=this.getListening(r);o&&o.removeEventListener("scroll",this.onListeningScroll);const a=this.getListening(n);a&&(this.updateScrollTop(a),a.addEventListener("scroll",this.onListeningScroll))}async onScrollBehaviorChange(){await this.scrollBehaviorDefinedController.whenDefined();const r=this.getListening(this.scrollTarget);r&&(this.scrollBehavior?(this.updateScrollTop(r),r.addEventListener("scroll",this.onListeningScroll)):r.removeEventListener("scroll",this.onListeningScroll))}connectedCallback(){super.connectedCallback(),this.scrollBehaviorDefinedController.whenDefined().then(()=>{this.isParentLayout=Us(this.parentElement,"mdui-layout"),this.setContainerPadding("add",this.scrollTarget)})}disconnectedCallback(){super.disconnectedCallback(),this.scrollBehaviorDefinedController.whenDefined().then(()=>{this.setContainerPadding("remove",this.scrollTarget)})}hasScrollBehavior(r){const n=this.scrollBehavior?.split(" ")??[];return Array.isArray(r)?!!n.filter(s=>r.includes(s)).length:n.includes(r)}runScrollThreshold(r,n){}runScrollNoThreshold(r,n){}setContainerPadding(r,n){const s=this.getContainer(n);if(!s||this.isParentLayout)return;const o=this.scrollPaddingPosition,a=o==="top"?"paddingTop":"paddingBottom";if(r==="add"||r==="update"){const c=["fixed","absolute"].includes(oe(this).css("position"))?this.offsetHeight:null;if(oe(s).css({[a]:c}),r==="add"&&c!==null){const l=uo.get(s)??{top:[],bottom:[]};l[o].push(this),uo.set(s,l)}}if(r==="remove"){const c=uo.get(s);if(!c)return;const l=c[o].indexOf(this);l>-1&&(c[o].splice(l,1),uo.set(s,c)),c[o].length||oe(s).css({[a]:null})}}onListeningScroll(){const r=this.getListening(this.scrollTarget);window.requestAnimationFrame(()=>this.onScroll(r))}onScroll(r){const n=r.scrollY??r.scrollTop;this.lastScrollTopNoThreshold!==n&&(this.runScrollNoThreshold(n<this.lastScrollTopNoThreshold,n),this.lastScrollTopNoThreshold=n),Math.abs(n-this.lastScrollTopThreshold)>(this.scrollThreshold||0)&&(this.runScrollThreshold(n<this.lastScrollTopThreshold,n),this.lastScrollTopThreshold=n)}updateScrollTop(r){this.lastScrollTopThreshold=this.lastScrollTopNoThreshold=r.scrollY??r.scrollTop}getListening(r){return r?oe(r)[0]:window}getContainer(r){return r?oe(r)[0]:document.body}}return w([L({attribute:"scroll-target"})],e.prototype,"scrollTarget",void 0),w([L({reflect:!0,attribute:"scroll-behavior"})],e.prototype,"scrollBehavior",void 0),w([L({type:Number,reflect:!0,attribute:"scroll-threshold"})],e.prototype,"scrollThreshold",void 0),w([Re("scrollTarget")],e.prototype,"onScrollTargetChange",null),w([Re("scrollBehavior")],e.prototype,"onScrollBehaviorChange",null),e};let g1=0;const Sr=()=>++g1;let hr,Hl;const kr=(i,e)=>{const t=oe(i),r=Sr(),n={unobserve:()=>{t.each((s,o)=>{const a=hr.get(o),c=a.coArr.findIndex(l=>l.key===r);c!==-1&&a.coArr.splice(c,1),a.coArr.length?hr.set(o,a):(Hl.unobserve(o),hr.delete(o))})}};return hr||(hr=new WeakMap,Hl=new ResizeObserver(s=>{s.forEach(o=>{const a=o.target,c=hr.get(a);c.entry=o,c.coArr.forEach(l=>{l.callback.call(n,o,n)})})})),t.each((s,o)=>{const a=hr.get(o)??{coArr:[]};a.coArr.length&&a.entry&&e.call(n,a.entry,n),a.coArr.push({callback:e,key:r}),hr.set(o,a),Hl.observe(o)}),n};class b1{constructor(){this.states=[]}registerMain(e){this.$main=oe(e)}unregisterMain(){this.$main=void 0}registerItem(e){const t={element:e};this.states.push(t),t.observeResize=kr(t.element,()=>{this.updateLayout(t.element,{width:this.isNoWidth(t)?0:void 0})}),this.items=void 0,this.resort(),this.updateLayout()}unregisterItem(e){const t=this.states.findIndex(n=>n.element===e);if(t<0)return;this.states[t].observeResize?.unobserve(),this.items=void 0,this.states.splice(t,1),this.states[t]&&this.updateLayout(this.states[t].element)}getItems(){if(!this.items){const e=this.states.map(t=>t.element);this.items=e.sort((t,r)=>{const n=t.compareDocumentPosition(r);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0})}return this.items}getMain(){return this.$main?this.$main[0]:void 0}getItemsAndMain(){return[...this.getItems(),this.getMain()].filter(e=>e)}updateOrder(){this.resort(),this.updateLayout()}updateLayout(e,t){const r=e?{element:e,width:t?.width,height:t?.height}:void 0,n=r?this.states.findIndex(o=>o.element===r.element):0;if(n<0)return;Object.assign(this.states[n],r),this.states.forEach((o,a)=>{if(a<n)return;const c=o.element.layoutPlacement,l=a>0?this.states[a-1]:void 0,d=l?.top??0,u=l?.right??0,p=l?.bottom??0,g=l?.left??0;switch(Object.assign(o,{top:d,right:u,bottom:p,left:g}),c){case"top":case"bottom":o[c]+=o.height??o.element.offsetHeight;break;case"right":case"left":o[c]+=(this.isNoWidth(o)?0:o.width)??o.element.offsetWidth;break}o.height=o.width=void 0,oe(o.element).css({position:"absolute",top:c==="bottom"?null:d,right:c==="left"?null:u,bottom:c==="top"?null:p,left:c==="right"?null:g})});const s=this.states[this.states.length-1];this.$main&&this.$main.css({paddingTop:s.top,paddingRight:s.right,paddingBottom:s.bottom,paddingLeft:s.left})}resort(){const e=this.getItems();this.states.sort((t,r)=>{const n=t.element.order??0,s=r.element.order??0;return n>s?1:n<s?-1:e.indexOf(t.element)>e.indexOf(r.element)?1:e.indexOf(t.element)<e.indexOf(r.element)?-1:0})}isNoWidth(e){return Us(e.element,"mdui-navigation-drawer")&&e.element.isModal}}const Wl=new WeakMap,bm=i=>(Wl.has(i)||Wl.set(i,new b1),Wl.get(i));class Rr extends Ke{constructor(){super(...arguments),this.isParentLayout=!1}get layoutPlacement(){throw new Error("Must implement placement getter!")}onOrderChange(){this.layoutManager?.updateOrder()}connectedCallback(){super.connectedCallback();const e=this.parentElement;this.isParentLayout=Us(e,"mdui-layout"),this.isParentLayout&&(this.layoutManager=bm(e),this.layoutManager.registerItem(this))}disconnectedCallback(){super.disconnectedCallback(),this.layoutManager&&this.layoutManager.unregisterItem(this)}}w([L({type:Number,reflect:!0})],Rr.prototype,"order",void 0);w([Re("order",!0)],Rr.prototype,"onOrderChange",null);const y1=$e`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;right:0;bottom:0;left:0;display:flex;flex:0 0 auto;align-items:center;justify-content:flex-start;border-radius:var(--shape-corner) var(--shape-corner) 0 0;z-index:var(--z-index);transition:bottom var(--mdui-motion-duration-long2) var(--mdui-motion-easing-emphasized);padding:0 1rem;height:5rem;background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2)}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([hide]:not([hide=false i])){transition-duration:var(--mdui-motion-duration-short4);bottom:-5.625rem}::slotted(:not(:first-child)){margin-left:.5rem}::slotted(mdui-fab){box-shadow:var(--mdui-elevation-level0)}:host([fab-detach]:not([fab-detach=false i])) ::slotted(mdui-fab){position:absolute;transition:bottom var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard);right:1rem;bottom:.75rem}:host([fab-detach][hide][scroll-behavior~=hide]:not([hide=false i],[fab-detach=false i])) ::slotted(mdui-fab){transition-duration:var(--mdui-motion-duration-short4);bottom:1rem;box-shadow:var(--mdui-elevation-level2)}:host([fab-detach][hide][scroll-behavior~=hide][scroll-target]:not([fab-detach=false i],[hide=false i],[scroll-target=''])) ::slotted(mdui-fab){bottom:6.625rem}:host([hide]:not([hide=false i])) ::slotted(:not(mdui-fab)),:host([hide]:not([hide=false i],[fab-detach])) ::slotted(mdui-fab),:host([hide][fab-detach=false i]:not([hide=false i])) ::slotted(mdui-fab){transform:translateY(8.75rem);transition:transform var(--mdui-motion-duration-0) var(--mdui-motion-easing-emphasized-accelerate) var(--mdui-motion-duration-short4)}::slotted(:first-child){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-short1)}::slotted(:nth-child(2)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-short3)}::slotted(:nth-child(3)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-short4)}::slotted(:nth-child(4)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-medium1)}::slotted(:nth-child(5)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-medium2)}::slotted(:nth-child(6)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-medium3)}`;let xn=class extends Ed(Rr){constructor(){super(...arguments),this.hide=!1,this.fabDetach=!1}get scrollPaddingPosition(){return"bottom"}get layoutPlacement(){return"bottom"}firstUpdated(e){super.firstUpdated(e),this.addEventListener("transitionend",t=>{t.target===this&&this.emit(this.hide?"hidden":"shown")})}render(){return Z`<slot></slot>`}runScrollThreshold(e){!e&&!this.hide&&this.emit("hide",{cancelable:!0})&&(this.hide=!0),e&&this.hide&&this.emit("show",{cancelable:!0})&&(this.hide=!1)}};xn.styles=[qe,y1];w([L({type:Boolean,reflect:!0,converter:we})],xn.prototype,"hide",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"fab-detach"})],xn.prototype,"fabDetach",void 0);w([L({reflect:!0,attribute:"scroll-behavior"})],xn.prototype,"scrollBehavior",void 0);xn=w([Ae("mdui-bottom-app-bar")],xn);/**
433
433
  * @license
434
434
  * Copyright 2020 Google LLC
435
435
  * SPDX-License-Identifier: BSD-3-Clause
436
- */const Me=()=>new w1;class w1{}const Gl=new WeakMap,De=Ln(class extends gm{render(i){return it}update(i,[e]){const t=e!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=e,this.ht=i.options?.host,this.rt(this.ct=i.element)),it}rt(i){if(this.isConnected||(i=void 0),typeof this.G=="function"){const e=this.ht??globalThis;let t=Gl.get(e);t===void 0&&(t=new WeakMap,Gl.set(e,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,i),i!==void 0&&this.G.call(this.ht,i)}else this.G.value=i}get lt(){return typeof this.G=="function"?Gl.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});function Bi(i){if(typeof i=="string"||typeof i=="number")return""+i;let e="";if(Array.isArray(i))for(let t=0,r;t<i.length;t++)(r=Bi(i[t]))!==""&&(e+=(e&&" ")+r);else for(let t in i)i[t]&&(e+=(e&&" ")+t);return e}const cs=new WeakMap,xt=new WeakMap;class lr{constructor(e,t){(this.host=e).addController(this),this.definedController=new At(e,{needDomReady:!0}),this.options={form:r=>{const n=oe(r).attr("form");return n?r.getRootNode().getElementById(n):r.closest("form")},name:r=>r.name,value:r=>r.value,defaultValue:r=>r.defaultValue,setValue:(r,n)=>r.value=n,disabled:r=>r.disabled,reportValidity:r=>vt(r.reportValidity)?r.reportValidity():!0,...t},this.onFormData=this.onFormData.bind(this),this.onFormSubmit=this.onFormSubmit.bind(this),this.onFormReset=this.onFormReset.bind(this),this.reportFormValidity=this.reportFormValidity.bind(this)}hostConnected(){this.definedController.whenDefined().then(()=>{this.form=this.options.form(this.host),this.form&&this.attachForm(this.form)})}hostDisconnected(){this.detachForm()}hostUpdated(){this.definedController.whenDefined().then(()=>{const e=this.options.form(this.host);e||this.detachForm(),e&&this.form!==e&&(this.detachForm(),this.attachForm(e))})}getForm(){return this.form??null}reset(e){this.doAction("reset",e)}submit(e){this.doAction("submit",e)}attachForm(e){if(!e){this.form=void 0;return}this.form=e,ln.has(this.form)?ln.get(this.form).add(this.host):ln.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.onFormData),this.form.addEventListener("submit",this.onFormSubmit),this.form.addEventListener("reset",this.onFormReset),cs.has(this.form)||(cs.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())}detachForm(){this.form&&(ln.get(this.form).delete(this.host),this.form.removeEventListener("formdata",this.onFormData),this.form.removeEventListener("submit",this.onFormSubmit),this.form.removeEventListener("reset",this.onFormReset),cs.has(this.form)&&!ln.get(this.form).size&&(this.form.reportValidity=cs.get(this.form),cs.delete(this.form)))}doAction(e,t){if(!this.form)return;const r=oe(`<button type="${e}">`).css({position:"absolute",width:0,height:0,clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap"}),n=r[0];t&&(n.name=t.name,n.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(s=>{r.attr(s,oe(t).attr(s))})),this.form.append(n),n.click(),n.remove()}onFormData(e){const t=this.options.disabled(this.host),r=this.options.name(this.host),n=this.options.value(this.host),s=["mdui-button","mdui-button-icon","mdui-chip","mdui-fab","mdui-segmented-button"].includes(this.host.tagName.toLowerCase());!t&&!s&&wt(r)&&r&&!gt(n)&&(Array.isArray(n)?n.forEach(o=>{e.formData.append(r,o.toString())}):e.formData.append(r,n.toString()))}onFormSubmit(e){const t=this.options.disabled(this.host),r=this.options.reportValidity;this.form&&!this.form.noValidate&&!t&&!r(this.host)&&(e.preventDefault(),e.stopImmediatePropagation())}onFormReset(){this.form&&(this.options.setValue(this.host,this.options.defaultValue(this.host)),this.host.invalid=!1,xt.has(this.form)?xt.get(this.form).add(this.host):xt.set(this.form,new Set([this.host])))}reportFormValidity(){if(this.form&&!this.form.noValidate){const e=cm(this.form);for(const t of e)if(vt(t.reportValidity)&&!t.reportValidity())return!1}return!0}}const On=i=>{class e extends i{renderAnchor({id:r,className:n,part:s,content:o=Z`<slot></slot>`,refDirective:a,tabIndex:c}){return Z`<a ${a} id="${je(r)}" class="_a ${n||""}" part="${je(s)}" href="${je(this.href)}" download="${je(this.download)}" target="${je(this.target)}" rel="${je(this.rel)}" tabindex="${je(c)}">${o}</a>`}}return w([L({reflect:!0})],e.prototype,"href",void 0),w([L({reflect:!0})],e.prototype,"download",void 0),w([L({reflect:!0})],e.prototype,"target",void 0),w([L({reflect:!0})],e.prototype,"rel",void 0),e};let Sd=!0;const ym=ii();ym.addEventListener("pointerdown",()=>{Sd=!0});ym.addEventListener("keydown",()=>{Sd=!1});const bi=i=>{class e extends i{constructor(){super(...arguments),this.autofocus=!1,this.focused=!1,this.focusVisible=!1,this.focusableDefinedController=new At(this,{relatedElements:[""]}),this._manipulatingTabindex=!1,this._tabIndex=0}get tabIndex(){const r=oe(this);if(this.focusElement===this)return Number(r.attr("tabindex")||-1);const n=Number(r.attr("tabindex")||0);return this.focusDisabled||n<0?-1:this.focusElement?this.focusElement.tabIndex:n}set tabIndex(r){if(this._manipulatingTabindex){this._manipulatingTabindex=!1;return}const n=oe(this);if(this.focusElement===this){r!==null&&(this._tabIndex=r),n.attr("tabindex",this.focusDisabled?null:r);return}const s=()=>{this.tabIndex===-1&&(this.tabIndex=0,this.focus({preventScroll:!0}))};if(r===-1?this.addEventListener("pointerdown",s):(this._manipulatingTabindex=!0,this.removeEventListener("pointerdown",s)),r===-1||this.focusDisabled){n.attr("tabindex",-1),r!==-1&&this.manageFocusElementTabindex(r);return}this.hasAttribute("tabindex")||(this._manipulatingTabindex=!1),this.manageFocusElementTabindex(r)}get focusDisabled(){throw new Error("Must implement focusDisabled getter!")}get focusElement(){throw new Error("Must implement focusElement getter!")}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{requestAnimationFrame(()=>{this.manageAutoFocus()})})}click(){this.focusDisabled||(this.focusElement!==this?this.focusElement.click():HTMLElement.prototype.click.apply(this))}focus(r){this.focusDisabled||!this.focusElement||(this.focusElement!==this?this.focusElement.focus(r):HTMLElement.prototype.focus.apply(this,[r]))}blur(){this.focusElement!==this?this.focusElement.blur():HTMLElement.prototype.blur.apply(this)}firstUpdated(r){super.firstUpdated(r),this.focusElement.addEventListener("focus",()=>{this.focused=!0,this.focusVisible=!Sd}),this.focusElement.addEventListener("blur",()=>{this.focused=!1,this.focusVisible=!1})}update(r){if(this._lastFocusDisabled===void 0||this._lastFocusDisabled!==this.focusDisabled){this._lastFocusDisabled=this.focusDisabled;const n=oe(this);this.focusDisabled?n.removeAttr("tabindex"):this.focusElement===this?(this._manipulatingTabindex=!0,n.attr("tabindex",this._tabIndex)):this.tabIndex>-1&&n.removeAttr("tabindex")}super.update(r)}updated(r){super.updated(r),this.focused&&this.focusDisabled&&this.blur()}async manageFocusElementTabindex(r){this.focusElement||await this.updateComplete,r===null?this.focusElement.removeAttribute("tabindex"):this.focusElement.tabIndex=r}manageAutoFocus(){this.autofocus&&(this.dispatchEvent(new KeyboardEvent("keydown",{code:"Tab"})),this.focusElement.focus())}}return w([L({type:Boolean,reflect:!0,converter:we})],e.prototype,"autofocus",void 0),w([L({type:Boolean,reflect:!0,converter:we})],e.prototype,"focused",void 0),w([L({type:Boolean,reflect:!0,converter:we,attribute:"focus-visible"})],e.prototype,"focusVisible",void 0),w([L({type:Number,attribute:"tabindex"})],e.prototype,"tabIndex",null),e};/**
436
+ */const Me=()=>new v1;class v1{}const Gl=new WeakMap,De=Ln(class extends gm{render(i){return it}update(i,[e]){const t=e!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=e,this.ht=i.options?.host,this.rt(this.ct=i.element)),it}rt(i){if(this.isConnected||(i=void 0),typeof this.G=="function"){const e=this.ht??globalThis;let t=Gl.get(e);t===void 0&&(t=new WeakMap,Gl.set(e,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,i),i!==void 0&&this.G.call(this.ht,i)}else this.G.value=i}get lt(){return typeof this.G=="function"?Gl.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});function Bi(i){if(typeof i=="string"||typeof i=="number")return""+i;let e="";if(Array.isArray(i))for(let t=0,r;t<i.length;t++)(r=Bi(i[t]))!==""&&(e+=(e&&" ")+r);else for(let t in i)i[t]&&(e+=(e&&" ")+t);return e}const cs=new WeakMap,xt=new WeakMap;class lr{constructor(e,t){(this.host=e).addController(this),this.definedController=new At(e,{needDomReady:!0}),this.options={form:r=>{const n=oe(r).attr("form");return n?r.getRootNode().getElementById(n):r.closest("form")},name:r=>r.name,value:r=>r.value,defaultValue:r=>r.defaultValue,setValue:(r,n)=>r.value=n,disabled:r=>r.disabled,reportValidity:r=>vt(r.reportValidity)?r.reportValidity():!0,...t},this.onFormData=this.onFormData.bind(this),this.onFormSubmit=this.onFormSubmit.bind(this),this.onFormReset=this.onFormReset.bind(this),this.reportFormValidity=this.reportFormValidity.bind(this)}hostConnected(){this.definedController.whenDefined().then(()=>{this.form=this.options.form(this.host),this.form&&this.attachForm(this.form)})}hostDisconnected(){this.detachForm()}hostUpdated(){this.definedController.whenDefined().then(()=>{const e=this.options.form(this.host);e||this.detachForm(),e&&this.form!==e&&(this.detachForm(),this.attachForm(e))})}getForm(){return this.form??null}reset(e){this.doAction("reset",e)}submit(e){this.doAction("submit",e)}attachForm(e){if(!e){this.form=void 0;return}this.form=e,ln.has(this.form)?ln.get(this.form).add(this.host):ln.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.onFormData),this.form.addEventListener("submit",this.onFormSubmit),this.form.addEventListener("reset",this.onFormReset),cs.has(this.form)||(cs.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())}detachForm(){this.form&&(ln.get(this.form).delete(this.host),this.form.removeEventListener("formdata",this.onFormData),this.form.removeEventListener("submit",this.onFormSubmit),this.form.removeEventListener("reset",this.onFormReset),cs.has(this.form)&&!ln.get(this.form).size&&(this.form.reportValidity=cs.get(this.form),cs.delete(this.form)))}doAction(e,t){if(!this.form)return;const r=oe(`<button type="${e}">`).css({position:"absolute",width:0,height:0,clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap"}),n=r[0];t&&(n.name=t.name,n.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(s=>{r.attr(s,oe(t).attr(s))})),this.form.append(n),n.click(),n.remove()}onFormData(e){const t=this.options.disabled(this.host),r=this.options.name(this.host),n=this.options.value(this.host),s=["mdui-button","mdui-button-icon","mdui-chip","mdui-fab","mdui-segmented-button"].includes(this.host.tagName.toLowerCase());!t&&!s&&wt(r)&&r&&!gt(n)&&(Array.isArray(n)?n.forEach(o=>{e.formData.append(r,o.toString())}):e.formData.append(r,n.toString()))}onFormSubmit(e){const t=this.options.disabled(this.host),r=this.options.reportValidity;this.form&&!this.form.noValidate&&!t&&!r(this.host)&&(e.preventDefault(),e.stopImmediatePropagation())}onFormReset(){this.form&&(this.options.setValue(this.host,this.options.defaultValue(this.host)),this.host.invalid=!1,xt.has(this.form)?xt.get(this.form).add(this.host):xt.set(this.form,new Set([this.host])))}reportFormValidity(){if(this.form&&!this.form.noValidate){const e=cm(this.form);for(const t of e)if(vt(t.reportValidity)&&!t.reportValidity())return!1}return!0}}const On=i=>{class e extends i{renderAnchor({id:r,className:n,part:s,content:o=Z`<slot></slot>`,refDirective:a,tabIndex:c}){return Z`<a ${a} id="${je(r)}" class="_a ${n||""}" part="${je(s)}" href="${je(this.href)}" download="${je(this.download)}" target="${je(this.target)}" rel="${je(this.rel)}" tabindex="${je(c)}">${o}</a>`}}return w([L({reflect:!0})],e.prototype,"href",void 0),w([L({reflect:!0})],e.prototype,"download",void 0),w([L({reflect:!0})],e.prototype,"target",void 0),w([L({reflect:!0})],e.prototype,"rel",void 0),e};let Sd=!0;const ym=ii();ym.addEventListener("pointerdown",()=>{Sd=!0});ym.addEventListener("keydown",()=>{Sd=!1});const bi=i=>{class e extends i{constructor(){super(...arguments),this.autofocus=!1,this.focused=!1,this.focusVisible=!1,this.focusableDefinedController=new At(this,{relatedElements:[""]}),this._manipulatingTabindex=!1,this._tabIndex=0}get tabIndex(){const r=oe(this);if(this.focusElement===this)return Number(r.attr("tabindex")||-1);const n=Number(r.attr("tabindex")||0);return this.focusDisabled||n<0?-1:this.focusElement?this.focusElement.tabIndex:n}set tabIndex(r){if(this._manipulatingTabindex){this._manipulatingTabindex=!1;return}const n=oe(this);if(this.focusElement===this){r!==null&&(this._tabIndex=r),n.attr("tabindex",this.focusDisabled?null:r);return}const s=()=>{this.tabIndex===-1&&(this.tabIndex=0,this.focus({preventScroll:!0}))};if(r===-1?this.addEventListener("pointerdown",s):(this._manipulatingTabindex=!0,this.removeEventListener("pointerdown",s)),r===-1||this.focusDisabled){n.attr("tabindex",-1),r!==-1&&this.manageFocusElementTabindex(r);return}this.hasAttribute("tabindex")||(this._manipulatingTabindex=!1),this.manageFocusElementTabindex(r)}get focusDisabled(){throw new Error("Must implement focusDisabled getter!")}get focusElement(){throw new Error("Must implement focusElement getter!")}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{requestAnimationFrame(()=>{this.manageAutoFocus()})})}click(){this.focusDisabled||(this.focusElement!==this?this.focusElement.click():HTMLElement.prototype.click.apply(this))}focus(r){this.focusDisabled||!this.focusElement||(this.focusElement!==this?this.focusElement.focus(r):HTMLElement.prototype.focus.apply(this,[r]))}blur(){this.focusElement!==this?this.focusElement.blur():HTMLElement.prototype.blur.apply(this)}firstUpdated(r){super.firstUpdated(r),this.focusElement.addEventListener("focus",()=>{this.focused=!0,this.focusVisible=!Sd}),this.focusElement.addEventListener("blur",()=>{this.focused=!1,this.focusVisible=!1})}update(r){if(this._lastFocusDisabled===void 0||this._lastFocusDisabled!==this.focusDisabled){this._lastFocusDisabled=this.focusDisabled;const n=oe(this);this.focusDisabled?n.removeAttr("tabindex"):this.focusElement===this?(this._manipulatingTabindex=!0,n.attr("tabindex",this._tabIndex)):this.tabIndex>-1&&n.removeAttr("tabindex")}super.update(r)}updated(r){super.updated(r),this.focused&&this.focusDisabled&&this.blur()}async manageFocusElementTabindex(r){this.focusElement||await this.updateComplete,r===null?this.focusElement.removeAttribute("tabindex"):this.focusElement.tabIndex=r}manageAutoFocus(){this.autofocus&&(this.dispatchEvent(new KeyboardEvent("keydown",{code:"Tab"})),this.focusElement.focus())}}return w([L({type:Boolean,reflect:!0,converter:we})],e.prototype,"autofocus",void 0),w([L({type:Boolean,reflect:!0,converter:we})],e.prototype,"focused",void 0),w([L({type:Boolean,reflect:!0,converter:we,attribute:"focus-visible"})],e.prototype,"focusVisible",void 0),w([L({type:Number,attribute:"tabindex"})],e.prototype,"tabIndex",null),e};/**
437
437
  * @license
438
438
  * Copyright 2018 Google LLC
439
439
  * SPDX-License-Identifier: BSD-3-Clause
440
- */const bt=Ln(class extends Hs{constructor(i){if(super(i),i.type!==Mi.ATTRIBUTE||i.name!=="class"||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(e=>i[e]).join(" ")+" "}update(i,[e]){if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in e)e[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(e)}const t=i.element.classList;for(const r of this.st)r in e||(t.remove(r),this.st.delete(r));for(const r in e){const n=!!e[r];n===this.st.has(r)||this.nt?.has(r)||(n?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return Vt}}),_1=$e`:host{position:relative;display:inline-block;flex-shrink:0;width:2.5rem;height:2.5rem;stroke:rgb(var(--mdui-color-primary))}.progress{position:relative;display:inline-block;width:100%;height:100%;text-align:left;transition:opacity var(--mdui-motion-duration-medium1) var(--mdui-motion-easing-linear)}.determinate svg{transform:rotate(-90deg);fill:transparent}.determinate .track{stroke:transparent}.determinate .circle{stroke:inherit;transition:stroke-dashoffset var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard)}.indeterminate{font-size:0;letter-spacing:0;white-space:nowrap;animation:mdui-comp-circular-progress-rotate 1568ms var(--mdui-motion-easing-linear) infinite}.indeterminate .circle,.indeterminate .layer{position:absolute;width:100%;height:100%}.indeterminate .layer{animation:mdui-comp-circular-progress-layer-rotate 5332ms var(--mdui-motion-easing-standard) infinite both}.indeterminate .circle{fill:transparent;stroke:inherit}.indeterminate .gap-patch{position:absolute;top:0;left:47.5%;width:5%;height:100%;overflow:hidden}.indeterminate .gap-patch .circle{left:-900%;width:2000%;transform:rotate(180deg)}.indeterminate .clipper{position:relative;display:inline-block;width:50%;height:100%;overflow:hidden}.indeterminate .clipper .circle{width:200%}.indeterminate .clipper.left .circle{animation:mdui-comp-circular-progress-left-spin 1333ms var(--mdui-motion-easing-standard) infinite both}.indeterminate .clipper.right .circle{left:-100%;animation:mdui-comp-circular-progress-right-spin 1333ms var(--mdui-motion-easing-standard) infinite both}@keyframes mdui-comp-circular-progress-rotate{to{transform:rotate(360deg)}}@keyframes mdui-comp-circular-progress-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdui-comp-circular-progress-left-spin{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes mdui-comp-circular-progress-right-spin{0%{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}100%{transform:rotate(-265deg)}}`;let Ns=class extends Ke{constructor(){super(...arguments),this.max=1}render(){const e=!gt(this.value);return Z`<div class="progress ${bt({determinate:e,indeterminate:!e})}">${e?this.renderDeterminate():this.renderInDeterminate()}</div>`}renderDeterminate(){const e=this.value,t=4,r=18,n=3.1415926,s=r+t/2,o=2*n*r,a=(1-e/Math.max(this.max??e,e))*o;return Z`<svg viewBox="0 0 ${s*2} ${s*2}"><circle class="track" cx="${s}" cy="${s}" r="${r}" stroke-width="${t}"></circle><circle class="circle" cx="${s}" cy="${s}" r="${r}" stroke-dasharray="${2*n*r}" stroke-dashoffset="${a}" stroke-width="${t}"></circle></svg>`}renderInDeterminate(){const r=3.1415926,n=18+4/2,s=2*r*18,o=.5*s,a=c=>Z`<svg class="circle" viewBox="0 0 ${n*2} ${n*2}"><circle cx="${n}" cy="${n}" r="${18}" stroke-dasharray="${s}" stroke-dashoffset="${o}" stroke-width="${c}"></circle></svg>`;return Z`<div class="layer"><div class="clipper left">${a(4)}</div><div class="gap-patch">${a(4*.8)}</div><div class="clipper right">${a(4)}</div></div>`}};Ns.styles=[qe,_1];w([L({type:Number,reflect:!0})],Ns.prototype,"max",void 0);w([L({type:Number})],Ns.prototype,"value",void 0);Ns=w([Ae("mdui-circular-progress")],Ns);const x1=$e`:host{position:absolute;top:0;left:0;display:block;width:100%;height:100%;overflow:hidden;pointer-events:none}.surface{position:absolute;top:0;left:0;width:100%;height:100%;transition-duration:280ms;transition-property:background-color;pointer-events:none;transition-timing-function:var(--mdui-motion-easing-standard)}.hover{background-color:rgba(var(--mdui-comp-ripple-state-layer-color,var(--mdui-color-on-surface)),var(--mdui-state-layer-hover))}:host-context([focus-visible]) .focused{background-color:rgba(var(--mdui-comp-ripple-state-layer-color,var(--mdui-color-on-surface)),var(--mdui-state-layer-focus))}.dragged{background-color:rgba(var(--mdui-comp-ripple-state-layer-color,var(--mdui-color-on-surface)),var(--mdui-state-layer-dragged))}.wave{position:absolute;z-index:1;background-color:rgb(var(--mdui-comp-ripple-state-layer-color,var(--mdui-color-on-surface)));border-radius:50%;transform:translate3d(0,0,0) scale(.4);opacity:0;animation:225ms ease 0s 1 normal forwards running mdui-comp-ripple-radius-in,75ms ease 0s 1 normal forwards running mdui-comp-ripple-opacity-in;pointer-events:none}.out{transform:translate3d(var(--mdui-comp-ripple-transition-x,0),var(--mdui-comp-ripple-transition-y,0),0) scale(1);animation:150ms ease 0s 1 normal none running mdui-comp-ripple-opacity-out}@keyframes mdui-comp-ripple-radius-in{from{transform:translate3d(0,0,0) scale(.4);animation-timing-function:var(--mdui-motion-easing-standard)}to{transform:translate3d(var(--mdui-comp-ripple-transition-x,0),var(--mdui-comp-ripple-transition-y,0),0) scale(1)}}@keyframes mdui-comp-ripple-opacity-in{from{opacity:0;animation-timing-function:linear}to{opacity:var(--mdui-state-layer-pressed)}}@keyframes mdui-comp-ripple-opacity-out{from{animation-timing-function:linear;opacity:var(--mdui-state-layer-pressed)}to{opacity:0}}`;let Wr=class extends Ke{constructor(){super(...arguments),this.noRipple=!1,this.hover=!1,this.focused=!1,this.dragged=!1,this.surfaceRef=Me()}startPress(e){if(this.noRipple)return;const t=oe(this.surfaceRef.value),r=t.innerHeight(),n=t.innerWidth();let s,o;if(!e)s=n/2,o=r/2;else{const u=typeof TouchEvent<"u"&&e instanceof TouchEvent&&e.touches.length?e.touches[0]:e,p=t.offset();if(u.pageX<p.left||u.pageX>p.left+n||u.pageY<p.top||u.pageY>p.top+r)return;s=u.pageX-p.left,o=u.pageY-p.top}const a=Math.max(Math.pow(Math.pow(r,2)+Math.pow(n,2),.5),48),c=`${-s+n/2}px`,l=`${-o+r/2}px`,d=`translate3d(${c}, ${l}, 0) scale(1)`;oe('<div class="wave"></div>').css({width:a,height:a,marginTop:-a/2,marginLeft:-a/2,left:s,top:o}).each((u,p)=>{p.style.setProperty("--mdui-comp-ripple-transition-x",c),p.style.setProperty("--mdui-comp-ripple-transition-y",l)}).prependTo(this.surfaceRef.value).each((u,p)=>p.clientLeft).css("transform",d).on("animationend",function(u){u.animationName==="mdui-comp-ripple-radius-in"&&oe(this).data("filled",!0)})}endPress(){const e=oe(this.surfaceRef.value).children().filter((r,n)=>!oe(n).data("removing")).data("removing",!0),t=r=>{r.addClass("out").each((n,s)=>s.clientLeft).on("animationend",function(){oe(this).remove()})};e.filter((r,n)=>!oe(n).data("filled")).on("animationend",function(r){r.animationName==="mdui-comp-ripple-radius-in"&&t(oe(this))}),t(e.filter((r,n)=>!!oe(n).data("filled")))}startHover(){this.hover=!0}endHover(){this.hover=!1}startFocus(){this.focused=!0}endFocus(){this.focused=!1}startDrag(){this.dragged=!0}endDrag(){this.dragged=!1}render(){return Z`<div ${De(this.surfaceRef)} class="surface ${bt({hover:this.hover,focused:this.focused,dragged:this.dragged})}"></div>`}};Wr.styles=[qe,x1];w([L({type:Boolean,reflect:!0,converter:we,attribute:"no-ripple"})],Wr.prototype,"noRipple",void 0);w([Be()],Wr.prototype,"hover",void 0);w([Be()],Wr.prototype,"focused",void 0);w([Be()],Wr.prototype,"dragged",void 0);Wr=w([Ae("mdui-ripple")],Wr);const Di=i=>{class e extends i{constructor(){super(...arguments),this.noRipple=!1,this.rippleIndex=void 0,this.getRippleIndex=()=>this.rippleIndex}get rippleElement(){throw new Error("Must implement rippleElement getter!")}get rippleDisabled(){throw new Error("Must implement rippleDisabled getter!")}get rippleTarget(){return this}firstUpdated(r){super.firstUpdated(r);const n=oe(this.rippleTarget),s=a=>{un(this.rippleTarget)&&(this.rippleIndex=n.index(a.target))};(un(this.rippleTarget)?this.rippleTarget:[this.rippleTarget]).forEach(a=>{a.addEventListener("pointerdown",c=>{s(c),this.startPress(c)}),a.addEventListener("pointerenter",c=>{s(c),this.startHover(c)}),a.addEventListener("pointerleave",c=>{s(c),this.endHover(c)}),a.addEventListener("focus",c=>{s(c),this.startFocus()}),a.addEventListener("blur",c=>{s(c),this.endFocus()})})}startHover(r){r.pointerType!=="mouse"||this.isRippleDisabled()||(this.getRippleTarget().setAttribute("hover",""),this.getRippleElement().startHover())}endHover(r){r.pointerType!=="mouse"||this.isRippleDisabled()||(this.getRippleTarget().removeAttribute("hover"),this.getRippleElement().endHover())}isRippleDisabled(){const r=this.rippleDisabled;if(!Array.isArray(r))return r;const n=this.getRippleIndex();return n!==void 0?r[n]:r.length?r[0]:!1}getRippleElement(){const r=this.rippleElement;if(!un(r))return r;const n=this.getRippleIndex();return n!==void 0?r[n]:r[0]}getRippleTarget(){const r=this.rippleTarget;if(!un(r))return r;const n=this.getRippleIndex();return n!==void 0?r[n]:r[0]}startFocus(){this.isRippleDisabled()||this.getRippleElement().startFocus()}endFocus(){this.isRippleDisabled()||this.getRippleElement().endFocus()}startPress(r){if(this.isRippleDisabled()||r.button)return;const n=this.getRippleTarget();if(n.setAttribute("pressed",""),["touch","pen"].includes(r.pointerType)){let s=!1,o=setTimeout(()=>{o=0,this.getRippleElement().startPress(r)},70);const a=()=>{o&&(clearTimeout(o),o=0,this.getRippleElement().startPress(r)),s||(s=!0,this.endPress()),n.removeEventListener("pointerup",a),n.removeEventListener("pointercancel",a)},c=()=>{o&&(clearTimeout(o),o=0),n.removeEventListener("touchmove",c)};n.addEventListener("touchmove",c),n.addEventListener("pointerup",a),n.addEventListener("pointercancel",a)}if(r.pointerType==="mouse"&&r.button===0){const s=()=>{this.endPress(),n.removeEventListener("pointerup",s),n.removeEventListener("pointercancel",s),n.removeEventListener("pointerleave",s)};this.getRippleElement().startPress(r),n.addEventListener("pointerup",s),n.addEventListener("pointercancel",s),n.addEventListener("pointerleave",s)}}endPress(){this.isRippleDisabled()||(this.getRippleTarget().removeAttribute("pressed"),this.getRippleElement().endPress())}startDrag(){this.isRippleDisabled()||this.getRippleElement().startDrag()}endDrag(){this.isRippleDisabled()||this.getRippleElement().endDrag()}}return w([L({type:Boolean,reflect:!0,converter:we,attribute:"no-ripple"})],e.prototype,"noRipple",void 0),e},E1=$e`.button{position:relative;display:inline-flex;align-items:center;justify-content:center;height:100%;padding:0;overflow:hidden;color:inherit;font-size:inherit;font-family:inherit;font-weight:inherit;letter-spacing:inherit;white-space:nowrap;text-align:center;text-decoration:none;vertical-align:middle;background:0 0;border:none;outline:0;cursor:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none}`;class pt extends On(Di(bi(Ke))){constructor(){super(...arguments),this.disabled=!1,this.loading=!1,this.name="",this.value="",this.type="button",this.formNoValidate=!1,this.formController=new lr(this)}get validity(){if(this.isButton())return this.focusElement.validity}get validationMessage(){if(this.isButton())return this.focusElement.validationMessage}get rippleDisabled(){return this.disabled||this.loading}get focusElement(){return this.isButton()?this.renderRoot?.querySelector("._button"):this.focusDisabled?this:this.renderRoot?.querySelector("._a")}get focusDisabled(){return this.disabled||this.loading}checkValidity(){if(this.isButton()){const e=this.focusElement.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}return!0}reportValidity(){if(this.isButton()){const e=!this.focusElement.reportValidity();return e&&this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),!e}return!0}setCustomValidity(e){this.isButton()&&this.focusElement.setCustomValidity(e)}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",()=>{this.type==="submit"&&this.formController.submit(this),this.type==="reset"&&this.formController.reset(this)})}renderLoading(){return this.loading?Z`<mdui-circular-progress part="loading"></mdui-circular-progress>`:Qe}renderButton({id:e,className:t,part:r,content:n=Z`<slot></slot>`}){return Z`<button id="${je(e)}" class="${Bi(["_button",t])}" part="${je(r)}" ?disabled="${this.rippleDisabled||this.focusDisabled}">${n}</button>`}isButton(){return!this.href}}pt.styles=[qe,E1];w([L({type:Boolean,reflect:!0,converter:we})],pt.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],pt.prototype,"loading",void 0);w([L({reflect:!0})],pt.prototype,"name",void 0);w([L({reflect:!0})],pt.prototype,"value",void 0);w([L({reflect:!0})],pt.prototype,"type",void 0);w([L({reflect:!0})],pt.prototype,"form",void 0);w([L({reflect:!0,attribute:"formaction"})],pt.prototype,"formAction",void 0);w([L({reflect:!0,attribute:"formenctype"})],pt.prototype,"formEnctype",void 0);w([L({reflect:!0,attribute:"formmethod"})],pt.prototype,"formMethod",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"formnovalidate"})],pt.prototype,"formNoValidate",void 0);w([L({reflect:!0,attribute:"formtarget"})],pt.prototype,"formTarget",void 0);const S1=$e`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);min-width:3rem;height:2.5rem;color:rgb(var(--mdui-color-primary));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.button{width:100%;padding:0 1rem}:host([full-width]:not([full-width=false i])){display:block}:host([variant=elevated]){box-shadow:var(--mdui-elevation-level1);background-color:rgb(var(--mdui-color-surface-container-low));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=filled]){color:rgb(var(--mdui-color-on-primary));background-color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-primary)}:host([variant=tonal]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var(
440
+ */const bt=Ln(class extends Hs{constructor(i){if(super(i),i.type!==Mi.ATTRIBUTE||i.name!=="class"||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(e=>i[e]).join(" ")+" "}update(i,[e]){if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in e)e[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(e)}const t=i.element.classList;for(const r of this.st)r in e||(t.remove(r),this.st.delete(r));for(const r in e){const n=!!e[r];n===this.st.has(r)||this.nt?.has(r)||(n?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return Vt}}),w1=$e`:host{position:relative;display:inline-block;flex-shrink:0;width:2.5rem;height:2.5rem;stroke:rgb(var(--mdui-color-primary))}.progress{position:relative;display:inline-block;width:100%;height:100%;text-align:left;transition:opacity var(--mdui-motion-duration-medium1) var(--mdui-motion-easing-linear)}.determinate svg{transform:rotate(-90deg);fill:transparent}.determinate .track{stroke:transparent}.determinate .circle{stroke:inherit;transition:stroke-dashoffset var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard)}.indeterminate{font-size:0;letter-spacing:0;white-space:nowrap;animation:mdui-comp-circular-progress-rotate 1568ms var(--mdui-motion-easing-linear) infinite}.indeterminate .circle,.indeterminate .layer{position:absolute;width:100%;height:100%}.indeterminate .layer{animation:mdui-comp-circular-progress-layer-rotate 5332ms var(--mdui-motion-easing-standard) infinite both}.indeterminate .circle{fill:transparent;stroke:inherit}.indeterminate .gap-patch{position:absolute;top:0;left:47.5%;width:5%;height:100%;overflow:hidden}.indeterminate .gap-patch .circle{left:-900%;width:2000%;transform:rotate(180deg)}.indeterminate .clipper{position:relative;display:inline-block;width:50%;height:100%;overflow:hidden}.indeterminate .clipper .circle{width:200%}.indeterminate .clipper.left .circle{animation:mdui-comp-circular-progress-left-spin 1333ms var(--mdui-motion-easing-standard) infinite both}.indeterminate .clipper.right .circle{left:-100%;animation:mdui-comp-circular-progress-right-spin 1333ms var(--mdui-motion-easing-standard) infinite both}@keyframes mdui-comp-circular-progress-rotate{to{transform:rotate(360deg)}}@keyframes mdui-comp-circular-progress-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdui-comp-circular-progress-left-spin{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes mdui-comp-circular-progress-right-spin{0%{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}100%{transform:rotate(-265deg)}}`;let Ns=class extends Ke{constructor(){super(...arguments),this.max=1}render(){const e=!gt(this.value);return Z`<div class="progress ${bt({determinate:e,indeterminate:!e})}">${e?this.renderDeterminate():this.renderInDeterminate()}</div>`}renderDeterminate(){const e=this.value,t=4,r=18,n=3.1415926,s=r+t/2,o=2*n*r,a=(1-e/Math.max(this.max??e,e))*o;return Z`<svg viewBox="0 0 ${s*2} ${s*2}"><circle class="track" cx="${s}" cy="${s}" r="${r}" stroke-width="${t}"></circle><circle class="circle" cx="${s}" cy="${s}" r="${r}" stroke-dasharray="${2*n*r}" stroke-dashoffset="${a}" stroke-width="${t}"></circle></svg>`}renderInDeterminate(){const r=3.1415926,n=18+4/2,s=2*r*18,o=.5*s,a=c=>Z`<svg class="circle" viewBox="0 0 ${n*2} ${n*2}"><circle cx="${n}" cy="${n}" r="${18}" stroke-dasharray="${s}" stroke-dashoffset="${o}" stroke-width="${c}"></circle></svg>`;return Z`<div class="layer"><div class="clipper left">${a(4)}</div><div class="gap-patch">${a(4*.8)}</div><div class="clipper right">${a(4)}</div></div>`}};Ns.styles=[qe,w1];w([L({type:Number,reflect:!0})],Ns.prototype,"max",void 0);w([L({type:Number})],Ns.prototype,"value",void 0);Ns=w([Ae("mdui-circular-progress")],Ns);const _1=$e`:host{position:absolute;top:0;left:0;display:block;width:100%;height:100%;overflow:hidden;pointer-events:none}.surface{position:absolute;top:0;left:0;width:100%;height:100%;transition-duration:280ms;transition-property:background-color;pointer-events:none;transition-timing-function:var(--mdui-motion-easing-standard)}.hover{background-color:rgba(var(--mdui-comp-ripple-state-layer-color,var(--mdui-color-on-surface)),var(--mdui-state-layer-hover))}:host-context([focus-visible]) .focused{background-color:rgba(var(--mdui-comp-ripple-state-layer-color,var(--mdui-color-on-surface)),var(--mdui-state-layer-focus))}.dragged{background-color:rgba(var(--mdui-comp-ripple-state-layer-color,var(--mdui-color-on-surface)),var(--mdui-state-layer-dragged))}.wave{position:absolute;z-index:1;background-color:rgb(var(--mdui-comp-ripple-state-layer-color,var(--mdui-color-on-surface)));border-radius:50%;transform:translate3d(0,0,0) scale(.4);opacity:0;animation:225ms ease 0s 1 normal forwards running mdui-comp-ripple-radius-in,75ms ease 0s 1 normal forwards running mdui-comp-ripple-opacity-in;pointer-events:none}.out{transform:translate3d(var(--mdui-comp-ripple-transition-x,0),var(--mdui-comp-ripple-transition-y,0),0) scale(1);animation:150ms ease 0s 1 normal none running mdui-comp-ripple-opacity-out}@keyframes mdui-comp-ripple-radius-in{from{transform:translate3d(0,0,0) scale(.4);animation-timing-function:var(--mdui-motion-easing-standard)}to{transform:translate3d(var(--mdui-comp-ripple-transition-x,0),var(--mdui-comp-ripple-transition-y,0),0) scale(1)}}@keyframes mdui-comp-ripple-opacity-in{from{opacity:0;animation-timing-function:linear}to{opacity:var(--mdui-state-layer-pressed)}}@keyframes mdui-comp-ripple-opacity-out{from{animation-timing-function:linear;opacity:var(--mdui-state-layer-pressed)}to{opacity:0}}`;let Wr=class extends Ke{constructor(){super(...arguments),this.noRipple=!1,this.hover=!1,this.focused=!1,this.dragged=!1,this.surfaceRef=Me()}startPress(e){if(this.noRipple)return;const t=oe(this.surfaceRef.value),r=t.innerHeight(),n=t.innerWidth();let s,o;if(!e)s=n/2,o=r/2;else{const u=typeof TouchEvent<"u"&&e instanceof TouchEvent&&e.touches.length?e.touches[0]:e,p=t.offset();if(u.pageX<p.left||u.pageX>p.left+n||u.pageY<p.top||u.pageY>p.top+r)return;s=u.pageX-p.left,o=u.pageY-p.top}const a=Math.max(Math.pow(Math.pow(r,2)+Math.pow(n,2),.5),48),c=`${-s+n/2}px`,l=`${-o+r/2}px`,d=`translate3d(${c}, ${l}, 0) scale(1)`;oe('<div class="wave"></div>').css({width:a,height:a,marginTop:-a/2,marginLeft:-a/2,left:s,top:o}).each((u,p)=>{p.style.setProperty("--mdui-comp-ripple-transition-x",c),p.style.setProperty("--mdui-comp-ripple-transition-y",l)}).prependTo(this.surfaceRef.value).each((u,p)=>p.clientLeft).css("transform",d).on("animationend",function(u){u.animationName==="mdui-comp-ripple-radius-in"&&oe(this).data("filled",!0)})}endPress(){const e=oe(this.surfaceRef.value).children().filter((r,n)=>!oe(n).data("removing")).data("removing",!0),t=r=>{r.addClass("out").each((n,s)=>s.clientLeft).on("animationend",function(){oe(this).remove()})};e.filter((r,n)=>!oe(n).data("filled")).on("animationend",function(r){r.animationName==="mdui-comp-ripple-radius-in"&&t(oe(this))}),t(e.filter((r,n)=>!!oe(n).data("filled")))}startHover(){this.hover=!0}endHover(){this.hover=!1}startFocus(){this.focused=!0}endFocus(){this.focused=!1}startDrag(){this.dragged=!0}endDrag(){this.dragged=!1}render(){return Z`<div ${De(this.surfaceRef)} class="surface ${bt({hover:this.hover,focused:this.focused,dragged:this.dragged})}"></div>`}};Wr.styles=[qe,_1];w([L({type:Boolean,reflect:!0,converter:we,attribute:"no-ripple"})],Wr.prototype,"noRipple",void 0);w([Be()],Wr.prototype,"hover",void 0);w([Be()],Wr.prototype,"focused",void 0);w([Be()],Wr.prototype,"dragged",void 0);Wr=w([Ae("mdui-ripple")],Wr);const Di=i=>{class e extends i{constructor(){super(...arguments),this.noRipple=!1,this.rippleIndex=void 0,this.getRippleIndex=()=>this.rippleIndex}get rippleElement(){throw new Error("Must implement rippleElement getter!")}get rippleDisabled(){throw new Error("Must implement rippleDisabled getter!")}get rippleTarget(){return this}firstUpdated(r){super.firstUpdated(r);const n=oe(this.rippleTarget),s=a=>{un(this.rippleTarget)&&(this.rippleIndex=n.index(a.target))};(un(this.rippleTarget)?this.rippleTarget:[this.rippleTarget]).forEach(a=>{a.addEventListener("pointerdown",c=>{s(c),this.startPress(c)}),a.addEventListener("pointerenter",c=>{s(c),this.startHover(c)}),a.addEventListener("pointerleave",c=>{s(c),this.endHover(c)}),a.addEventListener("focus",c=>{s(c),this.startFocus()}),a.addEventListener("blur",c=>{s(c),this.endFocus()})})}startHover(r){r.pointerType!=="mouse"||this.isRippleDisabled()||(this.getRippleTarget().setAttribute("hover",""),this.getRippleElement().startHover())}endHover(r){r.pointerType!=="mouse"||this.isRippleDisabled()||(this.getRippleTarget().removeAttribute("hover"),this.getRippleElement().endHover())}isRippleDisabled(){const r=this.rippleDisabled;if(!Array.isArray(r))return r;const n=this.getRippleIndex();return n!==void 0?r[n]:r.length?r[0]:!1}getRippleElement(){const r=this.rippleElement;if(!un(r))return r;const n=this.getRippleIndex();return n!==void 0?r[n]:r[0]}getRippleTarget(){const r=this.rippleTarget;if(!un(r))return r;const n=this.getRippleIndex();return n!==void 0?r[n]:r[0]}startFocus(){this.isRippleDisabled()||this.getRippleElement().startFocus()}endFocus(){this.isRippleDisabled()||this.getRippleElement().endFocus()}startPress(r){if(this.isRippleDisabled()||r.button)return;const n=this.getRippleTarget();if(n.setAttribute("pressed",""),["touch","pen"].includes(r.pointerType)){let s=!1,o=setTimeout(()=>{o=0,this.getRippleElement().startPress(r)},70);const a=()=>{o&&(clearTimeout(o),o=0,this.getRippleElement().startPress(r)),s||(s=!0,this.endPress()),n.removeEventListener("pointerup",a),n.removeEventListener("pointercancel",a)},c=()=>{o&&(clearTimeout(o),o=0),n.removeEventListener("touchmove",c)};n.addEventListener("touchmove",c),n.addEventListener("pointerup",a),n.addEventListener("pointercancel",a)}if(r.pointerType==="mouse"&&r.button===0){const s=()=>{this.endPress(),n.removeEventListener("pointerup",s),n.removeEventListener("pointercancel",s),n.removeEventListener("pointerleave",s)};this.getRippleElement().startPress(r),n.addEventListener("pointerup",s),n.addEventListener("pointercancel",s),n.addEventListener("pointerleave",s)}}endPress(){this.isRippleDisabled()||(this.getRippleTarget().removeAttribute("pressed"),this.getRippleElement().endPress())}startDrag(){this.isRippleDisabled()||this.getRippleElement().startDrag()}endDrag(){this.isRippleDisabled()||this.getRippleElement().endDrag()}}return w([L({type:Boolean,reflect:!0,converter:we,attribute:"no-ripple"})],e.prototype,"noRipple",void 0),e},x1=$e`.button{position:relative;display:inline-flex;align-items:center;justify-content:center;height:100%;padding:0;overflow:hidden;color:inherit;font-size:inherit;font-family:inherit;font-weight:inherit;letter-spacing:inherit;white-space:nowrap;text-align:center;text-decoration:none;vertical-align:middle;background:0 0;border:none;outline:0;cursor:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none}`;class pt extends On(Di(bi(Ke))){constructor(){super(...arguments),this.disabled=!1,this.loading=!1,this.name="",this.value="",this.type="button",this.formNoValidate=!1,this.formController=new lr(this)}get validity(){if(this.isButton())return this.focusElement.validity}get validationMessage(){if(this.isButton())return this.focusElement.validationMessage}get rippleDisabled(){return this.disabled||this.loading}get focusElement(){return this.isButton()?this.renderRoot?.querySelector("._button"):this.focusDisabled?this:this.renderRoot?.querySelector("._a")}get focusDisabled(){return this.disabled||this.loading}checkValidity(){if(this.isButton()){const e=this.focusElement.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}return!0}reportValidity(){if(this.isButton()){const e=!this.focusElement.reportValidity();return e&&this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),!e}return!0}setCustomValidity(e){this.isButton()&&this.focusElement.setCustomValidity(e)}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",()=>{this.type==="submit"&&this.formController.submit(this),this.type==="reset"&&this.formController.reset(this)})}renderLoading(){return this.loading?Z`<mdui-circular-progress part="loading"></mdui-circular-progress>`:Qe}renderButton({id:e,className:t,part:r,content:n=Z`<slot></slot>`}){return Z`<button id="${je(e)}" class="${Bi(["_button",t])}" part="${je(r)}" ?disabled="${this.rippleDisabled||this.focusDisabled}">${n}</button>`}isButton(){return!this.href}}pt.styles=[qe,x1];w([L({type:Boolean,reflect:!0,converter:we})],pt.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],pt.prototype,"loading",void 0);w([L({reflect:!0})],pt.prototype,"name",void 0);w([L({reflect:!0})],pt.prototype,"value",void 0);w([L({reflect:!0})],pt.prototype,"type",void 0);w([L({reflect:!0})],pt.prototype,"form",void 0);w([L({reflect:!0,attribute:"formaction"})],pt.prototype,"formAction",void 0);w([L({reflect:!0,attribute:"formenctype"})],pt.prototype,"formEnctype",void 0);w([L({reflect:!0,attribute:"formmethod"})],pt.prototype,"formMethod",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"formnovalidate"})],pt.prototype,"formNoValidate",void 0);w([L({reflect:!0,attribute:"formtarget"})],pt.prototype,"formTarget",void 0);const E1=$e`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);min-width:3rem;height:2.5rem;color:rgb(var(--mdui-color-primary));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.button{width:100%;padding:0 1rem}:host([full-width]:not([full-width=false i])){display:block}:host([variant=elevated]){box-shadow:var(--mdui-elevation-level1);background-color:rgb(var(--mdui-color-surface-container-low));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=filled]){color:rgb(var(--mdui-color-on-primary));background-color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-primary)}:host([variant=tonal]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var(
441
441
  --mdui-color-on-secondary-container
442
- )}:host([variant=outlined]){border:.0625rem solid rgb(var(--mdui-color-outline));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=text]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=outlined][focus-visible]){border-color:rgb(var(--mdui-color-primary))}:host([variant=elevated][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=filled][hover]),:host([variant=tonal][hover]){box-shadow:var(--mdui-elevation-level1)}:host([disabled]:not([disabled=false i])),:host([loading]:not([loading=false i])){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])){color:rgba(var(--mdui-color-on-surface),38%);box-shadow:var(--mdui-elevation-level0)}:host([variant=elevated][disabled]:not([disabled=false i])),:host([variant=filled][disabled]:not([disabled=false i])),:host([variant=tonal][disabled]:not([disabled=false i])){background-color:rgba(var(--mdui-color-on-surface),12%)}:host([variant=outlined][disabled]:not([disabled=false i])){border-color:rgba(var(--mdui-color-on-surface),12%)}.label{display:inline-flex;padding-right:.5rem;padding-left:.5rem}.end-icon,.icon{display:inline-flex;font-size:1.28571429em}.end-icon mdui-icon,.icon mdui-icon,::slotted([slot=end-icon]),::slotted([slot=icon]){font-size:inherit}mdui-circular-progress{display:inline-flex;width:1.125rem;height:1.125rem}:host([variant=filled]) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-primary))}:host([variant=tonal]) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-secondary-container))}:host([disabled]:not([disabled=false i])) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;let ir=class extends pt{constructor(){super(...arguments),this.variant="filled",this.fullWidth=!1,this.rippleRef=Me()}get rippleElement(){return this.rippleRef.value}render(){return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.isButton()?this.renderButton({className:"button",part:"button",content:this.renderInner()}):this.disabled||this.loading?Z`<span part="button" class="button _a">${this.renderInner()}</span>`:this.renderAnchor({className:"button",part:"button",content:this.renderInner()})}`}renderIcon(){return this.loading?this.renderLoading():Z`<slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}"></mdui-icon>`:Qe}</slot>`}renderLabel(){return Z`<slot part="label" class="label"></slot>`}renderEndIcon(){return Z`<slot name="end-icon" part="end-icon" class="end-icon">${this.endIcon?Z`<mdui-icon name="${this.endIcon}"></mdui-icon>`:Qe}</slot>`}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon()]}};ir.styles=[pt.styles,S1];w([L({reflect:!0})],ir.prototype,"variant",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"full-width"})],ir.prototype,"fullWidth",void 0);w([L({reflect:!0})],ir.prototype,"icon",void 0);w([L({reflect:!0,attribute:"end-icon"})],ir.prototype,"endIcon",void 0);ir=w([Ae("mdui-button")],ir);const k1=$e`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;font-size:1.5rem;width:2.5rem;height:2.5rem}:host([variant=standard]){color:rgb(var(--mdui-color-on-surface-variant));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=filled]){color:rgb(var(--mdui-color-primary));background-color:rgb(var(--mdui-color-surface-container-highest));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=tonal]){color:rgb(var(--mdui-color-on-surface-variant));background-color:rgb(var(--mdui-color-surface-container-highest));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=outlined]){border:.0625rem solid rgb(var(--mdui-color-outline));color:rgb(var(--mdui-color-on-surface-variant));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=outlined][pressed]){color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([variant=standard][selected]:not([selected=false i])){color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=filled]:not([selectable])),:host([variant=filled][selectable=false i]),:host([variant=filled][selected]:not([selected=false i])){color:rgb(var(--mdui-color-on-primary));background-color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-primary)}:host([variant=tonal]:not([selectable])),:host([variant=tonal][selectable=false i]),:host([variant=tonal][selected]:not([selected=false i])){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var(
442
+ )}:host([variant=outlined]){border:.0625rem solid rgb(var(--mdui-color-outline));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=text]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=outlined][focus-visible]){border-color:rgb(var(--mdui-color-primary))}:host([variant=elevated][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=filled][hover]),:host([variant=tonal][hover]){box-shadow:var(--mdui-elevation-level1)}:host([disabled]:not([disabled=false i])),:host([loading]:not([loading=false i])){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])){color:rgba(var(--mdui-color-on-surface),38%);box-shadow:var(--mdui-elevation-level0)}:host([variant=elevated][disabled]:not([disabled=false i])),:host([variant=filled][disabled]:not([disabled=false i])),:host([variant=tonal][disabled]:not([disabled=false i])){background-color:rgba(var(--mdui-color-on-surface),12%)}:host([variant=outlined][disabled]:not([disabled=false i])){border-color:rgba(var(--mdui-color-on-surface),12%)}.label{display:inline-flex;padding-right:.5rem;padding-left:.5rem}.end-icon,.icon{display:inline-flex;font-size:1.28571429em}.end-icon mdui-icon,.icon mdui-icon,::slotted([slot=end-icon]),::slotted([slot=icon]){font-size:inherit}mdui-circular-progress{display:inline-flex;width:1.125rem;height:1.125rem}:host([variant=filled]) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-primary))}:host([variant=tonal]) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-secondary-container))}:host([disabled]:not([disabled=false i])) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;let ir=class extends pt{constructor(){super(...arguments),this.variant="filled",this.fullWidth=!1,this.rippleRef=Me()}get rippleElement(){return this.rippleRef.value}render(){return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.isButton()?this.renderButton({className:"button",part:"button",content:this.renderInner()}):this.disabled||this.loading?Z`<span part="button" class="button _a">${this.renderInner()}</span>`:this.renderAnchor({className:"button",part:"button",content:this.renderInner()})}`}renderIcon(){return this.loading?this.renderLoading():Z`<slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}"></mdui-icon>`:Qe}</slot>`}renderLabel(){return Z`<slot part="label" class="label"></slot>`}renderEndIcon(){return Z`<slot name="end-icon" part="end-icon" class="end-icon">${this.endIcon?Z`<mdui-icon name="${this.endIcon}"></mdui-icon>`:Qe}</slot>`}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon()]}};ir.styles=[pt.styles,E1];w([L({reflect:!0})],ir.prototype,"variant",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"full-width"})],ir.prototype,"fullWidth",void 0);w([L({reflect:!0})],ir.prototype,"icon",void 0);w([L({reflect:!0,attribute:"end-icon"})],ir.prototype,"endIcon",void 0);ir=w([Ae("mdui-button")],ir);const S1=$e`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;font-size:1.5rem;width:2.5rem;height:2.5rem}:host([variant=standard]){color:rgb(var(--mdui-color-on-surface-variant));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=filled]){color:rgb(var(--mdui-color-primary));background-color:rgb(var(--mdui-color-surface-container-highest));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=tonal]){color:rgb(var(--mdui-color-on-surface-variant));background-color:rgb(var(--mdui-color-surface-container-highest));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=outlined]){border:.0625rem solid rgb(var(--mdui-color-outline));color:rgb(var(--mdui-color-on-surface-variant));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=outlined][pressed]){color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([variant=standard][selected]:not([selected=false i])){color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=filled]:not([selectable])),:host([variant=filled][selectable=false i]),:host([variant=filled][selected]:not([selected=false i])){color:rgb(var(--mdui-color-on-primary));background-color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-primary)}:host([variant=tonal]:not([selectable])),:host([variant=tonal][selectable=false i]),:host([variant=tonal][selected]:not([selected=false i])){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var(
443
443
  --mdui-color-on-secondary-container
444
- )}:host([variant=outlined][selected]:not([selected=false i])){border:none;color:rgb(var(--mdui-color-inverse-on-surface));background-color:rgb(var(--mdui-color-inverse-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-inverse-on-surface)}:host([variant=filled][disabled]:not([disabled=false i])),:host([variant=outlined][disabled]:not([disabled=false i])),:host([variant=tonal][disabled]:not([disabled=false i])){background-color:rgba(var(--mdui-color-on-surface),.12);border-color:rgba(var(--mdui-color-on-surface),.12)}:host([disabled]:not([disabled=false i])),:host([loading]:not([loading=false i])){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])){color:rgba(var(--mdui-color-on-surface),.38)!important}.button{float:left;width:100%}:host([loading]:not([loading=false i])) .button,:host([loading]:not([loading=false i])) mdui-ripple{opacity:0}.icon,.selected-icon mdui-icon,::slotted(*){font-size:inherit}mdui-circular-progress{display:flex;position:absolute;top:calc(50% - 1.5rem / 2);left:calc(50% - 1.5rem / 2);width:1.5rem;height:1.5rem}:host([variant=filled]:not([disabled])) mdui-circular-progress,:host([variant=filled][disabled=false i]) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-primary))}:host([disabled]:not([disabled=false i])) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;let rr=class extends pt{constructor(){super(...arguments),this.variant="standard",this.selectable=!1,this.selected=!1,this.rippleRef=Me(),this.hasSlotController=new $t(this,"[default]","selected-icon")}get rippleElement(){return this.rippleRef.value}onSelectedChange(){this.emit("change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",()=>{!this.selectable||this.disabled||(this.selected=!this.selected)})}render(){return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.isButton()?this.renderButton({className:"button",part:"button",content:this.renderIcon()}):this.disabled||this.loading?Z`<span part="button" class="button _a">${this.renderIcon()}</span>`:this.renderAnchor({className:"button",part:"button",content:this.renderIcon()})} ${this.renderLoading()}`}renderIcon(){const e=()=>this.hasSlotController.test("[default]")?Z`<slot></slot>`:this.icon?Z`<mdui-icon part="icon" class="icon" name="${this.icon}"></mdui-icon>`:Qe,t=()=>this.hasSlotController.test("selected-icon")||this.selectedIcon?Z`<slot name="selected-icon" part="selected-icon" class="selected-icon"><mdui-icon name="${this.selectedIcon}"></mdui-icon></slot>`:e();return this.selected?t():e()}};rr.styles=[pt.styles,k1];w([L({reflect:!0})],rr.prototype,"variant",void 0);w([L({reflect:!0})],rr.prototype,"icon",void 0);w([L({reflect:!0,attribute:"selected-icon"})],rr.prototype,"selectedIcon",void 0);w([L({type:Boolean,reflect:!0,converter:we})],rr.prototype,"selectable",void 0);w([L({type:Boolean,reflect:!0,converter:we})],rr.prototype,"selected",void 0);w([Re("selected",!0)],rr.prototype,"onSelectedChange",null);rr=w([Ae("mdui-button-icon")],rr);const R1=$e`:host{--shape-corner:var(--mdui-shape-corner-medium);position:relative;display:inline-block;overflow:hidden;border-radius:var(--shape-corner);-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([clickable]:not([clickable=false i])){cursor:pointer}:host([variant=elevated]){background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([variant=filled]){background-color:rgb(var(--mdui-color-surface-container-highest))}:host([variant=outlined]){background-color:rgb(var(--mdui-color-surface));border:.0625rem solid rgb(var(--mdui-color-outline))}:host([variant=elevated][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=filled][hover]),:host([variant=outlined][hover]){box-shadow:var(--mdui-elevation-level1)}:host([variant=elevated][dragged]),:host([variant=filled][dragged]),:host([variant=outlined][dragged]){box-shadow:var(--mdui-elevation-level3)}:host([disabled]:not([disabled=false i])){opacity:.38;cursor:default;-webkit-user-select:none;user-select:none}:host([variant=elevated][disabled]:not([disabled=false i])){background-color:rgb(var(--mdui-color-surface-variant));box-shadow:var(--mdui-elevation-level0)}:host([variant=filled][disabled]:not([disabled=false i])){background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level1)}:host([variant=outlined][disabled]:not([disabled=false i])){box-shadow:var(--mdui-elevation-level0);border-color:rgba(var(--mdui-color-outline),.32)}.link{position:relative;display:inline-block;width:100%;height:100%;color:inherit;font-size:inherit;letter-spacing:inherit;text-decoration:none;touch-action:manipulation;-webkit-user-drag:none}`;let En=class extends On(Di(bi(Ke))){constructor(){super(...arguments),this.variant="elevated",this.clickable=!1,this.disabled=!1,this.rippleRef=Me()}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled||!this.href&&!this.clickable}get focusElement(){return this.href&&!this.disabled?this.renderRoot.querySelector("._a"):this}get focusDisabled(){return this.rippleDisabled}render(){return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.href&&!this.disabled?this.renderAnchor({className:"link",content:Z`<slot></slot>`}):Z`<slot></slot>`}`}};En.styles=[qe,R1];w([L({reflect:!0})],En.prototype,"variant",void 0);w([L({type:Boolean,reflect:!0,converter:we})],En.prototype,"clickable",void 0);w([L({type:Boolean,reflect:!0,converter:we})],En.prototype,"disabled",void 0);En=w([Ae("mdui-card")],En);/**
444
+ )}:host([variant=outlined][selected]:not([selected=false i])){border:none;color:rgb(var(--mdui-color-inverse-on-surface));background-color:rgb(var(--mdui-color-inverse-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-inverse-on-surface)}:host([variant=filled][disabled]:not([disabled=false i])),:host([variant=outlined][disabled]:not([disabled=false i])),:host([variant=tonal][disabled]:not([disabled=false i])){background-color:rgba(var(--mdui-color-on-surface),.12);border-color:rgba(var(--mdui-color-on-surface),.12)}:host([disabled]:not([disabled=false i])),:host([loading]:not([loading=false i])){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])){color:rgba(var(--mdui-color-on-surface),.38)!important}.button{float:left;width:100%}:host([loading]:not([loading=false i])) .button,:host([loading]:not([loading=false i])) mdui-ripple{opacity:0}.icon,.selected-icon mdui-icon,::slotted(*){font-size:inherit}mdui-circular-progress{display:flex;position:absolute;top:calc(50% - 1.5rem / 2);left:calc(50% - 1.5rem / 2);width:1.5rem;height:1.5rem}:host([variant=filled]:not([disabled])) mdui-circular-progress,:host([variant=filled][disabled=false i]) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-primary))}:host([disabled]:not([disabled=false i])) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;let rr=class extends pt{constructor(){super(...arguments),this.variant="standard",this.selectable=!1,this.selected=!1,this.rippleRef=Me(),this.hasSlotController=new $t(this,"[default]","selected-icon")}get rippleElement(){return this.rippleRef.value}onSelectedChange(){this.emit("change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",()=>{!this.selectable||this.disabled||(this.selected=!this.selected)})}render(){return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.isButton()?this.renderButton({className:"button",part:"button",content:this.renderIcon()}):this.disabled||this.loading?Z`<span part="button" class="button _a">${this.renderIcon()}</span>`:this.renderAnchor({className:"button",part:"button",content:this.renderIcon()})} ${this.renderLoading()}`}renderIcon(){const e=()=>this.hasSlotController.test("[default]")?Z`<slot></slot>`:this.icon?Z`<mdui-icon part="icon" class="icon" name="${this.icon}"></mdui-icon>`:Qe,t=()=>this.hasSlotController.test("selected-icon")||this.selectedIcon?Z`<slot name="selected-icon" part="selected-icon" class="selected-icon"><mdui-icon name="${this.selectedIcon}"></mdui-icon></slot>`:e();return this.selected?t():e()}};rr.styles=[pt.styles,S1];w([L({reflect:!0})],rr.prototype,"variant",void 0);w([L({reflect:!0})],rr.prototype,"icon",void 0);w([L({reflect:!0,attribute:"selected-icon"})],rr.prototype,"selectedIcon",void 0);w([L({type:Boolean,reflect:!0,converter:we})],rr.prototype,"selectable",void 0);w([L({type:Boolean,reflect:!0,converter:we})],rr.prototype,"selected",void 0);w([Re("selected",!0)],rr.prototype,"onSelectedChange",null);rr=w([Ae("mdui-button-icon")],rr);const k1=$e`:host{--shape-corner:var(--mdui-shape-corner-medium);position:relative;display:inline-block;overflow:hidden;border-radius:var(--shape-corner);-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([clickable]:not([clickable=false i])){cursor:pointer}:host([variant=elevated]){background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([variant=filled]){background-color:rgb(var(--mdui-color-surface-container-highest))}:host([variant=outlined]){background-color:rgb(var(--mdui-color-surface));border:.0625rem solid rgb(var(--mdui-color-outline))}:host([variant=elevated][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=filled][hover]),:host([variant=outlined][hover]){box-shadow:var(--mdui-elevation-level1)}:host([variant=elevated][dragged]),:host([variant=filled][dragged]),:host([variant=outlined][dragged]){box-shadow:var(--mdui-elevation-level3)}:host([disabled]:not([disabled=false i])){opacity:.38;cursor:default;-webkit-user-select:none;user-select:none}:host([variant=elevated][disabled]:not([disabled=false i])){background-color:rgb(var(--mdui-color-surface-variant));box-shadow:var(--mdui-elevation-level0)}:host([variant=filled][disabled]:not([disabled=false i])){background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level1)}:host([variant=outlined][disabled]:not([disabled=false i])){box-shadow:var(--mdui-elevation-level0);border-color:rgba(var(--mdui-color-outline),.32)}.link{position:relative;display:inline-block;width:100%;height:100%;color:inherit;font-size:inherit;letter-spacing:inherit;text-decoration:none;touch-action:manipulation;-webkit-user-drag:none}`;let En=class extends On(Di(bi(Ke))){constructor(){super(...arguments),this.variant="elevated",this.clickable=!1,this.disabled=!1,this.rippleRef=Me()}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled||!this.href&&!this.clickable}get focusElement(){return this.href&&!this.disabled?this.renderRoot.querySelector("._a"):this}get focusDisabled(){return this.rippleDisabled}render(){return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.href&&!this.disabled?this.renderAnchor({className:"link",content:Z`<slot></slot>`}):Z`<slot></slot>`}`}};En.styles=[qe,k1];w([L({reflect:!0})],En.prototype,"variant",void 0);w([L({type:Boolean,reflect:!0,converter:we})],En.prototype,"clickable",void 0);w([L({type:Boolean,reflect:!0,converter:we})],En.prototype,"disabled",void 0);En=w([Ae("mdui-card")],En);/**
445
445
  * @license
446
446
  * Copyright 2020 Google LLC
447
447
  * SPDX-License-Identifier: BSD-3-Clause
448
- */const Sn=Ln(class extends Hs{constructor(i){if(super(i),i.type!==Mi.PROPERTY&&i.type!==Mi.ATTRIBUTE&&i.type!==Mi.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!pm(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[e]){if(e===Vt||e===it)return e;const t=i.element,r=i.name;if(i.type===Mi.PROPERTY){if(e===t[r])return Vt}else if(i.type===Mi.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(r))return Vt}else if(i.type===Mi.ATTRIBUTE&&t.getAttribute(r)===e+"")return Vt;return o1(i),e}});function Ir(i="value"){return(e,t)=>{const r=e.constructor,n=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(s,o,a){const c=r.getPropertyOptions(i),l=wt(c.attribute)?c.attribute:i;if(s===l){const d=c.converter||pn,p=(vt(d)?d:d?.fromAttribute??pn.fromAttribute)(a,c.type);this[i]!==p&&(this[t]=p)}n.call(this,s,o,a)}}}const ki=$e`:host{display:inline-block;width:1em;height:1em;line-height:1;font-size:1.5rem}`,Ri=i=>Z`<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="currentColor">${fm(i)}</svg>`;let hc=class extends yt{render(){return Ri('<path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/>')}};hc.styles=ki;hc=w([Ae("mdui-icon-check-box-outline-blank")],hc);let fc=class extends yt{render(){return Ri('<path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>')}};fc.styles=ki;fc=w([Ae("mdui-icon-check-box")],fc);let pc=class extends yt{render(){return Ri('<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"/>')}};pc.styles=ki;pc=w([Ae("mdui-icon-indeterminate-check-box")],pc);const I1=$e`:host{position:relative;display:inline-flex;cursor:pointer;-webkit-tap-highlight-color:transparent;border-radius:.125rem;font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}label{display:inline-flex;align-items:center;width:100%;cursor:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none}input{position:absolute;padding:0;opacity:0;pointer-events:none;width:1.125rem;height:1.125rem;margin:0 0 0 .6875rem}.icon{display:flex;position:absolute;opacity:1;transform:scale(1);color:rgb(var(--mdui-color-on-surface));font-size:1.5rem;transition:color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.checked-icon,.indeterminate-icon{opacity:0;transform:scale(.5);transition-property:color,opacity,transform;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard)}.icon .i,::slotted([slot=checked-icon]),::slotted([slot=indeterminate-icon]),::slotted([slot=unchecked-icon]){color:inherit;font-size:inherit}i{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;border-radius:50%;width:2.5rem;height:2.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.label{display:flex;width:100%;padding-top:.625rem;padding-bottom:.625rem;color:rgb(var(--mdui-color-on-surface));transition:color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}:host([checked]:not([checked=false i])) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([checked]:not([checked=false i])) .icon{color:rgb(var(--mdui-color-primary))}:host([checked]:not([checked=false i])) .indeterminate-icon{opacity:0;transform:scale(.5)}:host([checked]:not([checked=false i])) .checked-icon{opacity:1;transform:scale(1)}:host([indeterminate]:not([indeterminate=false i])) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([indeterminate]:not([indeterminate=false i])) .icon{color:rgb(var(--mdui-color-primary))}:host([indeterminate]:not([indeterminate=false i])) .checked-icon{opacity:0;transform:scale(.5)}:host([indeterminate]:not([indeterminate=false i])) .indeterminate-icon{opacity:1;transform:scale(1)}.invalid i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}.invalid .icon{color:rgb(var(--mdui-color-error))}.invalid .label{color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])) .icon{color:rgba(var(--mdui-color-on-surface),38%)}:host([disabled]:not([disabled=false i])) .label{color:rgba(var(--mdui-color-on-surface),38%)}:host([disabled][checked]:not([disabled=false i],[checked=false i])) .unchecked-icon,:host([disabled][indeterminate]:not([disabled=false i],[indeterminate=false i])) .unchecked-icon{opacity:0}`;let Tt=class extends Di(bi(Ke)){constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.indeterminate=!1,this.required=!1,this.name="",this.value="on",this.invalid=!1,this.inputRef=Me(),this.rippleRef=Me(),this.formController=new lr(this,{value:e=>e.checked?e.value:void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t})}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}async onDisabledChange(){await this.updateComplete,this.invalid=!this.inputRef.value.checkValidity()}async onCheckedChange(){await this.updateComplete;const e=this.formController.getForm();e&&xt.get(e)?.has(this)?(this.invalid=!1,xt.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.blur(),this.focus())),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return Z`<label class="${bt({invalid:this.invalid})}"><input ${De(this.inputRef)} type="checkbox" name="${je(this.name)}" value="${je(this.value)}" .indeterminate="${Sn(this.indeterminate)}" .disabled="${this.disabled}" .checked="${Sn(this.checked)}" .required="${this.required}" @change="${this.onChange}"> <i part="control"><mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple><slot name="unchecked-icon" part="unchecked-icon" class="icon unchecked-icon">${this.uncheckedIcon?Z`<mdui-icon name="${this.uncheckedIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-check-box-outline-blank class="i"></mdui-icon-check-box-outline-blank>`}</slot><slot name="checked-icon" part="checked-icon" class="icon checked-icon">${this.checkedIcon?Z`<mdui-icon name="${this.checkedIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-check-box class="i"></mdui-icon-check-box>`}</slot><slot name="indeterminate-icon" part="indeterminate-icon" class="icon indeterminate-icon">${this.indeterminateIcon?Z`<mdui-icon name="${this.indeterminateIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-indeterminate-check-box class="i"></mdui-icon-indeterminate-check-box>`}</slot></i><slot part="label" class="label"></slot></label>`}onChange(){this.checked=this.inputRef.value.checked,this.indeterminate=!1,this.emit("change")}};Tt.styles=[qe,I1];w([L({type:Boolean,reflect:!0,converter:we})],Tt.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Tt.prototype,"checked",void 0);w([Ir("checked")],Tt.prototype,"defaultChecked",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Tt.prototype,"indeterminate",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Tt.prototype,"required",void 0);w([L({reflect:!0})],Tt.prototype,"form",void 0);w([L({reflect:!0})],Tt.prototype,"name",void 0);w([L({reflect:!0})],Tt.prototype,"value",void 0);w([L({reflect:!0,attribute:"unchecked-icon"})],Tt.prototype,"uncheckedIcon",void 0);w([L({reflect:!0,attribute:"checked-icon"})],Tt.prototype,"checkedIcon",void 0);w([L({reflect:!0,attribute:"indeterminate-icon"})],Tt.prototype,"indeterminateIcon",void 0);w([Be()],Tt.prototype,"invalid",void 0);w([Re("disabled",!0),Re("indeterminate",!0),Re("required",!0)],Tt.prototype,"onDisabledChange",null);w([Re("checked",!0)],Tt.prototype,"onCheckedChange",null);Tt=w([Ae("mdui-checkbox")],Tt);let mc=class extends yt{render(){return Ri('<path d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/>')}};mc.styles=ki;mc=w([Ae("mdui-icon-check")],mc);let gc=class extends yt{render(){return Ri('<path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>')}};gc.styles=ki;gc=w([Ae("mdui-icon-clear")],gc);const T1=$e`:host{--shape-corner:var(--mdui-shape-corner-small);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);height:2rem;background-color:rgb(var(--mdui-color-surface));border:.0625rem solid rgb(var(--mdui-color-outline));color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height);--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}.button{padding-right:.4375rem;padding-left:.4375rem}:host([variant=input]) .button{padding-right:.1875rem;padding-left:.1875rem}:host([selected]:not([selected=false i])) .button{padding-right:.5rem;padding-left:.5rem}:host([selected][variant=input]:not([selected=false i])) .button{padding-right:.25rem;padding-left:.25rem}:host([elevated]:not([elevated=false i])) .button{padding-right:.5rem;padding-left:.5rem}:host([variant=assist]){color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([elevated]:not([elevated=false i])){border-width:0;background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([selected]:not([selected=false i])){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));border-width:0;--mdui-comp-ripple-state-layer-color:var(
448
+ */const Sn=Ln(class extends Hs{constructor(i){if(super(i),i.type!==Mi.PROPERTY&&i.type!==Mi.ATTRIBUTE&&i.type!==Mi.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!pm(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[e]){if(e===Vt||e===it)return e;const t=i.element,r=i.name;if(i.type===Mi.PROPERTY){if(e===t[r])return Vt}else if(i.type===Mi.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(r))return Vt}else if(i.type===Mi.ATTRIBUTE&&t.getAttribute(r)===e+"")return Vt;return s1(i),e}});function Ir(i="value"){return(e,t)=>{const r=e.constructor,n=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(s,o,a){const c=r.getPropertyOptions(i),l=wt(c.attribute)?c.attribute:i;if(s===l){const d=c.converter||pn,p=(vt(d)?d:d?.fromAttribute??pn.fromAttribute)(a,c.type);this[i]!==p&&(this[t]=p)}n.call(this,s,o,a)}}}const ki=$e`:host{display:inline-block;width:1em;height:1em;line-height:1;font-size:1.5rem}`,Ri=i=>Z`<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="currentColor">${fm(i)}</svg>`;let hc=class extends yt{render(){return Ri('<path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/>')}};hc.styles=ki;hc=w([Ae("mdui-icon-check-box-outline-blank")],hc);let fc=class extends yt{render(){return Ri('<path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>')}};fc.styles=ki;fc=w([Ae("mdui-icon-check-box")],fc);let pc=class extends yt{render(){return Ri('<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"/>')}};pc.styles=ki;pc=w([Ae("mdui-icon-indeterminate-check-box")],pc);const R1=$e`:host{position:relative;display:inline-flex;cursor:pointer;-webkit-tap-highlight-color:transparent;border-radius:.125rem;font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}label{display:inline-flex;align-items:center;width:100%;cursor:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none}input{position:absolute;padding:0;opacity:0;pointer-events:none;width:1.125rem;height:1.125rem;margin:0 0 0 .6875rem}.icon{display:flex;position:absolute;opacity:1;transform:scale(1);color:rgb(var(--mdui-color-on-surface));font-size:1.5rem;transition:color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.checked-icon,.indeterminate-icon{opacity:0;transform:scale(.5);transition-property:color,opacity,transform;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard)}.icon .i,::slotted([slot=checked-icon]),::slotted([slot=indeterminate-icon]),::slotted([slot=unchecked-icon]){color:inherit;font-size:inherit}i{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;border-radius:50%;width:2.5rem;height:2.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.label{display:flex;width:100%;padding-top:.625rem;padding-bottom:.625rem;color:rgb(var(--mdui-color-on-surface));transition:color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}:host([checked]:not([checked=false i])) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([checked]:not([checked=false i])) .icon{color:rgb(var(--mdui-color-primary))}:host([checked]:not([checked=false i])) .indeterminate-icon{opacity:0;transform:scale(.5)}:host([checked]:not([checked=false i])) .checked-icon{opacity:1;transform:scale(1)}:host([indeterminate]:not([indeterminate=false i])) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([indeterminate]:not([indeterminate=false i])) .icon{color:rgb(var(--mdui-color-primary))}:host([indeterminate]:not([indeterminate=false i])) .checked-icon{opacity:0;transform:scale(.5)}:host([indeterminate]:not([indeterminate=false i])) .indeterminate-icon{opacity:1;transform:scale(1)}.invalid i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}.invalid .icon{color:rgb(var(--mdui-color-error))}.invalid .label{color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])) .icon{color:rgba(var(--mdui-color-on-surface),38%)}:host([disabled]:not([disabled=false i])) .label{color:rgba(var(--mdui-color-on-surface),38%)}:host([disabled][checked]:not([disabled=false i],[checked=false i])) .unchecked-icon,:host([disabled][indeterminate]:not([disabled=false i],[indeterminate=false i])) .unchecked-icon{opacity:0}`;let Tt=class extends Di(bi(Ke)){constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.indeterminate=!1,this.required=!1,this.name="",this.value="on",this.invalid=!1,this.inputRef=Me(),this.rippleRef=Me(),this.formController=new lr(this,{value:e=>e.checked?e.value:void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t})}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}async onDisabledChange(){await this.updateComplete,this.invalid=!this.inputRef.value.checkValidity()}async onCheckedChange(){await this.updateComplete;const e=this.formController.getForm();e&&xt.get(e)?.has(this)?(this.invalid=!1,xt.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.blur(),this.focus())),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return Z`<label class="${bt({invalid:this.invalid})}"><input ${De(this.inputRef)} type="checkbox" name="${je(this.name)}" value="${je(this.value)}" .indeterminate="${Sn(this.indeterminate)}" .disabled="${this.disabled}" .checked="${Sn(this.checked)}" .required="${this.required}" @change="${this.onChange}"> <i part="control"><mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple><slot name="unchecked-icon" part="unchecked-icon" class="icon unchecked-icon">${this.uncheckedIcon?Z`<mdui-icon name="${this.uncheckedIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-check-box-outline-blank class="i"></mdui-icon-check-box-outline-blank>`}</slot><slot name="checked-icon" part="checked-icon" class="icon checked-icon">${this.checkedIcon?Z`<mdui-icon name="${this.checkedIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-check-box class="i"></mdui-icon-check-box>`}</slot><slot name="indeterminate-icon" part="indeterminate-icon" class="icon indeterminate-icon">${this.indeterminateIcon?Z`<mdui-icon name="${this.indeterminateIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-indeterminate-check-box class="i"></mdui-icon-indeterminate-check-box>`}</slot></i><slot part="label" class="label"></slot></label>`}onChange(){this.checked=this.inputRef.value.checked,this.indeterminate=!1,this.emit("change")}};Tt.styles=[qe,R1];w([L({type:Boolean,reflect:!0,converter:we})],Tt.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Tt.prototype,"checked",void 0);w([Ir("checked")],Tt.prototype,"defaultChecked",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Tt.prototype,"indeterminate",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Tt.prototype,"required",void 0);w([L({reflect:!0})],Tt.prototype,"form",void 0);w([L({reflect:!0})],Tt.prototype,"name",void 0);w([L({reflect:!0})],Tt.prototype,"value",void 0);w([L({reflect:!0,attribute:"unchecked-icon"})],Tt.prototype,"uncheckedIcon",void 0);w([L({reflect:!0,attribute:"checked-icon"})],Tt.prototype,"checkedIcon",void 0);w([L({reflect:!0,attribute:"indeterminate-icon"})],Tt.prototype,"indeterminateIcon",void 0);w([Be()],Tt.prototype,"invalid",void 0);w([Re("disabled",!0),Re("indeterminate",!0),Re("required",!0)],Tt.prototype,"onDisabledChange",null);w([Re("checked",!0)],Tt.prototype,"onCheckedChange",null);Tt=w([Ae("mdui-checkbox")],Tt);let mc=class extends yt{render(){return Ri('<path d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/>')}};mc.styles=ki;mc=w([Ae("mdui-icon-check")],mc);let gc=class extends yt{render(){return Ri('<path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>')}};gc.styles=ki;gc=w([Ae("mdui-icon-clear")],gc);const I1=$e`:host{--shape-corner:var(--mdui-shape-corner-small);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);height:2rem;background-color:rgb(var(--mdui-color-surface));border:.0625rem solid rgb(var(--mdui-color-outline));color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height);--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}.button{padding-right:.4375rem;padding-left:.4375rem}:host([variant=input]) .button{padding-right:.1875rem;padding-left:.1875rem}:host([selected]:not([selected=false i])) .button{padding-right:.5rem;padding-left:.5rem}:host([selected][variant=input]:not([selected=false i])) .button{padding-right:.25rem;padding-left:.25rem}:host([elevated]:not([elevated=false i])) .button{padding-right:.5rem;padding-left:.5rem}:host([variant=assist]){color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([elevated]:not([elevated=false i])){border-width:0;background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([selected]:not([selected=false i])){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));border-width:0;--mdui-comp-ripple-state-layer-color:var(
449
449
  --mdui-color-on-secondary-container
450
- )}:host([disabled]:not([disabled=false i])),:host([loading]:not([loading=false i])){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])){border-color:rgba(var(--mdui-color-on-surface),12%);color:rgba(var(--mdui-color-on-surface),38%);box-shadow:var(--mdui-elevation-level0)}:host([disabled][elevated]:not([disabled=false i],[elevated=false i])),:host([disabled][selected]:not([disabled=false i],[selected=false i])){background-color:rgba(var(--mdui-color-on-surface),12%)}:host([selected][hover]:not([selected=false i])){box-shadow:var(--mdui-elevation-level1)}:host([elevated][hover]:not([elevated=false i])){color:rgb(var(--mdui-color-on-secondary-container));box-shadow:var(--mdui-elevation-level2)}:host([variant=filter][hover]),:host([variant=input][hover]),:host([variant=suggestion][hover]){color:rgb(var(--mdui-color-on-surface-variant))}:host([variant=filter][focus-visible]),:host([variant=input][focus-visible]),:host([variant=suggestion][focus-visible]){border-color:rgb(var(--mdui-color-on-surface-variant))}:host([dragged]),:host([dragged][hover]){box-shadow:var(--mdui-elevation-level4)}.button{overflow:visible}.label{display:inline-flex;padding-right:.5rem;padding-left:.5rem}.end-icon,.icon,.selected-icon{display:inline-flex;font-size:1.28571429em;color:rgb(var(--mdui-color-on-surface-variant))}:host([variant=assist]) .end-icon,:host([variant=assist]) .icon,:host([variant=assist]) .selected-icon{color:rgb(var(--mdui-color-primary))}:host([selected]:not([selected=false i])) .end-icon,:host([selected]:not([selected=false i])) .icon,:host([selected]:not([selected=false i])) .selected-icon{color:rgb(var(--mdui-color-on-secondary-container))}:host([disabled]:not([disabled=false i])) .end-icon,:host([disabled]:not([disabled=false i])) .icon,:host([disabled]:not([disabled=false i])) .selected-icon{opacity:.38;color:rgb(var(--mdui-color-on-surface))}.end-icon .i,.icon .i,.selected-icon .i,::slotted([slot=end-icon]),::slotted([slot=icon]),::slotted([slot=selected-icon]){font-size:inherit}:host([variant=input]) .has-icon .icon,:host([variant=input]) .has-icon .selected-icon,:host([variant=input]) .has-icon mdui-circular-progress{margin-left:.25rem}:host([variant=input]) .has-end-icon .end-icon{margin-right:.25rem}mdui-circular-progress{display:inline-flex;width:1.125rem;height:1.125rem}:host([disabled]:not([disabled=false i])) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}::slotted(mdui-avatar[slot=end-icon]),::slotted(mdui-avatar[slot=icon]),::slotted(mdui-avatar[slot=selected-icon]){width:1.5rem;height:1.5rem}:host([disabled]:not([disabled=false i])) ::slotted(mdui-avatar[slot=end-icon]),:host([disabled]:not([disabled=false i])) ::slotted(mdui-avatar[slot=icon]),:host([disabled]:not([disabled=false i])) ::slotted(mdui-avatar[slot=selected-icon]){opacity:.38}::slotted(mdui-avatar[slot=icon]),::slotted(mdui-avatar[slot=selected-icon]){margin-left:-.25rem;margin-right:-.125rem}::slotted(mdui-avatar[slot=end-icon]){margin-right:-.25rem;margin-left:-.125rem}.delete-icon{display:inline-flex;font-size:1.28571429em;transition:background-color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);border-radius:var(--mdui-shape-corner-full);margin-right:-.25rem;margin-left:-.25rem;padding:.25rem;color:rgb(var(--mdui-color-on-surface-variant))}.delete-icon:hover{background-color:rgba(var(--mdui-color-on-surface-variant),12%)}.has-end-icon .delete-icon{margin-left:.25rem}:host([variant=assiat]) .delete-icon{color:rgb(var(--mdui-color-primary))}:host([variant=input]) .delete-icon{margin-right:.0625rem}:host([disabled]:not([disabled=false i])) .delete-icon{color:rgba(var(--mdui-color-on-surface),38%)}.delete-icon .i,::slotted([slot=delete-icon]){font-size:inherit}::slotted(mdui-avatar[slot=delete-icon]){width:1.125rem;height:1.125rem}`;let ui=class extends pt{constructor(){super(),this.variant="assist",this.elevated=!1,this.selectable=!1,this.selected=!1,this.deletable=!1,this.rippleRef=Me(),this.hasSlotController=new $t(this,"icon","selected-icon","end-icon"),this.onClick=this.onClick.bind(this),this.onKeyDown=this.onKeyDown.bind(this)}get rippleElement(){return this.rippleRef.value}onSelectedChange(){this.emit("change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown)}render(){const e=this.icon||this.hasSlotController.test("icon"),t=this.endIcon||this.hasSlotController.test("end-icon"),r=this.selectedIcon||["assist","filter"].includes(this.variant)||e||this.hasSlotController.test("selected-icon"),n=Bi({button:!0,"has-icon":this.loading||!this.selected&&e||this.selected&&r,"has-end-icon":t});return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.isButton()?this.renderButton({className:n,part:"button",content:this.renderInner()}):this.disabled||this.loading?Z`<span part="button" class="${n} _a">${this.renderInner()}</span>`:this.renderAnchor({className:n,part:"button",content:this.renderInner()})}`}onClick(){this.disabled||this.loading||this.selectable&&(this.selected=!this.selected)}onKeyDown(e){this.disabled||this.loading||(this.selectable&&e.key===" "&&(e.preventDefault(),this.selected=!this.selected),this.deletable&&["Delete","Backspace"].includes(e.key)&&this.emit("delete"))}onDelete(e){e.stopPropagation(),this.emit("delete")}renderIcon(){if(this.loading)return this.renderLoading();const e=()=>this.icon?Z`<mdui-icon name="${this.icon}" class="i"></mdui-icon>`:Qe,t=()=>this.selectedIcon?Z`<mdui-icon name="${this.selectedIcon}" class="i"></mdui-icon>`:this.variant==="assist"||this.variant==="filter"?Z`<mdui-icon-check class="i"></mdui-icon-check>`:e();return this.selected?Z`<slot name="selected-icon" part="selected-icon" class="selected-icon">${t()}</slot>`:Z`<slot name="icon" part="icon" class="icon">${e()}</slot>`}renderLabel(){return Z`<slot part="label" class="label"></slot>`}renderEndIcon(){return Z`<slot name="end-icon" part="end-icon" class="end-icon">${this.endIcon?Z`<mdui-icon name="${this.endIcon}" class="i"></mdui-icon>`:Qe}</slot>`}renderDeleteIcon(){return this.deletable?Z`<slot name="delete-icon" part="delete-icon" class="delete-icon" @click="${this.onDelete}">${this.deleteIcon?Z`<mdui-icon name="${this.deleteIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-clear class="i"></mdui-icon-clear>`}</slot>`:Qe}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon(),this.renderDeleteIcon()]}};ui.styles=[pt.styles,T1];w([L({reflect:!0})],ui.prototype,"variant",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ui.prototype,"elevated",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ui.prototype,"selectable",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ui.prototype,"selected",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ui.prototype,"deletable",void 0);w([L({reflect:!0})],ui.prototype,"icon",void 0);w([L({reflect:!0,attribute:"selected-icon"})],ui.prototype,"selectedIcon",void 0);w([L({reflect:!0,attribute:"end-icon"})],ui.prototype,"endIcon",void 0);w([L({reflect:!0,attribute:"delete-icon"})],ui.prototype,"deleteIcon",void 0);w([Re("selected",!0)],ui.prototype,"onSelectedChange",null);ui=w([Ae("mdui-chip")],ui);const kn=(i,e)=>{if(i.length!==e.length)return!1;const t=[...i].sort(),r=[...e].sort();return t.every((n,s)=>n===r[s])},C1=$e`:host{display:block}`;let qi=class extends Ke{constructor(){super(...arguments),this.accordion=!1,this.disabled=!1,this.activeKeys=[],this.isInitial=!0,this.definedController=new At(this,{relatedElements:["mdui-collapse-item"]})}async onActiveKeysChange(){await this.definedController.whenDefined();const e=this.accordion?this.items.find(t=>this.activeKeys.includes(t.key))?.value:this.items.filter(t=>this.activeKeys.includes(t.key)).map(t=>t.value);this.setValue(e),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),this.accordion){const e=this.value;if(!e)this.setActiveKeys([]);else{const t=this.items.find(r=>r.value===e);this.setActiveKeys(t?[t.key]:[])}}else{const e=this.value;if(!e.length)this.setActiveKeys([]);else{const t=this.items.filter(r=>e.includes(r.value)).map(r=>r.key);this.setActiveKeys(t)}}this.updateItems()}render(){return Z`<slot @slotchange="${this.onSlotChange}" @click="${this.onClick}"></slot>`}setActiveKeys(e){kn(this.activeKeys,e)||(this.activeKeys=e)}setValue(e){this.accordion||gt(this.value)||gt(e)?this.value=e:kn(this.value,e)||(this.value=e)}onClick(e){if(this.disabled||e.button)return;const r=e.target.closest("mdui-collapse-item");if(!r||r.disabled)return;const n=e.composedPath();if(!(r.trigger&&!n.find(s=>tr(s)&&oe(s).is(r.trigger)))&&n.find(s=>tr(s)&&s.part.contains("header"))){if(this.accordion)this.activeKeys.includes(r.key)?this.setActiveKeys([]):this.setActiveKeys([r.key]);else{const s=[...this.activeKeys];s.includes(r.key)?s.splice(s.indexOf(r.key),1):s.push(r.key),this.setActiveKeys(s)}this.isInitial=!1,this.updateItems()}}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems()}updateItems(){this.items.forEach(e=>{e.active=this.activeKeys.includes(e.key),e.isInitial=this.isInitial})}};qi.styles=[qe,C1];w([L({type:Boolean,reflect:!0,converter:we})],qi.prototype,"accordion",void 0);w([L()],qi.prototype,"value",void 0);w([L({type:Boolean,reflect:!0,converter:we})],qi.prototype,"disabled",void 0);w([Be()],qi.prototype,"activeKeys",void 0);w([gi({selector:"mdui-collapse-item",flatten:!0})],qi.prototype,"items",void 0);w([Re("activeKeys",!0)],qi.prototype,"onActiveKeysChange",null);w([Re("value")],qi.prototype,"onValueChange",null);qi=w([Ae("mdui-collapse")],qi);const $1=$e`:host{display:flex;flex-direction:column}.header{display:block}.body{display:block;overflow:hidden;transition:height var(--mdui-motion-duration-short4) var(--mdui-motion-easing-emphasized)}.body.opened{overflow:visible}.body.active{transition-duration:var(--mdui-motion-duration-medium4)}`;let Ui=class extends Ke{constructor(){super(...arguments),this.disabled=!1,this.active=!1,this.state="closed",this.isInitial=!0,this.key=Sr(),this.bodyRef=Me()}onActiveChange(){this.isInitial?(this.state=this.active?"opened":"closed",this.hasUpdated&&this.updateBodyHeight()):(this.state=this.active?"open":"close",this.emit(this.state),this.updateBodyHeight())}firstUpdated(e){super.firstUpdated(e),this.updateBodyHeight()}render(){return Z`<slot name="header" part="header" class="header">${this.header}</slot><slot part="body" class="body ${bt({opened:this.state==="opened",active:this.active})}" ${De(this.bodyRef)} @transitionend="${this.onTransitionEnd}"></slot>`}onTransitionEnd(e){e.target===this.bodyRef.value&&(this.state=this.active?"opened":"closed",this.emit(this.state),this.updateBodyHeight())}updateBodyHeight(){const e=this.bodyRef.value.scrollHeight;this.state==="close"&&(oe(this.bodyRef.value).height(e),this.bodyRef.value.clientLeft),oe(this.bodyRef.value).height(this.state==="opened"?"auto":this.state==="open"?e:0)}};Ui.styles=[qe,$1];w([L({reflect:!0})],Ui.prototype,"value",void 0);w([L({reflect:!0})],Ui.prototype,"header",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ui.prototype,"disabled",void 0);w([L()],Ui.prototype,"trigger",void 0);w([Be()],Ui.prototype,"active",void 0);w([Be()],Ui.prototype,"state",void 0);w([Re("active")],Ui.prototype,"onActiveChange",null);Ui=w([Ae("mdui-collapse-item")],Ui);/**
450
+ )}:host([disabled]:not([disabled=false i])),:host([loading]:not([loading=false i])){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])){border-color:rgba(var(--mdui-color-on-surface),12%);color:rgba(var(--mdui-color-on-surface),38%);box-shadow:var(--mdui-elevation-level0)}:host([disabled][elevated]:not([disabled=false i],[elevated=false i])),:host([disabled][selected]:not([disabled=false i],[selected=false i])){background-color:rgba(var(--mdui-color-on-surface),12%)}:host([selected][hover]:not([selected=false i])){box-shadow:var(--mdui-elevation-level1)}:host([elevated][hover]:not([elevated=false i])){color:rgb(var(--mdui-color-on-secondary-container));box-shadow:var(--mdui-elevation-level2)}:host([variant=filter][hover]),:host([variant=input][hover]),:host([variant=suggestion][hover]){color:rgb(var(--mdui-color-on-surface-variant))}:host([variant=filter][focus-visible]),:host([variant=input][focus-visible]),:host([variant=suggestion][focus-visible]){border-color:rgb(var(--mdui-color-on-surface-variant))}:host([dragged]),:host([dragged][hover]){box-shadow:var(--mdui-elevation-level4)}.button{overflow:visible}.label{display:inline-flex;padding-right:.5rem;padding-left:.5rem}.end-icon,.icon,.selected-icon{display:inline-flex;font-size:1.28571429em;color:rgb(var(--mdui-color-on-surface-variant))}:host([variant=assist]) .end-icon,:host([variant=assist]) .icon,:host([variant=assist]) .selected-icon{color:rgb(var(--mdui-color-primary))}:host([selected]:not([selected=false i])) .end-icon,:host([selected]:not([selected=false i])) .icon,:host([selected]:not([selected=false i])) .selected-icon{color:rgb(var(--mdui-color-on-secondary-container))}:host([disabled]:not([disabled=false i])) .end-icon,:host([disabled]:not([disabled=false i])) .icon,:host([disabled]:not([disabled=false i])) .selected-icon{opacity:.38;color:rgb(var(--mdui-color-on-surface))}.end-icon .i,.icon .i,.selected-icon .i,::slotted([slot=end-icon]),::slotted([slot=icon]),::slotted([slot=selected-icon]){font-size:inherit}:host([variant=input]) .has-icon .icon,:host([variant=input]) .has-icon .selected-icon,:host([variant=input]) .has-icon mdui-circular-progress{margin-left:.25rem}:host([variant=input]) .has-end-icon .end-icon{margin-right:.25rem}mdui-circular-progress{display:inline-flex;width:1.125rem;height:1.125rem}:host([disabled]:not([disabled=false i])) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}::slotted(mdui-avatar[slot=end-icon]),::slotted(mdui-avatar[slot=icon]),::slotted(mdui-avatar[slot=selected-icon]){width:1.5rem;height:1.5rem}:host([disabled]:not([disabled=false i])) ::slotted(mdui-avatar[slot=end-icon]),:host([disabled]:not([disabled=false i])) ::slotted(mdui-avatar[slot=icon]),:host([disabled]:not([disabled=false i])) ::slotted(mdui-avatar[slot=selected-icon]){opacity:.38}::slotted(mdui-avatar[slot=icon]),::slotted(mdui-avatar[slot=selected-icon]){margin-left:-.25rem;margin-right:-.125rem}::slotted(mdui-avatar[slot=end-icon]){margin-right:-.25rem;margin-left:-.125rem}.delete-icon{display:inline-flex;font-size:1.28571429em;transition:background-color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);border-radius:var(--mdui-shape-corner-full);margin-right:-.25rem;margin-left:-.25rem;padding:.25rem;color:rgb(var(--mdui-color-on-surface-variant))}.delete-icon:hover{background-color:rgba(var(--mdui-color-on-surface-variant),12%)}.has-end-icon .delete-icon{margin-left:.25rem}:host([variant=assiat]) .delete-icon{color:rgb(var(--mdui-color-primary))}:host([variant=input]) .delete-icon{margin-right:.0625rem}:host([disabled]:not([disabled=false i])) .delete-icon{color:rgba(var(--mdui-color-on-surface),38%)}.delete-icon .i,::slotted([slot=delete-icon]){font-size:inherit}::slotted(mdui-avatar[slot=delete-icon]){width:1.125rem;height:1.125rem}`;let ui=class extends pt{constructor(){super(),this.variant="assist",this.elevated=!1,this.selectable=!1,this.selected=!1,this.deletable=!1,this.rippleRef=Me(),this.hasSlotController=new $t(this,"icon","selected-icon","end-icon"),this.onClick=this.onClick.bind(this),this.onKeyDown=this.onKeyDown.bind(this)}get rippleElement(){return this.rippleRef.value}onSelectedChange(){this.emit("change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown)}render(){const e=this.icon||this.hasSlotController.test("icon"),t=this.endIcon||this.hasSlotController.test("end-icon"),r=this.selectedIcon||["assist","filter"].includes(this.variant)||e||this.hasSlotController.test("selected-icon"),n=Bi({button:!0,"has-icon":this.loading||!this.selected&&e||this.selected&&r,"has-end-icon":t});return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.isButton()?this.renderButton({className:n,part:"button",content:this.renderInner()}):this.disabled||this.loading?Z`<span part="button" class="${n} _a">${this.renderInner()}</span>`:this.renderAnchor({className:n,part:"button",content:this.renderInner()})}`}onClick(){this.disabled||this.loading||this.selectable&&(this.selected=!this.selected)}onKeyDown(e){this.disabled||this.loading||(this.selectable&&e.key===" "&&(e.preventDefault(),this.selected=!this.selected),this.deletable&&["Delete","Backspace"].includes(e.key)&&this.emit("delete"))}onDelete(e){e.stopPropagation(),this.emit("delete")}renderIcon(){if(this.loading)return this.renderLoading();const e=()=>this.icon?Z`<mdui-icon name="${this.icon}" class="i"></mdui-icon>`:Qe,t=()=>this.selectedIcon?Z`<mdui-icon name="${this.selectedIcon}" class="i"></mdui-icon>`:this.variant==="assist"||this.variant==="filter"?Z`<mdui-icon-check class="i"></mdui-icon-check>`:e();return this.selected?Z`<slot name="selected-icon" part="selected-icon" class="selected-icon">${t()}</slot>`:Z`<slot name="icon" part="icon" class="icon">${e()}</slot>`}renderLabel(){return Z`<slot part="label" class="label"></slot>`}renderEndIcon(){return Z`<slot name="end-icon" part="end-icon" class="end-icon">${this.endIcon?Z`<mdui-icon name="${this.endIcon}" class="i"></mdui-icon>`:Qe}</slot>`}renderDeleteIcon(){return this.deletable?Z`<slot name="delete-icon" part="delete-icon" class="delete-icon" @click="${this.onDelete}">${this.deleteIcon?Z`<mdui-icon name="${this.deleteIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-clear class="i"></mdui-icon-clear>`}</slot>`:Qe}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon(),this.renderDeleteIcon()]}};ui.styles=[pt.styles,I1];w([L({reflect:!0})],ui.prototype,"variant",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ui.prototype,"elevated",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ui.prototype,"selectable",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ui.prototype,"selected",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ui.prototype,"deletable",void 0);w([L({reflect:!0})],ui.prototype,"icon",void 0);w([L({reflect:!0,attribute:"selected-icon"})],ui.prototype,"selectedIcon",void 0);w([L({reflect:!0,attribute:"end-icon"})],ui.prototype,"endIcon",void 0);w([L({reflect:!0,attribute:"delete-icon"})],ui.prototype,"deleteIcon",void 0);w([Re("selected",!0)],ui.prototype,"onSelectedChange",null);ui=w([Ae("mdui-chip")],ui);const kn=(i,e)=>{if(i.length!==e.length)return!1;const t=[...i].sort(),r=[...e].sort();return t.every((n,s)=>n===r[s])},T1=$e`:host{display:block}`;let qi=class extends Ke{constructor(){super(...arguments),this.accordion=!1,this.disabled=!1,this.activeKeys=[],this.isInitial=!0,this.definedController=new At(this,{relatedElements:["mdui-collapse-item"]})}async onActiveKeysChange(){await this.definedController.whenDefined();const e=this.accordion?this.items.find(t=>this.activeKeys.includes(t.key))?.value:this.items.filter(t=>this.activeKeys.includes(t.key)).map(t=>t.value);this.setValue(e),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),this.accordion){const e=this.value;if(!e)this.setActiveKeys([]);else{const t=this.items.find(r=>r.value===e);this.setActiveKeys(t?[t.key]:[])}}else{const e=this.value;if(!e.length)this.setActiveKeys([]);else{const t=this.items.filter(r=>e.includes(r.value)).map(r=>r.key);this.setActiveKeys(t)}}this.updateItems()}render(){return Z`<slot @slotchange="${this.onSlotChange}" @click="${this.onClick}"></slot>`}setActiveKeys(e){kn(this.activeKeys,e)||(this.activeKeys=e)}setValue(e){this.accordion||gt(this.value)||gt(e)?this.value=e:kn(this.value,e)||(this.value=e)}onClick(e){if(this.disabled||e.button)return;const r=e.target.closest("mdui-collapse-item");if(!r||r.disabled)return;const n=e.composedPath();if(!(r.trigger&&!n.find(s=>tr(s)&&oe(s).is(r.trigger)))&&n.find(s=>tr(s)&&s.part.contains("header"))){if(this.accordion)this.activeKeys.includes(r.key)?this.setActiveKeys([]):this.setActiveKeys([r.key]);else{const s=[...this.activeKeys];s.includes(r.key)?s.splice(s.indexOf(r.key),1):s.push(r.key),this.setActiveKeys(s)}this.isInitial=!1,this.updateItems()}}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems()}updateItems(){this.items.forEach(e=>{e.active=this.activeKeys.includes(e.key),e.isInitial=this.isInitial})}};qi.styles=[qe,T1];w([L({type:Boolean,reflect:!0,converter:we})],qi.prototype,"accordion",void 0);w([L()],qi.prototype,"value",void 0);w([L({type:Boolean,reflect:!0,converter:we})],qi.prototype,"disabled",void 0);w([Be()],qi.prototype,"activeKeys",void 0);w([gi({selector:"mdui-collapse-item",flatten:!0})],qi.prototype,"items",void 0);w([Re("activeKeys",!0)],qi.prototype,"onActiveKeysChange",null);w([Re("value")],qi.prototype,"onValueChange",null);qi=w([Ae("mdui-collapse")],qi);const C1=$e`:host{display:flex;flex-direction:column}.header{display:block}.body{display:block;overflow:hidden;transition:height var(--mdui-motion-duration-short4) var(--mdui-motion-easing-emphasized)}.body.opened{overflow:visible}.body.active{transition-duration:var(--mdui-motion-duration-medium4)}`;let Ui=class extends Ke{constructor(){super(...arguments),this.disabled=!1,this.active=!1,this.state="closed",this.isInitial=!0,this.key=Sr(),this.bodyRef=Me()}onActiveChange(){this.isInitial?(this.state=this.active?"opened":"closed",this.hasUpdated&&this.updateBodyHeight()):(this.state=this.active?"open":"close",this.emit(this.state),this.updateBodyHeight())}firstUpdated(e){super.firstUpdated(e),this.updateBodyHeight()}render(){return Z`<slot name="header" part="header" class="header">${this.header}</slot><slot part="body" class="body ${bt({opened:this.state==="opened",active:this.active})}" ${De(this.bodyRef)} @transitionend="${this.onTransitionEnd}"></slot>`}onTransitionEnd(e){e.target===this.bodyRef.value&&(this.state=this.active?"opened":"closed",this.emit(this.state),this.updateBodyHeight())}updateBodyHeight(){const e=this.bodyRef.value.scrollHeight;this.state==="close"&&(oe(this.bodyRef.value).height(e),this.bodyRef.value.clientLeft),oe(this.bodyRef.value).height(this.state==="opened"?"auto":this.state==="open"?e:0)}};Ui.styles=[qe,C1];w([L({reflect:!0})],Ui.prototype,"value",void 0);w([L({reflect:!0})],Ui.prototype,"header",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ui.prototype,"disabled",void 0);w([L()],Ui.prototype,"trigger",void 0);w([Be()],Ui.prototype,"active",void 0);w([Be()],Ui.prototype,"state",void 0);w([Re("active")],Ui.prototype,"onActiveChange",null);Ui=w([Ae("mdui-collapse-item")],Ui);/**
451
451
  * @license
452
452
  * Copyright 2021 Google LLC
453
453
  * SPDX-License-Identifier: BSD-3-Clause
454
- */function at(i,e,t){return i?e(i):t?.(i)}function st(i,e,t){return i?new Promise(r=>{if(t.duration===1/0)throw new Error("Promise-based animations must be finite.");Jo(t.duration)&&isNaN(t.duration)&&(t.duration=0),t.easing===""&&(t.easing="linear");const n=i.animate(e,t);n.addEventListener("cancel",r,{once:!0}),n.addEventListener("finish",r,{once:!0})}):Promise.resolve()}function Zt(i){return i?Promise.all(i.getAnimations().map(e=>new Promise(t=>{const r=requestAnimationFrame(t);e.addEventListener("cancel",()=>r,{once:!0}),e.addEventListener("finish",()=>r,{once:!0}),e.cancel()}))):Promise.resolve()}function Df(i){const e=Er(),t=i.localName;return i.getAttribute("tabindex")==="-1"||i.hasAttribute("disabled")||i.hasAttribute("aria-disabled")&&i.getAttribute("aria-disabled")!=="false"||t==="input"&&i.getAttribute("type")==="radio"&&!i.hasAttribute("checked")||i.offsetParent===null||e.getComputedStyle(i).visibility==="hidden"?!1:(t==="audio"||t==="video")&&i.hasAttribute("controls")||i.hasAttribute("tabindex")||i.hasAttribute("contenteditable")&&i.getAttribute("contenteditable")!=="false"?!0:["button","input","select","textarea","a","audio","video","summary"].includes(t)}function A1(i){const e=[];function t(s){s instanceof HTMLElement&&(e.push(s),s.shadowRoot!==null&&s.shadowRoot.mode==="open"&&t(s.shadowRoot)),[...s.children].forEach(a=>t(a))}t(i);const r=e.find(s=>Df(s))??null,n=e.reverse().find(s=>Df(s))??null;return{start:r,end:n}}let ds=[];class vm{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){ds.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){ds=ds.filter(e=>e!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return ds[ds.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=A1(this.element),r=this.tabDirection==="forward"?e:t;typeof r?.focus=="function"&&r.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){e.key==="Tab"&&e.shiftKey&&(this.tabDirection="backward"),requestAnimationFrame(()=>this.checkFocus())}handleKeyUp(){this.tabDirection="forward"}}const ti=(i,e)=>{const t=`--mdui-motion-easing-${e}`;return oe(i).css(t).trim()},$i=(i,e)=>{const t=`--mdui-motion-duration-${e}`,r=oe(i).css(t).trim().toLowerCase();return r.endsWith("ms")?parseFloat(r):parseFloat(r)*1e3};let Kl;const N1=i=>{if(gt(document))return 0;if(Kl===void 0){const e=oe("<div>").css({width:"100%",height:"200px"}),t=oe("<div>").css({position:"absolute",top:"0",left:"0",pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}).append(e).appendTo(document.body),r=e[0].offsetWidth;t.css("overflow","scroll");let n=e[0].offsetWidth;r===n&&(n=t[0].clientWidth),t.remove(),Kl=r-n}return Kl},D1=i=>i.scrollHeight>i.clientHeight,Es=new WeakMap,wm="mdui-lock-screen",bc=(i,e)=>{const t=ii();e??=t.documentElement,Es.has(e)||Es.set(e,new Set),Es.get(e).add(i);const n=oe(e);D1(e)&&n.css("width",`calc(100% - ${N1()}px)`),n.addClass(wm)},Ss=(i,e)=>{const t=ii();e??=t.documentElement;const r=Es.get(e);r&&(r.delete(i),r.size===0&&(Es.delete(e),oe(e).removeClass(wm).width("")))};/**
454
+ */function at(i,e,t){return i?e(i):t?.(i)}function st(i,e,t){return i?new Promise(r=>{if(t.duration===1/0)throw new Error("Promise-based animations must be finite.");Jo(t.duration)&&isNaN(t.duration)&&(t.duration=0),t.easing===""&&(t.easing="linear");const n=i.animate(e,t);n.addEventListener("cancel",r,{once:!0}),n.addEventListener("finish",r,{once:!0})}):Promise.resolve()}function Zt(i){return i?Promise.all(i.getAnimations().map(e=>new Promise(t=>{const r=requestAnimationFrame(t);e.addEventListener("cancel",()=>r,{once:!0}),e.addEventListener("finish",()=>r,{once:!0}),e.cancel()}))):Promise.resolve()}function Df(i){const e=Er(),t=i.localName;return i.getAttribute("tabindex")==="-1"||i.hasAttribute("disabled")||i.hasAttribute("aria-disabled")&&i.getAttribute("aria-disabled")!=="false"||t==="input"&&i.getAttribute("type")==="radio"&&!i.hasAttribute("checked")||i.offsetParent===null||e.getComputedStyle(i).visibility==="hidden"?!1:(t==="audio"||t==="video")&&i.hasAttribute("controls")||i.hasAttribute("tabindex")||i.hasAttribute("contenteditable")&&i.getAttribute("contenteditable")!=="false"?!0:["button","input","select","textarea","a","audio","video","summary"].includes(t)}function $1(i){const e=[];function t(s){s instanceof HTMLElement&&(e.push(s),s.shadowRoot!==null&&s.shadowRoot.mode==="open"&&t(s.shadowRoot)),[...s.children].forEach(a=>t(a))}t(i);const r=e.find(s=>Df(s))??null,n=e.reverse().find(s=>Df(s))??null;return{start:r,end:n}}let ds=[];class vm{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){ds.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){ds=ds.filter(e=>e!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return ds[ds.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=$1(this.element),r=this.tabDirection==="forward"?e:t;typeof r?.focus=="function"&&r.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){e.key==="Tab"&&e.shiftKey&&(this.tabDirection="backward"),requestAnimationFrame(()=>this.checkFocus())}handleKeyUp(){this.tabDirection="forward"}}const ti=(i,e)=>{const t=`--mdui-motion-easing-${e}`;return oe(i).css(t).trim()},$i=(i,e)=>{const t=`--mdui-motion-duration-${e}`,r=oe(i).css(t).trim().toLowerCase();return r.endsWith("ms")?parseFloat(r):parseFloat(r)*1e3};let Kl;const A1=i=>{if(gt(document))return 0;if(Kl===void 0){const e=oe("<div>").css({width:"100%",height:"200px"}),t=oe("<div>").css({position:"absolute",top:"0",left:"0",pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}).append(e).appendTo(document.body),r=e[0].offsetWidth;t.css("overflow","scroll");let n=e[0].offsetWidth;r===n&&(n=t[0].clientWidth),t.remove(),Kl=r-n}return Kl},N1=i=>i.scrollHeight>i.clientHeight,Es=new WeakMap,wm="mdui-lock-screen",bc=(i,e)=>{const t=ii();e??=t.documentElement,Es.has(e)||Es.set(e,new Set),Es.get(e).add(i);const n=oe(e);N1(e)&&n.css("width",`calc(100% - ${A1()}px)`),n.addClass(wm)},Ss=(i,e)=>{const t=ii();e??=t.documentElement;const r=Es.get(e);r&&(r.delete(i),r.size===0&&(Es.delete(e),oe(e).removeClass(wm).width("")))};/**
455
455
  * @license
456
456
  * Copyright 2021 Google LLC
457
457
  * SPDX-License-Identifier: BSD-3-Clause
458
- */const L1="lit-localize-status";/**
458
+ */const D1="lit-localize-status";/**
459
459
  * @license
460
460
  * Copyright 2021 Google LLC
461
461
  * SPDX-License-Identifier: BSD-3-Clause
462
- */const O1=i=>typeof i!="string"&&"strTag"in i,P1=(i,e,t)=>{let r=i[0];for(let n=1;n<i.length;n++)r+=e[n-1],r+=i[n];return r};/**
462
+ */const L1=i=>typeof i!="string"&&"strTag"in i,O1=(i,e,t)=>{let r=i[0];for(let n=1;n<i.length;n++)r+=e[n-1],r+=i[n];return r};/**
463
463
  * @license
464
464
  * Copyright 2021 Google LLC
465
465
  * SPDX-License-Identifier: BSD-3-Clause
466
- */const M1=i=>O1(i)?P1(i.strings,i.values):i;let F1=M1;/**
466
+ */const P1=i=>L1(i)?O1(i.strings,i.values):i;let M1=P1;/**
467
467
  * @license
468
468
  * Copyright 2020 Google LLC
469
469
  * SPDX-License-Identifier: BSD-3-Clause
470
- */class j1{constructor(){this.settled=!1,this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}resolve(e){this.settled=!0,this._resolve(e)}reject(e){this.settled=!0,this._reject(e)}}/**
470
+ */class F1{constructor(){this.settled=!1,this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}resolve(e){this.settled=!0,this._resolve(e)}reject(e){this.settled=!0,this._reject(e)}}/**
471
471
  * @license
472
472
  * Copyright 2014 Travis Webb
473
473
  * SPDX-License-Identifier: MIT
@@ -475,21 +475,21 @@ if("@preserve"in h)return h["@preserve"][0];if(e.isValue(h))return h;if(e.isList
475
475
  * @license
476
476
  * Copyright 2021 Google LLC
477
477
  * SPDX-License-Identifier: BSD-3-Clause
478
- */let B1=new j1;B1.resolve();let Lf=!1;const wo=new Map,q1=(i,e)=>{Lf||(Lf=!0,Er().addEventListener(L1,n=>{n.detail.status==="ready"&&wo.forEach(s=>{s.forEach(o=>o())})}));const t=wo.get(i)||[];t.push(e),wo.set(i,t)},_o=i=>{wo.delete(i)},U1=$e`:host{--shape-corner:var(--mdui-shape-corner-extra-large);--z-index:2300;position:fixed;z-index:var(--z-index);display:none;align-items:center;justify-content:center;inset:0;padding:3rem}::slotted(mdui-top-app-bar[slot=header]){position:absolute;border-top-left-radius:var(--mdui-shape-corner-extra-large);border-top-right-radius:var(--mdui-shape-corner-extra-large);background-color:rgb(var(--mdui-color-surface-container-high))}:host([fullscreen]:not([fullscreen=false i])){--shape-corner:var(--mdui-shape-corner-none);padding:0}:host([fullscreen]:not([fullscreen=false i])) ::slotted(mdui-top-app-bar[slot=header]){border-top-left-radius:var(--mdui-shape-corner-none);border-top-right-radius:var(--mdui-shape-corner-none)}.overlay{position:fixed;inset:0;background-color:rgba(var(--mdui-color-scrim),.4)}.panel{--mdui-color-background:var(--mdui-color-surface-container-high);position:relative;display:flex;flex-direction:column;max-height:100%;border-radius:var(--shape-corner);outline:0;transform-origin:top;min-width:17.5rem;max-width:35rem;padding:1.5rem;background-color:rgb(var(--mdui-color-surface-container-high));box-shadow:var(--mdui-elevation-level3)}:host([fullscreen]:not([fullscreen=false i])) .panel{width:100%;max-width:100%;height:100%;max-height:100%;box-shadow:var(--mdui-elevation-level0)}.header{display:flex;flex-direction:column}.has-icon .header{align-items:center}.icon{display:flex;color:rgb(var(--mdui-color-secondary));font-size:1.5rem}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit}.headline{display:flex;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.icon+.headline{padding-top:1rem}.body{overflow:auto}.header+.body{margin-top:1rem}.description{display:flex;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([fullscreen]:not([fullscreen=false i])) .description{color:rgb(var(--mdui-color-on-surface))}.has-description.has-default .description{margin-bottom:1rem}.action{display:flex;justify-content:flex-end;padding-top:1.5rem}.action::slotted(:not(:first-child)){margin-left:.5rem}:host([stacked-actions]:not([stacked-actions=false i])) .action{flex-direction:column;align-items:end}:host([stacked-actions]:not([stacked-actions=false i])) .action::slotted(:not(:first-child)){margin-left:0;margin-top:.5rem}`;let hi=class extends Ke{constructor(){super(...arguments),this.open=!1,this.fullscreen=!1,this.closeOnEsc=!1,this.closeOnOverlayClick=!1,this.stackedActions=!1,this.overlayRef=Me(),this.panelRef=Me(),this.bodyRef=Me(),this.hasSlotController=new $t(this,"header","icon","headline","description","action","[default]"),this.definedController=new At(this,{relatedElements:["mdui-top-app-bar"]})}async onOpenChange(){const e=this.hasUpdated;if(!this.open&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=Array.from(this.panelRef.value.querySelectorAll(".header, .body, .actions")),r=ti(this,"linear"),n=ti(this,"emphasized-decelerate"),s=ti(this,"emphasized-accelerate"),o=()=>Promise.all([Zt(this.overlayRef.value),Zt(this.panelRef.value),...t.map(a=>Zt(a))]);if(this.open){if(e&&!this.emit("open",{cancelable:!0}))return;this.style.display="flex";const a=this.topAppBarElements??[];if(a.length){const l=a[0];l.scrollTarget||(l.scrollTarget=this.bodyRef.value),this.bodyRef.value.style.marginTop="0"}this.originalTrigger=document.activeElement,this.modalHelper.activate(),bc(this),await o(),requestAnimationFrame(()=>{const l=this.querySelector("[autofocus]");l?l.focus({preventScroll:!0}):this.panelRef.value.focus({preventScroll:!0})});const c=$i(this,"medium4");await Promise.all([st(this.overlayRef.value,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:e?c:0,easing:r}),st(this.panelRef.value,[{transform:"translateY(-1.875rem) scaleY(0)"},{transform:"translateY(0) scaleY(1)"}],{duration:e?c:0,easing:n}),st(this.panelRef.value,[{opacity:0},{opacity:1,offset:.1},{opacity:1}],{duration:e?c:0,easing:r}),...t.map(l=>st(l,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:e?c:0,easing:r}))]),e&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;this.modalHelper.deactivate(),await o();const c=$i(this,"short4");await Promise.all([st(this.overlayRef.value,[{opacity:1},{opacity:0}],{duration:c,easing:r}),st(this.panelRef.value,[{transform:"translateY(0) scaleY(1)"},{transform:"translateY(-1.875rem) scaleY(0.6)"}],{duration:c,easing:s}),st(this.panelRef.value,[{opacity:1},{opacity:1,offset:.75},{opacity:0}],{duration:c,easing:r}),...t.map(d=>st(d,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:c,easing:r}))]),this.style.display="none",Ss(this);const l=this.originalTrigger;typeof l?.focus=="function"&&setTimeout(()=>l.focus()),this.emit("closed")}}disconnectedCallback(){super.disconnectedCallback(),Ss(this),_o(this)}firstUpdated(e){super.firstUpdated(e),this.modalHelper=new vm(this),this.addEventListener("keydown",t=>{this.open&&this.closeOnEsc&&t.key==="Escape"&&(t.stopPropagation(),this.open=!1)})}render(){const e=this.hasSlotController.test("action"),t=this.hasSlotController.test("[default]"),r=!!this.icon||this.hasSlotController.test("icon"),n=!!this.headline||this.hasSlotController.test("headline"),s=!!this.description||this.hasSlotController.test("description"),o=r||n||this.hasSlotController.test("header"),a=s||t;return Z`<div ${De(this.overlayRef)} part="overlay" class="overlay" @click="${this.onOverlayClick}" tabindex="-1"></div><div ${De(this.panelRef)} part="panel" class="panel ${bt({"has-icon":r,"has-description":s,"has-default":t})}" tabindex="0">${at(o,()=>Z`<slot name="header" part="header" class="header">${at(r,()=>this.renderIcon())} ${at(n,()=>this.renderHeadline())}</slot>`)} ${at(a,()=>Z`<div ${De(this.bodyRef)} part="body" class="body">${at(s,()=>this.renderDescription())}<slot></slot></div>`)} ${at(e,()=>Z`<slot name="action" part="action" class="action"></slot>`)}</div>`}onOverlayClick(){this.emit("overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}renderIcon(){return Z`<slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}"></mdui-icon>`:Qe}</slot>`}renderHeadline(){return Z`<slot name="headline" part="headline" class="headline">${this.headline}</slot>`}renderDescription(){return Z`<slot name="description" part="description" class="description">${this.description}</slot>`}};hi.styles=[qe,U1];w([L({reflect:!0})],hi.prototype,"icon",void 0);w([L({reflect:!0})],hi.prototype,"headline",void 0);w([L({reflect:!0})],hi.prototype,"description",void 0);w([L({type:Boolean,reflect:!0,converter:we})],hi.prototype,"open",void 0);w([L({type:Boolean,reflect:!0,converter:we})],hi.prototype,"fullscreen",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"close-on-esc"})],hi.prototype,"closeOnEsc",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"close-on-overlay-click"})],hi.prototype,"closeOnOverlayClick",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"stacked-actions"})],hi.prototype,"stackedActions",void 0);w([gi({slot:"header",selector:"mdui-top-app-bar",flatten:!0})],hi.prototype,"topAppBarElements",void 0);w([Re("open")],hi.prototype,"onOpenChange",null);hi=w([Ae("mdui-dialog")],hi);const V1=$e`:host{display:block;height:.0625rem;background-color:rgb(var(--mdui-color-surface-variant))}:host([inset]:not([inset=false i])){margin-left:1rem}:host([middle]:not([middle=false i])){margin-left:1rem;margin-right:1rem}:host([vertical]:not([vertical=false i])){height:100%;width:.0625rem}`;let Rn=class extends Ke{constructor(){super(...arguments),this.vertical=!1,this.inset=!1,this.middle=!1}render(){return Z``}};Rn.styles=[qe,V1];w([L({type:Boolean,reflect:!0,converter:we})],Rn.prototype,"vertical",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Rn.prototype,"inset",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Rn.prototype,"middle",void 0);Rn=w([Ae("mdui-divider")],Rn);function kd(){return typeof window<"u"}function _m(i){return xm(i)?(i.nodeName||"").toLowerCase():"#document"}function Ws(i){var e;return(i==null||(e=i.ownerDocument)==null?void 0:e.defaultView)||window}function z1(i){var e;return(e=(xm(i)?i.ownerDocument:i.document)||window.document)==null?void 0:e.documentElement}function xm(i){return kd()?i instanceof Node||i instanceof Ws(i).Node:!1}function H1(i){return kd()?i instanceof HTMLElement||i instanceof Ws(i).HTMLElement:!1}function Of(i){return!kd()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof Ws(i).ShadowRoot}const W1=new Set(["inline","contents"]);function Em(i){const{overflow:e,overflowX:t,overflowY:r,display:n}=X1(i);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!W1.has(n)}const G1=new Set(["html","body","#document"]);function K1(i){return G1.has(_m(i))}function X1(i){return Ws(i).getComputedStyle(i)}function J1(i){if(_m(i)==="html")return i;const e=i.assignedSlot||i.parentNode||Of(i)&&i.host||z1(i);return Of(e)?e.host:e}function Sm(i){const e=J1(i);return K1(e)?i.ownerDocument?i.ownerDocument.body:i.body:H1(e)&&Em(e)?e:Sm(e)}function Lo(i,e,t){var r;e===void 0&&(e=[]),t===void 0&&(t=!0);const n=Sm(i),s=n===((r=i.ownerDocument)==null?void 0:r.body),o=Ws(n);if(s){const a=Q1(o);return e.concat(o,o.visualViewport||[],Em(n)?n:[],a&&t?Lo(a):[])}return e.concat(n,Lo(n,[],t))}function Q1(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}const Y1=$e`:host{--z-index:2100;display:contents}.panel{display:block;position:fixed;z-index:var(--z-index)}`;let Ht=class extends Ke{constructor(){super(),this.open=!1,this.disabled=!1,this.trigger="click",this.placement="auto",this.stayOpenOnClick=!1,this.openDelay=150,this.closeDelay=150,this.openOnPointer=!1,this.panelRef=Me(),this.definedController=new At(this,{relatedElements:[""]}),this.onDocumentClick=this.onDocumentClick.bind(this),this.onDocumentKeydown=this.onDocumentKeydown.bind(this),this.onWindowScroll=this.onWindowScroll.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onFocus=this.onFocus.bind(this),this.onClick=this.onClick.bind(this),this.onContextMenu=this.onContextMenu.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onPanelClick=this.onPanelClick.bind(this)}get triggerElement(){return this.triggerElements[0]}async onPositionChange(){this.open&&(await this.definedController.whenDefined(),this.updatePositioner())}async onOpenChange(){const e=this.hasUpdated;if(!this.open&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=ti(this,"linear"),r=ti(this,"emphasized-decelerate"),n=ti(this,"emphasized-accelerate");if(this.open){if(e&&!this.emit("open",{cancelable:!0}))return;const s=this.panelElements.find(a=>vt(a.focus));setTimeout(()=>{s?.focus()});const o=$i(this,"medium4");await Zt(this.panelRef.value),this.panelRef.value.hidden=!1,this.updatePositioner(),await Promise.all([st(this.panelRef.value,[{transform:`${this.getCssScaleName()}(0.45)`},{transform:`${this.getCssScaleName()}(1)`}],{duration:e?o:0,easing:r}),st(this.panelRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:e?o:0,easing:t})]),e&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;!this.hasTrigger("focus")&&vt(this.triggerElement?.focus)&&(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&this.triggerElement.focus();const o=$i(this,"short4");await Zt(this.panelRef.value),await Promise.all([st(this.panelRef.value,[{transform:`${this.getCssScaleName()}(1)`},{transform:`${this.getCssScaleName()}(0.45)`}],{duration:o,easing:n}),st(this.panelRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:o,easing:t})]),this.panelRef.value&&(this.panelRef.value.hidden=!0),this.emit("closed")}}connectedCallback(){super.connectedCallback(),this.definedController.whenDefined().then(()=>{document.addEventListener("pointerdown",this.onDocumentClick),document.addEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors=Lo(this.triggerElement),this.overflowAncestors.forEach(e=>{e.addEventListener("scroll",this.onWindowScroll)}),this.observeResize=kr(this.triggerElement,()=>{this.updatePositioner()})})}disconnectedCallback(){!this.open&&this.panelRef.value&&(this.panelRef.value.hidden=!0),super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),document.removeEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors?.forEach(e=>{e.removeEventListener("scroll",this.onWindowScroll)}),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("mouseleave",this.onMouseLeave),this.definedController.whenDefined().then(()=>{this.triggerElement.addEventListener("focus",this.onFocus),this.triggerElement.addEventListener("click",this.onClick),this.triggerElement.addEventListener("contextmenu",this.onContextMenu),this.triggerElement.addEventListener("mouseenter",this.onMouseEnter)})}render(){return Z`<slot name="trigger" part="trigger" class="trigger"></slot><slot ${De(this.panelRef)} part="panel" class="panel" hidden @click="${this.onPanelClick}"></slot>`}getCssScaleName(){return this.animateDirection==="horizontal"?"scaleX":"scaleY"}onDocumentClick(e){if(this.disabled||!this.open)return;const t=e.composedPath();t.includes(this)||(this.open=!1),this.hasTrigger("contextmenu")&&!this.hasTrigger("click")&&t.includes(this.triggerElement)&&(this.open=!1)}onDocumentKeydown(e){if(!(this.disabled||!this.open)){if(e.key==="Escape"){this.open=!1;return}e.key==="Tab"&&(!this.hasTrigger("focus")&&vt(this.triggerElement?.focus)&&e.preventDefault(),this.open=!1)}}onWindowScroll(){window.requestAnimationFrame(()=>this.onPositionChange())}hasTrigger(e){return this.trigger.split(" ").includes(e)}onFocus(){this.disabled||this.open||!this.hasTrigger("focus")||(this.open=!0)}onClick(e){this.disabled||e.button||!this.hasTrigger("click")||this.open&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.pointerOffsetX=e.offsetX,this.pointerOffsetY=e.offsetY,this.open=!this.open)}onPanelClick(e){!this.disabled&&!this.stayOpenOnClick&&oe(e.target).is("mdui-menu-item")&&(this.open=!1)}onContextMenu(e){this.disabled||!this.hasTrigger("contextmenu")||(e.preventDefault(),this.pointerOffsetX=e.offsetX,this.pointerOffsetY=e.offsetY,this.open=!0)}onMouseEnter(){this.disabled||!this.hasTrigger("hover")||(window.clearTimeout(this.closeTimeout),this.openDelay?this.openTimeout=window.setTimeout(()=>{this.open=!0},this.openDelay):this.open=!0)}onMouseLeave(){this.disabled||!this.hasTrigger("hover")||(window.clearTimeout(this.openTimeout),this.closeTimeout=window.setTimeout(()=>{this.open=!1},this.closeDelay||50))}updatePositioner(){const e=oe(this.panelRef.value),t=oe(window),r=this.panelElements,n={width:Math.max(...r?.map(_=>_.offsetWidth)??[]),height:r?.map(_=>_.offsetHeight).reduce((_,E)=>_+E,0)},s=this.triggerElement.getBoundingClientRect(),o=this.openOnPointer?{top:this.pointerOffsetY+s.top,left:this.pointerOffsetX+s.left,width:0,height:0}:s,a=8;let c,l,d,u,p=this.placement;if(p==="auto"){const _=t.width(),E=t.height();let x,k;E-o.top-o.height>n.height+a?x="bottom":o.top>n.height+a?x="top":_-o.left-o.width>n.width+a?x="right":o.left>n.width+a?x="left":x="bottom",["top","bottom"].includes(x)?_-o.left>n.width+a?k="start":o.left+o.width/2>n.width/2+a&&_-o.left-o.width/2>n.width/2+a?k=void 0:o.left+o.width>n.width+a?k="end":k="start":E-o.top>n.height+a?k="start":o.top+o.height/2>n.height/2+a&&E-o.top-o.height/2>n.height/2+a?k=void 0:o.top+o.height>n.height+a?k="end":k="start",p=k?[x,k].join("-"):x}const[g,v]=p.split("-");switch(this.animateDirection=["top","bottom"].includes(g)?"vertical":"horizontal",g){case"top":l="bottom",d=o.top-n.height;break;case"bottom":l="top",d=o.top+o.height;break;default:switch(l="center",v){case"start":d=o.top;break;case"end":d=o.top+o.height-n.height;break;default:d=o.top+o.height/2-n.height/2;break}break}switch(g){case"left":c="right",u=o.left-n.width;break;case"right":c="left",u=o.left+o.width;break;default:switch(c="center",v){case"start":u=o.left;break;case"end":u=o.left+o.width-n.width;break;default:u=o.left+o.width/2-n.width/2;break}break}e.css({top:d,left:u,transformOrigin:[c,l].join(" ")})}};Ht.styles=[qe,Y1];w([L({type:Boolean,reflect:!0,converter:we})],Ht.prototype,"open",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ht.prototype,"disabled",void 0);w([L({reflect:!0})],Ht.prototype,"trigger",void 0);w([L({reflect:!0})],Ht.prototype,"placement",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"stay-open-on-click"})],Ht.prototype,"stayOpenOnClick",void 0);w([L({type:Number,reflect:!0,attribute:"open-delay"})],Ht.prototype,"openDelay",void 0);w([L({type:Number,reflect:!0,attribute:"close-delay"})],Ht.prototype,"closeDelay",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"open-on-pointer"})],Ht.prototype,"openOnPointer",void 0);w([gi({slot:"trigger",flatten:!0})],Ht.prototype,"triggerElements",void 0);w([gi({flatten:!0})],Ht.prototype,"panelElements",void 0);w([Re("placement",!0),Re("openOnPointer",!0)],Ht.prototype,"onPositionChange",null);w([Re("open")],Ht.prototype,"onOpenChange",null);Ht=w([Ae("mdui-dropdown")],Ht);const km=(i=0)=>new Promise(e=>setTimeout(e,i)),Z1=$e`:host{--shape-corner-small:var(--mdui-shape-corner-small);--shape-corner-normal:var(--mdui-shape-corner-large);--shape-corner-large:var(--mdui-shape-corner-extra-large);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner-normal);cursor:pointer;-webkit-tap-highlight-color:transparent;transition-property:box-shadow;transition-timing-function:var(--mdui-motion-easing-emphasized);transition-duration:var(--mdui-motion-duration-medium4);width:3.5rem;height:3.5rem;box-shadow:var(--mdui-elevation-level3);font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.button{padding:0 1rem}:host([size=small]) .button{padding:0 .5rem}:host([size=large]) .button{padding:0 1.875rem}:host([lowered]){box-shadow:var(--mdui-elevation-level1)}:host([focus-visible]){box-shadow:var(--mdui-elevation-level3)}:host([lowered][focus-visible]){box-shadow:var(--mdui-elevation-level1)}:host([pressed]){box-shadow:var(--mdui-elevation-level3)}:host([lowered][pressed]){box-shadow:var(--mdui-elevation-level1)}:host([hover]){box-shadow:var(--mdui-elevation-level4)}:host([lowered][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=primary]){color:rgb(var(--mdui-color-on-primary-container));background-color:rgb(var(--mdui-color-primary-container));--mdui-comp-ripple-state-layer-color:var(
478
+ */let j1=new F1;j1.resolve();let Lf=!1;const wo=new Map,B1=(i,e)=>{Lf||(Lf=!0,Er().addEventListener(D1,n=>{n.detail.status==="ready"&&wo.forEach(s=>{s.forEach(o=>o())})}));const t=wo.get(i)||[];t.push(e),wo.set(i,t)},_o=i=>{wo.delete(i)},q1=$e`:host{--shape-corner:var(--mdui-shape-corner-extra-large);--z-index:2300;position:fixed;z-index:var(--z-index);display:none;align-items:center;justify-content:center;inset:0;padding:3rem}::slotted(mdui-top-app-bar[slot=header]){position:absolute;border-top-left-radius:var(--mdui-shape-corner-extra-large);border-top-right-radius:var(--mdui-shape-corner-extra-large);background-color:rgb(var(--mdui-color-surface-container-high))}:host([fullscreen]:not([fullscreen=false i])){--shape-corner:var(--mdui-shape-corner-none);padding:0}:host([fullscreen]:not([fullscreen=false i])) ::slotted(mdui-top-app-bar[slot=header]){border-top-left-radius:var(--mdui-shape-corner-none);border-top-right-radius:var(--mdui-shape-corner-none)}.overlay{position:fixed;inset:0;background-color:rgba(var(--mdui-color-scrim),.4)}.panel{--mdui-color-background:var(--mdui-color-surface-container-high);position:relative;display:flex;flex-direction:column;max-height:100%;border-radius:var(--shape-corner);outline:0;transform-origin:top;min-width:17.5rem;max-width:35rem;padding:1.5rem;background-color:rgb(var(--mdui-color-surface-container-high));box-shadow:var(--mdui-elevation-level3)}:host([fullscreen]:not([fullscreen=false i])) .panel{width:100%;max-width:100%;height:100%;max-height:100%;box-shadow:var(--mdui-elevation-level0)}.header{display:flex;flex-direction:column}.has-icon .header{align-items:center}.icon{display:flex;color:rgb(var(--mdui-color-secondary));font-size:1.5rem}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit}.headline{display:flex;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.icon+.headline{padding-top:1rem}.body{overflow:auto}.header+.body{margin-top:1rem}.description{display:flex;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([fullscreen]:not([fullscreen=false i])) .description{color:rgb(var(--mdui-color-on-surface))}.has-description.has-default .description{margin-bottom:1rem}.action{display:flex;justify-content:flex-end;padding-top:1.5rem}.action::slotted(:not(:first-child)){margin-left:.5rem}:host([stacked-actions]:not([stacked-actions=false i])) .action{flex-direction:column;align-items:end}:host([stacked-actions]:not([stacked-actions=false i])) .action::slotted(:not(:first-child)){margin-left:0;margin-top:.5rem}`;let hi=class extends Ke{constructor(){super(...arguments),this.open=!1,this.fullscreen=!1,this.closeOnEsc=!1,this.closeOnOverlayClick=!1,this.stackedActions=!1,this.overlayRef=Me(),this.panelRef=Me(),this.bodyRef=Me(),this.hasSlotController=new $t(this,"header","icon","headline","description","action","[default]"),this.definedController=new At(this,{relatedElements:["mdui-top-app-bar"]})}async onOpenChange(){const e=this.hasUpdated;if(!this.open&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=Array.from(this.panelRef.value.querySelectorAll(".header, .body, .actions")),r=ti(this,"linear"),n=ti(this,"emphasized-decelerate"),s=ti(this,"emphasized-accelerate"),o=()=>Promise.all([Zt(this.overlayRef.value),Zt(this.panelRef.value),...t.map(a=>Zt(a))]);if(this.open){if(e&&!this.emit("open",{cancelable:!0}))return;this.style.display="flex";const a=this.topAppBarElements??[];if(a.length){const l=a[0];l.scrollTarget||(l.scrollTarget=this.bodyRef.value),this.bodyRef.value.style.marginTop="0"}this.originalTrigger=document.activeElement,this.modalHelper.activate(),bc(this),await o(),requestAnimationFrame(()=>{const l=this.querySelector("[autofocus]");l?l.focus({preventScroll:!0}):this.panelRef.value.focus({preventScroll:!0})});const c=$i(this,"medium4");await Promise.all([st(this.overlayRef.value,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:e?c:0,easing:r}),st(this.panelRef.value,[{transform:"translateY(-1.875rem) scaleY(0)"},{transform:"translateY(0) scaleY(1)"}],{duration:e?c:0,easing:n}),st(this.panelRef.value,[{opacity:0},{opacity:1,offset:.1},{opacity:1}],{duration:e?c:0,easing:r}),...t.map(l=>st(l,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:e?c:0,easing:r}))]),e&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;this.modalHelper.deactivate(),await o();const c=$i(this,"short4");await Promise.all([st(this.overlayRef.value,[{opacity:1},{opacity:0}],{duration:c,easing:r}),st(this.panelRef.value,[{transform:"translateY(0) scaleY(1)"},{transform:"translateY(-1.875rem) scaleY(0.6)"}],{duration:c,easing:s}),st(this.panelRef.value,[{opacity:1},{opacity:1,offset:.75},{opacity:0}],{duration:c,easing:r}),...t.map(d=>st(d,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:c,easing:r}))]),this.style.display="none",Ss(this);const l=this.originalTrigger;typeof l?.focus=="function"&&setTimeout(()=>l.focus()),this.emit("closed")}}disconnectedCallback(){super.disconnectedCallback(),Ss(this),_o(this)}firstUpdated(e){super.firstUpdated(e),this.modalHelper=new vm(this),this.addEventListener("keydown",t=>{this.open&&this.closeOnEsc&&t.key==="Escape"&&(t.stopPropagation(),this.open=!1)})}render(){const e=this.hasSlotController.test("action"),t=this.hasSlotController.test("[default]"),r=!!this.icon||this.hasSlotController.test("icon"),n=!!this.headline||this.hasSlotController.test("headline"),s=!!this.description||this.hasSlotController.test("description"),o=r||n||this.hasSlotController.test("header"),a=s||t;return Z`<div ${De(this.overlayRef)} part="overlay" class="overlay" @click="${this.onOverlayClick}" tabindex="-1"></div><div ${De(this.panelRef)} part="panel" class="panel ${bt({"has-icon":r,"has-description":s,"has-default":t})}" tabindex="0">${at(o,()=>Z`<slot name="header" part="header" class="header">${at(r,()=>this.renderIcon())} ${at(n,()=>this.renderHeadline())}</slot>`)} ${at(a,()=>Z`<div ${De(this.bodyRef)} part="body" class="body">${at(s,()=>this.renderDescription())}<slot></slot></div>`)} ${at(e,()=>Z`<slot name="action" part="action" class="action"></slot>`)}</div>`}onOverlayClick(){this.emit("overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}renderIcon(){return Z`<slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}"></mdui-icon>`:Qe}</slot>`}renderHeadline(){return Z`<slot name="headline" part="headline" class="headline">${this.headline}</slot>`}renderDescription(){return Z`<slot name="description" part="description" class="description">${this.description}</slot>`}};hi.styles=[qe,q1];w([L({reflect:!0})],hi.prototype,"icon",void 0);w([L({reflect:!0})],hi.prototype,"headline",void 0);w([L({reflect:!0})],hi.prototype,"description",void 0);w([L({type:Boolean,reflect:!0,converter:we})],hi.prototype,"open",void 0);w([L({type:Boolean,reflect:!0,converter:we})],hi.prototype,"fullscreen",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"close-on-esc"})],hi.prototype,"closeOnEsc",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"close-on-overlay-click"})],hi.prototype,"closeOnOverlayClick",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"stacked-actions"})],hi.prototype,"stackedActions",void 0);w([gi({slot:"header",selector:"mdui-top-app-bar",flatten:!0})],hi.prototype,"topAppBarElements",void 0);w([Re("open")],hi.prototype,"onOpenChange",null);hi=w([Ae("mdui-dialog")],hi);const U1=$e`:host{display:block;height:.0625rem;background-color:rgb(var(--mdui-color-surface-variant))}:host([inset]:not([inset=false i])){margin-left:1rem}:host([middle]:not([middle=false i])){margin-left:1rem;margin-right:1rem}:host([vertical]:not([vertical=false i])){height:100%;width:.0625rem}`;let Rn=class extends Ke{constructor(){super(...arguments),this.vertical=!1,this.inset=!1,this.middle=!1}render(){return Z``}};Rn.styles=[qe,U1];w([L({type:Boolean,reflect:!0,converter:we})],Rn.prototype,"vertical",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Rn.prototype,"inset",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Rn.prototype,"middle",void 0);Rn=w([Ae("mdui-divider")],Rn);function kd(){return typeof window<"u"}function _m(i){return xm(i)?(i.nodeName||"").toLowerCase():"#document"}function Ws(i){var e;return(i==null||(e=i.ownerDocument)==null?void 0:e.defaultView)||window}function V1(i){var e;return(e=(xm(i)?i.ownerDocument:i.document)||window.document)==null?void 0:e.documentElement}function xm(i){return kd()?i instanceof Node||i instanceof Ws(i).Node:!1}function z1(i){return kd()?i instanceof HTMLElement||i instanceof Ws(i).HTMLElement:!1}function Of(i){return!kd()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof Ws(i).ShadowRoot}const H1=new Set(["inline","contents"]);function Em(i){const{overflow:e,overflowX:t,overflowY:r,display:n}=K1(i);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!H1.has(n)}const W1=new Set(["html","body","#document"]);function G1(i){return W1.has(_m(i))}function K1(i){return Ws(i).getComputedStyle(i)}function X1(i){if(_m(i)==="html")return i;const e=i.assignedSlot||i.parentNode||Of(i)&&i.host||V1(i);return Of(e)?e.host:e}function Sm(i){const e=X1(i);return G1(e)?i.ownerDocument?i.ownerDocument.body:i.body:z1(e)&&Em(e)?e:Sm(e)}function Lo(i,e,t){var r;e===void 0&&(e=[]),t===void 0&&(t=!0);const n=Sm(i),s=n===((r=i.ownerDocument)==null?void 0:r.body),o=Ws(n);if(s){const a=J1(o);return e.concat(o,o.visualViewport||[],Em(n)?n:[],a&&t?Lo(a):[])}return e.concat(n,Lo(n,[],t))}function J1(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}const Q1=$e`:host{--z-index:2100;display:contents}.panel{display:block;position:fixed;z-index:var(--z-index)}`;let Ht=class extends Ke{constructor(){super(),this.open=!1,this.disabled=!1,this.trigger="click",this.placement="auto",this.stayOpenOnClick=!1,this.openDelay=150,this.closeDelay=150,this.openOnPointer=!1,this.panelRef=Me(),this.definedController=new At(this,{relatedElements:[""]}),this.onDocumentClick=this.onDocumentClick.bind(this),this.onDocumentKeydown=this.onDocumentKeydown.bind(this),this.onWindowScroll=this.onWindowScroll.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onFocus=this.onFocus.bind(this),this.onClick=this.onClick.bind(this),this.onContextMenu=this.onContextMenu.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onPanelClick=this.onPanelClick.bind(this)}get triggerElement(){return this.triggerElements[0]}async onPositionChange(){this.open&&(await this.definedController.whenDefined(),this.updatePositioner())}async onOpenChange(){const e=this.hasUpdated;if(!this.open&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=ti(this,"linear"),r=ti(this,"emphasized-decelerate"),n=ti(this,"emphasized-accelerate");if(this.open){if(e&&!this.emit("open",{cancelable:!0}))return;const s=this.panelElements.find(a=>vt(a.focus));setTimeout(()=>{s?.focus()});const o=$i(this,"medium4");await Zt(this.panelRef.value),this.panelRef.value.hidden=!1,this.updatePositioner(),await Promise.all([st(this.panelRef.value,[{transform:`${this.getCssScaleName()}(0.45)`},{transform:`${this.getCssScaleName()}(1)`}],{duration:e?o:0,easing:r}),st(this.panelRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:e?o:0,easing:t})]),e&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;!this.hasTrigger("focus")&&vt(this.triggerElement?.focus)&&(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&this.triggerElement.focus();const o=$i(this,"short4");await Zt(this.panelRef.value),await Promise.all([st(this.panelRef.value,[{transform:`${this.getCssScaleName()}(1)`},{transform:`${this.getCssScaleName()}(0.45)`}],{duration:o,easing:n}),st(this.panelRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:o,easing:t})]),this.panelRef.value&&(this.panelRef.value.hidden=!0),this.emit("closed")}}connectedCallback(){super.connectedCallback(),this.definedController.whenDefined().then(()=>{document.addEventListener("pointerdown",this.onDocumentClick),document.addEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors=Lo(this.triggerElement),this.overflowAncestors.forEach(e=>{e.addEventListener("scroll",this.onWindowScroll)}),this.observeResize=kr(this.triggerElement,()=>{this.updatePositioner()})})}disconnectedCallback(){!this.open&&this.panelRef.value&&(this.panelRef.value.hidden=!0),super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),document.removeEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors?.forEach(e=>{e.removeEventListener("scroll",this.onWindowScroll)}),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("mouseleave",this.onMouseLeave),this.definedController.whenDefined().then(()=>{this.triggerElement.addEventListener("focus",this.onFocus),this.triggerElement.addEventListener("click",this.onClick),this.triggerElement.addEventListener("contextmenu",this.onContextMenu),this.triggerElement.addEventListener("mouseenter",this.onMouseEnter)})}render(){return Z`<slot name="trigger" part="trigger" class="trigger"></slot><slot ${De(this.panelRef)} part="panel" class="panel" hidden @click="${this.onPanelClick}"></slot>`}getCssScaleName(){return this.animateDirection==="horizontal"?"scaleX":"scaleY"}onDocumentClick(e){if(this.disabled||!this.open)return;const t=e.composedPath();t.includes(this)||(this.open=!1),this.hasTrigger("contextmenu")&&!this.hasTrigger("click")&&t.includes(this.triggerElement)&&(this.open=!1)}onDocumentKeydown(e){if(!(this.disabled||!this.open)){if(e.key==="Escape"){this.open=!1;return}e.key==="Tab"&&(!this.hasTrigger("focus")&&vt(this.triggerElement?.focus)&&e.preventDefault(),this.open=!1)}}onWindowScroll(){window.requestAnimationFrame(()=>this.onPositionChange())}hasTrigger(e){return this.trigger.split(" ").includes(e)}onFocus(){this.disabled||this.open||!this.hasTrigger("focus")||(this.open=!0)}onClick(e){this.disabled||e.button||!this.hasTrigger("click")||this.open&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.pointerOffsetX=e.offsetX,this.pointerOffsetY=e.offsetY,this.open=!this.open)}onPanelClick(e){!this.disabled&&!this.stayOpenOnClick&&oe(e.target).is("mdui-menu-item")&&(this.open=!1)}onContextMenu(e){this.disabled||!this.hasTrigger("contextmenu")||(e.preventDefault(),this.pointerOffsetX=e.offsetX,this.pointerOffsetY=e.offsetY,this.open=!0)}onMouseEnter(){this.disabled||!this.hasTrigger("hover")||(window.clearTimeout(this.closeTimeout),this.openDelay?this.openTimeout=window.setTimeout(()=>{this.open=!0},this.openDelay):this.open=!0)}onMouseLeave(){this.disabled||!this.hasTrigger("hover")||(window.clearTimeout(this.openTimeout),this.closeTimeout=window.setTimeout(()=>{this.open=!1},this.closeDelay||50))}updatePositioner(){const e=oe(this.panelRef.value),t=oe(window),r=this.panelElements,n={width:Math.max(...r?.map(_=>_.offsetWidth)??[]),height:r?.map(_=>_.offsetHeight).reduce((_,E)=>_+E,0)},s=this.triggerElement.getBoundingClientRect(),o=this.openOnPointer?{top:this.pointerOffsetY+s.top,left:this.pointerOffsetX+s.left,width:0,height:0}:s,a=8;let c,l,d,u,p=this.placement;if(p==="auto"){const _=t.width(),E=t.height();let x,k;E-o.top-o.height>n.height+a?x="bottom":o.top>n.height+a?x="top":_-o.left-o.width>n.width+a?x="right":o.left>n.width+a?x="left":x="bottom",["top","bottom"].includes(x)?_-o.left>n.width+a?k="start":o.left+o.width/2>n.width/2+a&&_-o.left-o.width/2>n.width/2+a?k=void 0:o.left+o.width>n.width+a?k="end":k="start":E-o.top>n.height+a?k="start":o.top+o.height/2>n.height/2+a&&E-o.top-o.height/2>n.height/2+a?k=void 0:o.top+o.height>n.height+a?k="end":k="start",p=k?[x,k].join("-"):x}const[g,v]=p.split("-");switch(this.animateDirection=["top","bottom"].includes(g)?"vertical":"horizontal",g){case"top":l="bottom",d=o.top-n.height;break;case"bottom":l="top",d=o.top+o.height;break;default:switch(l="center",v){case"start":d=o.top;break;case"end":d=o.top+o.height-n.height;break;default:d=o.top+o.height/2-n.height/2;break}break}switch(g){case"left":c="right",u=o.left-n.width;break;case"right":c="left",u=o.left+o.width;break;default:switch(c="center",v){case"start":u=o.left;break;case"end":u=o.left+o.width-n.width;break;default:u=o.left+o.width/2-n.width/2;break}break}e.css({top:d,left:u,transformOrigin:[c,l].join(" ")})}};Ht.styles=[qe,Q1];w([L({type:Boolean,reflect:!0,converter:we})],Ht.prototype,"open",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ht.prototype,"disabled",void 0);w([L({reflect:!0})],Ht.prototype,"trigger",void 0);w([L({reflect:!0})],Ht.prototype,"placement",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"stay-open-on-click"})],Ht.prototype,"stayOpenOnClick",void 0);w([L({type:Number,reflect:!0,attribute:"open-delay"})],Ht.prototype,"openDelay",void 0);w([L({type:Number,reflect:!0,attribute:"close-delay"})],Ht.prototype,"closeDelay",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"open-on-pointer"})],Ht.prototype,"openOnPointer",void 0);w([gi({slot:"trigger",flatten:!0})],Ht.prototype,"triggerElements",void 0);w([gi({flatten:!0})],Ht.prototype,"panelElements",void 0);w([Re("placement",!0),Re("openOnPointer",!0)],Ht.prototype,"onPositionChange",null);w([Re("open")],Ht.prototype,"onOpenChange",null);Ht=w([Ae("mdui-dropdown")],Ht);const km=(i=0)=>new Promise(e=>setTimeout(e,i)),Y1=$e`:host{--shape-corner-small:var(--mdui-shape-corner-small);--shape-corner-normal:var(--mdui-shape-corner-large);--shape-corner-large:var(--mdui-shape-corner-extra-large);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner-normal);cursor:pointer;-webkit-tap-highlight-color:transparent;transition-property:box-shadow;transition-timing-function:var(--mdui-motion-easing-emphasized);transition-duration:var(--mdui-motion-duration-medium4);width:3.5rem;height:3.5rem;box-shadow:var(--mdui-elevation-level3);font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.button{padding:0 1rem}:host([size=small]) .button{padding:0 .5rem}:host([size=large]) .button{padding:0 1.875rem}:host([lowered]){box-shadow:var(--mdui-elevation-level1)}:host([focus-visible]){box-shadow:var(--mdui-elevation-level3)}:host([lowered][focus-visible]){box-shadow:var(--mdui-elevation-level1)}:host([pressed]){box-shadow:var(--mdui-elevation-level3)}:host([lowered][pressed]){box-shadow:var(--mdui-elevation-level1)}:host([hover]){box-shadow:var(--mdui-elevation-level4)}:host([lowered][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=primary]){color:rgb(var(--mdui-color-on-primary-container));background-color:rgb(var(--mdui-color-primary-container));--mdui-comp-ripple-state-layer-color:var(
479
479
  --mdui-color-on-primary-container
480
480
  )}:host([variant=surface]){color:rgb(var(--mdui-color-primary));background-color:rgb(var(--mdui-color-surface-container-high));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=surface][lowered]){background-color:rgb(var(--mdui-color-surface-container-low))}:host([variant=secondary]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var(
481
481
  --mdui-color-on-secondary-container
482
482
  )}:host([variant=tertiary]){color:rgb(var(--mdui-color-on-tertiary-container));background-color:rgb(var(--mdui-color-tertiary-container));--mdui-comp-ripple-state-layer-color:var(
483
483
  --mdui-color-on-tertiary-container
484
- )}:host([size=small]){border-radius:var(--shape-corner-small);width:2.5rem;height:2.5rem}:host([size=large]){border-radius:var(--shape-corner-large);width:6rem;height:6rem}:host([disabled]:not([disabled=false i])),:host([loading]:not([loading=false i])){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])){color:rgba(var(--mdui-color-on-surface),38%);background-color:rgba(var(--mdui-color-on-surface),12%);box-shadow:var(--mdui-elevation-level0)}:host([extended]:not([extended=false i])){width:auto}.label{display:inline-flex;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear) var(--mdui-motion-duration-short2);padding-left:.25rem;padding-right:.25rem}.has-icon .label{margin-left:.5rem}:host([size=small]) .has-icon .label{margin-left:.25rem}:host([size=large]) .has-icon .label{margin-left:1rem}:host(:not([extended])) .label,:host([extended=false i]) .label{opacity:0;transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1)}:host([size=large]) .label{font-size:1.5em}.icon{display:inline-flex;font-size:1.71428571em}:host([size=large]) .icon{font-size:2.57142857em}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit}mdui-circular-progress{display:inline-flex;width:1.5rem;height:1.5rem}:host([size=large]) mdui-circular-progress{width:2.25rem;height:2.25rem}:host([disabled]:not([disabled=false i])) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;let vr=class extends pt{constructor(){super(...arguments),this.variant="primary",this.size="normal",this.extended=!1,this.rippleRef=Me(),this.hasSlotController=new $t(this,"icon"),this.definedController=new At(this,{relatedElements:[""]})}get rippleElement(){return this.rippleRef.value}async onExtendedChange(){const e=this.hasUpdated;this.extended?this.style.width=`${this.scrollWidth}px`:this.style.width="",await this.definedController.whenDefined(),await this.updateComplete,this.extended&&!e&&(this.style.width=`${this.scrollWidth}px`),e||(await km(),this.style.transitionProperty="box-shadow, width, bottom, transform")}render(){const e=Bi({button:!0,"has-icon":this.icon||this.hasSlotController.test("icon")});return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.isButton()?this.renderButton({className:e,part:"button",content:this.renderInner()}):this.disabled||this.loading?Z`<span part="button" class="_a ${e}">${this.renderInner()}</span>`:this.renderAnchor({className:e,part:"button",content:this.renderInner()})}`}renderLabel(){return Z`<slot part="label" class="label"></slot>`}renderIcon(){return this.loading?this.renderLoading():Z`<slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}"></mdui-icon>`:Qe}</slot>`}renderInner(){return[this.renderIcon(),this.renderLabel()]}};vr.styles=[pt.styles,Z1];w([L({reflect:!0})],vr.prototype,"variant",void 0);w([L({reflect:!0})],vr.prototype,"size",void 0);w([L({reflect:!0})],vr.prototype,"icon",void 0);w([L({type:Boolean,reflect:!0,converter:we})],vr.prototype,"extended",void 0);w([Re("extended")],vr.prototype,"onExtendedChange",null);vr=w([Ae("mdui-fab")],vr);const e_=$e`:host{position:relative;display:flex;flex:1 1 auto;overflow:hidden}:host([full-height]:not([full-height=false i])){height:100%}`;let Oo=class extends Ke{constructor(){super(...arguments),this.fullHeight=!1}render(){return Z`<slot></slot>`}};Oo.styles=[qe,e_];w([L({type:Boolean,reflect:!0,converter:we,attribute:"full-height"})],Oo.prototype,"fullHeight",void 0);Oo=w([Ae("mdui-layout")],Oo);const t_=$e`:host{display:flex;z-index:1}`;let Ds=class extends Rr{constructor(){super(...arguments),this.placement="top"}get layoutPlacement(){return this.placement}onPlacementChange(){this.layoutManager?.updateLayout(this)}render(){return Z`<slot></slot>`}};Ds.styles=[qe,t_];w([L({reflect:!0})],Ds.prototype,"placement",void 0);w([Re("placement",!0)],Ds.prototype,"onPlacementChange",null);Ds=w([Ae("mdui-layout-item")],Ds);const i_=$e`:host{flex:1 0 auto;max-width:100%;overflow:auto}`;let yc=class extends Ke{connectedCallback(){super.connectedCallback();const e=this.parentElement;Us(e,"mdui-layout")&&(this.layoutManager=bm(e),this.layoutManager.registerMain(this))}disconnectedCallback(){super.disconnectedCallback(),this.layoutManager&&this.layoutManager.unregisterMain()}render(){return Z`<slot></slot>`}};yc.styles=[qe,i_];yc=w([Ae("mdui-layout-main")],yc);const r_=$e`:host{--shape-corner:var(--mdui-shape-corner-none);position:relative;display:inline-block;width:100%;overflow:hidden;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container-highest));height:.25rem}.determinate,.indeterminate{background-color:rgb(var(--mdui-color-primary))}.determinate{height:100%;transition:width var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard)}.indeterminate::before{position:absolute;top:0;bottom:0;left:0;background-color:inherit;animation:mdui-comp-progress-indeterminate 2s var(--mdui-motion-easing-linear) infinite;content:' '}.indeterminate::after{position:absolute;top:0;bottom:0;left:0;background-color:inherit;animation:mdui-comp-progress-indeterminate-short 2s var(--mdui-motion-easing-linear) infinite;content:' '}@keyframes mdui-comp-progress-indeterminate{0%{left:0;width:0}50%{left:30%;width:70%}75%{left:100%;width:0}}@keyframes mdui-comp-progress-indeterminate-short{0%{left:0;width:0}50%{left:0;width:0}75%{left:0;width:25%}100%{left:100%;width:0}}`;let Ls=class extends Ke{constructor(){super(...arguments),this.max=1}render(){if(!gt(this.value)){const t=this.value;return Z`<div part="indicator" class="determinate" style="${jr({width:`${t/Math.max(this.max??t,t)*100}%`})}"></div>`}return Z`<div part="indicator" class="indeterminate"></div>`}};Ls.styles=[qe,r_];w([L({type:Number,reflect:!0})],Ls.prototype,"max",void 0);w([L({type:Number})],Ls.prototype,"value",void 0);Ls=w([Ae("mdui-linear-progress")],Ls);const n_=$e`:host{--shape-corner:var(--mdui-shape-corner-none);--shape-corner-rounded:var(--mdui-shape-corner-extra-large);position:relative;display:block;border-radius:var(--shape-corner);--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([rounded]:not([rounded=false i])),:host([rounded]:not([rounded=false i])) mdui-ripple{border-radius:var(--shape-corner-rounded)}:host([active]:not([active=false i])){background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var(
484
+ )}:host([size=small]){border-radius:var(--shape-corner-small);width:2.5rem;height:2.5rem}:host([size=large]){border-radius:var(--shape-corner-large);width:6rem;height:6rem}:host([disabled]:not([disabled=false i])),:host([loading]:not([loading=false i])){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])){color:rgba(var(--mdui-color-on-surface),38%);background-color:rgba(var(--mdui-color-on-surface),12%);box-shadow:var(--mdui-elevation-level0)}:host([extended]:not([extended=false i])){width:auto}.label{display:inline-flex;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear) var(--mdui-motion-duration-short2);padding-left:.25rem;padding-right:.25rem}.has-icon .label{margin-left:.5rem}:host([size=small]) .has-icon .label{margin-left:.25rem}:host([size=large]) .has-icon .label{margin-left:1rem}:host(:not([extended])) .label,:host([extended=false i]) .label{opacity:0;transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1)}:host([size=large]) .label{font-size:1.5em}.icon{display:inline-flex;font-size:1.71428571em}:host([size=large]) .icon{font-size:2.57142857em}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit}mdui-circular-progress{display:inline-flex;width:1.5rem;height:1.5rem}:host([size=large]) mdui-circular-progress{width:2.25rem;height:2.25rem}:host([disabled]:not([disabled=false i])) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;let vr=class extends pt{constructor(){super(...arguments),this.variant="primary",this.size="normal",this.extended=!1,this.rippleRef=Me(),this.hasSlotController=new $t(this,"icon"),this.definedController=new At(this,{relatedElements:[""]})}get rippleElement(){return this.rippleRef.value}async onExtendedChange(){const e=this.hasUpdated;this.extended?this.style.width=`${this.scrollWidth}px`:this.style.width="",await this.definedController.whenDefined(),await this.updateComplete,this.extended&&!e&&(this.style.width=`${this.scrollWidth}px`),e||(await km(),this.style.transitionProperty="box-shadow, width, bottom, transform")}render(){const e=Bi({button:!0,"has-icon":this.icon||this.hasSlotController.test("icon")});return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.isButton()?this.renderButton({className:e,part:"button",content:this.renderInner()}):this.disabled||this.loading?Z`<span part="button" class="_a ${e}">${this.renderInner()}</span>`:this.renderAnchor({className:e,part:"button",content:this.renderInner()})}`}renderLabel(){return Z`<slot part="label" class="label"></slot>`}renderIcon(){return this.loading?this.renderLoading():Z`<slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}"></mdui-icon>`:Qe}</slot>`}renderInner(){return[this.renderIcon(),this.renderLabel()]}};vr.styles=[pt.styles,Y1];w([L({reflect:!0})],vr.prototype,"variant",void 0);w([L({reflect:!0})],vr.prototype,"size",void 0);w([L({reflect:!0})],vr.prototype,"icon",void 0);w([L({type:Boolean,reflect:!0,converter:we})],vr.prototype,"extended",void 0);w([Re("extended")],vr.prototype,"onExtendedChange",null);vr=w([Ae("mdui-fab")],vr);const Z1=$e`:host{position:relative;display:flex;flex:1 1 auto;overflow:hidden}:host([full-height]:not([full-height=false i])){height:100%}`;let Oo=class extends Ke{constructor(){super(...arguments),this.fullHeight=!1}render(){return Z`<slot></slot>`}};Oo.styles=[qe,Z1];w([L({type:Boolean,reflect:!0,converter:we,attribute:"full-height"})],Oo.prototype,"fullHeight",void 0);Oo=w([Ae("mdui-layout")],Oo);const e_=$e`:host{display:flex;z-index:1}`;let Ds=class extends Rr{constructor(){super(...arguments),this.placement="top"}get layoutPlacement(){return this.placement}onPlacementChange(){this.layoutManager?.updateLayout(this)}render(){return Z`<slot></slot>`}};Ds.styles=[qe,e_];w([L({reflect:!0})],Ds.prototype,"placement",void 0);w([Re("placement",!0)],Ds.prototype,"onPlacementChange",null);Ds=w([Ae("mdui-layout-item")],Ds);const t_=$e`:host{flex:1 0 auto;max-width:100%;overflow:auto}`;let yc=class extends Ke{connectedCallback(){super.connectedCallback();const e=this.parentElement;Us(e,"mdui-layout")&&(this.layoutManager=bm(e),this.layoutManager.registerMain(this))}disconnectedCallback(){super.disconnectedCallback(),this.layoutManager&&this.layoutManager.unregisterMain()}render(){return Z`<slot></slot>`}};yc.styles=[qe,t_];yc=w([Ae("mdui-layout-main")],yc);const i_=$e`:host{--shape-corner:var(--mdui-shape-corner-none);position:relative;display:inline-block;width:100%;overflow:hidden;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container-highest));height:.25rem}.determinate,.indeterminate{background-color:rgb(var(--mdui-color-primary))}.determinate{height:100%;transition:width var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard)}.indeterminate::before{position:absolute;top:0;bottom:0;left:0;background-color:inherit;animation:mdui-comp-progress-indeterminate 2s var(--mdui-motion-easing-linear) infinite;content:' '}.indeterminate::after{position:absolute;top:0;bottom:0;left:0;background-color:inherit;animation:mdui-comp-progress-indeterminate-short 2s var(--mdui-motion-easing-linear) infinite;content:' '}@keyframes mdui-comp-progress-indeterminate{0%{left:0;width:0}50%{left:30%;width:70%}75%{left:100%;width:0}}@keyframes mdui-comp-progress-indeterminate-short{0%{left:0;width:0}50%{left:0;width:0}75%{left:0;width:25%}100%{left:100%;width:0}}`;let Ls=class extends Ke{constructor(){super(...arguments),this.max=1}render(){if(!gt(this.value)){const t=this.value;return Z`<div part="indicator" class="determinate" style="${jr({width:`${t/Math.max(this.max??t,t)*100}%`})}"></div>`}return Z`<div part="indicator" class="indeterminate"></div>`}};Ls.styles=[qe,i_];w([L({type:Number,reflect:!0})],Ls.prototype,"max",void 0);w([L({type:Number})],Ls.prototype,"value",void 0);Ls=w([Ae("mdui-linear-progress")],Ls);const r_=$e`:host{--shape-corner:var(--mdui-shape-corner-none);--shape-corner-rounded:var(--mdui-shape-corner-extra-large);position:relative;display:block;border-radius:var(--shape-corner);--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([rounded]:not([rounded=false i])),:host([rounded]:not([rounded=false i])) mdui-ripple{border-radius:var(--shape-corner-rounded)}:host([active]:not([active=false i])){background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var(
485
485
  --mdui-color-on-secondary-container
486
- )}:host([disabled]:not([disabled=false i])){pointer-events:none}.container{cursor:pointer;-webkit-user-select:none;user-select:none;text-decoration:none;color:inherit;-webkit-tap-highlight-color:transparent}:host([disabled]:not([disabled=false i])) .container{cursor:default;opacity:.38}:host([nonclickable]:not([href],[nonclickable=false i])) .container{cursor:auto;-webkit-user-select:auto;user-select:auto}.preset{display:flex;align-items:center;padding:.5rem 1.5rem .5rem 1rem;min-height:3.5rem}:host([alignment=start]) .preset{align-items:flex-start}:host([alignment=end]) .preset{align-items:flex-end}.body{display:flex;flex:1 1 100%;flex-direction:column;justify-content:center;min-width:0}.headline{display:block;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}:host([active]:not([active=false i])) .headline{color:rgb(var(--mdui-color-on-secondary-container))}.description{display:none;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([disabled]:not([disabled=false i])) .description,:host([focused]) .description,:host([hover]) .description,:host([pressed]) .description{color:rgb(var(--mdui-color-on-surface))}.has-description .description{display:block}:host([description-line='1']) .description,:host([headline-line='1']) .headline{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([description-line='2']) .description,:host([description-line='3']) .description,:host([headline-line='2']) .headline,:host([headline-line='3']) .headline{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}:host([description-line='2']) .description,:host([headline-line='2']) .headline{-webkit-line-clamp:2}:host([description-line='3']) .description,:host([headline-line='3']) .headline{-webkit-line-clamp:3}.end-icon,.icon{display:flex;flex:0 0 auto;font-size:var(--mdui-typescale-label-small-size);font-weight:var(--mdui-typescale-label-small-weight);letter-spacing:var(--mdui-typescale-label-small-tracking);line-height:var(--mdui-typescale-label-small-line-height);color:rgb(var(--mdui-color-on-surface-variant))}:host([disabled]:not([disabled=false i])) .end-icon,:host([disabled]:not([disabled=false i])) .icon,:host([focused]) .end-icon,:host([focused]) .icon,:host([hover]) .end-icon,:host([hover]) .icon,:host([pressed]) .end-icon,:host([pressed]) .icon{color:rgb(var(--mdui-color-on-surface))}:host([active]:not([active=false i])) .end-icon,:host([active]:not([active=false i])) .icon{color:rgb(var(--mdui-color-on-secondary-container))}.end-icon mdui-icon,.icon mdui-icon,.is-end-icon ::slotted([slot=end-icon]),.is-icon ::slotted([slot=icon]){font-size:1.5rem}.has-icon .icon{margin-right:1rem}.has-icon ::slotted(mdui-checkbox[slot=icon]),.has-icon ::slotted(mdui-radio[slot=icon]){margin-left:-.5rem}.has-end-icon .end-icon{margin-left:1rem}.has-end-icon ::slotted(mdui-checkbox[slot=end-icon]),.has-end-icon ::slotted(mdui-radio[slot=end-icon]){margin-right:-.5rem}`;let Ut=class extends On(Di(bi(Ke))){constructor(){super(...arguments),this.disabled=!1,this.active=!1,this.nonclickable=!1,this.rounded=!1,this.alignment="center",this.rippleRef=Me(),this.itemRef=Me(),this.hasSlotController=new $t(this,"[default]","description","icon","end-icon","custom")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.focusDisabled}get focusElement(){return this.href&&!this.disabled?this.itemRef.value:this}get focusDisabled(){return this.href?this.disabled:this.disabled||this.nonclickable}render(){const e=!this.hasSlotController.test("custom"),t=this.icon||this.hasSlotController.test("icon"),r=this.endIcon||this.hasSlotController.test("end-icon"),n=this.description||this.hasSlotController.test("description"),s=a=>Us(a,"mdui-icon")||Tw(a).startsWith("mdui-icon-"),o=Bi({container:!0,preset:e,"has-icon":t,"has-end-icon":r,"has-description":n,"is-icon":s(this.iconElements[0]),"is-end-icon":s(this.endIconElements[0])});return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.href&&!this.disabled?this.renderAnchor({className:o,content:this.renderInner(),part:"container",refDirective:De(this.itemRef)}):Z`<div part="container" class="${o}" ${De(this.itemRef)}>${this.renderInner()}</div>`}`}renderInner(){const e=this.hasSlotController.test("[default]");return Z`<slot name="custom"><slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}"></mdui-icon>`:Qe}</slot><div part="body" class="body">${e?Z`<slot part="headline" class="headline"></slot>`:Z`<div part="headline" class="headline">${this.headline}</div>`}<slot name="description" part="description" class="description">${this.description}</slot></div><slot name="end-icon" part="end-icon" class="end-icon">${this.endIcon?Z`<mdui-icon name="${this.endIcon}"></mdui-icon>`:Qe}</slot></slot>`}};Ut.styles=[qe,n_];w([L({reflect:!0})],Ut.prototype,"headline",void 0);w([L({type:Number,reflect:!0,attribute:"headline-line"})],Ut.prototype,"headlineLine",void 0);w([L({reflect:!0})],Ut.prototype,"description",void 0);w([L({type:Number,reflect:!0,attribute:"description-line"})],Ut.prototype,"descriptionLine",void 0);w([L({reflect:!0})],Ut.prototype,"icon",void 0);w([L({reflect:!0,attribute:"end-icon"})],Ut.prototype,"endIcon",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ut.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ut.prototype,"active",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ut.prototype,"nonclickable",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ut.prototype,"rounded",void 0);w([L({reflect:!0})],Ut.prototype,"alignment",void 0);w([gi({slot:"icon",flatten:!0})],Ut.prototype,"iconElements",void 0);w([gi({slot:"end-icon",flatten:!0})],Ut.prototype,"endIconElements",void 0);Ut=w([Ae("mdui-list-item")],Ut);const s_=$e`:host{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:default;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-label-small-size);font-weight:var(--mdui-typescale-label-small-weight);letter-spacing:var(--mdui-typescale-label-small-tracking);line-height:var(--mdui-typescale-label-small-line-height);padding-left:1rem;padding-right:1.5rem;height:3.5rem;line-height:3.5rem}`;let vc=class extends Ke{render(){return Z`<slot></slot>`}};vc.styles=[qe,s_];vc=w([Ae("mdui-list-subheader")],vc);const o_=$e`:host{display:block;padding:.5rem 0}::slotted(mdui-divider[middle]){margin-left:1rem;margin-right:1.5rem}`;let wc=class extends Ke{render(){return Z`<slot></slot>`}};wc.styles=[qe,o_];wc=w([Ae("mdui-list")],wc);let _c=class extends yt{render(){return Ri('<path d="m10 17 5-5-5-5v10z"/>')}};_c.styles=ki;_c=w([Ae("mdui-icon-arrow-right")],_c);const a_=$e`:host{position:relative;display:block}:host([selected]){background-color:rgba(var(--mdui-color-primary),12%)}:host([disabled]:not([disabled=false i])){pointer-events:none}.container{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host([disabled]:not([disabled=false i])) .container{cursor:default;opacity:.38}.preset{display:flex;align-items:center;text-decoration:none;height:3rem;padding:0 .75rem}.preset.dense{height:2rem}.label-container{flex:1 1 100%;min-width:0}.label{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking)}.end-icon,.end-text,.icon,.selected-icon{display:none;flex:0 0 auto;color:rgb(var(--mdui-color-on-surface-variant))}.has-end-icon .end-icon,.has-end-text .end-text,.has-icon .icon,.has-icon .selected-icon{display:flex}.end-icon,.icon,.selected-icon{font-size:1.5rem}.end-icon::slotted(mdui-avatar),.icon::slotted(mdui-avatar),.selected-icon::slotted(mdui-avatar){width:1.5rem;height:1.5rem}.dense .end-icon,.dense .icon,.dense .selected-icon{font-size:1.125rem}.dense .end-icon::slotted(mdui-avatar),.dense .icon::slotted(mdui-avatar),.dense .selected-icon::slotted(mdui-avatar){width:1.125rem;height:1.125rem}.end-icon .i,.icon .i,.selected-icon .i,::slotted([slot=end-icon]),::slotted([slot=icon]),::slotted([slot=selected-icon]){font-size:inherit}.end-text{font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.icon,.selected-icon{margin-right:.75rem}.end-icon,.end-text{margin-left:.75rem}.arrow-right{color:rgb(var(--mdui-color-on-surface))}.submenu{--shape-corner:var(--mdui-shape-corner-extra-small);display:block;position:absolute;z-index:1;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);min-width:7rem;max-width:17.5rem;padding-top:.5rem;padding-bottom:.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.submenu::slotted(mdui-divider){margin-top:.5rem;margin-bottom:.5rem}`;let Ct=class extends On(Di(bi(Ke))){constructor(){super(),this.disabled=!1,this.submenuOpen=!1,this.selected=!1,this.dense=!1,this.focusable=!1,this.key=Sr(),this.rippleRef=Me(),this.containerRef=Me(),this.submenuRef=Me(),this.hasSlotController=new $t(this,"[default]","icon","end-icon","end-text","submenu","custom"),this.definedController=new At(this,{relatedElements:[""]}),this.onOuterClick=this.onOuterClick.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this)}get focusDisabled(){return this.disabled||!this.focusable}get focusElement(){return this.href&&!this.disabled?this.containerRef.value:this}get rippleDisabled(){return this.disabled}get rippleElement(){return this.rippleRef.value}get hasSubmenu(){return this.hasSlotController.test("submenu")}async onOpenChange(){const e=this.hasUpdated;if(!this.submenuOpen&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=ti(this,"linear"),r=ti(this,"emphasized-decelerate"),n=ti(this,"emphasized-accelerate");if(this.submenuOpen){if(e&&!this.emit("submenu-open",{cancelable:!0}))return;const s=$i(this,"medium4");await Zt(this.submenuRef.value),this.submenuRef.value.hidden=!1,this.updateSubmenuPositioner(),await Promise.all([st(this.submenuRef.value,[{transform:"scaleY(0.45)"},{transform:"scaleY(1)"}],{duration:e?s:0,easing:r}),st(this.submenuRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:e?s:0,easing:t})]),e&&this.emit("submenu-opened")}else{if(!this.emit("submenu-close",{cancelable:!0}))return;const o=$i(this,"short4");await Zt(this.submenuRef.value),await Promise.all([st(this.submenuRef.value,[{transform:"scaleY(1)"},{transform:"scaleY(0.45)"}],{duration:o,easing:n}),st(this.submenuRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:o,easing:t})]),this.submenuRef.value&&(this.submenuRef.value.hidden=!0),this.emit("submenu-closed")}}connectedCallback(){super.connectedCallback(),this.definedController.whenDefined().then(()=>{document.addEventListener("pointerdown",this.onOuterClick)})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onOuterClick)}firstUpdated(e){super.firstUpdated(e),this.definedController.whenDefined().then(()=>{this.addEventListener("focus",this.onFocus),this.addEventListener("blur",this.onBlur),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeydown),this.addEventListener("mouseenter",this.onMouseEnter),this.addEventListener("mouseleave",this.onMouseLeave)})}render(){const e=this.hasSubmenu,t=this.hasSlotController.test("custom"),r=this.hasSlotController.test("end-icon"),n=!this.endIcon&&e&&!r,s=this.endIcon||e||r,o=!gt(this.icon)||this.selects==="single"||this.selects==="multiple"||this.hasSlotController.test("icon"),a=!!this.endText||this.hasSlotController.test("end-text"),c=Bi({container:!0,dense:this.dense,preset:!t,"has-icon":o,"has-end-text":a,"has-end-icon":s});return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.href&&!this.disabled?this.renderAnchor({part:"container",className:c,content:this.renderInner(n,o),refDirective:De(this.containerRef),tabIndex:this.focusable?0:-1}):Z`<div part="container" ${De(this.containerRef)} class="${c}">${this.renderInner(n,o)}</div>`} ${at(e,()=>Z`<slot name="submenu" ${De(this.submenuRef)} part="submenu" class="submenu" hidden></slot>`)}`}onOuterClick(e){!this.disabled&&this.submenuOpen&&this!==e.target&&!oe.contains(this,e.target)&&(this.submenuOpen=!1)}hasTrigger(e){return this.submenuTrigger?this.submenuTrigger.split(" ").includes(e):!1}onFocus(){this.disabled||this.submenuOpen||!this.hasTrigger("focus")||!this.hasSubmenu||(this.submenuOpen=!0)}onBlur(){this.disabled||!this.submenuOpen||!this.hasTrigger("focus")||!this.hasSubmenu||(this.submenuOpen=!1)}onClick(e){this.disabled||e.button||!this.hasTrigger("click")||e.target!==this||!this.hasSubmenu||this.submenuOpen&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.submenuOpen=!this.submenuOpen)}onKeydown(e){this.disabled||!this.hasSubmenu||(!this.submenuOpen&&e.key==="Enter"&&(e.stopPropagation(),this.submenuOpen=!0),this.submenuOpen&&e.key==="Escape"&&(e.stopPropagation(),this.submenuOpen=!1))}onMouseEnter(){this.disabled||!this.hasTrigger("hover")||!this.hasSubmenu||(window.clearTimeout(this.submenuCloseTimeout),this.submenuOpenDelay?this.submenuOpenTimeout=window.setTimeout(()=>{this.submenuOpen=!0},this.submenuOpenDelay):this.submenuOpen=!0)}onMouseLeave(){this.disabled||!this.hasTrigger("hover")||!this.hasSubmenu||(window.clearTimeout(this.submenuOpenTimeout),this.submenuCloseTimeout=window.setTimeout(()=>{this.submenuOpen=!1},this.submenuCloseDelay||50))}updateSubmenuPositioner(){const e=oe(window),t=oe(this.submenuRef.value),r=this.getBoundingClientRect(),n=t.innerWidth(),s=t.innerHeight(),o=8;let a="bottom",c="right";e.height()-r.top>s+o?a="bottom":r.top+r.height>s+o&&(a="top"),e.width()-r.left-r.width>n+o?c="right":r.left>n+o&&(c="left"),oe(this.submenuRef.value).css({top:a==="bottom"?0:r.height-s,left:c==="right"?r.width:-n,transformOrigin:[c==="right"?0:"100%",a==="bottom"?0:"100%"].join(" ")})}renderInner(e,t){return Z`<slot name="custom">${this.selected?Z`<slot name="selected-icon" part="selected-icon" class="selected-icon">${this.selectedIcon?Z`<mdui-icon name="${this.selectedIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-check class="i"></mdui-icon-check>`}</slot>`:Z`<slot name="icon" part="icon" class="icon">${t?Z`<mdui-icon name="${this.icon}" class="i"></mdui-icon>`:Qe}</slot>`}<div class="label-container"><slot part="label" class="label"></slot></div><slot name="end-text" part="end-text" class="end-text">${this.endText}</slot>${e?Z`<mdui-icon-arrow-right part="end-icon" class="end-icon arrow-right"></mdui-icon-arrow-right>`:Z`<slot name="end-icon" part="end-icon" class="end-icon">${this.endIcon?Z`<mdui-icon name="${this.endIcon}"></mdui-icon>`:Qe}</slot>`}</slot>`}};Ct.styles=[qe,a_];w([L({reflect:!0})],Ct.prototype,"value",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ct.prototype,"disabled",void 0);w([L({reflect:!0})],Ct.prototype,"icon",void 0);w([L({reflect:!0,attribute:"end-icon"})],Ct.prototype,"endIcon",void 0);w([L({reflect:!0,attribute:"end-text"})],Ct.prototype,"endText",void 0);w([L({reflect:!0,attribute:"selected-icon"})],Ct.prototype,"selectedIcon",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"submenu-open"})],Ct.prototype,"submenuOpen",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ct.prototype,"selected",void 0);w([Be()],Ct.prototype,"dense",void 0);w([Be()],Ct.prototype,"selects",void 0);w([Be()],Ct.prototype,"submenuTrigger",void 0);w([Be()],Ct.prototype,"submenuOpenDelay",void 0);w([Be()],Ct.prototype,"submenuCloseDelay",void 0);w([Be()],Ct.prototype,"focusable",void 0);w([Re("submenuOpen")],Ct.prototype,"onOpenChange",null);Ct=w([Ae("mdui-menu-item")],Ct);const l_=$e`:host{--shape-corner:var(--mdui-shape-corner-extra-small);position:relative;display:block;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);min-width:7rem;max-width:17.5rem;padding-top:.5rem;padding-bottom:.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}::slotted(mdui-divider){margin-top:.5rem;margin-bottom:.5rem}`;let Wt=class extends Ke{constructor(){super(...arguments),this.dense=!1,this.submenuTrigger="click hover",this.submenuOpenDelay=200,this.submenuCloseDelay=200,this.selectedKeys=[],this.isInitial=!0,this.lastActiveItems=[],this.definedController=new At(this,{relatedElements:["mdui-menu-item"]})}get items(){return oe(this.childrenItems).find("mdui-menu-item").add(this.childrenItems).get()}get itemsEnabled(){return this.items.filter(e=>!e.disabled)}get isSingle(){return this.selects==="single"}get isMultiple(){return this.selects==="multiple"}get isSelectable(){return this.isSingle||this.isMultiple}get isSubmenu(){return!oe(this).parent().length}get lastActiveItem(){const e=this.lastActiveItems.length?this.lastActiveItems.length-1:0;return this.lastActiveItems[e]}set lastActiveItem(e){const t=this.lastActiveItems.length?this.lastActiveItems.length-1:0;this.lastActiveItems[t]=e}async onSlotChange(){await this.definedController.whenDefined(),this.items.forEach(e=>{e.dense=this.dense,e.selects=this.selects,e.submenuTrigger=this.submenuTrigger,e.submenuOpenDelay=this.submenuOpenDelay,e.submenuCloseDelay=this.submenuCloseDelay})}async onSelectsChange(){this.isSelectable?this.isSingle&&this.setSelectedKeys(this.selectedKeys.slice(0,1)):this.setSelectedKeys([]),await this.onSelectedKeysChange()}async onSelectedKeysChange(){await this.definedController.whenDefined();const e=this.itemsEnabled.filter(r=>this.selectedKeys.includes(r.key)).map(r=>r.value),t=this.isMultiple?e:e[0]||void 0;this.setValue(t),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),!this.isSelectable){this.updateSelected();return}const e=(this.isSingle?[this.value]:wt(this.value)?[this.value]:this.value).filter(t=>t);if(!e.length)this.setSelectedKeys([]);else if(this.isSingle){const t=this.itemsEnabled.find(r=>r.value===e[0]);this.setSelectedKeys(t?[t.key]:[])}else this.isMultiple&&this.setSelectedKeys(this.itemsEnabled.filter(t=>e.includes(t.value)).map(t=>t.key));this.updateSelected(),this.updateFocusable()}focus(e){this.lastActiveItem&&this.focusOne(this.lastActiveItem,e)}blur(){this.lastActiveItem&&this.lastActiveItem.blur()}firstUpdated(e){super.firstUpdated(e),this.definedController.whenDefined().then(()=>{this.updateFocusable(),this.lastActiveItem=this.items.find(t=>t.focusable)}),this.addEventListener("submenu-open",t=>{const r=oe(t.target),n=r.children("mdui-menu-item:not([disabled])").get(),s=r.parents("mdui-menu-item").length+1;n.length&&(this.lastActiveItems[s]=n[0],this.updateFocusable(),this.focusOne(this.lastActiveItems[s]))}),this.addEventListener("submenu-close",t=>{const n=oe(t.target).parents("mdui-menu-item").length+1;this.lastActiveItems.length-1===n&&(this.lastActiveItems.pop(),this.updateFocusable(),this.lastActiveItems[n-1]&&this.focusOne(this.lastActiveItems[n-1]))})}render(){return Z`<slot @slotchange="${this.onSlotChange}" @click="${this.onClick}" @keydown="${this.onKeyDown}"></slot>`}setSelectedKeys(e){kn(this.selectedKeys,e)||(this.selectedKeys=e)}setValue(e){this.isSingle||gt(this.value)||gt(e)?this.value=e:kn(this.value,e)||(this.value=e)}getSiblingsItems(e,t=!1){return oe(e).parent().children(`mdui-menu-item${t?":not([disabled])":""}`).get()}updateFocusable(){if(this.lastActiveItem){this.items.forEach(e=>{e.focusable=e.key===this.lastActiveItem.key});return}if(!this.selectedKeys.length){this.itemsEnabled.forEach((e,t)=>{e.focusable=!t});return}if(this.isSingle){this.items.forEach(e=>{e.focusable=this.selectedKeys.includes(e.key)});return}if(this.isMultiple){const e=this.items.find(t=>t.focusable);(!e?.key||!this.selectedKeys.includes(e.key))&&this.itemsEnabled.filter(t=>this.selectedKeys.includes(t.key)).forEach((t,r)=>t.focusable=!r)}}updateSelected(){this.items.forEach(e=>{e.selected=this.selectedKeys.includes(e.key)})}selectOne(e){if(this.isMultiple){const t=[...this.selectedKeys];t.includes(e.key)?t.splice(t.indexOf(e.key),1):t.push(e.key),this.setSelectedKeys(t)}this.isSingle&&(this.selectedKeys.includes(e.key)?this.setSelectedKeys([]):this.setSelectedKeys([e.key])),this.isInitial=!1,this.updateSelected()}async focusableOne(e){this.items.forEach(t=>t.focusable=t.key===e.key),await km()}focusOne(e,t){e.focus(t)}async onClick(e){if(!this.definedController.isDefined()||this.isSubmenu||e.button)return;const r=e.target.closest("mdui-menu-item");!r||r.disabled||(this.lastActiveItem=r,this.isSelectable&&r.value&&this.selectOne(r),await this.focusableOne(r),this.focusOne(r))}async onKeyDown(e){if(!this.definedController.isDefined()||this.isSubmenu)return;const t=e.target;if(e.key==="Enter"&&(e.preventDefault(),t.click()),e.key===" "&&(e.preventDefault(),this.isSelectable&&t.value&&(this.selectOne(t),await this.focusableOne(t),this.focusOne(t))),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){const r=this.getSiblingsItems(t,!0),n=r.find(o=>o.focusable);let s=n?r.indexOf(n):0;if(r.length>0){e.preventDefault(),e.key==="ArrowDown"?s++:e.key==="ArrowUp"?s--:e.key==="Home"?s=0:e.key==="End"&&(s=r.length-1),s<0&&(s=r.length-1),s>r.length-1&&(s=0),this.lastActiveItem=r[s],await this.focusableOne(r[s]),this.focusOne(r[s]);return}}}};Wt.styles=[qe,l_];w([L({reflect:!0})],Wt.prototype,"selects",void 0);w([L()],Wt.prototype,"value",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Wt.prototype,"dense",void 0);w([L({reflect:!0,attribute:"submenu-trigger"})],Wt.prototype,"submenuTrigger",void 0);w([L({type:Number,reflect:!0,attribute:"submenu-open-delay"})],Wt.prototype,"submenuOpenDelay",void 0);w([L({type:Number,reflect:!0,attribute:"submenu-close-delay"})],Wt.prototype,"submenuCloseDelay",void 0);w([Be()],Wt.prototype,"selectedKeys",void 0);w([gi({flatten:!0,selector:"mdui-menu-item"})],Wt.prototype,"childrenItems",void 0);w([Re("dense"),Re("selects"),Re("submenuTrigger"),Re("submenuOpenDelay"),Re("submenuCloseDelay")],Wt.prototype,"onSlotChange",null);w([Re("selects",!0)],Wt.prototype,"onSelectsChange",null);w([Re("selectedKeys",!0)],Wt.prototype,"onSelectedKeysChange",null);w([Re("value")],Wt.prototype,"onValueChange",null);Wt=w([Ae("mdui-menu")],Wt);const c_=$e`:host{--shape-corner-indicator:var(--mdui-shape-corner-full);position:relative;z-index:0;flex:1;overflow:hidden;min-width:3rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}.container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;padding-top:.75rem;padding-bottom:.75rem}.container:not(.initial){transition:padding var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}mdui-ripple{z-index:1;left:50%;transform:translateX(-50%);width:4rem;height:2rem;margin-top:.75rem;border-radius:var(--mdui-shape-corner-full)}mdui-ripple:not(.initial){transition:margin-top var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.indicator{position:relative;display:flex;align-items:center;justify-content:center;background-color:transparent;border-radius:var(--shape-corner-indicator);height:2rem;width:2rem}:not(.initial) .indicator{transition:background-color var(--mdui-motion-duration-short1) var(--mdui-motion-easing-standard),width var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}.active-icon,.icon{color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}.active-icon mdui-icon,.icon mdui-icon,::slotted([slot=active]),::slotted([slot=icon]){font-size:inherit}.icon{display:flex}.active-icon{display:none}.label{display:flex;align-items:center;height:1rem;color:rgb(var(--mdui-color-on-surface-variant));margin-top:.25rem;margin-bottom:.25rem;font-size:var(--mdui-typescale-label-medium-size);font-weight:var(--mdui-typescale-label-medium-weight);letter-spacing:var(--mdui-typescale-label-medium-tracking);line-height:var(--mdui-typescale-label-medium-line-height)}:not(.initial) .label{transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear)}:host(:not([active])) mdui-ripple.label-visibility-selected,mdui-ripple.label-visibility-unlabeled{margin-top:1.5rem}.container.label-visibility-unlabeled,:host(:not([active])) .container.label-visibility-selected{padding-top:1.5rem;padding-bottom:0}.container.label-visibility-unlabeled .label,:host(:not([active])) .container.label-visibility-selected .label{opacity:0}:host([active]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([active]) .indicator{width:4rem;background-color:rgb(var(--mdui-color-secondary-container))}:host([active]) .active-icon,:host([active]) .icon{color:rgb(var(--mdui-color-on-secondary-container))}:host([active]) .has-active-icon .active-icon{display:flex}:host([active]) .has-active-icon .icon{display:none}:host([active]) .label{color:rgb(var(--mdui-color-on-surface))}`;let Vi=class extends On(Di(bi(Ke))){constructor(){super(...arguments),this.isInitial=!0,this.active=!1,this.disabled=!1,this.key=Sr(),this.rippleRef=Me(),this.hasSlotController=new $t(this,"active-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.href?this.renderRoot?.querySelector("._a"):this}get focusDisabled(){return this.disabled}render(){const e=Bi({"label-visibility-selected":this.labelVisibility==="selected","label-visibility-labeled":this.labelVisibility==="labeled","label-visibility-unlabeled":this.labelVisibility==="unlabeled",initial:this.isInitial}),t=Bi([{container:!0,"has-active-icon":this.activeIcon||this.hasSlotController.test("active-icon")},e]);return Z`<mdui-ripple .noRipple="${!this.active||this.noRipple}" class="${e}" ${De(this.rippleRef)}></mdui-ripple>${this.href?this.renderAnchor({part:"container",className:t,content:this.renderInner()}):Z`<div part="container" class="${t}">${this.renderInner()}</div>`}`}renderInner(){return Z`<div part="indicator" class="indicator"><slot name="badge" part="badge" class="badge"></slot><slot name="active-icon" part="active-icon" class="active-icon">${this.activeIcon?Z`<mdui-icon name="${this.activeIcon}"></mdui-icon>`:Qe}</slot><slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}"></mdui-icon>`:Qe}</slot></div><slot part="label" class="label"></slot>`}};Vi.styles=[qe,c_];w([L({reflect:!0})],Vi.prototype,"icon",void 0);w([L({reflect:!0,attribute:"active-icon"})],Vi.prototype,"activeIcon",void 0);w([L({reflect:!0})],Vi.prototype,"value",void 0);w([Be()],Vi.prototype,"labelVisibility",void 0);w([Be()],Vi.prototype,"isInitial",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Vi.prototype,"active",void 0);w([Be()],Vi.prototype,"disabled",void 0);Vi=w([Ae("mdui-navigation-bar-item")],Vi);const d_=$e`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;right:0;bottom:0;left:0;display:flex;flex:0 0 auto;overflow:hidden;border-radius:var(--shape-corner) var(--shape-corner) 0 0;z-index:var(--z-index);transition-property:transform;transition-duration:var(--mdui-motion-duration-long2);transition-timing-function:var(--mdui-motion-easing-emphasized);height:5rem;background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level2)}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([hide]:not([hide=false i])){transform:translateY(5.625rem);transition-duration:var(--mdui-motion-duration-short4)}`;let _i=class extends Ed(Rr){constructor(){super(...arguments),this.hide=!1,this.labelVisibility="auto",this.activeKey=0,this.isInitial=!0,this.definedController=new At(this,{relatedElements:["mdui-navigation-bar-item"]})}get scrollPaddingPosition(){return"bottom"}get layoutPlacement(){return"bottom"}async onActiveKeyChange(){await this.definedController.whenDefined();const e=this.items.find(t=>t.key===this.activeKey);this.value=e?.value,this.isInitial||this.emit("change")}async onValueChange(){this.isInitial=!this.hasUpdated,await this.definedController.whenDefined();const e=this.items.find(t=>t.value===this.value);this.activeKey=e?.key??0,this.updateItems()}async onLabelVisibilityChange(){await this.definedController.whenDefined(),this.updateItems()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("transitionend",t=>{t.target===this&&this.emit(this.hide?"hidden":"shown")})}render(){return Z`<slot @slotchange="${this.onSlotChange}" @click="${this.onClick}"></slot>`}runScrollThreshold(e){!e&&!this.hide&&this.emit("hide",{cancelable:!0})&&(this.hide=!0),e&&this.hide&&this.emit("show",{cancelable:!0})&&(this.hide=!1)}onClick(e){if(e.button)return;const r=e.target.closest("mdui-navigation-bar-item");r&&(this.activeKey=r.key,this.isInitial=!1,this.updateItems())}updateItems(){const e=this.items,t=this.labelVisibility==="auto"?e.length<=3?"labeled":"selected":this.labelVisibility;e.forEach(r=>{r.active=this.activeKey===r.key,r.labelVisibility=t,r.isInitial=this.isInitial})}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems()}};_i.styles=[qe,d_];w([L({type:Boolean,reflect:!0,converter:we})],_i.prototype,"hide",void 0);w([L({reflect:!0,attribute:"label-visibility"})],_i.prototype,"labelVisibility",void 0);w([L({reflect:!0})],_i.prototype,"value",void 0);w([L({reflect:!0,attribute:"scroll-behavior"})],_i.prototype,"scrollBehavior",void 0);w([Be()],_i.prototype,"activeKey",void 0);w([gi({selector:"mdui-navigation-bar-item",flatten:!0})],_i.prototype,"items",void 0);w([Re("activeKey",!0)],_i.prototype,"onActiveKeyChange",null);w([Re("value")],_i.prototype,"onValueChange",null);w([Re("labelVisibility",!0)],_i.prototype,"onLabelVisibilityChange",null);_i=w([Ae("mdui-navigation-bar")],_i);const xc=i=>{const e=Er(),t=ii(),r=e.getComputedStyle(t.documentElement),n=tr(i)?oe(i).innerWidth():Jo(i)?i:oe(e).innerWidth(),s=a=>{const c=r.getPropertyValue(`--mdui-breakpoint-${a}`).toLowerCase();return parseFloat(c)},o=a=>{switch(a){case"xs":return"sm";case"sm":return"md";case"md":return"lg";case"lg":return"xl";case"xl":return"xxl"}};return{up(a){return n>=s(a)},down(a){return n<s(a)},only(a){return a==="xxl"?this.up(a):this.up(a)&&this.down(o(a))},not(a){return!this.only(a)},between(a,c){return this.up(a)&&this.down(c)}}},u_=$e`:host{--shape-corner:var(--mdui-shape-corner-large);--z-index:2200;display:none;position:fixed;top:0;bottom:0;left:0;z-index:1;width:22.5rem}:host([placement=right]){left:initial;right:0}:host([mobile]),:host([modal]:not([modal=false i])){top:0!important;right:0;bottom:0!important;width:initial;z-index:var(--z-index)}:host([placement=right][mobile]),:host([placement=right][modal]:not([modal=false i])){left:0}:host([contained]:not([contained=false i])){position:absolute}.overlay{position:absolute;inset:0;z-index:inherit;background-color:rgba(var(--mdui-color-scrim),.4)}.panel{display:block;position:absolute;top:0;bottom:0;left:0;width:100%;overflow:auto;z-index:inherit;background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level0)}:host([placement=right]) .panel{left:initial;right:0}:host([mobile]) .panel,:host([modal]:not([modal=false i])) .panel{border-radius:0 var(--shape-corner) var(--shape-corner) 0;max-width:80%;width:22.5rem;background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([placement=right][mobile]) .panel,:host([placement=right][modal]:not([modal=false i])) .panel{border-radius:var(--shape-corner) 0 0 var(--shape-corner)}`;let ri=class extends Rr{constructor(){super(...arguments),this.open=!1,this.modal=!1,this.closeOnEsc=!1,this.closeOnOverlayClick=!1,this.placement="left",this.contained=!1,this.mobile=!1,this.overlayRef=Me(),this.panelRef=Me(),this.definedController=new At(this,{needDomReady:!0})}get layoutPlacement(){return this.placement}get lockTarget(){return this.contained||this.isParentLayout?this.parentElement:document.documentElement}get isModal(){return this.mobile||this.modal}async onContainedChange(){await this.definedController.whenDefined(),this.observeResize?.unobserve(),this.setObserveResize()}onPlacementChange(){this.isParentLayout&&this.layoutManager.updateLayout(this)}async onMobileChange(){!this.open||this.isParentLayout||this.contained||(await this.definedController.whenDefined(),this.isModal?(bc(this,this.lockTarget),await this.getLockTargetAnimate(!1,0)):(Ss(this,this.lockTarget),await this.getLockTargetAnimate(!0,0)))}async onOpenChange(){let e=this.panelRef.value,t=this.overlayRef.value;const r=this.placement==="right",n=ti(this,"linear"),s=ti(this,"emphasized"),o=(c,l)=>{oe(this.layoutManager.getItemsAndMain()).css("transition",hd(c)?null:`all ${c}ms ${l}`)},a=async()=>{const c=[];if(this.isModal?c.push(t,e):this.isParentLayout||c.push(this.lockTarget),this.isParentLayout){const l=this.layoutManager.getItemsAndMain(),d=l.indexOf(this);c.push(...l.slice(d))}!this.isModal&&!c.includes(this)&&c.push(this),await Promise.all(c.map(l=>Zt(l)))};if(this.open){const c=this.hasUpdated;if(c||(await this.updateComplete,e=this.panelRef.value,t=this.overlayRef.value),c&&!this.emit("open",{cancelable:!0}))return;await this.definedController.whenDefined(),this.style.display="block",this.originalTrigger=document.activeElement,this.isModal&&(this.modalHelper.activate(),this.contained||bc(this,this.lockTarget)),await a(),requestAnimationFrame(()=>{const u=this.querySelector("[autofocus]");u?u.focus({preventScroll:!0}):e.focus({preventScroll:!0})});const l=$i(this,"long2"),d=[];if(this.isModal?d.push(st(t,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:c?l:0,easing:n})):this.isParentLayout||d.push(this.getLockTargetAnimate(!0,c?l:0)),this.isParentLayout&&c&&(o(l,s),this.layoutManager.updateLayout(this)),d.push(st(this.isModal?e:this,[{transform:`translateX(${r?"":"-"}100%)`},{transform:"translateX(0)"}],{duration:c?l:0,easing:s})),await Promise.all(d),!this.open)return;this.isParentLayout&&c&&o(null),c&&this.emit("opened")}else if(this.hasUpdated){if(!this.emit("close",{cancelable:!0}))return;await this.definedController.whenDefined(),this.isModal&&this.modalHelper.deactivate(),await a();const l=$i(this,"short4"),d=[];if(this.isModal?d.push(st(t,[{opacity:1},{opacity:0}],{duration:l,easing:n})):this.isParentLayout||d.push(this.getLockTargetAnimate(!1,l)),this.isParentLayout&&(o(l,s),this.layoutManager.updateLayout(this,{width:0})),d.push(st(this.isModal?e:this,[{transform:"translateX(0)"},{transform:`translateX(${r?"":"-"}100%)`}],{duration:l,easing:s})),await Promise.all(d),this.open)return;this.isParentLayout&&o(null),this.style.display="none",this.isModal&&!this.contained&&Ss(this,this.lockTarget);const u=this.originalTrigger;vt(u?.focus)&&setTimeout(()=>u.focus()),this.emit("closed")}}connectedCallback(){super.connectedCallback(),this.modalHelper=new vm(this),this.definedController.whenDefined().then(()=>{this.setObserveResize()})}disconnectedCallback(){super.disconnectedCallback(),Ss(this,this.lockTarget),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",t=>{this.open&&this.closeOnEsc&&t.key==="Escape"&&this.isModal&&(t.stopPropagation(),this.open=!1)})}render(){return Z`${at(this.isModal,()=>Z`<div ${De(this.overlayRef)} part="overlay" class="overlay" @click="${this.onOverlayClick}"></div>`)}<slot ${De(this.panelRef)} part="panel" class="panel" tabindex="0"></slot>`}setObserveResize(){this.observeResize=kr(this.contained?this.parentElement:document.documentElement,()=>{const e=this.contained?this.parentElement:void 0;this.mobile=xc(e).down("md"),this.isParentLayout&&this.layoutManager.updateLayout(this,{width:this.isModal?0:void 0})})}onOverlayClick(){this.emit("overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}getLockTargetAnimate(e,t){const r=this.placement==="right"?"paddingRight":"paddingLeft",n=oe(this.panelRef.value).innerWidth()+"px";return st(this.lockTarget,[{[r]:e?0:n},{[r]:e?n:0}],{duration:t,easing:ti(this,"emphasized"),fill:"forwards"})}};ri.styles=[qe,u_];w([L({type:Boolean,reflect:!0,converter:we})],ri.prototype,"open",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ri.prototype,"modal",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"close-on-esc"})],ri.prototype,"closeOnEsc",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"close-on-overlay-click"})],ri.prototype,"closeOnOverlayClick",void 0);w([L({reflect:!0})],ri.prototype,"placement",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ri.prototype,"contained",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ri.prototype,"mobile",void 0);w([Re("contained",!0)],ri.prototype,"onContainedChange",null);w([Re("placement",!0)],ri.prototype,"onPlacementChange",null);w([Re("mobile",!0),Re("modal",!0)],ri.prototype,"onMobileChange",null);w([Re("open")],ri.prototype,"onOpenChange",null);ri=w([Ae("mdui-navigation-drawer")],ri);const h_=$e`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;border-radius:0 var(--shape-corner) var(--shape-corner) 0;z-index:var(--z-index);width:5rem;background-color:rgb(var(--mdui-color-surface));padding:.375rem .75rem}:host([contained]:not([contained=false i])){position:absolute}:host([divider]:not([divider=false i])){border-right:.0625rem solid rgb(var(--mdui-color-surface-variant));width:5.0625rem}:host([placement=right]){left:initial;right:0;border-radius:var(--shape-corner) 0 0 var(--shape-corner)}:host([placement=right][divider]:not([divider=false i])){border-right:none;border-left:.0625rem solid rgb(var(--mdui-color-surface-variant))}.bottom,.items,.top{display:flex;flex-direction:column;align-items:center;width:100%}.top{margin-bottom:1.75rem}.bottom{margin-top:1.75rem}::slotted([slot=bottom]),::slotted([slot=top]),::slotted(mdui-navigation-rail-item){margin-top:.375rem;margin-bottom:.375rem}:host([alignment=start]) .top-spacer{flex-grow:0}:host([alignment=start]) .bottom-spacer{flex-grow:1}:host([alignment=end]) .top-spacer{flex-grow:1}:host([alignment=end]) .bottom-spacer{flex-grow:0}:host([alignment=center]){justify-content:center}:host([alignment=center]) .bottom,:host([alignment=center]) .top{position:absolute}:host([alignment=center]) .top{top:.375rem}:host([alignment=center]) .bottom{bottom:.375rem}`;let ni=class extends Rr{constructor(){super(...arguments),this.placement="left",this.alignment="start",this.contained=!1,this.divider=!1,this.activeKey=0,this.hasSlotController=new $t(this,"top","bottom"),this.definedController=new At(this,{relatedElements:["mdui-navigation-rail-item"]}),this.isInitial=!0}get layoutPlacement(){return this.placement}get parentTarget(){return this.contained||this.isParentLayout?this.parentElement:document.body}get isRight(){return this.placement==="right"}get paddingValue(){return["fixed","absolute"].includes(oe(this).css("position"))?this.offsetWidth:void 0}async onActiveKeyChange(){await this.definedController.whenDefined();const e=this.items.find(t=>t.key===this.activeKey);this.value=e?.value,this.isInitial||this.emit("change")}async onValueChange(){this.isInitial=!this.hasUpdated,await this.definedController.whenDefined();const e=this.items.find(t=>t.value===this.value);this.activeKey=e?.key??0,this.updateItems()}async onContainedChange(){this.isParentLayout||(await this.definedController.whenDefined(),oe(document.body).css({paddingLeft:this.contained||this.isRight?null:this.paddingValue,paddingRight:this.contained||!this.isRight?null:this.paddingValue}),oe(this.parentElement).css({paddingLeft:this.contained&&!this.isRight?this.paddingValue:null,paddingRight:this.contained&&this.isRight?this.paddingValue:null}))}async onPlacementChange(){await this.definedController.whenDefined(),this.layoutManager?.updateLayout(this),this.items.forEach(e=>{e.placement=this.placement}),this.isParentLayout||oe(this.parentTarget).css({paddingLeft:this.isRight?null:this.paddingValue,paddingRight:this.isRight?this.paddingValue:null})}connectedCallback(){super.connectedCallback(),this.isParentLayout||this.definedController.whenDefined().then(()=>{oe(this.parentTarget).css({paddingLeft:this.isRight?null:this.paddingValue,paddingRight:this.isRight?this.paddingValue:null})})}disconnectedCallback(){super.disconnectedCallback(),!this.isParentLayout&&this.definedController.isDefined()&&oe(this.parentTarget).css({paddingLeft:this.isRight?void 0:null,paddingRight:this.isRight?null:void 0})}render(){const e=this.hasSlotController.test("top"),t=this.hasSlotController.test("bottom");return Z`${at(e,()=>Z`<slot name="top" part="top" class="top"></slot>`)} <span class="top-spacer"></span><slot part="items" class="items" @slotchange="${this.onSlotChange}" @click="${this.onClick}"></slot><span class="bottom-spacer"></span> ${at(t,()=>Z`<slot name="bottom" part="bottom" class="bottom"></slot>`)}`}onClick(e){if(e.button)return;const r=e.target.closest("mdui-navigation-rail-item");r&&(this.activeKey=r.key,this.isInitial=!1,this.updateItems())}updateItems(){this.items.forEach(e=>{e.active=this.activeKey===e.key,e.placement=this.placement,e.isInitial=this.isInitial})}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems()}};ni.styles=[qe,h_];w([L({reflect:!0})],ni.prototype,"value",void 0);w([L({reflect:!0})],ni.prototype,"placement",void 0);w([L({reflect:!0})],ni.prototype,"alignment",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ni.prototype,"contained",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ni.prototype,"divider",void 0);w([Be()],ni.prototype,"activeKey",void 0);w([gi({selector:"mdui-navigation-rail-item",flatten:!0})],ni.prototype,"items",void 0);w([Re("activeKey",!0)],ni.prototype,"onActiveKeyChange",null);w([Re("value")],ni.prototype,"onValueChange",null);w([Re("contained",!0)],ni.prototype,"onContainedChange",null);w([Re("placement",!0)],ni.prototype,"onPlacementChange",null);ni=w([Ae("mdui-navigation-rail")],ni);const f_=$e`:host{--shape-corner-indicator:var(--mdui-shape-corner-full);position:relative;z-index:0;width:100%;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}.container{display:flex;flex-direction:column;align-items:center;justify-content:center;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;height:3.5rem}.container:not(.initial){transition:padding var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}mdui-ripple{z-index:1;width:3.5rem;height:2rem;border-radius:var(--mdui-shape-corner-full)}.container:not(.has-label)+mdui-ripple{height:3.5rem}.indicator{position:relative;display:flex;align-items:center;justify-content:center;background-color:transparent;border-radius:var(--shape-corner-indicator);height:2rem;width:2rem}:not(.initial) .indicator{transition:background-color var(--mdui-motion-duration-short1) var(--mdui-motion-easing-standard),width var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard),height var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}.placement-right::slotted([slot=badge]){transform:translate(-50%,-50%)}::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}.placement-right::slotted([slot=badge][variant=small]){transform:translate(-.5625rem,-.5625rem)}.active-icon,.icon{color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}.active-icon mdui-icon,.icon mdui-icon,::slotted([slot=active-icon]),::slotted([slot=icon]){font-size:inherit}.icon{display:flex}.active-icon{display:none}.label{display:flex;align-items:center;height:1rem;color:rgb(var(--mdui-color-on-surface-variant));margin-top:.25rem;margin-bottom:.25rem;font-size:var(--mdui-typescale-label-medium-size);font-weight:var(--mdui-typescale-label-medium-weight);letter-spacing:var(--mdui-typescale-label-medium-tracking);line-height:var(--mdui-typescale-label-medium-line-height)}:not(.initial) .label{transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear)}:host([active]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([active]) .indicator{width:3.5rem;background-color:rgb(var(--mdui-color-secondary-container))}:host([active]) :not(.has-label) .indicator{height:3.5rem}:host([active]) .active-icon,:host([active]) .icon{color:rgb(var(--mdui-color-on-secondary-container))}:host([active]) .has-active-icon .active-icon{display:flex}:host([active]) .has-active-icon .icon{display:none}:host([active]) .label{color:rgb(var(--mdui-color-on-surface))}`;let zi=class extends On(Di(bi(Ke))){constructor(){super(...arguments),this.active=!1,this.isInitial=!0,this.placement="left",this.disabled=!1,this.key=Sr(),this.rippleRef=Me(),this.hasSlotController=new $t(this,"[default]","active-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.href?this.renderRoot?.querySelector("._a"):this}get focusDisabled(){return this.disabled}render(){const e=this.hasSlotController.test("[default]"),t=Bi({container:!0,"has-label":e,"has-active-icon":this.activeIcon||this.hasSlotController.test("active-icon"),initial:this.isInitial});return Z`${this.href?this.renderAnchor({part:"container",className:t,content:this.renderInner(e)}):Z`<div part="container" class="${t}">${this.renderInner(e)}</div>`}<mdui-ripple .noRipple="${!this.active||this.noRipple}" ${De(this.rippleRef)}></mdui-ripple>`}renderInner(e){return Z`<div part="indicator" class="indicator"><slot name="badge" part="badge" class="${bt({badge:!0,"placement-right":this.placement==="right"})}"></slot><slot name="active-icon" part="active-icon" class="active-icon">${this.activeIcon?Z`<mdui-icon name="${this.activeIcon}"></mdui-icon>`:Qe}</slot><slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}"></mdui-icon>`:Qe}</slot></div>${e?Z`<slot part="label" class="label"></slot>`:it}`}};zi.styles=[qe,f_];w([L({reflect:!0})],zi.prototype,"icon",void 0);w([L({reflect:!0,attribute:"active-icon"})],zi.prototype,"activeIcon",void 0);w([L({reflect:!0})],zi.prototype,"value",void 0);w([L({type:Boolean,reflect:!0,converter:we})],zi.prototype,"active",void 0);w([Be()],zi.prototype,"isInitial",void 0);w([Be()],zi.prototype,"placement",void 0);w([Be()],zi.prototype,"disabled",void 0);zi=w([Ae("mdui-navigation-rail-item")],zi);let Ec=class extends yt{render(){return Ri('<path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"/>')}};Ec.styles=ki;Ec=w([Ae("mdui-icon-circle")],Ec);let Sc=class extends yt{render(){return Ri('<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/>')}};Sc.styles=ki;Sc=w([Ae("mdui-icon-radio-button-unchecked")],Sc);const p_=$e`:host{position:relative;display:inline-flex;align-items:center;cursor:pointer;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none;border-radius:.125rem;font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.icon{display:flex;position:absolute;font-size:1.5rem}:not(.initial) .icon{transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard)}.unchecked-icon{transition-property:color;color:rgb(var(--mdui-color-on-surface-variant))}:host([focused]) .unchecked-icon,:host([hover]) .unchecked-icon,:host([pressed]) .unchecked-icon{color:rgb(var(--mdui-color-on-surface))}.checked-icon{opacity:0;transform:scale(.2);transition-property:color,opacity,transform;color:rgb(var(--mdui-color-primary))}.icon .i,::slotted([slot=checked-icon]),::slotted([slot=unchecked-icon]){color:inherit;font-size:inherit}i{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;border-radius:50%;width:2.5rem;height:2.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.label{display:flex;width:100%;padding-top:.625rem;padding-bottom:.625rem;color:rgb(var(--mdui-color-on-surface))}.label:not(.initial){transition:color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}:host([checked]:not([checked=false i])) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([checked]:not([checked=false i])) .icon{color:rgb(var(--mdui-color-primary))}:host([checked]:not([checked=false i])) .checked-icon{opacity:1;transform:scale(.5)}i.invalid{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}i.invalid .icon{color:rgb(var(--mdui-color-error))}.label.invalid{color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])),:host([group-disabled]){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])) .icon,:host([group-disabled]) .icon{color:rgba(var(--mdui-color-on-surface),38%)}:host([disabled]:not([disabled=false i])) .label,:host([group-disabled]) .label{color:rgba(var(--mdui-color-on-surface),38%)}`;let fi=class extends Di(bi(Ke)){constructor(){super(...arguments),this.value="",this.disabled=!1,this.checked=!1,this.invalid=!1,this.groupDisabled=!1,this.focusable=!0,this.isInitial=!0,this.rippleRef=Me()}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.isDisabled()}get focusElement(){return this}get focusDisabled(){return this.isDisabled()||!this.focusable}onCheckedChange(){this.emit("change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",()=>{this.isDisabled()||(this.checked=!0)})}render(){const e=bt({invalid:this.invalid,initial:this.isInitial});return Z`<i part="control" class="${e}"><mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple><slot name="unchecked-icon" part="unchecked-icon" class="icon unchecked-icon">${this.uncheckedIcon?Z`<mdui-icon name="${this.uncheckedIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-radio-button-unchecked class="i"></mdui-icon-radio-button-unchecked>`}</slot><slot name="checked-icon" part="checked-icon" class="icon checked-icon">${this.checkedIcon?Z`<mdui-icon name="${this.checkedIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-circle class="i"></mdui-icon-circle>`}</slot></i><slot part="label" class="label ${e}"></slot>`}isDisabled(){return this.disabled||this.groupDisabled}};fi.styles=[qe,p_];w([L({reflect:!0})],fi.prototype,"value",void 0);w([L({type:Boolean,reflect:!0,converter:we})],fi.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],fi.prototype,"checked",void 0);w([L({reflect:!0,attribute:"unchecked-icon"})],fi.prototype,"uncheckedIcon",void 0);w([L({reflect:!0,attribute:"checked-icon"})],fi.prototype,"checkedIcon",void 0);w([Be()],fi.prototype,"invalid",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"group-disabled"})],fi.prototype,"groupDisabled",void 0);w([Be()],fi.prototype,"focusable",void 0);w([Be()],fi.prototype,"isInitial",void 0);w([Re("checked",!0)],fi.prototype,"onCheckedChange",null);fi=w([Ae("mdui-radio")],fi);const m_=$e`:host{display:inline-block}fieldset{border:none;padding:0;margin:0;min-width:0}input{position:absolute;padding:0;opacity:0;pointer-events:none;width:1.25rem;height:1.25rem;margin:0 0 0 .625rem}`;let xi=class extends Ke{constructor(){super(...arguments),this.disabled=!1,this.name="",this.value="",this.defaultValue="",this.required=!1,this.invalid=!1,this.isInitial=!0,this.inputRef=Me(),this.formController=new lr(this),this.definedController=new At(this,{relatedElements:["mdui-radio"]})}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get items(){return oe(this).find("mdui-radio").get()}get itemsEnabled(){return oe(this).find("mdui-radio:not([disabled])").get()}async onValueChange(){this.isInitial=!1,await this.definedController.whenDefined(),this.emit("input"),this.emit("change"),this.updateItems(),this.updateRadioFocusable(),await this.updateComplete;const e=this.formController.getForm();e&&xt.get(e)?.has(this)?(this.invalid=!1,xt.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}async onInvalidChange(){await this.definedController.whenDefined(),this.updateItems()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.inputRef.value.blur(),this.inputRef.value.focus())),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return Z`<fieldset><input ${De(this.inputRef)} type="radio" class="input" name="${je(this.name)}" value="${je(this.value)}" .checked="${!!this.value}" .required="${this.required}" tabindex="-1" @keydown="${this.onKeyDown}"><slot @click="${this.onClick}" @keydown="${this.onKeyDown}" @slotchange="${this.onSlotChange}" @change="${this.onCheckedChange}"></slot></fieldset>`}updateRadioFocusable(){const e=this.items,t=e.find(r=>r.checked);t?e.forEach(r=>{r.focusable=r===t}):this.itemsEnabled.forEach((r,n)=>{r.focusable=!n})}async onClick(e){await this.definedController.whenDefined();const r=e.target.closest("mdui-radio");!r||r.disabled||(this.value=r.value,await this.updateComplete,r.focus())}async onKeyDown(e){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;e.preventDefault(),await this.definedController.whenDefined();const t=this.itemsEnabled,r=t.find(o=>o.checked)??t[0],n=e.key===" "?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1;let s=t.indexOf(r)+n;s<0&&(s=t.length-1),s>t.length-1&&(s=0),this.value=t[s].value,await this.updateComplete,t[s].focus()}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems(),this.updateRadioFocusable()}onCheckedChange(e){e.stopPropagation()}updateItems(){this.items.forEach(e=>{e.checked=e.value===this.value,e.invalid=this.invalid,e.groupDisabled=this.disabled,e.isInitial=this.isInitial})}};xi.styles=[qe,m_];w([L({type:Boolean,reflect:!0,converter:we})],xi.prototype,"disabled",void 0);w([L({reflect:!0})],xi.prototype,"form",void 0);w([L({reflect:!0})],xi.prototype,"name",void 0);w([L({reflect:!0})],xi.prototype,"value",void 0);w([Ir()],xi.prototype,"defaultValue",void 0);w([L({type:Boolean,reflect:!0,converter:we})],xi.prototype,"required",void 0);w([Be()],xi.prototype,"invalid",void 0);w([Re("value",!0)],xi.prototype,"onValueChange",null);w([Re("invalid",!0),Re("disabled")],xi.prototype,"onInvalidChange",null);xi=w([Ae("mdui-radio-group")],xi);/**
486
+ )}:host([disabled]:not([disabled=false i])){pointer-events:none}.container{cursor:pointer;-webkit-user-select:none;user-select:none;text-decoration:none;color:inherit;-webkit-tap-highlight-color:transparent}:host([disabled]:not([disabled=false i])) .container{cursor:default;opacity:.38}:host([nonclickable]:not([href],[nonclickable=false i])) .container{cursor:auto;-webkit-user-select:auto;user-select:auto}.preset{display:flex;align-items:center;padding:.5rem 1.5rem .5rem 1rem;min-height:3.5rem}:host([alignment=start]) .preset{align-items:flex-start}:host([alignment=end]) .preset{align-items:flex-end}.body{display:flex;flex:1 1 100%;flex-direction:column;justify-content:center;min-width:0}.headline{display:block;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}:host([active]:not([active=false i])) .headline{color:rgb(var(--mdui-color-on-secondary-container))}.description{display:none;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([disabled]:not([disabled=false i])) .description,:host([focused]) .description,:host([hover]) .description,:host([pressed]) .description{color:rgb(var(--mdui-color-on-surface))}.has-description .description{display:block}:host([description-line='1']) .description,:host([headline-line='1']) .headline{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([description-line='2']) .description,:host([description-line='3']) .description,:host([headline-line='2']) .headline,:host([headline-line='3']) .headline{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}:host([description-line='2']) .description,:host([headline-line='2']) .headline{-webkit-line-clamp:2}:host([description-line='3']) .description,:host([headline-line='3']) .headline{-webkit-line-clamp:3}.end-icon,.icon{display:flex;flex:0 0 auto;font-size:var(--mdui-typescale-label-small-size);font-weight:var(--mdui-typescale-label-small-weight);letter-spacing:var(--mdui-typescale-label-small-tracking);line-height:var(--mdui-typescale-label-small-line-height);color:rgb(var(--mdui-color-on-surface-variant))}:host([disabled]:not([disabled=false i])) .end-icon,:host([disabled]:not([disabled=false i])) .icon,:host([focused]) .end-icon,:host([focused]) .icon,:host([hover]) .end-icon,:host([hover]) .icon,:host([pressed]) .end-icon,:host([pressed]) .icon{color:rgb(var(--mdui-color-on-surface))}:host([active]:not([active=false i])) .end-icon,:host([active]:not([active=false i])) .icon{color:rgb(var(--mdui-color-on-secondary-container))}.end-icon mdui-icon,.icon mdui-icon,.is-end-icon ::slotted([slot=end-icon]),.is-icon ::slotted([slot=icon]){font-size:1.5rem}.has-icon .icon{margin-right:1rem}.has-icon ::slotted(mdui-checkbox[slot=icon]),.has-icon ::slotted(mdui-radio[slot=icon]){margin-left:-.5rem}.has-end-icon .end-icon{margin-left:1rem}.has-end-icon ::slotted(mdui-checkbox[slot=end-icon]),.has-end-icon ::slotted(mdui-radio[slot=end-icon]){margin-right:-.5rem}`;let Ut=class extends On(Di(bi(Ke))){constructor(){super(...arguments),this.disabled=!1,this.active=!1,this.nonclickable=!1,this.rounded=!1,this.alignment="center",this.rippleRef=Me(),this.itemRef=Me(),this.hasSlotController=new $t(this,"[default]","description","icon","end-icon","custom")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.focusDisabled}get focusElement(){return this.href&&!this.disabled?this.itemRef.value:this}get focusDisabled(){return this.href?this.disabled:this.disabled||this.nonclickable}render(){const e=!this.hasSlotController.test("custom"),t=this.icon||this.hasSlotController.test("icon"),r=this.endIcon||this.hasSlotController.test("end-icon"),n=this.description||this.hasSlotController.test("description"),s=a=>Us(a,"mdui-icon")||Iw(a).startsWith("mdui-icon-"),o=Bi({container:!0,preset:e,"has-icon":t,"has-end-icon":r,"has-description":n,"is-icon":s(this.iconElements[0]),"is-end-icon":s(this.endIconElements[0])});return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.href&&!this.disabled?this.renderAnchor({className:o,content:this.renderInner(),part:"container",refDirective:De(this.itemRef)}):Z`<div part="container" class="${o}" ${De(this.itemRef)}>${this.renderInner()}</div>`}`}renderInner(){const e=this.hasSlotController.test("[default]");return Z`<slot name="custom"><slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}"></mdui-icon>`:Qe}</slot><div part="body" class="body">${e?Z`<slot part="headline" class="headline"></slot>`:Z`<div part="headline" class="headline">${this.headline}</div>`}<slot name="description" part="description" class="description">${this.description}</slot></div><slot name="end-icon" part="end-icon" class="end-icon">${this.endIcon?Z`<mdui-icon name="${this.endIcon}"></mdui-icon>`:Qe}</slot></slot>`}};Ut.styles=[qe,r_];w([L({reflect:!0})],Ut.prototype,"headline",void 0);w([L({type:Number,reflect:!0,attribute:"headline-line"})],Ut.prototype,"headlineLine",void 0);w([L({reflect:!0})],Ut.prototype,"description",void 0);w([L({type:Number,reflect:!0,attribute:"description-line"})],Ut.prototype,"descriptionLine",void 0);w([L({reflect:!0})],Ut.prototype,"icon",void 0);w([L({reflect:!0,attribute:"end-icon"})],Ut.prototype,"endIcon",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ut.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ut.prototype,"active",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ut.prototype,"nonclickable",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ut.prototype,"rounded",void 0);w([L({reflect:!0})],Ut.prototype,"alignment",void 0);w([gi({slot:"icon",flatten:!0})],Ut.prototype,"iconElements",void 0);w([gi({slot:"end-icon",flatten:!0})],Ut.prototype,"endIconElements",void 0);Ut=w([Ae("mdui-list-item")],Ut);const n_=$e`:host{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:default;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-label-small-size);font-weight:var(--mdui-typescale-label-small-weight);letter-spacing:var(--mdui-typescale-label-small-tracking);line-height:var(--mdui-typescale-label-small-line-height);padding-left:1rem;padding-right:1.5rem;height:3.5rem;line-height:3.5rem}`;let vc=class extends Ke{render(){return Z`<slot></slot>`}};vc.styles=[qe,n_];vc=w([Ae("mdui-list-subheader")],vc);const s_=$e`:host{display:block;padding:.5rem 0}::slotted(mdui-divider[middle]){margin-left:1rem;margin-right:1.5rem}`;let wc=class extends Ke{render(){return Z`<slot></slot>`}};wc.styles=[qe,s_];wc=w([Ae("mdui-list")],wc);let _c=class extends yt{render(){return Ri('<path d="m10 17 5-5-5-5v10z"/>')}};_c.styles=ki;_c=w([Ae("mdui-icon-arrow-right")],_c);const o_=$e`:host{position:relative;display:block}:host([selected]){background-color:rgba(var(--mdui-color-primary),12%)}:host([disabled]:not([disabled=false i])){pointer-events:none}.container{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host([disabled]:not([disabled=false i])) .container{cursor:default;opacity:.38}.preset{display:flex;align-items:center;text-decoration:none;height:3rem;padding:0 .75rem}.preset.dense{height:2rem}.label-container{flex:1 1 100%;min-width:0}.label{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking)}.end-icon,.end-text,.icon,.selected-icon{display:none;flex:0 0 auto;color:rgb(var(--mdui-color-on-surface-variant))}.has-end-icon .end-icon,.has-end-text .end-text,.has-icon .icon,.has-icon .selected-icon{display:flex}.end-icon,.icon,.selected-icon{font-size:1.5rem}.end-icon::slotted(mdui-avatar),.icon::slotted(mdui-avatar),.selected-icon::slotted(mdui-avatar){width:1.5rem;height:1.5rem}.dense .end-icon,.dense .icon,.dense .selected-icon{font-size:1.125rem}.dense .end-icon::slotted(mdui-avatar),.dense .icon::slotted(mdui-avatar),.dense .selected-icon::slotted(mdui-avatar){width:1.125rem;height:1.125rem}.end-icon .i,.icon .i,.selected-icon .i,::slotted([slot=end-icon]),::slotted([slot=icon]),::slotted([slot=selected-icon]){font-size:inherit}.end-text{font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.icon,.selected-icon{margin-right:.75rem}.end-icon,.end-text{margin-left:.75rem}.arrow-right{color:rgb(var(--mdui-color-on-surface))}.submenu{--shape-corner:var(--mdui-shape-corner-extra-small);display:block;position:absolute;z-index:1;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);min-width:7rem;max-width:17.5rem;padding-top:.5rem;padding-bottom:.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.submenu::slotted(mdui-divider){margin-top:.5rem;margin-bottom:.5rem}`;let Ct=class extends On(Di(bi(Ke))){constructor(){super(),this.disabled=!1,this.submenuOpen=!1,this.selected=!1,this.dense=!1,this.focusable=!1,this.key=Sr(),this.rippleRef=Me(),this.containerRef=Me(),this.submenuRef=Me(),this.hasSlotController=new $t(this,"[default]","icon","end-icon","end-text","submenu","custom"),this.definedController=new At(this,{relatedElements:[""]}),this.onOuterClick=this.onOuterClick.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this)}get focusDisabled(){return this.disabled||!this.focusable}get focusElement(){return this.href&&!this.disabled?this.containerRef.value:this}get rippleDisabled(){return this.disabled}get rippleElement(){return this.rippleRef.value}get hasSubmenu(){return this.hasSlotController.test("submenu")}async onOpenChange(){const e=this.hasUpdated;if(!this.submenuOpen&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=ti(this,"linear"),r=ti(this,"emphasized-decelerate"),n=ti(this,"emphasized-accelerate");if(this.submenuOpen){if(e&&!this.emit("submenu-open",{cancelable:!0}))return;const s=$i(this,"medium4");await Zt(this.submenuRef.value),this.submenuRef.value.hidden=!1,this.updateSubmenuPositioner(),await Promise.all([st(this.submenuRef.value,[{transform:"scaleY(0.45)"},{transform:"scaleY(1)"}],{duration:e?s:0,easing:r}),st(this.submenuRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:e?s:0,easing:t})]),e&&this.emit("submenu-opened")}else{if(!this.emit("submenu-close",{cancelable:!0}))return;const o=$i(this,"short4");await Zt(this.submenuRef.value),await Promise.all([st(this.submenuRef.value,[{transform:"scaleY(1)"},{transform:"scaleY(0.45)"}],{duration:o,easing:n}),st(this.submenuRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:o,easing:t})]),this.submenuRef.value&&(this.submenuRef.value.hidden=!0),this.emit("submenu-closed")}}connectedCallback(){super.connectedCallback(),this.definedController.whenDefined().then(()=>{document.addEventListener("pointerdown",this.onOuterClick)})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onOuterClick)}firstUpdated(e){super.firstUpdated(e),this.definedController.whenDefined().then(()=>{this.addEventListener("focus",this.onFocus),this.addEventListener("blur",this.onBlur),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeydown),this.addEventListener("mouseenter",this.onMouseEnter),this.addEventListener("mouseleave",this.onMouseLeave)})}render(){const e=this.hasSubmenu,t=this.hasSlotController.test("custom"),r=this.hasSlotController.test("end-icon"),n=!this.endIcon&&e&&!r,s=this.endIcon||e||r,o=!gt(this.icon)||this.selects==="single"||this.selects==="multiple"||this.hasSlotController.test("icon"),a=!!this.endText||this.hasSlotController.test("end-text"),c=Bi({container:!0,dense:this.dense,preset:!t,"has-icon":o,"has-end-text":a,"has-end-icon":s});return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.href&&!this.disabled?this.renderAnchor({part:"container",className:c,content:this.renderInner(n,o),refDirective:De(this.containerRef),tabIndex:this.focusable?0:-1}):Z`<div part="container" ${De(this.containerRef)} class="${c}">${this.renderInner(n,o)}</div>`} ${at(e,()=>Z`<slot name="submenu" ${De(this.submenuRef)} part="submenu" class="submenu" hidden></slot>`)}`}onOuterClick(e){!this.disabled&&this.submenuOpen&&this!==e.target&&!oe.contains(this,e.target)&&(this.submenuOpen=!1)}hasTrigger(e){return this.submenuTrigger?this.submenuTrigger.split(" ").includes(e):!1}onFocus(){this.disabled||this.submenuOpen||!this.hasTrigger("focus")||!this.hasSubmenu||(this.submenuOpen=!0)}onBlur(){this.disabled||!this.submenuOpen||!this.hasTrigger("focus")||!this.hasSubmenu||(this.submenuOpen=!1)}onClick(e){this.disabled||e.button||!this.hasTrigger("click")||e.target!==this||!this.hasSubmenu||this.submenuOpen&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.submenuOpen=!this.submenuOpen)}onKeydown(e){this.disabled||!this.hasSubmenu||(!this.submenuOpen&&e.key==="Enter"&&(e.stopPropagation(),this.submenuOpen=!0),this.submenuOpen&&e.key==="Escape"&&(e.stopPropagation(),this.submenuOpen=!1))}onMouseEnter(){this.disabled||!this.hasTrigger("hover")||!this.hasSubmenu||(window.clearTimeout(this.submenuCloseTimeout),this.submenuOpenDelay?this.submenuOpenTimeout=window.setTimeout(()=>{this.submenuOpen=!0},this.submenuOpenDelay):this.submenuOpen=!0)}onMouseLeave(){this.disabled||!this.hasTrigger("hover")||!this.hasSubmenu||(window.clearTimeout(this.submenuOpenTimeout),this.submenuCloseTimeout=window.setTimeout(()=>{this.submenuOpen=!1},this.submenuCloseDelay||50))}updateSubmenuPositioner(){const e=oe(window),t=oe(this.submenuRef.value),r=this.getBoundingClientRect(),n=t.innerWidth(),s=t.innerHeight(),o=8;let a="bottom",c="right";e.height()-r.top>s+o?a="bottom":r.top+r.height>s+o&&(a="top"),e.width()-r.left-r.width>n+o?c="right":r.left>n+o&&(c="left"),oe(this.submenuRef.value).css({top:a==="bottom"?0:r.height-s,left:c==="right"?r.width:-n,transformOrigin:[c==="right"?0:"100%",a==="bottom"?0:"100%"].join(" ")})}renderInner(e,t){return Z`<slot name="custom">${this.selected?Z`<slot name="selected-icon" part="selected-icon" class="selected-icon">${this.selectedIcon?Z`<mdui-icon name="${this.selectedIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-check class="i"></mdui-icon-check>`}</slot>`:Z`<slot name="icon" part="icon" class="icon">${t?Z`<mdui-icon name="${this.icon}" class="i"></mdui-icon>`:Qe}</slot>`}<div class="label-container"><slot part="label" class="label"></slot></div><slot name="end-text" part="end-text" class="end-text">${this.endText}</slot>${e?Z`<mdui-icon-arrow-right part="end-icon" class="end-icon arrow-right"></mdui-icon-arrow-right>`:Z`<slot name="end-icon" part="end-icon" class="end-icon">${this.endIcon?Z`<mdui-icon name="${this.endIcon}"></mdui-icon>`:Qe}</slot>`}</slot>`}};Ct.styles=[qe,o_];w([L({reflect:!0})],Ct.prototype,"value",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ct.prototype,"disabled",void 0);w([L({reflect:!0})],Ct.prototype,"icon",void 0);w([L({reflect:!0,attribute:"end-icon"})],Ct.prototype,"endIcon",void 0);w([L({reflect:!0,attribute:"end-text"})],Ct.prototype,"endText",void 0);w([L({reflect:!0,attribute:"selected-icon"})],Ct.prototype,"selectedIcon",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"submenu-open"})],Ct.prototype,"submenuOpen",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ct.prototype,"selected",void 0);w([Be()],Ct.prototype,"dense",void 0);w([Be()],Ct.prototype,"selects",void 0);w([Be()],Ct.prototype,"submenuTrigger",void 0);w([Be()],Ct.prototype,"submenuOpenDelay",void 0);w([Be()],Ct.prototype,"submenuCloseDelay",void 0);w([Be()],Ct.prototype,"focusable",void 0);w([Re("submenuOpen")],Ct.prototype,"onOpenChange",null);Ct=w([Ae("mdui-menu-item")],Ct);const a_=$e`:host{--shape-corner:var(--mdui-shape-corner-extra-small);position:relative;display:block;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);min-width:7rem;max-width:17.5rem;padding-top:.5rem;padding-bottom:.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}::slotted(mdui-divider){margin-top:.5rem;margin-bottom:.5rem}`;let Wt=class extends Ke{constructor(){super(...arguments),this.dense=!1,this.submenuTrigger="click hover",this.submenuOpenDelay=200,this.submenuCloseDelay=200,this.selectedKeys=[],this.isInitial=!0,this.lastActiveItems=[],this.definedController=new At(this,{relatedElements:["mdui-menu-item"]})}get items(){return oe(this.childrenItems).find("mdui-menu-item").add(this.childrenItems).get()}get itemsEnabled(){return this.items.filter(e=>!e.disabled)}get isSingle(){return this.selects==="single"}get isMultiple(){return this.selects==="multiple"}get isSelectable(){return this.isSingle||this.isMultiple}get isSubmenu(){return!oe(this).parent().length}get lastActiveItem(){const e=this.lastActiveItems.length?this.lastActiveItems.length-1:0;return this.lastActiveItems[e]}set lastActiveItem(e){const t=this.lastActiveItems.length?this.lastActiveItems.length-1:0;this.lastActiveItems[t]=e}async onSlotChange(){await this.definedController.whenDefined(),this.items.forEach(e=>{e.dense=this.dense,e.selects=this.selects,e.submenuTrigger=this.submenuTrigger,e.submenuOpenDelay=this.submenuOpenDelay,e.submenuCloseDelay=this.submenuCloseDelay})}async onSelectsChange(){this.isSelectable?this.isSingle&&this.setSelectedKeys(this.selectedKeys.slice(0,1)):this.setSelectedKeys([]),await this.onSelectedKeysChange()}async onSelectedKeysChange(){await this.definedController.whenDefined();const e=this.itemsEnabled.filter(r=>this.selectedKeys.includes(r.key)).map(r=>r.value),t=this.isMultiple?e:e[0]||void 0;this.setValue(t),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),!this.isSelectable){this.updateSelected();return}const e=(this.isSingle?[this.value]:wt(this.value)?[this.value]:this.value).filter(t=>t);if(!e.length)this.setSelectedKeys([]);else if(this.isSingle){const t=this.itemsEnabled.find(r=>r.value===e[0]);this.setSelectedKeys(t?[t.key]:[])}else this.isMultiple&&this.setSelectedKeys(this.itemsEnabled.filter(t=>e.includes(t.value)).map(t=>t.key));this.updateSelected(),this.updateFocusable()}focus(e){this.lastActiveItem&&this.focusOne(this.lastActiveItem,e)}blur(){this.lastActiveItem&&this.lastActiveItem.blur()}firstUpdated(e){super.firstUpdated(e),this.definedController.whenDefined().then(()=>{this.updateFocusable(),this.lastActiveItem=this.items.find(t=>t.focusable)}),this.addEventListener("submenu-open",t=>{const r=oe(t.target),n=r.children("mdui-menu-item:not([disabled])").get(),s=r.parents("mdui-menu-item").length+1;n.length&&(this.lastActiveItems[s]=n[0],this.updateFocusable(),this.focusOne(this.lastActiveItems[s]))}),this.addEventListener("submenu-close",t=>{const n=oe(t.target).parents("mdui-menu-item").length+1;this.lastActiveItems.length-1===n&&(this.lastActiveItems.pop(),this.updateFocusable(),this.lastActiveItems[n-1]&&this.focusOne(this.lastActiveItems[n-1]))})}render(){return Z`<slot @slotchange="${this.onSlotChange}" @click="${this.onClick}" @keydown="${this.onKeyDown}"></slot>`}setSelectedKeys(e){kn(this.selectedKeys,e)||(this.selectedKeys=e)}setValue(e){this.isSingle||gt(this.value)||gt(e)?this.value=e:kn(this.value,e)||(this.value=e)}getSiblingsItems(e,t=!1){return oe(e).parent().children(`mdui-menu-item${t?":not([disabled])":""}`).get()}updateFocusable(){if(this.lastActiveItem){this.items.forEach(e=>{e.focusable=e.key===this.lastActiveItem.key});return}if(!this.selectedKeys.length){this.itemsEnabled.forEach((e,t)=>{e.focusable=!t});return}if(this.isSingle){this.items.forEach(e=>{e.focusable=this.selectedKeys.includes(e.key)});return}if(this.isMultiple){const e=this.items.find(t=>t.focusable);(!e?.key||!this.selectedKeys.includes(e.key))&&this.itemsEnabled.filter(t=>this.selectedKeys.includes(t.key)).forEach((t,r)=>t.focusable=!r)}}updateSelected(){this.items.forEach(e=>{e.selected=this.selectedKeys.includes(e.key)})}selectOne(e){if(this.isMultiple){const t=[...this.selectedKeys];t.includes(e.key)?t.splice(t.indexOf(e.key),1):t.push(e.key),this.setSelectedKeys(t)}this.isSingle&&(this.selectedKeys.includes(e.key)?this.setSelectedKeys([]):this.setSelectedKeys([e.key])),this.isInitial=!1,this.updateSelected()}async focusableOne(e){this.items.forEach(t=>t.focusable=t.key===e.key),await km()}focusOne(e,t){e.focus(t)}async onClick(e){if(!this.definedController.isDefined()||this.isSubmenu||e.button)return;const r=e.target.closest("mdui-menu-item");!r||r.disabled||(this.lastActiveItem=r,this.isSelectable&&r.value&&this.selectOne(r),await this.focusableOne(r),this.focusOne(r))}async onKeyDown(e){if(!this.definedController.isDefined()||this.isSubmenu)return;const t=e.target;if(e.key==="Enter"&&(e.preventDefault(),t.click()),e.key===" "&&(e.preventDefault(),this.isSelectable&&t.value&&(this.selectOne(t),await this.focusableOne(t),this.focusOne(t))),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){const r=this.getSiblingsItems(t,!0),n=r.find(o=>o.focusable);let s=n?r.indexOf(n):0;if(r.length>0){e.preventDefault(),e.key==="ArrowDown"?s++:e.key==="ArrowUp"?s--:e.key==="Home"?s=0:e.key==="End"&&(s=r.length-1),s<0&&(s=r.length-1),s>r.length-1&&(s=0),this.lastActiveItem=r[s],await this.focusableOne(r[s]),this.focusOne(r[s]);return}}}};Wt.styles=[qe,a_];w([L({reflect:!0})],Wt.prototype,"selects",void 0);w([L()],Wt.prototype,"value",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Wt.prototype,"dense",void 0);w([L({reflect:!0,attribute:"submenu-trigger"})],Wt.prototype,"submenuTrigger",void 0);w([L({type:Number,reflect:!0,attribute:"submenu-open-delay"})],Wt.prototype,"submenuOpenDelay",void 0);w([L({type:Number,reflect:!0,attribute:"submenu-close-delay"})],Wt.prototype,"submenuCloseDelay",void 0);w([Be()],Wt.prototype,"selectedKeys",void 0);w([gi({flatten:!0,selector:"mdui-menu-item"})],Wt.prototype,"childrenItems",void 0);w([Re("dense"),Re("selects"),Re("submenuTrigger"),Re("submenuOpenDelay"),Re("submenuCloseDelay")],Wt.prototype,"onSlotChange",null);w([Re("selects",!0)],Wt.prototype,"onSelectsChange",null);w([Re("selectedKeys",!0)],Wt.prototype,"onSelectedKeysChange",null);w([Re("value")],Wt.prototype,"onValueChange",null);Wt=w([Ae("mdui-menu")],Wt);const l_=$e`:host{--shape-corner-indicator:var(--mdui-shape-corner-full);position:relative;z-index:0;flex:1;overflow:hidden;min-width:3rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}.container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;padding-top:.75rem;padding-bottom:.75rem}.container:not(.initial){transition:padding var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}mdui-ripple{z-index:1;left:50%;transform:translateX(-50%);width:4rem;height:2rem;margin-top:.75rem;border-radius:var(--mdui-shape-corner-full)}mdui-ripple:not(.initial){transition:margin-top var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.indicator{position:relative;display:flex;align-items:center;justify-content:center;background-color:transparent;border-radius:var(--shape-corner-indicator);height:2rem;width:2rem}:not(.initial) .indicator{transition:background-color var(--mdui-motion-duration-short1) var(--mdui-motion-easing-standard),width var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}.active-icon,.icon{color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}.active-icon mdui-icon,.icon mdui-icon,::slotted([slot=active]),::slotted([slot=icon]){font-size:inherit}.icon{display:flex}.active-icon{display:none}.label{display:flex;align-items:center;height:1rem;color:rgb(var(--mdui-color-on-surface-variant));margin-top:.25rem;margin-bottom:.25rem;font-size:var(--mdui-typescale-label-medium-size);font-weight:var(--mdui-typescale-label-medium-weight);letter-spacing:var(--mdui-typescale-label-medium-tracking);line-height:var(--mdui-typescale-label-medium-line-height)}:not(.initial) .label{transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear)}:host(:not([active])) mdui-ripple.label-visibility-selected,mdui-ripple.label-visibility-unlabeled{margin-top:1.5rem}.container.label-visibility-unlabeled,:host(:not([active])) .container.label-visibility-selected{padding-top:1.5rem;padding-bottom:0}.container.label-visibility-unlabeled .label,:host(:not([active])) .container.label-visibility-selected .label{opacity:0}:host([active]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([active]) .indicator{width:4rem;background-color:rgb(var(--mdui-color-secondary-container))}:host([active]) .active-icon,:host([active]) .icon{color:rgb(var(--mdui-color-on-secondary-container))}:host([active]) .has-active-icon .active-icon{display:flex}:host([active]) .has-active-icon .icon{display:none}:host([active]) .label{color:rgb(var(--mdui-color-on-surface))}`;let Vi=class extends On(Di(bi(Ke))){constructor(){super(...arguments),this.isInitial=!0,this.active=!1,this.disabled=!1,this.key=Sr(),this.rippleRef=Me(),this.hasSlotController=new $t(this,"active-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.href?this.renderRoot?.querySelector("._a"):this}get focusDisabled(){return this.disabled}render(){const e=Bi({"label-visibility-selected":this.labelVisibility==="selected","label-visibility-labeled":this.labelVisibility==="labeled","label-visibility-unlabeled":this.labelVisibility==="unlabeled",initial:this.isInitial}),t=Bi([{container:!0,"has-active-icon":this.activeIcon||this.hasSlotController.test("active-icon")},e]);return Z`<mdui-ripple .noRipple="${!this.active||this.noRipple}" class="${e}" ${De(this.rippleRef)}></mdui-ripple>${this.href?this.renderAnchor({part:"container",className:t,content:this.renderInner()}):Z`<div part="container" class="${t}">${this.renderInner()}</div>`}`}renderInner(){return Z`<div part="indicator" class="indicator"><slot name="badge" part="badge" class="badge"></slot><slot name="active-icon" part="active-icon" class="active-icon">${this.activeIcon?Z`<mdui-icon name="${this.activeIcon}"></mdui-icon>`:Qe}</slot><slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}"></mdui-icon>`:Qe}</slot></div><slot part="label" class="label"></slot>`}};Vi.styles=[qe,l_];w([L({reflect:!0})],Vi.prototype,"icon",void 0);w([L({reflect:!0,attribute:"active-icon"})],Vi.prototype,"activeIcon",void 0);w([L({reflect:!0})],Vi.prototype,"value",void 0);w([Be()],Vi.prototype,"labelVisibility",void 0);w([Be()],Vi.prototype,"isInitial",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Vi.prototype,"active",void 0);w([Be()],Vi.prototype,"disabled",void 0);Vi=w([Ae("mdui-navigation-bar-item")],Vi);const c_=$e`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;right:0;bottom:0;left:0;display:flex;flex:0 0 auto;overflow:hidden;border-radius:var(--shape-corner) var(--shape-corner) 0 0;z-index:var(--z-index);transition-property:transform;transition-duration:var(--mdui-motion-duration-long2);transition-timing-function:var(--mdui-motion-easing-emphasized);height:5rem;background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level2)}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([hide]:not([hide=false i])){transform:translateY(5.625rem);transition-duration:var(--mdui-motion-duration-short4)}`;let _i=class extends Ed(Rr){constructor(){super(...arguments),this.hide=!1,this.labelVisibility="auto",this.activeKey=0,this.isInitial=!0,this.definedController=new At(this,{relatedElements:["mdui-navigation-bar-item"]})}get scrollPaddingPosition(){return"bottom"}get layoutPlacement(){return"bottom"}async onActiveKeyChange(){await this.definedController.whenDefined();const e=this.items.find(t=>t.key===this.activeKey);this.value=e?.value,this.isInitial||this.emit("change")}async onValueChange(){this.isInitial=!this.hasUpdated,await this.definedController.whenDefined();const e=this.items.find(t=>t.value===this.value);this.activeKey=e?.key??0,this.updateItems()}async onLabelVisibilityChange(){await this.definedController.whenDefined(),this.updateItems()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("transitionend",t=>{t.target===this&&this.emit(this.hide?"hidden":"shown")})}render(){return Z`<slot @slotchange="${this.onSlotChange}" @click="${this.onClick}"></slot>`}runScrollThreshold(e){!e&&!this.hide&&this.emit("hide",{cancelable:!0})&&(this.hide=!0),e&&this.hide&&this.emit("show",{cancelable:!0})&&(this.hide=!1)}onClick(e){if(e.button)return;const r=e.target.closest("mdui-navigation-bar-item");r&&(this.activeKey=r.key,this.isInitial=!1,this.updateItems())}updateItems(){const e=this.items,t=this.labelVisibility==="auto"?e.length<=3?"labeled":"selected":this.labelVisibility;e.forEach(r=>{r.active=this.activeKey===r.key,r.labelVisibility=t,r.isInitial=this.isInitial})}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems()}};_i.styles=[qe,c_];w([L({type:Boolean,reflect:!0,converter:we})],_i.prototype,"hide",void 0);w([L({reflect:!0,attribute:"label-visibility"})],_i.prototype,"labelVisibility",void 0);w([L({reflect:!0})],_i.prototype,"value",void 0);w([L({reflect:!0,attribute:"scroll-behavior"})],_i.prototype,"scrollBehavior",void 0);w([Be()],_i.prototype,"activeKey",void 0);w([gi({selector:"mdui-navigation-bar-item",flatten:!0})],_i.prototype,"items",void 0);w([Re("activeKey",!0)],_i.prototype,"onActiveKeyChange",null);w([Re("value")],_i.prototype,"onValueChange",null);w([Re("labelVisibility",!0)],_i.prototype,"onLabelVisibilityChange",null);_i=w([Ae("mdui-navigation-bar")],_i);const xc=i=>{const e=Er(),t=ii(),r=e.getComputedStyle(t.documentElement),n=tr(i)?oe(i).innerWidth():Jo(i)?i:oe(e).innerWidth(),s=a=>{const c=r.getPropertyValue(`--mdui-breakpoint-${a}`).toLowerCase();return parseFloat(c)},o=a=>{switch(a){case"xs":return"sm";case"sm":return"md";case"md":return"lg";case"lg":return"xl";case"xl":return"xxl"}};return{up(a){return n>=s(a)},down(a){return n<s(a)},only(a){return a==="xxl"?this.up(a):this.up(a)&&this.down(o(a))},not(a){return!this.only(a)},between(a,c){return this.up(a)&&this.down(c)}}},d_=$e`:host{--shape-corner:var(--mdui-shape-corner-large);--z-index:2200;display:none;position:fixed;top:0;bottom:0;left:0;z-index:1;width:22.5rem}:host([placement=right]){left:initial;right:0}:host([mobile]),:host([modal]:not([modal=false i])){top:0!important;right:0;bottom:0!important;width:initial;z-index:var(--z-index)}:host([placement=right][mobile]),:host([placement=right][modal]:not([modal=false i])){left:0}:host([contained]:not([contained=false i])){position:absolute}.overlay{position:absolute;inset:0;z-index:inherit;background-color:rgba(var(--mdui-color-scrim),.4)}.panel{display:block;position:absolute;top:0;bottom:0;left:0;width:100%;overflow:auto;z-index:inherit;background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level0)}:host([placement=right]) .panel{left:initial;right:0}:host([mobile]) .panel,:host([modal]:not([modal=false i])) .panel{border-radius:0 var(--shape-corner) var(--shape-corner) 0;max-width:80%;width:22.5rem;background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([placement=right][mobile]) .panel,:host([placement=right][modal]:not([modal=false i])) .panel{border-radius:var(--shape-corner) 0 0 var(--shape-corner)}`;let ri=class extends Rr{constructor(){super(...arguments),this.open=!1,this.modal=!1,this.closeOnEsc=!1,this.closeOnOverlayClick=!1,this.placement="left",this.contained=!1,this.mobile=!1,this.overlayRef=Me(),this.panelRef=Me(),this.definedController=new At(this,{needDomReady:!0})}get layoutPlacement(){return this.placement}get lockTarget(){return this.contained||this.isParentLayout?this.parentElement:document.documentElement}get isModal(){return this.mobile||this.modal}async onContainedChange(){await this.definedController.whenDefined(),this.observeResize?.unobserve(),this.setObserveResize()}onPlacementChange(){this.isParentLayout&&this.layoutManager.updateLayout(this)}async onMobileChange(){!this.open||this.isParentLayout||this.contained||(await this.definedController.whenDefined(),this.isModal?(bc(this,this.lockTarget),await this.getLockTargetAnimate(!1,0)):(Ss(this,this.lockTarget),await this.getLockTargetAnimate(!0,0)))}async onOpenChange(){let e=this.panelRef.value,t=this.overlayRef.value;const r=this.placement==="right",n=ti(this,"linear"),s=ti(this,"emphasized"),o=(c,l)=>{oe(this.layoutManager.getItemsAndMain()).css("transition",hd(c)?null:`all ${c}ms ${l}`)},a=async()=>{const c=[];if(this.isModal?c.push(t,e):this.isParentLayout||c.push(this.lockTarget),this.isParentLayout){const l=this.layoutManager.getItemsAndMain(),d=l.indexOf(this);c.push(...l.slice(d))}!this.isModal&&!c.includes(this)&&c.push(this),await Promise.all(c.map(l=>Zt(l)))};if(this.open){const c=this.hasUpdated;if(c||(await this.updateComplete,e=this.panelRef.value,t=this.overlayRef.value),c&&!this.emit("open",{cancelable:!0}))return;await this.definedController.whenDefined(),this.style.display="block",this.originalTrigger=document.activeElement,this.isModal&&(this.modalHelper.activate(),this.contained||bc(this,this.lockTarget)),await a(),requestAnimationFrame(()=>{const u=this.querySelector("[autofocus]");u?u.focus({preventScroll:!0}):e.focus({preventScroll:!0})});const l=$i(this,"long2"),d=[];if(this.isModal?d.push(st(t,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:c?l:0,easing:n})):this.isParentLayout||d.push(this.getLockTargetAnimate(!0,c?l:0)),this.isParentLayout&&c&&(o(l,s),this.layoutManager.updateLayout(this)),d.push(st(this.isModal?e:this,[{transform:`translateX(${r?"":"-"}100%)`},{transform:"translateX(0)"}],{duration:c?l:0,easing:s})),await Promise.all(d),!this.open)return;this.isParentLayout&&c&&o(null),c&&this.emit("opened")}else if(this.hasUpdated){if(!this.emit("close",{cancelable:!0}))return;await this.definedController.whenDefined(),this.isModal&&this.modalHelper.deactivate(),await a();const l=$i(this,"short4"),d=[];if(this.isModal?d.push(st(t,[{opacity:1},{opacity:0}],{duration:l,easing:n})):this.isParentLayout||d.push(this.getLockTargetAnimate(!1,l)),this.isParentLayout&&(o(l,s),this.layoutManager.updateLayout(this,{width:0})),d.push(st(this.isModal?e:this,[{transform:"translateX(0)"},{transform:`translateX(${r?"":"-"}100%)`}],{duration:l,easing:s})),await Promise.all(d),this.open)return;this.isParentLayout&&o(null),this.style.display="none",this.isModal&&!this.contained&&Ss(this,this.lockTarget);const u=this.originalTrigger;vt(u?.focus)&&setTimeout(()=>u.focus()),this.emit("closed")}}connectedCallback(){super.connectedCallback(),this.modalHelper=new vm(this),this.definedController.whenDefined().then(()=>{this.setObserveResize()})}disconnectedCallback(){super.disconnectedCallback(),Ss(this,this.lockTarget),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",t=>{this.open&&this.closeOnEsc&&t.key==="Escape"&&this.isModal&&(t.stopPropagation(),this.open=!1)})}render(){return Z`${at(this.isModal,()=>Z`<div ${De(this.overlayRef)} part="overlay" class="overlay" @click="${this.onOverlayClick}"></div>`)}<slot ${De(this.panelRef)} part="panel" class="panel" tabindex="0"></slot>`}setObserveResize(){this.observeResize=kr(this.contained?this.parentElement:document.documentElement,()=>{const e=this.contained?this.parentElement:void 0;this.mobile=xc(e).down("md"),this.isParentLayout&&this.layoutManager.updateLayout(this,{width:this.isModal?0:void 0})})}onOverlayClick(){this.emit("overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}getLockTargetAnimate(e,t){const r=this.placement==="right"?"paddingRight":"paddingLeft",n=oe(this.panelRef.value).innerWidth()+"px";return st(this.lockTarget,[{[r]:e?0:n},{[r]:e?n:0}],{duration:t,easing:ti(this,"emphasized"),fill:"forwards"})}};ri.styles=[qe,d_];w([L({type:Boolean,reflect:!0,converter:we})],ri.prototype,"open",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ri.prototype,"modal",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"close-on-esc"})],ri.prototype,"closeOnEsc",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"close-on-overlay-click"})],ri.prototype,"closeOnOverlayClick",void 0);w([L({reflect:!0})],ri.prototype,"placement",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ri.prototype,"contained",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ri.prototype,"mobile",void 0);w([Re("contained",!0)],ri.prototype,"onContainedChange",null);w([Re("placement",!0)],ri.prototype,"onPlacementChange",null);w([Re("mobile",!0),Re("modal",!0)],ri.prototype,"onMobileChange",null);w([Re("open")],ri.prototype,"onOpenChange",null);ri=w([Ae("mdui-navigation-drawer")],ri);const u_=$e`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;border-radius:0 var(--shape-corner) var(--shape-corner) 0;z-index:var(--z-index);width:5rem;background-color:rgb(var(--mdui-color-surface));padding:.375rem .75rem}:host([contained]:not([contained=false i])){position:absolute}:host([divider]:not([divider=false i])){border-right:.0625rem solid rgb(var(--mdui-color-surface-variant));width:5.0625rem}:host([placement=right]){left:initial;right:0;border-radius:var(--shape-corner) 0 0 var(--shape-corner)}:host([placement=right][divider]:not([divider=false i])){border-right:none;border-left:.0625rem solid rgb(var(--mdui-color-surface-variant))}.bottom,.items,.top{display:flex;flex-direction:column;align-items:center;width:100%}.top{margin-bottom:1.75rem}.bottom{margin-top:1.75rem}::slotted([slot=bottom]),::slotted([slot=top]),::slotted(mdui-navigation-rail-item){margin-top:.375rem;margin-bottom:.375rem}:host([alignment=start]) .top-spacer{flex-grow:0}:host([alignment=start]) .bottom-spacer{flex-grow:1}:host([alignment=end]) .top-spacer{flex-grow:1}:host([alignment=end]) .bottom-spacer{flex-grow:0}:host([alignment=center]){justify-content:center}:host([alignment=center]) .bottom,:host([alignment=center]) .top{position:absolute}:host([alignment=center]) .top{top:.375rem}:host([alignment=center]) .bottom{bottom:.375rem}`;let ni=class extends Rr{constructor(){super(...arguments),this.placement="left",this.alignment="start",this.contained=!1,this.divider=!1,this.activeKey=0,this.hasSlotController=new $t(this,"top","bottom"),this.definedController=new At(this,{relatedElements:["mdui-navigation-rail-item"]}),this.isInitial=!0}get layoutPlacement(){return this.placement}get parentTarget(){return this.contained||this.isParentLayout?this.parentElement:document.body}get isRight(){return this.placement==="right"}get paddingValue(){return["fixed","absolute"].includes(oe(this).css("position"))?this.offsetWidth:void 0}async onActiveKeyChange(){await this.definedController.whenDefined();const e=this.items.find(t=>t.key===this.activeKey);this.value=e?.value,this.isInitial||this.emit("change")}async onValueChange(){this.isInitial=!this.hasUpdated,await this.definedController.whenDefined();const e=this.items.find(t=>t.value===this.value);this.activeKey=e?.key??0,this.updateItems()}async onContainedChange(){this.isParentLayout||(await this.definedController.whenDefined(),oe(document.body).css({paddingLeft:this.contained||this.isRight?null:this.paddingValue,paddingRight:this.contained||!this.isRight?null:this.paddingValue}),oe(this.parentElement).css({paddingLeft:this.contained&&!this.isRight?this.paddingValue:null,paddingRight:this.contained&&this.isRight?this.paddingValue:null}))}async onPlacementChange(){await this.definedController.whenDefined(),this.layoutManager?.updateLayout(this),this.items.forEach(e=>{e.placement=this.placement}),this.isParentLayout||oe(this.parentTarget).css({paddingLeft:this.isRight?null:this.paddingValue,paddingRight:this.isRight?this.paddingValue:null})}connectedCallback(){super.connectedCallback(),this.isParentLayout||this.definedController.whenDefined().then(()=>{oe(this.parentTarget).css({paddingLeft:this.isRight?null:this.paddingValue,paddingRight:this.isRight?this.paddingValue:null})})}disconnectedCallback(){super.disconnectedCallback(),!this.isParentLayout&&this.definedController.isDefined()&&oe(this.parentTarget).css({paddingLeft:this.isRight?void 0:null,paddingRight:this.isRight?null:void 0})}render(){const e=this.hasSlotController.test("top"),t=this.hasSlotController.test("bottom");return Z`${at(e,()=>Z`<slot name="top" part="top" class="top"></slot>`)} <span class="top-spacer"></span><slot part="items" class="items" @slotchange="${this.onSlotChange}" @click="${this.onClick}"></slot><span class="bottom-spacer"></span> ${at(t,()=>Z`<slot name="bottom" part="bottom" class="bottom"></slot>`)}`}onClick(e){if(e.button)return;const r=e.target.closest("mdui-navigation-rail-item");r&&(this.activeKey=r.key,this.isInitial=!1,this.updateItems())}updateItems(){this.items.forEach(e=>{e.active=this.activeKey===e.key,e.placement=this.placement,e.isInitial=this.isInitial})}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems()}};ni.styles=[qe,u_];w([L({reflect:!0})],ni.prototype,"value",void 0);w([L({reflect:!0})],ni.prototype,"placement",void 0);w([L({reflect:!0})],ni.prototype,"alignment",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ni.prototype,"contained",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ni.prototype,"divider",void 0);w([Be()],ni.prototype,"activeKey",void 0);w([gi({selector:"mdui-navigation-rail-item",flatten:!0})],ni.prototype,"items",void 0);w([Re("activeKey",!0)],ni.prototype,"onActiveKeyChange",null);w([Re("value")],ni.prototype,"onValueChange",null);w([Re("contained",!0)],ni.prototype,"onContainedChange",null);w([Re("placement",!0)],ni.prototype,"onPlacementChange",null);ni=w([Ae("mdui-navigation-rail")],ni);const h_=$e`:host{--shape-corner-indicator:var(--mdui-shape-corner-full);position:relative;z-index:0;width:100%;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}.container{display:flex;flex-direction:column;align-items:center;justify-content:center;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;height:3.5rem}.container:not(.initial){transition:padding var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}mdui-ripple{z-index:1;width:3.5rem;height:2rem;border-radius:var(--mdui-shape-corner-full)}.container:not(.has-label)+mdui-ripple{height:3.5rem}.indicator{position:relative;display:flex;align-items:center;justify-content:center;background-color:transparent;border-radius:var(--shape-corner-indicator);height:2rem;width:2rem}:not(.initial) .indicator{transition:background-color var(--mdui-motion-duration-short1) var(--mdui-motion-easing-standard),width var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard),height var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}.placement-right::slotted([slot=badge]){transform:translate(-50%,-50%)}::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}.placement-right::slotted([slot=badge][variant=small]){transform:translate(-.5625rem,-.5625rem)}.active-icon,.icon{color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}.active-icon mdui-icon,.icon mdui-icon,::slotted([slot=active-icon]),::slotted([slot=icon]){font-size:inherit}.icon{display:flex}.active-icon{display:none}.label{display:flex;align-items:center;height:1rem;color:rgb(var(--mdui-color-on-surface-variant));margin-top:.25rem;margin-bottom:.25rem;font-size:var(--mdui-typescale-label-medium-size);font-weight:var(--mdui-typescale-label-medium-weight);letter-spacing:var(--mdui-typescale-label-medium-tracking);line-height:var(--mdui-typescale-label-medium-line-height)}:not(.initial) .label{transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear)}:host([active]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([active]) .indicator{width:3.5rem;background-color:rgb(var(--mdui-color-secondary-container))}:host([active]) :not(.has-label) .indicator{height:3.5rem}:host([active]) .active-icon,:host([active]) .icon{color:rgb(var(--mdui-color-on-secondary-container))}:host([active]) .has-active-icon .active-icon{display:flex}:host([active]) .has-active-icon .icon{display:none}:host([active]) .label{color:rgb(var(--mdui-color-on-surface))}`;let zi=class extends On(Di(bi(Ke))){constructor(){super(...arguments),this.active=!1,this.isInitial=!0,this.placement="left",this.disabled=!1,this.key=Sr(),this.rippleRef=Me(),this.hasSlotController=new $t(this,"[default]","active-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.href?this.renderRoot?.querySelector("._a"):this}get focusDisabled(){return this.disabled}render(){const e=this.hasSlotController.test("[default]"),t=Bi({container:!0,"has-label":e,"has-active-icon":this.activeIcon||this.hasSlotController.test("active-icon"),initial:this.isInitial});return Z`${this.href?this.renderAnchor({part:"container",className:t,content:this.renderInner(e)}):Z`<div part="container" class="${t}">${this.renderInner(e)}</div>`}<mdui-ripple .noRipple="${!this.active||this.noRipple}" ${De(this.rippleRef)}></mdui-ripple>`}renderInner(e){return Z`<div part="indicator" class="indicator"><slot name="badge" part="badge" class="${bt({badge:!0,"placement-right":this.placement==="right"})}"></slot><slot name="active-icon" part="active-icon" class="active-icon">${this.activeIcon?Z`<mdui-icon name="${this.activeIcon}"></mdui-icon>`:Qe}</slot><slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}"></mdui-icon>`:Qe}</slot></div>${e?Z`<slot part="label" class="label"></slot>`:it}`}};zi.styles=[qe,h_];w([L({reflect:!0})],zi.prototype,"icon",void 0);w([L({reflect:!0,attribute:"active-icon"})],zi.prototype,"activeIcon",void 0);w([L({reflect:!0})],zi.prototype,"value",void 0);w([L({type:Boolean,reflect:!0,converter:we})],zi.prototype,"active",void 0);w([Be()],zi.prototype,"isInitial",void 0);w([Be()],zi.prototype,"placement",void 0);w([Be()],zi.prototype,"disabled",void 0);zi=w([Ae("mdui-navigation-rail-item")],zi);let Ec=class extends yt{render(){return Ri('<path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"/>')}};Ec.styles=ki;Ec=w([Ae("mdui-icon-circle")],Ec);let Sc=class extends yt{render(){return Ri('<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/>')}};Sc.styles=ki;Sc=w([Ae("mdui-icon-radio-button-unchecked")],Sc);const f_=$e`:host{position:relative;display:inline-flex;align-items:center;cursor:pointer;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none;border-radius:.125rem;font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.icon{display:flex;position:absolute;font-size:1.5rem}:not(.initial) .icon{transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard)}.unchecked-icon{transition-property:color;color:rgb(var(--mdui-color-on-surface-variant))}:host([focused]) .unchecked-icon,:host([hover]) .unchecked-icon,:host([pressed]) .unchecked-icon{color:rgb(var(--mdui-color-on-surface))}.checked-icon{opacity:0;transform:scale(.2);transition-property:color,opacity,transform;color:rgb(var(--mdui-color-primary))}.icon .i,::slotted([slot=checked-icon]),::slotted([slot=unchecked-icon]){color:inherit;font-size:inherit}i{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;border-radius:50%;width:2.5rem;height:2.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.label{display:flex;width:100%;padding-top:.625rem;padding-bottom:.625rem;color:rgb(var(--mdui-color-on-surface))}.label:not(.initial){transition:color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}:host([checked]:not([checked=false i])) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([checked]:not([checked=false i])) .icon{color:rgb(var(--mdui-color-primary))}:host([checked]:not([checked=false i])) .checked-icon{opacity:1;transform:scale(.5)}i.invalid{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}i.invalid .icon{color:rgb(var(--mdui-color-error))}.label.invalid{color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])),:host([group-disabled]){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])) .icon,:host([group-disabled]) .icon{color:rgba(var(--mdui-color-on-surface),38%)}:host([disabled]:not([disabled=false i])) .label,:host([group-disabled]) .label{color:rgba(var(--mdui-color-on-surface),38%)}`;let fi=class extends Di(bi(Ke)){constructor(){super(...arguments),this.value="",this.disabled=!1,this.checked=!1,this.invalid=!1,this.groupDisabled=!1,this.focusable=!0,this.isInitial=!0,this.rippleRef=Me()}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.isDisabled()}get focusElement(){return this}get focusDisabled(){return this.isDisabled()||!this.focusable}onCheckedChange(){this.emit("change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",()=>{this.isDisabled()||(this.checked=!0)})}render(){const e=bt({invalid:this.invalid,initial:this.isInitial});return Z`<i part="control" class="${e}"><mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple><slot name="unchecked-icon" part="unchecked-icon" class="icon unchecked-icon">${this.uncheckedIcon?Z`<mdui-icon name="${this.uncheckedIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-radio-button-unchecked class="i"></mdui-icon-radio-button-unchecked>`}</slot><slot name="checked-icon" part="checked-icon" class="icon checked-icon">${this.checkedIcon?Z`<mdui-icon name="${this.checkedIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-circle class="i"></mdui-icon-circle>`}</slot></i><slot part="label" class="label ${e}"></slot>`}isDisabled(){return this.disabled||this.groupDisabled}};fi.styles=[qe,f_];w([L({reflect:!0})],fi.prototype,"value",void 0);w([L({type:Boolean,reflect:!0,converter:we})],fi.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],fi.prototype,"checked",void 0);w([L({reflect:!0,attribute:"unchecked-icon"})],fi.prototype,"uncheckedIcon",void 0);w([L({reflect:!0,attribute:"checked-icon"})],fi.prototype,"checkedIcon",void 0);w([Be()],fi.prototype,"invalid",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"group-disabled"})],fi.prototype,"groupDisabled",void 0);w([Be()],fi.prototype,"focusable",void 0);w([Be()],fi.prototype,"isInitial",void 0);w([Re("checked",!0)],fi.prototype,"onCheckedChange",null);fi=w([Ae("mdui-radio")],fi);const p_=$e`:host{display:inline-block}fieldset{border:none;padding:0;margin:0;min-width:0}input{position:absolute;padding:0;opacity:0;pointer-events:none;width:1.25rem;height:1.25rem;margin:0 0 0 .625rem}`;let xi=class extends Ke{constructor(){super(...arguments),this.disabled=!1,this.name="",this.value="",this.defaultValue="",this.required=!1,this.invalid=!1,this.isInitial=!0,this.inputRef=Me(),this.formController=new lr(this),this.definedController=new At(this,{relatedElements:["mdui-radio"]})}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get items(){return oe(this).find("mdui-radio").get()}get itemsEnabled(){return oe(this).find("mdui-radio:not([disabled])").get()}async onValueChange(){this.isInitial=!1,await this.definedController.whenDefined(),this.emit("input"),this.emit("change"),this.updateItems(),this.updateRadioFocusable(),await this.updateComplete;const e=this.formController.getForm();e&&xt.get(e)?.has(this)?(this.invalid=!1,xt.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}async onInvalidChange(){await this.definedController.whenDefined(),this.updateItems()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.inputRef.value.blur(),this.inputRef.value.focus())),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return Z`<fieldset><input ${De(this.inputRef)} type="radio" class="input" name="${je(this.name)}" value="${je(this.value)}" .checked="${!!this.value}" .required="${this.required}" tabindex="-1" @keydown="${this.onKeyDown}"><slot @click="${this.onClick}" @keydown="${this.onKeyDown}" @slotchange="${this.onSlotChange}" @change="${this.onCheckedChange}"></slot></fieldset>`}updateRadioFocusable(){const e=this.items,t=e.find(r=>r.checked);t?e.forEach(r=>{r.focusable=r===t}):this.itemsEnabled.forEach((r,n)=>{r.focusable=!n})}async onClick(e){await this.definedController.whenDefined();const r=e.target.closest("mdui-radio");!r||r.disabled||(this.value=r.value,await this.updateComplete,r.focus())}async onKeyDown(e){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;e.preventDefault(),await this.definedController.whenDefined();const t=this.itemsEnabled,r=t.find(o=>o.checked)??t[0],n=e.key===" "?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1;let s=t.indexOf(r)+n;s<0&&(s=t.length-1),s>t.length-1&&(s=0),this.value=t[s].value,await this.updateComplete,t[s].focus()}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems(),this.updateRadioFocusable()}onCheckedChange(e){e.stopPropagation()}updateItems(){this.items.forEach(e=>{e.checked=e.value===this.value,e.invalid=this.invalid,e.groupDisabled=this.disabled,e.isInitial=this.isInitial})}};xi.styles=[qe,p_];w([L({type:Boolean,reflect:!0,converter:we})],xi.prototype,"disabled",void 0);w([L({reflect:!0})],xi.prototype,"form",void 0);w([L({reflect:!0})],xi.prototype,"name",void 0);w([L({reflect:!0})],xi.prototype,"value",void 0);w([Ir()],xi.prototype,"defaultValue",void 0);w([L({type:Boolean,reflect:!0,converter:we})],xi.prototype,"required",void 0);w([Be()],xi.prototype,"invalid",void 0);w([Re("value",!0)],xi.prototype,"onValueChange",null);w([Re("invalid",!0),Re("disabled")],xi.prototype,"onInvalidChange",null);xi=w([Ae("mdui-radio-group")],xi);/**
487
487
  * @license
488
488
  * Copyright 2021 Google LLC
489
489
  * SPDX-License-Identifier: BSD-3-Clause
490
- */function*hn(i,e){if(i!==void 0){let t=0;for(const r of i)yield e(r,t++)}}const g_=$e`:host{position:relative;display:block;width:100%;-webkit-tap-highlight-color:transparent;height:2.5rem;padding:0 1.25rem}label{position:relative;display:block;width:100%;height:100%}input[type=range]{position:absolute;inset:0;z-index:4;height:100%;cursor:pointer;opacity:0;appearance:none;width:calc(100% + 20rem * 2 / 16);margin:0 -1.25rem;padding:0 .75rem}:host([disabled]:not([disabled=false i])) input[type=range]{cursor:not-allowed}.track-active,.track-inactive{position:absolute;top:50%;height:.25rem;margin-top:-.125rem}.track-inactive{left:-.125rem;right:-.125rem;border-radius:var(--mdui-shape-corner-full);background-color:rgb(var(--mdui-color-surface-container-highest))}.invalid .track-inactive{background-color:rgba(var(--mdui-color-error),.12)}:host([disabled]:not([disabled=false i])) .track-inactive{background-color:rgba(var(--mdui-color-on-surface),.12)}.track-active{background-color:rgb(var(--mdui-color-primary))}.invalid .track-active{background-color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])) .track-active{background-color:rgba(var(--mdui-color-on-surface),.38)}.handle{position:absolute;top:50%;transform:translate(-50%);cursor:pointer;z-index:2;width:2.5rem;height:2.5rem;margin-top:-1.25rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}.invalid .handle{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}.handle .elevation,.handle::before{position:absolute;display:block;content:' ';left:.625rem;top:.625rem;width:1.25rem;height:1.25rem;border-radius:var(--mdui-shape-corner-full)}.handle .elevation{background-color:rgb(var(--mdui-color-primary));box-shadow:var(--mdui-elevation-level1)}.invalid .handle .elevation{background-color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])) .handle .elevation{background-color:rgba(var(--mdui-color-on-surface),.38);box-shadow:var(--mdui-elevation-level0)}.handle::before{background-color:rgb(var(--mdui-color-background))}.handle mdui-ripple{border-radius:var(--mdui-shape-corner-full)}.label{position:absolute;left:50%;transform:translateX(-50%) scale(0);transform-origin:center bottom;display:flex;align-items:center;justify-content:center;cursor:default;white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none;transition:transform var(--mdui-motion-duration-short2) var(--mdui-motion-easing-standard);bottom:2.5rem;min-width:1.75rem;height:1.75rem;padding:.375rem .5rem;border-radius:var(--mdui-shape-corner-full);color:rgb(var(--mdui-color-on-primary));font-size:var(--mdui-typescale-label-medium-size);font-weight:var(--mdui-typescale-label-medium-weight);letter-spacing:var(--mdui-typescale-label-medium-tracking);line-height:var(--mdui-typescale-label-medium-line-height);background-color:rgb(var(--mdui-color-primary))}.invalid .label{color:rgb(var(--mdui-color-on-error));background-color:rgb(var(--mdui-color-error))}.label::after{content:' ';position:absolute;z-index:-1;transform:rotate(45deg);width:.875rem;height:.875rem;bottom:-.125rem;background-color:rgb(var(--mdui-color-primary))}.invalid .label::after{background-color:rgb(var(--mdui-color-error))}.label-visible{transform:translateX(-50%) scale(1);transition:transform var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.tickmark{position:absolute;top:50%;transform:translate(-50%);width:.125rem;height:.125rem;margin-top:-.0625rem;border-radius:var(--mdui-shape-corner-full);background-color:rgba(var(--mdui-color-on-surface-variant),.38)}.invalid .tickmark{background-color:rgba(var(--mdui-color-error),.38)}.tickmark.active{background-color:rgba(var(--mdui-color-on-primary),.38)}.invalid .tickmark.active{background-color:rgba(var(--mdui-color-on-error),.38)}:host([disabled]:not([disabled=false i])) .tickmark{background-color:rgba(var(--mdui-color-on-surface),.38)}`;class Pt extends Di(bi(Ke)){constructor(){super(...arguments),this.min=0,this.max=100,this.step=1,this.tickmarks=!1,this.nolabel=!1,this.disabled=!1,this.name="",this.invalid=!1,this.labelVisible=!1,this.inputRef=Me(),this.trackActiveRef=Me(),this.labelFormatter=e=>e.toString()}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get rippleDisabled(){return this.disabled}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}onDisabledChange(){this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.blur(),this.focus())),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}fixValue(e){const{min:t,max:r,step:n}=this;e=Math.min(Math.max(e,t),r);const s=Math.round((e-t)/n);let o=t+s*n;return o>r&&(o-=n),o}getCandidateValues(){return Array.from({length:this.max-this.min+1},(e,t)=>t+this.min).filter(e=>!((e-this.min)%this.step))}renderLabel(e){return at(!this.nolabel,()=>Z`<div part="label" class="label ${bt({"label-visible":this.labelVisible})}">${this.labelFormatter(e)}</div>`)}onChange(){this.emit("change")}}Pt.styles=[qe,g_];w([L({type:Number,reflect:!0})],Pt.prototype,"min",void 0);w([L({type:Number,reflect:!0})],Pt.prototype,"max",void 0);w([L({type:Number,reflect:!0})],Pt.prototype,"step",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Pt.prototype,"tickmarks",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Pt.prototype,"nolabel",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Pt.prototype,"disabled",void 0);w([L({reflect:!0})],Pt.prototype,"form",void 0);w([L({reflect:!0})],Pt.prototype,"name",void 0);w([Be()],Pt.prototype,"invalid",void 0);w([Be()],Pt.prototype,"labelVisible",void 0);w([L({attribute:!1})],Pt.prototype,"labelFormatter",void 0);w([Re("disabled",!0)],Pt.prototype,"onDisabledChange",null);let In=class extends Pt{constructor(){super(...arguments),this.defaultValue=[],this.currentHandle="start",this.rippleStartRef=Me(),this.rippleEndRef=Me(),this.handleStartRef=Me(),this.handleEndRef=Me(),this.formController=new lr(this),this._value=[],this.getRippleIndex=()=>this.hoverHandle?this.hoverHandle==="start"?0:1:this.currentHandle==="start"?0:1}get value(){return this._value}set value(e){const t=[...this._value];this._value=[this.fixValue(e[0]),this.fixValue(e[1])],this.requestUpdate("value",t),this.updateComplete.then(()=>{this.updateStyle();const r=this.formController.getForm();r&&xt.get(r)?.has(this)?(this.invalid=!1,xt.get(r).delete(this)):this.invalid=!this.inputRef.value.checkValidity()})}get rippleElement(){return[this.rippleStartRef.value,this.rippleEndRef.value]}connectedCallback(){super.connectedCallback(),this.value.length||(this.value=[this.min,this.max]),this.value[0]=this.fixValue(this.value[0]),this.value[1]=this.fixValue(this.value[1]),this.defaultValue.length||(this.defaultValue=[...this.value])}firstUpdated(e){super.firstUpdated(e);const t=s=>{const o=oe(this),a=parseFloat(o.css("padding-left")),c=parseFloat(o.css("padding-right")),l=(s.offsetX-a)/(this.clientWidth-a-c),d=(this.max-this.min)*l+this.min,u=(this.value[1]-this.value[0])/2+this.value[0];return d>u?"end":"start"},r=()=>{this.disabled||(this.labelVisible=!0)},n=()=>{this.disabled||(this.labelVisible=!1)};this.addEventListener("touchstart",r),this.addEventListener("mousedown",r),this.addEventListener("touchend",n),this.addEventListener("mouseup",n),this.addEventListener("pointerdown",s=>{this.currentHandle=t(s)}),this.addEventListener("pointermove",s=>{const o=t(s);this.hoverHandle!==o&&(this.endHover(s),this.hoverHandle=o,this.startHover(s))}),this.updateStyle()}render(){return Z`<label class="${bt({invalid:this.invalid})}"><input ${De(this.inputRef)} type="range" step="${this.step}" min="${this.min}" max="${this.max}" ?disabled="${this.disabled}" @input="${this.onInput}" @change="${this.onChange}"><div part="track-inactive" class="track-inactive"></div><div ${De(this.trackActiveRef)} part="track-active" class="track-active"></div><div ${De(this.handleStartRef)} part="handle" class="handle start" style="${jr({"z-index":this.currentHandle==="start"?"2":"1"})}"><div class="elevation"></div><mdui-ripple ${De(this.rippleStartRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.renderLabel(this.value[0])}</div><div ${De(this.handleEndRef)} part="handle" class="handle end" style="${jr({"z-index":this.currentHandle==="end"?"2":"1"})}"><div class="elevation"></div><mdui-ripple ${De(this.rippleEndRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.renderLabel(this.value[1])}</div>${at(this.tickmarks,()=>hn(this.getCandidateValues(),e=>Z`<div part="tickmark" class="tickmark ${bt({active:e>this.value[0]&&e<this.value[1]})}" style="${jr({left:`${(e-this.min)/this.max*100}%`,display:e===this.value[0]||e===this.value[1]?"none":"block"})}"></div>`))}</label>`}updateStyle(){const e=n=>(n-this.min)/(this.max-this.min)*100,t=e(this.value[0]),r=e(this.value[1]);this.trackActiveRef.value.style.width=`${r-t}%`,this.trackActiveRef.value.style.left=`${t}%`,this.handleStartRef.value.style.left=`${t}%`,this.handleEndRef.value.style.left=`${r}%`}onInput(){const e=this.currentHandle==="start",t=parseFloat(this.inputRef.value.value),r=this.value[0],n=this.value[1],s=()=>{this.updateStyle()};e?t<=n?(this.value=[t,n],s()):r!==n&&(this.value=[n,n],s()):t>=r?(this.value=[r,t],s()):r!==n&&(this.value=[r,r],s())}};In.styles=[Pt.styles];w([Ir()],In.prototype,"defaultValue",void 0);w([Be()],In.prototype,"currentHandle",void 0);w([L({type:Array,attribute:!1})],In.prototype,"value",null);In=w([Ae("mdui-range-slider")],In);const b_=$e`:host{position:relative;display:inline-flex;flex-grow:1;flex-shrink:0;float:left;height:100%;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:transparent;border:.0625rem solid rgb(var(--mdui-color-outline))}.button{width:100%;padding:0 .75rem}:host([invalid]){color:rgb(var(--mdui-color-error));border-color:rgb(var(--mdui-color-error))}:host([invalid]) .button{background-color:rgb(var(--mdui-color-error-container))}:host([selected]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var(
490
+ */function*hn(i,e){if(i!==void 0){let t=0;for(const r of i)yield e(r,t++)}}const m_=$e`:host{position:relative;display:block;width:100%;-webkit-tap-highlight-color:transparent;height:2.5rem;padding:0 1.25rem}label{position:relative;display:block;width:100%;height:100%}input[type=range]{position:absolute;inset:0;z-index:4;height:100%;cursor:pointer;opacity:0;appearance:none;width:calc(100% + 20rem * 2 / 16);margin:0 -1.25rem;padding:0 .75rem}:host([disabled]:not([disabled=false i])) input[type=range]{cursor:not-allowed}.track-active,.track-inactive{position:absolute;top:50%;height:.25rem;margin-top:-.125rem}.track-inactive{left:-.125rem;right:-.125rem;border-radius:var(--mdui-shape-corner-full);background-color:rgb(var(--mdui-color-surface-container-highest))}.invalid .track-inactive{background-color:rgba(var(--mdui-color-error),.12)}:host([disabled]:not([disabled=false i])) .track-inactive{background-color:rgba(var(--mdui-color-on-surface),.12)}.track-active{background-color:rgb(var(--mdui-color-primary))}.invalid .track-active{background-color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])) .track-active{background-color:rgba(var(--mdui-color-on-surface),.38)}.handle{position:absolute;top:50%;transform:translate(-50%);cursor:pointer;z-index:2;width:2.5rem;height:2.5rem;margin-top:-1.25rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}.invalid .handle{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}.handle .elevation,.handle::before{position:absolute;display:block;content:' ';left:.625rem;top:.625rem;width:1.25rem;height:1.25rem;border-radius:var(--mdui-shape-corner-full)}.handle .elevation{background-color:rgb(var(--mdui-color-primary));box-shadow:var(--mdui-elevation-level1)}.invalid .handle .elevation{background-color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])) .handle .elevation{background-color:rgba(var(--mdui-color-on-surface),.38);box-shadow:var(--mdui-elevation-level0)}.handle::before{background-color:rgb(var(--mdui-color-background))}.handle mdui-ripple{border-radius:var(--mdui-shape-corner-full)}.label{position:absolute;left:50%;transform:translateX(-50%) scale(0);transform-origin:center bottom;display:flex;align-items:center;justify-content:center;cursor:default;white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none;transition:transform var(--mdui-motion-duration-short2) var(--mdui-motion-easing-standard);bottom:2.5rem;min-width:1.75rem;height:1.75rem;padding:.375rem .5rem;border-radius:var(--mdui-shape-corner-full);color:rgb(var(--mdui-color-on-primary));font-size:var(--mdui-typescale-label-medium-size);font-weight:var(--mdui-typescale-label-medium-weight);letter-spacing:var(--mdui-typescale-label-medium-tracking);line-height:var(--mdui-typescale-label-medium-line-height);background-color:rgb(var(--mdui-color-primary))}.invalid .label{color:rgb(var(--mdui-color-on-error));background-color:rgb(var(--mdui-color-error))}.label::after{content:' ';position:absolute;z-index:-1;transform:rotate(45deg);width:.875rem;height:.875rem;bottom:-.125rem;background-color:rgb(var(--mdui-color-primary))}.invalid .label::after{background-color:rgb(var(--mdui-color-error))}.label-visible{transform:translateX(-50%) scale(1);transition:transform var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.tickmark{position:absolute;top:50%;transform:translate(-50%);width:.125rem;height:.125rem;margin-top:-.0625rem;border-radius:var(--mdui-shape-corner-full);background-color:rgba(var(--mdui-color-on-surface-variant),.38)}.invalid .tickmark{background-color:rgba(var(--mdui-color-error),.38)}.tickmark.active{background-color:rgba(var(--mdui-color-on-primary),.38)}.invalid .tickmark.active{background-color:rgba(var(--mdui-color-on-error),.38)}:host([disabled]:not([disabled=false i])) .tickmark{background-color:rgba(var(--mdui-color-on-surface),.38)}`;class Pt extends Di(bi(Ke)){constructor(){super(...arguments),this.min=0,this.max=100,this.step=1,this.tickmarks=!1,this.nolabel=!1,this.disabled=!1,this.name="",this.invalid=!1,this.labelVisible=!1,this.inputRef=Me(),this.trackActiveRef=Me(),this.labelFormatter=e=>e.toString()}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get rippleDisabled(){return this.disabled}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}onDisabledChange(){this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.blur(),this.focus())),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}fixValue(e){const{min:t,max:r,step:n}=this;e=Math.min(Math.max(e,t),r);const s=Math.round((e-t)/n);let o=t+s*n;return o>r&&(o-=n),o}getCandidateValues(){return Array.from({length:this.max-this.min+1},(e,t)=>t+this.min).filter(e=>!((e-this.min)%this.step))}renderLabel(e){return at(!this.nolabel,()=>Z`<div part="label" class="label ${bt({"label-visible":this.labelVisible})}">${this.labelFormatter(e)}</div>`)}onChange(){this.emit("change")}}Pt.styles=[qe,m_];w([L({type:Number,reflect:!0})],Pt.prototype,"min",void 0);w([L({type:Number,reflect:!0})],Pt.prototype,"max",void 0);w([L({type:Number,reflect:!0})],Pt.prototype,"step",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Pt.prototype,"tickmarks",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Pt.prototype,"nolabel",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Pt.prototype,"disabled",void 0);w([L({reflect:!0})],Pt.prototype,"form",void 0);w([L({reflect:!0})],Pt.prototype,"name",void 0);w([Be()],Pt.prototype,"invalid",void 0);w([Be()],Pt.prototype,"labelVisible",void 0);w([L({attribute:!1})],Pt.prototype,"labelFormatter",void 0);w([Re("disabled",!0)],Pt.prototype,"onDisabledChange",null);let In=class extends Pt{constructor(){super(...arguments),this.defaultValue=[],this.currentHandle="start",this.rippleStartRef=Me(),this.rippleEndRef=Me(),this.handleStartRef=Me(),this.handleEndRef=Me(),this.formController=new lr(this),this._value=[],this.getRippleIndex=()=>this.hoverHandle?this.hoverHandle==="start"?0:1:this.currentHandle==="start"?0:1}get value(){return this._value}set value(e){const t=[...this._value];this._value=[this.fixValue(e[0]),this.fixValue(e[1])],this.requestUpdate("value",t),this.updateComplete.then(()=>{this.updateStyle();const r=this.formController.getForm();r&&xt.get(r)?.has(this)?(this.invalid=!1,xt.get(r).delete(this)):this.invalid=!this.inputRef.value.checkValidity()})}get rippleElement(){return[this.rippleStartRef.value,this.rippleEndRef.value]}connectedCallback(){super.connectedCallback(),this.value.length||(this.value=[this.min,this.max]),this.value[0]=this.fixValue(this.value[0]),this.value[1]=this.fixValue(this.value[1]),this.defaultValue.length||(this.defaultValue=[...this.value])}firstUpdated(e){super.firstUpdated(e);const t=s=>{const o=oe(this),a=parseFloat(o.css("padding-left")),c=parseFloat(o.css("padding-right")),l=(s.offsetX-a)/(this.clientWidth-a-c),d=(this.max-this.min)*l+this.min,u=(this.value[1]-this.value[0])/2+this.value[0];return d>u?"end":"start"},r=()=>{this.disabled||(this.labelVisible=!0)},n=()=>{this.disabled||(this.labelVisible=!1)};this.addEventListener("touchstart",r),this.addEventListener("mousedown",r),this.addEventListener("touchend",n),this.addEventListener("mouseup",n),this.addEventListener("pointerdown",s=>{this.currentHandle=t(s)}),this.addEventListener("pointermove",s=>{const o=t(s);this.hoverHandle!==o&&(this.endHover(s),this.hoverHandle=o,this.startHover(s))}),this.updateStyle()}render(){return Z`<label class="${bt({invalid:this.invalid})}"><input ${De(this.inputRef)} type="range" step="${this.step}" min="${this.min}" max="${this.max}" ?disabled="${this.disabled}" @input="${this.onInput}" @change="${this.onChange}"><div part="track-inactive" class="track-inactive"></div><div ${De(this.trackActiveRef)} part="track-active" class="track-active"></div><div ${De(this.handleStartRef)} part="handle" class="handle start" style="${jr({"z-index":this.currentHandle==="start"?"2":"1"})}"><div class="elevation"></div><mdui-ripple ${De(this.rippleStartRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.renderLabel(this.value[0])}</div><div ${De(this.handleEndRef)} part="handle" class="handle end" style="${jr({"z-index":this.currentHandle==="end"?"2":"1"})}"><div class="elevation"></div><mdui-ripple ${De(this.rippleEndRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.renderLabel(this.value[1])}</div>${at(this.tickmarks,()=>hn(this.getCandidateValues(),e=>Z`<div part="tickmark" class="tickmark ${bt({active:e>this.value[0]&&e<this.value[1]})}" style="${jr({left:`${(e-this.min)/this.max*100}%`,display:e===this.value[0]||e===this.value[1]?"none":"block"})}"></div>`))}</label>`}updateStyle(){const e=n=>(n-this.min)/(this.max-this.min)*100,t=e(this.value[0]),r=e(this.value[1]);this.trackActiveRef.value.style.width=`${r-t}%`,this.trackActiveRef.value.style.left=`${t}%`,this.handleStartRef.value.style.left=`${t}%`,this.handleEndRef.value.style.left=`${r}%`}onInput(){const e=this.currentHandle==="start",t=parseFloat(this.inputRef.value.value),r=this.value[0],n=this.value[1],s=()=>{this.updateStyle()};e?t<=n?(this.value=[t,n],s()):r!==n&&(this.value=[n,n],s()):t>=r?(this.value=[r,t],s()):r!==n&&(this.value=[r,r],s())}};In.styles=[Pt.styles];w([Ir()],In.prototype,"defaultValue",void 0);w([Be()],In.prototype,"currentHandle",void 0);w([L({type:Array,attribute:!1})],In.prototype,"value",null);In=w([Ae("mdui-range-slider")],In);const g_=$e`:host{position:relative;display:inline-flex;flex-grow:1;flex-shrink:0;float:left;height:100%;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:transparent;border:.0625rem solid rgb(var(--mdui-color-outline))}.button{width:100%;padding:0 .75rem}:host([invalid]){color:rgb(var(--mdui-color-error));border-color:rgb(var(--mdui-color-error))}:host([invalid]) .button{background-color:rgb(var(--mdui-color-error-container))}:host([selected]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var(
491
491
  --mdui-color-on-secondary-container
492
- )}:host([disabled]:not([disabled=false i])),:host([group-disabled]){cursor:default;pointer-events:none;color:rgba(var(--mdui-color-on-surface),38%);border-color:rgba(var(--mdui-color-on-surface),12%)}:host([loading]:not([loading=false i])){cursor:default;pointer-events:none}:host(:not(.mdui-segmented-button-first)){margin-left:-.0625rem}:host(.mdui-segmented-button-first){border-radius:var(--shape-corner) 0 0 var(--shape-corner)}:host(.mdui-segmented-button-last){border-radius:0 var(--shape-corner) var(--shape-corner) 0}.end-icon,.icon,.selected-icon{display:inline-flex;font-size:1.28571429em}.end-icon .i,.icon .i,.selected-icon .i,::slotted([slot=end-icon]),::slotted([slot=icon]),::slotted([slot=selected-icon]){font-size:inherit}mdui-circular-progress{width:1.125rem;height:1.125rem}:host([disabled]:not([disabled=false i])) mdui-circular-progress{opacity:.38}.label{display:inline-flex}.has-icon .label{padding-left:.5rem}.has-end-icon .label{padding-right:.5rem}`;let nr=class extends pt{constructor(){super(...arguments),this.selected=!1,this.invalid=!1,this.groupDisabled=!1,this.key=Sr(),this.rippleRef=Me(),this.hasSlotController=new $t(this,"[default]","icon","end-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.isDisabled()||this.loading}get focusDisabled(){return this.isDisabled()||this.loading}render(){const e=Bi({button:!0,"has-icon":this.icon||this.selected||this.loading||this.hasSlotController.test("icon"),"has-end-icon":this.endIcon||this.hasSlotController.test("end-icon")});return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.isButton()?this.renderButton({className:e,part:"button",content:this.renderInner()}):this.isDisabled()||this.loading?Z`<span part="button" class="_a ${e}">${this.renderInner()}</span>`:this.renderAnchor({className:e,part:"button",content:this.renderInner()})}`}isDisabled(){return this.disabled||this.groupDisabled}renderIcon(){return this.loading?this.renderLoading():this.selected?Z`<slot name="selected-icon" part="selected-icon" class="selected-icon">${this.selectedIcon?Z`<mdui-icon name="${this.selectedIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-check class="i"></mdui-icon-check>`}</slot>`:Z`<slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}" class="i"></mdui-icon>`:Qe}</slot>`}renderLabel(){return this.hasSlotController.test("[default]")?Z`<slot part="label" class="label"></slot>`:Qe}renderEndIcon(){return Z`<slot name="end-icon" part="end-icon" class="end-icon">${this.endIcon?Z`<mdui-icon name="${this.endIcon}" class="i"></mdui-icon>`:Qe}</slot>`}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon()]}};nr.styles=[pt.styles,b_];w([L({reflect:!0})],nr.prototype,"icon",void 0);w([L({reflect:!0,attribute:"end-icon"})],nr.prototype,"endIcon",void 0);w([L({reflect:!0,attribute:"selected-icon"})],nr.prototype,"selectedIcon",void 0);w([L({type:Boolean,reflect:!0,converter:we})],nr.prototype,"selected",void 0);w([L({type:Boolean,reflect:!0,converter:we})],nr.prototype,"invalid",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"group-disabled"})],nr.prototype,"groupDisabled",void 0);nr=w([Ae("mdui-segmented-button")],nr);const y_=$e`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-flex;vertical-align:middle;height:2.5rem;font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height);color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([full-width]:not([full-width=false i])){display:flex;flex-wrap:nowrap}input,select{position:absolute;width:100%;height:100%;padding:0;opacity:0;pointer-events:none}`;let Ot=class extends Ke{constructor(){super(...arguments),this.fullWidth=!1,this.disabled=!1,this.required=!1,this.name="",this.value="",this.defaultValue="",this.selectedKeys=[],this.invalid=!1,this.isInitial=!0,this.inputRef=Me(),this.formController=new lr(this),this.definedController=new At(this,{relatedElements:["mdui-segmented-button"]})}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get items(){return oe(this).find("mdui-segmented-button").get()}get itemsEnabled(){return oe(this).find("mdui-segmented-button:not([disabled])").get()}get isSingle(){return this.selects==="single"}get isMultiple(){return this.selects==="multiple"}get isSelectable(){return this.isSingle||this.isMultiple}async onSelectsChange(){this.isSelectable?this.isSingle&&this.setSelectedKeys(this.selectedKeys.slice(0,1)):this.setSelectedKeys([]),await this.onSelectedKeysChange()}async onSelectedKeysChange(){await this.definedController.whenDefined();const e=this.itemsEnabled.filter(r=>this.selectedKeys.includes(r.key)).map(r=>r.value),t=this.isMultiple?e:e[0]||"";this.setValue(t),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),!this.isSelectable){this.updateItems();return}const e=(this.isSingle?[this.value]:wt(this.value)?[this.value]:this.value).filter(t=>t);if(!e.length)this.setSelectedKeys([]);else if(this.isSingle){const t=this.itemsEnabled.find(r=>r.value===e[0]);this.setSelectedKeys(t?[t.key]:[])}else this.isMultiple&&this.setSelectedKeys(this.itemsEnabled.filter(t=>e.includes(t.value)).map(t=>t.key));if(this.updateItems(),!this.isInitial){const t=this.formController.getForm();t&&xt.get(t)?.has(this)?(this.invalid=!1,xt.get(t).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}}async onInvalidChange(){await this.definedController.whenDefined(),this.updateItems()}connectedCallback(){super.connectedCallback(),this.value=this.isMultiple&&wt(this.value)?this.value?[this.value]:[]:this.value,this.defaultValue=this.selects==="multiple"?[]:""}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.inputRef.value.blur(),this.inputRef.value.focus())),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return Z`${at(this.isSelectable&&this.isSingle,()=>Z`<input ${De(this.inputRef)} type="radio" name="${je(this.name)}" value="1" .disabled="${this.disabled}" .required="${this.required}" .checked="${!!this.value}" tabindex="-1" @keydown="${this.onInputKeyDown}">`)}${at(this.isSelectable&&this.isMultiple,()=>Z`<select ${De(this.inputRef)} name="${je(this.name)}" .disabled="${this.disabled}" .required="${this.required}" multiple="multiple" tabindex="-1" @keydown="${this.onInputKeyDown}">${hn(this.value,e=>Z`<option selected="selected" value="${e}"></option>`)}</select>`)}<slot @slotchange="${this.onSlotChange}" @click="${this.onClick}"></slot>`}selectOne(e){if(this.isMultiple){const t=[...this.selectedKeys];t.includes(e.key)?t.splice(t.indexOf(e.key),1):t.push(e.key),this.setSelectedKeys(t)}this.isSingle&&(this.selectedKeys.includes(e.key)?this.setSelectedKeys([]):this.setSelectedKeys([e.key])),this.isInitial=!1,this.updateItems()}async onClick(e){if(e.button)return;await this.definedController.whenDefined();const r=e.target.closest("mdui-segmented-button");!r||r.disabled||this.isSelectable&&r.value&&this.selectOne(r)}async onInputKeyDown(e){if(["Enter"," "].includes(e.key)){if(e.preventDefault(),await this.definedController.whenDefined(),this.isSingle){const t=e.target;t.checked=!t.checked,this.selectOne(this.itemsEnabled[0]),this.itemsEnabled[0].focus()}this.isMultiple&&(this.selectOne(this.itemsEnabled[0]),this.itemsEnabled[0].focus())}}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems(!0)}setSelectedKeys(e){kn(this.selectedKeys,e)||(this.selectedKeys=e)}setValue(e){this.isSingle?this.value=e:kn(this.value,e)||(this.value=e)}updateItems(e=!1){const t=this.items;t.forEach((r,n)=>{r.invalid=this.invalid,r.groupDisabled=this.disabled,r.selected=this.selectedKeys.includes(r.key),e&&(r.classList.toggle("mdui-segmented-button-first",n===0),r.classList.toggle("mdui-segmented-button-last",n===t.length-1))})}};Ot.styles=[qe,y_];w([L({type:Boolean,reflect:!0,converter:we,attribute:"full-width"})],Ot.prototype,"fullWidth",void 0);w([L({reflect:!0})],Ot.prototype,"selects",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ot.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ot.prototype,"required",void 0);w([L({reflect:!0})],Ot.prototype,"form",void 0);w([L({reflect:!0})],Ot.prototype,"name",void 0);w([L()],Ot.prototype,"value",void 0);w([Ir()],Ot.prototype,"defaultValue",void 0);w([Be()],Ot.prototype,"selectedKeys",void 0);w([Be()],Ot.prototype,"invalid",void 0);w([Re("selects",!0)],Ot.prototype,"onSelectsChange",null);w([Re("selectedKeys",!0)],Ot.prototype,"onSelectedKeysChange",null);w([Re("value")],Ot.prototype,"onValueChange",null);w([Re("invalid",!0),Re("disabled")],Ot.prototype,"onInvalidChange",null);Ot=w([Ae("mdui-segmented-button-group")],Ot);let kc=class extends yt{render(){return Ri('<path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"/>')}};kc.styles=ki;kc=w([Ae("mdui-icon-cancel--outlined")],kc);let Rc=class extends yt{render(){return Ri('<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>')}};Rc.styles=ki;Rc=w([Ae("mdui-icon-error")],Rc);let Ic=class extends yt{render(){return Ri('<path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46A11.804 11.804 0 0 0 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/>')}};Ic.styles=ki;Ic=w([Ae("mdui-icon-visibility-off")],Ic);let Tc=class extends yt{render(){return Ri('<path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/>')}};Tc.styles=ki;Tc=w([Ae("mdui-icon-visibility")],Tc);const v_=$e`:host{display:inline-block;width:100%}:host([disabled]:not([disabled=false i])){pointer-events:none}:host([type=hidden]){display:none}.container{position:relative;display:flex;align-items:center;height:100%;padding:.125rem .125rem .125rem 1rem;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.container.has-icon{padding-left:.75rem}.container.has-action,.container.has-right-icon,.container.has-suffix{padding-right:.75rem}:host([variant=filled]) .container{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-surface-variant));background-color:rgb(var(--mdui-color-surface-container-highest));border-radius:var(--mdui-shape-corner-extra-small) var(--mdui-shape-corner-extra-small) 0 0}:host([variant=outlined]) .container{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-outline));border-radius:var(--mdui-shape-corner-extra-small)}:host([variant=filled]) .container.invalid,:host([variant=filled]) .container.invalid-style{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-error))}:host([variant=outlined]) .container.invalid,:host([variant=outlined]) .container.invalid-style{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-error))}:host([variant=filled]:hover) .container{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-surface))}:host([variant=outlined]:hover) .container{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-on-surface))}:host([variant=filled]:hover) .container.invalid,:host([variant=filled]:hover) .container.invalid-style{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-error-container))}:host([variant=outlined]:hover) .container.invalid,:host([variant=outlined]:hover) .container.invalid-style{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-on-error-container))}:host([variant=filled][focused-style]) .container,:host([variant=filled][focused]) .container{box-shadow:inset 0 -.125rem 0 0 rgb(var(--mdui-color-primary))}:host([variant=outlined][focused-style]) .container,:host([variant=outlined][focused]) .container{box-shadow:inset 0 0 0 .125rem rgb(var(--mdui-color-primary))}:host([variant=filled][focused-style]) .container.invalid,:host([variant=filled][focused-style]) .container.invalid-style,:host([variant=filled][focused]) .container.invalid,:host([variant=filled][focused]) .container.invalid-style{box-shadow:inset 0 -.125rem 0 0 rgb(var(--mdui-color-error))}:host([variant=outlined][focused-style]) .container.invalid,:host([variant=outlined][focused-style]) .container.invalid-style,:host([variant=outlined][focused]) .container.invalid,:host([variant=outlined][focused]) .container.invalid-style{box-shadow:inset 0 0 0 .125rem rgb(var(--mdui-color-error))}:host([variant=filled][disabled]:not([disabled=false i])) .container{box-shadow:inset 0 -.0625rem 0 0 rgba(var(--mdui-color-on-surface),38%);background-color:rgba(var(--mdui-color-on-surface),4%)}:host([variant=outlined][disabled]:not([disabled=false i])) .container{box-shadow:inset 0 0 0 .125rem rgba(var(--mdui-color-on-surface),12%)}.action,.icon,.prefix,.right-icon,.suffix{display:flex;-webkit-user-select:none;user-select:none;color:rgb(var(--mdui-color-on-surface-variant))}:host([disabled]:not([disabled=false i])) .action,:host([disabled]:not([disabled=false i])) .icon,:host([disabled]:not([disabled=false i])) .prefix,:host([disabled]:not([disabled=false i])) .right-icon,:host([disabled]:not([disabled=false i])) .suffix{color:rgba(var(--mdui-color-on-surface),38%)}.invalid .right-icon,.invalid-style .right-icon{color:rgb(var(--mdui-color-error))}:host(:hover) .invalid .right-icon,:host(:hover) .invalid-style .right-icon{color:rgb(var(--mdui-color-on-error-container))}:host([focused-style]) .invalid .right-icon,:host([focused-style]) .invalid-style .right-icon,:host([focused]) .invalid .right-icon,:host([focused]) .invalid-style .right-icon{color:rgb(var(--mdui-color-error))}.action,.icon,.right-icon{font-size:1.5rem}.action mdui-button-icon,.icon mdui-button-icon,.right-icon mdui-button-icon,::slotted(mdui-button-icon[slot]){margin-left:-.5rem;margin-right:-.5rem}.action .i,.icon .i,.right-icon .i,::slotted([slot$=icon]){font-size:inherit}.has-icon .icon{margin-right:1rem}.has-prefix .prefix{padding-right:.125rem}.has-action .action{margin-left:.75rem}.has-suffix .suffix{padding-right:.25rem;padding-left:.125rem}.has-right-icon .right-icon{margin-left:.75rem}.prefix,.suffix{display:none;font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}:host([variant=filled][label]) .prefix,:host([variant=filled][label]) .suffix{padding-top:1rem}.has-value .prefix,.has-value .suffix,:host([focused-style]) .prefix,:host([focused-style]) .suffix,:host([focused]) .prefix,:host([focused]) .suffix{display:flex}.input-container{display:flex;width:100%;height:100%}.label{position:absolute;pointer-events:none;max-width:calc(100% - 1rem);display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;transition:all var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard);top:1rem;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}.invalid .label,.invalid-style .label{color:rgb(var(--mdui-color-error))}:host([variant=outlined]) .label{padding:0 .25rem;margin:0 -.25rem}:host([variant=outlined]:hover) .label{color:rgb(var(--mdui-color-on-surface))}:host([variant=filled]:hover) .invalid .label,:host([variant=filled]:hover) .invalid-style .label,:host([variant=outlined]:hover) .invalid .label,:host([variant=outlined]:hover) .invalid-style .label{color:rgb(var(--mdui-color-on-error-container))}:host([variant=filled][focused-style]) .label,:host([variant=filled][focused]) .label,:host([variant=outlined][focused-style]) .label,:host([variant=outlined][focused]) .label{color:rgb(var(--mdui-color-primary))}:host([variant=filled]) .has-value .label,:host([variant=filled][focused-style]) .label,:host([variant=filled][focused]) .label,:host([variant=filled][type=date]) .label,:host([variant=filled][type=datetime-local]) .label,:host([variant=filled][type=month]) .label,:host([variant=filled][type=time]) .label,:host([variant=filled][type=week]) .label{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height);top:.25rem}:host([variant=outlined]) .has-value .label,:host([variant=outlined][focused-style]) .label,:host([variant=outlined][focused]) .label,:host([variant=outlined][type=date]) .label,:host([variant=outlined][type=datetime-local]) .label,:host([variant=outlined][type=month]) .label,:host([variant=outlined][type=time]) .label,:host([variant=outlined][type=week]) .label{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height);top:-.5rem;left:.75rem;background-color:rgb(var(--mdui-color-background))}:host([variant=filled][focused-style]) .invalid .label,:host([variant=filled][focused-style]) .invalid-style .label,:host([variant=filled][focused]) .invalid .label,:host([variant=filled][focused]) .invalid-style .label,:host([variant=outlined][focused-style]) .invalid .label,:host([variant=outlined][focused-style]) .invalid-style .label,:host([variant=outlined][focused]) .invalid .label,:host([variant=outlined][focused]) .invalid-style .label{color:rgb(var(--mdui-color-error))}:host([variant=filled][disabled]:not([disabled=false i])) .label,:host([variant=outlined][disabled]:not([disabled=false i])) .label{color:rgba(var(--mdui-color-on-surface),38%)}.input{display:block;width:100%;border:none;outline:0;background:0 0;appearance:none;resize:none;cursor:inherit;font-family:inherit;padding:.875rem .875rem .875rem 0;font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height);color:rgb(var(--mdui-color-on-surface));caret-color:rgb(var(--mdui-color-primary))}.has-action .input,.has-right-icon .input{padding-right:.25rem}.has-suffix .input{padding-right:0}.input.hide-input{opacity:0;height:0;min-height:0;width:0;padding:0!important;overflow:hidden}.input::placeholder{color:rgb(var(--mdui-color-on-surface-variant))}.invalid .input,.invalid-style .input{caret-color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])) .input{color:rgba(var(--mdui-color-on-surface),38%)}:host([end-aligned]:not([end-aligned=false i])) .input{text-align:right}textarea.input{padding-top:0;margin-top:.875rem}:host([variant=filled]) .label+.input{padding-top:1.375rem;padding-bottom:.375rem}:host([variant=filled]) .label+textarea.input{padding-top:0;margin-top:1.375rem}.supporting{display:flex;justify-content:space-between;padding:.25rem 1rem;color:rgb(var(--mdui-color-on-surface-variant))}.supporting.invalid,.supporting.invalid-style{color:rgb(var(--mdui-color-error))}.helper{display:block;opacity:1;transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}:host([disabled]:not([disabled=false i])) .helper{color:rgba(var(--mdui-color-on-surface),38%)}:host([helper-on-focus]:not([helper-on-focus=false i])) .helper{opacity:0}:host([helper-on-focus][focused-style]:not([helper-on-focus=false i])) .helper,:host([helper-on-focus][focused]:not([helper-on-focus=false i])) .helper{opacity:1}.error{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}.counter{flex-wrap:nowrap;padding-left:1rem;font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}::-ms-reveal{display:none}.input[type=number]::-webkit-inner-spin-button,.input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;display:none}.input[type=number]{-moz-appearance:textfield}.input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}`;let Ne=class extends bi(Ke){constructor(){super(...arguments),this.variant="filled",this.type="text",this.name="",this.value="",this.defaultValue="",this.helperOnFocus=!1,this.clearable=!1,this.endAligned=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.autosize=!1,this.counter=!1,this.togglePassword=!1,this.spellcheck=!1,this.invalid=!1,this.invalidStyle=!1,this.focusedStyle=!1,this.isPasswordVisible=!1,this.hasValue=!1,this.error="",this.inputRef=Me(),this.formController=new lr(this),this.hasSlotController=new $t(this,"icon","end-icon","helper","input"),this.readonlyButClearable=!1}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get valueAsNumber(){return this.inputRef.value?.valueAsNumber??parseFloat(this.value)}set valueAsNumber(e){const t=document.createElement("input");t.type="number",t.valueAsNumber=e,this.value=t.value}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}get isFocusedStyle(){return this.focused||this.focusedStyle}get isTextarea(){return this.rows&&this.rows>1||this.autosize}onDisabledChange(){this.inputRef.value.disabled=this.disabled,this.invalid=!this.inputRef.value.checkValidity()}async onValueChange(){if(this.hasValue=!["",null].includes(this.value),this.hasUpdated){await this.updateComplete,this.setTextareaHeight();const e=this.formController.getForm();e&&xt.get(e)?.has(this)?(this.invalid=!1,xt.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}}onRowsChange(){this.setTextareaHeight()}async onMaxRowsChange(){if(!this.autosize)return;this.hasUpdated||await this.updateComplete;const e=oe(this.inputRef.value);e.css("max-height",parseFloat(e.css("line-height"))*(this.maxRows??1)+parseFloat(e.css("padding-top"))+parseFloat(e.css("padding-bottom")))}async onMinRowsChange(){if(!this.autosize)return;this.hasUpdated||await this.updateComplete;const e=oe(this.inputRef.value);e.css("min-height",parseFloat(e.css("line-height"))*(this.minRows??1)+parseFloat(e.css("padding-top"))+parseFloat(e.css("padding-bottom")))}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.setTextareaHeight(),this.observeResize=kr(this.inputRef.value,()=>this.setTextareaHeight())})}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve(),_o(this)}select(){this.inputRef.value.select()}setSelectionRange(e,t,r="none"){this.inputRef.value.setSelectionRange(e,t,r)}setRangeText(e,t,r,n="preserve"){this.inputRef.value.setRangeText(e,t,r,n),this.value!==this.inputRef.value.value&&(this.value=this.inputRef.value.value,this.setTextareaHeight(),this.emit("input"),this.emit("change"))}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),this.focus()),!this.invalid}setCustomValidity(e){this.setCustomValidityInternal(e),_o(this)}render(){const e=!!this.icon||this.hasSlotController.test("icon"),t=!!this.endIcon||this.hasSlotController.test("end-icon"),r=this.invalid||this.invalidStyle,n=this.type==="password"&&this.togglePassword&&!this.disabled,s=this.clearable&&!this.disabled&&(!this.readonly||this.readonlyButClearable)&&(typeof this.value=="number"||this.value.length>0),o=!!this.prefix||this.hasSlotController.test("prefix"),a=!!this.suffix||this.hasSlotController.test("suffix"),c=!!this.helper||this.hasSlotController.test("helper"),l=r&&!!(this.error||this.inputRef.value.validationMessage),d=this.counter&&!!this.maxlength,u=this.hasSlotController.test("input"),p={invalid:this.invalid,"invalid-style":this.invalidStyle},g=bt({container:!0,"has-value":this.hasValue,"has-icon":e,"has-right-icon":t||r,"has-action":s||n,"has-prefix":o,"has-suffix":a,"is-firefox":navigator.userAgent.includes("Firefox"),...p});return Z`<div part="container" class="${g}">${this.renderPrefix()}<div class="input-container">${this.renderLabel()} ${this.isTextarea?this.renderTextArea(u):this.renderInput(u)} ${at(u,()=>Z`<slot name="input" class="input"></slot>`)}</div>${this.renderSuffix()}${this.renderClearButton(s)} ${this.renderTogglePasswordButton(n)} ${this.renderRightIcon(r)}</div>${at(l||c||d,()=>Z`<div part="supporting" class="${bt({supporting:!0,...p})}">${this.renderHelper(l,c)} ${this.renderCounter(d)}</div>`)}`}setCustomValidityInternal(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity(),this.requestUpdate()}onChange(){this.value=this.inputRef.value.value,this.isTextarea&&this.setTextareaHeight(),this.emit("change")}onClear(e){this.value="",this.emit("clear"),this.emit("input"),this.emit("change"),this.focus(),e.stopPropagation()}onInput(e){e.stopPropagation(),this.value=this.inputRef.value.value,this.isTextarea&&this.setTextareaHeight(),this.emit("input")}onInvalid(e){e.preventDefault()}onKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;e.key==="Enter"&&!t&&setTimeout(()=>{e.defaultPrevented||this.formController.submit()})}onTextAreaKeyUp(){if(this.pattern){const e=new RegExp(this.pattern);this.value&&!this.value.match(e)?(this.setCustomValidityInternal(this.getPatternErrorMsg()),q1(this,()=>{this.setCustomValidityInternal(this.getPatternErrorMsg())})):(this.setCustomValidityInternal(""),_o(this))}}onTogglePassword(){this.isPasswordVisible=!this.isPasswordVisible}getPatternErrorMsg(){return F1("Please match the requested format.")}setTextareaHeight(){this.autosize?(this.inputRef.value.style.height="auto",this.inputRef.value.style.height=`${this.inputRef.value.scrollHeight}px`):this.inputRef.value.style.height=void 0}renderLabel(){return this.label?Z`<label part="label" class="label">${this.label}</label>`:Qe}renderPrefix(){return Z`<slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}" class="i"></mdui-icon>`:Qe}</slot><slot name="prefix" part="prefix" class="prefix">${this.prefix}</slot>`}renderSuffix(){return Z`<slot name="suffix" part="suffix" class="suffix">${this.suffix}</slot>`}renderRightIcon(e){return e?Z`<slot name="error-icon" part="error-icon" class="right-icon">${this.errorIcon?Z`<mdui-icon name="${this.errorIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-error class="i"></mdui-icon-error>`}</slot>`:Z`<slot name="end-icon" part="end-icon" class="end-icon right-icon">${this.endIcon?Z`<mdui-icon name="${this.endIcon}" class="i"></mdui-icon>`:Qe}</slot>`}renderClearButton(e){return at(e,()=>Z`<slot name="clear-button" part="clear-button" class="action" @click="${this.onClear}"><mdui-button-icon tabindex="-1"><slot name="clear-icon" part="clear-icon">${this.clearIcon?Z`<mdui-icon name="${this.clearIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-cancel--outlined class="i"></mdui-icon-cancel--outlined>`}</slot></mdui-button-icon></slot>`)}renderTogglePasswordButton(e){return at(e,()=>Z`<slot name="toggle-password-button" part="toggle-password-button" class="action" @click="${this.onTogglePassword}"><mdui-button-icon tabindex="-1">${this.isPasswordVisible?Z`<slot name="show-password-icon" part="show-password-icon">${this.showPasswordIcon?Z`<mdui-icon name="${this.showPasswordIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-visibility-off class="i"></mdui-icon-visibility-off>`}</slot>`:Z`<slot name="hide-password-icon" part="hide-password-icon">${this.hidePasswordIcon?Z`<mdui-icon name="${this.hidePasswordIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-visibility class="i"></mdui-icon-visibility>`}</slot>`}</mdui-button-icon></slot>`)}renderInput(e){return Z`<input ${De(this.inputRef)} part="input" class="input ${bt({"hide-input":e})}" type="${this.type==="password"&&this.isPasswordVisible?"text":this.type}" name="${je(this.name)}" .value="${Sn(this.value)}" placeholder="${je(!this.label||this.isFocusedStyle||this.hasValue?this.placeholder:void 0)}" ?readonly="${this.readonly}" ?disabled="${this.disabled}" ?required="${this.required}" minlength="${je(this.minlength)}" maxlength="${je(this.maxlength)}" min="${je(this.min)}" max="${je(this.max)}" step="${je(this.step)}" autocapitalize="${je(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${this.autocomplete}" autocorrect="${je(this.type==="password"?"off":this.autocorrect)}" spellcheck="${je(this.spellcheck)}" pattern="${je(this.pattern)}" enterkeyhint="${je(this.enterkeyhint)}" inputmode="${je(this.inputmode)}" @change="${this.onChange}" @input="${this.onInput}" @invalid="${this.onInvalid}" @keydown="${this.onKeyDown}">`}renderTextArea(e){return Z`<textarea ${De(this.inputRef)} part="input" class="input ${bt({"hide-input":e})}" name="${je(this.name)}" .value="${Sn(this.value)}" placeholder="${je(!this.label||this.isFocusedStyle||this.hasValue?this.placeholder:void 0)}" ?readonly="${this.readonly}" ?disabled="${this.disabled}" ?required="${this.required}" minlength="${je(this.minlength)}" maxlength="${je(this.maxlength)}" rows="${this.rows??1}" autocapitalize="${je(this.autocapitalize)}" autocorrect="${je(this.autocorrect)}" spellcheck="${je(this.spellcheck)}" enterkeyhint="${je(this.enterkeyhint)}" inputmode="${je(this.inputmode)}" @change="${this.onChange}" @input="${this.onInput}" @invalid="${this.onInvalid}" @keydown="${this.onKeyDown}" @keyup="${this.onTextAreaKeyUp}"></textarea>`}renderHelper(e,t){return e?Z`<div part="error" class="error">${this.error||this.inputRef.value.validationMessage}</div>`:t?Z`<slot name="helper" part="helper" class="helper">${this.helper}</slot>`:Z`<span></span>`}renderCounter(e){return e?Z`<div part="counter" class="counter">${this.value.length}/${this.maxlength}</div>`:Qe}};Ne.styles=[qe,v_];w([L({reflect:!0})],Ne.prototype,"variant",void 0);w([L({reflect:!0})],Ne.prototype,"type",void 0);w([L({reflect:!0})],Ne.prototype,"name",void 0);w([L()],Ne.prototype,"value",void 0);w([Ir()],Ne.prototype,"defaultValue",void 0);w([L({reflect:!0})],Ne.prototype,"label",void 0);w([L({reflect:!0})],Ne.prototype,"placeholder",void 0);w([L({reflect:!0})],Ne.prototype,"helper",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"helper-on-focus"})],Ne.prototype,"helperOnFocus",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ne.prototype,"clearable",void 0);w([L({reflect:!0,attribute:"clear-icon"})],Ne.prototype,"clearIcon",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"end-aligned"})],Ne.prototype,"endAligned",void 0);w([L({reflect:!0})],Ne.prototype,"prefix",void 0);w([L({reflect:!0})],Ne.prototype,"suffix",void 0);w([L({reflect:!0})],Ne.prototype,"icon",void 0);w([L({reflect:!0,attribute:"end-icon"})],Ne.prototype,"endIcon",void 0);w([L({reflect:!0,attribute:"error-icon"})],Ne.prototype,"errorIcon",void 0);w([L({reflect:!0})],Ne.prototype,"form",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ne.prototype,"readonly",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ne.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ne.prototype,"required",void 0);w([L({type:Number,reflect:!0})],Ne.prototype,"rows",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ne.prototype,"autosize",void 0);w([L({type:Number,reflect:!0,attribute:"min-rows"})],Ne.prototype,"minRows",void 0);w([L({type:Number,reflect:!0,attribute:"max-rows"})],Ne.prototype,"maxRows",void 0);w([L({type:Number,reflect:!0})],Ne.prototype,"minlength",void 0);w([L({type:Number,reflect:!0})],Ne.prototype,"maxlength",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ne.prototype,"counter",void 0);w([L({type:Number,reflect:!0})],Ne.prototype,"min",void 0);w([L({type:Number,reflect:!0})],Ne.prototype,"max",void 0);w([L({type:Number,reflect:!0})],Ne.prototype,"step",void 0);w([L({reflect:!0})],Ne.prototype,"pattern",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"toggle-password"})],Ne.prototype,"togglePassword",void 0);w([L({reflect:!0,attribute:"show-password-icon"})],Ne.prototype,"showPasswordIcon",void 0);w([L({reflect:!0,attribute:"hide-password-icon"})],Ne.prototype,"hidePasswordIcon",void 0);w([L({reflect:!0})],Ne.prototype,"autocapitalize",void 0);w([L({reflect:!0})],Ne.prototype,"autocorrect",void 0);w([L({reflect:!0})],Ne.prototype,"autocomplete",void 0);w([L({reflect:!0})],Ne.prototype,"enterkeyhint",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ne.prototype,"spellcheck",void 0);w([L({reflect:!0})],Ne.prototype,"inputmode",void 0);w([Be()],Ne.prototype,"invalid",void 0);w([Be()],Ne.prototype,"invalidStyle",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"focused-style"})],Ne.prototype,"focusedStyle",void 0);w([Be()],Ne.prototype,"isPasswordVisible",void 0);w([Be()],Ne.prototype,"hasValue",void 0);w([Be()],Ne.prototype,"error",void 0);w([Re("disabled",!0)],Ne.prototype,"onDisabledChange",null);w([Re("value")],Ne.prototype,"onValueChange",null);w([Re("rows",!0)],Ne.prototype,"onRowsChange",null);w([Re("maxRows")],Ne.prototype,"onMaxRowsChange",null);w([Re("minRows")],Ne.prototype,"onMinRowsChange",null);Ne=w([Ae("mdui-text-field")],Ne);const w_=$e`:host{display:inline-block;width:100%}.hidden-input{display:none}.text-field{cursor:pointer}.chips{display:flex;flex-wrap:wrap;margin:-.5rem -.25rem;min-height:2.5rem}:host([variant=filled][label]) .chips{margin:0 -.25rem -1rem -.25rem}.chip{margin:.25rem}mdui-menu{max-width:none}`;let ot=class extends bi(Ke){constructor(){super(...arguments),this.variant="filled",this.multiple=!1,this.name="",this.value="",this.defaultValue="",this.clearable=!1,this.placement="auto",this.endAligned=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.invalid=!1,this.menuRef=Me(),this.textFieldRef=Me(),this.hiddenInputRef=Me(),this.formController=new lr(this),this.hasSlotController=new $t(this,"icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"),this.definedController=new At(this,{relatedElements:["mdui-menu-item"]})}get validity(){return this.hiddenInputRef.value.validity}get validationMessage(){return this.hiddenInputRef.value.validationMessage}get focusElement(){return this.textFieldRef.value}get focusDisabled(){return this.disabled}connectedCallback(){super.connectedCallback(),this.value=this.multiple&&wt(this.value)?this.value?[this.value]:[]:this.value,this.defaultValue=this.multiple?[]:"",this.definedController.whenDefined().then(()=>{this.requestUpdate()}),this.updateComplete.then(()=>{this.observeResize=kr(this.textFieldRef.value,()=>this.resizeMenu())})}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve()}checkValidity(){const e=this.hiddenInputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.hiddenInputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),this.focus()),!this.invalid}setCustomValidity(e){this.hiddenInputRef.value.setCustomValidity(e),this.invalid=!this.hiddenInputRef.value.checkValidity()}render(){const e=this.multiple?!!this.value.length:!!this.value;return Z`${this.multiple?Z`<select ${De(this.hiddenInputRef)} class="hidden-input" name="${je(this.name)}" value="${je(this.value)}" .required="${this.required}" .disabled="${this.disabled}" multiple="multiple" tabindex="-1">${hn(this.value,t=>Z`<option selected="selected" value="${t}"></option>`)}</select>`:Z`<input ${De(this.hiddenInputRef)} type="radio" class="hidden-input" name="${je(this.name)}" value="${je(this.value)}" .required="${this.required}" .disabled="${this.disabled}" .checked="${e}" tabindex="-1">`}<mdui-dropdown .stayOpenOnClick="${this.multiple}" .disabled="${this.readonly||this.disabled}" .placement="${this.placement==="top"?"top-start":this.placement==="bottom"?"bottom-start":"auto"}" @open="${this.onDropdownOpen}" @close="${this.onDropdownClose}"><mdui-text-field ${De(this.textFieldRef)} slot="trigger" part="text-field" class="text-field" exportparts="${["container","icon","end-icon","error-icon","prefix","suffix","label","input","clear-button","clear-icon","supporting","helper","error"].map(t=>`${t}:text-field__${t}`).join(",")}" readonly="readonly" .readonlyButClearable="${!0}" .variant="${this.variant}" .name="${this.name}" .value="${this.multiple?this.value.length?" ":"":this.getMenuItemLabelByValue(this.value)}" .label="${this.label}" .placeholder="${this.placeholder}" .helper="${this.helper}" .error="${this.hiddenInputRef.value?.validationMessage}" .clearable="${this.clearable}" .clearIcon="${this.clearIcon}" .endAligned="${this.endAligned}" .prefix="${this.prefix}" .suffix="${this.suffix}" .icon="${this.icon}" .endIcon="${this.endIcon}" .errorIcon="${this.errorIcon}" .form="${this.form}" .disabled="${this.disabled}" .required="${this.required}" .invalidStyle="${this.invalid}" @clear="${this.onClear}" @change="${t=>t.stopPropagation()}" @keydown="${this.onTextFieldKeyDown}">${hn(["icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"],t=>this.hasSlotController.test(t)?Z`<slot name="${t}" slot="${t}"></slot>`:it)} ${at(this.multiple&&this.value.length,()=>Z`<div slot="input" class="chips" part="chips">${hn(this.value,t=>Z`<mdui-chip class="chip" part="chip" exportparts="${["button","label","delete-icon"].map(r=>`${r}:chip__${r}`).join(",")}" variant="input" deletable tabindex="-1" @delete="${()=>this.onDeleteOneValue(t)}">${this.getMenuItemLabelByValue(t)}</mdui-chip>`)}</div>`)}</mdui-text-field><mdui-menu ${De(this.menuRef)} part="menu" .selects="${this.multiple?"multiple":"single"}" .value="${this.value}" @change="${this.onValueChange}"><slot></slot></mdui-menu></mdui-dropdown>`}getMenuItemLabelByValue(e){return this.menuItems.length&&this.menuItems.find(t=>t.value===e)?.textContent?.trim()||e}resizeMenu(){this.menuRef.value.style.width=`${this.textFieldRef.value.clientWidth}px`}async onDropdownOpen(){this.textFieldRef.value.focusedStyle=!0}onDropdownClose(){this.textFieldRef.value.focusedStyle=!1,(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&setTimeout(()=>{this.focus()})}async onValueChange(e){const t=e.target;this.value=this.multiple?t.value.map(n=>n??""):t.value??"",await this.updateComplete;const r=this.formController.getForm();r&&xt.get(r)?.has(this)?(this.invalid=!1,xt.get(r).delete(this)):this.invalid=!this.hiddenInputRef.value.checkValidity()}onDeleteOneValue(e){const t=[...this.value];t.includes(e)&&t.splice(t.indexOf(e),1),this.value=t}onClear(){this.value=this.multiple?[]:""}onTextFieldKeyDown(e){e.key==="Enter"&&(e.preventDefault(),this.textFieldRef.value.click())}};ot.styles=[qe,w_];w([L({reflect:!0})],ot.prototype,"variant",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ot.prototype,"multiple",void 0);w([L({reflect:!0})],ot.prototype,"name",void 0);w([L()],ot.prototype,"value",void 0);w([Ir()],ot.prototype,"defaultValue",void 0);w([L({reflect:!0})],ot.prototype,"label",void 0);w([L({reflect:!0})],ot.prototype,"placeholder",void 0);w([L({reflect:!0})],ot.prototype,"helper",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ot.prototype,"clearable",void 0);w([L({reflect:!0,attribute:"clear-icon"})],ot.prototype,"clearIcon",void 0);w([L({reflect:!0})],ot.prototype,"placement",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"end-aligned"})],ot.prototype,"endAligned",void 0);w([L({reflect:!0})],ot.prototype,"prefix",void 0);w([L({reflect:!0})],ot.prototype,"suffix",void 0);w([L({reflect:!0})],ot.prototype,"icon",void 0);w([L({reflect:!0,attribute:"end-icon"})],ot.prototype,"endIcon",void 0);w([L({reflect:!0,attribute:"error-icon"})],ot.prototype,"errorIcon",void 0);w([L({reflect:!0})],ot.prototype,"form",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ot.prototype,"readonly",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ot.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ot.prototype,"required",void 0);w([Be()],ot.prototype,"invalid",void 0);w([gi({flatten:!0,selector:"mdui-menu-item"})],ot.prototype,"menuItems",void 0);ot=w([Ae("mdui-select")],ot);const __=$e`.track-active{left:-.125rem;border-radius:var(--mdui-shape-corner-full) 0 0 var(--mdui-shape-corner-full)}`;let Tn=class extends Pt{constructor(){super(...arguments),this.value=0,this.defaultValue=0,this.rippleRef=Me(),this.handleRef=Me(),this.formController=new lr(this)}get rippleElement(){return this.rippleRef.value}async onValueChange(){this.value=this.fixValue(this.value);const e=this.formController.getForm();e&&xt.get(e)?.has(this)?(this.invalid=!1,xt.get(e).delete(this)):(await this.updateComplete,this.invalid=!this.inputRef.value.checkValidity()),this.updateStyle()}connectedCallback(){super.connectedCallback(),this.value=this.fixValue(this.value)}firstUpdated(e){super.firstUpdated(e);const t=()=>{this.disabled||(this.labelVisible=!0)},r=()=>{this.disabled||(this.labelVisible=!1)};this.addEventListener("touchstart",t),this.addEventListener("mousedown",t),this.addEventListener("touchend",r),this.addEventListener("mouseup",r),this.updateStyle()}render(){return Z`<label class="${bt({invalid:this.invalid})}"><input ${De(this.inputRef)} type="range" step="${this.step}" min="${this.min}" max="${this.max}" ?disabled="${this.disabled}" .value="${Sn(this.value.toString())}" @input="${this.onInput}" @change="${this.onChange}"><div part="track-inactive" class="track-inactive"></div><div ${De(this.trackActiveRef)} part="track-active" class="track-active"></div><div ${De(this.handleRef)} part="handle" class="handle"><div class="elevation"></div><mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.renderLabel(this.value)}</div>${at(this.tickmarks,()=>hn(this.getCandidateValues(),e=>Z`<div part="tickmark" class="tickmark ${bt({active:e<this.value})}" style="${jr({left:`${(e-this.min)/this.max*100}%`,display:e===this.value?"none":"block"})}"></div>`))}</label>`}updateStyle(){const e=(this.value-this.min)/(this.max-this.min)*100;this.trackActiveRef.value.style.width=`${e}%`,this.handleRef.value.style.left=`${e}%`}onInput(){this.value=parseFloat(this.inputRef.value.value),this.updateStyle()}};Tn.styles=[Pt.styles,__];w([L({type:Number})],Tn.prototype,"value",void 0);w([Ir()],Tn.prototype,"defaultValue",void 0);w([Re("value",!0)],Tn.prototype,"onValueChange",null);Tn=w([Ae("mdui-slider")],Tn);const x_=$e`:host{--shape-corner:var(--mdui-shape-corner-extra-small);--z-index:2400;position:fixed;z-index:var(--z-index);display:none;align-items:center;flex-wrap:wrap;border-radius:var(--shape-corner);transform:scaleY(0);transition:transform 0s var(--mdui-motion-easing-linear) var(--mdui-motion-duration-short4);min-width:20rem;max-width:36rem;padding:.25rem 0;box-shadow:var(--mdui-elevation-level3);background-color:rgb(var(--mdui-color-inverse-surface));color:rgb(var(--mdui-color-inverse-on-surface));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([placement^=top]){transform-origin:top}:host([placement^=bottom]){transform-origin:bottom}:host([placement=bottom-start]:not([mobile])),:host([placement=top-start]:not([mobile])){left:1rem}:host([placement=bottom-end]:not([mobile])),:host([placement=top-end]:not([mobile])){right:1rem}:host([placement=bottom]:not([mobile])),:host([placement=top]:not([mobile])){left:50%;transform:scaleY(0) translateX(-50%)}:host([mobile]){min-width:0;left:1rem;right:1rem}:host([open]){transform:scaleY(1);transition:top var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard),bottom var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard),transform var(--mdui-motion-duration-medium4) var(--mdui-motion-easing-emphasized-decelerate)}:host([placement=bottom][open]:not([mobile])),:host([placement=top][open]:not([mobile])){transform:scaleY(1) translateX(-50%)}.message{display:block;margin:.625rem 1rem}:host([message-line='1']) .message{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([message-line='2']) .message{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.action-group{display:flex;align-items:center;margin-left:auto;padding-right:.5rem}.action,.close-button{display:inline-flex;align-items:center;justify-content:center}.action{color:rgb(var(--mdui-color-inverse-primary));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking)}.action mdui-button,::slotted(mdui-button[slot=action][variant=outlined]),::slotted(mdui-button[slot=action][variant=text]){color:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;--mdui-comp-ripple-state-layer-color:var(--mdui-color-inverse-primary)}.action mdui-button::part(button){padding:0 .5rem}.close-button{margin:0 -.25rem 0 .25rem;font-size:1.5rem;color:rgb(var(--mdui-color-inverse-on-surface))}.close-button mdui-button-icon,::slotted(mdui-button-icon[slot=close-button][variant=outlined]),::slotted(mdui-button-icon[slot=close-button][variant=standard]){font-size:inherit;color:inherit;--mdui-comp-ripple-state-layer-color:var(--mdui-color-inverse-on-surface)}.close-button .i,::slotted([slot=close-icon]){font-size:inherit}`,Oi=[];let Xl=!1,Gt=class extends Ke{constructor(){super(),this.open=!1,this.placement="bottom",this.actionLoading=!1,this.closeable=!1,this.autoCloseDelay=5e3,this.closeOnOutsideClick=!1,this.mobile=!1,this.onDocumentClick=this.onDocumentClick.bind(this)}async onOpenChange(){const e=ti(this,"linear"),t=Array.from(this.renderRoot.querySelectorAll(".message, .action-group"));if(this.open){const r=this.hasUpdated;if(r||await this.updateComplete,r&&!this.emit("open",{cancelable:!0}))return;window.clearTimeout(this.closeTimeout),this.autoCloseDelay&&(this.closeTimeout=window.setTimeout(()=>{this.open=!1},this.autoCloseDelay)),this.style.display="flex",await Promise.all([Zt(this),...t.map(s=>Zt(s))]),Oi.push({height:this.clientHeight,snackbar:this}),await this.reorderStack(this);const n=$i(this,"medium4");await Promise.all([st(this,[{opacity:0},{opacity:1,offset:.5},{opacity:1}],{duration:r?n:0,easing:e,fill:"forwards"}),...t.map(s=>st(s,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:r?n:0,easing:e}))]),r&&this.emit("opened");return}if(!this.open&&this.hasUpdated){if(!this.emit("close",{cancelable:!0}))return;window.clearTimeout(this.closeTimeout),await Promise.all([Zt(this),...t.map(o=>Zt(o))]);const n=$i(this,"short4");await Promise.all([st(this,[{opacity:1},{opacity:0}],{duration:n,easing:e,fill:"forwards"}),...t.map(o=>st(o,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:n,easing:e}))]),this.style.display="none",this.emit("closed");const s=Oi.findIndex(o=>o.snackbar===this);Oi.splice(s,1),Oi[s]&&await this.reorderStack(Oi[s].snackbar);return}}async onStackChange(){await this.reorderStack(this)}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.onDocumentClick),this.mobile=xc().down("sm"),this.observeResize=kr(document.documentElement,async()=>{const e=xc().down("sm");this.mobile!==e&&(this.mobile=e,Xl||(Xl=!0,await this.reorderStack(),Xl=!1))})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),window.clearTimeout(this.closeTimeout),this.open&&(this.open=!1),this.observeResize?.unobserve()}render(){return Z`<slot part="message" class="message"></slot><div class="action-group"><slot name="action" part="action" class="action" @click="${this.onActionClick}">${this.action?Z`<mdui-button variant="text" loading="${this.actionLoading}">${this.action}</mdui-button>`:Qe}</slot>${at(this.closeable,()=>Z`<slot name="close-button" part="close-button" class="close-button" @click="${this.onCloseClick}"><mdui-button-icon><slot name="close-icon" part="close-icon">${this.closeIcon?Z`<mdui-icon name="${this.closeIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-clear class="i"></mdui-icon-clear>`}</slot></mdui-button-icon></slot>`)}</div>`}async reorderStack(e){const t=e?Oi.findIndex(r=>r.snackbar===e):0;for(let r=t;r<Oi.length;r++){const s=Oi[r].snackbar;this.mobile?["top","bottom"].forEach(o=>{if(s.placement.startsWith(o)){const a=Oi.filter((l,d)=>d<r&&l.snackbar.placement.startsWith(o)),c=a.reduce((l,d)=>l+d.height,0);s.style[o]=`calc(${c}px + ${a.length+1}rem)`,s.style[o==="top"?"bottom":"top"]="auto"}}):["top","top-start","top-end","bottom","bottom-start","bottom-end"].forEach(o=>{if(s.placement===o){const a=Oi.filter((l,d)=>d<r&&l.snackbar.placement===o),c=a.reduce((l,d)=>l+d.height,0);s.style[o.startsWith("top")?"top":"bottom"]=`calc(${c}px + ${a.length+1}rem)`,s.style[o.startsWith("top")?"bottom":"top"]="auto"}})}}onDocumentClick(e){if(!this.open||!this.closeOnOutsideClick)return;const t=e.target;!this.contains(t)&&this!==t&&(this.open=!1)}onActionClick(e){e.stopPropagation(),this.emit("action-click")}onCloseClick(){this.open=!1}};Gt.styles=[qe,x_];w([L({type:Boolean,reflect:!0,converter:we})],Gt.prototype,"open",void 0);w([L({reflect:!0})],Gt.prototype,"placement",void 0);w([L({reflect:!0,attribute:"action"})],Gt.prototype,"action",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"action-loading"})],Gt.prototype,"actionLoading",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Gt.prototype,"closeable",void 0);w([L({reflect:!0,attribute:"close-icon"})],Gt.prototype,"closeIcon",void 0);w([L({type:Number,reflect:!0,attribute:"message-line"})],Gt.prototype,"messageLine",void 0);w([L({type:Number,reflect:!0,attribute:"auto-close-delay"})],Gt.prototype,"autoCloseDelay",void 0);w([L({type:Boolean,reflect:!0,attribute:"close-on-outside-click",converter:we})],Gt.prototype,"closeOnOutsideClick",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Gt.prototype,"mobile",void 0);w([Re("open")],Gt.prototype,"onOpenChange",null);w([Re("placement",!0),Re("messageLine",!0)],Gt.prototype,"onStackChange",null);Gt=w([Ae("mdui-snackbar")],Gt);const E_=$e`:host{--shape-corner:var(--mdui-shape-corner-full);--shape-corner-thumb:var(--mdui-shape-corner-full);position:relative;display:inline-block;cursor:pointer;-webkit-tap-highlight-color:transparent;height:2.5rem}:host([disabled]:not([disabled=false i])){cursor:default;pointer-events:none}label{display:inline-flex;align-items:center;width:100%;height:100%;white-space:nowrap;cursor:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none}.track{position:relative;display:flex;align-items:center;border-radius:var(--shape-corner);transition-property:background-color,border-width;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard);height:2rem;width:3.25rem;border:.125rem solid rgb(var(--mdui-color-outline));background-color:rgb(var(--mdui-color-surface-container-highest))}:host([checked]:not([checked=false i])) .track{background-color:rgb(var(--mdui-color-primary));border-width:0}.invalid .track{background-color:rgb(var(--mdui-color-error-container));border-color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])) .track{background-color:rgba(var(--mdui-color-surface-container-highest),.12);border-color:rgba(var(--mdui-color-on-surface),.12)}:host([disabled][checked]:not([disabled=false i],[checked=false i])) .track{background-color:rgba(var(--mdui-color-on-surface),.12)}input{position:absolute;padding:0;opacity:0;pointer-events:none;width:1.25rem;height:1.25rem;margin:0 0 0 .625rem}mdui-ripple{border-radius:50%;transition-property:left,top;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard);width:2.5rem;height:2.5rem}.thumb{position:absolute;display:flex;align-items:center;justify-content:center;border-radius:var(--shape-corner-thumb);transition-property:width,height,left,background-color;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard);height:1rem;width:1rem;left:.375rem;background-color:rgb(var(--mdui-color-outline));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.thumb mdui-ripple{left:-.75rem;top:-.75rem}.has-unchecked-icon .thumb{height:1.5rem;width:1.5rem;left:.125rem}.has-unchecked-icon .thumb mdui-ripple{left:-.5rem;top:-.5rem}:host([focus-visible]) .thumb,:host([hover]) .thumb,:host([pressed]) .thumb{background-color:rgb(var(--mdui-color-on-surface-variant))}:host([checked]:not([checked=false i])) .thumb{height:1.5rem;width:1.5rem;left:1.5rem;background-color:rgb(var(--mdui-color-on-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([checked]:not([checked=false i])) .thumb mdui-ripple{left:-.5rem;top:-.5rem}:host([pressed]) .thumb{height:1.75rem;width:1.75rem;left:0}:host([pressed]) .thumb mdui-ripple{left:-.375rem;top:-.375rem}:host([pressed][checked]:not([checked=false i])) .thumb{left:1.375rem}:host([focus-visible][checked]:not([checked=false i])) .thumb,:host([hover][checked]:not([checked=false i])) .thumb,:host([pressed][checked]:not([checked=false i])) .thumb{background-color:rgb(var(--mdui-color-primary-container))}.invalid .thumb{background-color:rgb(var(--mdui-color-error));--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}:host([focus-visible]) .invalid .thumb,:host([hover]) .invalid .thumb,:host([pressed]) .invalid .thumb{background-color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])) .thumb{background-color:rgba(var(--mdui-color-on-surface),.38)}:host([disabled][checked]:not([disabled=false i],[checked=false i])) .thumb{background-color:rgb(var(--mdui-color-surface))}.checked-icon,.unchecked-icon{display:flex;position:absolute;transition-property:opacity,transform;font-size:1rem}.unchecked-icon{opacity:1;transform:scale(1);transition-delay:var(--mdui-motion-duration-short1);transition-duration:var(--mdui-motion-duration-short3);transition-timing-function:var(--mdui-motion-easing-linear);color:rgb(var(--mdui-color-surface-container-highest))}:host([checked]:not([checked=false i])) .unchecked-icon{opacity:0;transform:scale(.92);transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1)}:host([disabled]:not([disabled=false i])) .unchecked-icon{color:rgba(var(--mdui-color-surface-container-highest),.38)}.checked-icon{opacity:0;transform:scale(.92);transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1);transition-timing-function:var(--mdui-motion-easing-linear);color:rgb(var(--mdui-color-on-primary-container))}:host([checked]:not([checked=false i])) .checked-icon{opacity:1;transform:scale(1);transition-delay:var(--mdui-motion-duration-short1);transition-duration:var(--mdui-motion-duration-short3)}.invalid .checked-icon{color:rgb(var(--mdui-color-error-container))}:host([disabled]:not([disabled=false i])) .checked-icon{color:rgba(var(--mdui-color-on-surface),.38)}.checked-icon .i,.unchecked-icon .i,::slotted([slot=checked-icon]),::slotted([slot=unchecked-icon]){font-size:inherit;color:inherit}`;let Kt=class extends Di(bi(Ke)){constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.required=!1,this.name="",this.value="on",this.invalid=!1,this.rippleRef=Me(),this.inputRef=Me(),this.formController=new lr(this,{value:e=>e.checked?e.value:void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t}),this.hasSlotController=new $t(this,"unchecked-icon")}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}async onDisabledChange(){await this.updateComplete,this.invalid=!this.inputRef.value.checkValidity()}async onCheckedChange(){await this.updateComplete;const e=this.formController.getForm();e&&xt.get(e)?.has(this)?(this.invalid=!1,xt.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.blur(),this.focus())),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return Z`<label class="${bt({invalid:this.invalid,"has-unchecked-icon":this.uncheckedIcon||this.hasSlotController.test("unchecked-icon")})}"><input ${De(this.inputRef)} type="checkbox" name="${je(this.name)}" value="${je(this.value)}" .disabled="${this.disabled}" .checked="${Sn(this.checked)}" .required="${this.required}" @change="${this.onChange}"><div part="track" class="track"><div part="thumb" class="thumb"><mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple><slot name="checked-icon" part="checked-icon" class="checked-icon">${this.checkedIcon?Z`<mdui-icon name="${this.checkedIcon}" class="i"></mdui-icon>`:this.checkedIcon===""?Qe:Z`<mdui-icon-check class="i"></mdui-icon-check>`}</slot><slot name="unchecked-icon" part="unchecked-icon" class="unchecked-icon">${this.uncheckedIcon?Z`<mdui-icon name="${this.uncheckedIcon}" class="i"></mdui-icon>`:Qe}</slot></div></div></label>`}onChange(){this.checked=this.inputRef.value.checked,this.emit("change")}};Kt.styles=[qe,E_];w([L({type:Boolean,reflect:!0,converter:we})],Kt.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Kt.prototype,"checked",void 0);w([Ir("checked")],Kt.prototype,"defaultChecked",void 0);w([L({reflect:!0,attribute:"unchecked-icon"})],Kt.prototype,"uncheckedIcon",void 0);w([L({reflect:!0,attribute:"checked-icon"})],Kt.prototype,"checkedIcon",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Kt.prototype,"required",void 0);w([L({reflect:!0})],Kt.prototype,"form",void 0);w([L({reflect:!0})],Kt.prototype,"name",void 0);w([L({reflect:!0})],Kt.prototype,"value",void 0);w([Be()],Kt.prototype,"invalid",void 0);w([Re("disabled",!0),Re("required",!0)],Kt.prototype,"onDisabledChange",null);w([Re("checked",!0)],Kt.prototype,"onCheckedChange",null);Kt=w([Ae("mdui-switch")],Kt);const S_=$e`:host{position:relative;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([active]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}.container{display:flex;justify-content:center;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;height:100%}.preset{flex-direction:column;min-height:3rem;padding:.625rem 1rem}:host([inline]:not([inline=false i])) .preset{flex-direction:row}.icon-container,.label-container{position:relative;display:flex;align-items:center;justify-content:center}.icon-container ::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}.icon-container ::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}.label-container ::slotted([slot=badge]){position:absolute;left:100%;bottom:100%;transform:translate(-.75rem,.625rem)}.label-container ::slotted([slot=badge][variant=small]){transform:translate(-.375rem,.375rem)}.icon,.label{display:flex;color:rgb(var(--mdui-color-on-surface-variant))}:host([focused]) .icon,:host([focused]) .label,:host([hover]) .icon,:host([hover]) .label,:host([pressed]) .icon,:host([pressed]) .label{color:rgb(var(--mdui-color-on-surface))}:host([active]) .icon,:host([active]) .label{color:rgb(var(--mdui-color-primary))}:host([active]) .variant-secondary .icon,:host([active]) .variant-secondary .label{color:rgb(var(--mdui-color-on-surface))}.icon{font-size:1.5rem}.label{font-size:var(--mdui-typescale-title-small-size);font-weight:var(--mdui-typescale-title-small-weight);letter-spacing:var(--mdui-typescale-title-small-tracking);line-height:var(--mdui-typescale-title-small-line-height)}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit;color:inherit}`;let wr=class extends Di(bi(Ke)){constructor(){super(...arguments),this.inline=!1,this.active=!1,this.variant="primary",this.key=Sr(),this.rippleRef=Me(),this.hasSlotController=new $t(this,"icon","custom")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return!1}get focusElement(){return this}get focusDisabled(){return!1}render(){const e=this.icon||this.hasSlotController.test("icon"),t=this.hasSlotController.test("custom"),r=()=>Z`<slot name="badge"></slot>`;return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple><div part="container" class="${bt({container:!0,preset:!t,"variant-secondary":this.variant==="secondary"})}"><slot name="custom"><div class="icon-container">${at(e||this.icon,r)}<slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}"></mdui-icon>`:Qe}</slot></div><div class="label-container">${at(!e,r)}<slot part="label" class="label"></slot></div></slot></div>`}};wr.styles=[qe,S_];w([L({reflect:!0})],wr.prototype,"value",void 0);w([L({reflect:!0})],wr.prototype,"icon",void 0);w([L({type:Boolean,reflect:!0,converter:we})],wr.prototype,"inline",void 0);w([L({type:Boolean,reflect:!0,converter:we})],wr.prototype,"active",void 0);w([Be()],wr.prototype,"variant",void 0);wr=w([Ae("mdui-tab")],wr);const k_=$e`:host{display:block;overflow-y:auto;flex:1 1 auto}:host(:not([active])){display:none}`;let Os=class extends Ke{constructor(){super(...arguments),this.active=!1}render(){return Z`<slot></slot>`}};Os.styles=[qe,k_];w([L({reflect:!0})],Os.prototype,"value",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Os.prototype,"active",void 0);Os=w([Ae("mdui-tab-panel")],Os);const R_=$e`:host{position:relative;display:flex}:host([placement^=top]){flex-direction:column}:host([placement^=bottom]){flex-direction:column-reverse}:host([placement^=left]){flex-direction:row}:host([placement^=right]){flex-direction:row-reverse}.container{position:relative;display:flex;flex:0 0 auto;overflow-x:auto;background-color:rgb(var(--mdui-color-surface))}:host([placement^=bottom]) .container,:host([placement^=top]) .container{flex-direction:row}:host([placement^=left]) .container,:host([placement^=right]) .container{flex-direction:column}:host([placement$='-start']) .container{justify-content:flex-start}:host([placement=bottom]) .container,:host([placement=left]) .container,:host([placement=right]) .container,:host([placement=top]) .container{justify-content:center}:host([placement$='-end']) .container{justify-content:flex-end}.container::after{content:' ';position:absolute;background-color:rgb(var(--mdui-color-surface-variant))}:host([placement^=bottom]) .container::after,:host([placement^=top]) .container::after{left:0;width:100%;height:.0625rem}:host([placement^=top]) .container::after{bottom:0}:host([placement^=bottom]) .container::after{top:0}:host([placement^=left]) .container::after,:host([placement^=right]) .container::after{top:0;height:100%;width:.0625rem}:host([placement^=left]) .container::after{right:0}:host([placement^=right]) .container::after{left:0}.indicator{position:absolute;z-index:1;background-color:rgb(var(--mdui-color-primary))}.container:not(.initial) .indicator{transition-duration:var(--mdui-motion-duration-medium2);transition-timing-function:var(--mdui-motion-easing-standard-decelerate)}:host([placement^=bottom]) .indicator,:host([placement^=top]) .indicator{transition-property:transform,left,width}:host([placement^=left]) .indicator,:host([placement^=right]) .indicator{transition-property:transform,top,height}:host([placement^=top]) .indicator{bottom:0}:host([placement^=bottom]) .indicator{top:0}:host([placement^=left]) .indicator{right:0}:host([placement^=right]) .indicator{left:0}:host([placement^=bottom][variant=primary]) .indicator,:host([placement^=top][variant=primary]) .indicator{height:.1875rem}:host([placement^=bottom][variant=secondary]) .indicator,:host([placement^=top][variant=secondary]) .indicator{height:.125rem}:host([placement^=left][variant=primary]) .indicator,:host([placement^=right][variant=primary]) .indicator{width:.1875rem}:host([placement^=left][variant=secondary]) .indicator,:host([placement^=right][variant=secondary]) .indicator{width:.125rem}:host([placement^=top][variant=primary]) .indicator{border-top-left-radius:.1875rem;border-top-right-radius:.1875rem}:host([placement^=bottom][variant=primary]) .indicator{border-bottom-right-radius:.1875rem;border-bottom-left-radius:.1875rem}:host([placement^=left][variant=primary]) .indicator{border-top-left-radius:.1875rem;border-bottom-left-radius:.1875rem}:host([placement^=right][variant=primary]) .indicator{border-top-right-radius:.1875rem;border-bottom-right-radius:.1875rem}:host([full-width]:not([full-width=false i])) ::slotted(mdui-tab){flex:1}`;let si=class extends Ke{constructor(){super(...arguments),this.variant="primary",this.placement="top-start",this.fullWidth=!1,this.activeKey=0,this.isInitial=!0,this.containerRef=Me(),this.indicatorRef=Me(),this.definedController=new At(this,{relatedElements:["mdui-tab","mdui-tab-panel"]})}async onActiveKeyChange(){await this.definedController.whenDefined(),this.value=this.tabs.find(e=>e.key===this.activeKey)?.value,this.updateActive(),this.isInitial||this.emit("change")}async onValueChange(){this.isInitial=!this.hasUpdated,await this.definedController.whenDefined();const e=this.tabs.find(t=>t.value===this.value);this.activeKey=e?.key??0}async onIndicatorChange(){await this.updateComplete,this.updateIndicator()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.observeResize=kr(this.containerRef.value,()=>this.updateIndicator())})}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve()}render(){return Z`<div ${De(this.containerRef)} part="container" class="container ${bt({initial:this.isInitial})}"><slot @slotchange="${this.onSlotChange}" @click="${this.onClick}"></slot><div ${De(this.indicatorRef)} part="indicator" class="indicator"></div></div><slot name="panel" @slotchange="${this.onSlotChange}"></slot>`}async onSlotChange(){await this.definedController.whenDefined(),this.updateActive()}async onClick(e){if(e.button)return;await this.definedController.whenDefined();const r=e.target.closest("mdui-tab");r&&(this.activeKey=r.key,this.isInitial=!1,this.updateActive())}updateActive(){this.activeTab=this.tabs.map(e=>(e.active=this.activeKey===e.key,e)).find(e=>e.active),this.panels.forEach(e=>e.active=e.value===this.activeTab?.value),this.updateIndicator()}updateIndicator(){const e=this.activeTab,t=oe(this.indicatorRef.value),r=this.placement.startsWith("left")||this.placement.startsWith("right");if(!e){t.css({transform:r?"scaleY(0)":"scaleX(0)"});return}const n=oe(e),s=e.offsetTop,o=e.offsetLeft,a=r?{transform:"scaleY(1)",width:"",left:""}:{transform:"scaleX(1)",height:"",top:""};let c={};if(this.variant==="primary"){const l=n.find(':scope > [slot="custom"]'),d=l.length?l.get():oe(e.renderRoot).find('slot[name="custom"]').children().get();if(r){const u=Math.min(...d.map(g=>g.offsetTop))+s,p=Math.max(...d.map(g=>g.offsetTop+g.offsetHeight))+s;c={top:u,height:p-u}}else{const u=Math.min(...d.map(g=>g.offsetLeft))+o,p=Math.max(...d.map(g=>g.offsetLeft+g.offsetWidth))+o;c={left:u,width:p-u}}}this.variant==="secondary"&&(c=r?{top:s,height:e.offsetHeight}:{left:o,width:e.offsetWidth}),t.css({...a,...c})}};si.styles=[qe,R_];w([L({reflect:!0})],si.prototype,"variant",void 0);w([L({reflect:!0})],si.prototype,"value",void 0);w([L({reflect:!0})],si.prototype,"placement",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"full-width"})],si.prototype,"fullWidth",void 0);w([Be()],si.prototype,"activeKey",void 0);w([Be()],si.prototype,"isInitial",void 0);w([gi({selector:"mdui-tab",flatten:!0})],si.prototype,"tabs",void 0);w([gi({selector:"mdui-tab-panel",slot:"panel",flatten:!0})],si.prototype,"panels",void 0);w([Re("activeKey",!0)],si.prototype,"onActiveKeyChange",null);w([Re("value")],si.prototype,"onValueChange",null);w([Re("variant",!0),Re("placement",!0),Re("fullWidth",!0)],si.prototype,"onIndicatorChange",null);si=w([Ae("mdui-tabs")],si);class I_{constructor(e,t){this.isHover=!1,this.uniqueID=Sr(),this.enterEventName=`mouseenter.${this.uniqueID}.hoverController`,this.leaveEventName=`mouseleave.${this.uniqueID}.hoverController`,this.mouseEnterItems=[],this.mouseLeaveItems=[],(this.host=e).addController(this),this.elementRef=t}hostConnected(){this.host.updateComplete.then(()=>{oe(this.elementRef.value).on(this.enterEventName,()=>{this.isHover=!0;for(let e=this.mouseEnterItems.length-1;e>=0;e--){const t=this.mouseEnterItems[e];t.callback(),t.one&&this.mouseEnterItems.splice(e,1)}}).on(this.leaveEventName,()=>{this.isHover=!1;for(let e=this.mouseLeaveItems.length-1;e>=0;e--){const t=this.mouseLeaveItems[e];t.callback(),t.one&&this.mouseLeaveItems.splice(e,1)}})})}hostDisconnected(){oe(this.elementRef.value).off(this.enterEventName).off(this.leaveEventName)}onMouseEnter(e,t=!1){this.mouseEnterItems.push({callback:e,one:t})}onMouseLeave(e,t=!1){this.mouseLeaveItems.push({callback:e,one:t})}}const T_=$e`:host{--shape-corner-plain:var(--mdui-shape-corner-extra-small);--shape-corner-rich:var(--mdui-shape-corner-medium);--z-index:2500;display:contents}.popup{position:fixed;display:flex;flex-direction:column;z-index:var(--z-index);border-radius:var(--shape-corner-plain);background-color:rgb(var(--mdui-color-inverse-surface));padding:0 .5rem;min-width:1.75rem;max-width:20rem}:host([variant=rich]) .popup{border-radius:var(--shape-corner-rich);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);padding:.75rem 1rem .5rem 1rem}.headline{display:flex;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-title-small-size);font-weight:var(--mdui-typescale-title-small-weight);letter-spacing:var(--mdui-typescale-title-small-tracking);line-height:var(--mdui-typescale-title-small-line-height)}.content{display:flex;padding:.25rem 0;color:rgb(var(--mdui-color-inverse-on-surface));font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}:host([variant=rich]) .content{color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}.action{display:flex;justify-content:flex-start;padding-top:.5rem}.action ::slotted(:not(:last-child)){margin-right:.5rem}`;let oi=class extends Ke{constructor(){super(),this.variant="plain",this.placement="auto",this.openDelay=150,this.closeDelay=150,this.trigger="hover focus",this.disabled=!1,this.open=!1,this.popupRef=Me(),this.hasSlotController=new $t(this,"headline","action"),this.hoverController=new I_(this,this.popupRef),this.definedController=new At(this,{needDomReady:!0}),this.onDocumentClick=this.onDocumentClick.bind(this),this.onWindowScroll=this.onWindowScroll.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this)}get target(){return[...this.children].find(e=>e.tagName.toLowerCase()!=="style"&&e.getAttribute("slot")!=="content")}async onPositionChange(){this.open&&(await this.definedController.whenDefined(),this.updatePositioner())}async onOpenChange(){const e=this.hasUpdated,t=$i(this,"short4"),r=ti(this,"standard");if(this.open){if(await this.definedController.whenDefined(),oe(`mdui-tooltip[variant="${this.variant}"]`).filter((n,s)=>s!==this).prop("open",!1),e||await this.updateComplete,e&&!this.emit("open",{cancelable:!0}))return;await Zt(this.popupRef.value),this.popupRef.value.hidden=!1,this.updatePositioner(),await st(this.popupRef.value,[{transform:"scale(0)"},{transform:"scale(1)"}],{duration:e?t:0,easing:r}),e&&this.emit("opened");return}if(!this.open&&e){if(!this.emit("close",{cancelable:!0}))return;await Zt(this.popupRef.value),await st(this.popupRef.value,[{transform:"scale(1)"},{transform:"scale(0)"}],{duration:t,easing:r}),this.popupRef.value.hidden=!0,this.emit("closed")}}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.onDocumentClick),this.definedController.whenDefined().then(()=>{this.overflowAncestors=Lo(this.target),this.overflowAncestors.forEach(e=>{e.addEventListener("scroll",this.onWindowScroll)}),this.observeResize=kr(this.target,()=>{this.updatePositioner()})})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),this.overflowAncestors?.forEach(e=>{e.removeEventListener("scroll",this.onWindowScroll)}),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.definedController.whenDefined().then(()=>{const t=this.target;t.addEventListener("focus",this.onFocus),t.addEventListener("blur",this.onBlur),t.addEventListener("pointerdown",this.onClick),t.addEventListener("keydown",this.onKeydown),t.addEventListener("mouseenter",this.onMouseEnter),t.addEventListener("mouseleave",this.onMouseLeave)})}render(){const e=this.isRich()&&(this.headline||this.hasSlotController.test("headline")),t=this.isRich()&&this.hasSlotController.test("action");return Z`<slot></slot><div ${De(this.popupRef)} part="popup" class="popup" hidden>${at(e,()=>Z`<slot name="headline" part="headline" class="headline">${this.headline}</slot>`)}<slot name="content" part="content" class="content">${this.content}</slot>${at(t,()=>Z`<slot name="action" part="action" class="action"></slot>`)}</div>`}isRich(){return this.variant==="rich"}requestClose(){if(!this.hoverController.isHover){this.open=!1;return}this.hoverController.onMouseLeave(()=>{this.hasTrigger("hover")?this.hoverTimeout=window.setTimeout(()=>{this.open=!1},this.closeDelay||50):this.open=!1},!0)}hasTrigger(e){return this.trigger.split(" ").includes(e)}onFocus(){this.disabled||this.open||!this.hasTrigger("focus")||(this.open=!0)}onBlur(){this.disabled||!this.open||!this.hasTrigger("focus")||this.requestClose()}onClick(e){this.disabled||e.button||!this.hasTrigger("click")||this.open&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.open=!this.open)}onKeydown(e){this.disabled||!this.open||e.key!=="Escape"||(e.stopPropagation(),this.requestClose())}onMouseEnter(){this.disabled||this.open||!this.hasTrigger("hover")||(this.openDelay?(window.clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>{this.open=!0},this.openDelay)):this.open=!0)}onMouseLeave(){window.clearTimeout(this.hoverTimeout),!(this.disabled||!this.open||!this.hasTrigger("hover"))&&(this.hoverTimeout=window.setTimeout(()=>{this.requestClose()},this.closeDelay||50))}onDocumentClick(e){if(this.disabled||!this.open)return;e.composedPath().includes(this)||this.requestClose()}onWindowScroll(){window.requestAnimationFrame(()=>this.updatePositioner())}updatePositioner(){const e=oe(this.popupRef.value),t=this.isRich()?0:4,r=4,n=this.target.getBoundingClientRect(),s=n.top,o=n.left,a=n.height,c=n.width,l=this.popupRef.value.offsetHeight,d=this.popupRef.value.offsetWidth,u=d+t+r,p=l+t+r;let g,v,_,E,x=this.placement;if(x==="auto"){const h=oe(window),m=s>p,T=h.height()-s-a>p,N=o>u,C=h.width()-o-c>u;this.isRich()?(x="bottom-right",T&&C?x="bottom-right":T&&N?x="bottom-left":m&&C?x="top-right":m&&N?x="top-left":T?x="bottom":m?x="top":C?x="right":N&&(x="left")):(x="top",m?x="top":T?x="bottom":N?x="left":C&&(x="right"))}const[k,y]=x.split("-");switch(k){case"top":v="bottom",_=s-l-t;break;case"bottom":v="top",_=s+a+t;break;default:switch(v="center",y){case"start":_=s;break;case"end":_=s+a-l;break;default:_=s+a/2-l/2;break}break}switch(k){case"left":g="right",E=o-d-t;break;case"right":g="left",E=o+c+t;break;default:switch(g="center",y){case"start":E=o;break;case"end":E=o+c-d;break;case"left":g="right",E=o-d-t;break;case"right":g="left",E=o+c+t;break;default:E=o+c/2-d/2;break}break}e.css({top:_,left:E,transformOrigin:[g,v].join(" ")})}};oi.styles=[qe,T_];w([L({reflect:!0})],oi.prototype,"variant",void 0);w([L({reflect:!0})],oi.prototype,"placement",void 0);w([L({type:Number,reflect:!0,attribute:"open-delay"})],oi.prototype,"openDelay",void 0);w([L({type:Number,reflect:!0,attribute:"close-delay"})],oi.prototype,"closeDelay",void 0);w([L({reflect:!0})],oi.prototype,"headline",void 0);w([L({reflect:!0})],oi.prototype,"content",void 0);w([L({reflect:!0})],oi.prototype,"trigger",void 0);w([L({type:Boolean,reflect:!0,converter:we})],oi.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],oi.prototype,"open",void 0);w([Re("placement",!0),Re("content",!0)],oi.prototype,"onPositionChange",null);w([Re("open")],oi.prototype,"onOpenChange",null);oi=w([Ae("mdui-tooltip")],oi);const C_=i=>{const e=i.assignedNodes({flatten:!0});let t="";return[...e].forEach(r=>{r.nodeType===Node.ELEMENT_NODE&&(t+=r.outerHTML),r.nodeType===Node.TEXT_NODE&&(t+=r.textContent)}),t},$_=$e`:host{display:block;width:100%;flex-shrink:initial!important;overflow:hidden;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-title-large-size);font-weight:var(--mdui-typescale-title-large-weight);letter-spacing:var(--mdui-typescale-title-large-tracking);line-height:var(--mdui-typescale-title-large-line-height);line-height:2.5rem}.label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:1;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear)}.label.variant-center-aligned{text-align:center}.label.variant-large:not(.shrink),.label.variant-medium:not(.shrink){opacity:0}.label.variant-large.shrink,.label.variant-medium.shrink{transition-delay:var(--mdui-motion-duration-short2)}.label-large{display:none;position:absolute;width:100%;left:0;margin-right:0;padding:0 1rem;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear)}.label-large.variant-large,.label-large.variant-medium{display:block}.label-large.variant-medium{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;bottom:.75rem;font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.label-large.variant-large{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;bottom:1.25rem;font-size:var(--mdui-typescale-headline-medium-size);font-weight:var(--mdui-typescale-headline-medium-weight);letter-spacing:var(--mdui-typescale-headline-medium-tracking);line-height:var(--mdui-typescale-headline-medium-line-height)}.label-large.variant-large:not(.shrink),.label-large.variant-medium:not(.shrink){opacity:1;transition-delay:var(--mdui-motion-duration-short2)}.label-large.variant-large.shrink,.label-large.variant-medium.shrink{opacity:0;z-index:-1}`;let Ps=class extends Ke{constructor(){super(...arguments),this.variant="small",this.shrink=!1,this.hasSlotController=new $t(this,"label-large"),this.labelLargeRef=Me(),this.defaultSlotRef=Me()}render(){const e=this.hasSlotController.test("label-large"),t=bt({shrink:this.shrink,"variant-center-aligned":this.variant==="center-aligned","variant-small":this.variant==="small","variant-medium":this.variant==="medium","variant-large":this.variant==="large"});return Z`<slot part="label" class="label ${t}" ${De(this.defaultSlotRef)} @slotchange="${()=>this.onSlotChange(e)}"></slot>${e?Z`<slot name="label-large" part="label-large" class="label-large ${t}"></slot>`:Z`<div ${De(this.labelLargeRef)} part="label-large" class="label-large ${t}"></div>`}`}onSlotChange(e){e||(this.labelLargeRef.value.innerHTML=C_(this.defaultSlotRef.value))}};Ps.styles=[qe,$_];w([Be()],Ps.prototype,"variant",void 0);w([Be()],Ps.prototype,"shrink",void 0);Ps=w([Ae("mdui-top-app-bar-title")],Ps);const A_=$e`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;top:0;right:0;left:0;display:flex;flex:0 0 auto;align-items:flex-start;justify-content:flex-start;border-bottom-left-radius:var(--shape-corner);border-bottom-right-radius:var(--shape-corner);z-index:var(--z-index);transition:top var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),height var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear),background-color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);padding:.75rem .5rem;height:4rem;background-color:rgb(var(--mdui-color-surface))}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([scroll-behavior~=shrink]){transition-duration:var(--mdui-motion-duration-short4)}:host([scrolling]){background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2)}::slotted(mdui-button-icon){color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}::slotted(mdui-button-icon:first-child){color:rgb(var(--mdui-color-on-surface))}::slotted(mdui-avatar){width:1.875rem;height:1.875rem;margin-top:.3125rem;margin-bottom:.3125rem}::slotted(*){flex-shrink:0}::slotted(:not(:last-child)){margin-right:.5rem}:host([variant=medium]){height:7rem}:host([variant=large]){height:9.5rem}:host([hide]:not([hide=false i])){transition-duration:var(--mdui-motion-duration-short4);top:-4.625rem}:host([hide][variant=medium]:not([hide=false i])){top:-7.625rem}:host([hide][variant=large]:not([hide=false i])){top:-10.125rem}:host([shrink][variant=large]:not([shrink=false i])),:host([shrink][variant=medium]:not([shrink=false i])){transition-duration:var(--mdui-motion-duration-short4);height:4rem}`;let Ai=class extends Ed(Rr){constructor(){super(...arguments),this.variant="small",this.hide=!1,this.shrink=!1,this.scrolling=!1,this.definedController=new At(this,{relatedElements:["mdui-top-app-bar-title"]})}get scrollPaddingPosition(){return"top"}get layoutPlacement(){return"top"}async onVariantChange(){this.hasUpdated?this.addEventListener("transitionend",async()=>{await this.scrollBehaviorDefinedController.whenDefined(),this.setContainerPadding("update",this.scrollTarget)},{once:!0}):await this.updateComplete,await this.definedController.whenDefined(),this.titleElements.forEach(e=>{e.variant=this.variant})}async onShrinkChange(){this.hasUpdated||await this.updateComplete,await this.definedController.whenDefined(),this.titleElements.forEach(e=>{e.shrink=this.shrink})}firstUpdated(e){super.firstUpdated(e),this.addEventListener("transitionend",t=>{t.target===this&&this.emit(this.hide?"hidden":"shown")})}render(){return Z`<slot></slot>`}runScrollNoThreshold(e,t){this.hasScrollBehavior("shrink")&&e&&t<8&&(this.shrink=!1)}runScrollThreshold(e,t){this.hasScrollBehavior("elevate")&&(this.scrolling=!!t),this.hasScrollBehavior("shrink")&&(e||(this.shrink=!0)),this.hasScrollBehavior("hide")&&(!e&&!this.hide&&this.emit("hide",{cancelable:!0})&&(this.hide=!0),e&&this.hide&&this.emit("show",{cancelable:!0})&&(this.hide=!1))}};Ai.styles=[qe,A_];w([L({reflect:!0})],Ai.prototype,"variant",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ai.prototype,"hide",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ai.prototype,"shrink",void 0);w([L({reflect:!0,attribute:"scroll-behavior"})],Ai.prototype,"scrollBehavior",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ai.prototype,"scrolling",void 0);w([gi({selector:"mdui-top-app-bar-title",flatten:!0})],Ai.prototype,"titleElements",void 0);w([Re("variant")],Ai.prototype,"onVariantChange",null);w([Re("shrink")],Ai.prototype,"onShrinkChange",null);Ai=w([Ae("mdui-top-app-bar")],Ai);/**
492
+ )}:host([disabled]:not([disabled=false i])),:host([group-disabled]){cursor:default;pointer-events:none;color:rgba(var(--mdui-color-on-surface),38%);border-color:rgba(var(--mdui-color-on-surface),12%)}:host([loading]:not([loading=false i])){cursor:default;pointer-events:none}:host(:not(.mdui-segmented-button-first)){margin-left:-.0625rem}:host(.mdui-segmented-button-first){border-radius:var(--shape-corner) 0 0 var(--shape-corner)}:host(.mdui-segmented-button-last){border-radius:0 var(--shape-corner) var(--shape-corner) 0}.end-icon,.icon,.selected-icon{display:inline-flex;font-size:1.28571429em}.end-icon .i,.icon .i,.selected-icon .i,::slotted([slot=end-icon]),::slotted([slot=icon]),::slotted([slot=selected-icon]){font-size:inherit}mdui-circular-progress{width:1.125rem;height:1.125rem}:host([disabled]:not([disabled=false i])) mdui-circular-progress{opacity:.38}.label{display:inline-flex}.has-icon .label{padding-left:.5rem}.has-end-icon .label{padding-right:.5rem}`;let nr=class extends pt{constructor(){super(...arguments),this.selected=!1,this.invalid=!1,this.groupDisabled=!1,this.key=Sr(),this.rippleRef=Me(),this.hasSlotController=new $t(this,"[default]","icon","end-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.isDisabled()||this.loading}get focusDisabled(){return this.isDisabled()||this.loading}render(){const e=Bi({button:!0,"has-icon":this.icon||this.selected||this.loading||this.hasSlotController.test("icon"),"has-end-icon":this.endIcon||this.hasSlotController.test("end-icon")});return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.isButton()?this.renderButton({className:e,part:"button",content:this.renderInner()}):this.isDisabled()||this.loading?Z`<span part="button" class="_a ${e}">${this.renderInner()}</span>`:this.renderAnchor({className:e,part:"button",content:this.renderInner()})}`}isDisabled(){return this.disabled||this.groupDisabled}renderIcon(){return this.loading?this.renderLoading():this.selected?Z`<slot name="selected-icon" part="selected-icon" class="selected-icon">${this.selectedIcon?Z`<mdui-icon name="${this.selectedIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-check class="i"></mdui-icon-check>`}</slot>`:Z`<slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}" class="i"></mdui-icon>`:Qe}</slot>`}renderLabel(){return this.hasSlotController.test("[default]")?Z`<slot part="label" class="label"></slot>`:Qe}renderEndIcon(){return Z`<slot name="end-icon" part="end-icon" class="end-icon">${this.endIcon?Z`<mdui-icon name="${this.endIcon}" class="i"></mdui-icon>`:Qe}</slot>`}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon()]}};nr.styles=[pt.styles,g_];w([L({reflect:!0})],nr.prototype,"icon",void 0);w([L({reflect:!0,attribute:"end-icon"})],nr.prototype,"endIcon",void 0);w([L({reflect:!0,attribute:"selected-icon"})],nr.prototype,"selectedIcon",void 0);w([L({type:Boolean,reflect:!0,converter:we})],nr.prototype,"selected",void 0);w([L({type:Boolean,reflect:!0,converter:we})],nr.prototype,"invalid",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"group-disabled"})],nr.prototype,"groupDisabled",void 0);nr=w([Ae("mdui-segmented-button")],nr);const b_=$e`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-flex;vertical-align:middle;height:2.5rem;font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height);color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([full-width]:not([full-width=false i])){display:flex;flex-wrap:nowrap}input,select{position:absolute;width:100%;height:100%;padding:0;opacity:0;pointer-events:none}`;let Ot=class extends Ke{constructor(){super(...arguments),this.fullWidth=!1,this.disabled=!1,this.required=!1,this.name="",this.value="",this.defaultValue="",this.selectedKeys=[],this.invalid=!1,this.isInitial=!0,this.inputRef=Me(),this.formController=new lr(this),this.definedController=new At(this,{relatedElements:["mdui-segmented-button"]})}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get items(){return oe(this).find("mdui-segmented-button").get()}get itemsEnabled(){return oe(this).find("mdui-segmented-button:not([disabled])").get()}get isSingle(){return this.selects==="single"}get isMultiple(){return this.selects==="multiple"}get isSelectable(){return this.isSingle||this.isMultiple}async onSelectsChange(){this.isSelectable?this.isSingle&&this.setSelectedKeys(this.selectedKeys.slice(0,1)):this.setSelectedKeys([]),await this.onSelectedKeysChange()}async onSelectedKeysChange(){await this.definedController.whenDefined();const e=this.itemsEnabled.filter(r=>this.selectedKeys.includes(r.key)).map(r=>r.value),t=this.isMultiple?e:e[0]||"";this.setValue(t),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),!this.isSelectable){this.updateItems();return}const e=(this.isSingle?[this.value]:wt(this.value)?[this.value]:this.value).filter(t=>t);if(!e.length)this.setSelectedKeys([]);else if(this.isSingle){const t=this.itemsEnabled.find(r=>r.value===e[0]);this.setSelectedKeys(t?[t.key]:[])}else this.isMultiple&&this.setSelectedKeys(this.itemsEnabled.filter(t=>e.includes(t.value)).map(t=>t.key));if(this.updateItems(),!this.isInitial){const t=this.formController.getForm();t&&xt.get(t)?.has(this)?(this.invalid=!1,xt.get(t).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}}async onInvalidChange(){await this.definedController.whenDefined(),this.updateItems()}connectedCallback(){super.connectedCallback(),this.value=this.isMultiple&&wt(this.value)?this.value?[this.value]:[]:this.value,this.defaultValue=this.selects==="multiple"?[]:""}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.inputRef.value.blur(),this.inputRef.value.focus())),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return Z`${at(this.isSelectable&&this.isSingle,()=>Z`<input ${De(this.inputRef)} type="radio" name="${je(this.name)}" value="1" .disabled="${this.disabled}" .required="${this.required}" .checked="${!!this.value}" tabindex="-1" @keydown="${this.onInputKeyDown}">`)}${at(this.isSelectable&&this.isMultiple,()=>Z`<select ${De(this.inputRef)} name="${je(this.name)}" .disabled="${this.disabled}" .required="${this.required}" multiple="multiple" tabindex="-1" @keydown="${this.onInputKeyDown}">${hn(this.value,e=>Z`<option selected="selected" value="${e}"></option>`)}</select>`)}<slot @slotchange="${this.onSlotChange}" @click="${this.onClick}"></slot>`}selectOne(e){if(this.isMultiple){const t=[...this.selectedKeys];t.includes(e.key)?t.splice(t.indexOf(e.key),1):t.push(e.key),this.setSelectedKeys(t)}this.isSingle&&(this.selectedKeys.includes(e.key)?this.setSelectedKeys([]):this.setSelectedKeys([e.key])),this.isInitial=!1,this.updateItems()}async onClick(e){if(e.button)return;await this.definedController.whenDefined();const r=e.target.closest("mdui-segmented-button");!r||r.disabled||this.isSelectable&&r.value&&this.selectOne(r)}async onInputKeyDown(e){if(["Enter"," "].includes(e.key)){if(e.preventDefault(),await this.definedController.whenDefined(),this.isSingle){const t=e.target;t.checked=!t.checked,this.selectOne(this.itemsEnabled[0]),this.itemsEnabled[0].focus()}this.isMultiple&&(this.selectOne(this.itemsEnabled[0]),this.itemsEnabled[0].focus())}}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems(!0)}setSelectedKeys(e){kn(this.selectedKeys,e)||(this.selectedKeys=e)}setValue(e){this.isSingle?this.value=e:kn(this.value,e)||(this.value=e)}updateItems(e=!1){const t=this.items;t.forEach((r,n)=>{r.invalid=this.invalid,r.groupDisabled=this.disabled,r.selected=this.selectedKeys.includes(r.key),e&&(r.classList.toggle("mdui-segmented-button-first",n===0),r.classList.toggle("mdui-segmented-button-last",n===t.length-1))})}};Ot.styles=[qe,b_];w([L({type:Boolean,reflect:!0,converter:we,attribute:"full-width"})],Ot.prototype,"fullWidth",void 0);w([L({reflect:!0})],Ot.prototype,"selects",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ot.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ot.prototype,"required",void 0);w([L({reflect:!0})],Ot.prototype,"form",void 0);w([L({reflect:!0})],Ot.prototype,"name",void 0);w([L()],Ot.prototype,"value",void 0);w([Ir()],Ot.prototype,"defaultValue",void 0);w([Be()],Ot.prototype,"selectedKeys",void 0);w([Be()],Ot.prototype,"invalid",void 0);w([Re("selects",!0)],Ot.prototype,"onSelectsChange",null);w([Re("selectedKeys",!0)],Ot.prototype,"onSelectedKeysChange",null);w([Re("value")],Ot.prototype,"onValueChange",null);w([Re("invalid",!0),Re("disabled")],Ot.prototype,"onInvalidChange",null);Ot=w([Ae("mdui-segmented-button-group")],Ot);let kc=class extends yt{render(){return Ri('<path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"/>')}};kc.styles=ki;kc=w([Ae("mdui-icon-cancel--outlined")],kc);let Rc=class extends yt{render(){return Ri('<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>')}};Rc.styles=ki;Rc=w([Ae("mdui-icon-error")],Rc);let Ic=class extends yt{render(){return Ri('<path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46A11.804 11.804 0 0 0 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/>')}};Ic.styles=ki;Ic=w([Ae("mdui-icon-visibility-off")],Ic);let Tc=class extends yt{render(){return Ri('<path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/>')}};Tc.styles=ki;Tc=w([Ae("mdui-icon-visibility")],Tc);const y_=$e`:host{display:inline-block;width:100%}:host([disabled]:not([disabled=false i])){pointer-events:none}:host([type=hidden]){display:none}.container{position:relative;display:flex;align-items:center;height:100%;padding:.125rem .125rem .125rem 1rem;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.container.has-icon{padding-left:.75rem}.container.has-action,.container.has-right-icon,.container.has-suffix{padding-right:.75rem}:host([variant=filled]) .container{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-surface-variant));background-color:rgb(var(--mdui-color-surface-container-highest));border-radius:var(--mdui-shape-corner-extra-small) var(--mdui-shape-corner-extra-small) 0 0}:host([variant=outlined]) .container{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-outline));border-radius:var(--mdui-shape-corner-extra-small)}:host([variant=filled]) .container.invalid,:host([variant=filled]) .container.invalid-style{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-error))}:host([variant=outlined]) .container.invalid,:host([variant=outlined]) .container.invalid-style{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-error))}:host([variant=filled]:hover) .container{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-surface))}:host([variant=outlined]:hover) .container{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-on-surface))}:host([variant=filled]:hover) .container.invalid,:host([variant=filled]:hover) .container.invalid-style{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-error-container))}:host([variant=outlined]:hover) .container.invalid,:host([variant=outlined]:hover) .container.invalid-style{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-on-error-container))}:host([variant=filled][focused-style]) .container,:host([variant=filled][focused]) .container{box-shadow:inset 0 -.125rem 0 0 rgb(var(--mdui-color-primary))}:host([variant=outlined][focused-style]) .container,:host([variant=outlined][focused]) .container{box-shadow:inset 0 0 0 .125rem rgb(var(--mdui-color-primary))}:host([variant=filled][focused-style]) .container.invalid,:host([variant=filled][focused-style]) .container.invalid-style,:host([variant=filled][focused]) .container.invalid,:host([variant=filled][focused]) .container.invalid-style{box-shadow:inset 0 -.125rem 0 0 rgb(var(--mdui-color-error))}:host([variant=outlined][focused-style]) .container.invalid,:host([variant=outlined][focused-style]) .container.invalid-style,:host([variant=outlined][focused]) .container.invalid,:host([variant=outlined][focused]) .container.invalid-style{box-shadow:inset 0 0 0 .125rem rgb(var(--mdui-color-error))}:host([variant=filled][disabled]:not([disabled=false i])) .container{box-shadow:inset 0 -.0625rem 0 0 rgba(var(--mdui-color-on-surface),38%);background-color:rgba(var(--mdui-color-on-surface),4%)}:host([variant=outlined][disabled]:not([disabled=false i])) .container{box-shadow:inset 0 0 0 .125rem rgba(var(--mdui-color-on-surface),12%)}.action,.icon,.prefix,.right-icon,.suffix{display:flex;-webkit-user-select:none;user-select:none;color:rgb(var(--mdui-color-on-surface-variant))}:host([disabled]:not([disabled=false i])) .action,:host([disabled]:not([disabled=false i])) .icon,:host([disabled]:not([disabled=false i])) .prefix,:host([disabled]:not([disabled=false i])) .right-icon,:host([disabled]:not([disabled=false i])) .suffix{color:rgba(var(--mdui-color-on-surface),38%)}.invalid .right-icon,.invalid-style .right-icon{color:rgb(var(--mdui-color-error))}:host(:hover) .invalid .right-icon,:host(:hover) .invalid-style .right-icon{color:rgb(var(--mdui-color-on-error-container))}:host([focused-style]) .invalid .right-icon,:host([focused-style]) .invalid-style .right-icon,:host([focused]) .invalid .right-icon,:host([focused]) .invalid-style .right-icon{color:rgb(var(--mdui-color-error))}.action,.icon,.right-icon{font-size:1.5rem}.action mdui-button-icon,.icon mdui-button-icon,.right-icon mdui-button-icon,::slotted(mdui-button-icon[slot]){margin-left:-.5rem;margin-right:-.5rem}.action .i,.icon .i,.right-icon .i,::slotted([slot$=icon]){font-size:inherit}.has-icon .icon{margin-right:1rem}.has-prefix .prefix{padding-right:.125rem}.has-action .action{margin-left:.75rem}.has-suffix .suffix{padding-right:.25rem;padding-left:.125rem}.has-right-icon .right-icon{margin-left:.75rem}.prefix,.suffix{display:none;font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}:host([variant=filled][label]) .prefix,:host([variant=filled][label]) .suffix{padding-top:1rem}.has-value .prefix,.has-value .suffix,:host([focused-style]) .prefix,:host([focused-style]) .suffix,:host([focused]) .prefix,:host([focused]) .suffix{display:flex}.input-container{display:flex;width:100%;height:100%}.label{position:absolute;pointer-events:none;max-width:calc(100% - 1rem);display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;transition:all var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard);top:1rem;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}.invalid .label,.invalid-style .label{color:rgb(var(--mdui-color-error))}:host([variant=outlined]) .label{padding:0 .25rem;margin:0 -.25rem}:host([variant=outlined]:hover) .label{color:rgb(var(--mdui-color-on-surface))}:host([variant=filled]:hover) .invalid .label,:host([variant=filled]:hover) .invalid-style .label,:host([variant=outlined]:hover) .invalid .label,:host([variant=outlined]:hover) .invalid-style .label{color:rgb(var(--mdui-color-on-error-container))}:host([variant=filled][focused-style]) .label,:host([variant=filled][focused]) .label,:host([variant=outlined][focused-style]) .label,:host([variant=outlined][focused]) .label{color:rgb(var(--mdui-color-primary))}:host([variant=filled]) .has-value .label,:host([variant=filled][focused-style]) .label,:host([variant=filled][focused]) .label,:host([variant=filled][type=date]) .label,:host([variant=filled][type=datetime-local]) .label,:host([variant=filled][type=month]) .label,:host([variant=filled][type=time]) .label,:host([variant=filled][type=week]) .label{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height);top:.25rem}:host([variant=outlined]) .has-value .label,:host([variant=outlined][focused-style]) .label,:host([variant=outlined][focused]) .label,:host([variant=outlined][type=date]) .label,:host([variant=outlined][type=datetime-local]) .label,:host([variant=outlined][type=month]) .label,:host([variant=outlined][type=time]) .label,:host([variant=outlined][type=week]) .label{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height);top:-.5rem;left:.75rem;background-color:rgb(var(--mdui-color-background))}:host([variant=filled][focused-style]) .invalid .label,:host([variant=filled][focused-style]) .invalid-style .label,:host([variant=filled][focused]) .invalid .label,:host([variant=filled][focused]) .invalid-style .label,:host([variant=outlined][focused-style]) .invalid .label,:host([variant=outlined][focused-style]) .invalid-style .label,:host([variant=outlined][focused]) .invalid .label,:host([variant=outlined][focused]) .invalid-style .label{color:rgb(var(--mdui-color-error))}:host([variant=filled][disabled]:not([disabled=false i])) .label,:host([variant=outlined][disabled]:not([disabled=false i])) .label{color:rgba(var(--mdui-color-on-surface),38%)}.input{display:block;width:100%;border:none;outline:0;background:0 0;appearance:none;resize:none;cursor:inherit;font-family:inherit;padding:.875rem .875rem .875rem 0;font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height);color:rgb(var(--mdui-color-on-surface));caret-color:rgb(var(--mdui-color-primary))}.has-action .input,.has-right-icon .input{padding-right:.25rem}.has-suffix .input{padding-right:0}.input.hide-input{opacity:0;height:0;min-height:0;width:0;padding:0!important;overflow:hidden}.input::placeholder{color:rgb(var(--mdui-color-on-surface-variant))}.invalid .input,.invalid-style .input{caret-color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])) .input{color:rgba(var(--mdui-color-on-surface),38%)}:host([end-aligned]:not([end-aligned=false i])) .input{text-align:right}textarea.input{padding-top:0;margin-top:.875rem}:host([variant=filled]) .label+.input{padding-top:1.375rem;padding-bottom:.375rem}:host([variant=filled]) .label+textarea.input{padding-top:0;margin-top:1.375rem}.supporting{display:flex;justify-content:space-between;padding:.25rem 1rem;color:rgb(var(--mdui-color-on-surface-variant))}.supporting.invalid,.supporting.invalid-style{color:rgb(var(--mdui-color-error))}.helper{display:block;opacity:1;transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}:host([disabled]:not([disabled=false i])) .helper{color:rgba(var(--mdui-color-on-surface),38%)}:host([helper-on-focus]:not([helper-on-focus=false i])) .helper{opacity:0}:host([helper-on-focus][focused-style]:not([helper-on-focus=false i])) .helper,:host([helper-on-focus][focused]:not([helper-on-focus=false i])) .helper{opacity:1}.error{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}.counter{flex-wrap:nowrap;padding-left:1rem;font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}::-ms-reveal{display:none}.input[type=number]::-webkit-inner-spin-button,.input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;display:none}.input[type=number]{-moz-appearance:textfield}.input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}`;let Ne=class extends bi(Ke){constructor(){super(...arguments),this.variant="filled",this.type="text",this.name="",this.value="",this.defaultValue="",this.helperOnFocus=!1,this.clearable=!1,this.endAligned=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.autosize=!1,this.counter=!1,this.togglePassword=!1,this.spellcheck=!1,this.invalid=!1,this.invalidStyle=!1,this.focusedStyle=!1,this.isPasswordVisible=!1,this.hasValue=!1,this.error="",this.inputRef=Me(),this.formController=new lr(this),this.hasSlotController=new $t(this,"icon","end-icon","helper","input"),this.readonlyButClearable=!1}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get valueAsNumber(){return this.inputRef.value?.valueAsNumber??parseFloat(this.value)}set valueAsNumber(e){const t=document.createElement("input");t.type="number",t.valueAsNumber=e,this.value=t.value}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}get isFocusedStyle(){return this.focused||this.focusedStyle}get isTextarea(){return this.rows&&this.rows>1||this.autosize}onDisabledChange(){this.inputRef.value.disabled=this.disabled,this.invalid=!this.inputRef.value.checkValidity()}async onValueChange(){if(this.hasValue=!["",null].includes(this.value),this.hasUpdated){await this.updateComplete,this.setTextareaHeight();const e=this.formController.getForm();e&&xt.get(e)?.has(this)?(this.invalid=!1,xt.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}}onRowsChange(){this.setTextareaHeight()}async onMaxRowsChange(){if(!this.autosize)return;this.hasUpdated||await this.updateComplete;const e=oe(this.inputRef.value);e.css("max-height",parseFloat(e.css("line-height"))*(this.maxRows??1)+parseFloat(e.css("padding-top"))+parseFloat(e.css("padding-bottom")))}async onMinRowsChange(){if(!this.autosize)return;this.hasUpdated||await this.updateComplete;const e=oe(this.inputRef.value);e.css("min-height",parseFloat(e.css("line-height"))*(this.minRows??1)+parseFloat(e.css("padding-top"))+parseFloat(e.css("padding-bottom")))}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.setTextareaHeight(),this.observeResize=kr(this.inputRef.value,()=>this.setTextareaHeight())})}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve(),_o(this)}select(){this.inputRef.value.select()}setSelectionRange(e,t,r="none"){this.inputRef.value.setSelectionRange(e,t,r)}setRangeText(e,t,r,n="preserve"){this.inputRef.value.setRangeText(e,t,r,n),this.value!==this.inputRef.value.value&&(this.value=this.inputRef.value.value,this.setTextareaHeight(),this.emit("input"),this.emit("change"))}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),this.focus()),!this.invalid}setCustomValidity(e){this.setCustomValidityInternal(e),_o(this)}render(){const e=!!this.icon||this.hasSlotController.test("icon"),t=!!this.endIcon||this.hasSlotController.test("end-icon"),r=this.invalid||this.invalidStyle,n=this.type==="password"&&this.togglePassword&&!this.disabled,s=this.clearable&&!this.disabled&&(!this.readonly||this.readonlyButClearable)&&(typeof this.value=="number"||this.value.length>0),o=!!this.prefix||this.hasSlotController.test("prefix"),a=!!this.suffix||this.hasSlotController.test("suffix"),c=!!this.helper||this.hasSlotController.test("helper"),l=r&&!!(this.error||this.inputRef.value.validationMessage),d=this.counter&&!!this.maxlength,u=this.hasSlotController.test("input"),p={invalid:this.invalid,"invalid-style":this.invalidStyle},g=bt({container:!0,"has-value":this.hasValue,"has-icon":e,"has-right-icon":t||r,"has-action":s||n,"has-prefix":o,"has-suffix":a,"is-firefox":navigator.userAgent.includes("Firefox"),...p});return Z`<div part="container" class="${g}">${this.renderPrefix()}<div class="input-container">${this.renderLabel()} ${this.isTextarea?this.renderTextArea(u):this.renderInput(u)} ${at(u,()=>Z`<slot name="input" class="input"></slot>`)}</div>${this.renderSuffix()}${this.renderClearButton(s)} ${this.renderTogglePasswordButton(n)} ${this.renderRightIcon(r)}</div>${at(l||c||d,()=>Z`<div part="supporting" class="${bt({supporting:!0,...p})}">${this.renderHelper(l,c)} ${this.renderCounter(d)}</div>`)}`}setCustomValidityInternal(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity(),this.requestUpdate()}onChange(){this.value=this.inputRef.value.value,this.isTextarea&&this.setTextareaHeight(),this.emit("change")}onClear(e){this.value="",this.emit("clear"),this.emit("input"),this.emit("change"),this.focus(),e.stopPropagation()}onInput(e){e.stopPropagation(),this.value=this.inputRef.value.value,this.isTextarea&&this.setTextareaHeight(),this.emit("input")}onInvalid(e){e.preventDefault()}onKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;e.key==="Enter"&&!t&&setTimeout(()=>{e.defaultPrevented||this.formController.submit()})}onTextAreaKeyUp(){if(this.pattern){const e=new RegExp(this.pattern);this.value&&!this.value.match(e)?(this.setCustomValidityInternal(this.getPatternErrorMsg()),B1(this,()=>{this.setCustomValidityInternal(this.getPatternErrorMsg())})):(this.setCustomValidityInternal(""),_o(this))}}onTogglePassword(){this.isPasswordVisible=!this.isPasswordVisible}getPatternErrorMsg(){return M1("Please match the requested format.")}setTextareaHeight(){this.autosize?(this.inputRef.value.style.height="auto",this.inputRef.value.style.height=`${this.inputRef.value.scrollHeight}px`):this.inputRef.value.style.height=void 0}renderLabel(){return this.label?Z`<label part="label" class="label">${this.label}</label>`:Qe}renderPrefix(){return Z`<slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}" class="i"></mdui-icon>`:Qe}</slot><slot name="prefix" part="prefix" class="prefix">${this.prefix}</slot>`}renderSuffix(){return Z`<slot name="suffix" part="suffix" class="suffix">${this.suffix}</slot>`}renderRightIcon(e){return e?Z`<slot name="error-icon" part="error-icon" class="right-icon">${this.errorIcon?Z`<mdui-icon name="${this.errorIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-error class="i"></mdui-icon-error>`}</slot>`:Z`<slot name="end-icon" part="end-icon" class="end-icon right-icon">${this.endIcon?Z`<mdui-icon name="${this.endIcon}" class="i"></mdui-icon>`:Qe}</slot>`}renderClearButton(e){return at(e,()=>Z`<slot name="clear-button" part="clear-button" class="action" @click="${this.onClear}"><mdui-button-icon tabindex="-1"><slot name="clear-icon" part="clear-icon">${this.clearIcon?Z`<mdui-icon name="${this.clearIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-cancel--outlined class="i"></mdui-icon-cancel--outlined>`}</slot></mdui-button-icon></slot>`)}renderTogglePasswordButton(e){return at(e,()=>Z`<slot name="toggle-password-button" part="toggle-password-button" class="action" @click="${this.onTogglePassword}"><mdui-button-icon tabindex="-1">${this.isPasswordVisible?Z`<slot name="show-password-icon" part="show-password-icon">${this.showPasswordIcon?Z`<mdui-icon name="${this.showPasswordIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-visibility-off class="i"></mdui-icon-visibility-off>`}</slot>`:Z`<slot name="hide-password-icon" part="hide-password-icon">${this.hidePasswordIcon?Z`<mdui-icon name="${this.hidePasswordIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-visibility class="i"></mdui-icon-visibility>`}</slot>`}</mdui-button-icon></slot>`)}renderInput(e){return Z`<input ${De(this.inputRef)} part="input" class="input ${bt({"hide-input":e})}" type="${this.type==="password"&&this.isPasswordVisible?"text":this.type}" name="${je(this.name)}" .value="${Sn(this.value)}" placeholder="${je(!this.label||this.isFocusedStyle||this.hasValue?this.placeholder:void 0)}" ?readonly="${this.readonly}" ?disabled="${this.disabled}" ?required="${this.required}" minlength="${je(this.minlength)}" maxlength="${je(this.maxlength)}" min="${je(this.min)}" max="${je(this.max)}" step="${je(this.step)}" autocapitalize="${je(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${this.autocomplete}" autocorrect="${je(this.type==="password"?"off":this.autocorrect)}" spellcheck="${je(this.spellcheck)}" pattern="${je(this.pattern)}" enterkeyhint="${je(this.enterkeyhint)}" inputmode="${je(this.inputmode)}" @change="${this.onChange}" @input="${this.onInput}" @invalid="${this.onInvalid}" @keydown="${this.onKeyDown}">`}renderTextArea(e){return Z`<textarea ${De(this.inputRef)} part="input" class="input ${bt({"hide-input":e})}" name="${je(this.name)}" .value="${Sn(this.value)}" placeholder="${je(!this.label||this.isFocusedStyle||this.hasValue?this.placeholder:void 0)}" ?readonly="${this.readonly}" ?disabled="${this.disabled}" ?required="${this.required}" minlength="${je(this.minlength)}" maxlength="${je(this.maxlength)}" rows="${this.rows??1}" autocapitalize="${je(this.autocapitalize)}" autocorrect="${je(this.autocorrect)}" spellcheck="${je(this.spellcheck)}" enterkeyhint="${je(this.enterkeyhint)}" inputmode="${je(this.inputmode)}" @change="${this.onChange}" @input="${this.onInput}" @invalid="${this.onInvalid}" @keydown="${this.onKeyDown}" @keyup="${this.onTextAreaKeyUp}"></textarea>`}renderHelper(e,t){return e?Z`<div part="error" class="error">${this.error||this.inputRef.value.validationMessage}</div>`:t?Z`<slot name="helper" part="helper" class="helper">${this.helper}</slot>`:Z`<span></span>`}renderCounter(e){return e?Z`<div part="counter" class="counter">${this.value.length}/${this.maxlength}</div>`:Qe}};Ne.styles=[qe,y_];w([L({reflect:!0})],Ne.prototype,"variant",void 0);w([L({reflect:!0})],Ne.prototype,"type",void 0);w([L({reflect:!0})],Ne.prototype,"name",void 0);w([L()],Ne.prototype,"value",void 0);w([Ir()],Ne.prototype,"defaultValue",void 0);w([L({reflect:!0})],Ne.prototype,"label",void 0);w([L({reflect:!0})],Ne.prototype,"placeholder",void 0);w([L({reflect:!0})],Ne.prototype,"helper",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"helper-on-focus"})],Ne.prototype,"helperOnFocus",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ne.prototype,"clearable",void 0);w([L({reflect:!0,attribute:"clear-icon"})],Ne.prototype,"clearIcon",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"end-aligned"})],Ne.prototype,"endAligned",void 0);w([L({reflect:!0})],Ne.prototype,"prefix",void 0);w([L({reflect:!0})],Ne.prototype,"suffix",void 0);w([L({reflect:!0})],Ne.prototype,"icon",void 0);w([L({reflect:!0,attribute:"end-icon"})],Ne.prototype,"endIcon",void 0);w([L({reflect:!0,attribute:"error-icon"})],Ne.prototype,"errorIcon",void 0);w([L({reflect:!0})],Ne.prototype,"form",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ne.prototype,"readonly",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ne.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ne.prototype,"required",void 0);w([L({type:Number,reflect:!0})],Ne.prototype,"rows",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ne.prototype,"autosize",void 0);w([L({type:Number,reflect:!0,attribute:"min-rows"})],Ne.prototype,"minRows",void 0);w([L({type:Number,reflect:!0,attribute:"max-rows"})],Ne.prototype,"maxRows",void 0);w([L({type:Number,reflect:!0})],Ne.prototype,"minlength",void 0);w([L({type:Number,reflect:!0})],Ne.prototype,"maxlength",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ne.prototype,"counter",void 0);w([L({type:Number,reflect:!0})],Ne.prototype,"min",void 0);w([L({type:Number,reflect:!0})],Ne.prototype,"max",void 0);w([L({type:Number,reflect:!0})],Ne.prototype,"step",void 0);w([L({reflect:!0})],Ne.prototype,"pattern",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"toggle-password"})],Ne.prototype,"togglePassword",void 0);w([L({reflect:!0,attribute:"show-password-icon"})],Ne.prototype,"showPasswordIcon",void 0);w([L({reflect:!0,attribute:"hide-password-icon"})],Ne.prototype,"hidePasswordIcon",void 0);w([L({reflect:!0})],Ne.prototype,"autocapitalize",void 0);w([L({reflect:!0})],Ne.prototype,"autocorrect",void 0);w([L({reflect:!0})],Ne.prototype,"autocomplete",void 0);w([L({reflect:!0})],Ne.prototype,"enterkeyhint",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ne.prototype,"spellcheck",void 0);w([L({reflect:!0})],Ne.prototype,"inputmode",void 0);w([Be()],Ne.prototype,"invalid",void 0);w([Be()],Ne.prototype,"invalidStyle",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"focused-style"})],Ne.prototype,"focusedStyle",void 0);w([Be()],Ne.prototype,"isPasswordVisible",void 0);w([Be()],Ne.prototype,"hasValue",void 0);w([Be()],Ne.prototype,"error",void 0);w([Re("disabled",!0)],Ne.prototype,"onDisabledChange",null);w([Re("value")],Ne.prototype,"onValueChange",null);w([Re("rows",!0)],Ne.prototype,"onRowsChange",null);w([Re("maxRows")],Ne.prototype,"onMaxRowsChange",null);w([Re("minRows")],Ne.prototype,"onMinRowsChange",null);Ne=w([Ae("mdui-text-field")],Ne);const v_=$e`:host{display:inline-block;width:100%}.hidden-input{display:none}.text-field{cursor:pointer}.chips{display:flex;flex-wrap:wrap;margin:-.5rem -.25rem;min-height:2.5rem}:host([variant=filled][label]) .chips{margin:0 -.25rem -1rem -.25rem}.chip{margin:.25rem}mdui-menu{max-width:none}`;let ot=class extends bi(Ke){constructor(){super(...arguments),this.variant="filled",this.multiple=!1,this.name="",this.value="",this.defaultValue="",this.clearable=!1,this.placement="auto",this.endAligned=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.invalid=!1,this.menuRef=Me(),this.textFieldRef=Me(),this.hiddenInputRef=Me(),this.formController=new lr(this),this.hasSlotController=new $t(this,"icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"),this.definedController=new At(this,{relatedElements:["mdui-menu-item"]})}get validity(){return this.hiddenInputRef.value.validity}get validationMessage(){return this.hiddenInputRef.value.validationMessage}get focusElement(){return this.textFieldRef.value}get focusDisabled(){return this.disabled}connectedCallback(){super.connectedCallback(),this.value=this.multiple&&wt(this.value)?this.value?[this.value]:[]:this.value,this.defaultValue=this.multiple?[]:"",this.definedController.whenDefined().then(()=>{this.requestUpdate()}),this.updateComplete.then(()=>{this.observeResize=kr(this.textFieldRef.value,()=>this.resizeMenu())})}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve()}checkValidity(){const e=this.hiddenInputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.hiddenInputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),this.focus()),!this.invalid}setCustomValidity(e){this.hiddenInputRef.value.setCustomValidity(e),this.invalid=!this.hiddenInputRef.value.checkValidity()}render(){const e=this.multiple?!!this.value.length:!!this.value;return Z`${this.multiple?Z`<select ${De(this.hiddenInputRef)} class="hidden-input" name="${je(this.name)}" value="${je(this.value)}" .required="${this.required}" .disabled="${this.disabled}" multiple="multiple" tabindex="-1">${hn(this.value,t=>Z`<option selected="selected" value="${t}"></option>`)}</select>`:Z`<input ${De(this.hiddenInputRef)} type="radio" class="hidden-input" name="${je(this.name)}" value="${je(this.value)}" .required="${this.required}" .disabled="${this.disabled}" .checked="${e}" tabindex="-1">`}<mdui-dropdown .stayOpenOnClick="${this.multiple}" .disabled="${this.readonly||this.disabled}" .placement="${this.placement==="top"?"top-start":this.placement==="bottom"?"bottom-start":"auto"}" @open="${this.onDropdownOpen}" @close="${this.onDropdownClose}"><mdui-text-field ${De(this.textFieldRef)} slot="trigger" part="text-field" class="text-field" exportparts="${["container","icon","end-icon","error-icon","prefix","suffix","label","input","clear-button","clear-icon","supporting","helper","error"].map(t=>`${t}:text-field__${t}`).join(",")}" readonly="readonly" .readonlyButClearable="${!0}" .variant="${this.variant}" .name="${this.name}" .value="${this.multiple?this.value.length?" ":"":this.getMenuItemLabelByValue(this.value)}" .label="${this.label}" .placeholder="${this.placeholder}" .helper="${this.helper}" .error="${this.hiddenInputRef.value?.validationMessage}" .clearable="${this.clearable}" .clearIcon="${this.clearIcon}" .endAligned="${this.endAligned}" .prefix="${this.prefix}" .suffix="${this.suffix}" .icon="${this.icon}" .endIcon="${this.endIcon}" .errorIcon="${this.errorIcon}" .form="${this.form}" .disabled="${this.disabled}" .required="${this.required}" .invalidStyle="${this.invalid}" @clear="${this.onClear}" @change="${t=>t.stopPropagation()}" @keydown="${this.onTextFieldKeyDown}">${hn(["icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"],t=>this.hasSlotController.test(t)?Z`<slot name="${t}" slot="${t}"></slot>`:it)} ${at(this.multiple&&this.value.length,()=>Z`<div slot="input" class="chips" part="chips">${hn(this.value,t=>Z`<mdui-chip class="chip" part="chip" exportparts="${["button","label","delete-icon"].map(r=>`${r}:chip__${r}`).join(",")}" variant="input" deletable tabindex="-1" @delete="${()=>this.onDeleteOneValue(t)}">${this.getMenuItemLabelByValue(t)}</mdui-chip>`)}</div>`)}</mdui-text-field><mdui-menu ${De(this.menuRef)} part="menu" .selects="${this.multiple?"multiple":"single"}" .value="${this.value}" @change="${this.onValueChange}"><slot></slot></mdui-menu></mdui-dropdown>`}getMenuItemLabelByValue(e){return this.menuItems.length&&this.menuItems.find(t=>t.value===e)?.textContent?.trim()||e}resizeMenu(){this.menuRef.value.style.width=`${this.textFieldRef.value.clientWidth}px`}async onDropdownOpen(){this.textFieldRef.value.focusedStyle=!0}onDropdownClose(){this.textFieldRef.value.focusedStyle=!1,(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&setTimeout(()=>{this.focus()})}async onValueChange(e){const t=e.target;this.value=this.multiple?t.value.map(n=>n??""):t.value??"",await this.updateComplete;const r=this.formController.getForm();r&&xt.get(r)?.has(this)?(this.invalid=!1,xt.get(r).delete(this)):this.invalid=!this.hiddenInputRef.value.checkValidity()}onDeleteOneValue(e){const t=[...this.value];t.includes(e)&&t.splice(t.indexOf(e),1),this.value=t}onClear(){this.value=this.multiple?[]:""}onTextFieldKeyDown(e){e.key==="Enter"&&(e.preventDefault(),this.textFieldRef.value.click())}};ot.styles=[qe,v_];w([L({reflect:!0})],ot.prototype,"variant",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ot.prototype,"multiple",void 0);w([L({reflect:!0})],ot.prototype,"name",void 0);w([L()],ot.prototype,"value",void 0);w([Ir()],ot.prototype,"defaultValue",void 0);w([L({reflect:!0})],ot.prototype,"label",void 0);w([L({reflect:!0})],ot.prototype,"placeholder",void 0);w([L({reflect:!0})],ot.prototype,"helper",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ot.prototype,"clearable",void 0);w([L({reflect:!0,attribute:"clear-icon"})],ot.prototype,"clearIcon",void 0);w([L({reflect:!0})],ot.prototype,"placement",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"end-aligned"})],ot.prototype,"endAligned",void 0);w([L({reflect:!0})],ot.prototype,"prefix",void 0);w([L({reflect:!0})],ot.prototype,"suffix",void 0);w([L({reflect:!0})],ot.prototype,"icon",void 0);w([L({reflect:!0,attribute:"end-icon"})],ot.prototype,"endIcon",void 0);w([L({reflect:!0,attribute:"error-icon"})],ot.prototype,"errorIcon",void 0);w([L({reflect:!0})],ot.prototype,"form",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ot.prototype,"readonly",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ot.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],ot.prototype,"required",void 0);w([Be()],ot.prototype,"invalid",void 0);w([gi({flatten:!0,selector:"mdui-menu-item"})],ot.prototype,"menuItems",void 0);ot=w([Ae("mdui-select")],ot);const w_=$e`.track-active{left:-.125rem;border-radius:var(--mdui-shape-corner-full) 0 0 var(--mdui-shape-corner-full)}`;let Tn=class extends Pt{constructor(){super(...arguments),this.value=0,this.defaultValue=0,this.rippleRef=Me(),this.handleRef=Me(),this.formController=new lr(this)}get rippleElement(){return this.rippleRef.value}async onValueChange(){this.value=this.fixValue(this.value);const e=this.formController.getForm();e&&xt.get(e)?.has(this)?(this.invalid=!1,xt.get(e).delete(this)):(await this.updateComplete,this.invalid=!this.inputRef.value.checkValidity()),this.updateStyle()}connectedCallback(){super.connectedCallback(),this.value=this.fixValue(this.value)}firstUpdated(e){super.firstUpdated(e);const t=()=>{this.disabled||(this.labelVisible=!0)},r=()=>{this.disabled||(this.labelVisible=!1)};this.addEventListener("touchstart",t),this.addEventListener("mousedown",t),this.addEventListener("touchend",r),this.addEventListener("mouseup",r),this.updateStyle()}render(){return Z`<label class="${bt({invalid:this.invalid})}"><input ${De(this.inputRef)} type="range" step="${this.step}" min="${this.min}" max="${this.max}" ?disabled="${this.disabled}" .value="${Sn(this.value.toString())}" @input="${this.onInput}" @change="${this.onChange}"><div part="track-inactive" class="track-inactive"></div><div ${De(this.trackActiveRef)} part="track-active" class="track-active"></div><div ${De(this.handleRef)} part="handle" class="handle"><div class="elevation"></div><mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.renderLabel(this.value)}</div>${at(this.tickmarks,()=>hn(this.getCandidateValues(),e=>Z`<div part="tickmark" class="tickmark ${bt({active:e<this.value})}" style="${jr({left:`${(e-this.min)/this.max*100}%`,display:e===this.value?"none":"block"})}"></div>`))}</label>`}updateStyle(){const e=(this.value-this.min)/(this.max-this.min)*100;this.trackActiveRef.value.style.width=`${e}%`,this.handleRef.value.style.left=`${e}%`}onInput(){this.value=parseFloat(this.inputRef.value.value),this.updateStyle()}};Tn.styles=[Pt.styles,w_];w([L({type:Number})],Tn.prototype,"value",void 0);w([Ir()],Tn.prototype,"defaultValue",void 0);w([Re("value",!0)],Tn.prototype,"onValueChange",null);Tn=w([Ae("mdui-slider")],Tn);const __=$e`:host{--shape-corner:var(--mdui-shape-corner-extra-small);--z-index:2400;position:fixed;z-index:var(--z-index);display:none;align-items:center;flex-wrap:wrap;border-radius:var(--shape-corner);transform:scaleY(0);transition:transform 0s var(--mdui-motion-easing-linear) var(--mdui-motion-duration-short4);min-width:20rem;max-width:36rem;padding:.25rem 0;box-shadow:var(--mdui-elevation-level3);background-color:rgb(var(--mdui-color-inverse-surface));color:rgb(var(--mdui-color-inverse-on-surface));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([placement^=top]){transform-origin:top}:host([placement^=bottom]){transform-origin:bottom}:host([placement=bottom-start]:not([mobile])),:host([placement=top-start]:not([mobile])){left:1rem}:host([placement=bottom-end]:not([mobile])),:host([placement=top-end]:not([mobile])){right:1rem}:host([placement=bottom]:not([mobile])),:host([placement=top]:not([mobile])){left:50%;transform:scaleY(0) translateX(-50%)}:host([mobile]){min-width:0;left:1rem;right:1rem}:host([open]){transform:scaleY(1);transition:top var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard),bottom var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard),transform var(--mdui-motion-duration-medium4) var(--mdui-motion-easing-emphasized-decelerate)}:host([placement=bottom][open]:not([mobile])),:host([placement=top][open]:not([mobile])){transform:scaleY(1) translateX(-50%)}.message{display:block;margin:.625rem 1rem}:host([message-line='1']) .message{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([message-line='2']) .message{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.action-group{display:flex;align-items:center;margin-left:auto;padding-right:.5rem}.action,.close-button{display:inline-flex;align-items:center;justify-content:center}.action{color:rgb(var(--mdui-color-inverse-primary));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking)}.action mdui-button,::slotted(mdui-button[slot=action][variant=outlined]),::slotted(mdui-button[slot=action][variant=text]){color:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;--mdui-comp-ripple-state-layer-color:var(--mdui-color-inverse-primary)}.action mdui-button::part(button){padding:0 .5rem}.close-button{margin:0 -.25rem 0 .25rem;font-size:1.5rem;color:rgb(var(--mdui-color-inverse-on-surface))}.close-button mdui-button-icon,::slotted(mdui-button-icon[slot=close-button][variant=outlined]),::slotted(mdui-button-icon[slot=close-button][variant=standard]){font-size:inherit;color:inherit;--mdui-comp-ripple-state-layer-color:var(--mdui-color-inverse-on-surface)}.close-button .i,::slotted([slot=close-icon]){font-size:inherit}`,Oi=[];let Xl=!1,Gt=class extends Ke{constructor(){super(),this.open=!1,this.placement="bottom",this.actionLoading=!1,this.closeable=!1,this.autoCloseDelay=5e3,this.closeOnOutsideClick=!1,this.mobile=!1,this.onDocumentClick=this.onDocumentClick.bind(this)}async onOpenChange(){const e=ti(this,"linear"),t=Array.from(this.renderRoot.querySelectorAll(".message, .action-group"));if(this.open){const r=this.hasUpdated;if(r||await this.updateComplete,r&&!this.emit("open",{cancelable:!0}))return;window.clearTimeout(this.closeTimeout),this.autoCloseDelay&&(this.closeTimeout=window.setTimeout(()=>{this.open=!1},this.autoCloseDelay)),this.style.display="flex",await Promise.all([Zt(this),...t.map(s=>Zt(s))]),Oi.push({height:this.clientHeight,snackbar:this}),await this.reorderStack(this);const n=$i(this,"medium4");await Promise.all([st(this,[{opacity:0},{opacity:1,offset:.5},{opacity:1}],{duration:r?n:0,easing:e,fill:"forwards"}),...t.map(s=>st(s,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:r?n:0,easing:e}))]),r&&this.emit("opened");return}if(!this.open&&this.hasUpdated){if(!this.emit("close",{cancelable:!0}))return;window.clearTimeout(this.closeTimeout),await Promise.all([Zt(this),...t.map(o=>Zt(o))]);const n=$i(this,"short4");await Promise.all([st(this,[{opacity:1},{opacity:0}],{duration:n,easing:e,fill:"forwards"}),...t.map(o=>st(o,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:n,easing:e}))]),this.style.display="none",this.emit("closed");const s=Oi.findIndex(o=>o.snackbar===this);Oi.splice(s,1),Oi[s]&&await this.reorderStack(Oi[s].snackbar);return}}async onStackChange(){await this.reorderStack(this)}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.onDocumentClick),this.mobile=xc().down("sm"),this.observeResize=kr(document.documentElement,async()=>{const e=xc().down("sm");this.mobile!==e&&(this.mobile=e,Xl||(Xl=!0,await this.reorderStack(),Xl=!1))})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),window.clearTimeout(this.closeTimeout),this.open&&(this.open=!1),this.observeResize?.unobserve()}render(){return Z`<slot part="message" class="message"></slot><div class="action-group"><slot name="action" part="action" class="action" @click="${this.onActionClick}">${this.action?Z`<mdui-button variant="text" loading="${this.actionLoading}">${this.action}</mdui-button>`:Qe}</slot>${at(this.closeable,()=>Z`<slot name="close-button" part="close-button" class="close-button" @click="${this.onCloseClick}"><mdui-button-icon><slot name="close-icon" part="close-icon">${this.closeIcon?Z`<mdui-icon name="${this.closeIcon}" class="i"></mdui-icon>`:Z`<mdui-icon-clear class="i"></mdui-icon-clear>`}</slot></mdui-button-icon></slot>`)}</div>`}async reorderStack(e){const t=e?Oi.findIndex(r=>r.snackbar===e):0;for(let r=t;r<Oi.length;r++){const s=Oi[r].snackbar;this.mobile?["top","bottom"].forEach(o=>{if(s.placement.startsWith(o)){const a=Oi.filter((l,d)=>d<r&&l.snackbar.placement.startsWith(o)),c=a.reduce((l,d)=>l+d.height,0);s.style[o]=`calc(${c}px + ${a.length+1}rem)`,s.style[o==="top"?"bottom":"top"]="auto"}}):["top","top-start","top-end","bottom","bottom-start","bottom-end"].forEach(o=>{if(s.placement===o){const a=Oi.filter((l,d)=>d<r&&l.snackbar.placement===o),c=a.reduce((l,d)=>l+d.height,0);s.style[o.startsWith("top")?"top":"bottom"]=`calc(${c}px + ${a.length+1}rem)`,s.style[o.startsWith("top")?"bottom":"top"]="auto"}})}}onDocumentClick(e){if(!this.open||!this.closeOnOutsideClick)return;const t=e.target;!this.contains(t)&&this!==t&&(this.open=!1)}onActionClick(e){e.stopPropagation(),this.emit("action-click")}onCloseClick(){this.open=!1}};Gt.styles=[qe,__];w([L({type:Boolean,reflect:!0,converter:we})],Gt.prototype,"open",void 0);w([L({reflect:!0})],Gt.prototype,"placement",void 0);w([L({reflect:!0,attribute:"action"})],Gt.prototype,"action",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"action-loading"})],Gt.prototype,"actionLoading",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Gt.prototype,"closeable",void 0);w([L({reflect:!0,attribute:"close-icon"})],Gt.prototype,"closeIcon",void 0);w([L({type:Number,reflect:!0,attribute:"message-line"})],Gt.prototype,"messageLine",void 0);w([L({type:Number,reflect:!0,attribute:"auto-close-delay"})],Gt.prototype,"autoCloseDelay",void 0);w([L({type:Boolean,reflect:!0,attribute:"close-on-outside-click",converter:we})],Gt.prototype,"closeOnOutsideClick",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Gt.prototype,"mobile",void 0);w([Re("open")],Gt.prototype,"onOpenChange",null);w([Re("placement",!0),Re("messageLine",!0)],Gt.prototype,"onStackChange",null);Gt=w([Ae("mdui-snackbar")],Gt);const x_=$e`:host{--shape-corner:var(--mdui-shape-corner-full);--shape-corner-thumb:var(--mdui-shape-corner-full);position:relative;display:inline-block;cursor:pointer;-webkit-tap-highlight-color:transparent;height:2.5rem}:host([disabled]:not([disabled=false i])){cursor:default;pointer-events:none}label{display:inline-flex;align-items:center;width:100%;height:100%;white-space:nowrap;cursor:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none}.track{position:relative;display:flex;align-items:center;border-radius:var(--shape-corner);transition-property:background-color,border-width;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard);height:2rem;width:3.25rem;border:.125rem solid rgb(var(--mdui-color-outline));background-color:rgb(var(--mdui-color-surface-container-highest))}:host([checked]:not([checked=false i])) .track{background-color:rgb(var(--mdui-color-primary));border-width:0}.invalid .track{background-color:rgb(var(--mdui-color-error-container));border-color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])) .track{background-color:rgba(var(--mdui-color-surface-container-highest),.12);border-color:rgba(var(--mdui-color-on-surface),.12)}:host([disabled][checked]:not([disabled=false i],[checked=false i])) .track{background-color:rgba(var(--mdui-color-on-surface),.12)}input{position:absolute;padding:0;opacity:0;pointer-events:none;width:1.25rem;height:1.25rem;margin:0 0 0 .625rem}mdui-ripple{border-radius:50%;transition-property:left,top;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard);width:2.5rem;height:2.5rem}.thumb{position:absolute;display:flex;align-items:center;justify-content:center;border-radius:var(--shape-corner-thumb);transition-property:width,height,left,background-color;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard);height:1rem;width:1rem;left:.375rem;background-color:rgb(var(--mdui-color-outline));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.thumb mdui-ripple{left:-.75rem;top:-.75rem}.has-unchecked-icon .thumb{height:1.5rem;width:1.5rem;left:.125rem}.has-unchecked-icon .thumb mdui-ripple{left:-.5rem;top:-.5rem}:host([focus-visible]) .thumb,:host([hover]) .thumb,:host([pressed]) .thumb{background-color:rgb(var(--mdui-color-on-surface-variant))}:host([checked]:not([checked=false i])) .thumb{height:1.5rem;width:1.5rem;left:1.5rem;background-color:rgb(var(--mdui-color-on-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([checked]:not([checked=false i])) .thumb mdui-ripple{left:-.5rem;top:-.5rem}:host([pressed]) .thumb{height:1.75rem;width:1.75rem;left:0}:host([pressed]) .thumb mdui-ripple{left:-.375rem;top:-.375rem}:host([pressed][checked]:not([checked=false i])) .thumb{left:1.375rem}:host([focus-visible][checked]:not([checked=false i])) .thumb,:host([hover][checked]:not([checked=false i])) .thumb,:host([pressed][checked]:not([checked=false i])) .thumb{background-color:rgb(var(--mdui-color-primary-container))}.invalid .thumb{background-color:rgb(var(--mdui-color-error));--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}:host([focus-visible]) .invalid .thumb,:host([hover]) .invalid .thumb,:host([pressed]) .invalid .thumb{background-color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])) .thumb{background-color:rgba(var(--mdui-color-on-surface),.38)}:host([disabled][checked]:not([disabled=false i],[checked=false i])) .thumb{background-color:rgb(var(--mdui-color-surface))}.checked-icon,.unchecked-icon{display:flex;position:absolute;transition-property:opacity,transform;font-size:1rem}.unchecked-icon{opacity:1;transform:scale(1);transition-delay:var(--mdui-motion-duration-short1);transition-duration:var(--mdui-motion-duration-short3);transition-timing-function:var(--mdui-motion-easing-linear);color:rgb(var(--mdui-color-surface-container-highest))}:host([checked]:not([checked=false i])) .unchecked-icon{opacity:0;transform:scale(.92);transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1)}:host([disabled]:not([disabled=false i])) .unchecked-icon{color:rgba(var(--mdui-color-surface-container-highest),.38)}.checked-icon{opacity:0;transform:scale(.92);transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1);transition-timing-function:var(--mdui-motion-easing-linear);color:rgb(var(--mdui-color-on-primary-container))}:host([checked]:not([checked=false i])) .checked-icon{opacity:1;transform:scale(1);transition-delay:var(--mdui-motion-duration-short1);transition-duration:var(--mdui-motion-duration-short3)}.invalid .checked-icon{color:rgb(var(--mdui-color-error-container))}:host([disabled]:not([disabled=false i])) .checked-icon{color:rgba(var(--mdui-color-on-surface),.38)}.checked-icon .i,.unchecked-icon .i,::slotted([slot=checked-icon]),::slotted([slot=unchecked-icon]){font-size:inherit;color:inherit}`;let Kt=class extends Di(bi(Ke)){constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.required=!1,this.name="",this.value="on",this.invalid=!1,this.rippleRef=Me(),this.inputRef=Me(),this.formController=new lr(this,{value:e=>e.checked?e.value:void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t}),this.hasSlotController=new $t(this,"unchecked-icon")}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}async onDisabledChange(){await this.updateComplete,this.invalid=!this.inputRef.value.checkValidity()}async onCheckedChange(){await this.updateComplete;const e=this.formController.getForm();e&&xt.get(e)?.has(this)?(this.invalid=!1,xt.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.blur(),this.focus())),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return Z`<label class="${bt({invalid:this.invalid,"has-unchecked-icon":this.uncheckedIcon||this.hasSlotController.test("unchecked-icon")})}"><input ${De(this.inputRef)} type="checkbox" name="${je(this.name)}" value="${je(this.value)}" .disabled="${this.disabled}" .checked="${Sn(this.checked)}" .required="${this.required}" @change="${this.onChange}"><div part="track" class="track"><div part="thumb" class="thumb"><mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple><slot name="checked-icon" part="checked-icon" class="checked-icon">${this.checkedIcon?Z`<mdui-icon name="${this.checkedIcon}" class="i"></mdui-icon>`:this.checkedIcon===""?Qe:Z`<mdui-icon-check class="i"></mdui-icon-check>`}</slot><slot name="unchecked-icon" part="unchecked-icon" class="unchecked-icon">${this.uncheckedIcon?Z`<mdui-icon name="${this.uncheckedIcon}" class="i"></mdui-icon>`:Qe}</slot></div></div></label>`}onChange(){this.checked=this.inputRef.value.checked,this.emit("change")}};Kt.styles=[qe,x_];w([L({type:Boolean,reflect:!0,converter:we})],Kt.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Kt.prototype,"checked",void 0);w([Ir("checked")],Kt.prototype,"defaultChecked",void 0);w([L({reflect:!0,attribute:"unchecked-icon"})],Kt.prototype,"uncheckedIcon",void 0);w([L({reflect:!0,attribute:"checked-icon"})],Kt.prototype,"checkedIcon",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Kt.prototype,"required",void 0);w([L({reflect:!0})],Kt.prototype,"form",void 0);w([L({reflect:!0})],Kt.prototype,"name",void 0);w([L({reflect:!0})],Kt.prototype,"value",void 0);w([Be()],Kt.prototype,"invalid",void 0);w([Re("disabled",!0),Re("required",!0)],Kt.prototype,"onDisabledChange",null);w([Re("checked",!0)],Kt.prototype,"onCheckedChange",null);Kt=w([Ae("mdui-switch")],Kt);const E_=$e`:host{position:relative;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([active]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}.container{display:flex;justify-content:center;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;height:100%}.preset{flex-direction:column;min-height:3rem;padding:.625rem 1rem}:host([inline]:not([inline=false i])) .preset{flex-direction:row}.icon-container,.label-container{position:relative;display:flex;align-items:center;justify-content:center}.icon-container ::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}.icon-container ::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}.label-container ::slotted([slot=badge]){position:absolute;left:100%;bottom:100%;transform:translate(-.75rem,.625rem)}.label-container ::slotted([slot=badge][variant=small]){transform:translate(-.375rem,.375rem)}.icon,.label{display:flex;color:rgb(var(--mdui-color-on-surface-variant))}:host([focused]) .icon,:host([focused]) .label,:host([hover]) .icon,:host([hover]) .label,:host([pressed]) .icon,:host([pressed]) .label{color:rgb(var(--mdui-color-on-surface))}:host([active]) .icon,:host([active]) .label{color:rgb(var(--mdui-color-primary))}:host([active]) .variant-secondary .icon,:host([active]) .variant-secondary .label{color:rgb(var(--mdui-color-on-surface))}.icon{font-size:1.5rem}.label{font-size:var(--mdui-typescale-title-small-size);font-weight:var(--mdui-typescale-title-small-weight);letter-spacing:var(--mdui-typescale-title-small-tracking);line-height:var(--mdui-typescale-title-small-line-height)}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit;color:inherit}`;let wr=class extends Di(bi(Ke)){constructor(){super(...arguments),this.inline=!1,this.active=!1,this.variant="primary",this.key=Sr(),this.rippleRef=Me(),this.hasSlotController=new $t(this,"icon","custom")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return!1}get focusElement(){return this}get focusDisabled(){return!1}render(){const e=this.icon||this.hasSlotController.test("icon"),t=this.hasSlotController.test("custom"),r=()=>Z`<slot name="badge"></slot>`;return Z`<mdui-ripple ${De(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple><div part="container" class="${bt({container:!0,preset:!t,"variant-secondary":this.variant==="secondary"})}"><slot name="custom"><div class="icon-container">${at(e||this.icon,r)}<slot name="icon" part="icon" class="icon">${this.icon?Z`<mdui-icon name="${this.icon}"></mdui-icon>`:Qe}</slot></div><div class="label-container">${at(!e,r)}<slot part="label" class="label"></slot></div></slot></div>`}};wr.styles=[qe,E_];w([L({reflect:!0})],wr.prototype,"value",void 0);w([L({reflect:!0})],wr.prototype,"icon",void 0);w([L({type:Boolean,reflect:!0,converter:we})],wr.prototype,"inline",void 0);w([L({type:Boolean,reflect:!0,converter:we})],wr.prototype,"active",void 0);w([Be()],wr.prototype,"variant",void 0);wr=w([Ae("mdui-tab")],wr);const S_=$e`:host{display:block;overflow-y:auto;flex:1 1 auto}:host(:not([active])){display:none}`;let Os=class extends Ke{constructor(){super(...arguments),this.active=!1}render(){return Z`<slot></slot>`}};Os.styles=[qe,S_];w([L({reflect:!0})],Os.prototype,"value",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Os.prototype,"active",void 0);Os=w([Ae("mdui-tab-panel")],Os);const k_=$e`:host{position:relative;display:flex}:host([placement^=top]){flex-direction:column}:host([placement^=bottom]){flex-direction:column-reverse}:host([placement^=left]){flex-direction:row}:host([placement^=right]){flex-direction:row-reverse}.container{position:relative;display:flex;flex:0 0 auto;overflow-x:auto;background-color:rgb(var(--mdui-color-surface))}:host([placement^=bottom]) .container,:host([placement^=top]) .container{flex-direction:row}:host([placement^=left]) .container,:host([placement^=right]) .container{flex-direction:column}:host([placement$='-start']) .container{justify-content:flex-start}:host([placement=bottom]) .container,:host([placement=left]) .container,:host([placement=right]) .container,:host([placement=top]) .container{justify-content:center}:host([placement$='-end']) .container{justify-content:flex-end}.container::after{content:' ';position:absolute;background-color:rgb(var(--mdui-color-surface-variant))}:host([placement^=bottom]) .container::after,:host([placement^=top]) .container::after{left:0;width:100%;height:.0625rem}:host([placement^=top]) .container::after{bottom:0}:host([placement^=bottom]) .container::after{top:0}:host([placement^=left]) .container::after,:host([placement^=right]) .container::after{top:0;height:100%;width:.0625rem}:host([placement^=left]) .container::after{right:0}:host([placement^=right]) .container::after{left:0}.indicator{position:absolute;z-index:1;background-color:rgb(var(--mdui-color-primary))}.container:not(.initial) .indicator{transition-duration:var(--mdui-motion-duration-medium2);transition-timing-function:var(--mdui-motion-easing-standard-decelerate)}:host([placement^=bottom]) .indicator,:host([placement^=top]) .indicator{transition-property:transform,left,width}:host([placement^=left]) .indicator,:host([placement^=right]) .indicator{transition-property:transform,top,height}:host([placement^=top]) .indicator{bottom:0}:host([placement^=bottom]) .indicator{top:0}:host([placement^=left]) .indicator{right:0}:host([placement^=right]) .indicator{left:0}:host([placement^=bottom][variant=primary]) .indicator,:host([placement^=top][variant=primary]) .indicator{height:.1875rem}:host([placement^=bottom][variant=secondary]) .indicator,:host([placement^=top][variant=secondary]) .indicator{height:.125rem}:host([placement^=left][variant=primary]) .indicator,:host([placement^=right][variant=primary]) .indicator{width:.1875rem}:host([placement^=left][variant=secondary]) .indicator,:host([placement^=right][variant=secondary]) .indicator{width:.125rem}:host([placement^=top][variant=primary]) .indicator{border-top-left-radius:.1875rem;border-top-right-radius:.1875rem}:host([placement^=bottom][variant=primary]) .indicator{border-bottom-right-radius:.1875rem;border-bottom-left-radius:.1875rem}:host([placement^=left][variant=primary]) .indicator{border-top-left-radius:.1875rem;border-bottom-left-radius:.1875rem}:host([placement^=right][variant=primary]) .indicator{border-top-right-radius:.1875rem;border-bottom-right-radius:.1875rem}:host([full-width]:not([full-width=false i])) ::slotted(mdui-tab){flex:1}`;let si=class extends Ke{constructor(){super(...arguments),this.variant="primary",this.placement="top-start",this.fullWidth=!1,this.activeKey=0,this.isInitial=!0,this.containerRef=Me(),this.indicatorRef=Me(),this.definedController=new At(this,{relatedElements:["mdui-tab","mdui-tab-panel"]})}async onActiveKeyChange(){await this.definedController.whenDefined(),this.value=this.tabs.find(e=>e.key===this.activeKey)?.value,this.updateActive(),this.isInitial||this.emit("change")}async onValueChange(){this.isInitial=!this.hasUpdated,await this.definedController.whenDefined();const e=this.tabs.find(t=>t.value===this.value);this.activeKey=e?.key??0}async onIndicatorChange(){await this.updateComplete,this.updateIndicator()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.observeResize=kr(this.containerRef.value,()=>this.updateIndicator())})}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve()}render(){return Z`<div ${De(this.containerRef)} part="container" class="container ${bt({initial:this.isInitial})}"><slot @slotchange="${this.onSlotChange}" @click="${this.onClick}"></slot><div ${De(this.indicatorRef)} part="indicator" class="indicator"></div></div><slot name="panel" @slotchange="${this.onSlotChange}"></slot>`}async onSlotChange(){await this.definedController.whenDefined(),this.updateActive()}async onClick(e){if(e.button)return;await this.definedController.whenDefined();const r=e.target.closest("mdui-tab");r&&(this.activeKey=r.key,this.isInitial=!1,this.updateActive())}updateActive(){this.activeTab=this.tabs.map(e=>(e.active=this.activeKey===e.key,e)).find(e=>e.active),this.panels.forEach(e=>e.active=e.value===this.activeTab?.value),this.updateIndicator()}updateIndicator(){const e=this.activeTab,t=oe(this.indicatorRef.value),r=this.placement.startsWith("left")||this.placement.startsWith("right");if(!e){t.css({transform:r?"scaleY(0)":"scaleX(0)"});return}const n=oe(e),s=e.offsetTop,o=e.offsetLeft,a=r?{transform:"scaleY(1)",width:"",left:""}:{transform:"scaleX(1)",height:"",top:""};let c={};if(this.variant==="primary"){const l=n.find(':scope > [slot="custom"]'),d=l.length?l.get():oe(e.renderRoot).find('slot[name="custom"]').children().get();if(r){const u=Math.min(...d.map(g=>g.offsetTop))+s,p=Math.max(...d.map(g=>g.offsetTop+g.offsetHeight))+s;c={top:u,height:p-u}}else{const u=Math.min(...d.map(g=>g.offsetLeft))+o,p=Math.max(...d.map(g=>g.offsetLeft+g.offsetWidth))+o;c={left:u,width:p-u}}}this.variant==="secondary"&&(c=r?{top:s,height:e.offsetHeight}:{left:o,width:e.offsetWidth}),t.css({...a,...c})}};si.styles=[qe,k_];w([L({reflect:!0})],si.prototype,"variant",void 0);w([L({reflect:!0})],si.prototype,"value",void 0);w([L({reflect:!0})],si.prototype,"placement",void 0);w([L({type:Boolean,reflect:!0,converter:we,attribute:"full-width"})],si.prototype,"fullWidth",void 0);w([Be()],si.prototype,"activeKey",void 0);w([Be()],si.prototype,"isInitial",void 0);w([gi({selector:"mdui-tab",flatten:!0})],si.prototype,"tabs",void 0);w([gi({selector:"mdui-tab-panel",slot:"panel",flatten:!0})],si.prototype,"panels",void 0);w([Re("activeKey",!0)],si.prototype,"onActiveKeyChange",null);w([Re("value")],si.prototype,"onValueChange",null);w([Re("variant",!0),Re("placement",!0),Re("fullWidth",!0)],si.prototype,"onIndicatorChange",null);si=w([Ae("mdui-tabs")],si);class R_{constructor(e,t){this.isHover=!1,this.uniqueID=Sr(),this.enterEventName=`mouseenter.${this.uniqueID}.hoverController`,this.leaveEventName=`mouseleave.${this.uniqueID}.hoverController`,this.mouseEnterItems=[],this.mouseLeaveItems=[],(this.host=e).addController(this),this.elementRef=t}hostConnected(){this.host.updateComplete.then(()=>{oe(this.elementRef.value).on(this.enterEventName,()=>{this.isHover=!0;for(let e=this.mouseEnterItems.length-1;e>=0;e--){const t=this.mouseEnterItems[e];t.callback(),t.one&&this.mouseEnterItems.splice(e,1)}}).on(this.leaveEventName,()=>{this.isHover=!1;for(let e=this.mouseLeaveItems.length-1;e>=0;e--){const t=this.mouseLeaveItems[e];t.callback(),t.one&&this.mouseLeaveItems.splice(e,1)}})})}hostDisconnected(){oe(this.elementRef.value).off(this.enterEventName).off(this.leaveEventName)}onMouseEnter(e,t=!1){this.mouseEnterItems.push({callback:e,one:t})}onMouseLeave(e,t=!1){this.mouseLeaveItems.push({callback:e,one:t})}}const I_=$e`:host{--shape-corner-plain:var(--mdui-shape-corner-extra-small);--shape-corner-rich:var(--mdui-shape-corner-medium);--z-index:2500;display:contents}.popup{position:fixed;display:flex;flex-direction:column;z-index:var(--z-index);border-radius:var(--shape-corner-plain);background-color:rgb(var(--mdui-color-inverse-surface));padding:0 .5rem;min-width:1.75rem;max-width:20rem}:host([variant=rich]) .popup{border-radius:var(--shape-corner-rich);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);padding:.75rem 1rem .5rem 1rem}.headline{display:flex;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-title-small-size);font-weight:var(--mdui-typescale-title-small-weight);letter-spacing:var(--mdui-typescale-title-small-tracking);line-height:var(--mdui-typescale-title-small-line-height)}.content{display:flex;padding:.25rem 0;color:rgb(var(--mdui-color-inverse-on-surface));font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}:host([variant=rich]) .content{color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}.action{display:flex;justify-content:flex-start;padding-top:.5rem}.action ::slotted(:not(:last-child)){margin-right:.5rem}`;let oi=class extends Ke{constructor(){super(),this.variant="plain",this.placement="auto",this.openDelay=150,this.closeDelay=150,this.trigger="hover focus",this.disabled=!1,this.open=!1,this.popupRef=Me(),this.hasSlotController=new $t(this,"headline","action"),this.hoverController=new R_(this,this.popupRef),this.definedController=new At(this,{needDomReady:!0}),this.onDocumentClick=this.onDocumentClick.bind(this),this.onWindowScroll=this.onWindowScroll.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this)}get target(){return[...this.children].find(e=>e.tagName.toLowerCase()!=="style"&&e.getAttribute("slot")!=="content")}async onPositionChange(){this.open&&(await this.definedController.whenDefined(),this.updatePositioner())}async onOpenChange(){const e=this.hasUpdated,t=$i(this,"short4"),r=ti(this,"standard");if(this.open){if(await this.definedController.whenDefined(),oe(`mdui-tooltip[variant="${this.variant}"]`).filter((n,s)=>s!==this).prop("open",!1),e||await this.updateComplete,e&&!this.emit("open",{cancelable:!0}))return;await Zt(this.popupRef.value),this.popupRef.value.hidden=!1,this.updatePositioner(),await st(this.popupRef.value,[{transform:"scale(0)"},{transform:"scale(1)"}],{duration:e?t:0,easing:r}),e&&this.emit("opened");return}if(!this.open&&e){if(!this.emit("close",{cancelable:!0}))return;await Zt(this.popupRef.value),await st(this.popupRef.value,[{transform:"scale(1)"},{transform:"scale(0)"}],{duration:t,easing:r}),this.popupRef.value.hidden=!0,this.emit("closed")}}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.onDocumentClick),this.definedController.whenDefined().then(()=>{this.overflowAncestors=Lo(this.target),this.overflowAncestors.forEach(e=>{e.addEventListener("scroll",this.onWindowScroll)}),this.observeResize=kr(this.target,()=>{this.updatePositioner()})})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),this.overflowAncestors?.forEach(e=>{e.removeEventListener("scroll",this.onWindowScroll)}),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.definedController.whenDefined().then(()=>{const t=this.target;t.addEventListener("focus",this.onFocus),t.addEventListener("blur",this.onBlur),t.addEventListener("pointerdown",this.onClick),t.addEventListener("keydown",this.onKeydown),t.addEventListener("mouseenter",this.onMouseEnter),t.addEventListener("mouseleave",this.onMouseLeave)})}render(){const e=this.isRich()&&(this.headline||this.hasSlotController.test("headline")),t=this.isRich()&&this.hasSlotController.test("action");return Z`<slot></slot><div ${De(this.popupRef)} part="popup" class="popup" hidden>${at(e,()=>Z`<slot name="headline" part="headline" class="headline">${this.headline}</slot>`)}<slot name="content" part="content" class="content">${this.content}</slot>${at(t,()=>Z`<slot name="action" part="action" class="action"></slot>`)}</div>`}isRich(){return this.variant==="rich"}requestClose(){if(!this.hoverController.isHover){this.open=!1;return}this.hoverController.onMouseLeave(()=>{this.hasTrigger("hover")?this.hoverTimeout=window.setTimeout(()=>{this.open=!1},this.closeDelay||50):this.open=!1},!0)}hasTrigger(e){return this.trigger.split(" ").includes(e)}onFocus(){this.disabled||this.open||!this.hasTrigger("focus")||(this.open=!0)}onBlur(){this.disabled||!this.open||!this.hasTrigger("focus")||this.requestClose()}onClick(e){this.disabled||e.button||!this.hasTrigger("click")||this.open&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.open=!this.open)}onKeydown(e){this.disabled||!this.open||e.key!=="Escape"||(e.stopPropagation(),this.requestClose())}onMouseEnter(){this.disabled||this.open||!this.hasTrigger("hover")||(this.openDelay?(window.clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>{this.open=!0},this.openDelay)):this.open=!0)}onMouseLeave(){window.clearTimeout(this.hoverTimeout),!(this.disabled||!this.open||!this.hasTrigger("hover"))&&(this.hoverTimeout=window.setTimeout(()=>{this.requestClose()},this.closeDelay||50))}onDocumentClick(e){if(this.disabled||!this.open)return;e.composedPath().includes(this)||this.requestClose()}onWindowScroll(){window.requestAnimationFrame(()=>this.updatePositioner())}updatePositioner(){const e=oe(this.popupRef.value),t=this.isRich()?0:4,r=4,n=this.target.getBoundingClientRect(),s=n.top,o=n.left,a=n.height,c=n.width,l=this.popupRef.value.offsetHeight,d=this.popupRef.value.offsetWidth,u=d+t+r,p=l+t+r;let g,v,_,E,x=this.placement;if(x==="auto"){const h=oe(window),m=s>p,T=h.height()-s-a>p,N=o>u,C=h.width()-o-c>u;this.isRich()?(x="bottom-right",T&&C?x="bottom-right":T&&N?x="bottom-left":m&&C?x="top-right":m&&N?x="top-left":T?x="bottom":m?x="top":C?x="right":N&&(x="left")):(x="top",m?x="top":T?x="bottom":N?x="left":C&&(x="right"))}const[k,y]=x.split("-");switch(k){case"top":v="bottom",_=s-l-t;break;case"bottom":v="top",_=s+a+t;break;default:switch(v="center",y){case"start":_=s;break;case"end":_=s+a-l;break;default:_=s+a/2-l/2;break}break}switch(k){case"left":g="right",E=o-d-t;break;case"right":g="left",E=o+c+t;break;default:switch(g="center",y){case"start":E=o;break;case"end":E=o+c-d;break;case"left":g="right",E=o-d-t;break;case"right":g="left",E=o+c+t;break;default:E=o+c/2-d/2;break}break}e.css({top:_,left:E,transformOrigin:[g,v].join(" ")})}};oi.styles=[qe,I_];w([L({reflect:!0})],oi.prototype,"variant",void 0);w([L({reflect:!0})],oi.prototype,"placement",void 0);w([L({type:Number,reflect:!0,attribute:"open-delay"})],oi.prototype,"openDelay",void 0);w([L({type:Number,reflect:!0,attribute:"close-delay"})],oi.prototype,"closeDelay",void 0);w([L({reflect:!0})],oi.prototype,"headline",void 0);w([L({reflect:!0})],oi.prototype,"content",void 0);w([L({reflect:!0})],oi.prototype,"trigger",void 0);w([L({type:Boolean,reflect:!0,converter:we})],oi.prototype,"disabled",void 0);w([L({type:Boolean,reflect:!0,converter:we})],oi.prototype,"open",void 0);w([Re("placement",!0),Re("content",!0)],oi.prototype,"onPositionChange",null);w([Re("open")],oi.prototype,"onOpenChange",null);oi=w([Ae("mdui-tooltip")],oi);const T_=i=>{const e=i.assignedNodes({flatten:!0});let t="";return[...e].forEach(r=>{r.nodeType===Node.ELEMENT_NODE&&(t+=r.outerHTML),r.nodeType===Node.TEXT_NODE&&(t+=r.textContent)}),t},C_=$e`:host{display:block;width:100%;flex-shrink:initial!important;overflow:hidden;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-title-large-size);font-weight:var(--mdui-typescale-title-large-weight);letter-spacing:var(--mdui-typescale-title-large-tracking);line-height:var(--mdui-typescale-title-large-line-height);line-height:2.5rem}.label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:1;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear)}.label.variant-center-aligned{text-align:center}.label.variant-large:not(.shrink),.label.variant-medium:not(.shrink){opacity:0}.label.variant-large.shrink,.label.variant-medium.shrink{transition-delay:var(--mdui-motion-duration-short2)}.label-large{display:none;position:absolute;width:100%;left:0;margin-right:0;padding:0 1rem;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear)}.label-large.variant-large,.label-large.variant-medium{display:block}.label-large.variant-medium{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;bottom:.75rem;font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.label-large.variant-large{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;bottom:1.25rem;font-size:var(--mdui-typescale-headline-medium-size);font-weight:var(--mdui-typescale-headline-medium-weight);letter-spacing:var(--mdui-typescale-headline-medium-tracking);line-height:var(--mdui-typescale-headline-medium-line-height)}.label-large.variant-large:not(.shrink),.label-large.variant-medium:not(.shrink){opacity:1;transition-delay:var(--mdui-motion-duration-short2)}.label-large.variant-large.shrink,.label-large.variant-medium.shrink{opacity:0;z-index:-1}`;let Ps=class extends Ke{constructor(){super(...arguments),this.variant="small",this.shrink=!1,this.hasSlotController=new $t(this,"label-large"),this.labelLargeRef=Me(),this.defaultSlotRef=Me()}render(){const e=this.hasSlotController.test("label-large"),t=bt({shrink:this.shrink,"variant-center-aligned":this.variant==="center-aligned","variant-small":this.variant==="small","variant-medium":this.variant==="medium","variant-large":this.variant==="large"});return Z`<slot part="label" class="label ${t}" ${De(this.defaultSlotRef)} @slotchange="${()=>this.onSlotChange(e)}"></slot>${e?Z`<slot name="label-large" part="label-large" class="label-large ${t}"></slot>`:Z`<div ${De(this.labelLargeRef)} part="label-large" class="label-large ${t}"></div>`}`}onSlotChange(e){e||(this.labelLargeRef.value.innerHTML=T_(this.defaultSlotRef.value))}};Ps.styles=[qe,C_];w([Be()],Ps.prototype,"variant",void 0);w([Be()],Ps.prototype,"shrink",void 0);Ps=w([Ae("mdui-top-app-bar-title")],Ps);const $_=$e`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;top:0;right:0;left:0;display:flex;flex:0 0 auto;align-items:flex-start;justify-content:flex-start;border-bottom-left-radius:var(--shape-corner);border-bottom-right-radius:var(--shape-corner);z-index:var(--z-index);transition:top var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),height var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear),background-color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);padding:.75rem .5rem;height:4rem;background-color:rgb(var(--mdui-color-surface))}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([scroll-behavior~=shrink]){transition-duration:var(--mdui-motion-duration-short4)}:host([scrolling]){background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2)}::slotted(mdui-button-icon){color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}::slotted(mdui-button-icon:first-child){color:rgb(var(--mdui-color-on-surface))}::slotted(mdui-avatar){width:1.875rem;height:1.875rem;margin-top:.3125rem;margin-bottom:.3125rem}::slotted(*){flex-shrink:0}::slotted(:not(:last-child)){margin-right:.5rem}:host([variant=medium]){height:7rem}:host([variant=large]){height:9.5rem}:host([hide]:not([hide=false i])){transition-duration:var(--mdui-motion-duration-short4);top:-4.625rem}:host([hide][variant=medium]:not([hide=false i])){top:-7.625rem}:host([hide][variant=large]:not([hide=false i])){top:-10.125rem}:host([shrink][variant=large]:not([shrink=false i])),:host([shrink][variant=medium]:not([shrink=false i])){transition-duration:var(--mdui-motion-duration-short4);height:4rem}`;let Ai=class extends Ed(Rr){constructor(){super(...arguments),this.variant="small",this.hide=!1,this.shrink=!1,this.scrolling=!1,this.definedController=new At(this,{relatedElements:["mdui-top-app-bar-title"]})}get scrollPaddingPosition(){return"top"}get layoutPlacement(){return"top"}async onVariantChange(){this.hasUpdated?this.addEventListener("transitionend",async()=>{await this.scrollBehaviorDefinedController.whenDefined(),this.setContainerPadding("update",this.scrollTarget)},{once:!0}):await this.updateComplete,await this.definedController.whenDefined(),this.titleElements.forEach(e=>{e.variant=this.variant})}async onShrinkChange(){this.hasUpdated||await this.updateComplete,await this.definedController.whenDefined(),this.titleElements.forEach(e=>{e.shrink=this.shrink})}firstUpdated(e){super.firstUpdated(e),this.addEventListener("transitionend",t=>{t.target===this&&this.emit(this.hide?"hidden":"shown")})}render(){return Z`<slot></slot>`}runScrollNoThreshold(e,t){this.hasScrollBehavior("shrink")&&e&&t<8&&(this.shrink=!1)}runScrollThreshold(e,t){this.hasScrollBehavior("elevate")&&(this.scrolling=!!t),this.hasScrollBehavior("shrink")&&(e||(this.shrink=!0)),this.hasScrollBehavior("hide")&&(!e&&!this.hide&&this.emit("hide",{cancelable:!0})&&(this.hide=!0),e&&this.hide&&this.emit("show",{cancelable:!0})&&(this.hide=!1))}};Ai.styles=[qe,$_];w([L({reflect:!0})],Ai.prototype,"variant",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ai.prototype,"hide",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ai.prototype,"shrink",void 0);w([L({reflect:!0,attribute:"scroll-behavior"})],Ai.prototype,"scrollBehavior",void 0);w([L({type:Boolean,reflect:!0,converter:we})],Ai.prototype,"scrolling",void 0);w([gi({selector:"mdui-top-app-bar-title",flatten:!0})],Ai.prototype,"titleElements",void 0);w([Re("variant")],Ai.prototype,"onVariantChange",null);w([Re("shrink")],Ai.prototype,"onShrinkChange",null);Ai=w([Ae("mdui-top-app-bar")],Ai);/**
493
493
  * @license
494
494
  * Copyright 2021 Google LLC
495
495
  *
@@ -504,7 +504,7 @@ if("@preserve"in h)return h["@preserve"][0];if(e.isValue(h))return h;if(e.isList
504
504
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
505
505
  * See the License for the specific language governing permissions and
506
506
  * limitations under the License.
507
- */function Yt(i){return i<0?-1:i===0?0:1}function ks(i,e,t){return(1-t)*i+t*e}function N_(i,e,t){return t<i?i:t>e?e:t}function Po(i,e,t){return t<i?i:t>e?e:t}function D_(i){return i=i%360,i<0&&(i=i+360),i}function Cc(i,e){const t=i[0]*e[0][0]+i[1]*e[0][1]+i[2]*e[0][2],r=i[0]*e[1][0]+i[1]*e[1][1]+i[2]*e[1][2],n=i[0]*e[2][0]+i[1]*e[2][1]+i[2]*e[2][2];return[t,r,n]}/**
507
+ */function Yt(i){return i<0?-1:i===0?0:1}function ks(i,e,t){return(1-t)*i+t*e}function A_(i,e,t){return t<i?i:t>e?e:t}function Po(i,e,t){return t<i?i:t>e?e:t}function N_(i){return i=i%360,i<0&&(i=i+360),i}function Cc(i,e){const t=i[0]*e[0][0]+i[1]*e[0][1]+i[2]*e[0][2],r=i[0]*e[1][0]+i[1]*e[1][1]+i[2]*e[1][2],n=i[0]*e[2][0]+i[1]*e[2][1]+i[2]*e[2][2];return[t,r,n]}/**
508
508
  * @license
509
509
  * Copyright 2021 Google LLC
510
510
  *
@@ -519,7 +519,7 @@ if("@preserve"in h)return h["@preserve"][0];if(e.isValue(h))return h;if(e.isList
519
519
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
520
520
  * See the License for the specific language governing permissions and
521
521
  * limitations under the License.
522
- */const L_=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],O_=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],P_=[95.047,100,108.883];function Rd(i,e,t){return(255<<24|(i&255)<<16|(e&255)<<8|t&255)>>>0}function Pf(i){const e=Br(i[0]),t=Br(i[1]),r=Br(i[2]);return Rd(e,t,r)}function M_(i){return i>>16&255}function F_(i){return i>>8&255}function j_(i){return i&255}function B_(i,e,t){const r=O_,n=r[0][0]*i+r[0][1]*e+r[0][2]*t,s=r[1][0]*i+r[1][1]*e+r[1][2]*t,o=r[2][0]*i+r[2][1]*e+r[2][2]*t,a=Br(n),c=Br(s),l=Br(o);return Rd(a,c,l)}function q_(i){const e=fn(M_(i)),t=fn(F_(i)),r=fn(j_(i));return Cc([e,t,r],L_)}function U_(i){const e=gr(i),t=Br(e);return Rd(t,t,t)}function Mf(i){const e=q_(i)[1];return 116*Rm(e/100)-16}function gr(i){return 100*z_((i+16)/116)}function $c(i){return Rm(i/100)*116-16}function fn(i){const e=i/255;return e<=.040449936?e/12.92*100:Math.pow((e+.055)/1.055,2.4)*100}function Br(i){const e=i/100;let t=0;return e<=.0031308?t=e*12.92:t=1.055*Math.pow(e,1/2.4)-.055,N_(0,255,Math.round(t*255))}function V_(){return P_}function Rm(i){const e=.008856451679035631,t=24389/27;return i>e?Math.pow(i,1/3):(t*i+16)/116}function z_(i){const e=.008856451679035631,t=24389/27,r=i*i*i;return r>e?r:(116*i-16)/t}/**
522
+ */const D_=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],L_=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],O_=[95.047,100,108.883];function Rd(i,e,t){return(255<<24|(i&255)<<16|(e&255)<<8|t&255)>>>0}function Pf(i){const e=Br(i[0]),t=Br(i[1]),r=Br(i[2]);return Rd(e,t,r)}function P_(i){return i>>16&255}function M_(i){return i>>8&255}function F_(i){return i&255}function j_(i,e,t){const r=L_,n=r[0][0]*i+r[0][1]*e+r[0][2]*t,s=r[1][0]*i+r[1][1]*e+r[1][2]*t,o=r[2][0]*i+r[2][1]*e+r[2][2]*t,a=Br(n),c=Br(s),l=Br(o);return Rd(a,c,l)}function B_(i){const e=fn(P_(i)),t=fn(M_(i)),r=fn(F_(i));return Cc([e,t,r],D_)}function q_(i){const e=gr(i),t=Br(e);return Rd(t,t,t)}function Mf(i){const e=B_(i)[1];return 116*Rm(e/100)-16}function gr(i){return 100*V_((i+16)/116)}function $c(i){return Rm(i/100)*116-16}function fn(i){const e=i/255;return e<=.040449936?e/12.92*100:Math.pow((e+.055)/1.055,2.4)*100}function Br(i){const e=i/100;let t=0;return e<=.0031308?t=e*12.92:t=1.055*Math.pow(e,1/2.4)-.055,A_(0,255,Math.round(t*255))}function U_(){return O_}function Rm(i){const e=.008856451679035631,t=24389/27;return i>e?Math.pow(i,1/3):(t*i+16)/116}function V_(i){const e=.008856451679035631,t=24389/27,r=i*i*i;return r>e?r:(116*i-16)/t}/**
523
523
  * @license
524
524
  * Copyright 2021 Google LLC
525
525
  *
@@ -534,7 +534,7 @@ if("@preserve"in h)return h["@preserve"][0];if(e.isValue(h))return h;if(e.isList
534
534
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
535
535
  * See the License for the specific language governing permissions and
536
536
  * limitations under the License.
537
- */class ji{static make(e=V_(),t=200/Math.PI*gr(50)/100,r=50,n=2,s=!1){const o=e,a=o[0]*.401288+o[1]*.650173+o[2]*-.051461,c=o[0]*-.250268+o[1]*1.204414+o[2]*.045854,l=o[0]*-.002079+o[1]*.048952+o[2]*.953127,d=.8+n/10,u=d>=.9?ks(.59,.69,(d-.9)*10):ks(.525,.59,(d-.8)*10);let p=s?1:d*(1-1/3.6*Math.exp((-t-42)/92));p=p>1?1:p<0?0:p;const g=d,v=[p*(100/a)+1-p,p*(100/c)+1-p,p*(100/l)+1-p],_=1/(5*t+1),E=_*_*_*_,x=1-E,k=E*t+.1*x*x*Math.cbrt(5*t),y=gr(r)/e[1],h=1.48+Math.sqrt(y),m=.725/Math.pow(y,.2),T=m,N=[Math.pow(k*v[0]*a/100,.42),Math.pow(k*v[1]*c/100,.42),Math.pow(k*v[2]*l/100,.42)],C=[400*N[0]/(N[0]+27.13),400*N[1]/(N[1]+27.13),400*N[2]/(N[2]+27.13)],F=(2*C[0]+C[1]+.05*C[2])*m;return new ji(y,F,m,T,u,g,v,k,Math.pow(k,.25),h)}constructor(e,t,r,n,s,o,a,c,l,d){this.n=e,this.aw=t,this.nbb=r,this.ncb=n,this.c=s,this.nc=o,this.rgbD=a,this.fl=c,this.fLRoot=l,this.z=d}}ji.DEFAULT=ji.make();/**
537
+ */class ji{static make(e=U_(),t=200/Math.PI*gr(50)/100,r=50,n=2,s=!1){const o=e,a=o[0]*.401288+o[1]*.650173+o[2]*-.051461,c=o[0]*-.250268+o[1]*1.204414+o[2]*.045854,l=o[0]*-.002079+o[1]*.048952+o[2]*.953127,d=.8+n/10,u=d>=.9?ks(.59,.69,(d-.9)*10):ks(.525,.59,(d-.8)*10);let p=s?1:d*(1-1/3.6*Math.exp((-t-42)/92));p=p>1?1:p<0?0:p;const g=d,v=[p*(100/a)+1-p,p*(100/c)+1-p,p*(100/l)+1-p],_=1/(5*t+1),E=_*_*_*_,x=1-E,k=E*t+.1*x*x*Math.cbrt(5*t),y=gr(r)/e[1],h=1.48+Math.sqrt(y),m=.725/Math.pow(y,.2),T=m,N=[Math.pow(k*v[0]*a/100,.42),Math.pow(k*v[1]*c/100,.42),Math.pow(k*v[2]*l/100,.42)],C=[400*N[0]/(N[0]+27.13),400*N[1]/(N[1]+27.13),400*N[2]/(N[2]+27.13)],F=(2*C[0]+C[1]+.05*C[2])*m;return new ji(y,F,m,T,u,g,v,k,Math.pow(k,.25),h)}constructor(e,t,r,n,s,o,a,c,l,d){this.n=e,this.aw=t,this.nbb=r,this.ncb=n,this.c=s,this.nc=o,this.rgbD=a,this.fl=c,this.fLRoot=l,this.z=d}}ji.DEFAULT=ji.make();/**
538
538
  * @license
539
539
  * Copyright 2021 Google LLC
540
540
  *
@@ -549,7 +549,7 @@ if("@preserve"in h)return h["@preserve"][0];if(e.isValue(h))return h;if(e.isList
549
549
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
550
550
  * See the License for the specific language governing permissions and
551
551
  * limitations under the License.
552
- */class li{constructor(e,t,r,n,s,o,a,c,l){this.hue=e,this.chroma=t,this.j=r,this.q=n,this.m=s,this.s=o,this.jstar=a,this.astar=c,this.bstar=l}distance(e){const t=this.jstar-e.jstar,r=this.astar-e.astar,n=this.bstar-e.bstar,s=Math.sqrt(t*t+r*r+n*n);return 1.41*Math.pow(s,.63)}static fromInt(e){return li.fromIntInViewingConditions(e,ji.DEFAULT)}static fromIntInViewingConditions(e,t){const r=(e&16711680)>>16,n=(e&65280)>>8,s=e&255,o=fn(r),a=fn(n),c=fn(s),l=.41233895*o+.35762064*a+.18051042*c,d=.2126*o+.7152*a+.0722*c,u=.01932141*o+.11916382*a+.95034478*c,p=.401288*l+.650173*d-.051461*u,g=-.250268*l+1.204414*d+.045854*u,v=-.002079*l+.048952*d+.953127*u,_=t.rgbD[0]*p,E=t.rgbD[1]*g,x=t.rgbD[2]*v,k=Math.pow(t.fl*Math.abs(_)/100,.42),y=Math.pow(t.fl*Math.abs(E)/100,.42),h=Math.pow(t.fl*Math.abs(x)/100,.42),m=Yt(_)*400*k/(k+27.13),T=Yt(E)*400*y/(y+27.13),N=Yt(x)*400*h/(h+27.13),C=(11*m+-12*T+N)/11,F=(m+T-2*N)/9,I=(20*m+20*T+21*N)/20,O=(40*m+20*T+N)/20,R=Math.atan2(F,C)*180/Math.PI,D=R<0?R+360:R>=360?R-360:R,Q=D*Math.PI/180,$=O*t.nbb,Y=100*Math.pow($/t.aw,t.c*t.z),B=4/t.c*Math.sqrt(Y/100)*(t.aw+4)*t.fLRoot,re=D<20.14?D+360:D,S=.25*(Math.cos(re*Math.PI/180+2)+3.8),ee=5e4/13*S*t.nc*t.ncb*Math.sqrt(C*C+F*F)/(I+.305),J=Math.pow(ee,.9)*Math.pow(1.64-Math.pow(.29,t.n),.73),he=J*Math.sqrt(Y/100),W=he*t.fLRoot,G=50*Math.sqrt(J*t.c/(t.aw+4)),X=(1+100*.007)*Y/(1+.007*Y),z=1/.0228*Math.log(1+.0228*W),ne=z*Math.cos(Q),se=z*Math.sin(Q);return new li(D,he,Y,B,W,G,X,ne,se)}static fromJch(e,t,r){return li.fromJchInViewingConditions(e,t,r,ji.DEFAULT)}static fromJchInViewingConditions(e,t,r,n){const s=4/n.c*Math.sqrt(e/100)*(n.aw+4)*n.fLRoot,o=t*n.fLRoot,a=t/Math.sqrt(e/100),c=50*Math.sqrt(a*n.c/(n.aw+4)),l=r*Math.PI/180,d=(1+100*.007)*e/(1+.007*e),u=1/.0228*Math.log(1+.0228*o),p=u*Math.cos(l),g=u*Math.sin(l);return new li(r,t,e,s,o,c,d,p,g)}static fromUcs(e,t,r){return li.fromUcsInViewingConditions(e,t,r,ji.DEFAULT)}static fromUcsInViewingConditions(e,t,r,n){const s=t,o=r,a=Math.sqrt(s*s+o*o),l=(Math.exp(a*.0228)-1)/.0228/n.fLRoot;let d=Math.atan2(o,s)*(180/Math.PI);d<0&&(d+=360);const u=e/(1-(e-100)*.007);return li.fromJchInViewingConditions(u,l,d,n)}toInt(){return this.viewed(ji.DEFAULT)}viewed(e){const t=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),r=Math.pow(t/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),n=this.hue*Math.PI/180,s=.25*(Math.cos(n+2)+3.8),o=e.aw*Math.pow(this.j/100,1/e.c/e.z),a=s*(5e4/13)*e.nc*e.ncb,c=o/e.nbb,l=Math.sin(n),d=Math.cos(n),u=23*(c+.305)*r/(23*a+11*r*d+108*r*l),p=u*d,g=u*l,v=(460*c+451*p+288*g)/1403,_=(460*c-891*p-261*g)/1403,E=(460*c-220*p-6300*g)/1403,x=Math.max(0,27.13*Math.abs(v)/(400-Math.abs(v))),k=Yt(v)*(100/e.fl)*Math.pow(x,1/.42),y=Math.max(0,27.13*Math.abs(_)/(400-Math.abs(_))),h=Yt(_)*(100/e.fl)*Math.pow(y,1/.42),m=Math.max(0,27.13*Math.abs(E)/(400-Math.abs(E))),T=Yt(E)*(100/e.fl)*Math.pow(m,1/.42),N=k/e.rgbD[0],C=h/e.rgbD[1],F=T/e.rgbD[2],I=1.86206786*N-1.01125463*C+.14918677*F,O=.38752654*N+.62144744*C-.00897398*F,U=-.0158415*N-.03412294*C+1.04996444*F;return B_(I,O,U)}static fromXyzInViewingConditions(e,t,r,n){const s=.401288*e+.650173*t-.051461*r,o=-.250268*e+1.204414*t+.045854*r,a=-.002079*e+.048952*t+.953127*r,c=n.rgbD[0]*s,l=n.rgbD[1]*o,d=n.rgbD[2]*a,u=Math.pow(n.fl*Math.abs(c)/100,.42),p=Math.pow(n.fl*Math.abs(l)/100,.42),g=Math.pow(n.fl*Math.abs(d)/100,.42),v=Yt(c)*400*u/(u+27.13),_=Yt(l)*400*p/(p+27.13),E=Yt(d)*400*g/(g+27.13),x=(11*v+-12*_+E)/11,k=(v+_-2*E)/9,y=(20*v+20*_+21*E)/20,h=(40*v+20*_+E)/20,T=Math.atan2(k,x)*180/Math.PI,N=T<0?T+360:T>=360?T-360:T,C=N*Math.PI/180,F=h*n.nbb,I=100*Math.pow(F/n.aw,n.c*n.z),O=4/n.c*Math.sqrt(I/100)*(n.aw+4)*n.fLRoot,U=N<20.14?N+360:N,R=1/4*(Math.cos(U*Math.PI/180+2)+3.8),Q=5e4/13*R*n.nc*n.ncb*Math.sqrt(x*x+k*k)/(y+.305),$=Math.pow(Q,.9)*Math.pow(1.64-Math.pow(.29,n.n),.73),Y=$*Math.sqrt(I/100),B=Y*n.fLRoot,re=50*Math.sqrt($*n.c/(n.aw+4)),S=(1+100*.007)*I/(1+.007*I),H=Math.log(1+.0228*B)/.0228,ee=H*Math.cos(C),J=H*Math.sin(C);return new li(N,Y,I,O,B,re,S,ee,J)}xyzInViewingConditions(e){const t=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),r=Math.pow(t/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),n=this.hue*Math.PI/180,s=.25*(Math.cos(n+2)+3.8),o=e.aw*Math.pow(this.j/100,1/e.c/e.z),a=s*(5e4/13)*e.nc*e.ncb,c=o/e.nbb,l=Math.sin(n),d=Math.cos(n),u=23*(c+.305)*r/(23*a+11*r*d+108*r*l),p=u*d,g=u*l,v=(460*c+451*p+288*g)/1403,_=(460*c-891*p-261*g)/1403,E=(460*c-220*p-6300*g)/1403,x=Math.max(0,27.13*Math.abs(v)/(400-Math.abs(v))),k=Yt(v)*(100/e.fl)*Math.pow(x,1/.42),y=Math.max(0,27.13*Math.abs(_)/(400-Math.abs(_))),h=Yt(_)*(100/e.fl)*Math.pow(y,1/.42),m=Math.max(0,27.13*Math.abs(E)/(400-Math.abs(E))),T=Yt(E)*(100/e.fl)*Math.pow(m,1/.42),N=k/e.rgbD[0],C=h/e.rgbD[1],F=T/e.rgbD[2],I=1.86206786*N-1.01125463*C+.14918677*F,O=.38752654*N+.62144744*C-.00897398*F,U=-.0158415*N-.03412294*C+1.04996444*F;return[I,O,U]}}/**
552
+ */class li{constructor(e,t,r,n,s,o,a,c,l){this.hue=e,this.chroma=t,this.j=r,this.q=n,this.m=s,this.s=o,this.jstar=a,this.astar=c,this.bstar=l}distance(e){const t=this.jstar-e.jstar,r=this.astar-e.astar,n=this.bstar-e.bstar,s=Math.sqrt(t*t+r*r+n*n);return 1.41*Math.pow(s,.63)}static fromInt(e){return li.fromIntInViewingConditions(e,ji.DEFAULT)}static fromIntInViewingConditions(e,t){const r=(e&16711680)>>16,n=(e&65280)>>8,s=e&255,o=fn(r),a=fn(n),c=fn(s),l=.41233895*o+.35762064*a+.18051042*c,d=.2126*o+.7152*a+.0722*c,u=.01932141*o+.11916382*a+.95034478*c,p=.401288*l+.650173*d-.051461*u,g=-.250268*l+1.204414*d+.045854*u,v=-.002079*l+.048952*d+.953127*u,_=t.rgbD[0]*p,E=t.rgbD[1]*g,x=t.rgbD[2]*v,k=Math.pow(t.fl*Math.abs(_)/100,.42),y=Math.pow(t.fl*Math.abs(E)/100,.42),h=Math.pow(t.fl*Math.abs(x)/100,.42),m=Yt(_)*400*k/(k+27.13),T=Yt(E)*400*y/(y+27.13),N=Yt(x)*400*h/(h+27.13),C=(11*m+-12*T+N)/11,F=(m+T-2*N)/9,I=(20*m+20*T+21*N)/20,O=(40*m+20*T+N)/20,R=Math.atan2(F,C)*180/Math.PI,D=R<0?R+360:R>=360?R-360:R,Q=D*Math.PI/180,$=O*t.nbb,Y=100*Math.pow($/t.aw,t.c*t.z),B=4/t.c*Math.sqrt(Y/100)*(t.aw+4)*t.fLRoot,re=D<20.14?D+360:D,S=.25*(Math.cos(re*Math.PI/180+2)+3.8),ee=5e4/13*S*t.nc*t.ncb*Math.sqrt(C*C+F*F)/(I+.305),J=Math.pow(ee,.9)*Math.pow(1.64-Math.pow(.29,t.n),.73),he=J*Math.sqrt(Y/100),W=he*t.fLRoot,G=50*Math.sqrt(J*t.c/(t.aw+4)),X=(1+100*.007)*Y/(1+.007*Y),z=1/.0228*Math.log(1+.0228*W),ne=z*Math.cos(Q),se=z*Math.sin(Q);return new li(D,he,Y,B,W,G,X,ne,se)}static fromJch(e,t,r){return li.fromJchInViewingConditions(e,t,r,ji.DEFAULT)}static fromJchInViewingConditions(e,t,r,n){const s=4/n.c*Math.sqrt(e/100)*(n.aw+4)*n.fLRoot,o=t*n.fLRoot,a=t/Math.sqrt(e/100),c=50*Math.sqrt(a*n.c/(n.aw+4)),l=r*Math.PI/180,d=(1+100*.007)*e/(1+.007*e),u=1/.0228*Math.log(1+.0228*o),p=u*Math.cos(l),g=u*Math.sin(l);return new li(r,t,e,s,o,c,d,p,g)}static fromUcs(e,t,r){return li.fromUcsInViewingConditions(e,t,r,ji.DEFAULT)}static fromUcsInViewingConditions(e,t,r,n){const s=t,o=r,a=Math.sqrt(s*s+o*o),l=(Math.exp(a*.0228)-1)/.0228/n.fLRoot;let d=Math.atan2(o,s)*(180/Math.PI);d<0&&(d+=360);const u=e/(1-(e-100)*.007);return li.fromJchInViewingConditions(u,l,d,n)}toInt(){return this.viewed(ji.DEFAULT)}viewed(e){const t=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),r=Math.pow(t/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),n=this.hue*Math.PI/180,s=.25*(Math.cos(n+2)+3.8),o=e.aw*Math.pow(this.j/100,1/e.c/e.z),a=s*(5e4/13)*e.nc*e.ncb,c=o/e.nbb,l=Math.sin(n),d=Math.cos(n),u=23*(c+.305)*r/(23*a+11*r*d+108*r*l),p=u*d,g=u*l,v=(460*c+451*p+288*g)/1403,_=(460*c-891*p-261*g)/1403,E=(460*c-220*p-6300*g)/1403,x=Math.max(0,27.13*Math.abs(v)/(400-Math.abs(v))),k=Yt(v)*(100/e.fl)*Math.pow(x,1/.42),y=Math.max(0,27.13*Math.abs(_)/(400-Math.abs(_))),h=Yt(_)*(100/e.fl)*Math.pow(y,1/.42),m=Math.max(0,27.13*Math.abs(E)/(400-Math.abs(E))),T=Yt(E)*(100/e.fl)*Math.pow(m,1/.42),N=k/e.rgbD[0],C=h/e.rgbD[1],F=T/e.rgbD[2],I=1.86206786*N-1.01125463*C+.14918677*F,O=.38752654*N+.62144744*C-.00897398*F,U=-.0158415*N-.03412294*C+1.04996444*F;return j_(I,O,U)}static fromXyzInViewingConditions(e,t,r,n){const s=.401288*e+.650173*t-.051461*r,o=-.250268*e+1.204414*t+.045854*r,a=-.002079*e+.048952*t+.953127*r,c=n.rgbD[0]*s,l=n.rgbD[1]*o,d=n.rgbD[2]*a,u=Math.pow(n.fl*Math.abs(c)/100,.42),p=Math.pow(n.fl*Math.abs(l)/100,.42),g=Math.pow(n.fl*Math.abs(d)/100,.42),v=Yt(c)*400*u/(u+27.13),_=Yt(l)*400*p/(p+27.13),E=Yt(d)*400*g/(g+27.13),x=(11*v+-12*_+E)/11,k=(v+_-2*E)/9,y=(20*v+20*_+21*E)/20,h=(40*v+20*_+E)/20,T=Math.atan2(k,x)*180/Math.PI,N=T<0?T+360:T>=360?T-360:T,C=N*Math.PI/180,F=h*n.nbb,I=100*Math.pow(F/n.aw,n.c*n.z),O=4/n.c*Math.sqrt(I/100)*(n.aw+4)*n.fLRoot,U=N<20.14?N+360:N,R=1/4*(Math.cos(U*Math.PI/180+2)+3.8),Q=5e4/13*R*n.nc*n.ncb*Math.sqrt(x*x+k*k)/(y+.305),$=Math.pow(Q,.9)*Math.pow(1.64-Math.pow(.29,n.n),.73),Y=$*Math.sqrt(I/100),B=Y*n.fLRoot,re=50*Math.sqrt($*n.c/(n.aw+4)),S=(1+100*.007)*I/(1+.007*I),H=Math.log(1+.0228*B)/.0228,ee=H*Math.cos(C),J=H*Math.sin(C);return new li(N,Y,I,O,B,re,S,ee,J)}xyzInViewingConditions(e){const t=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),r=Math.pow(t/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),n=this.hue*Math.PI/180,s=.25*(Math.cos(n+2)+3.8),o=e.aw*Math.pow(this.j/100,1/e.c/e.z),a=s*(5e4/13)*e.nc*e.ncb,c=o/e.nbb,l=Math.sin(n),d=Math.cos(n),u=23*(c+.305)*r/(23*a+11*r*d+108*r*l),p=u*d,g=u*l,v=(460*c+451*p+288*g)/1403,_=(460*c-891*p-261*g)/1403,E=(460*c-220*p-6300*g)/1403,x=Math.max(0,27.13*Math.abs(v)/(400-Math.abs(v))),k=Yt(v)*(100/e.fl)*Math.pow(x,1/.42),y=Math.max(0,27.13*Math.abs(_)/(400-Math.abs(_))),h=Yt(_)*(100/e.fl)*Math.pow(y,1/.42),m=Math.max(0,27.13*Math.abs(E)/(400-Math.abs(E))),T=Yt(E)*(100/e.fl)*Math.pow(m,1/.42),N=k/e.rgbD[0],C=h/e.rgbD[1],F=T/e.rgbD[2],I=1.86206786*N-1.01125463*C+.14918677*F,O=.38752654*N+.62144744*C-.00897398*F,U=-.0158415*N-.03412294*C+1.04996444*F;return[I,O,U]}}/**
553
553
  * @license
554
554
  * Copyright 2021 Google LLC
555
555
  *
@@ -564,7 +564,7 @@ if("@preserve"in h)return h["@preserve"][0];if(e.isValue(h))return h;if(e.isList
564
564
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
565
565
  * See the License for the specific language governing permissions and
566
566
  * limitations under the License.
567
- */class Le{static sanitizeRadians(e){return(e+Math.PI*8)%(Math.PI*2)}static trueDelinearized(e){const t=e/100;let r=0;return t<=.0031308?r=t*12.92:r=1.055*Math.pow(t,1/2.4)-.055,r*255}static chromaticAdaptation(e){const t=Math.pow(Math.abs(e),.42);return Yt(e)*400*t/(t+27.13)}static hueOf(e){const t=Cc(e,Le.SCALED_DISCOUNT_FROM_LINRGB),r=Le.chromaticAdaptation(t[0]),n=Le.chromaticAdaptation(t[1]),s=Le.chromaticAdaptation(t[2]),o=(11*r+-12*n+s)/11,a=(r+n-2*s)/9;return Math.atan2(a,o)}static areInCyclicOrder(e,t,r){const n=Le.sanitizeRadians(t-e),s=Le.sanitizeRadians(r-e);return n<s}static intercept(e,t,r){return(t-e)/(r-e)}static lerpPoint(e,t,r){return[e[0]+(r[0]-e[0])*t,e[1]+(r[1]-e[1])*t,e[2]+(r[2]-e[2])*t]}static setCoordinate(e,t,r,n){const s=Le.intercept(e[n],t,r[n]);return Le.lerpPoint(e,s,r)}static isBounded(e){return 0<=e&&e<=100}static nthVertex(e,t){const r=Le.Y_FROM_LINRGB[0],n=Le.Y_FROM_LINRGB[1],s=Le.Y_FROM_LINRGB[2],o=t%4<=1?0:100,a=t%2===0?0:100;if(t<4){const c=o,l=a,d=(e-c*n-l*s)/r;return Le.isBounded(d)?[d,c,l]:[-1,-1,-1]}else if(t<8){const c=o,l=a,d=(e-l*r-c*s)/n;return Le.isBounded(d)?[l,d,c]:[-1,-1,-1]}else{const c=o,l=a,d=(e-c*r-l*n)/s;return Le.isBounded(d)?[c,l,d]:[-1,-1,-1]}}static bisectToSegment(e,t){let r=[-1,-1,-1],n=r,s=0,o=0,a=!1,c=!0;for(let l=0;l<12;l++){const d=Le.nthVertex(e,l);if(d[0]<0)continue;const u=Le.hueOf(d);if(!a){r=d,n=d,s=u,o=u,a=!0;continue}(c||Le.areInCyclicOrder(s,u,o))&&(c=!1,Le.areInCyclicOrder(s,t,u)?(n=d,o=u):(r=d,s=u))}return[r,n]}static midpoint(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2,(e[2]+t[2])/2]}static criticalPlaneBelow(e){return Math.floor(e-.5)}static criticalPlaneAbove(e){return Math.ceil(e-.5)}static bisectToLimit(e,t){const r=Le.bisectToSegment(e,t);let n=r[0],s=Le.hueOf(n),o=r[1];for(let a=0;a<3;a++)if(n[a]!==o[a]){let c=-1,l=255;n[a]<o[a]?(c=Le.criticalPlaneBelow(Le.trueDelinearized(n[a])),l=Le.criticalPlaneAbove(Le.trueDelinearized(o[a]))):(c=Le.criticalPlaneAbove(Le.trueDelinearized(n[a])),l=Le.criticalPlaneBelow(Le.trueDelinearized(o[a])));for(let d=0;d<8&&!(Math.abs(l-c)<=1);d++){const u=Math.floor((c+l)/2),p=Le.CRITICAL_PLANES[u],g=Le.setCoordinate(n,p,o,a),v=Le.hueOf(g);Le.areInCyclicOrder(s,t,v)?(o=g,l=u):(n=g,s=v,c=u)}}return Le.midpoint(n,o)}static inverseChromaticAdaptation(e){const t=Math.abs(e),r=Math.max(0,27.13*t/(400-t));return Yt(e)*Math.pow(r,1/.42)}static findResultByJ(e,t,r){let n=Math.sqrt(r)*11;const s=ji.DEFAULT,o=1/Math.pow(1.64-Math.pow(.29,s.n),.73),c=.25*(Math.cos(e+2)+3.8)*(5e4/13)*s.nc*s.ncb,l=Math.sin(e),d=Math.cos(e);for(let u=0;u<5;u++){const p=n/100,g=t===0||n===0?0:t/Math.sqrt(p),v=Math.pow(g*o,1/.9),E=s.aw*Math.pow(p,1/s.c/s.z)/s.nbb,x=23*(E+.305)*v/(23*c+11*v*d+108*v*l),k=x*d,y=x*l,h=(460*E+451*k+288*y)/1403,m=(460*E-891*k-261*y)/1403,T=(460*E-220*k-6300*y)/1403,N=Le.inverseChromaticAdaptation(h),C=Le.inverseChromaticAdaptation(m),F=Le.inverseChromaticAdaptation(T),I=Cc([N,C,F],Le.LINRGB_FROM_SCALED_DISCOUNT);if(I[0]<0||I[1]<0||I[2]<0)return 0;const O=Le.Y_FROM_LINRGB[0],U=Le.Y_FROM_LINRGB[1],R=Le.Y_FROM_LINRGB[2],D=O*I[0]+U*I[1]+R*I[2];if(D<=0)return 0;if(u===4||Math.abs(D-r)<.002)return I[0]>100.01||I[1]>100.01||I[2]>100.01?0:Pf(I);n=n-(D-r)*n/(2*D)}return 0}static solveToInt(e,t,r){if(t<1e-4||r<1e-4||r>99.9999)return U_(r);e=D_(e);const n=e/180*Math.PI,s=gr(r),o=Le.findResultByJ(n,t,s);if(o!==0)return o;const a=Le.bisectToLimit(s,n);return Pf(a)}static solveToCam(e,t,r){return li.fromInt(Le.solveToInt(e,t,r))}}Le.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];Le.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];Le.Y_FROM_LINRGB=[.2126,.7152,.0722];Le.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];/**
567
+ */class Le{static sanitizeRadians(e){return(e+Math.PI*8)%(Math.PI*2)}static trueDelinearized(e){const t=e/100;let r=0;return t<=.0031308?r=t*12.92:r=1.055*Math.pow(t,1/2.4)-.055,r*255}static chromaticAdaptation(e){const t=Math.pow(Math.abs(e),.42);return Yt(e)*400*t/(t+27.13)}static hueOf(e){const t=Cc(e,Le.SCALED_DISCOUNT_FROM_LINRGB),r=Le.chromaticAdaptation(t[0]),n=Le.chromaticAdaptation(t[1]),s=Le.chromaticAdaptation(t[2]),o=(11*r+-12*n+s)/11,a=(r+n-2*s)/9;return Math.atan2(a,o)}static areInCyclicOrder(e,t,r){const n=Le.sanitizeRadians(t-e),s=Le.sanitizeRadians(r-e);return n<s}static intercept(e,t,r){return(t-e)/(r-e)}static lerpPoint(e,t,r){return[e[0]+(r[0]-e[0])*t,e[1]+(r[1]-e[1])*t,e[2]+(r[2]-e[2])*t]}static setCoordinate(e,t,r,n){const s=Le.intercept(e[n],t,r[n]);return Le.lerpPoint(e,s,r)}static isBounded(e){return 0<=e&&e<=100}static nthVertex(e,t){const r=Le.Y_FROM_LINRGB[0],n=Le.Y_FROM_LINRGB[1],s=Le.Y_FROM_LINRGB[2],o=t%4<=1?0:100,a=t%2===0?0:100;if(t<4){const c=o,l=a,d=(e-c*n-l*s)/r;return Le.isBounded(d)?[d,c,l]:[-1,-1,-1]}else if(t<8){const c=o,l=a,d=(e-l*r-c*s)/n;return Le.isBounded(d)?[l,d,c]:[-1,-1,-1]}else{const c=o,l=a,d=(e-c*r-l*n)/s;return Le.isBounded(d)?[c,l,d]:[-1,-1,-1]}}static bisectToSegment(e,t){let r=[-1,-1,-1],n=r,s=0,o=0,a=!1,c=!0;for(let l=0;l<12;l++){const d=Le.nthVertex(e,l);if(d[0]<0)continue;const u=Le.hueOf(d);if(!a){r=d,n=d,s=u,o=u,a=!0;continue}(c||Le.areInCyclicOrder(s,u,o))&&(c=!1,Le.areInCyclicOrder(s,t,u)?(n=d,o=u):(r=d,s=u))}return[r,n]}static midpoint(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2,(e[2]+t[2])/2]}static criticalPlaneBelow(e){return Math.floor(e-.5)}static criticalPlaneAbove(e){return Math.ceil(e-.5)}static bisectToLimit(e,t){const r=Le.bisectToSegment(e,t);let n=r[0],s=Le.hueOf(n),o=r[1];for(let a=0;a<3;a++)if(n[a]!==o[a]){let c=-1,l=255;n[a]<o[a]?(c=Le.criticalPlaneBelow(Le.trueDelinearized(n[a])),l=Le.criticalPlaneAbove(Le.trueDelinearized(o[a]))):(c=Le.criticalPlaneAbove(Le.trueDelinearized(n[a])),l=Le.criticalPlaneBelow(Le.trueDelinearized(o[a])));for(let d=0;d<8&&!(Math.abs(l-c)<=1);d++){const u=Math.floor((c+l)/2),p=Le.CRITICAL_PLANES[u],g=Le.setCoordinate(n,p,o,a),v=Le.hueOf(g);Le.areInCyclicOrder(s,t,v)?(o=g,l=u):(n=g,s=v,c=u)}}return Le.midpoint(n,o)}static inverseChromaticAdaptation(e){const t=Math.abs(e),r=Math.max(0,27.13*t/(400-t));return Yt(e)*Math.pow(r,1/.42)}static findResultByJ(e,t,r){let n=Math.sqrt(r)*11;const s=ji.DEFAULT,o=1/Math.pow(1.64-Math.pow(.29,s.n),.73),c=.25*(Math.cos(e+2)+3.8)*(5e4/13)*s.nc*s.ncb,l=Math.sin(e),d=Math.cos(e);for(let u=0;u<5;u++){const p=n/100,g=t===0||n===0?0:t/Math.sqrt(p),v=Math.pow(g*o,1/.9),E=s.aw*Math.pow(p,1/s.c/s.z)/s.nbb,x=23*(E+.305)*v/(23*c+11*v*d+108*v*l),k=x*d,y=x*l,h=(460*E+451*k+288*y)/1403,m=(460*E-891*k-261*y)/1403,T=(460*E-220*k-6300*y)/1403,N=Le.inverseChromaticAdaptation(h),C=Le.inverseChromaticAdaptation(m),F=Le.inverseChromaticAdaptation(T),I=Cc([N,C,F],Le.LINRGB_FROM_SCALED_DISCOUNT);if(I[0]<0||I[1]<0||I[2]<0)return 0;const O=Le.Y_FROM_LINRGB[0],U=Le.Y_FROM_LINRGB[1],R=Le.Y_FROM_LINRGB[2],D=O*I[0]+U*I[1]+R*I[2];if(D<=0)return 0;if(u===4||Math.abs(D-r)<.002)return I[0]>100.01||I[1]>100.01||I[2]>100.01?0:Pf(I);n=n-(D-r)*n/(2*D)}return 0}static solveToInt(e,t,r){if(t<1e-4||r<1e-4||r>99.9999)return q_(r);e=N_(e);const n=e/180*Math.PI,s=gr(r),o=Le.findResultByJ(n,t,s);if(o!==0)return o;const a=Le.bisectToLimit(s,n);return Pf(a)}static solveToCam(e,t,r){return li.fromInt(Le.solveToInt(e,t,r))}}Le.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];Le.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];Le.Y_FROM_LINRGB=[.2126,.7152,.0722];Le.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];/**
568
568
  * @license
569
569
  * Copyright 2021 Google LLC
570
570
  *
@@ -684,7 +684,7 @@ if("@preserve"in h)return h["@preserve"][0];if(e.isValue(h))return h;if(e.isList
684
684
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
685
685
  * See the License for the specific language governing permissions and
686
686
  * limitations under the License.
687
- */function Pn(i){return i.variant===Ms.FIDELITY||i.variant===Ms.CONTENT}function ht(i){return i.variant===Ms.MONOCHROME}function H_(i,e,t,r){let n=t,s=qr.from(i,e,t);if(s.chroma<e){let o=s.chroma;for(;s.chroma<e;){n+=r?-1:1;const a=qr.from(i,e,n);if(o>a.chroma||Math.abs(a.chroma-e)<.4)break;const c=Math.abs(a.chroma-e),l=Math.abs(s.chroma-e);c<l&&(s=a),o=Math.max(o,a.chroma)}}return n}class pe{static highestSurface(e){return e.isDark?pe.surfaceBright:pe.surfaceDim}}pe.contentAccentToneDelta=15;pe.primaryPaletteKeyColor=Ie.fromPalette({name:"primary_palette_key_color",palette:i=>i.primaryPalette,tone:i=>i.primaryPalette.keyColor.tone});pe.secondaryPaletteKeyColor=Ie.fromPalette({name:"secondary_palette_key_color",palette:i=>i.secondaryPalette,tone:i=>i.secondaryPalette.keyColor.tone});pe.tertiaryPaletteKeyColor=Ie.fromPalette({name:"tertiary_palette_key_color",palette:i=>i.tertiaryPalette,tone:i=>i.tertiaryPalette.keyColor.tone});pe.neutralPaletteKeyColor=Ie.fromPalette({name:"neutral_palette_key_color",palette:i=>i.neutralPalette,tone:i=>i.neutralPalette.keyColor.tone});pe.neutralVariantPaletteKeyColor=Ie.fromPalette({name:"neutral_variant_palette_key_color",palette:i=>i.neutralVariantPalette,tone:i=>i.neutralVariantPalette.keyColor.tone});pe.background=Ie.fromPalette({name:"background",palette:i=>i.neutralPalette,tone:i=>i.isDark?6:98,isBackground:!0});pe.onBackground=Ie.fromPalette({name:"on_background",palette:i=>i.neutralPalette,tone:i=>i.isDark?90:10,background:i=>pe.background,contrastCurve:new Fe(3,3,4.5,7)});pe.surface=Ie.fromPalette({name:"surface",palette:i=>i.neutralPalette,tone:i=>i.isDark?6:98,isBackground:!0});pe.surfaceDim=Ie.fromPalette({name:"surface_dim",palette:i=>i.neutralPalette,tone:i=>i.isDark?6:new Fe(87,87,80,75).get(i.contrastLevel),isBackground:!0});pe.surfaceBright=Ie.fromPalette({name:"surface_bright",palette:i=>i.neutralPalette,tone:i=>i.isDark?new Fe(24,24,29,34).get(i.contrastLevel):98,isBackground:!0});pe.surfaceContainerLowest=Ie.fromPalette({name:"surface_container_lowest",palette:i=>i.neutralPalette,tone:i=>i.isDark?new Fe(4,4,2,0).get(i.contrastLevel):100,isBackground:!0});pe.surfaceContainerLow=Ie.fromPalette({name:"surface_container_low",palette:i=>i.neutralPalette,tone:i=>i.isDark?new Fe(10,10,11,12).get(i.contrastLevel):new Fe(96,96,96,95).get(i.contrastLevel),isBackground:!0});pe.surfaceContainer=Ie.fromPalette({name:"surface_container",palette:i=>i.neutralPalette,tone:i=>i.isDark?new Fe(12,12,16,20).get(i.contrastLevel):new Fe(94,94,92,90).get(i.contrastLevel),isBackground:!0});pe.surfaceContainerHigh=Ie.fromPalette({name:"surface_container_high",palette:i=>i.neutralPalette,tone:i=>i.isDark?new Fe(17,17,21,25).get(i.contrastLevel):new Fe(92,92,88,85).get(i.contrastLevel),isBackground:!0});pe.surfaceContainerHighest=Ie.fromPalette({name:"surface_container_highest",palette:i=>i.neutralPalette,tone:i=>i.isDark?new Fe(22,22,26,30).get(i.contrastLevel):new Fe(90,90,84,80).get(i.contrastLevel),isBackground:!0});pe.onSurface=Ie.fromPalette({name:"on_surface",palette:i=>i.neutralPalette,tone:i=>i.isDark?90:10,background:i=>pe.highestSurface(i),contrastCurve:new Fe(4.5,7,11,21)});pe.surfaceVariant=Ie.fromPalette({name:"surface_variant",palette:i=>i.neutralVariantPalette,tone:i=>i.isDark?30:90,isBackground:!0});pe.onSurfaceVariant=Ie.fromPalette({name:"on_surface_variant",palette:i=>i.neutralVariantPalette,tone:i=>i.isDark?80:30,background:i=>pe.highestSurface(i),contrastCurve:new Fe(3,4.5,7,11)});pe.inverseSurface=Ie.fromPalette({name:"inverse_surface",palette:i=>i.neutralPalette,tone:i=>i.isDark?90:20});pe.inverseOnSurface=Ie.fromPalette({name:"inverse_on_surface",palette:i=>i.neutralPalette,tone:i=>i.isDark?20:95,background:i=>pe.inverseSurface,contrastCurve:new Fe(4.5,7,11,21)});pe.outline=Ie.fromPalette({name:"outline",palette:i=>i.neutralVariantPalette,tone:i=>i.isDark?60:50,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1.5,3,4.5,7)});pe.outlineVariant=Ie.fromPalette({name:"outline_variant",palette:i=>i.neutralVariantPalette,tone:i=>i.isDark?30:80,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5)});pe.shadow=Ie.fromPalette({name:"shadow",palette:i=>i.neutralPalette,tone:i=>0});pe.scrim=Ie.fromPalette({name:"scrim",palette:i=>i.neutralPalette,tone:i=>0});pe.surfaceTint=Ie.fromPalette({name:"surface_tint",palette:i=>i.primaryPalette,tone:i=>i.isDark?80:40,isBackground:!0});pe.primary=Ie.fromPalette({name:"primary",palette:i=>i.primaryPalette,tone:i=>ht(i)?i.isDark?100:0:i.isDark?80:40,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(3,4.5,7,7),toneDeltaPair:i=>new ai(pe.primaryContainer,pe.primary,10,"nearer",!1)});pe.onPrimary=Ie.fromPalette({name:"on_primary",palette:i=>i.primaryPalette,tone:i=>ht(i)?i.isDark?10:90:i.isDark?20:100,background:i=>pe.primary,contrastCurve:new Fe(4.5,7,11,21)});pe.primaryContainer=Ie.fromPalette({name:"primary_container",palette:i=>i.primaryPalette,tone:i=>Pn(i)?i.sourceColorHct.tone:ht(i)?i.isDark?85:25:i.isDark?30:90,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.primaryContainer,pe.primary,10,"nearer",!1)});pe.onPrimaryContainer=Ie.fromPalette({name:"on_primary_container",palette:i=>i.primaryPalette,tone:i=>Pn(i)?Ie.foregroundTone(pe.primaryContainer.tone(i),4.5):ht(i)?i.isDark?0:100:i.isDark?90:30,background:i=>pe.primaryContainer,contrastCurve:new Fe(3,4.5,7,11)});pe.inversePrimary=Ie.fromPalette({name:"inverse_primary",palette:i=>i.primaryPalette,tone:i=>i.isDark?40:80,background:i=>pe.inverseSurface,contrastCurve:new Fe(3,4.5,7,7)});pe.secondary=Ie.fromPalette({name:"secondary",palette:i=>i.secondaryPalette,tone:i=>i.isDark?80:40,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(3,4.5,7,7),toneDeltaPair:i=>new ai(pe.secondaryContainer,pe.secondary,10,"nearer",!1)});pe.onSecondary=Ie.fromPalette({name:"on_secondary",palette:i=>i.secondaryPalette,tone:i=>ht(i)?i.isDark?10:100:i.isDark?20:100,background:i=>pe.secondary,contrastCurve:new Fe(4.5,7,11,21)});pe.secondaryContainer=Ie.fromPalette({name:"secondary_container",palette:i=>i.secondaryPalette,tone:i=>{const e=i.isDark?30:90;return ht(i)?i.isDark?30:85:Pn(i)?H_(i.secondaryPalette.hue,i.secondaryPalette.chroma,e,!i.isDark):e},isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.secondaryContainer,pe.secondary,10,"nearer",!1)});pe.onSecondaryContainer=Ie.fromPalette({name:"on_secondary_container",palette:i=>i.secondaryPalette,tone:i=>ht(i)?i.isDark?90:10:Pn(i)?Ie.foregroundTone(pe.secondaryContainer.tone(i),4.5):i.isDark?90:30,background:i=>pe.secondaryContainer,contrastCurve:new Fe(3,4.5,7,11)});pe.tertiary=Ie.fromPalette({name:"tertiary",palette:i=>i.tertiaryPalette,tone:i=>ht(i)?i.isDark?90:25:i.isDark?80:40,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(3,4.5,7,7),toneDeltaPair:i=>new ai(pe.tertiaryContainer,pe.tertiary,10,"nearer",!1)});pe.onTertiary=Ie.fromPalette({name:"on_tertiary",palette:i=>i.tertiaryPalette,tone:i=>ht(i)?i.isDark?10:90:i.isDark?20:100,background:i=>pe.tertiary,contrastCurve:new Fe(4.5,7,11,21)});pe.tertiaryContainer=Ie.fromPalette({name:"tertiary_container",palette:i=>i.tertiaryPalette,tone:i=>{if(ht(i))return i.isDark?60:49;if(!Pn(i))return i.isDark?30:90;const e=i.tertiaryPalette.getHct(i.sourceColorHct.tone);return Id.fixIfDisliked(e).tone},isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.tertiaryContainer,pe.tertiary,10,"nearer",!1)});pe.onTertiaryContainer=Ie.fromPalette({name:"on_tertiary_container",palette:i=>i.tertiaryPalette,tone:i=>ht(i)?i.isDark?0:100:Pn(i)?Ie.foregroundTone(pe.tertiaryContainer.tone(i),4.5):i.isDark?90:30,background:i=>pe.tertiaryContainer,contrastCurve:new Fe(3,4.5,7,11)});pe.error=Ie.fromPalette({name:"error",palette:i=>i.errorPalette,tone:i=>i.isDark?80:40,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(3,4.5,7,7),toneDeltaPair:i=>new ai(pe.errorContainer,pe.error,10,"nearer",!1)});pe.onError=Ie.fromPalette({name:"on_error",palette:i=>i.errorPalette,tone:i=>i.isDark?20:100,background:i=>pe.error,contrastCurve:new Fe(4.5,7,11,21)});pe.errorContainer=Ie.fromPalette({name:"error_container",palette:i=>i.errorPalette,tone:i=>i.isDark?30:90,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.errorContainer,pe.error,10,"nearer",!1)});pe.onErrorContainer=Ie.fromPalette({name:"on_error_container",palette:i=>i.errorPalette,tone:i=>ht(i)?i.isDark?90:10:i.isDark?90:30,background:i=>pe.errorContainer,contrastCurve:new Fe(3,4.5,7,11)});pe.primaryFixed=Ie.fromPalette({name:"primary_fixed",palette:i=>i.primaryPalette,tone:i=>ht(i)?40:90,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.primaryFixed,pe.primaryFixedDim,10,"lighter",!0)});pe.primaryFixedDim=Ie.fromPalette({name:"primary_fixed_dim",palette:i=>i.primaryPalette,tone:i=>ht(i)?30:80,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.primaryFixed,pe.primaryFixedDim,10,"lighter",!0)});pe.onPrimaryFixed=Ie.fromPalette({name:"on_primary_fixed",palette:i=>i.primaryPalette,tone:i=>ht(i)?100:10,background:i=>pe.primaryFixedDim,secondBackground:i=>pe.primaryFixed,contrastCurve:new Fe(4.5,7,11,21)});pe.onPrimaryFixedVariant=Ie.fromPalette({name:"on_primary_fixed_variant",palette:i=>i.primaryPalette,tone:i=>ht(i)?90:30,background:i=>pe.primaryFixedDim,secondBackground:i=>pe.primaryFixed,contrastCurve:new Fe(3,4.5,7,11)});pe.secondaryFixed=Ie.fromPalette({name:"secondary_fixed",palette:i=>i.secondaryPalette,tone:i=>ht(i)?80:90,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.secondaryFixed,pe.secondaryFixedDim,10,"lighter",!0)});pe.secondaryFixedDim=Ie.fromPalette({name:"secondary_fixed_dim",palette:i=>i.secondaryPalette,tone:i=>ht(i)?70:80,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.secondaryFixed,pe.secondaryFixedDim,10,"lighter",!0)});pe.onSecondaryFixed=Ie.fromPalette({name:"on_secondary_fixed",palette:i=>i.secondaryPalette,tone:i=>10,background:i=>pe.secondaryFixedDim,secondBackground:i=>pe.secondaryFixed,contrastCurve:new Fe(4.5,7,11,21)});pe.onSecondaryFixedVariant=Ie.fromPalette({name:"on_secondary_fixed_variant",palette:i=>i.secondaryPalette,tone:i=>ht(i)?25:30,background:i=>pe.secondaryFixedDim,secondBackground:i=>pe.secondaryFixed,contrastCurve:new Fe(3,4.5,7,11)});pe.tertiaryFixed=Ie.fromPalette({name:"tertiary_fixed",palette:i=>i.tertiaryPalette,tone:i=>ht(i)?40:90,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.tertiaryFixed,pe.tertiaryFixedDim,10,"lighter",!0)});pe.tertiaryFixedDim=Ie.fromPalette({name:"tertiary_fixed_dim",palette:i=>i.tertiaryPalette,tone:i=>ht(i)?30:80,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.tertiaryFixed,pe.tertiaryFixedDim,10,"lighter",!0)});pe.onTertiaryFixed=Ie.fromPalette({name:"on_tertiary_fixed",palette:i=>i.tertiaryPalette,tone:i=>ht(i)?100:10,background:i=>pe.tertiaryFixedDim,secondBackground:i=>pe.tertiaryFixed,contrastCurve:new Fe(4.5,7,11,21)});pe.onTertiaryFixedVariant=Ie.fromPalette({name:"on_tertiary_fixed_variant",palette:i=>i.tertiaryPalette,tone:i=>ht(i)?90:30,background:i=>pe.tertiaryFixedDim,secondBackground:i=>pe.tertiaryFixed,contrastCurve:new Fe(3,4.5,7,11)});const W_=`:host {
687
+ */function Pn(i){return i.variant===Ms.FIDELITY||i.variant===Ms.CONTENT}function ht(i){return i.variant===Ms.MONOCHROME}function z_(i,e,t,r){let n=t,s=qr.from(i,e,t);if(s.chroma<e){let o=s.chroma;for(;s.chroma<e;){n+=r?-1:1;const a=qr.from(i,e,n);if(o>a.chroma||Math.abs(a.chroma-e)<.4)break;const c=Math.abs(a.chroma-e),l=Math.abs(s.chroma-e);c<l&&(s=a),o=Math.max(o,a.chroma)}}return n}class pe{static highestSurface(e){return e.isDark?pe.surfaceBright:pe.surfaceDim}}pe.contentAccentToneDelta=15;pe.primaryPaletteKeyColor=Ie.fromPalette({name:"primary_palette_key_color",palette:i=>i.primaryPalette,tone:i=>i.primaryPalette.keyColor.tone});pe.secondaryPaletteKeyColor=Ie.fromPalette({name:"secondary_palette_key_color",palette:i=>i.secondaryPalette,tone:i=>i.secondaryPalette.keyColor.tone});pe.tertiaryPaletteKeyColor=Ie.fromPalette({name:"tertiary_palette_key_color",palette:i=>i.tertiaryPalette,tone:i=>i.tertiaryPalette.keyColor.tone});pe.neutralPaletteKeyColor=Ie.fromPalette({name:"neutral_palette_key_color",palette:i=>i.neutralPalette,tone:i=>i.neutralPalette.keyColor.tone});pe.neutralVariantPaletteKeyColor=Ie.fromPalette({name:"neutral_variant_palette_key_color",palette:i=>i.neutralVariantPalette,tone:i=>i.neutralVariantPalette.keyColor.tone});pe.background=Ie.fromPalette({name:"background",palette:i=>i.neutralPalette,tone:i=>i.isDark?6:98,isBackground:!0});pe.onBackground=Ie.fromPalette({name:"on_background",palette:i=>i.neutralPalette,tone:i=>i.isDark?90:10,background:i=>pe.background,contrastCurve:new Fe(3,3,4.5,7)});pe.surface=Ie.fromPalette({name:"surface",palette:i=>i.neutralPalette,tone:i=>i.isDark?6:98,isBackground:!0});pe.surfaceDim=Ie.fromPalette({name:"surface_dim",palette:i=>i.neutralPalette,tone:i=>i.isDark?6:new Fe(87,87,80,75).get(i.contrastLevel),isBackground:!0});pe.surfaceBright=Ie.fromPalette({name:"surface_bright",palette:i=>i.neutralPalette,tone:i=>i.isDark?new Fe(24,24,29,34).get(i.contrastLevel):98,isBackground:!0});pe.surfaceContainerLowest=Ie.fromPalette({name:"surface_container_lowest",palette:i=>i.neutralPalette,tone:i=>i.isDark?new Fe(4,4,2,0).get(i.contrastLevel):100,isBackground:!0});pe.surfaceContainerLow=Ie.fromPalette({name:"surface_container_low",palette:i=>i.neutralPalette,tone:i=>i.isDark?new Fe(10,10,11,12).get(i.contrastLevel):new Fe(96,96,96,95).get(i.contrastLevel),isBackground:!0});pe.surfaceContainer=Ie.fromPalette({name:"surface_container",palette:i=>i.neutralPalette,tone:i=>i.isDark?new Fe(12,12,16,20).get(i.contrastLevel):new Fe(94,94,92,90).get(i.contrastLevel),isBackground:!0});pe.surfaceContainerHigh=Ie.fromPalette({name:"surface_container_high",palette:i=>i.neutralPalette,tone:i=>i.isDark?new Fe(17,17,21,25).get(i.contrastLevel):new Fe(92,92,88,85).get(i.contrastLevel),isBackground:!0});pe.surfaceContainerHighest=Ie.fromPalette({name:"surface_container_highest",palette:i=>i.neutralPalette,tone:i=>i.isDark?new Fe(22,22,26,30).get(i.contrastLevel):new Fe(90,90,84,80).get(i.contrastLevel),isBackground:!0});pe.onSurface=Ie.fromPalette({name:"on_surface",palette:i=>i.neutralPalette,tone:i=>i.isDark?90:10,background:i=>pe.highestSurface(i),contrastCurve:new Fe(4.5,7,11,21)});pe.surfaceVariant=Ie.fromPalette({name:"surface_variant",palette:i=>i.neutralVariantPalette,tone:i=>i.isDark?30:90,isBackground:!0});pe.onSurfaceVariant=Ie.fromPalette({name:"on_surface_variant",palette:i=>i.neutralVariantPalette,tone:i=>i.isDark?80:30,background:i=>pe.highestSurface(i),contrastCurve:new Fe(3,4.5,7,11)});pe.inverseSurface=Ie.fromPalette({name:"inverse_surface",palette:i=>i.neutralPalette,tone:i=>i.isDark?90:20});pe.inverseOnSurface=Ie.fromPalette({name:"inverse_on_surface",palette:i=>i.neutralPalette,tone:i=>i.isDark?20:95,background:i=>pe.inverseSurface,contrastCurve:new Fe(4.5,7,11,21)});pe.outline=Ie.fromPalette({name:"outline",palette:i=>i.neutralVariantPalette,tone:i=>i.isDark?60:50,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1.5,3,4.5,7)});pe.outlineVariant=Ie.fromPalette({name:"outline_variant",palette:i=>i.neutralVariantPalette,tone:i=>i.isDark?30:80,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5)});pe.shadow=Ie.fromPalette({name:"shadow",palette:i=>i.neutralPalette,tone:i=>0});pe.scrim=Ie.fromPalette({name:"scrim",palette:i=>i.neutralPalette,tone:i=>0});pe.surfaceTint=Ie.fromPalette({name:"surface_tint",palette:i=>i.primaryPalette,tone:i=>i.isDark?80:40,isBackground:!0});pe.primary=Ie.fromPalette({name:"primary",palette:i=>i.primaryPalette,tone:i=>ht(i)?i.isDark?100:0:i.isDark?80:40,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(3,4.5,7,7),toneDeltaPair:i=>new ai(pe.primaryContainer,pe.primary,10,"nearer",!1)});pe.onPrimary=Ie.fromPalette({name:"on_primary",palette:i=>i.primaryPalette,tone:i=>ht(i)?i.isDark?10:90:i.isDark?20:100,background:i=>pe.primary,contrastCurve:new Fe(4.5,7,11,21)});pe.primaryContainer=Ie.fromPalette({name:"primary_container",palette:i=>i.primaryPalette,tone:i=>Pn(i)?i.sourceColorHct.tone:ht(i)?i.isDark?85:25:i.isDark?30:90,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.primaryContainer,pe.primary,10,"nearer",!1)});pe.onPrimaryContainer=Ie.fromPalette({name:"on_primary_container",palette:i=>i.primaryPalette,tone:i=>Pn(i)?Ie.foregroundTone(pe.primaryContainer.tone(i),4.5):ht(i)?i.isDark?0:100:i.isDark?90:30,background:i=>pe.primaryContainer,contrastCurve:new Fe(3,4.5,7,11)});pe.inversePrimary=Ie.fromPalette({name:"inverse_primary",palette:i=>i.primaryPalette,tone:i=>i.isDark?40:80,background:i=>pe.inverseSurface,contrastCurve:new Fe(3,4.5,7,7)});pe.secondary=Ie.fromPalette({name:"secondary",palette:i=>i.secondaryPalette,tone:i=>i.isDark?80:40,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(3,4.5,7,7),toneDeltaPair:i=>new ai(pe.secondaryContainer,pe.secondary,10,"nearer",!1)});pe.onSecondary=Ie.fromPalette({name:"on_secondary",palette:i=>i.secondaryPalette,tone:i=>ht(i)?i.isDark?10:100:i.isDark?20:100,background:i=>pe.secondary,contrastCurve:new Fe(4.5,7,11,21)});pe.secondaryContainer=Ie.fromPalette({name:"secondary_container",palette:i=>i.secondaryPalette,tone:i=>{const e=i.isDark?30:90;return ht(i)?i.isDark?30:85:Pn(i)?z_(i.secondaryPalette.hue,i.secondaryPalette.chroma,e,!i.isDark):e},isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.secondaryContainer,pe.secondary,10,"nearer",!1)});pe.onSecondaryContainer=Ie.fromPalette({name:"on_secondary_container",palette:i=>i.secondaryPalette,tone:i=>ht(i)?i.isDark?90:10:Pn(i)?Ie.foregroundTone(pe.secondaryContainer.tone(i),4.5):i.isDark?90:30,background:i=>pe.secondaryContainer,contrastCurve:new Fe(3,4.5,7,11)});pe.tertiary=Ie.fromPalette({name:"tertiary",palette:i=>i.tertiaryPalette,tone:i=>ht(i)?i.isDark?90:25:i.isDark?80:40,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(3,4.5,7,7),toneDeltaPair:i=>new ai(pe.tertiaryContainer,pe.tertiary,10,"nearer",!1)});pe.onTertiary=Ie.fromPalette({name:"on_tertiary",palette:i=>i.tertiaryPalette,tone:i=>ht(i)?i.isDark?10:90:i.isDark?20:100,background:i=>pe.tertiary,contrastCurve:new Fe(4.5,7,11,21)});pe.tertiaryContainer=Ie.fromPalette({name:"tertiary_container",palette:i=>i.tertiaryPalette,tone:i=>{if(ht(i))return i.isDark?60:49;if(!Pn(i))return i.isDark?30:90;const e=i.tertiaryPalette.getHct(i.sourceColorHct.tone);return Id.fixIfDisliked(e).tone},isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.tertiaryContainer,pe.tertiary,10,"nearer",!1)});pe.onTertiaryContainer=Ie.fromPalette({name:"on_tertiary_container",palette:i=>i.tertiaryPalette,tone:i=>ht(i)?i.isDark?0:100:Pn(i)?Ie.foregroundTone(pe.tertiaryContainer.tone(i),4.5):i.isDark?90:30,background:i=>pe.tertiaryContainer,contrastCurve:new Fe(3,4.5,7,11)});pe.error=Ie.fromPalette({name:"error",palette:i=>i.errorPalette,tone:i=>i.isDark?80:40,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(3,4.5,7,7),toneDeltaPair:i=>new ai(pe.errorContainer,pe.error,10,"nearer",!1)});pe.onError=Ie.fromPalette({name:"on_error",palette:i=>i.errorPalette,tone:i=>i.isDark?20:100,background:i=>pe.error,contrastCurve:new Fe(4.5,7,11,21)});pe.errorContainer=Ie.fromPalette({name:"error_container",palette:i=>i.errorPalette,tone:i=>i.isDark?30:90,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.errorContainer,pe.error,10,"nearer",!1)});pe.onErrorContainer=Ie.fromPalette({name:"on_error_container",palette:i=>i.errorPalette,tone:i=>ht(i)?i.isDark?90:10:i.isDark?90:30,background:i=>pe.errorContainer,contrastCurve:new Fe(3,4.5,7,11)});pe.primaryFixed=Ie.fromPalette({name:"primary_fixed",palette:i=>i.primaryPalette,tone:i=>ht(i)?40:90,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.primaryFixed,pe.primaryFixedDim,10,"lighter",!0)});pe.primaryFixedDim=Ie.fromPalette({name:"primary_fixed_dim",palette:i=>i.primaryPalette,tone:i=>ht(i)?30:80,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.primaryFixed,pe.primaryFixedDim,10,"lighter",!0)});pe.onPrimaryFixed=Ie.fromPalette({name:"on_primary_fixed",palette:i=>i.primaryPalette,tone:i=>ht(i)?100:10,background:i=>pe.primaryFixedDim,secondBackground:i=>pe.primaryFixed,contrastCurve:new Fe(4.5,7,11,21)});pe.onPrimaryFixedVariant=Ie.fromPalette({name:"on_primary_fixed_variant",palette:i=>i.primaryPalette,tone:i=>ht(i)?90:30,background:i=>pe.primaryFixedDim,secondBackground:i=>pe.primaryFixed,contrastCurve:new Fe(3,4.5,7,11)});pe.secondaryFixed=Ie.fromPalette({name:"secondary_fixed",palette:i=>i.secondaryPalette,tone:i=>ht(i)?80:90,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.secondaryFixed,pe.secondaryFixedDim,10,"lighter",!0)});pe.secondaryFixedDim=Ie.fromPalette({name:"secondary_fixed_dim",palette:i=>i.secondaryPalette,tone:i=>ht(i)?70:80,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.secondaryFixed,pe.secondaryFixedDim,10,"lighter",!0)});pe.onSecondaryFixed=Ie.fromPalette({name:"on_secondary_fixed",palette:i=>i.secondaryPalette,tone:i=>10,background:i=>pe.secondaryFixedDim,secondBackground:i=>pe.secondaryFixed,contrastCurve:new Fe(4.5,7,11,21)});pe.onSecondaryFixedVariant=Ie.fromPalette({name:"on_secondary_fixed_variant",palette:i=>i.secondaryPalette,tone:i=>ht(i)?25:30,background:i=>pe.secondaryFixedDim,secondBackground:i=>pe.secondaryFixed,contrastCurve:new Fe(3,4.5,7,11)});pe.tertiaryFixed=Ie.fromPalette({name:"tertiary_fixed",palette:i=>i.tertiaryPalette,tone:i=>ht(i)?40:90,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.tertiaryFixed,pe.tertiaryFixedDim,10,"lighter",!0)});pe.tertiaryFixedDim=Ie.fromPalette({name:"tertiary_fixed_dim",palette:i=>i.tertiaryPalette,tone:i=>ht(i)?30:80,isBackground:!0,background:i=>pe.highestSurface(i),contrastCurve:new Fe(1,1,3,4.5),toneDeltaPair:i=>new ai(pe.tertiaryFixed,pe.tertiaryFixedDim,10,"lighter",!0)});pe.onTertiaryFixed=Ie.fromPalette({name:"on_tertiary_fixed",palette:i=>i.tertiaryPalette,tone:i=>ht(i)?100:10,background:i=>pe.tertiaryFixedDim,secondBackground:i=>pe.tertiaryFixed,contrastCurve:new Fe(4.5,7,11,21)});pe.onTertiaryFixedVariant=Ie.fromPalette({name:"on_tertiary_fixed_variant",palette:i=>i.tertiaryPalette,tone:i=>ht(i)?90:30,background:i=>pe.tertiaryFixedDim,secondBackground:i=>pe.tertiaryFixed,contrastCurve:new Fe(3,4.5,7,11)});const H_=`:host {
688
688
  --mdui-color-primary-light: var(--mdui-color-primary-light);
689
689
  --mdui-color-primary-dark: var(--mdui-color-primary-dark);
690
690
  --mdui-color-background-light: var(--mdui-color-background-light);
@@ -697,4 +697,4 @@ mdui-text-field::part(input) {
697
697
  form.mode-edit { --label-width: 0em; }
698
698
  .property-instance { margin-bottom:14px; }
699
699
  .mode-edit .property-instance *[required]::part(icon) { align-self: flex-start; padding-top: 0.7em; }
700
- .mode-edit .property-instance *[required]::part(icon)::before { color: red; content: '\\2736'; font-size: 0.6em; }`;class G_ extends bg{constructor(){super(W_)}createDefaultTemplate(e,t,r,n,s){n.classList.add("editor"),s?.datatype?n.shaclDatatype=s.datatype:t instanceof yi&&(n.shaclDatatype=t.datatype),s?.minCount!==void 0&&(n.dataset.minCount=String(s.minCount)),s?.class&&(n.dataset.class=s.class.value),s?.nodeKind?n.dataset.nodeKind=s.nodeKind.value:t instanceof Mo&&(n.dataset.nodeKind=Oe+"IRI"),(s?.hasValue||s?.readonly)&&(n.disabled=!0),n.value=t?.value||s?.defaultValue?.value||"";const o=s?.description?s.description.value:s?.pattern?s.pattern:null;o&&n.setAttribute("placeholder",o),r&&n.setAttribute("required","true");const a=document.createElement("div");if(e){const c=document.createElement("label");c.htmlFor=n.id,c.innerText=e,a.appendChild(c)}return a.appendChild(n),a}createTextEditor(e,t,r,n){const s=new Ne;return s.variant="outlined",s.label=e,s.type="text",n.description&&(s.helper=n.description.value),n.singleLine===!1&&(s.rows=5),n.pattern&&(s.pattern=n.pattern),this.createDefaultTemplate("",t,r,s,n)}createNumberEditor(e,t,r,n){const s=new Ne;s.variant="outlined",s.type="number",s.label=e,s.helper=n.description?.value||"";const o=n.minInclusive!==void 0?n.minInclusive:n.minExclusive!==void 0?n.minExclusive+1:void 0,a=n.maxInclusive!==void 0?n.maxInclusive:n.maxExclusive!==void 0?n.maxExclusive-1:void 0;return o!==void 0&&s.setAttribute("min",String(o)),a!==void 0&&s.setAttribute("max",String(a)),n.datatype?.value!==br+"integer"&&s.setAttribute("step","0.1"),this.createDefaultTemplate("",t,r,s,n)}createListEditor(e,t,r,n,s){const o=new St;o.clearable=!0;const a=this.createDefaultTemplate(e,null,r,o,s),c=document.createElement("ul");let l=!0;const d=(u,p)=>{const g=document.createElement("li");if(typeof u.value=="string"?(g.dataset.value=u.value,g.innerText=u.label?u.label:u.value):(u.value instanceof yi&&u.value.datatype.equals(cg)?g.dataset.value=u.value.value:g.dataset.value=u.value.id,g.innerText=u.label?u.label:u.value.value),p.appendChild(g),u.children?.length){l=!1;const v=document.createElement("ul");g.appendChild(v);for(const _ of u.children)d(_,v)}};for(const u of n)d(u,c);return l||(o.collapse=!0),o.appendChild(c),t&&(o.value=t.value),a}createBooleanEditor(e,t,r,n){const s=new Tt,o=this.createDefaultTemplate("",t,r,s,n);return s.removeAttribute("required"),t instanceof yi&&(s.checked=t.value==="true"),s.innerText=e,o}createDateEditor(e,t,r,n){const s=new Ne;s.variant="outlined",s.helper=n?.description?.value||n?.label||"",n.datatype?.value===br+"dateTime"?(s.type="datetime-local",s.setAttribute("step","1")):s.type="date",s.classList.add("pr-0");const o=this.createDefaultTemplate("",null,r,s,n);if(t)try{let a=new Date(t.value).toISOString();n.datatype?.value===br+"dateTime"?a=a.slice(0,19):a=a.slice(0,10),s.value=a}catch(a){console.error(a,t)}return o}createLangStringEditor(e,t,r,n){const s=this.createTextEditor(e,t,r,n),o=s.querySelector(":scope .editor");let a;if(n.languageIn?.length){a=document.createElement("select");for(const c of n.languageIn){const l=document.createElement("option");l.innerText=c.value,a.appendChild(l)}}else a=document.createElement("input"),a.maxLength=5,a.placeholder="lang?";return a.title="Language of the text",a.classList.add("lang-chooser"),a.addEventListener("change",c=>{c.stopPropagation(),o&&(o.dataset.lang=a.value,o.dispatchEvent(new Event("change",{bubbles:!0})))}),t instanceof yi&&(a.value=t.language),o.dataset.lang=a.value,o.after(a),s}createFileEditor(e,t,r,n){const s=document.createElement("input");return s.type="file",s.addEventListener("change",o=>{if(s.files?.length){o.stopPropagation();const a=new FileReader;a.readAsDataURL(s.files[0]),a.onload=()=>{s.binaryData=btoa(a.result),s.parentElement?.dispatchEvent(new Event("change",{bubbles:!0}))}}else s.binaryData=void 0}),this.createDefaultTemplate(e,t,r,s,n)}createButton(e,t){let r;return t?(r=new ir,r.classList.add("primary")):(r=new ir,r.classList.add("secondary")),r.innerHTML=e,r}}class K_ extends Rw{constructor(){super(new G_)}}window.customElements.define("shacl-form",K_);export{qh as Config,fy as Loader,ix as Plugin,K_ as ShaclForm,mg as ShaclPropertyTemplate,bg as Theme,js as findLabel,xg as registerPlugin,py as setSharedShapesGraph};
700
+ .mode-edit .property-instance *[required]::part(icon)::before { color: red; content: '\\2736'; font-size: 0.6em; }`;class W_ extends bg{constructor(){super(H_)}createDefaultTemplate(e,t,r,n,s){n.classList.add("editor"),s?.datatype?n.shaclDatatype=s.datatype:t instanceof yi&&(n.shaclDatatype=t.datatype),s?.minCount!==void 0&&(n.dataset.minCount=String(s.minCount)),s?.class&&(n.dataset.class=s.class.value),s?.nodeKind?n.dataset.nodeKind=s.nodeKind.value:t instanceof Mo&&(n.dataset.nodeKind=Oe+"IRI"),(s?.hasValue||s?.readonly)&&(n.disabled=!0),n.value=t?.value||s?.defaultValue?.value||"";const o=s?.description?s.description.value:s?.pattern?s.pattern:null;o&&n.setAttribute("placeholder",o),r&&n.setAttribute("required","true");const a=document.createElement("div");if(e){const c=document.createElement("label");c.htmlFor=n.id,c.innerText=e,a.appendChild(c)}return a.appendChild(n),a}createTextEditor(e,t,r,n){const s=new Ne;return s.variant="outlined",s.label=e,s.type="text",n.description&&(s.helper=n.description.value),n.singleLine===!1&&(s.rows=5),n.pattern&&(s.pattern=n.pattern),this.createDefaultTemplate("",t,r,s,n)}createNumberEditor(e,t,r,n){const s=new Ne;s.variant="outlined",s.type="number",s.label=e,s.helper=n.description?.value||"";const o=n.minInclusive!==void 0?n.minInclusive:n.minExclusive!==void 0?n.minExclusive+1:void 0,a=n.maxInclusive!==void 0?n.maxInclusive:n.maxExclusive!==void 0?n.maxExclusive-1:void 0;return o!==void 0&&s.setAttribute("min",String(o)),a!==void 0&&s.setAttribute("max",String(a)),n.datatype?.value!==br+"integer"&&s.setAttribute("step","0.1"),this.createDefaultTemplate("",t,r,s,n)}createListEditor(e,t,r,n,s){const o=new St;o.clearable=!0;const a=this.createDefaultTemplate(e,null,r,o,s),c=document.createElement("ul");let l=!0;const d=(u,p)=>{const g=document.createElement("li");if(typeof u.value=="string"?(g.dataset.value=u.value,g.innerText=u.label?u.label:u.value):(u.value instanceof yi&&u.value.datatype.equals(cg)?g.dataset.value=u.value.value:g.dataset.value=u.value.id,g.innerText=u.label?u.label:u.value.value),p.appendChild(g),u.children?.length){l=!1;const v=document.createElement("ul");g.appendChild(v);for(const _ of u.children)d(_,v)}};for(const u of n)d(u,c);return l||(o.collapse=!0),o.appendChild(c),t&&(o.value=t.value),a}createBooleanEditor(e,t,r,n){const s=new Tt,o=this.createDefaultTemplate("",t,r,s,n);return s.removeAttribute("required"),t instanceof yi&&(s.checked=t.value==="true"),s.innerText=e,o}createDateEditor(e,t,r,n){const s=new Ne;s.variant="outlined",s.helper=n?.description?.value||n?.label||"",n.datatype?.value===br+"dateTime"?(s.type="datetime-local",s.setAttribute("step","1")):s.type="date",s.classList.add("pr-0");const o=this.createDefaultTemplate("",null,r,s,n);if(t)try{let a=new Date(t.value).toISOString();n.datatype?.value===br+"dateTime"?a=a.slice(0,19):a=a.slice(0,10),s.value=a}catch(a){console.error(a,t)}return o}createLangStringEditor(e,t,r,n){const s=this.createTextEditor(e,t,r,n),o=s.querySelector(":scope .editor");let a;if(n.languageIn?.length){a=document.createElement("select");for(const c of n.languageIn){const l=document.createElement("option");l.innerText=c.value,a.appendChild(l)}}else a=document.createElement("input"),a.maxLength=5,a.placeholder="lang?";return a.title="Language of the text",a.classList.add("lang-chooser"),a.addEventListener("change",c=>{c.stopPropagation(),o&&(o.dataset.lang=a.value,o.dispatchEvent(new Event("change",{bubbles:!0})))}),t instanceof yi&&(a.value=t.language),o.dataset.lang=a.value,o.after(a),s}createFileEditor(e,t,r,n){const s=document.createElement("input");return s.type="file",s.addEventListener("change",o=>{if(s.files?.length){o.stopPropagation();const a=new FileReader;a.readAsDataURL(s.files[0]),a.onload=()=>{s.binaryData=btoa(a.result),s.parentElement?.dispatchEvent(new Event("change",{bubbles:!0}))}}else s.binaryData=void 0}),this.createDefaultTemplate(e,t,r,s,n)}createButton(e,t){let r;return t?(r=new ir,r.classList.add("primary")):(r=new ir,r.classList.add("secondary")),r.innerHTML=e,r}}class G_ extends kw{constructor(){super(new W_)}}window.customElements.define("shacl-form",G_);export{qh as Config,hy as Loader,tx as Plugin,G_ as ShaclForm,mg as ShaclPropertyTemplate,bg as Theme,js as findLabel,xg as registerPlugin,fy as setSharedShapesGraph};