factoriomod-debug 2.0.5 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,176 +1,176 @@
1
- function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}function Io(r,t){return typeof t=="bigint"?`jsonbigint ${t}n`:t}function Zr(r,t){if(typeof t=="string"){let e=t.match(/^jsonbigint\x01\x02 (\d+)n$/);if(e)return BigInt(e[1])}return t}var it=function(){if(typeof globalThis<"u")return globalThis;if(typeof global<"u")return global;if(typeof self<"u")return self;if(typeof window<"u")return window;try{return new Function("return this")()}catch{return{}}}();it.trustedTypes===void 0&&(it.trustedTypes={createPolicy:(r,t)=>t});var Kr={configurable:!1,enumerable:!1,writable:!1};it.FAST===void 0&&Reflect.defineProperty(it,"FAST",Object.assign({value:Object.create(null)},Kr));var xt=it.FAST;if(xt.getById===void 0){let r=Object.create(null);Reflect.defineProperty(xt,"getById",Object.assign({value(t,e){let i=r[t];return i===void 0&&(i=e?r[t]=e():null),i}},Kr))}var ot=Object.freeze([]);function de(){let r=new WeakMap;return function(t){let e=r.get(t);if(e===void 0){let i=Reflect.getPrototypeOf(t);for(;e===void 0&&i!==null;)e=r.get(i),i=Reflect.getPrototypeOf(i);e=e===void 0?[]:e.slice(0),r.set(t,e)}return e}}var ze=it.FAST.getById(1,()=>{let r=[],t=[];function e(){if(t.length)throw t.shift()}function i(s){try{s.call()}catch(a){t.push(a),setTimeout(e,0)}}function o(){let a=0;for(;a<r.length;)if(i(r[a]),a++,a>1024){for(let d=0,c=r.length-a;d<c;d++)r[d]=r[d+a];r.length-=a,a=0}r.length=0}function n(s){r.length<1&&it.requestAnimationFrame(o),r.push(s)}return Object.freeze({enqueue:n,process:o})}),ti=it.trustedTypes.createPolicy("fast-html",{createHTML:r=>r}),qe=ti,Gt=`fast-${Math.random().toString(36).substring(2,8)}`,Ue=`${Gt}{`,ue=`}${Gt}`,m=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(r){if(qe!==ti)throw new Error("The HTML policy can only be set once.");qe=r},createHTML(r){return qe.createHTML(r)},isMarker(r){return r&&r.nodeType===8&&r.data.startsWith(Gt)},extractDirectiveIndexFromMarker(r){return parseInt(r.data.replace(`${Gt}:`,""))},createInterpolationPlaceholder(r){return`${Ue}${r}${ue}`},createCustomAttributePlaceholder(r,t){return`${r}="${this.createInterpolationPlaceholder(t)}"`},createBlockPlaceholder(r){return`<!--${Gt}:${r}-->`},queueUpdate:ze.enqueue,processUpdates:ze.process,nextUpdate(){return new Promise(ze.enqueue)},setAttribute(r,t,e){e==null?r.removeAttribute(t):r.setAttribute(t,e)},setBooleanAttribute(r,t,e){e?r.setAttribute(t,""):r.removeAttribute(t)},removeChildNodes(r){for(let t=r.firstChild;t!==null;t=r.firstChild)r.removeChild(t)},createTemplateWalker(r){return document.createTreeWalker(r,133,null,!1)}});var _t=class{constructor(t,e){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=t,this.sub1=e}has(t){return this.spillover===void 0?this.sub1===t||this.sub2===t:this.spillover.indexOf(t)!==-1}subscribe(t){let e=this.spillover;if(e===void 0){if(this.has(t))return;if(this.sub1===void 0){this.sub1=t;return}if(this.sub2===void 0){this.sub2=t;return}this.spillover=[this.sub1,this.sub2,t],this.sub1=void 0,this.sub2=void 0}else e.indexOf(t)===-1&&e.push(t)}unsubscribe(t){let e=this.spillover;if(e===void 0)this.sub1===t?this.sub1=void 0:this.sub2===t&&(this.sub2=void 0);else{let i=e.indexOf(t);i!==-1&&e.splice(i,1)}}notify(t){let e=this.spillover,i=this.source;if(e===void 0){let o=this.sub1,n=this.sub2;o!==void 0&&o.handleChange(i,t),n!==void 0&&n.handleChange(i,t)}else for(let o=0,n=e.length;o<n;++o)e[o].handleChange(i,t)}},Dt=class{constructor(t){this.subscribers={},this.sourceSubscribers=null,this.source=t}notify(t){var e;let i=this.subscribers[t];i!==void 0&&i.notify(t),(e=this.sourceSubscribers)===null||e===void 0||e.notify(t)}subscribe(t,e){var i;if(e){let o=this.subscribers[e];o===void 0&&(this.subscribers[e]=o=new _t(this.source)),o.subscribe(t)}else this.sourceSubscribers=(i=this.sourceSubscribers)!==null&&i!==void 0?i:new _t(this.source),this.sourceSubscribers.subscribe(t)}unsubscribe(t,e){var i;if(e){let o=this.subscribers[e];o!==void 0&&o.unsubscribe(t)}else(i=this.sourceSubscribers)===null||i===void 0||i.unsubscribe(t)}};var b=xt.getById(2,()=>{let r=/(:|&&|\|\||if)/,t=new WeakMap,e=m.queueUpdate,i,o=c=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function n(c){let h=c.$fastController||t.get(c);return h===void 0&&(Array.isArray(c)?h=o(c):t.set(c,h=new Dt(c))),h}let s=de();class a{constructor(h){this.name=h,this.field=`_${h}`,this.callback=`${h}Changed`}getValue(h){return i!==void 0&&i.watch(h,this.name),h[this.field]}setValue(h,y){let T=this.field,j=h[T];if(j!==y){h[T]=y;let E=h[this.callback];typeof E=="function"&&E.call(h,j,y),n(h).notify(this.name)}}}class d extends _t{constructor(h,y,T=!1){super(h,y),this.binding=h,this.isVolatileBinding=T,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(h,y){this.needsRefresh&&this.last!==null&&this.disconnect();let T=i;i=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;let j=this.binding(h,y);return i=T,j}disconnect(){if(this.last!==null){let h=this.first;for(;h!==void 0;)h.notifier.unsubscribe(this,h.propertyName),h=h.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(h,y){let T=this.last,j=n(h),E=T===null?this.first:{};if(E.propertySource=h,E.propertyName=y,E.notifier=j,j.subscribe(this,y),T!==null){if(!this.needsRefresh){let G;i=void 0,G=T.propertySource[T.propertyName],i=this,h===G&&(this.needsRefresh=!0)}T.next=E}this.last=E}handleChange(){this.needsQueue&&(this.needsQueue=!1,e(this))}call(){this.last!==null&&(this.needsQueue=!0,this.notify(this))}records(){let h=this.first;return{next:()=>{let y=h;return y===void 0?{value:void 0,done:!0}:(h=h.next,{value:y,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(c){o=c},getNotifier:n,track(c,h){i!==void 0&&i.watch(c,h)},trackVolatile(){i!==void 0&&(i.needsRefresh=!0)},notify(c,h){n(c).notify(h)},defineProperty(c,h){typeof h=="string"&&(h=new a(h)),s(c).push(h),Reflect.defineProperty(c,h.name,{enumerable:!0,get:function(){return h.getValue(this)},set:function(y){h.setValue(this,y)}})},getAccessors:s,binding(c,h,y=this.isVolatileBinding(c)){return new d(c,h,y)},isVolatileBinding(c){return r.test(c.toString())}})});function f(r,t){b.defineProperty(r,t)}function ri(r,t,e){return Object.assign({},e,{get:function(){return b.trackVolatile(),e.get.apply(this)}})}var ei=xt.getById(3,()=>{let r=null;return{get(){return r},set(t){r=t}}}),nt=class{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return ei.get()}get isEven(){return this.index%2===0}get isOdd(){return this.index%2!==0}get isFirst(){return this.index===0}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(t){ei.set(t)}};b.defineProperty(nt.prototype,"index");b.defineProperty(nt.prototype,"length");var st=Object.seal(new nt);var Rt=class{constructor(){this.targetIndex=0}},Ft=class extends Rt{constructor(){super(...arguments),this.createPlaceholder=m.createInterpolationPlaceholder}},Mt=class extends Rt{constructor(t,e,i){super(),this.name=t,this.behavior=e,this.options=i}createPlaceholder(t){return m.createCustomAttributePlaceholder(this.name,t)}createBehavior(t){return new this.behavior(t,this.options)}};function Oo(r,t){this.source=r,this.context=t,this.bindingObserver===null&&(this.bindingObserver=b.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(r,t))}function Eo(r,t){this.source=r,this.context=t,this.target.addEventListener(this.targetName,this)}function Ao(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function Po(){this.bindingObserver.disconnect(),this.source=null,this.context=null;let r=this.target.$fastView;r!==void 0&&r.isComposed&&(r.unbind(),r.needsBindOnly=!0)}function _o(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function Do(r){m.setAttribute(this.target,this.targetName,r)}function Ro(r){m.setBooleanAttribute(this.target,this.targetName,r)}function Fo(r){if(r==null&&(r=""),r.create){this.target.textContent="";let t=this.target.$fastView;t===void 0?t=r.create():this.target.$fastTemplate!==r&&(t.isComposed&&(t.remove(),t.unbind()),t=r.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(this.source,this.context)):(t.isComposed=!0,t.bind(this.source,this.context),t.insertBefore(this.target),this.target.$fastView=t,this.target.$fastTemplate=r)}else{let t=this.target.$fastView;t!==void 0&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),this.target.textContent=r}}function Mo(r){this.target[this.targetName]=r}function Bo(r){let t=this.classVersions||Object.create(null),e=this.target,i=this.version||0;if(r!=null&&r.length){let o=r.split(/\s+/);for(let n=0,s=o.length;n<s;++n){let a=o[n];a!==""&&(t[a]=i,e.classList.add(a))}}if(this.classVersions=t,this.version=i+1,i!==0){i-=1;for(let o in t)t[o]===i&&e.classList.remove(o)}}var wt=class extends Ft{constructor(t){super(),this.binding=t,this.bind=Oo,this.unbind=Ao,this.updateTarget=Do,this.isBindingVolatile=b.isVolatileBinding(this.binding)}get targetName(){return this.originalTargetName}set targetName(t){if(this.originalTargetName=t,t!==void 0)switch(t[0]){case":":if(this.cleanedTargetName=t.substr(1),this.updateTarget=Mo,this.cleanedTargetName==="innerHTML"){let e=this.binding;this.binding=(i,o)=>m.createHTML(e(i,o))}break;case"?":this.cleanedTargetName=t.substr(1),this.updateTarget=Ro;break;case"@":this.cleanedTargetName=t.substr(1),this.bind=Eo,this.unbind=_o;break;default:this.cleanedTargetName=t,t==="class"&&(this.updateTarget=Bo);break}}targetAtContent(){this.updateTarget=Fo,this.unbind=Po}createBehavior(t){return new We(t,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}},We=class{constructor(t,e,i,o,n,s,a){this.source=null,this.context=null,this.bindingObserver=null,this.target=t,this.binding=e,this.isBindingVolatile=i,this.bind=o,this.unbind=n,this.updateTarget=s,this.targetName=a}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(t){nt.setEvent(t);let e=this.binding(this.source,this.context);nt.setEvent(null),e!==!0&&t.preventDefault()}};var Ge=null,Qe=class r{addFactory(t){t.targetIndex=this.targetIndex,this.behaviorFactories.push(t)}captureContentBinding(t){t.targetAtContent(),this.addFactory(t)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){Ge=this}static borrow(t){let e=Ge||new r;return e.directives=t,e.reset(),Ge=null,e}};function Lo(r){if(r.length===1)return r[0];let t,e=r.length,i=r.map(s=>typeof s=="string"?()=>s:(t=s.targetName||t,s.binding)),o=(s,a)=>{let d="";for(let c=0;c<e;++c)d+=i[c](s,a);return d},n=new wt(o);return n.targetName=t,n}var No=ue.length;function oi(r,t){let e=t.split(Ue);if(e.length===1)return null;let i=[];for(let o=0,n=e.length;o<n;++o){let s=e[o],a=s.indexOf(ue),d;if(a===-1)d=s;else{let c=parseInt(s.substring(0,a));i.push(r.directives[c]),d=s.substring(a+No)}d!==""&&i.push(d)}return i}function ii(r,t,e=!1){let i=t.attributes;for(let o=0,n=i.length;o<n;++o){let s=i[o],a=s.value,d=oi(r,a),c=null;d===null?e&&(c=new wt(()=>a),c.targetName=s.name):c=Lo(d),c!==null&&(t.removeAttributeNode(s),o--,n--,r.addFactory(c))}}function Vo(r,t,e){let i=oi(r,t.textContent);if(i!==null){let o=t;for(let n=0,s=i.length;n<s;++n){let a=i[n],d=n===0?t:o.parentNode.insertBefore(document.createTextNode(""),o.nextSibling);typeof a=="string"?d.textContent=a:(d.textContent=" ",r.captureContentBinding(a)),o=d,r.targetIndex++,d!==t&&e.nextNode()}r.targetIndex--}}function ni(r,t){let e=r.content;document.adoptNode(e);let i=Qe.borrow(t);ii(i,r,!0);let o=i.behaviorFactories;i.reset();let n=m.createTemplateWalker(e),s;for(;s=n.nextNode();)switch(i.targetIndex++,s.nodeType){case 1:ii(i,s);break;case 3:Vo(i,s,n);break;case 8:m.isMarker(s)&&i.addFactory(t[m.extractDirectiveIndexFromMarker(s)])}let a=0;(m.isMarker(e.firstChild)||e.childNodes.length===1&&t.length)&&(e.insertBefore(document.createComment(""),e.firstChild),a=-1);let d=i.behaviorFactories;return i.release(),{fragment:e,viewBehaviorFactories:d,hostBehaviorFactories:o,targetOffset:a}}var Xe=document.createRange(),he=class{constructor(t,e){this.fragment=t,this.behaviors=e,this.source=null,this.context=null,this.firstChild=t.firstChild,this.lastChild=t.lastChild}appendTo(t){t.appendChild(this.fragment)}insertBefore(t){if(this.fragment.hasChildNodes())t.parentNode.insertBefore(this.fragment,t);else{let e=this.lastChild;if(t.previousSibling===e)return;let i=t.parentNode,o=this.firstChild,n;for(;o!==e;)n=o.nextSibling,i.insertBefore(o,t),o=n;i.insertBefore(e,t)}}remove(){let t=this.fragment,e=this.lastChild,i=this.firstChild,o;for(;i!==e;)o=i.nextSibling,t.appendChild(i),i=o;t.appendChild(e)}dispose(){let t=this.firstChild.parentNode,e=this.lastChild,i=this.firstChild,o;for(;i!==e;)o=i.nextSibling,t.removeChild(i),i=o;t.removeChild(e);let n=this.behaviors,s=this.source;for(let a=0,d=n.length;a<d;++a)n[a].unbind(s)}bind(t,e){let i=this.behaviors;if(this.source!==t)if(this.source!==null){let o=this.source;this.source=t,this.context=e;for(let n=0,s=i.length;n<s;++n){let a=i[n];a.unbind(o),a.bind(t,e)}}else{this.source=t,this.context=e;for(let o=0,n=i.length;o<n;++o)i[o].bind(t,e)}}unbind(){if(this.source===null)return;let t=this.behaviors,e=this.source;for(let i=0,o=t.length;i<o;++i)t[i].unbind(e);this.source=null}static disposeContiguousBatch(t){if(t.length!==0){Xe.setStartBefore(t[0].firstChild),Xe.setEndAfter(t[t.length-1].lastChild),Xe.deleteContents();for(let e=0,i=t.length;e<i;++e){let o=t[e],n=o.behaviors,s=o.source;for(let a=0,d=n.length;a<d;++a)n[a].unbind(s)}}}};var pe=class{constructor(t,e){this.behaviorCount=0,this.hasHostBehaviors=!1,this.fragment=null,this.targetOffset=0,this.viewBehaviorFactories=null,this.hostBehaviorFactories=null,this.html=t,this.directives=e}create(t){if(this.fragment===null){let c,h=this.html;if(typeof h=="string"){c=document.createElement("template"),c.innerHTML=m.createHTML(h);let T=c.content.firstElementChild;T!==null&&T.tagName==="TEMPLATE"&&(c=T)}else c=h;let y=ni(c,this.directives);this.fragment=y.fragment,this.viewBehaviorFactories=y.viewBehaviorFactories,this.hostBehaviorFactories=y.hostBehaviorFactories,this.targetOffset=y.targetOffset,this.behaviorCount=this.viewBehaviorFactories.length+this.hostBehaviorFactories.length,this.hasHostBehaviors=this.hostBehaviorFactories.length>0}let e=this.fragment.cloneNode(!0),i=this.viewBehaviorFactories,o=new Array(this.behaviorCount),n=m.createTemplateWalker(e),s=0,a=this.targetOffset,d=n.nextNode();for(let c=i.length;s<c;++s){let h=i[s],y=h.targetIndex;for(;d!==null;)if(a===y){o[s]=h.createBehavior(d);break}else d=n.nextNode(),a++}if(this.hasHostBehaviors){let c=this.hostBehaviorFactories;for(let h=0,y=c.length;h<y;++h,++s)o[s]=c[h].createBehavior(t)}return new he(e,o)}render(t,e,i){typeof e=="string"&&(e=document.getElementById(e)),i===void 0&&(i=e);let o=this.create(i);return o.bind(t,st),o.appendTo(e),o}},Ho=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function k(r,...t){let e=[],i="";for(let o=0,n=r.length-1;o<n;++o){let s=r[o],a=t[o];if(i+=s,a instanceof pe){let d=a;a=()=>d}if(typeof a=="function"&&(a=new wt(a)),a instanceof Ft){let d=Ho.exec(s);d!==null&&(a.targetName=d[2])}a instanceof Rt?(i+=a.createPlaceholder(e.length),e.push(a)):i+=a}return i+=r[r.length-1],new pe(i,e)}var C=class{constructor(){this.targets=new WeakSet}addStylesTo(t){this.targets.add(t)}removeStylesFrom(t){this.targets.delete(t)}isAttachedTo(t){return this.targets.has(t)}withBehaviors(...t){return this.behaviors=this.behaviors===null?t:this.behaviors.concat(t),this}};C.create=(()=>{if(m.supportsAdoptedStyleSheets){let r=new Map;return t=>new Ye(t,r)}return r=>new Je(r)})();function Ze(r){return r.map(t=>t instanceof C?Ze(t.styles):[t]).reduce((t,e)=>t.concat(e),[])}function si(r){return r.map(t=>t instanceof C?t.behaviors:null).reduce((t,e)=>e===null?t:(t===null&&(t=[]),t.concat(e)),null)}var fe=Symbol("prependToAdoptedStyleSheets");function ai(r){let t=[],e=[];return r.forEach(i=>(i[fe]?t:e).push(i)),{prepend:t,append:e}}var li=(r,t)=>{let{prepend:e,append:i}=ai(t);r.adoptedStyleSheets=[...e,...r.adoptedStyleSheets,...i]},ci=(r,t)=>{r.adoptedStyleSheets=r.adoptedStyleSheets.filter(e=>t.indexOf(e)===-1)};if(m.supportsAdoptedStyleSheets)try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),li=(r,t)=>{let{prepend:e,append:i}=ai(t);r.adoptedStyleSheets.splice(0,0,...e),r.adoptedStyleSheets.push(...i)},ci=(r,t)=>{for(let e of t){let i=r.adoptedStyleSheets.indexOf(e);i!==-1&&r.adoptedStyleSheets.splice(i,1)}}}catch{}var Ye=class extends C{constructor(t,e){super(),this.styles=t,this.styleSheetCache=e,this._styleSheets=void 0,this.behaviors=si(t)}get styleSheets(){if(this._styleSheets===void 0){let t=this.styles,e=this.styleSheetCache;this._styleSheets=Ze(t).map(i=>{if(i instanceof CSSStyleSheet)return i;let o=e.get(i);return o===void 0&&(o=new CSSStyleSheet,o.replaceSync(i),e.set(i,o)),o})}return this._styleSheets}addStylesTo(t){li(t,this.styleSheets),super.addStylesTo(t)}removeStylesFrom(t){ci(t,this.styleSheets),super.removeStylesFrom(t)}},jo=0;function zo(){return`fast-style-class-${++jo}`}var Je=class extends C{constructor(t){super(),this.styles=t,this.behaviors=null,this.behaviors=si(t),this.styleSheets=Ze(t),this.styleClass=zo()}addStylesTo(t){let e=this.styleSheets,i=this.styleClass;t=this.normalizeTarget(t);for(let o=0;o<e.length;o++){let n=document.createElement("style");n.innerHTML=e[o],n.className=i,t.append(n)}super.addStylesTo(t)}removeStylesFrom(t){t=this.normalizeTarget(t);let e=t.querySelectorAll(`.${this.styleClass}`);for(let i=0,o=e.length;i<o;++i)t.removeChild(e[i]);super.removeStylesFrom(t)}isAttachedTo(t){return super.isAttachedTo(this.normalizeTarget(t))}normalizeTarget(t){return t===document?document.body:t}};var Qt=Object.freeze({locate:de()}),Ke={toView(r){return r?"true":"false"},fromView(r){return!(r==null||r==="false"||r===!1||r===0)}},Bt={toView(r){if(r==null)return null;let t=r*1;return isNaN(t)?null:t.toString()},fromView(r){if(r==null)return null;let t=r*1;return isNaN(t)?null:t}},me=class r{constructor(t,e,i=e.toLowerCase(),o="reflect",n){this.guards=new Set,this.Owner=t,this.name=e,this.attribute=i,this.mode=o,this.converter=n,this.fieldName=`_${e}`,this.callbackName=`${e}Changed`,this.hasCallback=this.callbackName in t.prototype,o==="boolean"&&n===void 0&&(this.converter=Ke)}setValue(t,e){let i=t[this.fieldName],o=this.converter;o!==void 0&&(e=o.fromView(e)),i!==e&&(t[this.fieldName]=e,this.tryReflectToAttribute(t),this.hasCallback&&t[this.callbackName](i,e),t.$fastController.notify(this.name))}getValue(t){return b.track(t,this.name),t[this.fieldName]}onAttributeChangedCallback(t,e){this.guards.has(t)||(this.guards.add(t),this.setValue(t,e),this.guards.delete(t))}tryReflectToAttribute(t){let e=this.mode,i=this.guards;i.has(t)||e==="fromView"||m.queueUpdate(()=>{i.add(t);let o=t[this.fieldName];switch(e){case"reflect":let n=this.converter;m.setAttribute(t,this.attribute,n!==void 0?n.toView(o):o);break;case"boolean":m.setBooleanAttribute(t,this.attribute,o);break}i.delete(t)})}static collect(t,...e){let i=[];e.push(Qt.locate(t));for(let o=0,n=e.length;o<n;++o){let s=e[o];if(s!==void 0)for(let a=0,d=s.length;a<d;++a){let c=s[a];typeof c=="string"?i.push(new r(t,c)):i.push(new r(t,c.property,c.attribute,c.mode,c.converter))}}return i}};function u(r,t){let e;function i(o,n){arguments.length>1&&(e.property=n),Qt.locate(o.constructor).push(e)}if(arguments.length>1){e={},i(r,t);return}return e=r===void 0?{}:r,i}var di={mode:"open"},ui={},tr=xt.getById(4,()=>{let r=new Map;return Object.freeze({register(t){return r.has(t.type)?!1:(r.set(t.type,t),!0)},getByType(t){return r.get(t)}})}),J=class{constructor(t,e=t.definition){typeof e=="string"&&(e={name:e}),this.type=t,this.name=e.name,this.template=e.template;let i=me.collect(t,e.attributes),o=new Array(i.length),n={},s={};for(let a=0,d=i.length;a<d;++a){let c=i[a];o[a]=c.attribute,n[c.name]=c,s[c.attribute]=c}this.attributes=i,this.observedAttributes=o,this.propertyLookup=n,this.attributeLookup=s,this.shadowOptions=e.shadowOptions===void 0?di:e.shadowOptions===null?void 0:Object.assign(Object.assign({},di),e.shadowOptions),this.elementOptions=e.elementOptions===void 0?ui:Object.assign(Object.assign({},ui),e.elementOptions),this.styles=e.styles===void 0?void 0:Array.isArray(e.styles)?C.create(e.styles):e.styles instanceof C?e.styles:C.create([e.styles])}get isDefined(){return!!tr.getByType(this.type)}define(t=customElements){let e=this.type;if(tr.register(this)){let i=this.attributes,o=e.prototype;for(let n=0,s=i.length;n<s;++n)b.defineProperty(o,i[n]);Reflect.defineProperty(e,"observedAttributes",{value:this.observedAttributes,enumerable:!0})}return t.get(this.name)||t.define(this.name,e,this.elementOptions),this}};J.forType=tr.getByType;var hi=new WeakMap,qo={bubbles:!0,composed:!0,cancelable:!0};function er(r){return r.shadowRoot||hi.get(r)||null}var be=class r extends Dt{constructor(t,e){super(t),this.boundObservables=null,this.behaviors=null,this.needsInitialization=!0,this._template=null,this._styles=null,this._isConnected=!1,this.$fastController=this,this.view=null,this.element=t,this.definition=e;let i=e.shadowOptions;if(i!==void 0){let n=t.attachShadow(i);i.mode==="closed"&&hi.set(t,n)}let o=b.getAccessors(t);if(o.length>0){let n=this.boundObservables=Object.create(null);for(let s=0,a=o.length;s<a;++s){let d=o[s].name,c=t[d];c!==void 0&&(delete t[d],n[d]=c)}}}get isConnected(){return b.track(this,"isConnected"),this._isConnected}setIsConnected(t){this._isConnected=t,b.notify(this,"isConnected")}get template(){return this._template}set template(t){this._template!==t&&(this._template=t,this.needsInitialization||this.renderTemplate(t))}get styles(){return this._styles}set styles(t){this._styles!==t&&(this._styles!==null&&this.removeStyles(this._styles),this._styles=t,!this.needsInitialization&&t!==null&&this.addStyles(t))}addStyles(t){let e=er(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.append(t);else if(!t.isAttachedTo(e)){let i=t.behaviors;t.addStylesTo(e),i!==null&&this.addBehaviors(i)}}removeStyles(t){let e=er(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.removeChild(t);else if(t.isAttachedTo(e)){let i=t.behaviors;t.removeStylesFrom(e),i!==null&&this.removeBehaviors(i)}}addBehaviors(t){let e=this.behaviors||(this.behaviors=new Map),i=t.length,o=[];for(let n=0;n<i;++n){let s=t[n];e.has(s)?e.set(s,e.get(s)+1):(e.set(s,1),o.push(s))}if(this._isConnected){let n=this.element;for(let s=0;s<o.length;++s)o[s].bind(n,st)}}removeBehaviors(t,e=!1){let i=this.behaviors;if(i===null)return;let o=t.length,n=[];for(let s=0;s<o;++s){let a=t[s];if(i.has(a)){let d=i.get(a)-1;d===0||e?i.delete(a)&&n.push(a):i.set(a,d)}}if(this._isConnected){let s=this.element;for(let a=0;a<n.length;++a)n[a].unbind(s)}}onConnectedCallback(){if(this._isConnected)return;let t=this.element;this.needsInitialization?this.finishInitialization():this.view!==null&&this.view.bind(t,st);let e=this.behaviors;if(e!==null)for(let[i]of e)i.bind(t,st);this.setIsConnected(!0)}onDisconnectedCallback(){if(!this._isConnected)return;this.setIsConnected(!1);let t=this.view;t!==null&&t.unbind();let e=this.behaviors;if(e!==null){let i=this.element;for(let[o]of e)o.unbind(i)}}onAttributeChangedCallback(t,e,i){let o=this.definition.attributeLookup[t];o!==void 0&&o.onAttributeChangedCallback(this.element,i)}emit(t,e,i){return this._isConnected?this.element.dispatchEvent(new CustomEvent(t,Object.assign(Object.assign({detail:e},qo),i))):!1}finishInitialization(){let t=this.element,e=this.boundObservables;if(e!==null){let o=Object.keys(e);for(let n=0,s=o.length;n<s;++n){let a=o[n];t[a]=e[a]}this.boundObservables=null}let i=this.definition;this._template===null&&(this.element.resolveTemplate?this._template=this.element.resolveTemplate():i.template&&(this._template=i.template||null)),this._template!==null&&this.renderTemplate(this._template),this._styles===null&&(this.element.resolveStyles?this._styles=this.element.resolveStyles():i.styles&&(this._styles=i.styles||null)),this._styles!==null&&this.addStyles(this._styles),this.needsInitialization=!1}renderTemplate(t){let e=this.element,i=er(e)||e;this.view!==null?(this.view.dispose(),this.view=null):this.needsInitialization||m.removeChildNodes(i),t&&(this.view=t.render(e,i,e))}static forCustomElement(t){let e=t.$fastController;if(e!==void 0)return e;let i=J.forType(t.constructor);if(i===void 0)throw new Error("Missing FASTElement definition.");return t.$fastController=new r(t,i)}};function pi(r){return class extends r{constructor(){super(),be.forCustomElement(this)}$emit(t,e,i){return this.$fastController.emit(t,e,i)}connectedCallback(){this.$fastController.onConnectedCallback()}disconnectedCallback(){this.$fastController.onDisconnectedCallback()}attributeChangedCallback(t,e,i){this.$fastController.onAttributeChangedCallback(t,e,i)}}}var at=Object.assign(pi(HTMLElement),{from(r){return pi(r)},define(r,t){return new J(r,t).define().type}});var kt=class{createCSS(){return""}createBehavior(){}};function Uo(r,t){let e=[],i="",o=[];for(let n=0,s=r.length-1;n<s;++n){i+=r[n];let a=t[n];if(a instanceof kt){let d=a.createBehavior();a=a.createCSS(),d&&o.push(d)}a instanceof C||a instanceof CSSStyleSheet?(i.trim()!==""&&(e.push(i),i=""),e.push(a)):i+=a}return i+=r[r.length-1],i.trim()!==""&&e.push(i),{styles:e,behaviors:o}}function $(r,...t){let{styles:e,behaviors:i}=Uo(r,t),o=C.create(e);return i.length&&o.withBehaviors(...i),o}var rr=class{constructor(t,e){this.target=t,this.propertyName=e}bind(t){t[this.propertyName]=this.target}unbind(){}};function I(r){return new Mt("fast-ref",rr,r)}var ir=r=>typeof r=="function";var Wo=()=>null;function fi(r){return r===void 0?Wo:ir(r)?r:()=>r}function ge(r,t,e){let i=ir(r)?r:()=>r,o=fi(t),n=fi(e);return(s,a)=>i(s,a)?o(s,a):n(s,a)}var ye=class{constructor(t,e){this.target=t,this.options=e,this.source=null}bind(t){let e=this.options.property;this.shouldUpdate=b.getAccessors(t).some(i=>i.name===e),this.source=t,this.updateTarget(this.computeNodes()),this.shouldUpdate&&this.observe()}unbind(){this.updateTarget(ot),this.source=null,this.shouldUpdate&&this.disconnect()}handleEvent(){this.updateTarget(this.computeNodes())}computeNodes(){let t=this.getNodes();return this.options.filter!==void 0&&(t=t.filter(this.options.filter)),t}updateTarget(t){this.source[this.options.property]=t}};var or=class extends ye{constructor(t,e){super(t,e)}observe(){this.target.addEventListener("slotchange",this)}disconnect(){this.target.removeEventListener("slotchange",this)}getNodes(){return this.target.assignedNodes(this.options)}};function H(r){return typeof r=="string"&&(r={property:r}),new Mt("fast-slotted",or,r)}var z=class{handleStartContentChange(){this.startContainer.classList.toggle("start",this.start.assignedNodes().length>0)}handleEndContentChange(){this.endContainer.classList.toggle("end",this.end.assignedNodes().length>0)}},Z=(r,t)=>k`
1
+ function jt(i){return i.type==="int"?{type:"int",value:Tr("",i.value)}:i}function Tr(i,e){return typeof e=="bigint"?`jsonbigint ${e}n`:e}function Zi(i,e){if(typeof e=="string"){let t=e.match(/^jsonbigint\x01\x02 (\d+)n$/);if(t)return BigInt(t[1])}return e}var oe=function(){if(typeof globalThis<"u")return globalThis;if(typeof global<"u")return global;if(typeof self<"u")return self;if(typeof window<"u")return window;try{return new Function("return this")()}catch{return{}}}();oe.trustedTypes===void 0&&(oe.trustedTypes={createPolicy:(i,e)=>e});var Ki={configurable:!1,enumerable:!1,writable:!1};oe.FAST===void 0&&Reflect.defineProperty(oe,"FAST",Object.assign({value:Object.create(null)},Ki));var xe=oe.FAST;if(xe.getById===void 0){let i=Object.create(null);Reflect.defineProperty(xe,"getById",Object.assign({value(e,t){let o=i[e];return o===void 0&&(o=t?i[e]=t():null),o}},Ki))}var re=Object.freeze([]);function dt(){let i=new WeakMap;return function(e){let t=i.get(e);if(t===void 0){let o=Reflect.getPrototypeOf(e);for(;t===void 0&&o!==null;)t=i.get(o),o=Reflect.getPrototypeOf(o);t=t===void 0?[]:t.slice(0),i.set(e,t)}return t}}var zt=oe.FAST.getById(1,()=>{let i=[],e=[];function t(){if(e.length)throw e.shift()}function o(s){try{s.call()}catch(a){e.push(a),setTimeout(t,0)}}function r(){let a=0;for(;a<i.length;)if(o(i[a]),a++,a>1024){for(let d=0,c=i.length-a;d<c;d++)i[d]=i[d+a];i.length-=a,a=0}i.length=0}function n(s){i.length<1&&oe.requestAnimationFrame(r),i.push(s)}return Object.freeze({enqueue:n,process:r})}),eo=oe.trustedTypes.createPolicy("fast-html",{createHTML:i=>i}),qt=eo,Ge=`fast-${Math.random().toString(36).substring(2,8)}`,Ut=`${Ge}{`,ht=`}${Ge}`,m=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(i){if(qt!==eo)throw new Error("The HTML policy can only be set once.");qt=i},createHTML(i){return qt.createHTML(i)},isMarker(i){return i&&i.nodeType===8&&i.data.startsWith(Ge)},extractDirectiveIndexFromMarker(i){return parseInt(i.data.replace(`${Ge}:`,""))},createInterpolationPlaceholder(i){return`${Ut}${i}${ht}`},createCustomAttributePlaceholder(i,e){return`${i}="${this.createInterpolationPlaceholder(e)}"`},createBlockPlaceholder(i){return`<!--${Ge}:${i}-->`},queueUpdate:zt.enqueue,processUpdates:zt.process,nextUpdate(){return new Promise(zt.enqueue)},setAttribute(i,e,t){t==null?i.removeAttribute(e):i.setAttribute(e,t)},setBooleanAttribute(i,e,t){t?i.setAttribute(e,""):i.removeAttribute(e)},removeChildNodes(i){for(let e=i.firstChild;e!==null;e=i.firstChild)i.removeChild(e)},createTemplateWalker(i){return document.createTreeWalker(i,133,null,!1)}});var De=class{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=e,this.sub1=t}has(e){return this.spillover===void 0?this.sub1===e||this.sub2===e:this.spillover.indexOf(e)!==-1}subscribe(e){let t=this.spillover;if(t===void 0){if(this.has(e))return;if(this.sub1===void 0){this.sub1=e;return}if(this.sub2===void 0){this.sub2=e;return}this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else t.indexOf(e)===-1&&t.push(e)}unsubscribe(e){let t=this.spillover;if(t===void 0)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{let o=t.indexOf(e);o!==-1&&t.splice(o,1)}}notify(e){let t=this.spillover,o=this.source;if(t===void 0){let r=this.sub1,n=this.sub2;r!==void 0&&r.handleChange(o,e),n!==void 0&&n.handleChange(o,e)}else for(let r=0,n=t.length;r<n;++r)t[r].handleChange(o,e)}},Fe=class{constructor(e){this.subscribers={},this.sourceSubscribers=null,this.source=e}notify(e){var t;let o=this.subscribers[e];o!==void 0&&o.notify(e),(t=this.sourceSubscribers)===null||t===void 0||t.notify(e)}subscribe(e,t){var o;if(t){let r=this.subscribers[t];r===void 0&&(this.subscribers[t]=r=new De(this.source)),r.subscribe(e)}else this.sourceSubscribers=(o=this.sourceSubscribers)!==null&&o!==void 0?o:new De(this.source),this.sourceSubscribers.subscribe(e)}unsubscribe(e,t){var o;if(t){let r=this.subscribers[t];r!==void 0&&r.unsubscribe(e)}else(o=this.sourceSubscribers)===null||o===void 0||o.unsubscribe(e)}};var b=xe.getById(2,()=>{let i=/(:|&&|\|\||if)/,e=new WeakMap,t=m.queueUpdate,o,r=c=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function n(c){let u=c.$fastController||e.get(c);return u===void 0&&(Array.isArray(c)?u=r(c):e.set(c,u=new Fe(c))),u}let s=dt();class a{constructor(u){this.name=u,this.field=`_${u}`,this.callback=`${u}Changed`}getValue(u){return o!==void 0&&o.watch(u,this.name),u[this.field]}setValue(u,v){let T=this.field,j=u[T];if(j!==v){u[T]=v;let A=u[this.callback];typeof A=="function"&&A.call(u,j,v),n(u).notify(this.name)}}}class d extends De{constructor(u,v,T=!1){super(u,v),this.binding=u,this.isVolatileBinding=T,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(u,v){this.needsRefresh&&this.last!==null&&this.disconnect();let T=o;o=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;let j=this.binding(u,v);return o=T,j}disconnect(){if(this.last!==null){let u=this.first;for(;u!==void 0;)u.notifier.unsubscribe(this,u.propertyName),u=u.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(u,v){let T=this.last,j=n(u),A=T===null?this.first:{};if(A.propertySource=u,A.propertyName=v,A.notifier=j,j.subscribe(this,v),T!==null){if(!this.needsRefresh){let G;o=void 0,G=T.propertySource[T.propertyName],o=this,u===G&&(this.needsRefresh=!0)}T.next=A}this.last=A}handleChange(){this.needsQueue&&(this.needsQueue=!1,t(this))}call(){this.last!==null&&(this.needsQueue=!0,this.notify(this))}records(){let u=this.first;return{next:()=>{let v=u;return v===void 0?{value:void 0,done:!0}:(u=u.next,{value:v,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(c){r=c},getNotifier:n,track(c,u){o!==void 0&&o.watch(c,u)},trackVolatile(){o!==void 0&&(o.needsRefresh=!0)},notify(c,u){n(c).notify(u)},defineProperty(c,u){typeof u=="string"&&(u=new a(u)),s(c).push(u),Reflect.defineProperty(c,u.name,{enumerable:!0,get:function(){return u.getValue(this)},set:function(v){u.setValue(this,v)}})},getAccessors:s,binding(c,u,v=this.isVolatileBinding(c)){return new d(c,u,v)},isVolatileBinding(c){return i.test(c.toString())}})});function f(i,e){b.defineProperty(i,e)}function io(i,e,t){return Object.assign({},t,{get:function(){return b.trackVolatile(),t.get.apply(this)}})}var to=xe.getById(3,()=>{let i=null;return{get(){return i},set(e){i=e}}}),ne=class{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return to.get()}get isEven(){return this.index%2===0}get isOdd(){return this.index%2!==0}get isFirst(){return this.index===0}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(e){to.set(e)}};b.defineProperty(ne.prototype,"index");b.defineProperty(ne.prototype,"length");var se=Object.seal(new ne);var Re=class{constructor(){this.targetIndex=0}},Me=class extends Re{constructor(){super(...arguments),this.createPlaceholder=m.createInterpolationPlaceholder}},Be=class extends Re{constructor(e,t,o){super(),this.name=e,this.behavior=t,this.options=o}createPlaceholder(e){return m.createCustomAttributePlaceholder(this.name,e)}createBehavior(e){return new this.behavior(e,this.options)}};function Ir(i,e){this.source=i,this.context=e,this.bindingObserver===null&&(this.bindingObserver=b.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(i,e))}function Or(i,e){this.source=i,this.context=e,this.target.addEventListener(this.targetName,this)}function Ar(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function Er(){this.bindingObserver.disconnect(),this.source=null,this.context=null;let i=this.target.$fastView;i!==void 0&&i.isComposed&&(i.unbind(),i.needsBindOnly=!0)}function Pr(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function Dr(i){m.setAttribute(this.target,this.targetName,i)}function Fr(i){m.setBooleanAttribute(this.target,this.targetName,i)}function Rr(i){if(i==null&&(i=""),i.create){this.target.textContent="";let e=this.target.$fastView;e===void 0?e=i.create():this.target.$fastTemplate!==i&&(e.isComposed&&(e.remove(),e.unbind()),e=i.create()),e.isComposed?e.needsBindOnly&&(e.needsBindOnly=!1,e.bind(this.source,this.context)):(e.isComposed=!0,e.bind(this.source,this.context),e.insertBefore(this.target),this.target.$fastView=e,this.target.$fastTemplate=i)}else{let e=this.target.$fastView;e!==void 0&&e.isComposed&&(e.isComposed=!1,e.remove(),e.needsBindOnly?e.needsBindOnly=!1:e.unbind()),this.target.textContent=i}}function Mr(i){this.target[this.targetName]=i}function Br(i){let e=this.classVersions||Object.create(null),t=this.target,o=this.version||0;if(i!=null&&i.length){let r=i.split(/\s+/);for(let n=0,s=r.length;n<s;++n){let a=r[n];a!==""&&(e[a]=o,t.classList.add(a))}}if(this.classVersions=e,this.version=o+1,o!==0){o-=1;for(let r in e)e[r]===o&&t.classList.remove(r)}}var we=class extends Me{constructor(e){super(),this.binding=e,this.bind=Ir,this.unbind=Ar,this.updateTarget=Dr,this.isBindingVolatile=b.isVolatileBinding(this.binding)}get targetName(){return this.originalTargetName}set targetName(e){if(this.originalTargetName=e,e!==void 0)switch(e[0]){case":":if(this.cleanedTargetName=e.substr(1),this.updateTarget=Mr,this.cleanedTargetName==="innerHTML"){let t=this.binding;this.binding=(o,r)=>m.createHTML(t(o,r))}break;case"?":this.cleanedTargetName=e.substr(1),this.updateTarget=Fr;break;case"@":this.cleanedTargetName=e.substr(1),this.bind=Or,this.unbind=Pr;break;default:this.cleanedTargetName=e,e==="class"&&(this.updateTarget=Br);break}}targetAtContent(){this.updateTarget=Rr,this.unbind=Er}createBehavior(e){return new Wt(e,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}},Wt=class{constructor(e,t,o,r,n,s,a){this.source=null,this.context=null,this.bindingObserver=null,this.target=e,this.binding=t,this.isBindingVolatile=o,this.bind=r,this.unbind=n,this.updateTarget=s,this.targetName=a}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(e){ne.setEvent(e);let t=this.binding(this.source,this.context);ne.setEvent(null),t!==!0&&e.preventDefault()}};var Gt=null,Qt=class i{addFactory(e){e.targetIndex=this.targetIndex,this.behaviorFactories.push(e)}captureContentBinding(e){e.targetAtContent(),this.addFactory(e)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){Gt=this}static borrow(e){let t=Gt||new i;return t.directives=e,t.reset(),Gt=null,t}};function _r(i){if(i.length===1)return i[0];let e,t=i.length,o=i.map(s=>typeof s=="string"?()=>s:(e=s.targetName||e,s.binding)),r=(s,a)=>{let d="";for(let c=0;c<t;++c)d+=o[c](s,a);return d},n=new we(r);return n.targetName=e,n}var Lr=ht.length;function ro(i,e){let t=e.split(Ut);if(t.length===1)return null;let o=[];for(let r=0,n=t.length;r<n;++r){let s=t[r],a=s.indexOf(ht),d;if(a===-1)d=s;else{let c=parseInt(s.substring(0,a));o.push(i.directives[c]),d=s.substring(a+Lr)}d!==""&&o.push(d)}return o}function oo(i,e,t=!1){let o=e.attributes;for(let r=0,n=o.length;r<n;++r){let s=o[r],a=s.value,d=ro(i,a),c=null;d===null?t&&(c=new we(()=>a),c.targetName=s.name):c=_r(d),c!==null&&(e.removeAttributeNode(s),r--,n--,i.addFactory(c))}}function Nr(i,e,t){let o=ro(i,e.textContent);if(o!==null){let r=e;for(let n=0,s=o.length;n<s;++n){let a=o[n],d=n===0?e:r.parentNode.insertBefore(document.createTextNode(""),r.nextSibling);typeof a=="string"?d.textContent=a:(d.textContent=" ",i.captureContentBinding(a)),r=d,i.targetIndex++,d!==e&&t.nextNode()}i.targetIndex--}}function no(i,e){let t=i.content;document.adoptNode(t);let o=Qt.borrow(e);oo(o,i,!0);let r=o.behaviorFactories;o.reset();let n=m.createTemplateWalker(t),s;for(;s=n.nextNode();)switch(o.targetIndex++,s.nodeType){case 1:oo(o,s);break;case 3:Nr(o,s,n);break;case 8:m.isMarker(s)&&o.addFactory(e[m.extractDirectiveIndexFromMarker(s)])}let a=0;(m.isMarker(t.firstChild)||t.childNodes.length===1&&e.length)&&(t.insertBefore(document.createComment(""),t.firstChild),a=-1);let d=o.behaviorFactories;return o.release(),{fragment:t,viewBehaviorFactories:d,hostBehaviorFactories:r,targetOffset:a}}var Xt=document.createRange(),ut=class{constructor(e,t){this.fragment=e,this.behaviors=t,this.source=null,this.context=null,this.firstChild=e.firstChild,this.lastChild=e.lastChild}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{let t=this.lastChild;if(e.previousSibling===t)return;let o=e.parentNode,r=this.firstChild,n;for(;r!==t;)n=r.nextSibling,o.insertBefore(r,e),r=n;o.insertBefore(t,e)}}remove(){let e=this.fragment,t=this.lastChild,o=this.firstChild,r;for(;o!==t;)r=o.nextSibling,e.appendChild(o),o=r;e.appendChild(t)}dispose(){let e=this.firstChild.parentNode,t=this.lastChild,o=this.firstChild,r;for(;o!==t;)r=o.nextSibling,e.removeChild(o),o=r;e.removeChild(t);let n=this.behaviors,s=this.source;for(let a=0,d=n.length;a<d;++a)n[a].unbind(s)}bind(e,t){let o=this.behaviors;if(this.source!==e)if(this.source!==null){let r=this.source;this.source=e,this.context=t;for(let n=0,s=o.length;n<s;++n){let a=o[n];a.unbind(r),a.bind(e,t)}}else{this.source=e,this.context=t;for(let r=0,n=o.length;r<n;++r)o[r].bind(e,t)}}unbind(){if(this.source===null)return;let e=this.behaviors,t=this.source;for(let o=0,r=e.length;o<r;++o)e[o].unbind(t);this.source=null}static disposeContiguousBatch(e){if(e.length!==0){Xt.setStartBefore(e[0].firstChild),Xt.setEndAfter(e[e.length-1].lastChild),Xt.deleteContents();for(let t=0,o=e.length;t<o;++t){let r=e[t],n=r.behaviors,s=r.source;for(let a=0,d=n.length;a<d;++a)n[a].unbind(s)}}}};var pt=class{constructor(e,t){this.behaviorCount=0,this.hasHostBehaviors=!1,this.fragment=null,this.targetOffset=0,this.viewBehaviorFactories=null,this.hostBehaviorFactories=null,this.html=e,this.directives=t}create(e){if(this.fragment===null){let c,u=this.html;if(typeof u=="string"){c=document.createElement("template"),c.innerHTML=m.createHTML(u);let T=c.content.firstElementChild;T!==null&&T.tagName==="TEMPLATE"&&(c=T)}else c=u;let v=no(c,this.directives);this.fragment=v.fragment,this.viewBehaviorFactories=v.viewBehaviorFactories,this.hostBehaviorFactories=v.hostBehaviorFactories,this.targetOffset=v.targetOffset,this.behaviorCount=this.viewBehaviorFactories.length+this.hostBehaviorFactories.length,this.hasHostBehaviors=this.hostBehaviorFactories.length>0}let t=this.fragment.cloneNode(!0),o=this.viewBehaviorFactories,r=new Array(this.behaviorCount),n=m.createTemplateWalker(t),s=0,a=this.targetOffset,d=n.nextNode();for(let c=o.length;s<c;++s){let u=o[s],v=u.targetIndex;for(;d!==null;)if(a===v){r[s]=u.createBehavior(d);break}else d=n.nextNode(),a++}if(this.hasHostBehaviors){let c=this.hostBehaviorFactories;for(let u=0,v=c.length;u<v;++u,++s)r[s]=c[u].createBehavior(e)}return new ut(t,r)}render(e,t,o){typeof t=="string"&&(t=document.getElementById(t)),o===void 0&&(o=t);let r=this.create(o);return r.bind(e,se),r.appendTo(t),r}},Vr=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function k(i,...e){let t=[],o="";for(let r=0,n=i.length-1;r<n;++r){let s=i[r],a=e[r];if(o+=s,a instanceof pt){let d=a;a=()=>d}if(typeof a=="function"&&(a=new we(a)),a instanceof Me){let d=Vr.exec(s);d!==null&&(a.targetName=d[2])}a instanceof Re?(o+=a.createPlaceholder(t.length),t.push(a)):o+=a}return o+=i[i.length-1],new pt(o,t)}var C=class{constructor(){this.targets=new WeakSet}addStylesTo(e){this.targets.add(e)}removeStylesFrom(e){this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=this.behaviors===null?e:this.behaviors.concat(e),this}};C.create=(()=>{if(m.supportsAdoptedStyleSheets){let i=new Map;return e=>new Yt(e,i)}return i=>new Jt(i)})();function Zt(i){return i.map(e=>e instanceof C?Zt(e.styles):[e]).reduce((e,t)=>e.concat(t),[])}function so(i){return i.map(e=>e instanceof C?e.behaviors:null).reduce((e,t)=>t===null?e:(e===null&&(e=[]),e.concat(t)),null)}var ft=Symbol("prependToAdoptedStyleSheets");function ao(i){let e=[],t=[];return i.forEach(o=>(o[ft]?e:t).push(o)),{prepend:e,append:t}}var lo=(i,e)=>{let{prepend:t,append:o}=ao(e);i.adoptedStyleSheets=[...t,...i.adoptedStyleSheets,...o]},co=(i,e)=>{i.adoptedStyleSheets=i.adoptedStyleSheets.filter(t=>e.indexOf(t)===-1)};if(m.supportsAdoptedStyleSheets)try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),lo=(i,e)=>{let{prepend:t,append:o}=ao(e);i.adoptedStyleSheets.splice(0,0,...t),i.adoptedStyleSheets.push(...o)},co=(i,e)=>{for(let t of e){let o=i.adoptedStyleSheets.indexOf(t);o!==-1&&i.adoptedStyleSheets.splice(o,1)}}}catch{}var Yt=class extends C{constructor(e,t){super(),this.styles=e,this.styleSheetCache=t,this._styleSheets=void 0,this.behaviors=so(e)}get styleSheets(){if(this._styleSheets===void 0){let e=this.styles,t=this.styleSheetCache;this._styleSheets=Zt(e).map(o=>{if(o instanceof CSSStyleSheet)return o;let r=t.get(o);return r===void 0&&(r=new CSSStyleSheet,r.replaceSync(o),t.set(o,r)),r})}return this._styleSheets}addStylesTo(e){lo(e,this.styleSheets),super.addStylesTo(e)}removeStylesFrom(e){co(e,this.styleSheets),super.removeStylesFrom(e)}},Hr=0;function jr(){return`fast-style-class-${++Hr}`}var Jt=class extends C{constructor(e){super(),this.styles=e,this.behaviors=null,this.behaviors=so(e),this.styleSheets=Zt(e),this.styleClass=jr()}addStylesTo(e){let t=this.styleSheets,o=this.styleClass;e=this.normalizeTarget(e);for(let r=0;r<t.length;r++){let n=document.createElement("style");n.innerHTML=t[r],n.className=o,e.append(n)}super.addStylesTo(e)}removeStylesFrom(e){e=this.normalizeTarget(e);let t=e.querySelectorAll(`.${this.styleClass}`);for(let o=0,r=t.length;o<r;++o)e.removeChild(t[o]);super.removeStylesFrom(e)}isAttachedTo(e){return super.isAttachedTo(this.normalizeTarget(e))}normalizeTarget(e){return e===document?document.body:e}};var Qe=Object.freeze({locate:dt()}),Kt={toView(i){return i?"true":"false"},fromView(i){return!(i==null||i==="false"||i===!1||i===0)}},_e={toView(i){if(i==null)return null;let e=i*1;return isNaN(e)?null:e.toString()},fromView(i){if(i==null)return null;let e=i*1;return isNaN(e)?null:e}},mt=class i{constructor(e,t,o=t.toLowerCase(),r="reflect",n){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=o,this.mode=r,this.converter=n,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,r==="boolean"&&n===void 0&&(this.converter=Kt)}setValue(e,t){let o=e[this.fieldName],r=this.converter;r!==void 0&&(t=r.fromView(t)),o!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](o,t),e.$fastController.notify(this.name))}getValue(e){return b.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){let t=this.mode,o=this.guards;o.has(e)||t==="fromView"||m.queueUpdate(()=>{o.add(e);let r=e[this.fieldName];switch(t){case"reflect":let n=this.converter;m.setAttribute(e,this.attribute,n!==void 0?n.toView(r):r);break;case"boolean":m.setBooleanAttribute(e,this.attribute,r);break}o.delete(e)})}static collect(e,...t){let o=[];t.push(Qe.locate(e));for(let r=0,n=t.length;r<n;++r){let s=t[r];if(s!==void 0)for(let a=0,d=s.length;a<d;++a){let c=s[a];typeof c=="string"?o.push(new i(e,c)):o.push(new i(e,c.property,c.attribute,c.mode,c.converter))}}return o}};function h(i,e){let t;function o(r,n){arguments.length>1&&(t.property=n),Qe.locate(r.constructor).push(t)}if(arguments.length>1){t={},o(i,e);return}return t=i===void 0?{}:i,o}var ho={mode:"open"},uo={},ei=xe.getById(4,()=>{let i=new Map;return Object.freeze({register(e){return i.has(e.type)?!1:(i.set(e.type,e),!0)},getByType(e){return i.get(e)}})}),J=class{constructor(e,t=e.definition){typeof t=="string"&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template;let o=mt.collect(e,t.attributes),r=new Array(o.length),n={},s={};for(let a=0,d=o.length;a<d;++a){let c=o[a];r[a]=c.attribute,n[c.name]=c,s[c.attribute]=c}this.attributes=o,this.observedAttributes=r,this.propertyLookup=n,this.attributeLookup=s,this.shadowOptions=t.shadowOptions===void 0?ho:t.shadowOptions===null?void 0:Object.assign(Object.assign({},ho),t.shadowOptions),this.elementOptions=t.elementOptions===void 0?uo:Object.assign(Object.assign({},uo),t.elementOptions),this.styles=t.styles===void 0?void 0:Array.isArray(t.styles)?C.create(t.styles):t.styles instanceof C?t.styles:C.create([t.styles])}get isDefined(){return!!ei.getByType(this.type)}define(e=customElements){let t=this.type;if(ei.register(this)){let o=this.attributes,r=t.prototype;for(let n=0,s=o.length;n<s;++n)b.defineProperty(r,o[n]);Reflect.defineProperty(t,"observedAttributes",{value:this.observedAttributes,enumerable:!0})}return e.get(this.name)||e.define(this.name,t,this.elementOptions),this}};J.forType=ei.getByType;var po=new WeakMap,zr={bubbles:!0,composed:!0,cancelable:!0};function ti(i){return i.shadowRoot||po.get(i)||null}var bt=class i extends Fe{constructor(e,t){super(e),this.boundObservables=null,this.behaviors=null,this.needsInitialization=!0,this._template=null,this._styles=null,this._isConnected=!1,this.$fastController=this,this.view=null,this.element=e,this.definition=t;let o=t.shadowOptions;if(o!==void 0){let n=e.attachShadow(o);o.mode==="closed"&&po.set(e,n)}let r=b.getAccessors(e);if(r.length>0){let n=this.boundObservables=Object.create(null);for(let s=0,a=r.length;s<a;++s){let d=r[s].name,c=e[d];c!==void 0&&(delete e[d],n[d]=c)}}}get isConnected(){return b.track(this,"isConnected"),this._isConnected}setIsConnected(e){this._isConnected=e,b.notify(this,"isConnected")}get template(){return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get styles(){return this._styles}set styles(e){this._styles!==e&&(this._styles!==null&&this.removeStyles(this._styles),this._styles=e,!this.needsInitialization&&e!==null&&this.addStyles(e))}addStyles(e){let t=ti(this.element)||this.element.getRootNode();if(e instanceof HTMLStyleElement)t.append(e);else if(!e.isAttachedTo(t)){let o=e.behaviors;e.addStylesTo(t),o!==null&&this.addBehaviors(o)}}removeStyles(e){let t=ti(this.element)||this.element.getRootNode();if(e instanceof HTMLStyleElement)t.removeChild(e);else if(e.isAttachedTo(t)){let o=e.behaviors;e.removeStylesFrom(t),o!==null&&this.removeBehaviors(o)}}addBehaviors(e){let t=this.behaviors||(this.behaviors=new Map),o=e.length,r=[];for(let n=0;n<o;++n){let s=e[n];t.has(s)?t.set(s,t.get(s)+1):(t.set(s,1),r.push(s))}if(this._isConnected){let n=this.element;for(let s=0;s<r.length;++s)r[s].bind(n,se)}}removeBehaviors(e,t=!1){let o=this.behaviors;if(o===null)return;let r=e.length,n=[];for(let s=0;s<r;++s){let a=e[s];if(o.has(a)){let d=o.get(a)-1;d===0||t?o.delete(a)&&n.push(a):o.set(a,d)}}if(this._isConnected){let s=this.element;for(let a=0;a<n.length;++a)n[a].unbind(s)}}onConnectedCallback(){if(this._isConnected)return;let e=this.element;this.needsInitialization?this.finishInitialization():this.view!==null&&this.view.bind(e,se);let t=this.behaviors;if(t!==null)for(let[o]of t)o.bind(e,se);this.setIsConnected(!0)}onDisconnectedCallback(){if(!this._isConnected)return;this.setIsConnected(!1);let e=this.view;e!==null&&e.unbind();let t=this.behaviors;if(t!==null){let o=this.element;for(let[r]of t)r.unbind(o)}}onAttributeChangedCallback(e,t,o){let r=this.definition.attributeLookup[e];r!==void 0&&r.onAttributeChangedCallback(this.element,o)}emit(e,t,o){return this._isConnected?this.element.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},zr),o))):!1}finishInitialization(){let e=this.element,t=this.boundObservables;if(t!==null){let r=Object.keys(t);for(let n=0,s=r.length;n<s;++n){let a=r[n];e[a]=t[a]}this.boundObservables=null}let o=this.definition;this._template===null&&(this.element.resolveTemplate?this._template=this.element.resolveTemplate():o.template&&(this._template=o.template||null)),this._template!==null&&this.renderTemplate(this._template),this._styles===null&&(this.element.resolveStyles?this._styles=this.element.resolveStyles():o.styles&&(this._styles=o.styles||null)),this._styles!==null&&this.addStyles(this._styles),this.needsInitialization=!1}renderTemplate(e){let t=this.element,o=ti(t)||t;this.view!==null?(this.view.dispose(),this.view=null):this.needsInitialization||m.removeChildNodes(o),e&&(this.view=e.render(t,o,t))}static forCustomElement(e){let t=e.$fastController;if(t!==void 0)return t;let o=J.forType(e.constructor);if(o===void 0)throw new Error("Missing FASTElement definition.");return e.$fastController=new i(e,o)}};function fo(i){return class extends i{constructor(){super(),bt.forCustomElement(this)}$emit(e,t,o){return this.$fastController.emit(e,t,o)}connectedCallback(){this.$fastController.onConnectedCallback()}disconnectedCallback(){this.$fastController.onDisconnectedCallback()}attributeChangedCallback(e,t,o){this.$fastController.onAttributeChangedCallback(e,t,o)}}}var ae=Object.assign(fo(HTMLElement),{from(i){return fo(i)},define(i,e){return new J(i,e).define().type}});var ke=class{createCSS(){return""}createBehavior(){}};function qr(i,e){let t=[],o="",r=[];for(let n=0,s=i.length-1;n<s;++n){o+=i[n];let a=e[n];if(a instanceof ke){let d=a.createBehavior();a=a.createCSS(),d&&r.push(d)}a instanceof C||a instanceof CSSStyleSheet?(o.trim()!==""&&(t.push(o),o=""),t.push(a)):o+=a}return o+=i[i.length-1],o.trim()!==""&&t.push(o),{styles:t,behaviors:r}}function $(i,...e){let{styles:t,behaviors:o}=qr(i,e),r=C.create(t);return o.length&&r.withBehaviors(...o),r}var ii=class{constructor(e,t){this.target=e,this.propertyName=t}bind(e){e[this.propertyName]=this.target}unbind(){}};function I(i){return new Be("fast-ref",ii,i)}var oi=i=>typeof i=="function";var Ur=()=>null;function mo(i){return i===void 0?Ur:oi(i)?i:()=>i}function gt(i,e,t){let o=oi(i)?i:()=>i,r=mo(e),n=mo(t);return(s,a)=>o(s,a)?r(s,a):n(s,a)}var vt=class{constructor(e,t){this.target=e,this.options=t,this.source=null}bind(e){let t=this.options.property;this.shouldUpdate=b.getAccessors(e).some(o=>o.name===t),this.source=e,this.updateTarget(this.computeNodes()),this.shouldUpdate&&this.observe()}unbind(){this.updateTarget(re),this.source=null,this.shouldUpdate&&this.disconnect()}handleEvent(){this.updateTarget(this.computeNodes())}computeNodes(){let e=this.getNodes();return this.options.filter!==void 0&&(e=e.filter(this.options.filter)),e}updateTarget(e){this.source[this.options.property]=e}};var ri=class extends vt{constructor(e,t){super(e,t)}observe(){this.target.addEventListener("slotchange",this)}disconnect(){this.target.removeEventListener("slotchange",this)}getNodes(){return this.target.assignedNodes(this.options)}};function H(i){return typeof i=="string"&&(i={property:i}),new Be("fast-slotted",ri,i)}var z=class{handleStartContentChange(){this.startContainer.classList.toggle("start",this.start.assignedNodes().length>0)}handleEndContentChange(){this.endContainer.classList.toggle("end",this.end.assignedNodes().length>0)}},Z=(i,e)=>k`
2
2
  <span
3
3
  part="end"
4
4
  ${I("endContainer")}
5
- class=${e=>t.end?"end":void 0}
5
+ class=${t=>e.end?"end":void 0}
6
6
  >
7
- <slot name="end" ${I("end")} @slotchange="${e=>e.handleEndContentChange()}">
8
- ${t.end||""}
7
+ <slot name="end" ${I("end")} @slotchange="${t=>t.handleEndContentChange()}">
8
+ ${e.end||""}
9
9
  </slot>
10
10
  </span>
11
- `,K=(r,t)=>k`
11
+ `,K=(i,e)=>k`
12
12
  <span
13
13
  part="start"
14
14
  ${I("startContainer")}
15
- class="${e=>t.start?"start":void 0}"
15
+ class="${t=>e.start?"start":void 0}"
16
16
  >
17
17
  <slot
18
18
  name="start"
19
19
  ${I("start")}
20
- @slotchange="${e=>e.handleStartContentChange()}"
20
+ @slotchange="${t=>t.handleStartContentChange()}"
21
21
  >
22
- ${t.start||""}
22
+ ${e.start||""}
23
23
  </slot>
24
24
  </span>
25
- `,Js=k`
25
+ `,Ys=k`
26
26
  <span part="end" ${I("endContainer")}>
27
27
  <slot
28
28
  name="end"
29
29
  ${I("end")}
30
- @slotchange="${r=>r.handleEndContentChange()}"
30
+ @slotchange="${i=>i.handleEndContentChange()}"
31
31
  ></slot>
32
32
  </span>
33
- `,Zs=k`
33
+ `,Js=k`
34
34
  <span part="start" ${I("startContainer")}>
35
35
  <slot
36
36
  name="start"
37
37
  ${I("start")}
38
- @slotchange="${r=>r.handleStartContentChange()}"
38
+ @slotchange="${i=>i.handleStartContentChange()}"
39
39
  ></slot>
40
40
  </span>
41
- `;function l(r,t,e,i){var o=arguments.length,n=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,t,e,i);else for(var a=r.length-1;a>=0;a--)(s=r[a])&&(n=(o<3?s(n):o>3?s(t,e,n):s(t,e))||n);return o>3&&n&&Object.defineProperty(t,e,n),n}var nr=new Map;"metadata"in Reflect||(Reflect.metadata=function(r,t){return function(e){Reflect.defineMetadata(r,t,e)}},Reflect.defineMetadata=function(r,t,e){let i=nr.get(e);i===void 0&&nr.set(e,i=new Map),i.set(r,t)},Reflect.getOwnMetadata=function(r,t){let e=nr.get(t);if(e!==void 0)return e.get(r)});var cr=class{constructor(t,e){this.container=t,this.key=e}instance(t){return this.registerResolver(0,t)}singleton(t){return this.registerResolver(1,t)}transient(t){return this.registerResolver(2,t)}callback(t){return this.registerResolver(3,t)}cachedCallback(t){return this.registerResolver(3,$i(t))}aliasTo(t){return this.registerResolver(5,t)}registerResolver(t,e){let{container:i,key:o}=this;return this.container=this.key=void 0,i.registerResolver(o,new L(o,t,e))}};function Xt(r){let t=r.slice(),e=Object.keys(r),i=e.length,o;for(let n=0;n<i;++n)o=e[n],Ti(o)||(t[o]=r[o]);return t}var Go=Object.freeze({none(r){throw Error(`${r.toString()} not registered, did you forget to add @singleton()?`)},singleton(r){return new L(r,1,r)},transient(r){return new L(r,2,r)}}),sr=Object.freeze({default:Object.freeze({parentLocator:()=>null,responsibleForOwnerRequests:!1,defaultResolver:Go.singleton})}),mi=new Map;function bi(r){return t=>Reflect.getOwnMetadata(r,t)}var gi=null,x=Object.freeze({createContainer(r){return new Yt(null,Object.assign({},sr.default,r))},findResponsibleContainer(r){let t=r.$$container$$;return t&&t.responsibleForOwnerRequests?t:x.findParentContainer(r)},findParentContainer(r){let t=new CustomEvent(Ci,{bubbles:!0,composed:!0,cancelable:!0,detail:{container:void 0}});return r.dispatchEvent(t),t.detail.container||x.getOrCreateDOMContainer()},getOrCreateDOMContainer(r,t){return r?r.$$container$$||new Yt(r,Object.assign({},sr.default,t,{parentLocator:x.findParentContainer})):gi||(gi=new Yt(null,Object.assign({},sr.default,t,{parentLocator:()=>null})))},getDesignParamtypes:bi("design:paramtypes"),getAnnotationParamtypes:bi("di:paramtypes"),getOrCreateAnnotationParamTypes(r){let t=this.getAnnotationParamtypes(r);return t===void 0&&Reflect.defineMetadata("di:paramtypes",t=[],r),t},getDependencies(r){let t=mi.get(r);if(t===void 0){let e=r.inject;if(e===void 0){let i=x.getDesignParamtypes(r),o=x.getAnnotationParamtypes(r);if(i===void 0)if(o===void 0){let n=Object.getPrototypeOf(r);typeof n=="function"&&n!==Function.prototype?t=Xt(x.getDependencies(n)):t=[]}else t=Xt(o);else if(o===void 0)t=Xt(i);else{t=Xt(i);let n=o.length,s;for(let c=0;c<n;++c)s=o[c],s!==void 0&&(t[c]=s);let a=Object.keys(o);n=a.length;let d;for(let c=0;c<n;++c)d=a[c],Ti(d)||(t[d]=o[d])}}else t=Xt(e);mi.set(r,t)}return t},defineProperty(r,t,e,i=!1){let o=`$di_${t}`;Reflect.defineProperty(r,t,{get:function(){let n=this[o];if(n===void 0&&(n=(this instanceof HTMLElement?x.findResponsibleContainer(this):x.getOrCreateDOMContainer()).get(e),this[o]=n,i&&this instanceof at)){let a=this.$fastController,d=()=>{let h=x.findResponsibleContainer(this).get(e),y=this[o];h!==y&&(this[o]=n,a.notify(t))};a.subscribe({handleChange:d},"isConnected")}return n}})},createInterface(r,t){let e=typeof r=="function"?r:t,i=typeof r=="string"?r:r&&"friendlyName"in r&&r.friendlyName||wi,o=typeof r=="string"?!1:r&&"respectConnection"in r&&r.respectConnection||!1,n=function(s,a,d){if(s==null||new.target!==void 0)throw new Error(`No registration for interface: '${n.friendlyName}'`);if(a)x.defineProperty(s,a,n,o);else{let c=x.getOrCreateAnnotationParamTypes(s);c[d]=n}};return n.$isInterface=!0,n.friendlyName=i??"(anonymous)",e!=null&&(n.register=function(s,a){return e(new cr(s,a??n))}),n.toString=function(){return`InterfaceSymbol<${n.friendlyName}>`},n},inject(...r){return function(t,e,i){if(typeof i=="number"){let o=x.getOrCreateAnnotationParamTypes(t),n=r[0];n!==void 0&&(o[i]=n)}else if(e)x.defineProperty(t,e,r[0]);else{let o=i?x.getOrCreateAnnotationParamTypes(i.value):x.getOrCreateAnnotationParamTypes(t),n;for(let s=0;s<r.length;++s)n=r[s],n!==void 0&&(o[s]=n)}}},transient(r){return r.register=function(e){return St.transient(r,r).register(e)},r.registerInRequestor=!1,r},singleton(r,t=Xo){return r.register=function(i){return St.singleton(r,r).register(i)},r.registerInRequestor=t.scoped,r}}),Qo=x.createInterface("Container");function ke(r){return function(t){let e=function(i,o,n){x.inject(e)(i,o,n)};return e.$isResolver=!0,e.resolve=function(i,o){return r(t,i,o)},e}}var ra=x.inject;var Xo={scoped:!1};function Yo(r){return function(t,e){e=!!e;let i=function(o,n,s){x.inject(i)(o,n,s)};return i.$isResolver=!0,i.resolve=function(o,n){return r(t,o,n,e)},i}}var ia=Yo((r,t,e,i)=>e.getAll(r,i)),oa=ke((r,t,e)=>()=>e.get(r)),na=ke((r,t,e)=>{if(e.has(r,!0))return e.get(r)});function ur(r,t,e){x.inject(ur)(r,t,e)}ur.$isResolver=!0;ur.resolve=()=>{};var sa=ke((r,t,e)=>{let i=Si(r,t),o=new L(r,0,i);return e.registerResolver(r,o),i}),aa=ke((r,t,e)=>Si(r,t));function Si(r,t){return t.getFactory(r).construct(t)}var L=class{constructor(t,e,i){this.key=t,this.strategy=e,this.state=i,this.resolving=!1}get $isResolver(){return!0}register(t){return t.registerResolver(this.key,this)}resolve(t,e){switch(this.strategy){case 0:return this.state;case 1:{if(this.resolving)throw new Error(`Cyclic dependency found: ${this.state.name}`);return this.resolving=!0,this.state=t.getFactory(this.state).construct(e),this.strategy=0,this.resolving=!1,this.state}case 2:{let i=t.getFactory(this.state);if(i===null)throw new Error(`Resolver for ${String(this.key)} returned a null factory`);return i.construct(e)}case 3:return this.state(t,e,this);case 4:return this.state[0].resolve(t,e);case 5:return e.get(this.state);default:throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`)}}getFactory(t){var e,i,o;switch(this.strategy){case 1:case 2:return t.getFactory(this.state);case 5:return(o=(i=(e=t.getResolver(this.state))===null||e===void 0?void 0:e.getFactory)===null||i===void 0?void 0:i.call(e,t))!==null&&o!==void 0?o:null;default:return null}}};function yi(r){return this.get(r)}function Jo(r,t){return t(r)}var dr=class{constructor(t,e){this.Type=t,this.dependencies=e,this.transformers=null}construct(t,e){let i;return e===void 0?i=new this.Type(...this.dependencies.map(yi,t)):i=new this.Type(...this.dependencies.map(yi,t),...e),this.transformers==null?i:this.transformers.reduce(Jo,i)}registerTransformer(t){(this.transformers||(this.transformers=[])).push(t)}},Zo={$isResolver:!0,resolve(r,t){return t}};function we(r){return typeof r.register=="function"}function Ko(r){return we(r)&&typeof r.registerInRequestor=="boolean"}function vi(r){return Ko(r)&&r.registerInRequestor}function tn(r){return r.prototype!==void 0}var en=new Set(["Array","ArrayBuffer","Boolean","DataView","Date","Error","EvalError","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Number","Object","Promise","RangeError","ReferenceError","RegExp","Set","SharedArrayBuffer","String","SyntaxError","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakSet"]),Ci="__DI_LOCATE_PARENT__",ar=new Map,Yt=class r{constructor(t,e){this.owner=t,this.config=e,this._parent=void 0,this.registerDepth=0,this.context=null,t!==null&&(t.$$container$$=this),this.resolvers=new Map,this.resolvers.set(Qo,Zo),t instanceof Node&&t.addEventListener(Ci,i=>{i.composedPath()[0]!==this.owner&&(i.detail.container=this,i.stopImmediatePropagation())})}get parent(){return this._parent===void 0&&(this._parent=this.config.parentLocator(this.owner)),this._parent}get depth(){return this.parent===null?0:this.parent.depth+1}get responsibleForOwnerRequests(){return this.config.responsibleForOwnerRequests}registerWithContext(t,...e){return this.context=t,this.register(...e),this.context=null,this}register(...t){if(++this.registerDepth===100)throw new Error("Unable to autoregister dependency");let e,i,o,n,s,a=this.context;for(let d=0,c=t.length;d<c;++d)if(e=t[d],!!ki(e))if(we(e))e.register(this,a);else if(tn(e))St.singleton(e,e).register(this);else for(i=Object.keys(e),n=0,s=i.length;n<s;++n)o=e[i[n]],ki(o)&&(we(o)?o.register(this,a):this.register(o));return--this.registerDepth,this}registerResolver(t,e){ve(t);let i=this.resolvers,o=i.get(t);return o==null?i.set(t,e):o instanceof L&&o.strategy===4?o.state.push(e):i.set(t,new L(t,4,[o,e])),e}registerTransformer(t,e){let i=this.getResolver(t);if(i==null)return!1;if(i.getFactory){let o=i.getFactory(this);return o==null?!1:(o.registerTransformer(e),!0)}return!1}getResolver(t,e=!0){if(ve(t),t.resolve!==void 0)return t;let i=this,o;for(;i!=null;)if(o=i.resolvers.get(t),o==null){if(i.parent==null){let n=vi(t)?this:i;return e?this.jitRegister(t,n):null}i=i.parent}else return o;return null}has(t,e=!1){return this.resolvers.has(t)?!0:e&&this.parent!=null?this.parent.has(t,!0):!1}get(t){if(ve(t),t.$isResolver)return t.resolve(this,this);let e=this,i;for(;e!=null;)if(i=e.resolvers.get(t),i==null){if(e.parent==null){let o=vi(t)?this:e;return i=this.jitRegister(t,o),i.resolve(e,this)}e=e.parent}else return i.resolve(e,this);throw new Error(`Unable to resolve key: ${String(t)}`)}getAll(t,e=!1){ve(t);let i=this,o=i,n;if(e){let s=ot;for(;o!=null;)n=o.resolvers.get(t),n!=null&&(s=s.concat(xi(n,o,i))),o=o.parent;return s}else for(;o!=null;)if(n=o.resolvers.get(t),n==null){if(o=o.parent,o==null)return ot}else return xi(n,o,i);return ot}getFactory(t){let e=ar.get(t);if(e===void 0){if(rn(t))throw new Error(`${t.name} is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.`);ar.set(t,e=new dr(t,x.getDependencies(t)))}return e}registerFactory(t,e){ar.set(t,e)}createChild(t){return new r(null,Object.assign({},this.config,t,{parentLocator:()=>this}))}jitRegister(t,e){if(typeof t!="function")throw new Error(`Attempted to jitRegister something that is not a constructor: '${t}'. Did you forget to register this dependency?`);if(en.has(t.name))throw new Error(`Attempted to jitRegister an intrinsic type: ${t.name}. Did you forget to add @inject(Key)`);if(we(t)){let i=t.register(e);if(!(i instanceof Object)||i.resolve==null){let o=e.resolvers.get(t);if(o!=null)return o;throw new Error("A valid resolver was not returned from the static register method")}return i}else{if(t.$isInterface)throw new Error(`Attempted to jitRegister an interface: ${t.friendlyName}`);{let i=this.config.defaultResolver(t,e);return e.resolvers.set(t,i),i}}}},lr=new WeakMap;function $i(r){return function(t,e,i){if(lr.has(i))return lr.get(i);let o=r(t,e,i);return lr.set(i,o),o}}var St=Object.freeze({instance(r,t){return new L(r,0,t)},singleton(r,t){return new L(r,1,t)},transient(r,t){return new L(r,2,t)},callback(r,t){return new L(r,3,t)},cachedCallback(r,t){return new L(r,3,$i(t))},aliasTo(r,t){return new L(t,5,r)}});function ve(r){if(r==null)throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?")}function xi(r,t,e){if(r instanceof L&&r.strategy===4){let i=r.state,o=i.length,n=new Array(o);for(;o--;)n[o]=i[o].resolve(t,e);return n}return[r.resolve(t,e)]}var wi="(anonymous)";function ki(r){return typeof r=="object"&&r!==null||typeof r=="function"}var rn=function(){let r=new WeakMap,t=!1,e="",i=0;return function(o){return t=r.get(o),t===void 0&&(e=o.toString(),i=e.length,t=i>=29&&i<=100&&e.charCodeAt(i-1)===125&&e.charCodeAt(i-2)<=32&&e.charCodeAt(i-3)===93&&e.charCodeAt(i-4)===101&&e.charCodeAt(i-5)===100&&e.charCodeAt(i-6)===111&&e.charCodeAt(i-7)===99&&e.charCodeAt(i-8)===32&&e.charCodeAt(i-9)===101&&e.charCodeAt(i-10)===118&&e.charCodeAt(i-11)===105&&e.charCodeAt(i-12)===116&&e.charCodeAt(i-13)===97&&e.charCodeAt(i-14)===110&&e.charCodeAt(i-15)===88,r.set(o,t)),t}}(),xe={};function Ti(r){switch(typeof r){case"number":return r>=0&&(r|0)===r;case"string":{let t=xe[r];if(t!==void 0)return t;let e=r.length;if(e===0)return xe[r]=!1;let i=0;for(let o=0;o<e;++o)if(i=r.charCodeAt(o),o===0&&i===48&&e>1||i<48||i>57)return xe[r]=!1;return xe[r]=!0}default:return!1}}function Ii(r){return`${r.toLowerCase()}:presentation`}var Se=new Map,$e=Object.freeze({define(r,t,e){let i=Ii(r);Se.get(i)===void 0?Se.set(i,t):Se.set(i,!1),e.register(St.instance(i,t))},forTag(r,t){let e=Ii(r),i=Se.get(e);return i===!1?x.findResponsibleContainer(t).get(e):i||null}}),Ce=class{constructor(t,e){this.template=t||null,this.styles=e===void 0?null:Array.isArray(e)?C.create(e):e instanceof C?e:C.create([e])}applyTo(t){let e=t.$fastController;e.template===null&&(e.template=this.template),e.styles===null&&(e.styles=this.styles)}};var S=class r extends at{constructor(){super(...arguments),this._presentation=void 0}get $presentation(){return this._presentation===void 0&&(this._presentation=$e.forTag(this.tagName,this)),this._presentation}templateChanged(){this.template!==void 0&&(this.$fastController.template=this.template)}stylesChanged(){this.styles!==void 0&&(this.$fastController.styles=this.styles)}connectedCallback(){this.$presentation!==null&&this.$presentation.applyTo(this),super.connectedCallback()}static compose(t){return(e={})=>new hr(this===r?class extends r{}:this,t,e)}};l([f],S.prototype,"template",void 0);l([f],S.prototype,"styles",void 0);function Jt(r,t,e){return typeof r=="function"?r(t,e):r}var hr=class{constructor(t,e,i){this.type=t,this.elementDefinition=e,this.overrideDefinition=i,this.definition=Object.assign(Object.assign({},this.elementDefinition),this.overrideDefinition)}register(t,e){let i=this.definition,o=this.overrideDefinition,s=`${i.prefix||e.elementPrefix}-${i.baseName}`;e.tryDefineElement({name:s,type:this.type,baseClass:this.elementDefinition.baseClass,callback:a=>{let d=new Ce(Jt(i.template,a,i),Jt(i.styles,a,i));a.definePresentation(d);let c=Jt(i.shadowOptions,a,i);a.shadowRootMode&&(c?o.shadowOptions||(c.mode=a.shadowRootMode):c!==null&&(c={mode:a.shadowRootMode})),a.defineElement({elementOptions:Jt(i.elementOptions,a,i),shadowOptions:c,attributes:Jt(i.attributes,a,i)})}})}};function A(r,...t){let e=Qt.locate(r);t.forEach(i=>{Object.getOwnPropertyNames(i.prototype).forEach(n=>{n!=="constructor"&&Object.defineProperty(r.prototype,n,Object.getOwnPropertyDescriptor(i.prototype,n))}),Qt.locate(i).forEach(n=>e.push(n))})}function Oi(r,t){let e=r.length;for(;e--;)if(t(r[e],e,r))return e;return-1}function Ei(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Ai(...r){return r.every(t=>t instanceof HTMLElement)}function on(){let r=document.querySelector('meta[property="csp-nonce"]');return r?r.getAttribute("content"):null}var Ct;function Pi(){if(typeof Ct=="boolean")return Ct;if(!Ei())return Ct=!1,Ct;let r=document.createElement("style"),t=on();t!==null&&r.setAttribute("nonce",t),document.head.appendChild(r);try{r.sheet.insertRule("foo:focus-visible {color:inherit}",0),Ct=!0}catch{Ct=!1}finally{document.head.removeChild(r)}return Ct}var _i;(function(r){r[r.alt=18]="alt",r[r.arrowDown=40]="arrowDown",r[r.arrowLeft=37]="arrowLeft",r[r.arrowRight=39]="arrowRight",r[r.arrowUp=38]="arrowUp",r[r.back=8]="back",r[r.backSlash=220]="backSlash",r[r.break=19]="break",r[r.capsLock=20]="capsLock",r[r.closeBracket=221]="closeBracket",r[r.colon=186]="colon",r[r.colon2=59]="colon2",r[r.comma=188]="comma",r[r.ctrl=17]="ctrl",r[r.delete=46]="delete",r[r.end=35]="end",r[r.enter=13]="enter",r[r.equals=187]="equals",r[r.equals2=61]="equals2",r[r.equals3=107]="equals3",r[r.escape=27]="escape",r[r.forwardSlash=191]="forwardSlash",r[r.function1=112]="function1",r[r.function10=121]="function10",r[r.function11=122]="function11",r[r.function12=123]="function12",r[r.function2=113]="function2",r[r.function3=114]="function3",r[r.function4=115]="function4",r[r.function5=116]="function5",r[r.function6=117]="function6",r[r.function7=118]="function7",r[r.function8=119]="function8",r[r.function9=120]="function9",r[r.home=36]="home",r[r.insert=45]="insert",r[r.menu=93]="menu",r[r.minus=189]="minus",r[r.minus2=109]="minus2",r[r.numLock=144]="numLock",r[r.numPad0=96]="numPad0",r[r.numPad1=97]="numPad1",r[r.numPad2=98]="numPad2",r[r.numPad3=99]="numPad3",r[r.numPad4=100]="numPad4",r[r.numPad5=101]="numPad5",r[r.numPad6=102]="numPad6",r[r.numPad7=103]="numPad7",r[r.numPad8=104]="numPad8",r[r.numPad9=105]="numPad9",r[r.numPadDivide=111]="numPadDivide",r[r.numPadDot=110]="numPadDot",r[r.numPadMinus=109]="numPadMinus",r[r.numPadMultiply=106]="numPadMultiply",r[r.numPadPlus=107]="numPadPlus",r[r.openBracket=219]="openBracket",r[r.pageDown=34]="pageDown",r[r.pageUp=33]="pageUp",r[r.period=190]="period",r[r.print=44]="print",r[r.quote=222]="quote",r[r.scrollLock=145]="scrollLock",r[r.shift=16]="shift",r[r.space=32]="space",r[r.tab=9]="tab",r[r.tilde=192]="tilde",r[r.windowsLeft=91]="windowsLeft",r[r.windowsOpera=219]="windowsOpera",r[r.windowsRight=92]="windowsRight"})(_i||(_i={}));var lt="ArrowDown",Di="ArrowLeft",Ri="ArrowRight",ct="ArrowUp",Lt="Enter",Nt="Escape",dt="Home",ut="End";var ht=" ",Vt="Tab";function Fi(r,t,e){return Math.min(Math.max(e,r),t)}function Zt(r,t,e=0){return[t,e]=[t,e].sort((i,o)=>i-o),t<=r&&r<e}var nn=0;function $t(r=""){return`${r}${nn++}`}var v=class{};l([u({attribute:"aria-atomic"})],v.prototype,"ariaAtomic",void 0);l([u({attribute:"aria-busy"})],v.prototype,"ariaBusy",void 0);l([u({attribute:"aria-controls"})],v.prototype,"ariaControls",void 0);l([u({attribute:"aria-current"})],v.prototype,"ariaCurrent",void 0);l([u({attribute:"aria-describedby"})],v.prototype,"ariaDescribedby",void 0);l([u({attribute:"aria-details"})],v.prototype,"ariaDetails",void 0);l([u({attribute:"aria-disabled"})],v.prototype,"ariaDisabled",void 0);l([u({attribute:"aria-errormessage"})],v.prototype,"ariaErrormessage",void 0);l([u({attribute:"aria-flowto"})],v.prototype,"ariaFlowto",void 0);l([u({attribute:"aria-haspopup"})],v.prototype,"ariaHaspopup",void 0);l([u({attribute:"aria-hidden"})],v.prototype,"ariaHidden",void 0);l([u({attribute:"aria-invalid"})],v.prototype,"ariaInvalid",void 0);l([u({attribute:"aria-keyshortcuts"})],v.prototype,"ariaKeyshortcuts",void 0);l([u({attribute:"aria-label"})],v.prototype,"ariaLabel",void 0);l([u({attribute:"aria-labelledby"})],v.prototype,"ariaLabelledby",void 0);l([u({attribute:"aria-live"})],v.prototype,"ariaLive",void 0);l([u({attribute:"aria-owns"})],v.prototype,"ariaOwns",void 0);l([u({attribute:"aria-relevant"})],v.prototype,"ariaRelevant",void 0);l([u({attribute:"aria-roledescription"})],v.prototype,"ariaRoledescription",void 0);var Mi=(r,t)=>k`
41
+ `;function l(i,e,t,o){var r=arguments.length,n=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(i,e,t,o);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(n=(r<3?s(n):r>3?s(e,t,n):s(e,t))||n);return r>3&&n&&Object.defineProperty(e,t,n),n}var ni=new Map;"metadata"in Reflect||(Reflect.metadata=function(i,e){return function(t){Reflect.defineMetadata(i,e,t)}},Reflect.defineMetadata=function(i,e,t){let o=ni.get(t);o===void 0&&ni.set(t,o=new Map),o.set(i,e)},Reflect.getOwnMetadata=function(i,e){let t=ni.get(e);if(t!==void 0)return t.get(i)});var ci=class{constructor(e,t){this.container=e,this.key=t}instance(e){return this.registerResolver(0,e)}singleton(e){return this.registerResolver(1,e)}transient(e){return this.registerResolver(2,e)}callback(e){return this.registerResolver(3,e)}cachedCallback(e){return this.registerResolver(3,To(e))}aliasTo(e){return this.registerResolver(5,e)}registerResolver(e,t){let{container:o,key:r}=this;return this.container=this.key=void 0,o.registerResolver(r,new L(r,e,t))}};function Xe(i){let e=i.slice(),t=Object.keys(i),o=t.length,r;for(let n=0;n<o;++n)r=t[n],Io(r)||(e[r]=i[r]);return e}var Wr=Object.freeze({none(i){throw Error(`${i.toString()} not registered, did you forget to add @singleton()?`)},singleton(i){return new L(i,1,i)},transient(i){return new L(i,2,i)}}),si=Object.freeze({default:Object.freeze({parentLocator:()=>null,responsibleForOwnerRequests:!1,defaultResolver:Wr.singleton})}),bo=new Map;function go(i){return e=>Reflect.getOwnMetadata(i,e)}var vo=null,x=Object.freeze({createContainer(i){return new Ye(null,Object.assign({},si.default,i))},findResponsibleContainer(i){let e=i.$$container$$;return e&&e.responsibleForOwnerRequests?e:x.findParentContainer(i)},findParentContainer(i){let e=new CustomEvent($o,{bubbles:!0,composed:!0,cancelable:!0,detail:{container:void 0}});return i.dispatchEvent(e),e.detail.container||x.getOrCreateDOMContainer()},getOrCreateDOMContainer(i,e){return i?i.$$container$$||new Ye(i,Object.assign({},si.default,e,{parentLocator:x.findParentContainer})):vo||(vo=new Ye(null,Object.assign({},si.default,e,{parentLocator:()=>null})))},getDesignParamtypes:go("design:paramtypes"),getAnnotationParamtypes:go("di:paramtypes"),getOrCreateAnnotationParamTypes(i){let e=this.getAnnotationParamtypes(i);return e===void 0&&Reflect.defineMetadata("di:paramtypes",e=[],i),e},getDependencies(i){let e=bo.get(i);if(e===void 0){let t=i.inject;if(t===void 0){let o=x.getDesignParamtypes(i),r=x.getAnnotationParamtypes(i);if(o===void 0)if(r===void 0){let n=Object.getPrototypeOf(i);typeof n=="function"&&n!==Function.prototype?e=Xe(x.getDependencies(n)):e=[]}else e=Xe(r);else if(r===void 0)e=Xe(o);else{e=Xe(o);let n=r.length,s;for(let c=0;c<n;++c)s=r[c],s!==void 0&&(e[c]=s);let a=Object.keys(r);n=a.length;let d;for(let c=0;c<n;++c)d=a[c],Io(d)||(e[d]=r[d])}}else e=Xe(t);bo.set(i,e)}return e},defineProperty(i,e,t,o=!1){let r=`$di_${e}`;Reflect.defineProperty(i,e,{get:function(){let n=this[r];if(n===void 0&&(n=(this instanceof HTMLElement?x.findResponsibleContainer(this):x.getOrCreateDOMContainer()).get(t),this[r]=n,o&&this instanceof ae)){let a=this.$fastController,d=()=>{let u=x.findResponsibleContainer(this).get(t),v=this[r];u!==v&&(this[r]=n,a.notify(e))};a.subscribe({handleChange:d},"isConnected")}return n}})},createInterface(i,e){let t=typeof i=="function"?i:e,o=typeof i=="string"?i:i&&"friendlyName"in i&&i.friendlyName||ko,r=typeof i=="string"?!1:i&&"respectConnection"in i&&i.respectConnection||!1,n=function(s,a,d){if(s==null||new.target!==void 0)throw new Error(`No registration for interface: '${n.friendlyName}'`);if(a)x.defineProperty(s,a,n,r);else{let c=x.getOrCreateAnnotationParamTypes(s);c[d]=n}};return n.$isInterface=!0,n.friendlyName=o??"(anonymous)",t!=null&&(n.register=function(s,a){return t(new ci(s,a??n))}),n.toString=function(){return`InterfaceSymbol<${n.friendlyName}>`},n},inject(...i){return function(e,t,o){if(typeof o=="number"){let r=x.getOrCreateAnnotationParamTypes(e),n=i[0];n!==void 0&&(r[o]=n)}else if(t)x.defineProperty(e,t,i[0]);else{let r=o?x.getOrCreateAnnotationParamTypes(o.value):x.getOrCreateAnnotationParamTypes(e),n;for(let s=0;s<i.length;++s)n=i[s],n!==void 0&&(r[s]=n)}}},transient(i){return i.register=function(t){return Se.transient(i,i).register(t)},i.registerInRequestor=!1,i},singleton(i,e=Qr){return i.register=function(o){return Se.singleton(i,i).register(o)},i.registerInRequestor=e.scoped,i}}),Gr=x.createInterface("Container");function kt(i){return function(e){let t=function(o,r,n){x.inject(t)(o,r,n)};return t.$isResolver=!0,t.resolve=function(o,r){return i(e,o,r)},t}}var ta=x.inject;var Qr={scoped:!1};function Xr(i){return function(e,t){t=!!t;let o=function(r,n,s){x.inject(o)(r,n,s)};return o.$isResolver=!0,o.resolve=function(r,n){return i(e,r,n,t)},o}}var ia=Xr((i,e,t,o)=>t.getAll(i,o)),oa=kt((i,e,t)=>()=>t.get(i)),ra=kt((i,e,t)=>{if(t.has(i,!0))return t.get(i)});function hi(i,e,t){x.inject(hi)(i,e,t)}hi.$isResolver=!0;hi.resolve=()=>{};var na=kt((i,e,t)=>{let o=Co(i,e),r=new L(i,0,o);return t.registerResolver(i,r),o}),sa=kt((i,e,t)=>Co(i,e));function Co(i,e){return e.getFactory(i).construct(e)}var L=class{constructor(e,t,o){this.key=e,this.strategy=t,this.state=o,this.resolving=!1}get $isResolver(){return!0}register(e){return e.registerResolver(this.key,this)}resolve(e,t){switch(this.strategy){case 0:return this.state;case 1:{if(this.resolving)throw new Error(`Cyclic dependency found: ${this.state.name}`);return this.resolving=!0,this.state=e.getFactory(this.state).construct(t),this.strategy=0,this.resolving=!1,this.state}case 2:{let o=e.getFactory(this.state);if(o===null)throw new Error(`Resolver for ${String(this.key)} returned a null factory`);return o.construct(t)}case 3:return this.state(e,t,this);case 4:return this.state[0].resolve(e,t);case 5:return t.get(this.state);default:throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`)}}getFactory(e){var t,o,r;switch(this.strategy){case 1:case 2:return e.getFactory(this.state);case 5:return(r=(o=(t=e.getResolver(this.state))===null||t===void 0?void 0:t.getFactory)===null||o===void 0?void 0:o.call(t,e))!==null&&r!==void 0?r:null;default:return null}}};function yo(i){return this.get(i)}function Yr(i,e){return e(i)}var di=class{constructor(e,t){this.Type=e,this.dependencies=t,this.transformers=null}construct(e,t){let o;return t===void 0?o=new this.Type(...this.dependencies.map(yo,e)):o=new this.Type(...this.dependencies.map(yo,e),...t),this.transformers==null?o:this.transformers.reduce(Yr,o)}registerTransformer(e){(this.transformers||(this.transformers=[])).push(e)}},Jr={$isResolver:!0,resolve(i,e){return e}};function wt(i){return typeof i.register=="function"}function Zr(i){return wt(i)&&typeof i.registerInRequestor=="boolean"}function xo(i){return Zr(i)&&i.registerInRequestor}function Kr(i){return i.prototype!==void 0}var en=new Set(["Array","ArrayBuffer","Boolean","DataView","Date","Error","EvalError","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Number","Object","Promise","RangeError","ReferenceError","RegExp","Set","SharedArrayBuffer","String","SyntaxError","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakSet"]),$o="__DI_LOCATE_PARENT__",ai=new Map,Ye=class i{constructor(e,t){this.owner=e,this.config=t,this._parent=void 0,this.registerDepth=0,this.context=null,e!==null&&(e.$$container$$=this),this.resolvers=new Map,this.resolvers.set(Gr,Jr),e instanceof Node&&e.addEventListener($o,o=>{o.composedPath()[0]!==this.owner&&(o.detail.container=this,o.stopImmediatePropagation())})}get parent(){return this._parent===void 0&&(this._parent=this.config.parentLocator(this.owner)),this._parent}get depth(){return this.parent===null?0:this.parent.depth+1}get responsibleForOwnerRequests(){return this.config.responsibleForOwnerRequests}registerWithContext(e,...t){return this.context=e,this.register(...t),this.context=null,this}register(...e){if(++this.registerDepth===100)throw new Error("Unable to autoregister dependency");let t,o,r,n,s,a=this.context;for(let d=0,c=e.length;d<c;++d)if(t=e[d],!!So(t))if(wt(t))t.register(this,a);else if(Kr(t))Se.singleton(t,t).register(this);else for(o=Object.keys(t),n=0,s=o.length;n<s;++n)r=t[o[n]],So(r)&&(wt(r)?r.register(this,a):this.register(r));return--this.registerDepth,this}registerResolver(e,t){yt(e);let o=this.resolvers,r=o.get(e);return r==null?o.set(e,t):r instanceof L&&r.strategy===4?r.state.push(t):o.set(e,new L(e,4,[r,t])),t}registerTransformer(e,t){let o=this.getResolver(e);if(o==null)return!1;if(o.getFactory){let r=o.getFactory(this);return r==null?!1:(r.registerTransformer(t),!0)}return!1}getResolver(e,t=!0){if(yt(e),e.resolve!==void 0)return e;let o=this,r;for(;o!=null;)if(r=o.resolvers.get(e),r==null){if(o.parent==null){let n=xo(e)?this:o;return t?this.jitRegister(e,n):null}o=o.parent}else return r;return null}has(e,t=!1){return this.resolvers.has(e)?!0:t&&this.parent!=null?this.parent.has(e,!0):!1}get(e){if(yt(e),e.$isResolver)return e.resolve(this,this);let t=this,o;for(;t!=null;)if(o=t.resolvers.get(e),o==null){if(t.parent==null){let r=xo(e)?this:t;return o=this.jitRegister(e,r),o.resolve(t,this)}t=t.parent}else return o.resolve(t,this);throw new Error(`Unable to resolve key: ${String(e)}`)}getAll(e,t=!1){yt(e);let o=this,r=o,n;if(t){let s=re;for(;r!=null;)n=r.resolvers.get(e),n!=null&&(s=s.concat(wo(n,r,o))),r=r.parent;return s}else for(;r!=null;)if(n=r.resolvers.get(e),n==null){if(r=r.parent,r==null)return re}else return wo(n,r,o);return re}getFactory(e){let t=ai.get(e);if(t===void 0){if(tn(e))throw new Error(`${e.name} is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.`);ai.set(e,t=new di(e,x.getDependencies(e)))}return t}registerFactory(e,t){ai.set(e,t)}createChild(e){return new i(null,Object.assign({},this.config,e,{parentLocator:()=>this}))}jitRegister(e,t){if(typeof e!="function")throw new Error(`Attempted to jitRegister something that is not a constructor: '${e}'. Did you forget to register this dependency?`);if(en.has(e.name))throw new Error(`Attempted to jitRegister an intrinsic type: ${e.name}. Did you forget to add @inject(Key)`);if(wt(e)){let o=e.register(t);if(!(o instanceof Object)||o.resolve==null){let r=t.resolvers.get(e);if(r!=null)return r;throw new Error("A valid resolver was not returned from the static register method")}return o}else{if(e.$isInterface)throw new Error(`Attempted to jitRegister an interface: ${e.friendlyName}`);{let o=this.config.defaultResolver(e,t);return t.resolvers.set(e,o),o}}}},li=new WeakMap;function To(i){return function(e,t,o){if(li.has(o))return li.get(o);let r=i(e,t,o);return li.set(o,r),r}}var Se=Object.freeze({instance(i,e){return new L(i,0,e)},singleton(i,e){return new L(i,1,e)},transient(i,e){return new L(i,2,e)},callback(i,e){return new L(i,3,e)},cachedCallback(i,e){return new L(i,3,To(e))},aliasTo(i,e){return new L(e,5,i)}});function yt(i){if(i==null)throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?")}function wo(i,e,t){if(i instanceof L&&i.strategy===4){let o=i.state,r=o.length,n=new Array(r);for(;r--;)n[r]=o[r].resolve(e,t);return n}return[i.resolve(e,t)]}var ko="(anonymous)";function So(i){return typeof i=="object"&&i!==null||typeof i=="function"}var tn=function(){let i=new WeakMap,e=!1,t="",o=0;return function(r){return e=i.get(r),e===void 0&&(t=r.toString(),o=t.length,e=o>=29&&o<=100&&t.charCodeAt(o-1)===125&&t.charCodeAt(o-2)<=32&&t.charCodeAt(o-3)===93&&t.charCodeAt(o-4)===101&&t.charCodeAt(o-5)===100&&t.charCodeAt(o-6)===111&&t.charCodeAt(o-7)===99&&t.charCodeAt(o-8)===32&&t.charCodeAt(o-9)===101&&t.charCodeAt(o-10)===118&&t.charCodeAt(o-11)===105&&t.charCodeAt(o-12)===116&&t.charCodeAt(o-13)===97&&t.charCodeAt(o-14)===110&&t.charCodeAt(o-15)===88,i.set(r,e)),e}}(),xt={};function Io(i){switch(typeof i){case"number":return i>=0&&(i|0)===i;case"string":{let e=xt[i];if(e!==void 0)return e;let t=i.length;if(t===0)return xt[i]=!1;let o=0;for(let r=0;r<t;++r)if(o=i.charCodeAt(r),r===0&&o===48&&t>1||o<48||o>57)return xt[i]=!1;return xt[i]=!0}default:return!1}}function Oo(i){return`${i.toLowerCase()}:presentation`}var St=new Map,$t=Object.freeze({define(i,e,t){let o=Oo(i);St.get(o)===void 0?St.set(o,e):St.set(o,!1),t.register(Se.instance(o,e))},forTag(i,e){let t=Oo(i),o=St.get(t);return o===!1?x.findResponsibleContainer(e).get(t):o||null}}),Ct=class{constructor(e,t){this.template=e||null,this.styles=t===void 0?null:Array.isArray(t)?C.create(t):t instanceof C?t:C.create([t])}applyTo(e){let t=e.$fastController;t.template===null&&(t.template=this.template),t.styles===null&&(t.styles=this.styles)}};var S=class i extends ae{constructor(){super(...arguments),this._presentation=void 0}get $presentation(){return this._presentation===void 0&&(this._presentation=$t.forTag(this.tagName,this)),this._presentation}templateChanged(){this.template!==void 0&&(this.$fastController.template=this.template)}stylesChanged(){this.styles!==void 0&&(this.$fastController.styles=this.styles)}connectedCallback(){this.$presentation!==null&&this.$presentation.applyTo(this),super.connectedCallback()}static compose(e){return(t={})=>new ui(this===i?class extends i{}:this,e,t)}};l([f],S.prototype,"template",void 0);l([f],S.prototype,"styles",void 0);function Je(i,e,t){return typeof i=="function"?i(e,t):i}var ui=class{constructor(e,t,o){this.type=e,this.elementDefinition=t,this.overrideDefinition=o,this.definition=Object.assign(Object.assign({},this.elementDefinition),this.overrideDefinition)}register(e,t){let o=this.definition,r=this.overrideDefinition,s=`${o.prefix||t.elementPrefix}-${o.baseName}`;t.tryDefineElement({name:s,type:this.type,baseClass:this.elementDefinition.baseClass,callback:a=>{let d=new Ct(Je(o.template,a,o),Je(o.styles,a,o));a.definePresentation(d);let c=Je(o.shadowOptions,a,o);a.shadowRootMode&&(c?r.shadowOptions||(c.mode=a.shadowRootMode):c!==null&&(c={mode:a.shadowRootMode})),a.defineElement({elementOptions:Je(o.elementOptions,a,o),shadowOptions:c,attributes:Je(o.attributes,a,o)})}})}};function E(i,...e){let t=Qe.locate(i);e.forEach(o=>{Object.getOwnPropertyNames(o.prototype).forEach(n=>{n!=="constructor"&&Object.defineProperty(i.prototype,n,Object.getOwnPropertyDescriptor(o.prototype,n))}),Qe.locate(o).forEach(n=>t.push(n))})}function Ao(i,e){let t=i.length;for(;t--;)if(e(i[t],t,i))return t;return-1}function Eo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Po(...i){return i.every(e=>e instanceof HTMLElement)}function on(){let i=document.querySelector('meta[property="csp-nonce"]');return i?i.getAttribute("content"):null}var Ce;function Do(){if(typeof Ce=="boolean")return Ce;if(!Eo())return Ce=!1,Ce;let i=document.createElement("style"),e=on();e!==null&&i.setAttribute("nonce",e),document.head.appendChild(i);try{i.sheet.insertRule("foo:focus-visible {color:inherit}",0),Ce=!0}catch{Ce=!1}finally{document.head.removeChild(i)}return Ce}var Fo;(function(i){i[i.alt=18]="alt",i[i.arrowDown=40]="arrowDown",i[i.arrowLeft=37]="arrowLeft",i[i.arrowRight=39]="arrowRight",i[i.arrowUp=38]="arrowUp",i[i.back=8]="back",i[i.backSlash=220]="backSlash",i[i.break=19]="break",i[i.capsLock=20]="capsLock",i[i.closeBracket=221]="closeBracket",i[i.colon=186]="colon",i[i.colon2=59]="colon2",i[i.comma=188]="comma",i[i.ctrl=17]="ctrl",i[i.delete=46]="delete",i[i.end=35]="end",i[i.enter=13]="enter",i[i.equals=187]="equals",i[i.equals2=61]="equals2",i[i.equals3=107]="equals3",i[i.escape=27]="escape",i[i.forwardSlash=191]="forwardSlash",i[i.function1=112]="function1",i[i.function10=121]="function10",i[i.function11=122]="function11",i[i.function12=123]="function12",i[i.function2=113]="function2",i[i.function3=114]="function3",i[i.function4=115]="function4",i[i.function5=116]="function5",i[i.function6=117]="function6",i[i.function7=118]="function7",i[i.function8=119]="function8",i[i.function9=120]="function9",i[i.home=36]="home",i[i.insert=45]="insert",i[i.menu=93]="menu",i[i.minus=189]="minus",i[i.minus2=109]="minus2",i[i.numLock=144]="numLock",i[i.numPad0=96]="numPad0",i[i.numPad1=97]="numPad1",i[i.numPad2=98]="numPad2",i[i.numPad3=99]="numPad3",i[i.numPad4=100]="numPad4",i[i.numPad5=101]="numPad5",i[i.numPad6=102]="numPad6",i[i.numPad7=103]="numPad7",i[i.numPad8=104]="numPad8",i[i.numPad9=105]="numPad9",i[i.numPadDivide=111]="numPadDivide",i[i.numPadDot=110]="numPadDot",i[i.numPadMinus=109]="numPadMinus",i[i.numPadMultiply=106]="numPadMultiply",i[i.numPadPlus=107]="numPadPlus",i[i.openBracket=219]="openBracket",i[i.pageDown=34]="pageDown",i[i.pageUp=33]="pageUp",i[i.period=190]="period",i[i.print=44]="print",i[i.quote=222]="quote",i[i.scrollLock=145]="scrollLock",i[i.shift=16]="shift",i[i.space=32]="space",i[i.tab=9]="tab",i[i.tilde=192]="tilde",i[i.windowsLeft=91]="windowsLeft",i[i.windowsOpera=219]="windowsOpera",i[i.windowsRight=92]="windowsRight"})(Fo||(Fo={}));var le="ArrowDown",Ro="ArrowLeft",Mo="ArrowRight",ce="ArrowUp",Le="Enter",Ne="Escape",de="Home",he="End";var ue=" ",Ve="Tab";function Bo(i,e,t){return Math.min(Math.max(t,i),e)}function Ze(i,e,t=0){return[e,t]=[e,t].sort((o,r)=>o-r),e<=i&&i<t}var rn=0;function $e(i=""){return`${i}${rn++}`}var y=class{};l([h({attribute:"aria-atomic"})],y.prototype,"ariaAtomic",void 0);l([h({attribute:"aria-busy"})],y.prototype,"ariaBusy",void 0);l([h({attribute:"aria-controls"})],y.prototype,"ariaControls",void 0);l([h({attribute:"aria-current"})],y.prototype,"ariaCurrent",void 0);l([h({attribute:"aria-describedby"})],y.prototype,"ariaDescribedby",void 0);l([h({attribute:"aria-details"})],y.prototype,"ariaDetails",void 0);l([h({attribute:"aria-disabled"})],y.prototype,"ariaDisabled",void 0);l([h({attribute:"aria-errormessage"})],y.prototype,"ariaErrormessage",void 0);l([h({attribute:"aria-flowto"})],y.prototype,"ariaFlowto",void 0);l([h({attribute:"aria-haspopup"})],y.prototype,"ariaHaspopup",void 0);l([h({attribute:"aria-hidden"})],y.prototype,"ariaHidden",void 0);l([h({attribute:"aria-invalid"})],y.prototype,"ariaInvalid",void 0);l([h({attribute:"aria-keyshortcuts"})],y.prototype,"ariaKeyshortcuts",void 0);l([h({attribute:"aria-label"})],y.prototype,"ariaLabel",void 0);l([h({attribute:"aria-labelledby"})],y.prototype,"ariaLabelledby",void 0);l([h({attribute:"aria-live"})],y.prototype,"ariaLive",void 0);l([h({attribute:"aria-owns"})],y.prototype,"ariaOwns",void 0);l([h({attribute:"aria-relevant"})],y.prototype,"ariaRelevant",void 0);l([h({attribute:"aria-roledescription"})],y.prototype,"ariaRoledescription",void 0);var _o=(i,e)=>k`
42
42
  <button
43
43
  class="control"
44
44
  part="control"
45
- ?autofocus="${e=>e.autofocus}"
46
- ?disabled="${e=>e.disabled}"
47
- form="${e=>e.formId}"
48
- formaction="${e=>e.formaction}"
49
- formenctype="${e=>e.formenctype}"
50
- formmethod="${e=>e.formmethod}"
51
- formnovalidate="${e=>e.formnovalidate}"
52
- formtarget="${e=>e.formtarget}"
53
- name="${e=>e.name}"
54
- type="${e=>e.type}"
55
- value="${e=>e.value}"
56
- aria-atomic="${e=>e.ariaAtomic}"
57
- aria-busy="${e=>e.ariaBusy}"
58
- aria-controls="${e=>e.ariaControls}"
59
- aria-current="${e=>e.ariaCurrent}"
60
- aria-describedby="${e=>e.ariaDescribedby}"
61
- aria-details="${e=>e.ariaDetails}"
62
- aria-disabled="${e=>e.ariaDisabled}"
63
- aria-errormessage="${e=>e.ariaErrormessage}"
64
- aria-expanded="${e=>e.ariaExpanded}"
65
- aria-flowto="${e=>e.ariaFlowto}"
66
- aria-haspopup="${e=>e.ariaHaspopup}"
67
- aria-hidden="${e=>e.ariaHidden}"
68
- aria-invalid="${e=>e.ariaInvalid}"
69
- aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
70
- aria-label="${e=>e.ariaLabel}"
71
- aria-labelledby="${e=>e.ariaLabelledby}"
72
- aria-live="${e=>e.ariaLive}"
73
- aria-owns="${e=>e.ariaOwns}"
74
- aria-pressed="${e=>e.ariaPressed}"
75
- aria-relevant="${e=>e.ariaRelevant}"
76
- aria-roledescription="${e=>e.ariaRoledescription}"
45
+ ?autofocus="${t=>t.autofocus}"
46
+ ?disabled="${t=>t.disabled}"
47
+ form="${t=>t.formId}"
48
+ formaction="${t=>t.formaction}"
49
+ formenctype="${t=>t.formenctype}"
50
+ formmethod="${t=>t.formmethod}"
51
+ formnovalidate="${t=>t.formnovalidate}"
52
+ formtarget="${t=>t.formtarget}"
53
+ name="${t=>t.name}"
54
+ type="${t=>t.type}"
55
+ value="${t=>t.value}"
56
+ aria-atomic="${t=>t.ariaAtomic}"
57
+ aria-busy="${t=>t.ariaBusy}"
58
+ aria-controls="${t=>t.ariaControls}"
59
+ aria-current="${t=>t.ariaCurrent}"
60
+ aria-describedby="${t=>t.ariaDescribedby}"
61
+ aria-details="${t=>t.ariaDetails}"
62
+ aria-disabled="${t=>t.ariaDisabled}"
63
+ aria-errormessage="${t=>t.ariaErrormessage}"
64
+ aria-expanded="${t=>t.ariaExpanded}"
65
+ aria-flowto="${t=>t.ariaFlowto}"
66
+ aria-haspopup="${t=>t.ariaHaspopup}"
67
+ aria-hidden="${t=>t.ariaHidden}"
68
+ aria-invalid="${t=>t.ariaInvalid}"
69
+ aria-keyshortcuts="${t=>t.ariaKeyshortcuts}"
70
+ aria-label="${t=>t.ariaLabel}"
71
+ aria-labelledby="${t=>t.ariaLabelledby}"
72
+ aria-live="${t=>t.ariaLive}"
73
+ aria-owns="${t=>t.ariaOwns}"
74
+ aria-pressed="${t=>t.ariaPressed}"
75
+ aria-relevant="${t=>t.ariaRelevant}"
76
+ aria-roledescription="${t=>t.ariaRoledescription}"
77
77
  ${I("control")}
78
78
  >
79
- ${K(r,t)}
79
+ ${K(i,e)}
80
80
  <span class="content" part="content">
81
81
  <slot ${H("defaultSlottedContent")}></slot>
82
82
  </span>
83
- ${Z(r,t)}
83
+ ${Z(i,e)}
84
84
  </button>
85
- `;var Bi="form-associated-proxy",Li="ElementInternals",Ni=Li in window&&"setFormValue"in window[Li].prototype,Vi=new WeakMap;function Tt(r){let t=class extends r{constructor(...e){super(...e),this.dirtyValue=!1,this.disabled=!1,this.proxyEventsToBlock=["change","click"],this.proxyInitialized=!1,this.required=!1,this.initialValue=this.initialValue||"",this.elementInternals||(this.formResetCallback=this.formResetCallback.bind(this))}static get formAssociated(){return Ni}get validity(){return this.elementInternals?this.elementInternals.validity:this.proxy.validity}get form(){return this.elementInternals?this.elementInternals.form:this.proxy.form}get validationMessage(){return this.elementInternals?this.elementInternals.validationMessage:this.proxy.validationMessage}get willValidate(){return this.elementInternals?this.elementInternals.willValidate:this.proxy.willValidate}get labels(){if(this.elementInternals)return Object.freeze(Array.from(this.elementInternals.labels));if(this.proxy instanceof HTMLElement&&this.proxy.ownerDocument&&this.id){let e=this.proxy.labels,i=Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`)),o=e?i.concat(Array.from(e)):i;return Object.freeze(o)}else return ot}valueChanged(e,i){this.dirtyValue=!0,this.proxy instanceof HTMLElement&&(this.proxy.value=this.value),this.currentValue=this.value,this.setFormValue(this.value),this.validate()}currentValueChanged(){this.value=this.currentValue}initialValueChanged(e,i){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}disabledChanged(e,i){this.proxy instanceof HTMLElement&&(this.proxy.disabled=this.disabled),m.queueUpdate(()=>this.classList.toggle("disabled",this.disabled))}nameChanged(e,i){this.proxy instanceof HTMLElement&&(this.proxy.name=this.name)}requiredChanged(e,i){this.proxy instanceof HTMLElement&&(this.proxy.required=this.required),m.queueUpdate(()=>this.classList.toggle("required",this.required)),this.validate()}get elementInternals(){if(!Ni)return null;let e=Vi.get(this);return e||(e=this.attachInternals(),Vi.set(this,e)),e}connectedCallback(){super.connectedCallback(),this.addEventListener("keypress",this._keypressHandler),this.value||(this.value=this.initialValue,this.dirtyValue=!1),this.elementInternals||(this.attachProxy(),this.form&&this.form.addEventListener("reset",this.formResetCallback))}disconnectedCallback(){super.disconnectedCallback(),this.proxyEventsToBlock.forEach(e=>this.proxy.removeEventListener(e,this.stopPropagation)),!this.elementInternals&&this.form&&this.form.removeEventListener("reset",this.formResetCallback)}checkValidity(){return this.elementInternals?this.elementInternals.checkValidity():this.proxy.checkValidity()}reportValidity(){return this.elementInternals?this.elementInternals.reportValidity():this.proxy.reportValidity()}setValidity(e,i,o){this.elementInternals?this.elementInternals.setValidity(e,i,o):typeof i=="string"&&this.proxy.setCustomValidity(i)}formDisabledCallback(e){this.disabled=e}formResetCallback(){this.value=this.initialValue,this.dirtyValue=!1}attachProxy(){var e;this.proxyInitialized||(this.proxyInitialized=!0,this.proxy.style.display="none",this.proxyEventsToBlock.forEach(i=>this.proxy.addEventListener(i,this.stopPropagation)),this.proxy.disabled=this.disabled,this.proxy.required=this.required,typeof this.name=="string"&&(this.proxy.name=this.name),typeof this.value=="string"&&(this.proxy.value=this.value),this.proxy.setAttribute("slot",Bi),this.proxySlot=document.createElement("slot"),this.proxySlot.setAttribute("name",Bi)),(e=this.shadowRoot)===null||e===void 0||e.appendChild(this.proxySlot),this.appendChild(this.proxy)}detachProxy(){var e;this.removeChild(this.proxy),(e=this.shadowRoot)===null||e===void 0||e.removeChild(this.proxySlot)}validate(e){this.proxy instanceof HTMLElement&&this.setValidity(this.proxy.validity,this.proxy.validationMessage,e)}setFormValue(e,i){this.elementInternals&&this.elementInternals.setFormValue(e,i||e)}_keypressHandler(e){switch(e.key){case Lt:if(this.form instanceof HTMLFormElement){let i=this.form.querySelector("[type=submit]");i?.click()}break}}stopPropagation(e){e.stopPropagation()}};return u({mode:"boolean"})(t.prototype,"disabled"),u({mode:"fromView",attribute:"value"})(t.prototype,"initialValue"),u({attribute:"current-value"})(t.prototype,"currentValue"),u(t.prototype,"name"),u({mode:"boolean"})(t.prototype,"required"),f(t.prototype,"value"),t}function Hi(r){class t extends Tt(r){}class e extends t{constructor(...o){super(o),this.dirtyChecked=!1,this.checkedAttribute=!1,this.checked=!1,this.dirtyChecked=!1}checkedAttributeChanged(){this.defaultChecked=this.checkedAttribute}defaultCheckedChanged(){this.dirtyChecked||(this.checked=this.defaultChecked,this.dirtyChecked=!1)}checkedChanged(o,n){this.dirtyChecked||(this.dirtyChecked=!0),this.currentChecked=this.checked,this.updateForm(),this.proxy instanceof HTMLInputElement&&(this.proxy.checked=this.checked),o!==void 0&&this.$emit("change"),this.validate()}currentCheckedChanged(o,n){this.checked=this.currentChecked}updateForm(){let o=this.checked?this.value:null;this.setFormValue(o,o)}connectedCallback(){super.connectedCallback(),this.updateForm()}formResetCallback(){super.formResetCallback(),this.checked=!!this.checkedAttribute,this.dirtyChecked=!1}}return u({attribute:"checked",mode:"boolean"})(e.prototype,"checkedAttribute"),u({attribute:"current-checked",converter:Ke})(e.prototype,"currentChecked"),f(e.prototype,"defaultChecked"),f(e.prototype,"checked"),e}var pr=class extends S{},Te=class extends Tt(pr){constructor(){super(...arguments),this.proxy=document.createElement("input")}};var V=class extends Te{constructor(){super(...arguments),this.handleClick=t=>{var e;this.disabled&&((e=this.defaultSlottedContent)===null||e===void 0?void 0:e.length)<=1&&t.stopPropagation()},this.handleSubmission=()=>{if(!this.form)return;let t=this.proxy.isConnected;t||this.attachProxy(),typeof this.form.requestSubmit=="function"?this.form.requestSubmit(this.proxy):this.proxy.click(),t||this.detachProxy()},this.handleFormReset=()=>{var t;(t=this.form)===null||t===void 0||t.reset()},this.handleUnsupportedDelegatesFocus=()=>{var t;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(!((t=this.$fastController.definition.shadowOptions)===null||t===void 0)&&t.delegatesFocus)&&(this.focus=()=>{this.control.focus()})}}formactionChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formAction=this.formaction)}formenctypeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formEnctype=this.formenctype)}formmethodChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formMethod=this.formmethod)}formnovalidateChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formNoValidate=this.formnovalidate)}formtargetChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formTarget=this.formtarget)}typeChanged(t,e){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type),e==="submit"&&this.addEventListener("click",this.handleSubmission),t==="submit"&&this.removeEventListener("click",this.handleSubmission),e==="reset"&&this.addEventListener("click",this.handleFormReset),t==="reset"&&this.removeEventListener("click",this.handleFormReset)}validate(){super.validate(this.control)}connectedCallback(){var t;super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.handleUnsupportedDelegatesFocus();let e=Array.from((t=this.control)===null||t===void 0?void 0:t.children);e&&e.forEach(i=>{i.addEventListener("click",this.handleClick)})}disconnectedCallback(){var t;super.disconnectedCallback();let e=Array.from((t=this.control)===null||t===void 0?void 0:t.children);e&&e.forEach(i=>{i.removeEventListener("click",this.handleClick)})}};l([u({mode:"boolean"})],V.prototype,"autofocus",void 0);l([u({attribute:"form"})],V.prototype,"formId",void 0);l([u],V.prototype,"formaction",void 0);l([u],V.prototype,"formenctype",void 0);l([u],V.prototype,"formmethod",void 0);l([u({mode:"boolean"})],V.prototype,"formnovalidate",void 0);l([u],V.prototype,"formtarget",void 0);l([u],V.prototype,"type",void 0);l([f],V.prototype,"defaultSlottedContent",void 0);var Ht=class{};l([u({attribute:"aria-expanded"})],Ht.prototype,"ariaExpanded",void 0);l([u({attribute:"aria-pressed"})],Ht.prototype,"ariaPressed",void 0);A(Ht,v);A(V,z,Ht);var ji=(r,t)=>k`
85
+ `;var Lo="form-associated-proxy",No="ElementInternals",Vo=No in window&&"setFormValue"in window[No].prototype,Ho=new WeakMap;function Te(i){let e=class extends i{constructor(...t){super(...t),this.dirtyValue=!1,this.disabled=!1,this.proxyEventsToBlock=["change","click"],this.proxyInitialized=!1,this.required=!1,this.initialValue=this.initialValue||"",this.elementInternals||(this.formResetCallback=this.formResetCallback.bind(this))}static get formAssociated(){return Vo}get validity(){return this.elementInternals?this.elementInternals.validity:this.proxy.validity}get form(){return this.elementInternals?this.elementInternals.form:this.proxy.form}get validationMessage(){return this.elementInternals?this.elementInternals.validationMessage:this.proxy.validationMessage}get willValidate(){return this.elementInternals?this.elementInternals.willValidate:this.proxy.willValidate}get labels(){if(this.elementInternals)return Object.freeze(Array.from(this.elementInternals.labels));if(this.proxy instanceof HTMLElement&&this.proxy.ownerDocument&&this.id){let t=this.proxy.labels,o=Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`)),r=t?o.concat(Array.from(t)):o;return Object.freeze(r)}else return re}valueChanged(t,o){this.dirtyValue=!0,this.proxy instanceof HTMLElement&&(this.proxy.value=this.value),this.currentValue=this.value,this.setFormValue(this.value),this.validate()}currentValueChanged(){this.value=this.currentValue}initialValueChanged(t,o){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}disabledChanged(t,o){this.proxy instanceof HTMLElement&&(this.proxy.disabled=this.disabled),m.queueUpdate(()=>this.classList.toggle("disabled",this.disabled))}nameChanged(t,o){this.proxy instanceof HTMLElement&&(this.proxy.name=this.name)}requiredChanged(t,o){this.proxy instanceof HTMLElement&&(this.proxy.required=this.required),m.queueUpdate(()=>this.classList.toggle("required",this.required)),this.validate()}get elementInternals(){if(!Vo)return null;let t=Ho.get(this);return t||(t=this.attachInternals(),Ho.set(this,t)),t}connectedCallback(){super.connectedCallback(),this.addEventListener("keypress",this._keypressHandler),this.value||(this.value=this.initialValue,this.dirtyValue=!1),this.elementInternals||(this.attachProxy(),this.form&&this.form.addEventListener("reset",this.formResetCallback))}disconnectedCallback(){super.disconnectedCallback(),this.proxyEventsToBlock.forEach(t=>this.proxy.removeEventListener(t,this.stopPropagation)),!this.elementInternals&&this.form&&this.form.removeEventListener("reset",this.formResetCallback)}checkValidity(){return this.elementInternals?this.elementInternals.checkValidity():this.proxy.checkValidity()}reportValidity(){return this.elementInternals?this.elementInternals.reportValidity():this.proxy.reportValidity()}setValidity(t,o,r){this.elementInternals?this.elementInternals.setValidity(t,o,r):typeof o=="string"&&this.proxy.setCustomValidity(o)}formDisabledCallback(t){this.disabled=t}formResetCallback(){this.value=this.initialValue,this.dirtyValue=!1}attachProxy(){var t;this.proxyInitialized||(this.proxyInitialized=!0,this.proxy.style.display="none",this.proxyEventsToBlock.forEach(o=>this.proxy.addEventListener(o,this.stopPropagation)),this.proxy.disabled=this.disabled,this.proxy.required=this.required,typeof this.name=="string"&&(this.proxy.name=this.name),typeof this.value=="string"&&(this.proxy.value=this.value),this.proxy.setAttribute("slot",Lo),this.proxySlot=document.createElement("slot"),this.proxySlot.setAttribute("name",Lo)),(t=this.shadowRoot)===null||t===void 0||t.appendChild(this.proxySlot),this.appendChild(this.proxy)}detachProxy(){var t;this.removeChild(this.proxy),(t=this.shadowRoot)===null||t===void 0||t.removeChild(this.proxySlot)}validate(t){this.proxy instanceof HTMLElement&&this.setValidity(this.proxy.validity,this.proxy.validationMessage,t)}setFormValue(t,o){this.elementInternals&&this.elementInternals.setFormValue(t,o||t)}_keypressHandler(t){switch(t.key){case Le:if(this.form instanceof HTMLFormElement){let o=this.form.querySelector("[type=submit]");o?.click()}break}}stopPropagation(t){t.stopPropagation()}};return h({mode:"boolean"})(e.prototype,"disabled"),h({mode:"fromView",attribute:"value"})(e.prototype,"initialValue"),h({attribute:"current-value"})(e.prototype,"currentValue"),h(e.prototype,"name"),h({mode:"boolean"})(e.prototype,"required"),f(e.prototype,"value"),e}function jo(i){class e extends Te(i){}class t extends e{constructor(...r){super(r),this.dirtyChecked=!1,this.checkedAttribute=!1,this.checked=!1,this.dirtyChecked=!1}checkedAttributeChanged(){this.defaultChecked=this.checkedAttribute}defaultCheckedChanged(){this.dirtyChecked||(this.checked=this.defaultChecked,this.dirtyChecked=!1)}checkedChanged(r,n){this.dirtyChecked||(this.dirtyChecked=!0),this.currentChecked=this.checked,this.updateForm(),this.proxy instanceof HTMLInputElement&&(this.proxy.checked=this.checked),r!==void 0&&this.$emit("change"),this.validate()}currentCheckedChanged(r,n){this.checked=this.currentChecked}updateForm(){let r=this.checked?this.value:null;this.setFormValue(r,r)}connectedCallback(){super.connectedCallback(),this.updateForm()}formResetCallback(){super.formResetCallback(),this.checked=!!this.checkedAttribute,this.dirtyChecked=!1}}return h({attribute:"checked",mode:"boolean"})(t.prototype,"checkedAttribute"),h({attribute:"current-checked",converter:Kt})(t.prototype,"currentChecked"),f(t.prototype,"defaultChecked"),f(t.prototype,"checked"),t}var pi=class extends S{},Tt=class extends Te(pi){constructor(){super(...arguments),this.proxy=document.createElement("input")}};var V=class extends Tt{constructor(){super(...arguments),this.handleClick=e=>{var t;this.disabled&&((t=this.defaultSlottedContent)===null||t===void 0?void 0:t.length)<=1&&e.stopPropagation()},this.handleSubmission=()=>{if(!this.form)return;let e=this.proxy.isConnected;e||this.attachProxy(),typeof this.form.requestSubmit=="function"?this.form.requestSubmit(this.proxy):this.proxy.click(),e||this.detachProxy()},this.handleFormReset=()=>{var e;(e=this.form)===null||e===void 0||e.reset()},this.handleUnsupportedDelegatesFocus=()=>{var e;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(!((e=this.$fastController.definition.shadowOptions)===null||e===void 0)&&e.delegatesFocus)&&(this.focus=()=>{this.control.focus()})}}formactionChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formAction=this.formaction)}formenctypeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formEnctype=this.formenctype)}formmethodChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formMethod=this.formmethod)}formnovalidateChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formNoValidate=this.formnovalidate)}formtargetChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formTarget=this.formtarget)}typeChanged(e,t){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type),t==="submit"&&this.addEventListener("click",this.handleSubmission),e==="submit"&&this.removeEventListener("click",this.handleSubmission),t==="reset"&&this.addEventListener("click",this.handleFormReset),e==="reset"&&this.removeEventListener("click",this.handleFormReset)}validate(){super.validate(this.control)}connectedCallback(){var e;super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.handleUnsupportedDelegatesFocus();let t=Array.from((e=this.control)===null||e===void 0?void 0:e.children);t&&t.forEach(o=>{o.addEventListener("click",this.handleClick)})}disconnectedCallback(){var e;super.disconnectedCallback();let t=Array.from((e=this.control)===null||e===void 0?void 0:e.children);t&&t.forEach(o=>{o.removeEventListener("click",this.handleClick)})}};l([h({mode:"boolean"})],V.prototype,"autofocus",void 0);l([h({attribute:"form"})],V.prototype,"formId",void 0);l([h],V.prototype,"formaction",void 0);l([h],V.prototype,"formenctype",void 0);l([h],V.prototype,"formmethod",void 0);l([h({mode:"boolean"})],V.prototype,"formnovalidate",void 0);l([h],V.prototype,"formtarget",void 0);l([h],V.prototype,"type",void 0);l([f],V.prototype,"defaultSlottedContent",void 0);var He=class{};l([h({attribute:"aria-expanded"})],He.prototype,"ariaExpanded",void 0);l([h({attribute:"aria-pressed"})],He.prototype,"ariaPressed",void 0);E(He,y);E(V,z,He);var zo=(i,e)=>k`
86
86
  <template
87
87
  role="checkbox"
88
- aria-checked="${e=>e.checked}"
89
- aria-required="${e=>e.required}"
90
- aria-disabled="${e=>e.disabled}"
91
- aria-readonly="${e=>e.readOnly}"
92
- tabindex="${e=>e.disabled?null:0}"
93
- @keypress="${(e,i)=>e.keypressHandler(i.event)}"
94
- @click="${(e,i)=>e.clickHandler(i.event)}"
95
- class="${e=>e.readOnly?"readonly":""} ${e=>e.checked?"checked":""} ${e=>e.indeterminate?"indeterminate":""}"
88
+ aria-checked="${t=>t.checked}"
89
+ aria-required="${t=>t.required}"
90
+ aria-disabled="${t=>t.disabled}"
91
+ aria-readonly="${t=>t.readOnly}"
92
+ tabindex="${t=>t.disabled?null:0}"
93
+ @keypress="${(t,o)=>t.keypressHandler(o.event)}"
94
+ @click="${(t,o)=>t.clickHandler(o.event)}"
95
+ class="${t=>t.readOnly?"readonly":""} ${t=>t.checked?"checked":""} ${t=>t.indeterminate?"indeterminate":""}"
96
96
  >
97
97
  <div part="control" class="control">
98
98
  <slot name="checked-indicator">
99
- ${t.checkedIndicator||""}
99
+ ${e.checkedIndicator||""}
100
100
  </slot>
101
101
  <slot name="indeterminate-indicator">
102
- ${t.indeterminateIndicator||""}
102
+ ${e.indeterminateIndicator||""}
103
103
  </slot>
104
104
  </div>
105
105
  <label
106
106
  part="label"
107
- class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"
107
+ class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"
108
108
  >
109
109
  <slot ${H("defaultSlottedNodes")}></slot>
110
110
  </label>
111
111
  </template>
112
- `;var fr=class extends S{},Ie=class extends Hi(fr){constructor(){super(...arguments),this.proxy=document.createElement("input")}};var It=class extends Ie{constructor(){super(),this.initialValue="on",this.indeterminate=!1,this.keypressHandler=t=>{if(!this.readOnly)switch(t.key){case ht:this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked;break}},this.clickHandler=t=>{!this.disabled&&!this.readOnly&&(this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked)},this.proxy.setAttribute("type","checkbox")}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}};l([u({attribute:"readonly",mode:"boolean"})],It.prototype,"readOnly",void 0);l([f],It.prototype,"defaultSlottedNodes",void 0);l([f],It.prototype,"indeterminate",void 0);function mr(r){return Ai(r)&&(r.getAttribute("role")==="option"||r instanceof HTMLOptionElement)}var q=class extends S{constructor(t,e,i,o){super(),this.defaultSelected=!1,this.dirtySelected=!1,this.selected=this.defaultSelected,this.dirtyValue=!1,t&&(this.textContent=t),e&&(this.initialValue=e),i&&(this.defaultSelected=i),o&&(this.selected=o),this.proxy=new Option(`${this.textContent}`,this.initialValue,this.defaultSelected,this.selected),this.proxy.disabled=this.disabled}checkedChanged(t,e){if(typeof e=="boolean"){this.ariaChecked=e?"true":"false";return}this.ariaChecked=null}contentChanged(t,e){this.proxy instanceof HTMLOptionElement&&(this.proxy.textContent=this.textContent),this.$emit("contentchange",null,{bubbles:!0})}defaultSelectedChanged(){this.dirtySelected||(this.selected=this.defaultSelected,this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.defaultSelected))}disabledChanged(t,e){this.ariaDisabled=this.disabled?"true":"false",this.proxy instanceof HTMLOptionElement&&(this.proxy.disabled=this.disabled)}selectedAttributeChanged(){this.defaultSelected=this.selectedAttribute,this.proxy instanceof HTMLOptionElement&&(this.proxy.defaultSelected=this.defaultSelected)}selectedChanged(){this.ariaSelected=this.selected?"true":"false",this.dirtySelected||(this.dirtySelected=!0),this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.selected)}initialValueChanged(t,e){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}get label(){var t;return(t=this.value)!==null&&t!==void 0?t:this.text}get text(){var t,e;return(e=(t=this.textContent)===null||t===void 0?void 0:t.replace(/\s+/g," ").trim())!==null&&e!==void 0?e:""}set value(t){let e=`${t??""}`;this._value=e,this.dirtyValue=!0,this.proxy instanceof HTMLOptionElement&&(this.proxy.value=e),b.notify(this,"value")}get value(){var t;return b.track(this,"value"),(t=this._value)!==null&&t!==void 0?t:this.text}get form(){return this.proxy?this.proxy.form:null}};l([f],q.prototype,"checked",void 0);l([f],q.prototype,"content",void 0);l([f],q.prototype,"defaultSelected",void 0);l([u({mode:"boolean"})],q.prototype,"disabled",void 0);l([u({attribute:"selected",mode:"boolean"})],q.prototype,"selectedAttribute",void 0);l([f],q.prototype,"selected",void 0);l([u({attribute:"value",mode:"fromView"})],q.prototype,"initialValue",void 0);var pt=class{};l([f],pt.prototype,"ariaChecked",void 0);l([f],pt.prototype,"ariaPosInSet",void 0);l([f],pt.prototype,"ariaSelected",void 0);l([f],pt.prototype,"ariaSetSize",void 0);A(pt,v);A(q,z,pt);var R=class r extends S{constructor(){super(...arguments),this._options=[],this.selectedIndex=-1,this.selectedOptions=[],this.shouldSkipFocus=!1,this.typeaheadBuffer="",this.typeaheadExpired=!0,this.typeaheadTimeout=-1}get firstSelectedOption(){var t;return(t=this.selectedOptions[0])!==null&&t!==void 0?t:null}get hasSelectableOptions(){return this.options.length>0&&!this.options.every(t=>t.disabled)}get length(){var t,e;return(e=(t=this.options)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0}get options(){return b.track(this,"options"),this._options}set options(t){this._options=t,b.notify(this,"options")}get typeAheadExpired(){return this.typeaheadExpired}set typeAheadExpired(t){this.typeaheadExpired=t}clickHandler(t){let e=t.target.closest("option,[role=option]");if(e&&!e.disabled)return this.selectedIndex=this.options.indexOf(e),!0}focusAndScrollOptionIntoView(t=this.firstSelectedOption){this.contains(document.activeElement)&&t!==null&&(t.focus(),requestAnimationFrame(()=>{t.scrollIntoView({block:"nearest"})}))}focusinHandler(t){!this.shouldSkipFocus&&t.target===t.currentTarget&&(this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}getTypeaheadMatches(){let t=this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&"),e=new RegExp(`^${t}`,"gi");return this.options.filter(i=>i.text.trim().match(e))}getSelectableIndex(t=this.selectedIndex,e){let i=t>e?-1:t<e?1:0,o=t+i,n=null;switch(i){case-1:{n=this.options.reduceRight((s,a,d)=>!s&&!a.disabled&&d<o?a:s,n);break}case 1:{n=this.options.reduce((s,a,d)=>!s&&!a.disabled&&d>o?a:s,n);break}}return this.options.indexOf(n)}handleChange(t,e){switch(e){case"selected":{r.slottedOptionFilter(t)&&(this.selectedIndex=this.options.indexOf(t)),this.setSelectedOptions();break}}}handleTypeAhead(t){this.typeaheadTimeout&&window.clearTimeout(this.typeaheadTimeout),this.typeaheadTimeout=window.setTimeout(()=>this.typeaheadExpired=!0,r.TYPE_AHEAD_TIMEOUT_MS),!(t.length>1)&&(this.typeaheadBuffer=`${this.typeaheadExpired?"":this.typeaheadBuffer}${t}`)}keydownHandler(t){if(this.disabled)return!0;this.shouldSkipFocus=!1;let e=t.key;switch(e){case dt:{t.shiftKey||(t.preventDefault(),this.selectFirstOption());break}case lt:{t.shiftKey||(t.preventDefault(),this.selectNextOption());break}case ct:{t.shiftKey||(t.preventDefault(),this.selectPreviousOption());break}case ut:{t.preventDefault(),this.selectLastOption();break}case Vt:return this.focusAndScrollOptionIntoView(),!0;case Lt:case Nt:return!0;case ht:if(this.typeaheadExpired)return!0;default:return e.length===1&&this.handleTypeAhead(`${e}`),!0}}mousedownHandler(t){return this.shouldSkipFocus=!this.contains(document.activeElement),!0}multipleChanged(t,e){this.ariaMultiSelectable=e?"true":null}selectedIndexChanged(t,e){var i;if(!this.hasSelectableOptions){this.selectedIndex=-1;return}if(!((i=this.options[this.selectedIndex])===null||i===void 0)&&i.disabled&&typeof t=="number"){let o=this.getSelectableIndex(t,e),n=o>-1?o:t;this.selectedIndex=n,e===n&&this.selectedIndexChanged(e,n);return}this.setSelectedOptions()}selectedOptionsChanged(t,e){var i;let o=e.filter(r.slottedOptionFilter);(i=this.options)===null||i===void 0||i.forEach(n=>{let s=b.getNotifier(n);s.unsubscribe(this,"selected"),n.selected=o.includes(n),s.subscribe(this,"selected")})}selectFirstOption(){var t,e;this.disabled||(this.selectedIndex=(e=(t=this.options)===null||t===void 0?void 0:t.findIndex(i=>!i.disabled))!==null&&e!==void 0?e:-1)}selectLastOption(){this.disabled||(this.selectedIndex=Oi(this.options,t=>!t.disabled))}selectNextOption(){!this.disabled&&this.selectedIndex<this.options.length-1&&(this.selectedIndex+=1)}selectPreviousOption(){!this.disabled&&this.selectedIndex>0&&(this.selectedIndex=this.selectedIndex-1)}setDefaultSelectedOption(){var t,e;this.selectedIndex=(e=(t=this.options)===null||t===void 0?void 0:t.findIndex(i=>i.defaultSelected))!==null&&e!==void 0?e:-1}setSelectedOptions(){var t,e,i;!((t=this.options)===null||t===void 0)&&t.length&&(this.selectedOptions=[this.options[this.selectedIndex]],this.ariaActiveDescendant=(i=(e=this.firstSelectedOption)===null||e===void 0?void 0:e.id)!==null&&i!==void 0?i:"",this.focusAndScrollOptionIntoView())}slottedOptionsChanged(t,e){this.options=e.reduce((o,n)=>(mr(n)&&o.push(n),o),[]);let i=`${this.options.length}`;this.options.forEach((o,n)=>{o.id||(o.id=$t("option-")),o.ariaPosInSet=`${n+1}`,o.ariaSetSize=i}),this.$fastController.isConnected&&(this.setSelectedOptions(),this.setDefaultSelectedOption())}typeaheadBufferChanged(t,e){if(this.$fastController.isConnected){let i=this.getTypeaheadMatches();if(i.length){let o=this.options.indexOf(i[0]);o>-1&&(this.selectedIndex=o)}this.typeaheadExpired=!1}}};R.slottedOptionFilter=r=>mr(r)&&!r.hidden;R.TYPE_AHEAD_TIMEOUT_MS=1e3;l([u({mode:"boolean"})],R.prototype,"disabled",void 0);l([f],R.prototype,"selectedIndex",void 0);l([f],R.prototype,"selectedOptions",void 0);l([f],R.prototype,"slottedOptions",void 0);l([f],R.prototype,"typeaheadBuffer",void 0);var tt=class{};l([f],tt.prototype,"ariaActiveDescendant",void 0);l([f],tt.prototype,"ariaDisabled",void 0);l([f],tt.prototype,"ariaExpanded",void 0);l([f],tt.prototype,"ariaMultiSelectable",void 0);A(tt,v);A(R,tt);var Kt={above:"above",below:"below"};function te(r){let t=r.parentElement;if(t)return t;{let e=r.getRootNode();if(e.host instanceof HTMLElement)return e.host}return null}function zi(r,t){let e=t;for(;e!==null;){if(e===r)return!0;e=te(e)}return!1}var et=document.createElement("div");function sn(r){return r instanceof at}var ee=class{setProperty(t,e){m.queueUpdate(()=>this.target.setProperty(t,e))}removeProperty(t){m.queueUpdate(()=>this.target.removeProperty(t))}},gr=class extends ee{constructor(t){super();let e=new CSSStyleSheet;e[fe]=!0,this.target=e.cssRules[e.insertRule(":host{}")].style,t.$fastController.addStyles(C.create([e]))}},yr=class extends ee{constructor(){super();let t=new CSSStyleSheet;this.target=t.cssRules[t.insertRule(":root{}")].style,document.adoptedStyleSheets=[...document.adoptedStyleSheets,t]}},vr=class extends ee{constructor(){super(),this.style=document.createElement("style"),document.head.appendChild(this.style);let{sheet:t}=this.style;if(t){let e=t.insertRule(":root{}",t.cssRules.length);this.target=t.cssRules[e].style}}},Oe=class{constructor(t){this.store=new Map,this.target=null;let e=t.$fastController;this.style=document.createElement("style"),e.addStyles(this.style),b.getNotifier(e).subscribe(this,"isConnected"),this.handleChange(e,"isConnected")}targetChanged(){if(this.target!==null)for(let[t,e]of this.store.entries())this.target.setProperty(t,e)}setProperty(t,e){this.store.set(t,e),m.queueUpdate(()=>{this.target!==null&&this.target.setProperty(t,e)})}removeProperty(t){this.store.delete(t),m.queueUpdate(()=>{this.target!==null&&this.target.removeProperty(t)})}handleChange(t,e){let{sheet:i}=this.style;if(i){let o=i.insertRule(":host{}",i.cssRules.length);this.target=i.cssRules[o].style}else this.target=null}};l([f],Oe.prototype,"target",void 0);var xr=class{constructor(t){this.target=t.style}setProperty(t,e){m.queueUpdate(()=>this.target.setProperty(t,e))}removeProperty(t){m.queueUpdate(()=>this.target.removeProperty(t))}},ft=class r{setProperty(t,e){r.properties[t]=e;for(let i of r.roots.values())Ot.getOrCreate(r.normalizeRoot(i)).setProperty(t,e)}removeProperty(t){delete r.properties[t];for(let e of r.roots.values())Ot.getOrCreate(r.normalizeRoot(e)).removeProperty(t)}static registerRoot(t){let{roots:e}=r;if(!e.has(t)){e.add(t);let i=Ot.getOrCreate(this.normalizeRoot(t));for(let o in r.properties)i.setProperty(o,r.properties[o])}}static unregisterRoot(t){let{roots:e}=r;if(e.has(t)){e.delete(t);let i=Ot.getOrCreate(r.normalizeRoot(t));for(let o in r.properties)i.removeProperty(o)}}static normalizeRoot(t){return t===et?document:t}};ft.roots=new Set;ft.properties={};var br=new WeakMap,an=m.supportsAdoptedStyleSheets?gr:Oe,Ot=Object.freeze({getOrCreate(r){if(br.has(r))return br.get(r);let t;return r===et?t=new ft:r instanceof Document?t=m.supportsAdoptedStyleSheets?new yr:new vr:sn(r)?t=new an(r):t=new xr(r),br.set(r,t),t}});var Q=class r extends kt{constructor(t){super(),this.subscribers=new WeakMap,this._appliedTo=new Set,this.name=t.name,t.cssCustomPropertyName!==null&&(this.cssCustomProperty=`--${t.cssCustomPropertyName}`,this.cssVar=`var(${this.cssCustomProperty})`),this.id=r.uniqueId(),r.tokensById.set(this.id,this)}get appliedTo(){return[...this._appliedTo]}static from(t){return new r({name:typeof t=="string"?t:t.name,cssCustomPropertyName:typeof t=="string"?t:t.cssCustomPropertyName===void 0?t.name:t.cssCustomPropertyName})}static isCSSDesignToken(t){return typeof t.cssCustomProperty=="string"}static isDerivedDesignTokenValue(t){return typeof t=="function"}static getTokenById(t){return r.tokensById.get(t)}getOrCreateSubscriberSet(t=this){return this.subscribers.get(t)||this.subscribers.set(t,new Set)&&this.subscribers.get(t)}createCSS(){return this.cssVar||""}getValueFor(t){let e=N.getOrCreate(t).get(this);if(e!==void 0)return e;throw new Error(`Value could not be retrieved for token named "${this.name}". Ensure the value is set for ${t} or an ancestor of ${t}.`)}setValueFor(t,e){return this._appliedTo.add(t),e instanceof r&&(e=this.alias(e)),N.getOrCreate(t).set(this,e),this}deleteValueFor(t){return this._appliedTo.delete(t),N.existsFor(t)&&N.getOrCreate(t).delete(this),this}withDefault(t){return this.setValueFor(et,t),this}subscribe(t,e){let i=this.getOrCreateSubscriberSet(e);e&&!N.existsFor(e)&&N.getOrCreate(e),i.has(t)||i.add(t)}unsubscribe(t,e){let i=this.subscribers.get(e||this);i&&i.has(t)&&i.delete(t)}notify(t){let e=Object.freeze({token:this,target:t});this.subscribers.has(this)&&this.subscribers.get(this).forEach(i=>i.handleChange(e)),this.subscribers.has(t)&&this.subscribers.get(t).forEach(i=>i.handleChange(e))}alias(t){return e=>t.getValueFor(e)}};Q.uniqueId=(()=>{let r=0;return()=>(r++,r.toString(16))})();Q.tokensById=new Map;var wr=class{startReflection(t,e){t.subscribe(this,e),this.handleChange({token:t,target:e})}stopReflection(t,e){t.unsubscribe(this,e),this.remove(t,e)}handleChange(t){let{token:e,target:i}=t;this.add(e,i)}add(t,e){Ot.getOrCreate(e).setProperty(t.cssCustomProperty,this.resolveCSSValue(N.getOrCreate(e).get(t)))}remove(t,e){Ot.getOrCreate(e).removeProperty(t.cssCustomProperty)}resolveCSSValue(t){return t&&typeof t.createCSS=="function"?t.createCSS():t}},kr=class{constructor(t,e,i){this.source=t,this.token=e,this.node=i,this.dependencies=new Set,this.observer=b.binding(t,this,!1),this.observer.handleChange=this.observer.call,this.handleChange()}disconnect(){this.observer.disconnect()}handleChange(){try{this.node.store.set(this.token,this.observer.observe(this.node.target,st))}catch(t){console.error(t)}}},Sr=class{constructor(){this.values=new Map}set(t,e){this.values.get(t)!==e&&(this.values.set(t,e),b.getNotifier(this).notify(t.id))}get(t){return b.track(this,t.id),this.values.get(t)}delete(t){this.values.delete(t),b.getNotifier(this).notify(t.id)}all(){return this.values.entries()}},re=new WeakMap,ie=new WeakMap,N=class r{constructor(t){this.target=t,this.store=new Sr,this.children=[],this.assignedValues=new Map,this.reflecting=new Set,this.bindingObservers=new Map,this.tokenValueChangeHandler={handleChange:(e,i)=>{let o=Q.getTokenById(i);o&&(o.notify(this.target),this.updateCSSTokenReflection(e,o))}},re.set(t,this),b.getNotifier(this.store).subscribe(this.tokenValueChangeHandler),t instanceof at?t.$fastController.addBehaviors([this]):t.isConnected&&this.bind()}static getOrCreate(t){return re.get(t)||new r(t)}static existsFor(t){return re.has(t)}static findParent(t){if(et!==t.target){let e=te(t.target);for(;e!==null;){if(re.has(e))return re.get(e);e=te(e)}return r.getOrCreate(et)}return null}static findClosestAssignedNode(t,e){let i=e;do{if(i.has(t))return i;i=i.parent?i.parent:i.target!==et?r.getOrCreate(et):null}while(i!==null);return null}get parent(){return ie.get(this)||null}updateCSSTokenReflection(t,e){if(Q.isCSSDesignToken(e)){let i=this.parent,o=this.isReflecting(e);if(i){let n=i.get(e),s=t.get(e);n!==s&&!o?this.reflectToCSS(e):n===s&&o&&this.stopReflectToCSS(e)}else o||this.reflectToCSS(e)}}has(t){return this.assignedValues.has(t)}get(t){let e=this.store.get(t);if(e!==void 0)return e;let i=this.getRaw(t);if(i!==void 0)return this.hydrate(t,i),this.get(t)}getRaw(t){var e;return this.assignedValues.has(t)?this.assignedValues.get(t):(e=r.findClosestAssignedNode(t,this))===null||e===void 0?void 0:e.getRaw(t)}set(t,e){Q.isDerivedDesignTokenValue(this.assignedValues.get(t))&&this.tearDownBindingObserver(t),this.assignedValues.set(t,e),Q.isDerivedDesignTokenValue(e)?this.setupBindingObserver(t,e):this.store.set(t,e)}delete(t){this.assignedValues.delete(t),this.tearDownBindingObserver(t);let e=this.getRaw(t);e?this.hydrate(t,e):this.store.delete(t)}bind(){let t=r.findParent(this);t&&t.appendChild(this);for(let e of this.assignedValues.keys())e.notify(this.target)}unbind(){this.parent&&ie.get(this).removeChild(this);for(let t of this.bindingObservers.keys())this.tearDownBindingObserver(t)}appendChild(t){t.parent&&ie.get(t).removeChild(t);let e=this.children.filter(i=>t.contains(i));ie.set(t,this),this.children.push(t),e.forEach(i=>t.appendChild(i)),b.getNotifier(this.store).subscribe(t);for(let[i,o]of this.store.all())t.hydrate(i,this.bindingObservers.has(i)?this.getRaw(i):o),t.updateCSSTokenReflection(t.store,i)}removeChild(t){let e=this.children.indexOf(t);if(e!==-1&&this.children.splice(e,1),b.getNotifier(this.store).unsubscribe(t),t.parent!==this)return!1;let i=ie.delete(t);for(let[o]of this.store.all())t.hydrate(o,t.getRaw(o)),t.updateCSSTokenReflection(t.store,o);return i}contains(t){return zi(this.target,t.target)}reflectToCSS(t){this.isReflecting(t)||(this.reflecting.add(t),r.cssCustomPropertyReflector.startReflection(t,this.target))}stopReflectToCSS(t){this.isReflecting(t)&&(this.reflecting.delete(t),r.cssCustomPropertyReflector.stopReflection(t,this.target))}isReflecting(t){return this.reflecting.has(t)}handleChange(t,e){let i=Q.getTokenById(e);i&&(this.hydrate(i,this.getRaw(i)),this.updateCSSTokenReflection(this.store,i))}hydrate(t,e){if(!this.has(t)){let i=this.bindingObservers.get(t);Q.isDerivedDesignTokenValue(e)?i?i.source!==e&&(this.tearDownBindingObserver(t),this.setupBindingObserver(t,e)):this.setupBindingObserver(t,e):(i&&this.tearDownBindingObserver(t),this.store.set(t,e))}}setupBindingObserver(t,e){let i=new kr(e,t,this);return this.bindingObservers.set(t,i),i}tearDownBindingObserver(t){return this.bindingObservers.has(t)?(this.bindingObservers.get(t).disconnect(),this.bindingObservers.delete(t),!0):!1}};N.cssCustomPropertyReflector=new wr;l([f],N.prototype,"children",void 0);function ln(r){return Q.from(r)}var oe=Object.freeze({create:ln,notifyConnection(r){return!r.isConnected||!N.existsFor(r)?!1:(N.getOrCreate(r).bind(),!0)},notifyDisconnection(r){return r.isConnected||!N.existsFor(r)?!1:(N.getOrCreate(r).unbind(),!0)},registerRoot(r=et){ft.registerRoot(r)},unregisterRoot(r=et){ft.unregisterRoot(r)}});var Cr=Object.freeze({definitionCallbackOnly:null,ignoreDuplicate:Symbol()}),$r=new Map,Ee=new Map,jt=null,ne=x.createInterface(r=>r.cachedCallback(t=>(jt===null&&(jt=new Ae(null,t)),jt))),Ir=Object.freeze({tagFor(r){return Ee.get(r)},responsibleFor(r){let t=r.$$designSystem$$;return t||x.findResponsibleContainer(r).get(ne)},getOrCreate(r){if(!r)return jt===null&&(jt=x.getOrCreateDOMContainer().get(ne)),jt;let t=r.$$designSystem$$;if(t)return t;let e=x.getOrCreateDOMContainer(r);if(e.has(ne,!1))return e.get(ne);{let i=new Ae(r,e);return e.register(St.instance(ne,i)),i}}});function cn(r,t,e){return typeof r=="string"?{name:r,type:t,callback:e}:r}var Ae=class{constructor(t,e){this.owner=t,this.container=e,this.designTokensInitialized=!1,this.prefix="fast",this.shadowRootMode=void 0,this.disambiguate=()=>Cr.definitionCallbackOnly,t!==null&&(t.$$designSystem$$=this)}withPrefix(t){return this.prefix=t,this}withShadowRootMode(t){return this.shadowRootMode=t,this}withElementDisambiguation(t){return this.disambiguate=t,this}withDesignTokenRoot(t){return this.designTokenRoot=t,this}register(...t){let e=this.container,i=[],o=this.disambiguate,n=this.shadowRootMode,s={elementPrefix:this.prefix,tryDefineElement(a,d,c){let h=cn(a,d,c),{name:y,callback:T,baseClass:j}=h,{type:E}=h,G=y,ce=$r.get(G),He=!0;for(;ce;){let Jr=o(G,E,ce);switch(Jr){case Cr.ignoreDuplicate:return;case Cr.definitionCallbackOnly:He=!1,ce=void 0;break;default:G=Jr,ce=$r.get(G);break}}He&&((Ee.has(E)||E===S)&&(E=class extends E{}),$r.set(G,E),Ee.set(E,G),j&&Ee.set(j,G)),i.push(new Tr(e,G,E,n,T,He))}};this.designTokensInitialized||(this.designTokensInitialized=!0,this.designTokenRoot!==null&&oe.registerRoot(this.designTokenRoot)),e.registerWithContext(s,...t);for(let a of i)a.callback(a),a.willDefine&&a.definition!==null&&a.definition.define();return this}},Tr=class{constructor(t,e,i,o,n,s){this.container=t,this.name=e,this.type=i,this.shadowRootMode=o,this.callback=n,this.willDefine=s,this.definition=null}definePresentation(t){$e.define(this.name,t,this.container)}defineElement(t){this.definition=new J(this.type,Object.assign(Object.assign({},t),{name:this.name}))}tagFor(t){return Ir.tagFor(t)}};var qi=(r,t)=>k`
112
+ `;var fi=class extends S{},It=class extends jo(fi){constructor(){super(...arguments),this.proxy=document.createElement("input")}};var Ie=class extends It{constructor(){super(),this.initialValue="on",this.indeterminate=!1,this.keypressHandler=e=>{if(!this.readOnly)switch(e.key){case ue:this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked;break}},this.clickHandler=e=>{!this.disabled&&!this.readOnly&&(this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked)},this.proxy.setAttribute("type","checkbox")}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}};l([h({attribute:"readonly",mode:"boolean"})],Ie.prototype,"readOnly",void 0);l([f],Ie.prototype,"defaultSlottedNodes",void 0);l([f],Ie.prototype,"indeterminate",void 0);function mi(i){return Po(i)&&(i.getAttribute("role")==="option"||i instanceof HTMLOptionElement)}var q=class extends S{constructor(e,t,o,r){super(),this.defaultSelected=!1,this.dirtySelected=!1,this.selected=this.defaultSelected,this.dirtyValue=!1,e&&(this.textContent=e),t&&(this.initialValue=t),o&&(this.defaultSelected=o),r&&(this.selected=r),this.proxy=new Option(`${this.textContent}`,this.initialValue,this.defaultSelected,this.selected),this.proxy.disabled=this.disabled}checkedChanged(e,t){if(typeof t=="boolean"){this.ariaChecked=t?"true":"false";return}this.ariaChecked=null}contentChanged(e,t){this.proxy instanceof HTMLOptionElement&&(this.proxy.textContent=this.textContent),this.$emit("contentchange",null,{bubbles:!0})}defaultSelectedChanged(){this.dirtySelected||(this.selected=this.defaultSelected,this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.defaultSelected))}disabledChanged(e,t){this.ariaDisabled=this.disabled?"true":"false",this.proxy instanceof HTMLOptionElement&&(this.proxy.disabled=this.disabled)}selectedAttributeChanged(){this.defaultSelected=this.selectedAttribute,this.proxy instanceof HTMLOptionElement&&(this.proxy.defaultSelected=this.defaultSelected)}selectedChanged(){this.ariaSelected=this.selected?"true":"false",this.dirtySelected||(this.dirtySelected=!0),this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.selected)}initialValueChanged(e,t){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}get label(){var e;return(e=this.value)!==null&&e!==void 0?e:this.text}get text(){var e,t;return(t=(e=this.textContent)===null||e===void 0?void 0:e.replace(/\s+/g," ").trim())!==null&&t!==void 0?t:""}set value(e){let t=`${e??""}`;this._value=t,this.dirtyValue=!0,this.proxy instanceof HTMLOptionElement&&(this.proxy.value=t),b.notify(this,"value")}get value(){var e;return b.track(this,"value"),(e=this._value)!==null&&e!==void 0?e:this.text}get form(){return this.proxy?this.proxy.form:null}};l([f],q.prototype,"checked",void 0);l([f],q.prototype,"content",void 0);l([f],q.prototype,"defaultSelected",void 0);l([h({mode:"boolean"})],q.prototype,"disabled",void 0);l([h({attribute:"selected",mode:"boolean"})],q.prototype,"selectedAttribute",void 0);l([f],q.prototype,"selected",void 0);l([h({attribute:"value",mode:"fromView"})],q.prototype,"initialValue",void 0);var pe=class{};l([f],pe.prototype,"ariaChecked",void 0);l([f],pe.prototype,"ariaPosInSet",void 0);l([f],pe.prototype,"ariaSelected",void 0);l([f],pe.prototype,"ariaSetSize",void 0);E(pe,y);E(q,z,pe);var R=class i extends S{constructor(){super(...arguments),this._options=[],this.selectedIndex=-1,this.selectedOptions=[],this.shouldSkipFocus=!1,this.typeaheadBuffer="",this.typeaheadExpired=!0,this.typeaheadTimeout=-1}get firstSelectedOption(){var e;return(e=this.selectedOptions[0])!==null&&e!==void 0?e:null}get hasSelectableOptions(){return this.options.length>0&&!this.options.every(e=>e.disabled)}get length(){var e,t;return(t=(e=this.options)===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0}get options(){return b.track(this,"options"),this._options}set options(e){this._options=e,b.notify(this,"options")}get typeAheadExpired(){return this.typeaheadExpired}set typeAheadExpired(e){this.typeaheadExpired=e}clickHandler(e){let t=e.target.closest("option,[role=option]");if(t&&!t.disabled)return this.selectedIndex=this.options.indexOf(t),!0}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(document.activeElement)&&e!==null&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:"nearest"})}))}focusinHandler(e){!this.shouldSkipFocus&&e.target===e.currentTarget&&(this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}getTypeaheadMatches(){let e=this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&"),t=new RegExp(`^${e}`,"gi");return this.options.filter(o=>o.text.trim().match(t))}getSelectableIndex(e=this.selectedIndex,t){let o=e>t?-1:e<t?1:0,r=e+o,n=null;switch(o){case-1:{n=this.options.reduceRight((s,a,d)=>!s&&!a.disabled&&d<r?a:s,n);break}case 1:{n=this.options.reduce((s,a,d)=>!s&&!a.disabled&&d>r?a:s,n);break}}return this.options.indexOf(n)}handleChange(e,t){switch(t){case"selected":{i.slottedOptionFilter(e)&&(this.selectedIndex=this.options.indexOf(e)),this.setSelectedOptions();break}}}handleTypeAhead(e){this.typeaheadTimeout&&window.clearTimeout(this.typeaheadTimeout),this.typeaheadTimeout=window.setTimeout(()=>this.typeaheadExpired=!0,i.TYPE_AHEAD_TIMEOUT_MS),!(e.length>1)&&(this.typeaheadBuffer=`${this.typeaheadExpired?"":this.typeaheadBuffer}${e}`)}keydownHandler(e){if(this.disabled)return!0;this.shouldSkipFocus=!1;let t=e.key;switch(t){case de:{e.shiftKey||(e.preventDefault(),this.selectFirstOption());break}case le:{e.shiftKey||(e.preventDefault(),this.selectNextOption());break}case ce:{e.shiftKey||(e.preventDefault(),this.selectPreviousOption());break}case he:{e.preventDefault(),this.selectLastOption();break}case Ve:return this.focusAndScrollOptionIntoView(),!0;case Le:case Ne:return!0;case ue:if(this.typeaheadExpired)return!0;default:return t.length===1&&this.handleTypeAhead(`${t}`),!0}}mousedownHandler(e){return this.shouldSkipFocus=!this.contains(document.activeElement),!0}multipleChanged(e,t){this.ariaMultiSelectable=t?"true":null}selectedIndexChanged(e,t){var o;if(!this.hasSelectableOptions){this.selectedIndex=-1;return}if(!((o=this.options[this.selectedIndex])===null||o===void 0)&&o.disabled&&typeof e=="number"){let r=this.getSelectableIndex(e,t),n=r>-1?r:e;this.selectedIndex=n,t===n&&this.selectedIndexChanged(t,n);return}this.setSelectedOptions()}selectedOptionsChanged(e,t){var o;let r=t.filter(i.slottedOptionFilter);(o=this.options)===null||o===void 0||o.forEach(n=>{let s=b.getNotifier(n);s.unsubscribe(this,"selected"),n.selected=r.includes(n),s.subscribe(this,"selected")})}selectFirstOption(){var e,t;this.disabled||(this.selectedIndex=(t=(e=this.options)===null||e===void 0?void 0:e.findIndex(o=>!o.disabled))!==null&&t!==void 0?t:-1)}selectLastOption(){this.disabled||(this.selectedIndex=Ao(this.options,e=>!e.disabled))}selectNextOption(){!this.disabled&&this.selectedIndex<this.options.length-1&&(this.selectedIndex+=1)}selectPreviousOption(){!this.disabled&&this.selectedIndex>0&&(this.selectedIndex=this.selectedIndex-1)}setDefaultSelectedOption(){var e,t;this.selectedIndex=(t=(e=this.options)===null||e===void 0?void 0:e.findIndex(o=>o.defaultSelected))!==null&&t!==void 0?t:-1}setSelectedOptions(){var e,t,o;!((e=this.options)===null||e===void 0)&&e.length&&(this.selectedOptions=[this.options[this.selectedIndex]],this.ariaActiveDescendant=(o=(t=this.firstSelectedOption)===null||t===void 0?void 0:t.id)!==null&&o!==void 0?o:"",this.focusAndScrollOptionIntoView())}slottedOptionsChanged(e,t){this.options=t.reduce((r,n)=>(mi(n)&&r.push(n),r),[]);let o=`${this.options.length}`;this.options.forEach((r,n)=>{r.id||(r.id=$e("option-")),r.ariaPosInSet=`${n+1}`,r.ariaSetSize=o}),this.$fastController.isConnected&&(this.setSelectedOptions(),this.setDefaultSelectedOption())}typeaheadBufferChanged(e,t){if(this.$fastController.isConnected){let o=this.getTypeaheadMatches();if(o.length){let r=this.options.indexOf(o[0]);r>-1&&(this.selectedIndex=r)}this.typeaheadExpired=!1}}};R.slottedOptionFilter=i=>mi(i)&&!i.hidden;R.TYPE_AHEAD_TIMEOUT_MS=1e3;l([h({mode:"boolean"})],R.prototype,"disabled",void 0);l([f],R.prototype,"selectedIndex",void 0);l([f],R.prototype,"selectedOptions",void 0);l([f],R.prototype,"slottedOptions",void 0);l([f],R.prototype,"typeaheadBuffer",void 0);var ee=class{};l([f],ee.prototype,"ariaActiveDescendant",void 0);l([f],ee.prototype,"ariaDisabled",void 0);l([f],ee.prototype,"ariaExpanded",void 0);l([f],ee.prototype,"ariaMultiSelectable",void 0);E(ee,y);E(R,ee);var Ke={above:"above",below:"below"};function et(i){let e=i.parentElement;if(e)return e;{let t=i.getRootNode();if(t.host instanceof HTMLElement)return t.host}return null}function qo(i,e){let t=e;for(;t!==null;){if(t===i)return!0;t=et(t)}return!1}var te=document.createElement("div");function nn(i){return i instanceof ae}var tt=class{setProperty(e,t){m.queueUpdate(()=>this.target.setProperty(e,t))}removeProperty(e){m.queueUpdate(()=>this.target.removeProperty(e))}},gi=class extends tt{constructor(e){super();let t=new CSSStyleSheet;t[ft]=!0,this.target=t.cssRules[t.insertRule(":host{}")].style,e.$fastController.addStyles(C.create([t]))}},vi=class extends tt{constructor(){super();let e=new CSSStyleSheet;this.target=e.cssRules[e.insertRule(":root{}")].style,document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}},yi=class extends tt{constructor(){super(),this.style=document.createElement("style"),document.head.appendChild(this.style);let{sheet:e}=this.style;if(e){let t=e.insertRule(":root{}",e.cssRules.length);this.target=e.cssRules[t].style}}},Ot=class{constructor(e){this.store=new Map,this.target=null;let t=e.$fastController;this.style=document.createElement("style"),t.addStyles(this.style),b.getNotifier(t).subscribe(this,"isConnected"),this.handleChange(t,"isConnected")}targetChanged(){if(this.target!==null)for(let[e,t]of this.store.entries())this.target.setProperty(e,t)}setProperty(e,t){this.store.set(e,t),m.queueUpdate(()=>{this.target!==null&&this.target.setProperty(e,t)})}removeProperty(e){this.store.delete(e),m.queueUpdate(()=>{this.target!==null&&this.target.removeProperty(e)})}handleChange(e,t){let{sheet:o}=this.style;if(o){let r=o.insertRule(":host{}",o.cssRules.length);this.target=o.cssRules[r].style}else this.target=null}};l([f],Ot.prototype,"target",void 0);var xi=class{constructor(e){this.target=e.style}setProperty(e,t){m.queueUpdate(()=>this.target.setProperty(e,t))}removeProperty(e){m.queueUpdate(()=>this.target.removeProperty(e))}},fe=class i{setProperty(e,t){i.properties[e]=t;for(let o of i.roots.values())Oe.getOrCreate(i.normalizeRoot(o)).setProperty(e,t)}removeProperty(e){delete i.properties[e];for(let t of i.roots.values())Oe.getOrCreate(i.normalizeRoot(t)).removeProperty(e)}static registerRoot(e){let{roots:t}=i;if(!t.has(e)){t.add(e);let o=Oe.getOrCreate(this.normalizeRoot(e));for(let r in i.properties)o.setProperty(r,i.properties[r])}}static unregisterRoot(e){let{roots:t}=i;if(t.has(e)){t.delete(e);let o=Oe.getOrCreate(i.normalizeRoot(e));for(let r in i.properties)o.removeProperty(r)}}static normalizeRoot(e){return e===te?document:e}};fe.roots=new Set;fe.properties={};var bi=new WeakMap,sn=m.supportsAdoptedStyleSheets?gi:Ot,Oe=Object.freeze({getOrCreate(i){if(bi.has(i))return bi.get(i);let e;return i===te?e=new fe:i instanceof Document?e=m.supportsAdoptedStyleSheets?new vi:new yi:nn(i)?e=new sn(i):e=new xi(i),bi.set(i,e),e}});var Q=class i extends ke{constructor(e){super(),this.subscribers=new WeakMap,this._appliedTo=new Set,this.name=e.name,e.cssCustomPropertyName!==null&&(this.cssCustomProperty=`--${e.cssCustomPropertyName}`,this.cssVar=`var(${this.cssCustomProperty})`),this.id=i.uniqueId(),i.tokensById.set(this.id,this)}get appliedTo(){return[...this._appliedTo]}static from(e){return new i({name:typeof e=="string"?e:e.name,cssCustomPropertyName:typeof e=="string"?e:e.cssCustomPropertyName===void 0?e.name:e.cssCustomPropertyName})}static isCSSDesignToken(e){return typeof e.cssCustomProperty=="string"}static isDerivedDesignTokenValue(e){return typeof e=="function"}static getTokenById(e){return i.tokensById.get(e)}getOrCreateSubscriberSet(e=this){return this.subscribers.get(e)||this.subscribers.set(e,new Set)&&this.subscribers.get(e)}createCSS(){return this.cssVar||""}getValueFor(e){let t=N.getOrCreate(e).get(this);if(t!==void 0)return t;throw new Error(`Value could not be retrieved for token named "${this.name}". Ensure the value is set for ${e} or an ancestor of ${e}.`)}setValueFor(e,t){return this._appliedTo.add(e),t instanceof i&&(t=this.alias(t)),N.getOrCreate(e).set(this,t),this}deleteValueFor(e){return this._appliedTo.delete(e),N.existsFor(e)&&N.getOrCreate(e).delete(this),this}withDefault(e){return this.setValueFor(te,e),this}subscribe(e,t){let o=this.getOrCreateSubscriberSet(t);t&&!N.existsFor(t)&&N.getOrCreate(t),o.has(e)||o.add(e)}unsubscribe(e,t){let o=this.subscribers.get(t||this);o&&o.has(e)&&o.delete(e)}notify(e){let t=Object.freeze({token:this,target:e});this.subscribers.has(this)&&this.subscribers.get(this).forEach(o=>o.handleChange(t)),this.subscribers.has(e)&&this.subscribers.get(e).forEach(o=>o.handleChange(t))}alias(e){return t=>e.getValueFor(t)}};Q.uniqueId=(()=>{let i=0;return()=>(i++,i.toString(16))})();Q.tokensById=new Map;var wi=class{startReflection(e,t){e.subscribe(this,t),this.handleChange({token:e,target:t})}stopReflection(e,t){e.unsubscribe(this,t),this.remove(e,t)}handleChange(e){let{token:t,target:o}=e;this.add(t,o)}add(e,t){Oe.getOrCreate(t).setProperty(e.cssCustomProperty,this.resolveCSSValue(N.getOrCreate(t).get(e)))}remove(e,t){Oe.getOrCreate(t).removeProperty(e.cssCustomProperty)}resolveCSSValue(e){return e&&typeof e.createCSS=="function"?e.createCSS():e}},ki=class{constructor(e,t,o){this.source=e,this.token=t,this.node=o,this.dependencies=new Set,this.observer=b.binding(e,this,!1),this.observer.handleChange=this.observer.call,this.handleChange()}disconnect(){this.observer.disconnect()}handleChange(){try{this.node.store.set(this.token,this.observer.observe(this.node.target,se))}catch(e){console.error(e)}}},Si=class{constructor(){this.values=new Map}set(e,t){this.values.get(e)!==t&&(this.values.set(e,t),b.getNotifier(this).notify(e.id))}get(e){return b.track(this,e.id),this.values.get(e)}delete(e){this.values.delete(e),b.getNotifier(this).notify(e.id)}all(){return this.values.entries()}},it=new WeakMap,ot=new WeakMap,N=class i{constructor(e){this.target=e,this.store=new Si,this.children=[],this.assignedValues=new Map,this.reflecting=new Set,this.bindingObservers=new Map,this.tokenValueChangeHandler={handleChange:(t,o)=>{let r=Q.getTokenById(o);r&&(r.notify(this.target),this.updateCSSTokenReflection(t,r))}},it.set(e,this),b.getNotifier(this.store).subscribe(this.tokenValueChangeHandler),e instanceof ae?e.$fastController.addBehaviors([this]):e.isConnected&&this.bind()}static getOrCreate(e){return it.get(e)||new i(e)}static existsFor(e){return it.has(e)}static findParent(e){if(te!==e.target){let t=et(e.target);for(;t!==null;){if(it.has(t))return it.get(t);t=et(t)}return i.getOrCreate(te)}return null}static findClosestAssignedNode(e,t){let o=t;do{if(o.has(e))return o;o=o.parent?o.parent:o.target!==te?i.getOrCreate(te):null}while(o!==null);return null}get parent(){return ot.get(this)||null}updateCSSTokenReflection(e,t){if(Q.isCSSDesignToken(t)){let o=this.parent,r=this.isReflecting(t);if(o){let n=o.get(t),s=e.get(t);n!==s&&!r?this.reflectToCSS(t):n===s&&r&&this.stopReflectToCSS(t)}else r||this.reflectToCSS(t)}}has(e){return this.assignedValues.has(e)}get(e){let t=this.store.get(e);if(t!==void 0)return t;let o=this.getRaw(e);if(o!==void 0)return this.hydrate(e,o),this.get(e)}getRaw(e){var t;return this.assignedValues.has(e)?this.assignedValues.get(e):(t=i.findClosestAssignedNode(e,this))===null||t===void 0?void 0:t.getRaw(e)}set(e,t){Q.isDerivedDesignTokenValue(this.assignedValues.get(e))&&this.tearDownBindingObserver(e),this.assignedValues.set(e,t),Q.isDerivedDesignTokenValue(t)?this.setupBindingObserver(e,t):this.store.set(e,t)}delete(e){this.assignedValues.delete(e),this.tearDownBindingObserver(e);let t=this.getRaw(e);t?this.hydrate(e,t):this.store.delete(e)}bind(){let e=i.findParent(this);e&&e.appendChild(this);for(let t of this.assignedValues.keys())t.notify(this.target)}unbind(){this.parent&&ot.get(this).removeChild(this);for(let e of this.bindingObservers.keys())this.tearDownBindingObserver(e)}appendChild(e){e.parent&&ot.get(e).removeChild(e);let t=this.children.filter(o=>e.contains(o));ot.set(e,this),this.children.push(e),t.forEach(o=>e.appendChild(o)),b.getNotifier(this.store).subscribe(e);for(let[o,r]of this.store.all())e.hydrate(o,this.bindingObservers.has(o)?this.getRaw(o):r),e.updateCSSTokenReflection(e.store,o)}removeChild(e){let t=this.children.indexOf(e);if(t!==-1&&this.children.splice(t,1),b.getNotifier(this.store).unsubscribe(e),e.parent!==this)return!1;let o=ot.delete(e);for(let[r]of this.store.all())e.hydrate(r,e.getRaw(r)),e.updateCSSTokenReflection(e.store,r);return o}contains(e){return qo(this.target,e.target)}reflectToCSS(e){this.isReflecting(e)||(this.reflecting.add(e),i.cssCustomPropertyReflector.startReflection(e,this.target))}stopReflectToCSS(e){this.isReflecting(e)&&(this.reflecting.delete(e),i.cssCustomPropertyReflector.stopReflection(e,this.target))}isReflecting(e){return this.reflecting.has(e)}handleChange(e,t){let o=Q.getTokenById(t);o&&(this.hydrate(o,this.getRaw(o)),this.updateCSSTokenReflection(this.store,o))}hydrate(e,t){if(!this.has(e)){let o=this.bindingObservers.get(e);Q.isDerivedDesignTokenValue(t)?o?o.source!==t&&(this.tearDownBindingObserver(e),this.setupBindingObserver(e,t)):this.setupBindingObserver(e,t):(o&&this.tearDownBindingObserver(e),this.store.set(e,t))}}setupBindingObserver(e,t){let o=new ki(t,e,this);return this.bindingObservers.set(e,o),o}tearDownBindingObserver(e){return this.bindingObservers.has(e)?(this.bindingObservers.get(e).disconnect(),this.bindingObservers.delete(e),!0):!1}};N.cssCustomPropertyReflector=new wi;l([f],N.prototype,"children",void 0);function an(i){return Q.from(i)}var rt=Object.freeze({create:an,notifyConnection(i){return!i.isConnected||!N.existsFor(i)?!1:(N.getOrCreate(i).bind(),!0)},notifyDisconnection(i){return i.isConnected||!N.existsFor(i)?!1:(N.getOrCreate(i).unbind(),!0)},registerRoot(i=te){fe.registerRoot(i)},unregisterRoot(i=te){fe.unregisterRoot(i)}});var Ci=Object.freeze({definitionCallbackOnly:null,ignoreDuplicate:Symbol()}),$i=new Map,At=new Map,je=null,nt=x.createInterface(i=>i.cachedCallback(e=>(je===null&&(je=new Et(null,e)),je))),Ii=Object.freeze({tagFor(i){return At.get(i)},responsibleFor(i){let e=i.$$designSystem$$;return e||x.findResponsibleContainer(i).get(nt)},getOrCreate(i){if(!i)return je===null&&(je=x.getOrCreateDOMContainer().get(nt)),je;let e=i.$$designSystem$$;if(e)return e;let t=x.getOrCreateDOMContainer(i);if(t.has(nt,!1))return t.get(nt);{let o=new Et(i,t);return t.register(Se.instance(nt,o)),o}}});function ln(i,e,t){return typeof i=="string"?{name:i,type:e,callback:t}:i}var Et=class{constructor(e,t){this.owner=e,this.container=t,this.designTokensInitialized=!1,this.prefix="fast",this.shadowRootMode=void 0,this.disambiguate=()=>Ci.definitionCallbackOnly,e!==null&&(e.$$designSystem$$=this)}withPrefix(e){return this.prefix=e,this}withShadowRootMode(e){return this.shadowRootMode=e,this}withElementDisambiguation(e){return this.disambiguate=e,this}withDesignTokenRoot(e){return this.designTokenRoot=e,this}register(...e){let t=this.container,o=[],r=this.disambiguate,n=this.shadowRootMode,s={elementPrefix:this.prefix,tryDefineElement(a,d,c){let u=ln(a,d,c),{name:v,callback:T,baseClass:j}=u,{type:A}=u,G=v,ct=$i.get(G),Ht=!0;for(;ct;){let Ji=r(G,A,ct);switch(Ji){case Ci.ignoreDuplicate:return;case Ci.definitionCallbackOnly:Ht=!1,ct=void 0;break;default:G=Ji,ct=$i.get(G);break}}Ht&&((At.has(A)||A===S)&&(A=class extends A{}),$i.set(G,A),At.set(A,G),j&&At.set(j,G)),o.push(new Ti(t,G,A,n,T,Ht))}};this.designTokensInitialized||(this.designTokensInitialized=!0,this.designTokenRoot!==null&&rt.registerRoot(this.designTokenRoot)),t.registerWithContext(s,...e);for(let a of o)a.callback(a),a.willDefine&&a.definition!==null&&a.definition.define();return this}},Ti=class{constructor(e,t,o,r,n,s){this.container=e,this.name=t,this.type=o,this.shadowRootMode=r,this.callback=n,this.willDefine=s,this.definition=null}definePresentation(e){$t.define(this.name,e,this.container)}defineElement(e){this.definition=new J(this.type,Object.assign(Object.assign({},e),{name:this.name}))}tagFor(e){return Ii.tagFor(e)}};var Uo=(i,e)=>k`
113
113
  <template
114
- aria-checked="${e=>e.ariaChecked}"
115
- aria-disabled="${e=>e.ariaDisabled}"
116
- aria-posinset="${e=>e.ariaPosInSet}"
117
- aria-selected="${e=>e.ariaSelected}"
118
- aria-setsize="${e=>e.ariaSetSize}"
119
- class="${e=>[e.checked&&"checked",e.selected&&"selected",e.disabled&&"disabled"].filter(Boolean).join(" ")}"
114
+ aria-checked="${t=>t.ariaChecked}"
115
+ aria-disabled="${t=>t.ariaDisabled}"
116
+ aria-posinset="${t=>t.ariaPosInSet}"
117
+ aria-selected="${t=>t.ariaSelected}"
118
+ aria-setsize="${t=>t.ariaSetSize}"
119
+ class="${t=>[t.checked&&"checked",t.selected&&"selected",t.disabled&&"disabled"].filter(Boolean).join(" ")}"
120
120
  role="option"
121
121
  >
122
- ${K(r,t)}
122
+ ${K(i,e)}
123
123
  <span class="content" part="content">
124
124
  <slot ${H("content")}></slot>
125
125
  </span>
126
- ${Z(r,t)}
126
+ ${Z(i,e)}
127
127
  </template>
128
- `;var Et=class extends R{constructor(){super(...arguments),this.activeIndex=-1,this.rangeStartIndex=-1}get activeOption(){return this.options[this.activeIndex]}get checkedOptions(){var t;return(t=this.options)===null||t===void 0?void 0:t.filter(e=>e.checked)}get firstSelectedOptionIndex(){return this.options.indexOf(this.firstSelectedOption)}activeIndexChanged(t,e){var i,o;this.ariaActiveDescendant=(o=(i=this.options[e])===null||i===void 0?void 0:i.id)!==null&&o!==void 0?o:"",this.focusAndScrollOptionIntoView()}checkActiveIndex(){if(!this.multiple)return;let t=this.activeOption;t&&(t.checked=!0)}checkFirstOption(t=!1){t?(this.rangeStartIndex===-1&&(this.rangeStartIndex=this.activeIndex+1),this.options.forEach((e,i)=>{e.checked=Zt(i,this.rangeStartIndex)})):this.uncheckAllOptions(),this.activeIndex=0,this.checkActiveIndex()}checkLastOption(t=!1){t?(this.rangeStartIndex===-1&&(this.rangeStartIndex=this.activeIndex),this.options.forEach((e,i)=>{e.checked=Zt(i,this.rangeStartIndex,this.options.length)})):this.uncheckAllOptions(),this.activeIndex=this.options.length-1,this.checkActiveIndex()}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this.focusoutHandler)}disconnectedCallback(){this.removeEventListener("focusout",this.focusoutHandler),super.disconnectedCallback()}checkNextOption(t=!1){t?(this.rangeStartIndex===-1&&(this.rangeStartIndex=this.activeIndex),this.options.forEach((e,i)=>{e.checked=Zt(i,this.rangeStartIndex,this.activeIndex+1)})):this.uncheckAllOptions(),this.activeIndex+=this.activeIndex<this.options.length-1?1:0,this.checkActiveIndex()}checkPreviousOption(t=!1){t?(this.rangeStartIndex===-1&&(this.rangeStartIndex=this.activeIndex),this.checkedOptions.length===1&&(this.rangeStartIndex+=1),this.options.forEach((e,i)=>{e.checked=Zt(i,this.activeIndex,this.rangeStartIndex)})):this.uncheckAllOptions(),this.activeIndex-=this.activeIndex>0?1:0,this.checkActiveIndex()}clickHandler(t){var e;if(!this.multiple)return super.clickHandler(t);let i=(e=t.target)===null||e===void 0?void 0:e.closest("[role=option]");if(!(!i||i.disabled))return this.uncheckAllOptions(),this.activeIndex=this.options.indexOf(i),this.checkActiveIndex(),this.toggleSelectedForAllCheckedOptions(),!0}focusAndScrollOptionIntoView(){super.focusAndScrollOptionIntoView(this.activeOption)}focusinHandler(t){if(!this.multiple)return super.focusinHandler(t);!this.shouldSkipFocus&&t.target===t.currentTarget&&(this.uncheckAllOptions(),this.activeIndex===-1&&(this.activeIndex=this.firstSelectedOptionIndex!==-1?this.firstSelectedOptionIndex:0),this.checkActiveIndex(),this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}focusoutHandler(t){this.multiple&&this.uncheckAllOptions()}keydownHandler(t){if(!this.multiple)return super.keydownHandler(t);if(this.disabled)return!0;let{key:e,shiftKey:i}=t;switch(this.shouldSkipFocus=!1,e){case dt:{this.checkFirstOption(i);return}case lt:{this.checkNextOption(i);return}case ct:{this.checkPreviousOption(i);return}case ut:{this.checkLastOption(i);return}case Vt:return this.focusAndScrollOptionIntoView(),!0;case Nt:return this.uncheckAllOptions(),this.checkActiveIndex(),!0;case ht:if(t.preventDefault(),this.typeAheadExpired){this.toggleSelectedForAllCheckedOptions();return}default:return e.length===1&&this.handleTypeAhead(`${e}`),!0}}mousedownHandler(t){if(t.offsetX>=0&&t.offsetX<=this.scrollWidth)return super.mousedownHandler(t)}multipleChanged(t,e){var i;this.ariaMultiSelectable=e?"true":null,(i=this.options)===null||i===void 0||i.forEach(o=>{o.checked=e?!1:void 0}),this.setSelectedOptions()}setSelectedOptions(){if(!this.multiple){super.setSelectedOptions();return}this.$fastController.isConnected&&this.options&&(this.selectedOptions=this.options.filter(t=>t.selected),this.focusAndScrollOptionIntoView())}sizeChanged(t,e){var i;let o=Math.max(0,parseInt((i=e?.toFixed())!==null&&i!==void 0?i:"",10));o!==e&&m.queueUpdate(()=>{this.size=o})}toggleSelectedForAllCheckedOptions(){let t=this.checkedOptions.filter(i=>!i.disabled),e=!t.every(i=>i.selected);t.forEach(i=>i.selected=e),this.selectedIndex=this.options.indexOf(t[t.length-1]),this.setSelectedOptions()}typeaheadBufferChanged(t,e){if(!this.multiple){super.typeaheadBufferChanged(t,e);return}if(this.$fastController.isConnected){let i=this.getTypeaheadMatches(),o=this.options.indexOf(i[0]);o>-1&&(this.activeIndex=o,this.uncheckAllOptions(),this.checkActiveIndex()),this.typeAheadExpired=!1}}uncheckAllOptions(t=!1){this.options.forEach(e=>e.checked=this.multiple?!1:void 0),t||(this.rangeStartIndex=-1)}};l([f],Et.prototype,"activeIndex",void 0);l([u({mode:"boolean"})],Et.prototype,"multiple",void 0);l([u({converter:Bt})],Et.prototype,"size",void 0);var Or=class extends S{},Pe=class extends Tt(Or){constructor(){super(...arguments),this.proxy=document.createElement("input")}};var Er={email:"email",password:"password",tel:"tel",text:"text",url:"url"};var F=class extends Pe{constructor(){super(...arguments),this.type=Er.text}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}autofocusChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autofocus=this.autofocus,this.validate())}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}typeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type,this.validate())}listChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.setAttribute("list",this.list),this.validate())}maxlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.maxLength=this.maxlength,this.validate())}minlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.minLength=this.minlength,this.validate())}patternChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.pattern=this.pattern,this.validate())}sizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.size=this.size)}spellcheckChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.spellcheck=this.spellcheck)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.validate(),this.autofocus&&m.queueUpdate(()=>{this.focus()})}select(){this.control.select(),this.$emit("select")}handleTextInput(){this.value=this.control.value}handleChange(){this.$emit("change")}validate(){super.validate(this.control)}};l([u({attribute:"readonly",mode:"boolean"})],F.prototype,"readOnly",void 0);l([u({mode:"boolean"})],F.prototype,"autofocus",void 0);l([u],F.prototype,"placeholder",void 0);l([u],F.prototype,"type",void 0);l([u],F.prototype,"list",void 0);l([u({converter:Bt})],F.prototype,"maxlength",void 0);l([u({converter:Bt})],F.prototype,"minlength",void 0);l([u],F.prototype,"pattern",void 0);l([u({converter:Bt})],F.prototype,"size",void 0);l([u({mode:"boolean"})],F.prototype,"spellcheck",void 0);l([f],F.prototype,"defaultSlottedNodes",void 0);var _e=class{};A(_e,v);A(F,z,_e);function Ui(r,t,e){return r.nodeType!==Node.TEXT_NODE?!0:typeof r.nodeValue=="string"&&!!r.nodeValue.trim().length}var Ar=class extends Et{},De=class extends Tt(Ar){constructor(){super(...arguments),this.proxy=document.createElement("select")}};var X=class extends De{constructor(){super(...arguments),this.open=!1,this.forcedPosition=!1,this.listboxId=$t("listbox-"),this.maxHeight=0}openChanged(t,e){if(this.collapsible){if(this.open){this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,m.queueUpdate(()=>this.focus());return}this.ariaControls="",this.ariaExpanded="false"}}get collapsible(){return!(this.multiple||typeof this.size=="number")}get value(){return b.track(this,"value"),this._value}set value(t){var e,i,o,n,s,a,d;let c=`${this._value}`;if(!((e=this._options)===null||e===void 0)&&e.length){let h=this._options.findIndex(j=>j.value===t),y=(o=(i=this._options[this.selectedIndex])===null||i===void 0?void 0:i.value)!==null&&o!==void 0?o:null,T=(s=(n=this._options[h])===null||n===void 0?void 0:n.value)!==null&&s!==void 0?s:null;(h===-1||y!==T)&&(t="",this.selectedIndex=h),t=(d=(a=this.firstSelectedOption)===null||a===void 0?void 0:a.value)!==null&&d!==void 0?d:t}c!==t&&(this._value=t,super.valueChanged(c,t),b.notify(this,"value"),this.updateDisplayValue())}updateValue(t){var e,i;this.$fastController.isConnected&&(this.value=(i=(e=this.firstSelectedOption)===null||e===void 0?void 0:e.value)!==null&&i!==void 0?i:""),t&&(this.$emit("input"),this.$emit("change",this,{bubbles:!0,composed:void 0}))}selectedIndexChanged(t,e){super.selectedIndexChanged(t,e),this.updateValue()}positionChanged(t,e){this.positionAttribute=e,this.setPositioning()}setPositioning(){let t=this.getBoundingClientRect(),i=window.innerHeight-t.bottom;this.position=this.forcedPosition?this.positionAttribute:t.top>i?Kt.above:Kt.below,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===Kt.above?~~t.top:~~i}get displayValue(){var t,e;return b.track(this,"displayValue"),(e=(t=this.firstSelectedOption)===null||t===void 0?void 0:t.text)!==null&&e!==void 0?e:""}disabledChanged(t,e){super.disabledChanged&&super.disabledChanged(t,e),this.ariaDisabled=this.disabled?"true":"false"}formResetCallback(){this.setProxyOptions(),super.setDefaultSelectedOption(),this.selectedIndex===-1&&(this.selectedIndex=0)}clickHandler(t){if(!this.disabled){if(this.open){let e=t.target.closest("option,[role=option]");if(e&&e.disabled)return}return super.clickHandler(t),this.open=this.collapsible&&!this.open,!this.open&&this.indexWhenOpened!==this.selectedIndex&&this.updateValue(!0),!0}}focusoutHandler(t){var e;if(super.focusoutHandler(t),!this.open)return!0;let i=t.relatedTarget;if(this.isSameNode(i)){this.focus();return}!((e=this.options)===null||e===void 0)&&e.includes(i)||(this.open=!1,this.indexWhenOpened!==this.selectedIndex&&this.updateValue(!0))}handleChange(t,e){super.handleChange(t,e),e==="value"&&this.updateValue()}slottedOptionsChanged(t,e){this.options.forEach(i=>{b.getNotifier(i).unsubscribe(this,"value")}),super.slottedOptionsChanged(t,e),this.options.forEach(i=>{b.getNotifier(i).subscribe(this,"value")}),this.setProxyOptions(),this.updateValue()}mousedownHandler(t){var e;return t.offsetX>=0&&t.offsetX<=((e=this.listbox)===null||e===void 0?void 0:e.scrollWidth)?super.mousedownHandler(t):this.collapsible}multipleChanged(t,e){super.multipleChanged(t,e),this.proxy&&(this.proxy.multiple=e)}selectedOptionsChanged(t,e){var i;super.selectedOptionsChanged(t,e),(i=this.options)===null||i===void 0||i.forEach((o,n)=>{var s;let a=(s=this.proxy)===null||s===void 0?void 0:s.options.item(n);a&&(a.selected=o.selected)})}setDefaultSelectedOption(){var t;let e=(t=this.options)!==null&&t!==void 0?t:Array.from(this.children).filter(R.slottedOptionFilter),i=e?.findIndex(o=>o.hasAttribute("selected")||o.selected||o.value===this.value);if(i!==-1){this.selectedIndex=i;return}this.selectedIndex=0}setProxyOptions(){this.proxy instanceof HTMLSelectElement&&this.options&&(this.proxy.options.length=0,this.options.forEach(t=>{let e=t.proxy||(t instanceof HTMLOptionElement?t.cloneNode():null);e&&this.proxy.options.add(e)}))}keydownHandler(t){super.keydownHandler(t);let e=t.key||t.key.charCodeAt(0);switch(e){case ht:{t.preventDefault(),this.collapsible&&this.typeAheadExpired&&(this.open=!this.open);break}case dt:case ut:{t.preventDefault();break}case Lt:{t.preventDefault(),this.open=!this.open;break}case Nt:{this.collapsible&&this.open&&(t.preventDefault(),this.open=!1);break}case Vt:return this.collapsible&&this.open&&(t.preventDefault(),this.open=!1),!0}return!this.open&&this.indexWhenOpened!==this.selectedIndex&&(this.updateValue(!0),this.indexWhenOpened=this.selectedIndex),!(e===lt||e===ct)}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.addEventListener("contentchange",this.updateDisplayValue)}disconnectedCallback(){this.removeEventListener("contentchange",this.updateDisplayValue),super.disconnectedCallback()}sizeChanged(t,e){super.sizeChanged(t,e),this.proxy&&(this.proxy.size=e)}updateDisplayValue(){this.collapsible&&b.notify(this,"displayValue")}};l([u({attribute:"open",mode:"boolean"})],X.prototype,"open",void 0);l([ri],X.prototype,"collapsible",null);l([f],X.prototype,"control",void 0);l([u({attribute:"position"})],X.prototype,"positionAttribute",void 0);l([f],X.prototype,"position",void 0);l([f],X.prototype,"maxHeight",void 0);var se=class{};l([f],se.prototype,"ariaControls",void 0);A(se,tt);A(X,z,se);var Wi=(r,t)=>k`
128
+ `;var Ae=class extends R{constructor(){super(...arguments),this.activeIndex=-1,this.rangeStartIndex=-1}get activeOption(){return this.options[this.activeIndex]}get checkedOptions(){var e;return(e=this.options)===null||e===void 0?void 0:e.filter(t=>t.checked)}get firstSelectedOptionIndex(){return this.options.indexOf(this.firstSelectedOption)}activeIndexChanged(e,t){var o,r;this.ariaActiveDescendant=(r=(o=this.options[t])===null||o===void 0?void 0:o.id)!==null&&r!==void 0?r:"",this.focusAndScrollOptionIntoView()}checkActiveIndex(){if(!this.multiple)return;let e=this.activeOption;e&&(e.checked=!0)}checkFirstOption(e=!1){e?(this.rangeStartIndex===-1&&(this.rangeStartIndex=this.activeIndex+1),this.options.forEach((t,o)=>{t.checked=Ze(o,this.rangeStartIndex)})):this.uncheckAllOptions(),this.activeIndex=0,this.checkActiveIndex()}checkLastOption(e=!1){e?(this.rangeStartIndex===-1&&(this.rangeStartIndex=this.activeIndex),this.options.forEach((t,o)=>{t.checked=Ze(o,this.rangeStartIndex,this.options.length)})):this.uncheckAllOptions(),this.activeIndex=this.options.length-1,this.checkActiveIndex()}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this.focusoutHandler)}disconnectedCallback(){this.removeEventListener("focusout",this.focusoutHandler),super.disconnectedCallback()}checkNextOption(e=!1){e?(this.rangeStartIndex===-1&&(this.rangeStartIndex=this.activeIndex),this.options.forEach((t,o)=>{t.checked=Ze(o,this.rangeStartIndex,this.activeIndex+1)})):this.uncheckAllOptions(),this.activeIndex+=this.activeIndex<this.options.length-1?1:0,this.checkActiveIndex()}checkPreviousOption(e=!1){e?(this.rangeStartIndex===-1&&(this.rangeStartIndex=this.activeIndex),this.checkedOptions.length===1&&(this.rangeStartIndex+=1),this.options.forEach((t,o)=>{t.checked=Ze(o,this.activeIndex,this.rangeStartIndex)})):this.uncheckAllOptions(),this.activeIndex-=this.activeIndex>0?1:0,this.checkActiveIndex()}clickHandler(e){var t;if(!this.multiple)return super.clickHandler(e);let o=(t=e.target)===null||t===void 0?void 0:t.closest("[role=option]");if(!(!o||o.disabled))return this.uncheckAllOptions(),this.activeIndex=this.options.indexOf(o),this.checkActiveIndex(),this.toggleSelectedForAllCheckedOptions(),!0}focusAndScrollOptionIntoView(){super.focusAndScrollOptionIntoView(this.activeOption)}focusinHandler(e){if(!this.multiple)return super.focusinHandler(e);!this.shouldSkipFocus&&e.target===e.currentTarget&&(this.uncheckAllOptions(),this.activeIndex===-1&&(this.activeIndex=this.firstSelectedOptionIndex!==-1?this.firstSelectedOptionIndex:0),this.checkActiveIndex(),this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}focusoutHandler(e){this.multiple&&this.uncheckAllOptions()}keydownHandler(e){if(!this.multiple)return super.keydownHandler(e);if(this.disabled)return!0;let{key:t,shiftKey:o}=e;switch(this.shouldSkipFocus=!1,t){case de:{this.checkFirstOption(o);return}case le:{this.checkNextOption(o);return}case ce:{this.checkPreviousOption(o);return}case he:{this.checkLastOption(o);return}case Ve:return this.focusAndScrollOptionIntoView(),!0;case Ne:return this.uncheckAllOptions(),this.checkActiveIndex(),!0;case ue:if(e.preventDefault(),this.typeAheadExpired){this.toggleSelectedForAllCheckedOptions();return}default:return t.length===1&&this.handleTypeAhead(`${t}`),!0}}mousedownHandler(e){if(e.offsetX>=0&&e.offsetX<=this.scrollWidth)return super.mousedownHandler(e)}multipleChanged(e,t){var o;this.ariaMultiSelectable=t?"true":null,(o=this.options)===null||o===void 0||o.forEach(r=>{r.checked=t?!1:void 0}),this.setSelectedOptions()}setSelectedOptions(){if(!this.multiple){super.setSelectedOptions();return}this.$fastController.isConnected&&this.options&&(this.selectedOptions=this.options.filter(e=>e.selected),this.focusAndScrollOptionIntoView())}sizeChanged(e,t){var o;let r=Math.max(0,parseInt((o=t?.toFixed())!==null&&o!==void 0?o:"",10));r!==t&&m.queueUpdate(()=>{this.size=r})}toggleSelectedForAllCheckedOptions(){let e=this.checkedOptions.filter(o=>!o.disabled),t=!e.every(o=>o.selected);e.forEach(o=>o.selected=t),this.selectedIndex=this.options.indexOf(e[e.length-1]),this.setSelectedOptions()}typeaheadBufferChanged(e,t){if(!this.multiple){super.typeaheadBufferChanged(e,t);return}if(this.$fastController.isConnected){let o=this.getTypeaheadMatches(),r=this.options.indexOf(o[0]);r>-1&&(this.activeIndex=r,this.uncheckAllOptions(),this.checkActiveIndex()),this.typeAheadExpired=!1}}uncheckAllOptions(e=!1){this.options.forEach(t=>t.checked=this.multiple?!1:void 0),e||(this.rangeStartIndex=-1)}};l([f],Ae.prototype,"activeIndex",void 0);l([h({mode:"boolean"})],Ae.prototype,"multiple",void 0);l([h({converter:_e})],Ae.prototype,"size",void 0);var Oi=class extends S{},Pt=class extends Te(Oi){constructor(){super(...arguments),this.proxy=document.createElement("input")}};var Ai={email:"email",password:"password",tel:"tel",text:"text",url:"url"};var M=class extends Pt{constructor(){super(...arguments),this.type=Ai.text}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}autofocusChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autofocus=this.autofocus,this.validate())}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}typeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type,this.validate())}listChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.setAttribute("list",this.list),this.validate())}maxlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.maxLength=this.maxlength,this.validate())}minlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.minLength=this.minlength,this.validate())}patternChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.pattern=this.pattern,this.validate())}sizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.size=this.size)}spellcheckChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.spellcheck=this.spellcheck)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.validate(),this.autofocus&&m.queueUpdate(()=>{this.focus()})}select(){this.control.select(),this.$emit("select")}handleTextInput(){this.value=this.control.value}handleChange(){this.$emit("change")}validate(){super.validate(this.control)}};l([h({attribute:"readonly",mode:"boolean"})],M.prototype,"readOnly",void 0);l([h({mode:"boolean"})],M.prototype,"autofocus",void 0);l([h],M.prototype,"placeholder",void 0);l([h],M.prototype,"type",void 0);l([h],M.prototype,"list",void 0);l([h({converter:_e})],M.prototype,"maxlength",void 0);l([h({converter:_e})],M.prototype,"minlength",void 0);l([h],M.prototype,"pattern",void 0);l([h({converter:_e})],M.prototype,"size",void 0);l([h({mode:"boolean"})],M.prototype,"spellcheck",void 0);l([f],M.prototype,"defaultSlottedNodes",void 0);var Dt=class{};E(Dt,y);E(M,z,Dt);function Wo(i,e,t){return i.nodeType!==Node.TEXT_NODE?!0:typeof i.nodeValue=="string"&&!!i.nodeValue.trim().length}var Ei=class extends Ae{},Ft=class extends Te(Ei){constructor(){super(...arguments),this.proxy=document.createElement("select")}};var X=class extends Ft{constructor(){super(...arguments),this.open=!1,this.forcedPosition=!1,this.listboxId=$e("listbox-"),this.maxHeight=0}openChanged(e,t){if(this.collapsible){if(this.open){this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,m.queueUpdate(()=>this.focus());return}this.ariaControls="",this.ariaExpanded="false"}}get collapsible(){return!(this.multiple||typeof this.size=="number")}get value(){return b.track(this,"value"),this._value}set value(e){var t,o,r,n,s,a,d;let c=`${this._value}`;if(!((t=this._options)===null||t===void 0)&&t.length){let u=this._options.findIndex(j=>j.value===e),v=(r=(o=this._options[this.selectedIndex])===null||o===void 0?void 0:o.value)!==null&&r!==void 0?r:null,T=(s=(n=this._options[u])===null||n===void 0?void 0:n.value)!==null&&s!==void 0?s:null;(u===-1||v!==T)&&(e="",this.selectedIndex=u),e=(d=(a=this.firstSelectedOption)===null||a===void 0?void 0:a.value)!==null&&d!==void 0?d:e}c!==e&&(this._value=e,super.valueChanged(c,e),b.notify(this,"value"),this.updateDisplayValue())}updateValue(e){var t,o;this.$fastController.isConnected&&(this.value=(o=(t=this.firstSelectedOption)===null||t===void 0?void 0:t.value)!==null&&o!==void 0?o:""),e&&(this.$emit("input"),this.$emit("change",this,{bubbles:!0,composed:void 0}))}selectedIndexChanged(e,t){super.selectedIndexChanged(e,t),this.updateValue()}positionChanged(e,t){this.positionAttribute=t,this.setPositioning()}setPositioning(){let e=this.getBoundingClientRect(),o=window.innerHeight-e.bottom;this.position=this.forcedPosition?this.positionAttribute:e.top>o?Ke.above:Ke.below,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===Ke.above?~~e.top:~~o}get displayValue(){var e,t;return b.track(this,"displayValue"),(t=(e=this.firstSelectedOption)===null||e===void 0?void 0:e.text)!==null&&t!==void 0?t:""}disabledChanged(e,t){super.disabledChanged&&super.disabledChanged(e,t),this.ariaDisabled=this.disabled?"true":"false"}formResetCallback(){this.setProxyOptions(),super.setDefaultSelectedOption(),this.selectedIndex===-1&&(this.selectedIndex=0)}clickHandler(e){if(!this.disabled){if(this.open){let t=e.target.closest("option,[role=option]");if(t&&t.disabled)return}return super.clickHandler(e),this.open=this.collapsible&&!this.open,!this.open&&this.indexWhenOpened!==this.selectedIndex&&this.updateValue(!0),!0}}focusoutHandler(e){var t;if(super.focusoutHandler(e),!this.open)return!0;let o=e.relatedTarget;if(this.isSameNode(o)){this.focus();return}!((t=this.options)===null||t===void 0)&&t.includes(o)||(this.open=!1,this.indexWhenOpened!==this.selectedIndex&&this.updateValue(!0))}handleChange(e,t){super.handleChange(e,t),t==="value"&&this.updateValue()}slottedOptionsChanged(e,t){this.options.forEach(o=>{b.getNotifier(o).unsubscribe(this,"value")}),super.slottedOptionsChanged(e,t),this.options.forEach(o=>{b.getNotifier(o).subscribe(this,"value")}),this.setProxyOptions(),this.updateValue()}mousedownHandler(e){var t;return e.offsetX>=0&&e.offsetX<=((t=this.listbox)===null||t===void 0?void 0:t.scrollWidth)?super.mousedownHandler(e):this.collapsible}multipleChanged(e,t){super.multipleChanged(e,t),this.proxy&&(this.proxy.multiple=t)}selectedOptionsChanged(e,t){var o;super.selectedOptionsChanged(e,t),(o=this.options)===null||o===void 0||o.forEach((r,n)=>{var s;let a=(s=this.proxy)===null||s===void 0?void 0:s.options.item(n);a&&(a.selected=r.selected)})}setDefaultSelectedOption(){var e;let t=(e=this.options)!==null&&e!==void 0?e:Array.from(this.children).filter(R.slottedOptionFilter),o=t?.findIndex(r=>r.hasAttribute("selected")||r.selected||r.value===this.value);if(o!==-1){this.selectedIndex=o;return}this.selectedIndex=0}setProxyOptions(){this.proxy instanceof HTMLSelectElement&&this.options&&(this.proxy.options.length=0,this.options.forEach(e=>{let t=e.proxy||(e instanceof HTMLOptionElement?e.cloneNode():null);t&&this.proxy.options.add(t)}))}keydownHandler(e){super.keydownHandler(e);let t=e.key||e.key.charCodeAt(0);switch(t){case ue:{e.preventDefault(),this.collapsible&&this.typeAheadExpired&&(this.open=!this.open);break}case de:case he:{e.preventDefault();break}case Le:{e.preventDefault(),this.open=!this.open;break}case Ne:{this.collapsible&&this.open&&(e.preventDefault(),this.open=!1);break}case Ve:return this.collapsible&&this.open&&(e.preventDefault(),this.open=!1),!0}return!this.open&&this.indexWhenOpened!==this.selectedIndex&&(this.updateValue(!0),this.indexWhenOpened=this.selectedIndex),!(t===le||t===ce)}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.addEventListener("contentchange",this.updateDisplayValue)}disconnectedCallback(){this.removeEventListener("contentchange",this.updateDisplayValue),super.disconnectedCallback()}sizeChanged(e,t){super.sizeChanged(e,t),this.proxy&&(this.proxy.size=t)}updateDisplayValue(){this.collapsible&&b.notify(this,"displayValue")}};l([h({attribute:"open",mode:"boolean"})],X.prototype,"open",void 0);l([io],X.prototype,"collapsible",null);l([f],X.prototype,"control",void 0);l([h({attribute:"position"})],X.prototype,"positionAttribute",void 0);l([f],X.prototype,"position",void 0);l([f],X.prototype,"maxHeight",void 0);var st=class{};l([f],st.prototype,"ariaControls",void 0);E(st,ee);E(X,z,st);var Go=(i,e)=>k`
129
129
  <template
130
- class="${e=>[e.collapsible&&"collapsible",e.collapsible&&e.open&&"open",e.disabled&&"disabled",e.collapsible&&e.position].filter(Boolean).join(" ")}"
131
- aria-activedescendant="${e=>e.ariaActiveDescendant}"
132
- aria-controls="${e=>e.ariaControls}"
133
- aria-disabled="${e=>e.ariaDisabled}"
134
- aria-expanded="${e=>e.ariaExpanded}"
135
- aria-haspopup="${e=>e.collapsible?"listbox":null}"
136
- aria-multiselectable="${e=>e.ariaMultiSelectable}"
137
- ?open="${e=>e.open}"
130
+ class="${t=>[t.collapsible&&"collapsible",t.collapsible&&t.open&&"open",t.disabled&&"disabled",t.collapsible&&t.position].filter(Boolean).join(" ")}"
131
+ aria-activedescendant="${t=>t.ariaActiveDescendant}"
132
+ aria-controls="${t=>t.ariaControls}"
133
+ aria-disabled="${t=>t.ariaDisabled}"
134
+ aria-expanded="${t=>t.ariaExpanded}"
135
+ aria-haspopup="${t=>t.collapsible?"listbox":null}"
136
+ aria-multiselectable="${t=>t.ariaMultiSelectable}"
137
+ ?open="${t=>t.open}"
138
138
  role="combobox"
139
- tabindex="${e=>e.disabled?null:"0"}"
140
- @click="${(e,i)=>e.clickHandler(i.event)}"
141
- @focusin="${(e,i)=>e.focusinHandler(i.event)}"
142
- @focusout="${(e,i)=>e.focusoutHandler(i.event)}"
143
- @keydown="${(e,i)=>e.keydownHandler(i.event)}"
144
- @mousedown="${(e,i)=>e.mousedownHandler(i.event)}"
139
+ tabindex="${t=>t.disabled?null:"0"}"
140
+ @click="${(t,o)=>t.clickHandler(o.event)}"
141
+ @focusin="${(t,o)=>t.focusinHandler(o.event)}"
142
+ @focusout="${(t,o)=>t.focusoutHandler(o.event)}"
143
+ @keydown="${(t,o)=>t.keydownHandler(o.event)}"
144
+ @mousedown="${(t,o)=>t.mousedownHandler(o.event)}"
145
145
  >
146
- ${ge(e=>e.collapsible,k`
146
+ ${gt(t=>t.collapsible,k`
147
147
  <div
148
148
  class="control"
149
149
  part="control"
150
- ?disabled="${e=>e.disabled}"
150
+ ?disabled="${t=>t.disabled}"
151
151
  ${I("control")}
152
152
  >
153
- ${K(r,t)}
153
+ ${K(i,e)}
154
154
  <slot name="button-container">
155
155
  <div class="selected-value" part="selected-value">
156
- <slot name="selected-value">${e=>e.displayValue}</slot>
156
+ <slot name="selected-value">${t=>t.displayValue}</slot>
157
157
  </div>
158
158
  <div aria-hidden="true" class="indicator" part="indicator">
159
159
  <slot name="indicator">
160
- ${t.indicator||""}
160
+ ${e.indicator||""}
161
161
  </slot>
162
162
  </div>
163
163
  </slot>
164
- ${Z(r,t)}
164
+ ${Z(i,e)}
165
165
  </div>
166
166
  `)}
167
167
  <div
168
168
  class="listbox"
169
- id="${e=>e.listboxId}"
169
+ id="${t=>t.listboxId}"
170
170
  part="listbox"
171
171
  role="listbox"
172
- ?disabled="${e=>e.disabled}"
173
- ?hidden="${e=>e.collapsible?!e.open:!1}"
172
+ ?disabled="${t=>t.disabled}"
173
+ ?hidden="${t=>t.collapsible?!t.open:!1}"
174
174
  ${I("listbox")}
175
175
  >
176
176
  <slot
@@ -178,21 +178,21 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
178
178
  ></slot>
179
179
  </div>
180
180
  </template>
181
- `;var Gi=(r,t)=>k`
181
+ `;var Qo=(i,e)=>k`
182
182
  <template slot="tabpanel" role="tabpanel">
183
183
  <slot></slot>
184
184
  </template>
185
- `;var Re=class extends S{};var Qi=(r,t)=>k`
186
- <template slot="tab" role="tab" aria-disabled="${e=>e.disabled}">
185
+ `;var Rt=class extends S{};var Xo=(i,e)=>k`
186
+ <template slot="tab" role="tab" aria-disabled="${t=>t.disabled}">
187
187
  <slot></slot>
188
188
  </template>
189
- `;var ae=class extends S{};l([u({mode:"boolean"})],ae.prototype,"disabled",void 0);var Xi=(r,t)=>k`
190
- <template class="${e=>e.orientation}">
191
- ${K(r,t)}
189
+ `;var at=class extends S{};l([h({mode:"boolean"})],at.prototype,"disabled",void 0);var Yo=(i,e)=>k`
190
+ <template class="${t=>t.orientation}">
191
+ ${K(i,e)}
192
192
  <div class="tablist" part="tablist" role="tablist">
193
193
  <slot class="tab" name="tab" part="tab" ${H("tabs")}></slot>
194
194
 
195
- ${ge(e=>e.showActiveIndicator,k`
195
+ ${gt(t=>t.showActiveIndicator,k`
196
196
  <div
197
197
  ${I("activeIndicatorRef")}
198
198
  class="activeIndicator"
@@ -200,80 +200,80 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
200
200
  ></div>
201
201
  `)}
202
202
  </div>
203
- ${Z(r,t)}
203
+ ${Z(i,e)}
204
204
  <div class="tabpanel" part="tabpanel">
205
205
  <slot name="tabpanel" ${H("tabpanels")}></slot>
206
206
  </div>
207
207
  </template>
208
- `;var Fe={vertical:"vertical",horizontal:"horizontal"},U=class extends S{constructor(){super(...arguments),this.orientation=Fe.horizontal,this.activeindicator=!0,this.showActiveIndicator=!0,this.prevActiveTabIndex=0,this.activeTabIndex=0,this.ticking=!1,this.change=()=>{this.$emit("change",this.activetab)},this.isDisabledElement=t=>t.getAttribute("aria-disabled")==="true",this.isHiddenElement=t=>t.hasAttribute("hidden"),this.isFocusableElement=t=>!this.isDisabledElement(t)&&!this.isHiddenElement(t),this.setTabs=()=>{let t="gridColumn",e="gridRow",i=this.isHorizontal()?t:e;this.activeTabIndex=this.getActiveIndex(),this.showActiveIndicator=!1,this.tabs.forEach((o,n)=>{if(o.slot==="tab"){let s=this.activeTabIndex===n&&this.isFocusableElement(o);this.activeindicator&&this.isFocusableElement(o)&&(this.showActiveIndicator=!0);let a=this.tabIds[n],d=this.tabpanelIds[n];o.setAttribute("id",a),o.setAttribute("aria-selected",s?"true":"false"),o.setAttribute("aria-controls",d),o.addEventListener("click",this.handleTabClick),o.addEventListener("keydown",this.handleTabKeyDown),o.setAttribute("tabindex",s?"0":"-1"),s&&(this.activetab=o,this.activeid=a)}o.style[t]="",o.style[e]="",o.style[i]=`${n+1}`,this.isHorizontal()?o.classList.remove("vertical"):o.classList.add("vertical")})},this.setTabPanels=()=>{this.tabpanels.forEach((t,e)=>{let i=this.tabIds[e],o=this.tabpanelIds[e];t.setAttribute("id",o),t.setAttribute("aria-labelledby",i),this.activeTabIndex!==e?t.setAttribute("hidden",""):t.removeAttribute("hidden")})},this.handleTabClick=t=>{let e=t.currentTarget;e.nodeType===1&&this.isFocusableElement(e)&&(this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=this.tabs.indexOf(e),this.setComponent())},this.handleTabKeyDown=t=>{if(this.isHorizontal())switch(t.key){case Di:t.preventDefault(),this.adjustBackward(t);break;case Ri:t.preventDefault(),this.adjustForward(t);break}else switch(t.key){case ct:t.preventDefault(),this.adjustBackward(t);break;case lt:t.preventDefault(),this.adjustForward(t);break}switch(t.key){case dt:t.preventDefault(),this.adjust(-this.activeTabIndex);break;case ut:t.preventDefault(),this.adjust(this.tabs.length-this.activeTabIndex-1);break}},this.adjustForward=t=>{let e=this.tabs,i=0;for(i=this.activetab?e.indexOf(this.activetab)+1:1,i===e.length&&(i=0);i<e.length&&e.length>1;)if(this.isFocusableElement(e[i])){this.moveToTabByIndex(e,i);break}else{if(this.activetab&&i===e.indexOf(this.activetab))break;i+1>=e.length?i=0:i+=1}},this.adjustBackward=t=>{let e=this.tabs,i=0;for(i=this.activetab?e.indexOf(this.activetab)-1:0,i=i<0?e.length-1:i;i>=0&&e.length>1;)if(this.isFocusableElement(e[i])){this.moveToTabByIndex(e,i);break}else i-1<0?i=e.length-1:i-=1},this.moveToTabByIndex=(t,e)=>{let i=t[e];this.activetab=i,this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=e,i.focus(),this.setComponent()}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}activeidChanged(t,e){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.prevActiveTabIndex=this.tabs.findIndex(i=>i.id===t),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabsChanged(){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}getActiveIndex(){return this.activeid!==void 0?this.tabIds.indexOf(this.activeid)===-1?0:this.tabIds.indexOf(this.activeid):0}getTabIds(){return this.tabs.map(t=>{var e;return(e=t.getAttribute("id"))!==null&&e!==void 0?e:`tab-${$t()}`})}getTabPanelIds(){return this.tabpanels.map(t=>{var e;return(e=t.getAttribute("id"))!==null&&e!==void 0?e:`panel-${$t()}`})}setComponent(){this.activeTabIndex!==this.prevActiveTabIndex&&(this.activeid=this.tabIds[this.activeTabIndex],this.focusTab(),this.change())}isHorizontal(){return this.orientation===Fe.horizontal}handleActiveIndicatorPosition(){this.showActiveIndicator&&this.activeindicator&&this.activeTabIndex!==this.prevActiveTabIndex&&(this.ticking?this.ticking=!1:(this.ticking=!0,this.animateActiveIndicator()))}animateActiveIndicator(){this.ticking=!0;let t=this.isHorizontal()?"gridColumn":"gridRow",e=this.isHorizontal()?"translateX":"translateY",i=this.isHorizontal()?"offsetLeft":"offsetTop",o=this.activeIndicatorRef[i];this.activeIndicatorRef.style[t]=`${this.activeTabIndex+1}`;let n=this.activeIndicatorRef[i];this.activeIndicatorRef.style[t]=`${this.prevActiveTabIndex+1}`;let s=n-o;this.activeIndicatorRef.style.transform=`${e}(${s}px)`,this.activeIndicatorRef.classList.add("activeIndicatorTransition"),this.activeIndicatorRef.addEventListener("transitionend",()=>{this.ticking=!1,this.activeIndicatorRef.style[t]=`${this.activeTabIndex+1}`,this.activeIndicatorRef.style.transform=`${e}(0px)`,this.activeIndicatorRef.classList.remove("activeIndicatorTransition")})}adjust(t){let e=this.tabs.filter(s=>this.isFocusableElement(s)),i=e.indexOf(this.activetab),o=Fi(0,e.length-1,i+t),n=this.tabs.indexOf(e[o]);n>-1&&this.moveToTabByIndex(this.tabs,n)}focusTab(){this.tabs[this.activeTabIndex].focus()}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}};l([u],U.prototype,"orientation",void 0);l([u],U.prototype,"activeid",void 0);l([f],U.prototype,"tabs",void 0);l([f],U.prototype,"tabpanels",void 0);l([u({mode:"boolean"})],U.prototype,"activeindicator",void 0);l([f],U.prototype,"activeIndicatorRef",void 0);l([f],U.prototype,"showActiveIndicator",void 0);A(U,z);var Yi=(r,t)=>k`
208
+ `;var Mt={vertical:"vertical",horizontal:"horizontal"},U=class extends S{constructor(){super(...arguments),this.orientation=Mt.horizontal,this.activeindicator=!0,this.showActiveIndicator=!0,this.prevActiveTabIndex=0,this.activeTabIndex=0,this.ticking=!1,this.change=()=>{this.$emit("change",this.activetab)},this.isDisabledElement=e=>e.getAttribute("aria-disabled")==="true",this.isHiddenElement=e=>e.hasAttribute("hidden"),this.isFocusableElement=e=>!this.isDisabledElement(e)&&!this.isHiddenElement(e),this.setTabs=()=>{let e="gridColumn",t="gridRow",o=this.isHorizontal()?e:t;this.activeTabIndex=this.getActiveIndex(),this.showActiveIndicator=!1,this.tabs.forEach((r,n)=>{if(r.slot==="tab"){let s=this.activeTabIndex===n&&this.isFocusableElement(r);this.activeindicator&&this.isFocusableElement(r)&&(this.showActiveIndicator=!0);let a=this.tabIds[n],d=this.tabpanelIds[n];r.setAttribute("id",a),r.setAttribute("aria-selected",s?"true":"false"),r.setAttribute("aria-controls",d),r.addEventListener("click",this.handleTabClick),r.addEventListener("keydown",this.handleTabKeyDown),r.setAttribute("tabindex",s?"0":"-1"),s&&(this.activetab=r,this.activeid=a)}r.style[e]="",r.style[t]="",r.style[o]=`${n+1}`,this.isHorizontal()?r.classList.remove("vertical"):r.classList.add("vertical")})},this.setTabPanels=()=>{this.tabpanels.forEach((e,t)=>{let o=this.tabIds[t],r=this.tabpanelIds[t];e.setAttribute("id",r),e.setAttribute("aria-labelledby",o),this.activeTabIndex!==t?e.setAttribute("hidden",""):e.removeAttribute("hidden")})},this.handleTabClick=e=>{let t=e.currentTarget;t.nodeType===1&&this.isFocusableElement(t)&&(this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=this.tabs.indexOf(t),this.setComponent())},this.handleTabKeyDown=e=>{if(this.isHorizontal())switch(e.key){case Ro:e.preventDefault(),this.adjustBackward(e);break;case Mo:e.preventDefault(),this.adjustForward(e);break}else switch(e.key){case ce:e.preventDefault(),this.adjustBackward(e);break;case le:e.preventDefault(),this.adjustForward(e);break}switch(e.key){case de:e.preventDefault(),this.adjust(-this.activeTabIndex);break;case he:e.preventDefault(),this.adjust(this.tabs.length-this.activeTabIndex-1);break}},this.adjustForward=e=>{let t=this.tabs,o=0;for(o=this.activetab?t.indexOf(this.activetab)+1:1,o===t.length&&(o=0);o<t.length&&t.length>1;)if(this.isFocusableElement(t[o])){this.moveToTabByIndex(t,o);break}else{if(this.activetab&&o===t.indexOf(this.activetab))break;o+1>=t.length?o=0:o+=1}},this.adjustBackward=e=>{let t=this.tabs,o=0;for(o=this.activetab?t.indexOf(this.activetab)-1:0,o=o<0?t.length-1:o;o>=0&&t.length>1;)if(this.isFocusableElement(t[o])){this.moveToTabByIndex(t,o);break}else o-1<0?o=t.length-1:o-=1},this.moveToTabByIndex=(e,t)=>{let o=e[t];this.activetab=o,this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=t,o.focus(),this.setComponent()}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}activeidChanged(e,t){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.prevActiveTabIndex=this.tabs.findIndex(o=>o.id===e),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabsChanged(){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}getActiveIndex(){return this.activeid!==void 0?this.tabIds.indexOf(this.activeid)===-1?0:this.tabIds.indexOf(this.activeid):0}getTabIds(){return this.tabs.map(e=>{var t;return(t=e.getAttribute("id"))!==null&&t!==void 0?t:`tab-${$e()}`})}getTabPanelIds(){return this.tabpanels.map(e=>{var t;return(t=e.getAttribute("id"))!==null&&t!==void 0?t:`panel-${$e()}`})}setComponent(){this.activeTabIndex!==this.prevActiveTabIndex&&(this.activeid=this.tabIds[this.activeTabIndex],this.focusTab(),this.change())}isHorizontal(){return this.orientation===Mt.horizontal}handleActiveIndicatorPosition(){this.showActiveIndicator&&this.activeindicator&&this.activeTabIndex!==this.prevActiveTabIndex&&(this.ticking?this.ticking=!1:(this.ticking=!0,this.animateActiveIndicator()))}animateActiveIndicator(){this.ticking=!0;let e=this.isHorizontal()?"gridColumn":"gridRow",t=this.isHorizontal()?"translateX":"translateY",o=this.isHorizontal()?"offsetLeft":"offsetTop",r=this.activeIndicatorRef[o];this.activeIndicatorRef.style[e]=`${this.activeTabIndex+1}`;let n=this.activeIndicatorRef[o];this.activeIndicatorRef.style[e]=`${this.prevActiveTabIndex+1}`;let s=n-r;this.activeIndicatorRef.style.transform=`${t}(${s}px)`,this.activeIndicatorRef.classList.add("activeIndicatorTransition"),this.activeIndicatorRef.addEventListener("transitionend",()=>{this.ticking=!1,this.activeIndicatorRef.style[e]=`${this.activeTabIndex+1}`,this.activeIndicatorRef.style.transform=`${t}(0px)`,this.activeIndicatorRef.classList.remove("activeIndicatorTransition")})}adjust(e){let t=this.tabs.filter(s=>this.isFocusableElement(s)),o=t.indexOf(this.activetab),r=Bo(0,t.length-1,o+e),n=this.tabs.indexOf(t[r]);n>-1&&this.moveToTabByIndex(this.tabs,n)}focusTab(){this.tabs[this.activeTabIndex].focus()}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}};l([h],U.prototype,"orientation",void 0);l([h],U.prototype,"activeid",void 0);l([f],U.prototype,"tabs",void 0);l([f],U.prototype,"tabpanels",void 0);l([h({mode:"boolean"})],U.prototype,"activeindicator",void 0);l([f],U.prototype,"activeIndicatorRef",void 0);l([f],U.prototype,"showActiveIndicator",void 0);E(U,z);var Jo=(i,e)=>k`
209
209
  <template
210
210
  class="
211
- ${e=>e.readOnly?"readonly":""}
211
+ ${t=>t.readOnly?"readonly":""}
212
212
  "
213
213
  >
214
214
  <label
215
215
  part="label"
216
216
  for="control"
217
- class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"
217
+ class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"
218
218
  >
219
219
  <slot
220
- ${H({property:"defaultSlottedNodes",filter:Ui})}
220
+ ${H({property:"defaultSlottedNodes",filter:Wo})}
221
221
  ></slot>
222
222
  </label>
223
223
  <div class="root" part="root">
224
- ${K(r,t)}
224
+ ${K(i,e)}
225
225
  <input
226
226
  class="control"
227
227
  part="control"
228
228
  id="control"
229
- @input="${e=>e.handleTextInput()}"
230
- @change="${e=>e.handleChange()}"
231
- ?autofocus="${e=>e.autofocus}"
232
- ?disabled="${e=>e.disabled}"
233
- list="${e=>e.list}"
234
- maxlength="${e=>e.maxlength}"
235
- minlength="${e=>e.minlength}"
236
- pattern="${e=>e.pattern}"
237
- placeholder="${e=>e.placeholder}"
238
- ?readonly="${e=>e.readOnly}"
239
- ?required="${e=>e.required}"
240
- size="${e=>e.size}"
241
- ?spellcheck="${e=>e.spellcheck}"
242
- :value="${e=>e.value}"
243
- type="${e=>e.type}"
244
- aria-atomic="${e=>e.ariaAtomic}"
245
- aria-busy="${e=>e.ariaBusy}"
246
- aria-controls="${e=>e.ariaControls}"
247
- aria-current="${e=>e.ariaCurrent}"
248
- aria-describedby="${e=>e.ariaDescribedby}"
249
- aria-details="${e=>e.ariaDetails}"
250
- aria-disabled="${e=>e.ariaDisabled}"
251
- aria-errormessage="${e=>e.ariaErrormessage}"
252
- aria-flowto="${e=>e.ariaFlowto}"
253
- aria-haspopup="${e=>e.ariaHaspopup}"
254
- aria-hidden="${e=>e.ariaHidden}"
255
- aria-invalid="${e=>e.ariaInvalid}"
256
- aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
257
- aria-label="${e=>e.ariaLabel}"
258
- aria-labelledby="${e=>e.ariaLabelledby}"
259
- aria-live="${e=>e.ariaLive}"
260
- aria-owns="${e=>e.ariaOwns}"
261
- aria-relevant="${e=>e.ariaRelevant}"
262
- aria-roledescription="${e=>e.ariaRoledescription}"
229
+ @input="${t=>t.handleTextInput()}"
230
+ @change="${t=>t.handleChange()}"
231
+ ?autofocus="${t=>t.autofocus}"
232
+ ?disabled="${t=>t.disabled}"
233
+ list="${t=>t.list}"
234
+ maxlength="${t=>t.maxlength}"
235
+ minlength="${t=>t.minlength}"
236
+ pattern="${t=>t.pattern}"
237
+ placeholder="${t=>t.placeholder}"
238
+ ?readonly="${t=>t.readOnly}"
239
+ ?required="${t=>t.required}"
240
+ size="${t=>t.size}"
241
+ ?spellcheck="${t=>t.spellcheck}"
242
+ :value="${t=>t.value}"
243
+ type="${t=>t.type}"
244
+ aria-atomic="${t=>t.ariaAtomic}"
245
+ aria-busy="${t=>t.ariaBusy}"
246
+ aria-controls="${t=>t.ariaControls}"
247
+ aria-current="${t=>t.ariaCurrent}"
248
+ aria-describedby="${t=>t.ariaDescribedby}"
249
+ aria-details="${t=>t.ariaDetails}"
250
+ aria-disabled="${t=>t.ariaDisabled}"
251
+ aria-errormessage="${t=>t.ariaErrormessage}"
252
+ aria-flowto="${t=>t.ariaFlowto}"
253
+ aria-haspopup="${t=>t.ariaHaspopup}"
254
+ aria-hidden="${t=>t.ariaHidden}"
255
+ aria-invalid="${t=>t.ariaInvalid}"
256
+ aria-keyshortcuts="${t=>t.ariaKeyshortcuts}"
257
+ aria-label="${t=>t.ariaLabel}"
258
+ aria-labelledby="${t=>t.ariaLabelledby}"
259
+ aria-live="${t=>t.ariaLive}"
260
+ aria-owns="${t=>t.ariaOwns}"
261
+ aria-relevant="${t=>t.ariaRelevant}"
262
+ aria-roledescription="${t=>t.ariaRoledescription}"
263
263
  ${I("control")}
264
264
  />
265
- ${Z(r,t)}
265
+ ${Z(i,e)}
266
266
  </div>
267
267
  </template>
268
- `;var Y="not-allowed";var dn=":host([hidden]){display:none}";function M(r){return`${dn}:host{display:${r}}`}var B=Pi()?"focus-visible":"focus";function Ji(r){return Ir.getOrCreate(r).withPrefix("vscode")}function Ki(r){window.addEventListener("load",()=>{new MutationObserver(()=>{Zi(r)}).observe(document.body,{attributes:!0,attributeFilter:["class"]}),Zi(r)})}function Zi(r){let t=getComputedStyle(document.body),e=document.querySelector("body");if(e){let i=e.getAttribute("data-vscode-theme-kind");for(let[o,n]of r){let s=t.getPropertyValue(o).toString();if(i==="vscode-high-contrast")s.length===0&&n.name.includes("background")&&(s="transparent"),n.name==="button-icon-hover-background"&&(s="transparent");else if(i==="vscode-high-contrast-light"){if(s.length===0&&n.name.includes("background"))switch(n.name){case"button-primary-hover-background":s="#0F4A85";break;case"button-secondary-hover-background":s="transparent";break;case"button-icon-hover-background":s="transparent";break}}else n.name==="contrast-active-border"&&(s="transparent");n.setValueFor(e,s)}}}var to=new Map,eo=!1;function p(r,t){let e=oe.create(r);if(t){if(t.includes("--fake-vscode-token")){let i="id"+Math.random().toString(16).slice(2);t=`${t}-${i}`}to.set(t,e)}return eo||(Ki(to),eo=!0),e}var Kd=p("background","--vscode-editor-background").withDefault("#1e1e1e"),w=p("border-width").withDefault(1),ro=p("contrast-active-border","--vscode-contrastActiveBorder").withDefault("#f38518"),tu=p("contrast-border","--vscode-contrastBorder").withDefault("#6fc3df"),zt=p("corner-radius").withDefault(0),mt=p("corner-radius-round").withDefault(2),g=p("design-unit").withDefault(4),rt=p("disabled-opacity").withDefault(.4),O=p("focus-border","--vscode-focusBorder").withDefault("#007fd4"),W=p("font-family","--vscode-font-family").withDefault("-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol"),eu=p("font-weight","--vscode-font-weight").withDefault("400"),P=p("foreground","--vscode-foreground").withDefault("#cccccc"),qt=p("input-height").withDefault("26"),Me=p("input-min-width").withDefault("100px"),_=p("type-ramp-base-font-size","--vscode-font-size").withDefault("13px"),D=p("type-ramp-base-line-height").withDefault("normal"),ru=p("type-ramp-minus1-font-size").withDefault("11px"),iu=p("type-ramp-minus1-line-height").withDefault("16px"),ou=p("type-ramp-minus2-font-size").withDefault("9px"),nu=p("type-ramp-minus2-line-height").withDefault("16px"),su=p("type-ramp-plus1-font-size").withDefault("16px"),au=p("type-ramp-plus1-line-height").withDefault("24px"),lu=p("scrollbarWidth").withDefault("10px"),cu=p("scrollbarHeight").withDefault("10px"),du=p("scrollbar-slider-background","--vscode-scrollbarSlider-background").withDefault("#79797966"),uu=p("scrollbar-slider-hover-background","--vscode-scrollbarSlider-hoverBackground").withDefault("#646464b3"),hu=p("scrollbar-slider-active-background","--vscode-scrollbarSlider-activeBackground").withDefault("#bfbfbf66"),pu=p("badge-background","--vscode-badge-background").withDefault("#4d4d4d"),fu=p("badge-foreground","--vscode-badge-foreground").withDefault("#ffffff"),io=p("button-border","--vscode-button-border").withDefault("transparent"),Pr=p("button-icon-background").withDefault("transparent"),oo=p("button-icon-corner-radius").withDefault("5px"),no=p("button-icon-outline-offset").withDefault(0),_r=p("button-icon-hover-background","--fake-vscode-token").withDefault("rgba(90, 93, 94, 0.31)"),so=p("button-icon-padding").withDefault("3px"),At=p("button-primary-background","--vscode-button-background").withDefault("#0e639c"),Dr=p("button-primary-foreground","--vscode-button-foreground").withDefault("#ffffff"),Rr=p("button-primary-hover-background","--vscode-button-hoverBackground").withDefault("#1177bb"),Be=p("button-secondary-background","--vscode-button-secondaryBackground").withDefault("#3a3d41"),ao=p("button-secondary-foreground","--vscode-button-secondaryForeground").withDefault("#ffffff"),lo=p("button-secondary-hover-background","--vscode-button-secondaryHoverBackground").withDefault("#45494e"),co=p("button-padding-horizontal").withDefault("11px"),uo=p("button-padding-vertical").withDefault("4px"),Le=p("checkbox-background","--vscode-checkbox-background").withDefault("#3c3c3c"),Fr=p("checkbox-border","--vscode-checkbox-border").withDefault("#3c3c3c"),ho=p("checkbox-corner-radius").withDefault(3),mu=p("checkbox-foreground","--vscode-checkbox-foreground").withDefault("#f0f0f0"),bt=p("list-active-selection-background","--vscode-list-activeSelectionBackground").withDefault("#094771"),Ut=p("list-active-selection-foreground","--vscode-list-activeSelectionForeground").withDefault("#ffffff"),bu=p("list-hover-background","--vscode-list-hoverBackground").withDefault("#2a2d2e"),gu=p("divider-background","--vscode-settings-dropdownListBorder").withDefault("#454545"),le=p("dropdown-background","--vscode-dropdown-background").withDefault("#3c3c3c"),Pt=p("dropdown-border","--vscode-dropdown-border").withDefault("#3c3c3c"),yu=p("dropdown-foreground","--vscode-dropdown-foreground").withDefault("#f0f0f0"),po=p("dropdown-list-max-height").withDefault("200px"),Ne=p("input-background","--vscode-input-background").withDefault("#3c3c3c"),fo=p("input-foreground","--vscode-input-foreground").withDefault("#cccccc"),vu=p("input-placeholder-foreground","--vscode-input-placeholderForeground").withDefault("#cccccc"),xu=p("link-active-foreground","--vscode-textLink-activeForeground").withDefault("#3794ff"),wu=p("link-foreground","--vscode-textLink-foreground").withDefault("#3794ff"),ku=p("progress-background","--vscode-progressBar-background").withDefault("#0e70c0"),mo=p("panel-tab-active-border","--vscode-panelTitle-activeBorder").withDefault("#e7e7e7"),gt=p("panel-tab-active-foreground","--vscode-panelTitle-activeForeground").withDefault("#e7e7e7"),bo=p("panel-tab-foreground","--vscode-panelTitle-inactiveForeground").withDefault("#e7e7e799"),Su=p("panel-view-background","--vscode-panel-background").withDefault("#1e1e1e"),Cu=p("panel-view-border","--vscode-panel-border").withDefault("#80808059"),$u=p("tag-corner-radius").withDefault("2px");function go(r,t,e,i){var o=arguments.length,n=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,t,e,i);else for(var a=r.length-1;a>=0;a--)(s=r[a])&&(n=(o<3?s(n):o>3?s(t,e,n):s(t,e))||n);return o>3&&n&&Object.defineProperty(t,e,n),n}var un=$`
269
- ${M("inline-flex")} :host {
268
+ `;var Y="not-allowed";var cn=":host([hidden]){display:none}";function B(i){return`${cn}:host{display:${i}}`}var _=Do()?"focus-visible":"focus";function Zo(i){return Ii.getOrCreate(i).withPrefix("vscode")}function er(i){window.addEventListener("load",()=>{new MutationObserver(()=>{Ko(i)}).observe(document.body,{attributes:!0,attributeFilter:["class"]}),Ko(i)})}function Ko(i){let e=getComputedStyle(document.body),t=document.querySelector("body");if(t){let o=t.getAttribute("data-vscode-theme-kind");for(let[r,n]of i){let s=e.getPropertyValue(r).toString();if(o==="vscode-high-contrast")s.length===0&&n.name.includes("background")&&(s="transparent"),n.name==="button-icon-hover-background"&&(s="transparent");else if(o==="vscode-high-contrast-light"){if(s.length===0&&n.name.includes("background"))switch(n.name){case"button-primary-hover-background":s="#0F4A85";break;case"button-secondary-hover-background":s="transparent";break;case"button-icon-hover-background":s="transparent";break}}else n.name==="contrast-active-border"&&(s="transparent");n.setValueFor(t,s)}}}var tr=new Map,ir=!1;function p(i,e){let t=rt.create(i);if(e){if(e.includes("--fake-vscode-token")){let o="id"+Math.random().toString(16).slice(2);e=`${e}-${o}`}tr.set(e,t)}return ir||(er(tr),ir=!0),t}var Zd=p("background","--vscode-editor-background").withDefault("#1e1e1e"),w=p("border-width").withDefault(1),or=p("contrast-active-border","--vscode-contrastActiveBorder").withDefault("#f38518"),Kd=p("contrast-border","--vscode-contrastBorder").withDefault("#6fc3df"),ze=p("corner-radius").withDefault(0),me=p("corner-radius-round").withDefault(2),g=p("design-unit").withDefault(4),ie=p("disabled-opacity").withDefault(.4),O=p("focus-border","--vscode-focusBorder").withDefault("#007fd4"),W=p("font-family","--vscode-font-family").withDefault("-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol"),eh=p("font-weight","--vscode-font-weight").withDefault("400"),P=p("foreground","--vscode-foreground").withDefault("#cccccc"),qe=p("input-height").withDefault("26"),Bt=p("input-min-width").withDefault("100px"),D=p("type-ramp-base-font-size","--vscode-font-size").withDefault("13px"),F=p("type-ramp-base-line-height").withDefault("normal"),th=p("type-ramp-minus1-font-size").withDefault("11px"),ih=p("type-ramp-minus1-line-height").withDefault("16px"),oh=p("type-ramp-minus2-font-size").withDefault("9px"),rh=p("type-ramp-minus2-line-height").withDefault("16px"),nh=p("type-ramp-plus1-font-size").withDefault("16px"),sh=p("type-ramp-plus1-line-height").withDefault("24px"),ah=p("scrollbarWidth").withDefault("10px"),lh=p("scrollbarHeight").withDefault("10px"),ch=p("scrollbar-slider-background","--vscode-scrollbarSlider-background").withDefault("#79797966"),dh=p("scrollbar-slider-hover-background","--vscode-scrollbarSlider-hoverBackground").withDefault("#646464b3"),hh=p("scrollbar-slider-active-background","--vscode-scrollbarSlider-activeBackground").withDefault("#bfbfbf66"),uh=p("badge-background","--vscode-badge-background").withDefault("#4d4d4d"),ph=p("badge-foreground","--vscode-badge-foreground").withDefault("#ffffff"),rr=p("button-border","--vscode-button-border").withDefault("transparent"),Pi=p("button-icon-background").withDefault("transparent"),nr=p("button-icon-corner-radius").withDefault("5px"),sr=p("button-icon-outline-offset").withDefault(0),Di=p("button-icon-hover-background","--fake-vscode-token").withDefault("rgba(90, 93, 94, 0.31)"),ar=p("button-icon-padding").withDefault("3px"),Ee=p("button-primary-background","--vscode-button-background").withDefault("#0e639c"),Fi=p("button-primary-foreground","--vscode-button-foreground").withDefault("#ffffff"),Ri=p("button-primary-hover-background","--vscode-button-hoverBackground").withDefault("#1177bb"),_t=p("button-secondary-background","--vscode-button-secondaryBackground").withDefault("#3a3d41"),lr=p("button-secondary-foreground","--vscode-button-secondaryForeground").withDefault("#ffffff"),cr=p("button-secondary-hover-background","--vscode-button-secondaryHoverBackground").withDefault("#45494e"),dr=p("button-padding-horizontal").withDefault("11px"),hr=p("button-padding-vertical").withDefault("4px"),Lt=p("checkbox-background","--vscode-checkbox-background").withDefault("#3c3c3c"),Mi=p("checkbox-border","--vscode-checkbox-border").withDefault("#3c3c3c"),ur=p("checkbox-corner-radius").withDefault(3),fh=p("checkbox-foreground","--vscode-checkbox-foreground").withDefault("#f0f0f0"),be=p("list-active-selection-background","--vscode-list-activeSelectionBackground").withDefault("#094771"),Ue=p("list-active-selection-foreground","--vscode-list-activeSelectionForeground").withDefault("#ffffff"),mh=p("list-hover-background","--vscode-list-hoverBackground").withDefault("#2a2d2e"),bh=p("divider-background","--vscode-settings-dropdownListBorder").withDefault("#454545"),lt=p("dropdown-background","--vscode-dropdown-background").withDefault("#3c3c3c"),Pe=p("dropdown-border","--vscode-dropdown-border").withDefault("#3c3c3c"),gh=p("dropdown-foreground","--vscode-dropdown-foreground").withDefault("#f0f0f0"),pr=p("dropdown-list-max-height").withDefault("200px"),Nt=p("input-background","--vscode-input-background").withDefault("#3c3c3c"),fr=p("input-foreground","--vscode-input-foreground").withDefault("#cccccc"),vh=p("input-placeholder-foreground","--vscode-input-placeholderForeground").withDefault("#cccccc"),yh=p("link-active-foreground","--vscode-textLink-activeForeground").withDefault("#3794ff"),xh=p("link-foreground","--vscode-textLink-foreground").withDefault("#3794ff"),wh=p("progress-background","--vscode-progressBar-background").withDefault("#0e70c0"),mr=p("panel-tab-active-border","--vscode-panelTitle-activeBorder").withDefault("#e7e7e7"),ge=p("panel-tab-active-foreground","--vscode-panelTitle-activeForeground").withDefault("#e7e7e7"),br=p("panel-tab-foreground","--vscode-panelTitle-inactiveForeground").withDefault("#e7e7e799"),kh=p("panel-view-background","--vscode-panel-background").withDefault("#1e1e1e"),Sh=p("panel-view-border","--vscode-panel-border").withDefault("#80808059"),Ch=p("tag-corner-radius").withDefault("2px");var dn=$`
269
+ ${B("inline-flex")} :host {
270
270
  outline: none;
271
271
  font-family: ${W};
272
- font-size: ${_};
273
- line-height: ${D};
274
- color: ${Dr};
275
- background: ${At};
276
- border-radius: calc(${mt} * 1px);
272
+ font-size: ${D};
273
+ line-height: ${F};
274
+ color: ${Fi};
275
+ background: ${Ee};
276
+ border-radius: calc(${me} * 1px);
277
277
  fill: currentColor;
278
278
  cursor: pointer;
279
279
  }
@@ -285,11 +285,11 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
285
285
  display: inline-flex;
286
286
  justify-content: center;
287
287
  align-items: center;
288
- padding: ${uo} ${co};
288
+ padding: ${hr} ${dr};
289
289
  white-space: wrap;
290
290
  outline: none;
291
291
  text-decoration: none;
292
- border: calc(${w} * 1px) solid ${io};
292
+ border: calc(${w} * 1px) solid ${rr};
293
293
  color: inherit;
294
294
  border-radius: inherit;
295
295
  fill: inherit;
@@ -297,12 +297,12 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
297
297
  font-family: inherit;
298
298
  }
299
299
  :host(:hover) {
300
- background: ${Rr};
300
+ background: ${Ri};
301
301
  }
302
302
  :host(:active) {
303
- background: ${At};
303
+ background: ${Ee};
304
304
  }
305
- .control:${B} {
305
+ .control:${_} {
306
306
  outline: calc(${w} * 1px) solid ${O};
307
307
  outline-offset: calc(${w} * 2px);
308
308
  }
@@ -310,8 +310,8 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
310
310
  border: 0;
311
311
  }
312
312
  :host([disabled]) {
313
- opacity: ${rt};
314
- background: ${At};
313
+ opacity: ${ie};
314
+ background: ${Ee};
315
315
  cursor: ${Y};
316
316
  }
317
317
  .content {
@@ -330,87 +330,87 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
330
330
  }
331
331
  `,hn=$`
332
332
  :host([appearance='primary']) {
333
- background: ${At};
334
- color: ${Dr};
333
+ background: ${Ee};
334
+ color: ${Fi};
335
335
  }
336
336
  :host([appearance='primary']:hover) {
337
- background: ${Rr};
337
+ background: ${Ri};
338
338
  }
339
339
  :host([appearance='primary']:active) .control:active {
340
- background: ${At};
340
+ background: ${Ee};
341
341
  }
342
- :host([appearance='primary']) .control:${B} {
342
+ :host([appearance='primary']) .control:${_} {
343
343
  outline: calc(${w} * 1px) solid ${O};
344
344
  outline-offset: calc(${w} * 2px);
345
345
  }
346
346
  :host([appearance='primary'][disabled]) {
347
- background: ${At};
347
+ background: ${Ee};
348
348
  }
349
- `,pn=$`
349
+ `,un=$`
350
350
  :host([appearance='secondary']) {
351
- background: ${Be};
352
- color: ${ao};
351
+ background: ${_t};
352
+ color: ${lr};
353
353
  }
354
354
  :host([appearance='secondary']:hover) {
355
- background: ${lo};
355
+ background: ${cr};
356
356
  }
357
357
  :host([appearance='secondary']:active) .control:active {
358
- background: ${Be};
358
+ background: ${_t};
359
359
  }
360
- :host([appearance='secondary']) .control:${B} {
360
+ :host([appearance='secondary']) .control:${_} {
361
361
  outline: calc(${w} * 1px) solid ${O};
362
362
  outline-offset: calc(${w} * 2px);
363
363
  }
364
364
  :host([appearance='secondary'][disabled]) {
365
- background: ${Be};
365
+ background: ${_t};
366
366
  }
367
- `,fn=$`
367
+ `,pn=$`
368
368
  :host([appearance='icon']) {
369
- background: ${Pr};
370
- border-radius: ${oo};
369
+ background: ${Pi};
370
+ border-radius: ${nr};
371
371
  color: ${P};
372
372
  }
373
373
  :host([appearance='icon']:hover) {
374
- background: ${_r};
375
- outline: 1px dotted ${ro};
374
+ background: ${Di};
375
+ outline: 1px dotted ${or};
376
376
  outline-offset: -1px;
377
377
  }
378
378
  :host([appearance='icon']) .control {
379
- padding: ${so};
379
+ padding: ${ar};
380
380
  border: none;
381
381
  }
382
382
  :host([appearance='icon']:active) .control:active {
383
- background: ${_r};
383
+ background: ${Di};
384
384
  }
385
- :host([appearance='icon']) .control:${B} {
385
+ :host([appearance='icon']) .control:${_} {
386
386
  outline: calc(${w} * 1px) solid ${O};
387
- outline-offset: ${no};
387
+ outline-offset: ${sr};
388
388
  }
389
389
  :host([appearance='icon'][disabled]) {
390
- background: ${Pr};
390
+ background: ${Pi};
391
391
  }
392
- `,yo=(r,t)=>$`
393
- ${un}
392
+ `,gr=(i,e)=>$`
393
+ ${dn}
394
394
  ${hn}
395
+ ${un}
395
396
  ${pn}
396
- ${fn}
397
- `;var Ve=class extends V{connectedCallback(){if(super.connectedCallback(),!this.appearance){let t=this.getAttribute("appearance");this.appearance=t}}attributeChangedCallback(t,e,i){t==="appearance"&&i==="icon"&&(this.getAttribute("aria-label")||(this.ariaLabel="Icon Button")),t==="aria-label"&&(this.ariaLabel=i),t==="disabled"&&(this.disabled=i!==null)}};go([u],Ve.prototype,"appearance",void 0);var Mr=Ve.compose({baseName:"button",template:Mi,styles:yo,shadowOptions:{delegatesFocus:!0}});var vo=(r,t)=>$`
398
- ${M("inline-flex")} :host {
397
+ `;var Vt=class extends V{connectedCallback(){if(super.connectedCallback(),!this.appearance){let e=this.getAttribute("appearance");this.appearance=e}}attributeChangedCallback(e,t,o){e==="appearance"&&o==="icon"&&(this.getAttribute("aria-label")||(this.ariaLabel="Icon Button")),e==="aria-label"&&(this.ariaLabel=o),e==="disabled"&&(this.disabled=o!==null)}};l([h],Vt.prototype,"appearance",void 0);var Bi=Vt.compose({baseName:"button",template:_o,styles:gr,shadowOptions:{delegatesFocus:!0}});var vr=(i,e)=>$`
398
+ ${B("inline-flex")} :host {
399
399
  align-items: center;
400
400
  outline: none;
401
401
  margin: calc(${g} * 1px) 0;
402
402
  user-select: none;
403
- font-size: ${_};
404
- line-height: ${D};
403
+ font-size: ${D};
404
+ line-height: ${F};
405
405
  }
406
406
  .control {
407
407
  position: relative;
408
408
  width: calc(${g} * 4px + 2px);
409
409
  height: calc(${g} * 4px + 2px);
410
410
  box-sizing: border-box;
411
- border-radius: calc(${ho} * 1px);
412
- border: calc(${w} * 1px) solid ${Fr};
413
- background: ${Le};
411
+ border-radius: calc(${ur} * 1px);
412
+ border: calc(${w} * 1px) solid ${Mi};
413
+ background: ${Lt};
414
414
  outline: none;
415
415
  cursor: pointer;
416
416
  }
@@ -445,14 +445,14 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
445
445
  opacity: 0;
446
446
  }
447
447
  :host(:enabled) .control:hover {
448
- background: ${Le};
449
- border-color: ${Fr};
448
+ background: ${Lt};
449
+ border-color: ${Mi};
450
450
  }
451
451
  :host(:enabled) .control:active {
452
- background: ${Le};
452
+ background: ${Lt};
453
453
  border-color: ${O};
454
454
  }
455
- :host(:${B}) .control {
455
+ :host(:${_}) .control {
456
456
  border: calc(${w} * 1px) solid ${O};
457
457
  }
458
458
  :host(.disabled) .label,
@@ -466,9 +466,9 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
466
466
  opacity: 1;
467
467
  }
468
468
  :host(.disabled) {
469
- opacity: ${rt};
469
+ opacity: ${ie};
470
470
  }
471
- `;var Br=class extends It{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Checkbox")}},Lr=Br.compose({baseName:"checkbox",template:ji,styles:vo,checkedIndicator:`
471
+ `;var _i=class extends Ie{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Checkbox")}},Li=_i.compose({baseName:"checkbox",template:zo,styles:vr,checkedIndicator:`
472
472
  <svg
473
473
  part="checked-indicator"
474
474
  class="checked-indicator"
@@ -486,44 +486,44 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
486
486
  </svg>
487
487
  `,indeterminateIndicator:`
488
488
  <div part="indeterminate-indicator" class="indeterminate-indicator"></div>
489
- `});var xo=(r,t)=>$`
490
- ${M("inline-flex")} :host {
491
- background: ${le};
492
- border-radius: calc(${mt} * 1px);
489
+ `});var yr=(i,e)=>$`
490
+ ${B("inline-flex")} :host {
491
+ background: ${lt};
492
+ border-radius: calc(${me} * 1px);
493
493
  box-sizing: border-box;
494
494
  color: ${P};
495
495
  contain: contents;
496
496
  font-family: ${W};
497
- height: calc(${qt} * 1px);
497
+ height: calc(${qe} * 1px);
498
498
  position: relative;
499
499
  user-select: none;
500
- min-width: ${Me};
500
+ min-width: ${Bt};
501
501
  outline: none;
502
502
  vertical-align: top;
503
503
  }
504
504
  .control {
505
505
  align-items: center;
506
506
  box-sizing: border-box;
507
- border: calc(${w} * 1px) solid ${Pt};
508
- border-radius: calc(${mt} * 1px);
507
+ border: calc(${w} * 1px) solid ${Pe};
508
+ border-radius: calc(${me} * 1px);
509
509
  cursor: pointer;
510
510
  display: flex;
511
511
  font-family: inherit;
512
- font-size: ${_};
513
- line-height: ${D};
512
+ font-size: ${D};
513
+ line-height: ${F};
514
514
  min-height: 100%;
515
515
  padding: 2px 6px 2px 8px;
516
516
  width: 100%;
517
517
  }
518
518
  .listbox {
519
- background: ${le};
519
+ background: ${lt};
520
520
  border: calc(${w} * 1px) solid ${O};
521
- border-radius: calc(${mt} * 1px);
521
+ border-radius: calc(${me} * 1px);
522
522
  box-sizing: border-box;
523
523
  display: inline-flex;
524
524
  flex-direction: column;
525
525
  left: 0;
526
- max-height: ${po};
526
+ max-height: ${pr};
527
527
  padding: 0;
528
528
  overflow-y: auto;
529
529
  position: absolute;
@@ -533,28 +533,28 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
533
533
  .listbox[hidden] {
534
534
  display: none;
535
535
  }
536
- :host(:${B}) .control {
536
+ :host(:${_}) .control {
537
537
  border-color: ${O};
538
538
  }
539
539
  :host(:not([disabled]):hover) {
540
- background: ${le};
541
- border-color: ${Pt};
540
+ background: ${lt};
541
+ border-color: ${Pe};
542
542
  }
543
- :host(:${B}) ::slotted([aria-selected="true"][role="option"]:not([disabled])) {
544
- background: ${bt};
543
+ :host(:${_}) ::slotted([aria-selected="true"][role="option"]:not([disabled])) {
544
+ background: ${be};
545
545
  border: calc(${w} * 1px) solid transparent;
546
- color: ${Ut};
546
+ color: ${Ue};
547
547
  }
548
548
  :host([disabled]) {
549
549
  cursor: ${Y};
550
- opacity: ${rt};
550
+ opacity: ${ie};
551
551
  }
552
552
  :host([disabled]) .control {
553
553
  cursor: ${Y};
554
554
  user-select: none;
555
555
  }
556
556
  :host([disabled]:hover) {
557
- background: ${le};
557
+ background: ${lt};
558
558
  color: ${P};
559
559
  fill: currentcolor;
560
560
  }
@@ -576,10 +576,10 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
576
576
  border-top-right-radius: 0;
577
577
  }
578
578
  :host([open][position='above']) .listbox {
579
- bottom: calc(${qt} * 1px);
579
+ bottom: calc(${qe} * 1px);
580
580
  }
581
581
  :host([open][position='below']) .listbox {
582
- top: calc(${qt} * 1px);
582
+ top: calc(${qe} * 1px);
583
583
  }
584
584
  .selected-value {
585
585
  flex: 1 1 auto;
@@ -620,7 +620,7 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
620
620
  ::slotted(option) {
621
621
  flex: 0 0 auto;
622
622
  }
623
- `;var Nr=class extends X{},Vr=Nr.compose({baseName:"dropdown",template:Wi,styles:xo,indicator:`
623
+ `;var Ni=class extends X{},Vi=Ni.compose({baseName:"dropdown",template:Go,styles:yr,indicator:`
624
624
  <svg
625
625
  class="select-indicator"
626
626
  part="select-indicator"
@@ -636,17 +636,17 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
636
636
  d="M7.976 10.072l4.357-4.357.62.618L8.284 11h-.618L3 6.333l.619-.618 4.357 4.357z"
637
637
  />
638
638
  </svg>
639
- `});var wo=(r,t)=>$`
640
- ${M("inline-flex")} :host {
639
+ `});var xr=(i,e)=>$`
640
+ ${B("inline-flex")} :host {
641
641
  font-family: var(--body-font);
642
- border-radius: ${zt};
642
+ border-radius: ${ze};
643
643
  border: calc(${w} * 1px) solid transparent;
644
644
  box-sizing: border-box;
645
645
  color: ${P};
646
646
  cursor: pointer;
647
647
  fill: currentcolor;
648
- font-size: ${_};
649
- line-height: ${D};
648
+ font-size: ${D};
649
+ line-height: ${F};
650
650
  margin: 0;
651
651
  outline: none;
652
652
  overflow: hidden;
@@ -655,32 +655,32 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
655
655
  user-select: none;
656
656
  white-space: nowrap;
657
657
  }
658
- :host(:${B}) {
658
+ :host(:${_}) {
659
659
  border-color: ${O};
660
- background: ${bt};
660
+ background: ${be};
661
661
  color: ${P};
662
662
  }
663
663
  :host([aria-selected='true']) {
664
- background: ${bt};
664
+ background: ${be};
665
665
  border: calc(${w} * 1px) solid transparent;
666
- color: ${Ut};
666
+ color: ${Ue};
667
667
  }
668
668
  :host(:active) {
669
- background: ${bt};
670
- color: ${Ut};
669
+ background: ${be};
670
+ color: ${Ue};
671
671
  }
672
672
  :host(:not([aria-selected='true']):hover) {
673
- background: ${bt};
673
+ background: ${be};
674
674
  border: calc(${w} * 1px) solid transparent;
675
- color: ${Ut};
675
+ color: ${Ue};
676
676
  }
677
677
  :host(:not([aria-selected='true']):active) {
678
- background: ${bt};
678
+ background: ${be};
679
679
  color: ${P};
680
680
  }
681
681
  :host([disabled]) {
682
682
  cursor: ${Y};
683
- opacity: ${rt};
683
+ opacity: ${ie};
684
684
  }
685
685
  :host([disabled]:hover) {
686
686
  background-color: inherit;
@@ -691,12 +691,12 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
691
691
  overflow: hidden;
692
692
  text-overflow: ellipsis;
693
693
  }
694
- `;var Hr=class extends q{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Option")}},jr=Hr.compose({baseName:"option",template:qi,styles:wo});var ko=(r,t)=>$`
695
- ${M("grid")} :host {
694
+ `;var Hi=class extends q{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Option")}},ji=Hi.compose({baseName:"option",template:Uo,styles:xr});var wr=(i,e)=>$`
695
+ ${B("grid")} :host {
696
696
  box-sizing: border-box;
697
697
  font-family: ${W};
698
- font-size: ${_};
699
- line-height: ${D};
698
+ font-size: ${D};
699
+ line-height: ${F};
700
700
  color: ${P};
701
701
  grid-template-columns: auto 1fr auto;
702
702
  grid-template-rows: auto 1fr;
@@ -723,9 +723,9 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
723
723
  width: 100%;
724
724
  height: calc((${g} / 4) * 1px);
725
725
  justify-self: center;
726
- background: ${gt};
726
+ background: ${ge};
727
727
  margin: 0;
728
- border-radius: calc(${zt} * 1px);
728
+ border-radius: calc(${ze} * 1px);
729
729
  }
730
730
  .activeIndicatorTransition {
731
731
  transition: transform 0.01s linear;
@@ -736,17 +736,17 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
736
736
  grid-column-end: 4;
737
737
  position: relative;
738
738
  }
739
- `;var So=(r,t)=>$`
740
- ${M("inline-flex")} :host {
739
+ `;var kr=(i,e)=>$`
740
+ ${B("inline-flex")} :host {
741
741
  box-sizing: border-box;
742
742
  font-family: ${W};
743
- font-size: ${_};
744
- line-height: ${D};
743
+ font-size: ${D};
744
+ line-height: ${F};
745
745
  height: calc(${g} * 7px);
746
746
  padding: calc(${g} * 1px) 0;
747
- color: ${bo};
747
+ color: ${br};
748
748
  fill: currentcolor;
749
- border-radius: calc(${zt} * 1px);
749
+ border-radius: calc(${ze} * 1px);
750
750
  border: solid calc(${w} * 1px) transparent;
751
751
  align-items: center;
752
752
  justify-content: center;
@@ -754,31 +754,31 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
754
754
  cursor: pointer;
755
755
  }
756
756
  :host(:hover) {
757
- color: ${gt};
757
+ color: ${ge};
758
758
  fill: currentcolor;
759
759
  }
760
760
  :host(:active) {
761
- color: ${gt};
761
+ color: ${ge};
762
762
  fill: currentcolor;
763
763
  }
764
764
  :host([aria-selected='true']) {
765
765
  background: transparent;
766
- color: ${gt};
766
+ color: ${ge};
767
767
  fill: currentcolor;
768
768
  }
769
769
  :host([aria-selected='true']:hover) {
770
770
  background: transparent;
771
- color: ${gt};
771
+ color: ${ge};
772
772
  fill: currentcolor;
773
773
  }
774
774
  :host([aria-selected='true']:active) {
775
775
  background: transparent;
776
- color: ${gt};
776
+ color: ${ge};
777
777
  fill: currentcolor;
778
778
  }
779
- :host(:${B}) {
779
+ :host(:${_}) {
780
780
  outline: none;
781
- border: solid calc(${w} * 1px) ${mo};
781
+ border: solid calc(${w} * 1px) ${mr};
782
782
  }
783
783
  :host(:focus) {
784
784
  outline: none;
@@ -786,18 +786,18 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
786
786
  ::slotted(vscode-badge) {
787
787
  margin-inline-start: calc(${g} * 2px);
788
788
  }
789
- `;var Co=(r,t)=>$`
790
- ${M("flex")} :host {
789
+ `;var Sr=(i,e)=>$`
790
+ ${B("flex")} :host {
791
791
  color: inherit;
792
792
  background-color: transparent;
793
793
  border: solid calc(${w} * 1px) transparent;
794
794
  box-sizing: border-box;
795
- font-size: ${_};
796
- line-height: ${D};
795
+ font-size: ${D};
796
+ line-height: ${F};
797
797
  padding: 10px calc((${g} + 2) * 1px);
798
798
  }
799
- `;var zr=class extends U{connectedCallback(){super.connectedCallback(),this.orientation&&(this.orientation=Fe.horizontal),this.getAttribute("aria-label")||this.setAttribute("aria-label","Panels")}},Wr=zr.compose({baseName:"panels",template:Xi,styles:ko}),qr=class extends ae{connectedCallback(){super.connectedCallback(),this.disabled&&(this.disabled=!1),this.textContent&&this.setAttribute("aria-label",this.textContent)}},Gr=qr.compose({baseName:"panel-tab",template:Qi,styles:So}),Ur=class extends Re{},Qr=Ur.compose({baseName:"panel-view",template:Gi,styles:Co});var $o=(r,t)=>$`
800
- ${M("inline-block")} :host {
799
+ `;var zi=class extends U{connectedCallback(){super.connectedCallback(),this.orientation&&(this.orientation=Mt.horizontal),this.getAttribute("aria-label")||this.setAttribute("aria-label","Panels")}},Wi=zi.compose({baseName:"panels",template:Yo,styles:wr}),qi=class extends at{connectedCallback(){super.connectedCallback(),this.disabled&&(this.disabled=!1),this.textContent&&this.setAttribute("aria-label",this.textContent)}},Gi=qi.compose({baseName:"panel-tab",template:Xo,styles:kr}),Ui=class extends Rt{},Qi=Ui.compose({baseName:"panel-view",template:Qo,styles:Sr});var Cr=(i,e)=>$`
800
+ ${B("inline-block")} :host {
801
801
  font-family: ${W};
802
802
  outline: none;
803
803
  user-select: none;
@@ -807,12 +807,12 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
807
807
  position: relative;
808
808
  display: flex;
809
809
  flex-direction: row;
810
- color: ${fo};
811
- background: ${Ne};
812
- border-radius: calc(${mt} * 1px);
813
- border: calc(${w} * 1px) solid ${Pt};
814
- height: calc(${qt} * 1px);
815
- min-width: ${Me};
810
+ color: ${fr};
811
+ background: ${Nt};
812
+ border-radius: calc(${me} * 1px);
813
+ border: calc(${w} * 1px) solid ${Pe};
814
+ height: calc(${qe} * 1px);
815
+ min-width: ${Bt};
816
816
  }
817
817
  .control {
818
818
  -webkit-appearance: none;
@@ -826,11 +826,11 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
826
826
  margin-bottom: auto;
827
827
  border: none;
828
828
  padding: 0 calc(${g} * 2px + 1px);
829
- font-size: ${_};
830
- line-height: ${D};
829
+ font-size: ${D};
830
+ line-height: ${F};
831
831
  }
832
832
  .control:hover,
833
- .control:${B},
833
+ .control:${_},
834
834
  .control:disabled,
835
835
  .control:active {
836
836
  outline: none;
@@ -839,8 +839,8 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
839
839
  display: block;
840
840
  color: ${P};
841
841
  cursor: pointer;
842
- font-size: ${_};
843
- line-height: ${D};
842
+ font-size: ${D};
843
+ line-height: ${F};
844
844
  margin-bottom: 2px;
845
845
  }
846
846
  .label__hidden {
@@ -865,11 +865,11 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
865
865
  margin-inline-end: calc(${g} * 2px);
866
866
  }
867
867
  :host(:hover:not([disabled])) .root {
868
- background: ${Ne};
869
- border-color: ${Pt};
868
+ background: ${Nt};
869
+ border-color: ${Pe};
870
870
  }
871
871
  :host(:active:not([disabled])) .root {
872
- background: ${Ne};
872
+ background: ${Nt};
873
873
  border-color: ${O};
874
874
  }
875
875
  :host(:focus-within:not([disabled])) .root {
@@ -882,28 +882,10 @@ function je(r){return r.type==="int"?{type:"int",value:Io("",r.value)}:r}functio
882
882
  cursor: ${Y};
883
883
  }
884
884
  :host([disabled]) {
885
- opacity: ${rt};
885
+ opacity: ${ie};
886
886
  }
887
887
  :host([disabled]) .control {
888
- border-color: ${Pt};
888
+ border-color: ${Pe};
889
889
  }
890
- `;var Xr=class extends F{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Text field")}},Yr=Xr.compose({baseName:"text-field",template:Yi,styles:$o,shadowOptions:{delegatesFocus:!0}});Ji().register(Mr(),Gr(),Qr(),Wr(),Vr(),jr(),Lr(),Yr());var mn=acquireVsCodeApi();function Wt(r,t){mn.postMessage({type:r,body:t})}var bn=["startup","runtime-global","runtime-per-user"],vt,gn={version:document.getElementById("version")},yt={setting_bool:document.getElementById("setting-bool"),setting_number:document.getElementById("setting-number"),setting_string:document.getElementById("setting-string"),setting_color:document.getElementById("setting-color"),setting_add:document.getElementById("setting-add")};window.addEventListener("change",r=>{let t=r.target;if(t.classList.contains("setting-value")){let e=t.closest("tbody").id,i=t.closest("tr").id;switch(t.localName){case"vscode-text-field":{let o=vt[e][i];switch(o.type){case"int":try{o.value=BigInt.asIntN(64,BigInt(t.value))}catch{t.value=o.value.toString();return}break;case"number":o.value=Number(t.value),t.value=o.value.toString();break;case"string":o.value=t.value;break;case"color":t.classList.contains("setting-a-value")&&(o.value.a=Number(t.value),o.value.a=Math.max(0,Math.min(1,o.value.a)),t.value=o.value.a.toString());break}Wt("edit",{scope:e,name:i,value:je(o)});break}case"vscode-checkbox":{let o=vt[e][i];o.value=t.checked,Wt("edit",{scope:e,name:i,value:o});break}case"input":if(t.classList.contains("setting-color-value")){let o=vt[e][i],n=t.value.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i);o.value.r=parseInt(n[1],16)/255,o.value.g=parseInt(n[2],16)/255,o.value.b=parseInt(n[3],16)/255,Wt("edit",{scope:e,name:i,value:o});break}}}});window.addEventListener("click",r=>{let e=r.target.closest("vscode-button");if(e){let o=e.closest("tbody").id;if(e.classList.contains("setting-addbtn")){let n=e.closest("tr"),s=n.querySelector(".setting-add-name");if(!s.value||document.getElementById(s.value))return;let a=n.querySelector(".setting-add-type"),d;switch(a.value){case"string":d={type:"string",value:""};break;case"number":d={type:"number",value:0};break;case"int":d={type:"int",value:0n};break;case"bool":d={type:"bool",value:!1};break;case"color":d={type:"color",value:{r:0,g:0,b:0,a:1}};break}vt[o][s.value]=d,n.before(To(s.value,d)),Wt("edit",{scope:o,name:s.value,value:je(d)}),s.value=""}else if(e.classList.contains("setting-delete")){let n=e.closest("tr"),s=n.id;n.remove(),delete vt[o][s],Wt("edit",{scope:o,name:s,value:{type:"none"}})}}});function To(r,t){let e;switch(t.type){case"bool":{e=yt.setting_bool.content.cloneNode(!0);let i=e.querySelector("tr"),o=e.querySelector(".setting-name"),n=e.querySelector(".setting-value");i.id=r,o.append(r),n.checked=t.value;break}case"int":case"number":{e=yt.setting_number.content.cloneNode(!0);let i=e.querySelector("tr"),o=e.querySelector(".setting-name"),n=e.querySelector(".setting-value");i.id=r,o.append(r),n.value=t.value.toString();break}case"string":{e=yt.setting_string.content.cloneNode(!0);let i=e.querySelector("tr"),o=e.querySelector(".setting-name"),n=e.querySelector(".setting-value");i.id=r,o.append(r),n.value=t.value;break}case"color":{e=yt.setting_color.content.cloneNode(!0);let i=e.querySelector("tr"),o=e.querySelector(".setting-name"),n=e.querySelector(".setting-color-value"),s=e.querySelector(".setting-a-value");i.id=r,o.append(r),n.value=`#${Math.round(t.value.r*255).toString(16).padStart(2,"0")}${Math.round(t.value.g*255).toString(16).padStart(2,"0")}${Math.round(t.value.b*255).toString(16).padStart(2,"0")}`,s.value=t.value.a.toString();break}}return e}window.addEventListener("message",async r=>{let{type:t,body:e}=r.data;switch(t){case"init":let i=e;vt=JSON.parse(i.settings,Zr),gn.version.innerText=i.version;let o=yt.setting_add.content.querySelector(".setting-add-type");o.children[3].hidden=!i.saves_ints;for(let n in yt){let s=yt[n];s.content.querySelectorAll("vscode-text-field").forEach(a=>a.disabled=i.editable),s.content.querySelectorAll("vscode-checkbox").forEach(a=>a.disabled=i.editable),s.content.querySelectorAll("vscode-dropdown").forEach(a=>a.disabled=i.editable),s.content.querySelectorAll("vscode-button").forEach(a=>a.disabled=i.editable)}for(let n of bn){let s=document.getElementById(n);s.replaceChildren();for(let a in vt[n]){let d=vt[n][a];s.append(To(a,d))}if(i.editable){let a=yt.setting_add.content.cloneNode(!0);s.append(a)}}break}});Wt("ready",{});
891
- /*! Bundled license information:
892
-
893
- tslib/tslib.es6.js:
894
- (*! *****************************************************************************
895
- Copyright (c) Microsoft Corporation.
896
-
897
- Permission to use, copy, modify, and/or distribute this software for any
898
- purpose with or without fee is hereby granted.
899
-
900
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
901
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
902
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
903
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
904
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
905
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
906
- PERFORMANCE OF THIS SOFTWARE.
907
- ***************************************************************************** *)
908
- */
890
+ `;var Xi=class extends M{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Text field")}},Yi=Xi.compose({baseName:"text-field",template:Jo,styles:Cr,shadowOptions:{delegatesFocus:!0}});Zo().register(Bi(),Gi(),Qi(),Wi(),Vi(),ji(),Li(),Yi());var fn=acquireVsCodeApi();function We(i,e){fn.postMessage({type:i,body:e})}var mn=["startup","runtime-global","runtime-per-user"],ye,bn={version:document.getElementById("version")},ve={setting_bool:document.getElementById("setting-bool"),setting_number:document.getElementById("setting-number"),setting_string:document.getElementById("setting-string"),setting_color:document.getElementById("setting-color"),setting_add:document.getElementById("setting-add")};window.addEventListener("change",i=>{let e=i.target;if(e.classList.contains("setting-value")){let t=e.closest("tbody").id,o=e.closest("tr").id;switch(e.localName){case"vscode-text-field":{let r=ye[t][o];switch(r.type){case"int":try{r.value=BigInt.asIntN(64,BigInt(e.value))}catch{e.value=r.value.toString();return}break;case"number":r.value=Number(e.value),e.value=r.value.toString();break;case"string":r.value=e.value;break;case"color":e.classList.contains("setting-a-value")&&(r.value.a=Number(e.value),r.value.a=Math.max(0,Math.min(1,r.value.a)),e.value=r.value.a.toString());break}We("edit",{scope:t,name:o,value:jt(r)});break}case"vscode-checkbox":{let r=ye[t][o];r.value=e.checked,We("edit",{scope:t,name:o,value:r});break}case"input":if(e.classList.contains("setting-color-value")){let r=ye[t][o],n=e.value.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i);r.value.r=parseInt(n[1],16)/255,r.value.g=parseInt(n[2],16)/255,r.value.b=parseInt(n[3],16)/255,We("edit",{scope:t,name:o,value:r});break}}}});window.addEventListener("click",i=>{let t=i.target.closest("vscode-button");if(t){let r=t.closest("tbody").id;if(t.classList.contains("setting-addbtn")){let n=t.closest("tr"),s=n.querySelector(".setting-add-name");if(!s.value||document.getElementById(s.value))return;let a=n.querySelector(".setting-add-type"),d;switch(a.value){case"string":d={type:"string",value:""};break;case"number":d={type:"number",value:0};break;case"int":d={type:"int",value:0n};break;case"bool":d={type:"bool",value:!1};break;case"color":d={type:"color",value:{r:0,g:0,b:0,a:1}};break}ye[r][s.value]=d,n.before($r(s.value,d)),We("edit",{scope:r,name:s.value,value:jt(d)}),s.value=""}else if(t.classList.contains("setting-delete")){let n=t.closest("tr"),s=n.id;n.remove(),delete ye[r][s],We("edit",{scope:r,name:s,value:{type:"none"}})}}});function $r(i,e){let t;switch(e.type){case"bool":{t=ve.setting_bool.content.cloneNode(!0);let o=t.querySelector("tr"),r=t.querySelector(".setting-name"),n=t.querySelector(".setting-value");o.id=i,r.append(i),n.checked=e.value;break}case"int":case"number":{t=ve.setting_number.content.cloneNode(!0);let o=t.querySelector("tr"),r=t.querySelector(".setting-name"),n=t.querySelector(".setting-value");o.id=i,r.append(i),n.value=e.value.toString();break}case"string":{t=ve.setting_string.content.cloneNode(!0);let o=t.querySelector("tr"),r=t.querySelector(".setting-name"),n=t.querySelector(".setting-value");o.id=i,r.append(i),n.value=e.value;break}case"color":{t=ve.setting_color.content.cloneNode(!0);let o=t.querySelector("tr"),r=t.querySelector(".setting-name"),n=t.querySelector(".setting-color-value"),s=t.querySelector(".setting-a-value");o.id=i,r.append(i),n.value=`#${Math.round(e.value.r*255).toString(16).padStart(2,"0")}${Math.round(e.value.g*255).toString(16).padStart(2,"0")}${Math.round(e.value.b*255).toString(16).padStart(2,"0")}`,s.value=e.value.a.toString();break}}return t}window.addEventListener("message",i=>{let{type:e,body:t}=i.data;switch(e){case"init":let o=t;ye=JSON.parse(o.settings,Zi),bn.version.innerText=o.version;let r=ve.setting_add.content.querySelector(".setting-add-type");r.children[3].hidden=!o.saves_ints;for(let n in ve){let s=ve[n];s.content.querySelectorAll("vscode-text-field").forEach(a=>a.disabled=o.editable),s.content.querySelectorAll("vscode-checkbox").forEach(a=>a.disabled=o.editable),s.content.querySelectorAll("vscode-dropdown").forEach(a=>a.disabled=o.editable),s.content.querySelectorAll("vscode-button").forEach(a=>a.disabled=o.editable)}for(let n of mn){let s=document.getElementById(n);s.replaceChildren();for(let a in ye[n]){let d=ye[n][a];s.append($r(a,d))}if(o.editable){let a=ve.setting_add.content.cloneNode(!0);s.append(a)}}break}});We("ready",{});
909
891
  //# sourceMappingURL=ModSettingsWebview.js.map