UNPKG

mdui

Version:

实现 material you 设计规范的 Web Components 组件库

6 lines 357 kB
/*! * mdui 2.1.2 (https://www.mdui.org) * Copyright 2016-2024 zdhxiong <zdhxiong@gmail.com> * Licensed under MIT */ function e(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function t(i={},o={}){Object.keys(o).forEach((r=>{void 0===i[r]?i[r]=o[r]:e(o[r])&&e(i[r])&&Object.keys(o[r]).length>0&&t(i[r],o[r])}))}const i={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function o(){const e="undefined"!=typeof document?document:{};return t(e,i),e}const r={document:i,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function n(){const e="undefined"!=typeof window?window:{};return t(e,r),e}const s=(e,t)=>e?.nodeName.toLowerCase()===t.toLowerCase(),a=e=>"function"==typeof e,l=e=>"string"==typeof e,c=e=>"number"==typeof e,d=e=>"boolean"==typeof e,h=e=>void 0===e,u=e=>null===e,p=e=>"undefined"!=typeof Window&&e instanceof Window,m=e=>"undefined"!=typeof Document&&e instanceof Document,f=e=>"undefined"!=typeof Element&&e instanceof Element,v=e=>!a(e)&&!p(e)&&c(e.length),g=e=>"object"==typeof e&&null!==e,b=e=>m(e)?e.documentElement:e,y=e=>e.replace(/-([a-z])/g,((e,t)=>t.toUpperCase())),w=e=>e?e.replace(/^./,e[0].toLowerCase()).replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())):e,k=()=>!1,C=()=>!0,x=(e,t)=>{for(let i=0;i<e.length;i+=1)if(!1===t.call(e[i],e[i],i))return e;return e},$=(e,t)=>{const i=Object.keys(e);for(let o=0;o<i.length;o+=1){const r=i[o];if(!1===t.call(e[r],r,e[r]))return e}return e};class E{constructor(e){return this.length=0,e?(x(e,((e,t)=>{this[t]=e})),this.length=e.length,this):this}}const R=(e=o())=>/complete|interactive/.test(e.readyState),I=e=>o().createElement(e),S=(e,t)=>e.appendChild(t),A=e=>e.parentNode?e.parentNode.removeChild(e):e,D=(e,t)=>{const i=I(t);return i.innerHTML=e,[].slice.call(i.childNodes)},T=(()=>{const e=function(t){if(!t)return new E;if(t instanceof E)return t;if(a(t)){const i=o();return R(i)?t.call(i,e):i.addEventListener("DOMContentLoaded",(()=>t.call(i,e)),{once:!0}),new E([i])}if(l(t)){const e=t.trim();if(e.startsWith("<")&&e.endsWith(">")){let t="div";return $({li:"ul",tr:"tbody",td:"tr",th:"tr",tbody:"table",option:"select"},((i,o)=>{if(e.startsWith(`<${i}`))return t=o,!1})),new E(D(e,t))}const i=o();return new E(i.querySelectorAll(t))}return!v(t)||(i=t,"undefined"!=typeof Node&&i instanceof Node)?new E([t]):new E(t);var i};return e.fn=E.prototype,e})(),P=(e,t)=>(x(t,(t=>{e.push(t)})),e),M=e=>[...new Set(e)];T.fn.get=function(e){return void 0===e?[].slice.call(this):this[e>=0?e:e+this.length]},T.fn.add=function(e){return new E(M(P(this.get(),T(e).get())))};const _=(e,t,i)=>{const o=e.getAttribute(t);return u(o)?i:o},L=(e,t)=>{e.removeAttribute(t)},O=(e,t,i)=>{u(i)?L(e,t):e.setAttribute(t,i)};T.fn.each=function(e){return x(this,((t,i)=>e.call(t,i,t)))},x(["add","remove","toggle"],(e=>{T.fn[`${e}Class`]=function(t){return"remove"!==e||arguments.length?this.each(((i,o)=>{if(!f(o))return;const r=(a(t)?t.call(o,i,_(o,"class","")):t).split(" ").filter((e=>e));x(r,(t=>{o.classList[e](t)}))})):this.each(((e,t)=>{O(t,"class","")}))}})),x(["insertBefore","insertAfter"],((e,t)=>{T.fn[e]=function(e){const i=t?T(this.get().reverse()):this,o=T(e),r=[];return o.each(((e,o)=>{o.parentNode&&i.each(((i,n)=>{const s=e?n.cloneNode(!0):n,a=t?o.nextSibling:o;r.push(s),o.parentNode.insertBefore(s,a)}))})),T(t?r.reverse():r)}}));function z(e,t){return v(e)?x(e,((e,i)=>t.call(e,i,e))):$(e,t)}function B(e,t){const i=n();let o;const r=[];return z(e,((e,n)=>{o=t.call(i,n,e),null!=o&&r.push(o)})),[].concat(...r)}x(["before","after"],((e,t)=>{T.fn[e]=function(...e){return 1===t&&(e=e.reverse()),this.each(((i,o)=>{const r=a(e[0])?[e[0].call(o,i,o.innerHTML)]:e;x(r,(e=>{let r;r=(e=>l(e)&&!(e.startsWith("<")&&e.endsWith(">")))(e)?T(D(e,"div")):i&&f(e)?T(e.cloneNode(!0)):T(e),r[t?"insertAfter":"insertBefore"](o)}))}))}})),T.fn.map=function(e){return new E(B(this,((t,i)=>e.call(t,i,t))))},T.fn.clone=function(){return this.map((function(){return this.cloneNode(!0)}))},T.fn.is=function(e){let t=!1;if(a(e))return this.each(((i,o)=>{e.call(o,i,o)&&(t=!0)})),t;if(l(e))return this.each(((i,o)=>{m(o)||p(o)||o.matches.call(o,e)&&(t=!0)})),t;const i=T(e);return this.each(((e,o)=>{i.each(((e,i)=>{o===i&&(t=!0)}))})),t},T.fn.remove=function(e){return this.each(((t,i)=>{e&&!T(i).is(e)||A(i)}))},x(["prepend","append"],((e,t)=>{T.fn[e]=function(...e){return this.each(((i,o)=>{const r=o.childNodes,n=r.length,s=n?r[t?n-1:0]:I("div");n||S(o,s);let c=a(e[0])?[e[0].call(o,i,o.innerHTML)]:e;i&&(c=c.map((e=>l(e)?e:T(e).clone()))),T(s)[t?"after":"before"](...c),n||A(s)}))}})),x(["appendTo","prependTo"],((e,t)=>{T.fn[e]=function(e){const i=[],o=T(e).map(((e,o)=>{const r=o.childNodes,n=r.length;if(n)return r[t?0:n-1];const s=I("div");return S(o,s),i.push(s),s})),r=this[t?"insertBefore":"insertAfter"](o);return T(i).remove(),r}}));const V=(e,t)=>n().getComputedStyle(e).getPropertyValue(w(t)),N=e=>"border-box"===V(e,"box-sizing"),F=(e,t,i)=>{const o="width"===t?["Left","Right"]:["Top","Bottom"];return[0,1].reduce(((t,r,n)=>{let s=i+o[n];return"border"===i&&(s+="Width"),t+parseFloat(V(e,s)||"0")}),0)},H=(e,t)=>{if("width"===t||"height"===t){const i=e.getBoundingClientRect()[t];return N(e)?`${i}px`:i-F(e,t,"border")-F(e,t,"padding")+"px"}return V(e,t)},U=["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"];x(["attr","prop","css"],((e,t)=>{const i=(e,i)=>0===t?_(e,i):1===t?e[i]:H(e,i);T.fn[e]=function(o,r){if(g(o))return $(o,((t,i)=>{this[e](t,i)})),this;if(1===arguments.length){const e=this[0];return f(e)?i(e,o):void 0}return this.each(((e,n)=>{((e,i,o)=>{if(h(o))return;if(0===t)return O(e,i,o);if(1===t)return void(e[i]=o);i=w(i),e.style.setProperty(i,c(o)?`${o}${i.startsWith("--")||U.includes(i)?"":"px"}`:o)})(n,o,a(r)?r.call(n,e,i(n,o)):r)}))}})),T.fn.children=function(e){const t=[];return this.each(((i,o)=>{x(o.childNodes,(i=>{f(i)&&(e&&!T(i).is(e)||t.push(i))}))})),new E(M(t))},T.fn.slice=function(...e){return new E([].slice.apply(this,e))},T.fn.eq=function(e){const t=-1===e?this.slice(e):this.slice(e,+e+1);return new E(t)};const K=(e,t,i,o,r)=>{const n=[];let s;return e.each(((e,a)=>{for(s=a[i];s&&f(s);){if(2===t){if(o&&T(s).is(o))break;r&&!T(s).is(r)||n.push(s)}else{if(0===t){o&&!T(s).is(o)||n.push(s);break}o&&!T(s).is(o)||n.push(s)}s=s[i]}})),new E(M(n))};x(["","s","sUntil"],((e,t)=>{T.fn[`parent${e}`]=function(e,i){const o=t?T(this.get().reverse()):this;return K(o,t,"parentNode",e,i)}})),T.fn.closest=function(e){if(this.is(e))return this;const t=[];return this.parents().each(((i,o)=>{if(T(o).is(e))return t.push(o),!1})),new E(t)};const q=new WeakMap,j=e=>q.get(e)??{},W=(e,t)=>{const i=j(e),o=y(t);return o in i?i[o]:void 0},Y=(e,t)=>{const i=j(e);$(t,((e,t)=>{i[y(e)]=t})),q.set(e,i)},G=(e,t,i)=>{Y(e,{[t]:i})},X=/^(?:{[\w\W]*\}|\[[\w\W]*\])$/,J=(e,t,i)=>{if(h(i)&&1===e.nodeType&&(i=e.dataset[t],l(i)))try{i=(e=>"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:X.test(e)?JSON.parse(e):e))(i)}catch(e){}return i};T.fn.data=function(e,t){if(h(e)){if(!this.length)return;const e=this[0],t=j(e);return 1!==e.nodeType||$(e.dataset,(i=>{t[i]=J(e,i,t[i])})),t}return g(e)?this.each((function(){Y(this,e)})):2===arguments.length&&h(t)?this:h(t)?this.length?J(this[0],y(e),W(this[0],e)):void 0:this.each((function(){G(this,e,t)}))},T.fn.empty=function(){return this.each(((e,t)=>{t.innerHTML=""}))},T.fn.extend=function(e){return $(e,((e,t)=>{T.fn[e]=t})),this},T.fn.filter=function(e){if(a(e))return this.map(((t,i)=>e.call(i,t,i)?i:void 0));if(l(e))return this.map(((t,i)=>T(i).is(e)?i:void 0));const t=T(e);return this.map(((e,i)=>t.get().includes(i)?i:void 0))},T.fn.find=function(e){const t=[];return this.each(((i,o)=>{P(t,T(o.querySelectorAll(e)).get())})),new E(t)},T.fn.first=function(){return this.eq(0)};const Z=(e,t)=>e!==t&&b(e).contains(t);T.fn.has=function(e){const t=l(e)?this.find(e):T(e),{length:i}=t;return this.map((function(){for(let e=0;e<i;e+=1)if(Z(this,t[e]))return this}))},T.fn.hasClass=function(e){return this[0].classList.contains(e)};const Q=(e,t,i,o,r,n)=>{const s=i=>F(e,t.toLowerCase(),i)*n;return 2===o&&r&&(i+=s("margin")),N(e)?(0===o&&(i-=s("border")),1===o&&(i-=s("border"),i-=s("padding"))):(0===o&&(i+=s("padding")),2===o&&(i+=s("border"),i+=s("padding"))),i},ee=(e,t,i,r)=>{const n=o(),s=`client${t}`,a=`scroll${t}`,l=`offset${t}`,c=`inner${t}`;if(p(e))return 2===i?e[c]:b(n)[s];if(m(e)){const t=b(e);return Math.max(e.body[a],t[a],e.body[l],t[l],t[s])}const d=parseFloat(V(e,t.toLowerCase())||"0");return Q(e,t,d,i,r,1)};x(["Width","Height"],(e=>{x([`inner${e}`,e.toLowerCase(),`outer${e}`],((t,i)=>{T.fn[t]=function(t,o){const r=arguments.length&&(i<2||!d(t)),n=!0===t||!0===o;return r?this.each(((o,r)=>((e,t,i,o,r,n)=>{let s=a(n)?n.call(e,t,ee(e,i,o,r)):n;if(null==s)return;const c=T(e),d=i.toLowerCase();if(l(s)&&["auto","inherit",""].includes(s))return void c.css(d,s);const h=s.toString().replace(/\b[0-9.]*/,""),u=parseFloat(s);s=Q(e,i,u,o,r,-1)+(h||"px"),c.css(d,s)})(r,o,e,i,n,t))):this.length?ee(this[0],e,i,n):void 0}}))})),T.fn.hide=function(){return this.each(((e,t)=>{t.style.display="none"}))},x(["val","html","text"],((e,t)=>{const i=["value","innerHTML","textContent"][t],o=e=>{if(2===t)return B(e,(e=>b(e)[i])).join("");if(!e.length)return;const o=e[0],r=T(o);return 0===t&&r.is("select[multiple]")?B(r.find("option:checked"),(e=>e.value)):o[i]};T.fn[e]=function(e){return arguments.length?this.each(((r,n)=>{const s=T(n),l=a(e)?e.call(n,r,o(s)):e;0===t&&Array.isArray(l)?s.is("select[multiple]")?B(s.find("option"),(e=>e.selected=l.includes(e.value))):n.checked=l.includes(n.value):((e,o)=>{if(h(o)){if(0!==t)return;o=""}1===t&&f(o)&&(o=o.outerHTML),e[i]=o})(n,l)})):o(this)}})),T.fn.index=function(e){return arguments.length?l(e)?T(e).get().indexOf(this[0]):this.get().indexOf(T(e)[0]):this.eq(0).parent().children().get().indexOf(this[0])},T.fn.last=function(){return this.eq(-1)},x(["","All","Until"],((e,t)=>{T.fn[`next${e}`]=function(e,i){return K(this,t,"nextElementSibling",e,i)}})),T.fn.not=function(e){const t=this.filter(e);return this.map(((e,i)=>t.index(i)>-1?void 0:i))};const te=n().CustomEvent;class ie extends te{constructor(e,t){super(e,t),this.data=t.data,this.namespace=t.namespace}}const oe=new WeakMap;let re=1;const ne=e=>(oe.has(e)||oe.set(e,++re),oe.get(e)),se=new Map,ae=e=>{const t=ne(e);return se.get(t)||se.set(t,[]).get(t)},le=e=>{const t=e.split(".");return{type:t[0],namespace:t.slice(1).sort().join(" ")}},ce=e=>new RegExp("(?:^| )"+e.replace(" "," .* ?")+"(?: |$)"),de=(e,t,i,o)=>{const r=ae(e),n=t=>{delete r[t.id],e.removeEventListener(t.type,t.proxy,!1)};t?t.split(" ").forEach((t=>{t&&((e,t,i,o)=>{const r=le(t);return ae(e).filter((e=>e&&(!r.type||e.type===r.type)&&(!r.namespace||ce(r.namespace).test(e.namespace))&&(!i||ne(e.func)===ne(i))&&(!o||e.selector===o)))})(e,t,i,o).forEach((e=>{n(e)}))})):r.forEach((e=>{n(e)}))};function he(e,...t){return x(t,(t=>{$(t,((t,i)=>{h(i)||(e[t]=i)}))})),e}T.fn.off=function(e,t,i){return g(e)?($(e,((e,i)=>{this.off(e,t,i)})),this):((!1===t||a(t))&&(i=t,t=void 0),!1===i&&(i=k),this.each((function(){de(this,e,i,t)})))},T.fn.offsetParent=function(){const e=o();return this.map((function(){let t=this.offsetParent;for(;t&&"static"===T(t).css("position");)t=t.offsetParent;return t||e.documentElement}))};const ue=(e,t)=>parseFloat(e.css(t));T.fn.position=function(){if(!this.length)return;const e=this.eq(0);let t,i={left:0,top:0};if("fixed"===e.css("position"))t=e[0].getBoundingClientRect();else{t=e.offset();const o=e.offsetParent();i=o.offset(),i.top+=ue(o,"border-top-width"),i.left+=ue(o,"border-left-width")}return{top:t.top-i.top-ue(e,"margin-top"),left:t.left-i.left-ue(e,"margin-left")}};const pe=e=>{if(!e.getClientRects().length)return{top:0,left:0};const{top:t,left:i}=e.getBoundingClientRect(),{pageYOffset:o,pageXOffset:r}=e.ownerDocument.defaultView;return{top:t+o,left:i+r}};T.fn.offset=function(e){if(!arguments.length){if(!this.length)return;return pe(this[0])}return this.each((function(t){((e,t,i)=>{const o=T(e),r=o.css("position");"static"===r&&o.css("position","relative");const n=pe(e),s=o.css("top"),l=o.css("left");let c,d;if("absolute"!==r&&"fixed"!==r||!(s+l).includes("auto"))c=parseFloat(s),d=parseFloat(l);else{const e=o.position();c=e.top,d=e.left}const h=a(t)?t.call(e,i,he({},n)):t;o.css({top:null!=h.top?h.top-n.top+c:void 0,left:null!=h.left?h.left-n.left+d:void 0})})(this,e,t)}))},T.fn.on=function(e,t,i,o,r){if(g(e))return l(t)||(i=i||t,t=void 0),$(e,((e,o)=>{this.on(e,t,i,o,r)})),this;if(null==i&&null==o?(o=t,i=t=void 0):null==o&&(l(t)?(o=i,i=void 0):(o=i,i=t,t=void 0)),!1===o)o=k;else if(!o)return this;if(r){const e=this,i=o;o=function(r,...n){return e.off(r.type,t,o),i.call(this,r,...n)}}return this.each((function(){((e,t,i,o,r)=>{let n=!1;g(o)&&o.useCapture&&(n=!0),t.split(" ").forEach((t=>{if(!t)return;const s=le(t),a=(e,t)=>{!1===i.apply(t,null===e.detail?[e]:[e].concat(e.detail))&&(e.preventDefault(),e.stopPropagation())},l=t=>{t.namespace&&!ce(t.namespace).test(s.namespace)||(t.data=o,r?T(e).find(r).get().reverse().forEach((e=>{(e===t.target||Z(e,t.target))&&a(t,e)})):a(t,e))},c={type:s.type,namespace:s.namespace,func:i,selector:r,id:ae(e).length,proxy:l};ae(e).push(c),e.addEventListener(c.type,l,n)}))})(this,e,o,i,t)}))},T.fn.one=function(e,t,i,o){return this.on(e,t,i,o,!0)},x(["","All","Until"],((e,t)=>{T.fn[`prev${e}`]=function(e,i){const o=t?T(this.get().reverse()):this;return K(o,t,"previousElementSibling",e,i)}})),T.fn.removeAttr=function(e){const t=e.split(" ").filter((e=>e));return this.each((function(){x(t,(e=>{L(this,e)}))}))};const me=(e,t)=>{if(h(t))return(e=>{q.delete(e)})(e);((e,t)=>{const i=j(e);x(t,(e=>{const t=y(e);delete i[t]})),q.set(e,i)})(e,l(t)?t.split(" ").filter((e=>e)):t)};T.fn.removeData=function(e){return this.each(((t,i)=>{me(i,e)}))},T.fn.removeProp=function(e){return this.each(((t,i)=>{try{delete i[e]}catch(e){}}))},T.fn.replaceWith=function(e){return this.each(((t,i)=>{let o=e;a(o)?o=o.call(i,t,i.innerHTML):t&&!l(o)&&(o=T(o).clone()),T(i).before(o)})),this.remove()},T.fn.replaceAll=function(e){return T(e).map(((e,t)=>(T(t).replaceWith(e?this.clone():this),this.get())))};const fe=e=>{if(!g(e)&&!Array.isArray(e))return"";const t=[],i=(e,o)=>{let r;g(o)?$(o,((t,n)=>{r=Array.isArray(o)&&!g(n)?"":t,i(`${e}[${r}]`,n)})):(r=null==o||""===o?"=":`=${encodeURIComponent(o)}`,t.push(encodeURIComponent(e)+r))};return Array.isArray(e)?x(e,(({name:e,value:t})=>i(e,t))):$(e,i),t.join("&")},ve=new WeakMap,ge=e=>[...[...e.elements],...ve.get(e)||[]].sort(((e,t)=>e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),be=e=>{const t=[];return e.each(((e,i)=>{const o=i instanceof HTMLFormElement?ge(i):[i];T(o).each(((e,i)=>{const o=T(i),r=i.type,n=i.nodeName.toLowerCase();"fieldset"===n||!i.name||i.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(n)||["submit","button","image","reset","file"].includes(r)||["radio","checkbox"].includes(r)&&!i.checked||["mdui-checkbox","mdui-switch"].includes(n)&&!i.checked||t.push({name:i.name,value:o.val()})}))})),t};T.fn.serializeArray=function(){return be(this).map((e=>Array.isArray(e.value)?e.value.map((t=>({name:e.name,value:t}))):e)).flat()},T.fn.serialize=function(){return fe(this.serializeArray())},T.fn.serializeObject=function(){const e={};return be(this).forEach((t=>{const{name:i,value:o}=t;if(e.hasOwnProperty(i)){const t=e[i];Array.isArray(t)||(e[i]=[t]),Array.isArray(o)?e[i].push(...o):e[i].push(o)}else e[i]=o})),e};const ye={};T.fn.show=function(){return this.each(((e,t)=>{"none"===t.style.display&&(t.style.display=""),"none"===H(t,"display")&&(t.style.display=(e=>{const t=o();let i,r;return ye[e]||(i=I(e),S(t.body,i),r=H(i,"display"),A(i),"none"===r&&(r="block"),ye[e]=r),ye[e]})(t.nodeName))}))},T.fn.siblings=function(e){return this.prevAll(e).add(this.nextAll(e))},T.fn.toggle=function(){return this.each(((e,t)=>{"none"===H(t,"display")?T(t).show():T(t).hide()}))},T.fn.trigger=function(e,t=null,i){const{type:o,namespace:r}=le(e),n=new ie(o,{detail:t,data:null,namespace:r,bubbles:!0,cancelable:!1,composed:!0,...i});return this.each(((e,t)=>{t.dispatchEvent(n)}))};const we="ajaxSuccess",ke="ajaxError",Ce="ajaxComplete",xe={},$e=(e,t)=>`${e}&${t}`.replace(/[&?]{1,2}/,"?"),Ee=e=>{const t=o(),i=n();let r=!1;const s={},a={},c=(e=>{const t={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 $(xe,((e,i)=>{["beforeSend","success","error","complete","statusCode"].includes(e)||h(i)||(t[e]=i)})),he({},t,e)})(e),d=c.method.toUpperCase();let{data:u,url:p}=c;p=p||i.location.toString();const{processData:m,async:f,cache:v,username:g,password:b,headers:y,xhrFields:w,statusCode:k,dataType:C,contentType:E,timeout:R,global:I}=c,S=(e=>["GET","HEAD"].includes(e))(d);!u||!S&&!m||l(u)||u instanceof ArrayBuffer||u instanceof Blob||u instanceof Document||u instanceof FormData||(u=fe(u)),u&&S&&(p=$e(p,u),u=null);const A=(e,i,...o)=>{let n,l;I&&T(t).trigger(e,"success"===i?a:s),i in xe&&(n=xe[i](...o)),c[i]&&(l=c[i](...o)),"beforeSend"===i&&[n,l].includes(!1)&&(r=!0)};return(()=>{let e;return new Promise(((t,o)=>{const l=e=>o(new Error(e));S&&!v&&(p=$e(p,`_=${Date.now()}`));const m=new XMLHttpRequest;let I;if(m.open(d,p,f,g,b),(E||u&&!S&&!1!==E)&&m.setRequestHeader("Content-Type",E),"json"===C&&m.setRequestHeader("Accept","application/json, text/javascript"),$(y,((e,t)=>{h(t)||m.setRequestHeader(e,t+"")})),(e=>{const t=n();return/^([\w-]+:)?\/\/([^/]+)/.test(e)&&RegExp.$2!==t.location.host})(p)||m.setRequestHeader("X-Requested-With","XMLHttpRequest"),$(w,((e,t)=>{m[e]=t})),s.xhr=a.xhr=m,s.options=a.options=c,m.onload=()=>{I&&clearTimeout(I);const i=(o=m.status)>=200&&o<300||[0,304].includes(o);var o;let r;if(i)if(e=204===m.status||"HEAD"===d?"nocontent":304===m.status?"notmodified":"success","json"===C||!C&&(m.getResponseHeader("content-type")||"").includes("json")){try{r="HEAD"===d?void 0:JSON.parse(m.responseText),a.response=r}catch(t){e="parsererror",A(ke,"error",m,e),l(e)}"parsererror"!==e&&(A(we,"success",r,e,m),t(r))}else r="HEAD"===d?void 0:"text"===m.responseType||""===m.responseType?m.responseText:m.response,a.response=r,A(we,"success",r,e,m),t(r);else e="error",A(ke,"error",m,e),l(e);x([xe.statusCode??{},k],(t=>{t[m.status]&&(i?t[m.status](r,e,m):t[m.status](m,e))})),A(Ce,"complete",m,e)},m.onerror=()=>{I&&clearTimeout(I),A(ke,"error",m,m.statusText),A(Ce,"complete",m,"error"),l(m.statusText)},m.onabort=()=>{let e="abort";I&&(e="timeout",clearTimeout(I)),A(ke,"error",m,e),A(Ce,"complete",m,e),l(e)},A("ajaxStart","beforeSend",m,c),r)return l("cancel");R>0&&(I=i.setTimeout((()=>m.abort()),R)),m.send(u)}))})()};T.ajax=Ee;function Re(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s}T.ajaxSetup=e=>he(xe,e),T.contains=Z,T.data=function(e,t,i){return g(t)?(Y(e,t),t):h(i)?h(t)?j(e):W(e,t):(G(e,t,i),i)},T.each=z,T.extend=function(e,...t){return t.length?he(e,...t):($(e,((e,t)=>{this[e]=t})),this)},T.map=B,T.merge=P,T.param=fe,T.removeData=me,T.unique=M,"function"==typeof SuppressedError&&SuppressedError;const Ie=globalThis,Se=Ie.ShadowRoot&&(void 0===Ie.ShadyCSS||Ie.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ae=Symbol(),De=new WeakMap;let Te=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Ae)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Se&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=De.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&De.set(t,e))}return e}toString(){return this.cssText}};const Pe=(e,...t)=>{const i=1===e.length?e[0]:t.reduce(((t,i,o)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[o+1]),e[0]);return new Te(i,e,Ae)},Me=Se?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(e=>new Te("string"==typeof e?e:e+"",void 0,Ae))(t)})(e):e,{is:_e,defineProperty:Le,getOwnPropertyDescriptor:Oe,getOwnPropertyNames:ze,getOwnPropertySymbols:Be,getPrototypeOf:Ve}=Object,Ne=globalThis,Fe=Ne.trustedTypes,He=Fe?Fe.emptyScript:"",Ue=Ne.reactiveElementPolyfillSupport,Ke=(e,t)=>e,qe={toAttribute(e,t){switch(t){case Boolean:e=e?He:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},je=(e,t)=>!_e(e,t),We={attribute:!0,type:String,converter:qe,reflect:!1,hasChanged:je};Symbol.metadata??=Symbol("metadata"),Ne.litPropertyMetadata??=new WeakMap;let Ye=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=We){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(e,i,t);void 0!==o&&Le(this.prototype,e,o)}}static getPropertyDescriptor(e,t,i){const{get:o,set:r}=Oe(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return o?.call(this)},set(t){const n=o?.call(this);r.call(this,t),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??We}static _$Ei(){if(this.hasOwnProperty(Ke("elementProperties")))return;const e=Ve(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Ke("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ke("properties"))){const e=this.properties,t=[...ze(e),...Be(e)];for(const i of t)this.createProperty(i,e[i])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,i]of t)this.elementProperties.set(e,i)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const i=this._$Eu(e,t);void 0!==i&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(Me(e))}else void 0!==e&&t.push(Me(e));return t}static _$Eu(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(Se)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const i of t){const t=document.createElement("style"),o=Ie.litNonce;void 0!==o&&t.setAttribute("nonce",o),t.textContent=i.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){const i=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,i);if(void 0!==o&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:qe).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(e,t){const i=this.constructor,o=i._$Eh.get(e);if(void 0!==o&&this._$Em!==o){const e=i.getPropertyOptions(o),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:qe;this._$Em=o,this[o]=r.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,i){if(void 0!==e){if(i??=this.constructor.getPropertyOptions(e),!(i.hasChanged??je)(this[e],t))return;this.P(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),!0===i.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,i]of e)!0!==i.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],i)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}};Ye.elementStyles=[],Ye.shadowRootOptions={mode:"open"},Ye[Ke("elementProperties")]=new Map,Ye[Ke("finalized")]=new Map,Ue?.({ReactiveElement:Ye}),(Ne.reactiveElementVersions??=[]).push("2.0.4");const Ge=globalThis,Xe=Ge.trustedTypes,Je=Xe?Xe.createPolicy("lit-html",{createHTML:e=>e}):void 0,Ze="$lit$",Qe=`lit$${Math.random().toFixed(9).slice(2)}$`,et="?"+Qe,tt=`<${et}>`,it=document,ot=()=>it.createComment(""),rt=e=>null===e||"object"!=typeof e&&"function"!=typeof e,nt=Array.isArray,st="[ \t\n\f\r]",at=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lt=/-->/g,ct=/>/g,dt=RegExp(`>|${st}(?:([^\\s"'>=/]+)(${st}*=${st}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ht=/'/g,ut=/"/g,pt=/^(?:script|style|textarea|title)$/i,mt=(e=>(t,...i)=>({_$litType$:e,strings:t,values:i}))(1),ft=Symbol.for("lit-noChange"),vt=Symbol.for("lit-nothing"),gt=new WeakMap,bt=it.createTreeWalker(it,129);function yt(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Je?Je.createHTML(t):t}const wt=(e,t)=>{const i=e.length-1,o=[];let r,n=2===t?"<svg>":"",s=at;for(let t=0;t<i;t++){const i=e[t];let a,l,c=-1,d=0;for(;d<i.length&&(s.lastIndex=d,l=s.exec(i),null!==l);)d=s.lastIndex,s===at?"!--"===l[1]?s=lt:void 0!==l[1]?s=ct:void 0!==l[2]?(pt.test(l[2])&&(r=RegExp("</"+l[2],"g")),s=dt):void 0!==l[3]&&(s=dt):s===dt?">"===l[0]?(s=r??at,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?dt:'"'===l[3]?ut:ht):s===ut||s===ht?s=dt:s===lt||s===ct?s=at:(s=dt,r=void 0);const h=s===dt&&e[t+1].startsWith("/>")?" ":"";n+=s===at?i+tt:c>=0?(o.push(a),i.slice(0,c)+Ze+i.slice(c)+Qe+h):i+Qe+(-2===c?t:h)}return[yt(e,n+(e[i]||"<?>")+(2===t?"</svg>":"")),o]};class kt{constructor({strings:e,_$litType$:t},i){let o;this.parts=[];let r=0,n=0;const s=e.length-1,a=this.parts,[l,c]=wt(e,t);if(this.el=kt.createElement(l,i),bt.currentNode=this.el.content,2===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(o=bt.nextNode())&&a.length<s;){if(1===o.nodeType){if(o.hasAttributes())for(const e of o.getAttributeNames())if(e.endsWith(Ze)){const t=c[n++],i=o.getAttribute(e).split(Qe),s=/([.?@])?(.*)/.exec(t);a.push({type:1,index:r,name:s[2],strings:i,ctor:"."===s[1]?Rt:"?"===s[1]?It:"@"===s[1]?St:Et}),o.removeAttribute(e)}else e.startsWith(Qe)&&(a.push({type:6,index:r}),o.removeAttribute(e));if(pt.test(o.tagName)){const e=o.textContent.split(Qe),t=e.length-1;if(t>0){o.textContent=Xe?Xe.emptyScript:"";for(let i=0;i<t;i++)o.append(e[i],ot()),bt.nextNode(),a.push({type:2,index:++r});o.append(e[t],ot())}}}else if(8===o.nodeType)if(o.data===et)a.push({type:2,index:r});else{let e=-1;for(;-1!==(e=o.data.indexOf(Qe,e+1));)a.push({type:7,index:r}),e+=Qe.length-1}r++}}static createElement(e,t){const i=it.createElement("template");return i.innerHTML=e,i}}function Ct(e,t,i=e,o){if(t===ft)return t;let r=void 0!==o?i._$Co?.[o]:i._$Cl;const n=rt(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(e),r._$AT(e,i,o)),void 0!==o?(i._$Co??=[])[o]=r:i._$Cl=r),void 0!==r&&(t=Ct(e,r._$AS(e,t.values),r,o)),t}class xt{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:i}=this._$AD,o=(e?.creationScope??it).importNode(t,!0);bt.currentNode=o;let r=bt.nextNode(),n=0,s=0,a=i[0];for(;void 0!==a;){if(n===a.index){let t;2===a.type?t=new $t(r,r.nextSibling,this,e):1===a.type?t=new a.ctor(r,a.name,a.strings,this,e):6===a.type&&(t=new At(r,this,e)),this._$AV.push(t),a=i[++s]}n!==a?.index&&(r=bt.nextNode(),n++)}return bt.currentNode=it,o}p(e){let t=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class $t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,o){this.type=2,this._$AH=vt,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Ct(this,e,t),rt(e)?e===vt||null==e||""===e?(this._$AH!==vt&&this._$AR(),this._$AH=vt):e!==this._$AH&&e!==ft&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>nt(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}_(e){this._$AH!==vt&&rt(this._$AH)?this._$AA.nextSibling.data=e:this.T(it.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:i}=e,o="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=kt.createElement(yt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(t);else{const e=new xt(o,this),i=e.u(this.options);e.p(t),this.T(i),this._$AH=e}}_$AC(e){let t=gt.get(e.strings);return void 0===t&&gt.set(e.strings,t=new kt(e)),t}k(e){nt(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,o=0;for(const r of e)o===t.length?t.push(i=new $t(this.S(ot()),this.S(ot()),this,this.options)):i=t[o],i._$AI(r),o++;o<t.length&&(this._$AR(i&&i._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class Et{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,o,r){this.type=1,this._$AH=vt,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=vt}_$AI(e,t=this,i,o){const r=this.strings;let n=!1;if(void 0===r)e=Ct(this,e,t,0),n=!rt(e)||e!==this._$AH&&e!==ft,n&&(this._$AH=e);else{const o=e;let s,a;for(e=r[0],s=0;s<r.length-1;s++)a=Ct(this,o[i+s],t,s),a===ft&&(a=this._$AH[s]),n||=!rt(a)||a!==this._$AH[s],a===vt?e=vt:e!==vt&&(e+=(a??"")+r[s+1]),this._$AH[s]=a}n&&!o&&this.j(e)}j(e){e===vt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Rt extends Et{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===vt?void 0:e}}class It extends Et{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==vt)}}class St extends Et{constructor(e,t,i,o,r){super(e,t,i,o,r),this.type=5}_$AI(e,t=this){if((e=Ct(this,e,t,0)??vt)===ft)return;const i=this._$AH,o=e===vt&&i!==vt||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==vt&&(i===vt||o);o&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class At{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Ct(this,e)}}const Dt=Ge.litHtmlPolyfillSupport;Dt?.(kt,$t),(Ge.litHtmlVersions??=[]).push("3.1.4");let Tt=class extends Ye{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,i)=>{const o=i?.renderBefore??t;let r=o._$litPart$;if(void 0===r){const e=i?.renderBefore??null;o._$litPart$=r=new $t(t.insertBefore(ot(),e),e,void 0,i??{})}return r._$AI(e),r})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ft}};Tt._$litElement$=!0,Tt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:Tt});const Pt=globalThis.litElementPolyfillSupport;Pt?.({LitElement:Tt}),(globalThis.litElementVersions??=[]).push("4.0.6");const Mt=e=>(t,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},_t={attribute:!0,type:String,converter:qe,reflect:!1,hasChanged:je},Lt=(e=_t,t,i)=>{const{kind:o,metadata:r}=i;let n=globalThis.litPropertyMetadata.get(r);if(void 0===n&&globalThis.litPropertyMetadata.set(r,n=new Map),n.set(i.name,e),"accessor"===o){const{name:o}=i;return{set(i){const r=t.get.call(this);t.set.call(this,i),this.requestUpdate(o,r,e)},init(t){return void 0!==t&&this.P(o,void 0,e),t}}}if("setter"===o){const{name:o}=i;return function(i){const r=this[o];t.call(this,i),this.requestUpdate(o,r,e)}}throw Error("Unsupported decorator location: "+o)};function Ot(e){return(t,i)=>"object"==typeof i?Lt(e,t,i):((e,t,i)=>{const o=t.hasOwnProperty(i);return t.constructor.createProperty(i,o?{...e,wrapped:!0}:e),o?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)}function zt(e){return Ot({...e,state:!0,attribute:!1})}function Bt(e){return(t,i)=>{const{slot:o,selector:r}=e??{},n="slot"+(o?`[name=${o}]`:":not([name])");return((e,t,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,i),i))(t,i,{get(){const t=this.renderRoot?.querySelector(n),i=t?.assignedElements(e)??[];return void 0===r?i:i.filter((e=>e.matches(r)))}})}}const Vt=e=>e??vt,Nt=1,Ft=2,Ht=3,Ut=4,Kt=e=>(...t)=>({_$litDirective$:e,values:t});let qt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};const jt="important",Wt=" !"+jt,Yt=Kt(class extends qt{constructor(e){if(super(e),e.type!==Nt||"style"!==e.name||e.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(e){return Object.keys(e).reduce(((t,i)=>{const o=e[i];return null==o?t:t+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?i.removeProperty(e):i[e]=null);for(const e in t){const o=t[e];if(null!=o){this.ft.add(e);const t="string"==typeof o&&o.endsWith(Wt);e.includes("-")||t?i.setProperty(e,t?o.slice(0,-11):o,t?jt:""):i[e]=o}}return ft}});class Gt extends Tt{emit(e,t){const i=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i)}}class Xt{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),R()||T((()=>{this.host.requestUpdate()}))}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.onSlotChange)}test(e){return"[default]"===e?this.hasDefaultSlot():this.hasNamedSlot(e)}hasDefaultSlot(){return[...this.host.childNodes].some((e=>{if(e.nodeType===e.TEXT_NODE&&""!==e.textContent.trim())return!0;if(e.nodeType===e.ELEMENT_NODE){if(!e.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(e){return null!==this.host.querySelector(`:scope > [slot="${e}"]`)}onSlotChange(e){const t=e.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()}}const Jt=mt`${vt}`,Zt=Pe`: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}`;let Qt=class extends qt{constructor(e){if(super(e),this.it=vt,e.type!==Ft)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===vt||null==e)return this._t=void 0,this.it=e;if(e===ft)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Qt.directiveName="unsafeHTML",Qt.resultType=1;class ei extends Qt{}ei.directiveName="unsafeSVG",ei.resultType=2;const ti=Kt(ei),ii=e=>void 0===e.strings,oi={},ri=(e,t)=>{const i=e._$AN;if(void 0===i)return!1;for(const e of i)e._$AO?.(t,!1),ri(e,t);return!0},ni=e=>{let t,i;do{if(void 0===(t=e._$AM))break;i=t._$AN,i.delete(e),e=t}while(0===i?.size)},si=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(void 0===i)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),ci(t)}};function ai(e){void 0!==this._$AN?(ni(this),this._$AM=e,si(this)):this._$AM=e}function li(e,t=!1,i=0){const o=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(t)if(Array.isArray(o))for(let e=i;e<o.length;e++)ri(o[e],!1),ni(o[e]);else null!=o&&(ri(o,!1),ni(o));else ri(this,e)}const ci=e=>{e.type==Ft&&(e._$AP??=li,e._$AQ??=ai)};class di extends qt{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),si(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(ri(this,e),ni(this))}setValue(e){if(ii(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(){}}class hi{constructor(e){this.Y=e}disconnect(){this.Y=void 0}reconnect(e){this.Y=e}deref(){return this.Y}}let ui=class{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){this.Z??=new Promise((e=>this.q=e))}resume(){this.q?.(),this.Z=this.q=void 0}};const pi=e=>!(e=>null===e||"object"!=typeof e&&"function"!=typeof e)(e)&&"function"==typeof e.then,mi=1073741823;const fi=Kt(class extends di{constructor(){super(...arguments),this._$Cwt=mi,this._$Cbt=[],this._$CK=new hi(this),this._$CX=new ui}render(...e){return e.find((e=>!pi(e)))??ft}update(e,t){const i=this._$Cbt;let o=i.length;this._$Cbt=t;const r=this._$CK,n=this._$CX;this.isConnected||this.disconnected();for(let e=0;e<t.length&&!(e>this._$Cwt);e++){const s=t[e];if(!pi(s))return this._$Cwt=e,s;e<o&&s===i[e]||(this._$Cwt=mi,o=0,Promise.resolve(s).then((async e=>{for(;n.get();)await n.get();const t=r.deref();if(void 0!==t){const i=t._$Cbt.indexOf(s);i>-1&&i<t._$Cwt&&(t._$Cwt=i,t.setValue(e))}})))}return ft}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}),vi=Pe`: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 gi=class extends Gt{constructor(){super(...arguments),this.hasSlotController=new Xt(this,"[default]")}render(){return this.hasSlotController.test("[default]")?mt`<slot></slot>`:(()=>{if(this.name){const[e,t]=this.name.split("--"),i=new Map([["outlined","Material Icons Outlined"],["filled","Material Icons"],["rounded","Material Icons Round"],["sharp","Material Icons Sharp"],["two-tone","Material Icons Two Tone"]]);return mt`<span style="${Yt({fontFamily:i.get(t)})}">${e}</span>`}return this.src?mt`${fi(Ee({url:this.src}).then(ti))}`:mt``})()}};gi.styles=[Zt,vi],Re([Ot({reflect:!0})],gi.prototype,"name",void 0),Re([Ot({reflect:!0})],gi.prototype,"src",void 0),gi=Re([Mt("mdui-icon")],gi);const bi=Pe`: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 yi=class extends Gt{constructor(){super(...arguments),this.hasSlotController=new Xt(this,"[default]")}render(){return this.hasSlotController.test("[default]")?mt`<slot></slot>`:this.src?mt`<img part="image" alt="${Vt(this.label)}" src="${this.src}" style="${Yt({objectFit:this.fit})}">`:this.icon?mt`<mdui-icon part="icon" name="${this.icon}"></mdui-icon>`:Jt}};yi.styles=[Zt,bi],Re([Ot({reflect:!0})],yi.prototype,"src",void 0),Re([Ot({reflect:!0})],yi.prototype,"fit",void 0),Re([Ot({reflect:!0})],yi.prototype,"icon",void 0),Re([Ot({reflect:!0})],yi.prototype,"label",void 0),yi=Re([Mt("mdui-avatar")],yi);const wi=Pe`: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 ki=class extends Gt{constructor(){super(...arguments),this.variant="large"}render(){return"small"===this.variant?Jt:mt`<slot></slot>`}};ki.styles=[Zt,wi],Re([Ot({reflect:!0})],ki.prototype,"variant",void 0),ki=Re([Mt("mdui-badge")],ki);const Ci=e=>null!==e&&"false"!==e;class xi{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||(this.defined=(!this.needDomReady||R())&&!this.getUndefinedLocalNames().length,this.defined)}async whenDefined(){if(this.defined)return Promise.resolve();const e=o();this.needDomReady&&!R(e)&&await new Promise((t=>{e.addEventListener("DOMContentLoaded",(()=>t()),{once:!0})}));const t=this.getUndefinedLocalNames();if(t.length){const e=[];t.forEach((t=>{e.push(customElements.whenDefined(t))})),await Promise.all(e)}this.defined=!0}getScopeLocalNameSelector(){const e=this.relatedElements;return e?Array.isArray(e)?e.map((e=>`${e}:not(:defined)`)).join(","):Object.keys(e).filter((t=>!e[t])).map((e=>`${e}:not(:defined)`)).join(","):null}getGlobalLocalNameSelector(){const e=this.relatedElements;return!e||Array.isArray(e)?null:Object.keys(e).filter((t=>e[t])).map((e=>`${e}:not(:defined)`)).join(",")}getUndefinedLocalNames(){const e=this.getScopeLocalNameSelector(),t=this.getGlobalLocalNameSelector(),i=[...e?[...this.host.querySelectorAll(e)]:[],...t?[...o().querySelectorAll(t)]:[]].map((e=>e.localName));return M(i)}onSlotChange(){const e=this.getScopeLocalNameSelector();if(e){this.host.querySelectorAll(e).length&&(this.defined=!1)}}}function $i(e,t=!1){return(i,o)=>{const{update:r}=i;e in i&&(i.update=function(i){if(i.has(e)){const r=i.get(e),n=this[e];r!==n&&(t&&!this.hasUpdated||this[o](r,n))}r.call(this,i)})}}const Ei=e=>{class t extends e{constructor(...e){super(...e),this.scrollBehaviorDefinedController=new xi(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(e,t){if(await this.scrollBehaviorDefinedController.whenDefined(),(e&&!t||!e&&t)&&this.updateContainerPadding(),!this.scrollBehavior)return;const i=this.getListening(e);i&&i.removeEventListener("scroll",this.onListeningScroll);const o=this.getListening(t);o&&(this.updateScrollTop(o),o.addEventListener("scroll",this.onListeningScroll))}async onScrollBehaviorChange(e,t){await this.scrollBehaviorDefinedController.whenDefined(),(e&&!t||!e&&t)&&this.updateContainerPadding();const i=this.getListening(this.scrollTarget);i&&(this.scrollBehavior?(this.updateScrollTop(i),i.addEventListener("scroll",this.onListeningScroll)):i.removeEventListener("scroll",this.onListeningScroll))}connectedCallback(){super.connectedCallback(),this.scrollBehaviorDefinedController.whenDefined().then((()=>{this.isParentLayout=s(this.parentElement,"mdui-layout"),this.updateContainerPadding()}))}disconnectedCallback(){super.disconnectedCallback(),this.scrollBehaviorDefinedController.whenDefined().then((()=>{this.updateContainerPadding(!1)}))}hasScrollBehavior(e){const t=this.scrollBehavior?.split(" ")??[];return Array.isArray(e)?!!t.filter((t=>e.includes(t))).length:t.includes(e)}runScrollThreshold(e,t){}runScrollNoThreshold(e,t){}updateContainerPadding(e=!0){const t=this.getContainer(this.scrollTarget);if(!t||this.isParentLayout)return;const i="top"===this.scrollPaddingPosition?"paddingTop":"paddingBottom";if(e){const e=this.getListening(this.scrollTarget)&&["fixed","absolute"].includes(T(this).css("position"))?this.offsetHeight:null;T(t).css({[i]:e})}else T(t).css({[i]:null})}onListeningScroll(){const e=this.getListening(this.scrollTarget);window.requestAnimationFrame((()=>this.onScroll(e)))}onScroll(e){const t=e.scrollY??e.scrollTop;this.lastScrollTopNoThreshold!==t&&(this.runScrollNoThreshold(t<this.lastScrollTopNoThreshold,t),this.lastScrollTopNoThreshold=t),Math.abs(t-this.lastScrollTopThreshold)>(this.scrollThreshold||0)&&(this.runScrollThreshold(t<this.lastScrollTopThreshold,t),this.lastScrollTopThreshold=t)}updateScrollTop(e){this.lastScrollTopThreshold=this.lastScrollTopNoThreshold=e.scrollY??e.scrollTop}getListening(e){return e?T(e)[0]:window}getContainer(e){return e?T(e)[0]:document.body}}return Re([Ot({attribute:"scroll-target"})],t.prototype,"scrollTarget",void 0),Re([Ot({reflect:!0,attribute:"scroll-behavior"})],t.prototype,"scrollBehavior",void 0),Re([Ot({type:Number,reflect:!0,attribute:"scroll-threshold"})],t.prototype,"scrollThreshold",void 0),Re([$i("scrollTarget")],t.prototype,"onScrollTa