diff --git a/.gitignore b/.gitignore index eae21991..0b3beb13 100644 --- a/.gitignore +++ b/.gitignore @@ -83,4 +83,7 @@ fsacpath.txt build/bin build/obj + +# include vscode ui toolkit minified release file +!release/toolkit.min.js release/fsharp.js.LICENSE.txt diff --git a/release/toolkit.min.js b/release/toolkit.min.js new file mode 100644 index 00000000..ce61e0c8 --- /dev/null +++ b/release/toolkit.min.js @@ -0,0 +1,30 @@ +const e=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof global)return global;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;try{return new Function("return this")()}catch(e){return{}}}();void 0===e.trustedTypes&&(e.trustedTypes={createPolicy:(e,t)=>t});const t={configurable:!1,enumerable:!1,writable:!1};void 0===e.FAST&&Reflect.defineProperty(e,"FAST",Object.assign({value:Object.create(null)},t));const i=e.FAST;if(void 0===i.getById){const e=Object.create(null);Reflect.defineProperty(i,"getById",Object.assign({value(t,i){let s=e[t];return void 0===s&&(s=i?e[t]=i():null),s}},t))}const s=Object.freeze([]),o=e.FAST.getById(1,(()=>{const t=[],i=[];function s(){if(i.length)throw i.shift()}function o(e){try{e.call()}catch(e){i.push(e),setTimeout(s,0)}}function n(){let e=0;for(;e1024){for(let i=0,s=t.length-e;ie});let r=n;const a=`fast-${Math.random().toString(36).substring(2,8)}`,l=`${a}{`,d=`}${a}`,c=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(e){if(r!==n)throw new Error("The HTML policy can only be set once.");r=e},createHTML:e=>r.createHTML(e),isMarker:e=>e&&8===e.nodeType&&e.data.startsWith(a),extractDirectiveIndexFromMarker:e=>parseInt(e.data.replace(`${a}:`,"")),createInterpolationPlaceholder:e=>`${l}${e}${d}`,createCustomAttributePlaceholder(e,t){return`${e}="${this.createInterpolationPlaceholder(t)}"`},createBlockPlaceholder:e=>`\x3c!--${a}:${e}--\x3e`,queueUpdate:o.enqueue,processUpdates:o.process,nextUpdate:()=>new Promise(o.enqueue),setAttribute(e,t,i){null==i?e.removeAttribute(t):e.setAttribute(t,i)},setBooleanAttribute(e,t,i){i?e.setAttribute(t,""):e.removeAttribute(t)},removeChildNodes(e){for(let t=e.firstChild;null!==t;t=e.firstChild)e.removeChild(t)},createTemplateWalker:e=>document.createTreeWalker(e,133,null,!1)});function h(e){const t=this.spillover;-1===t.indexOf(e)&&t.push(e)}function u(e){const t=this.spillover,i=t.indexOf(e);-1!==i&&t.splice(i,1)}function p(e){const t=this.spillover,i=this.source;for(let s=0,o=t.length;s{const e=/(:|&&|\|\||if)/,t=new WeakMap,i=new WeakMap,s=c.queueUpdate;let o,n=e=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function r(e){let i=e.$fastController||t.get(e);return void 0===i&&(Array.isArray(e)?i=n(e):t.set(e,i=new g(e))),i}function a(e){let t=i.get(e);if(void 0===t){let s=Reflect.getPrototypeOf(e);for(;void 0===t&&null!==s;)t=i.get(s),s=Reflect.getPrototypeOf(s);t=void 0===t?[]:t.slice(0),i.set(e,t)}return t}class l{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==o&&o.watch(e,this.name),e[this.field]}setValue(e,t){const i=this.field,s=e[i];if(s!==t){e[i]=t;const o=e[this.callback];"function"==typeof o&&o.call(e,s,t),r(e).notify(this.name)}}}class d extends b{constructor(e,t,i=!1){super(e,t),this.binding=e,this.isVolatileBinding=i,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(e,t){this.needsRefresh&&null!==this.last&&this.disconnect();const i=o;o=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;const s=this.binding(e,t);return o=i,s}disconnect(){if(null!==this.last){let e=this.first;for(;void 0!==e;)e.notifier.unsubscribe(this,e.propertyName),e=e.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(e,t){const i=this.last,s=r(e),n=null===i?this.first:{};if(n.propertySource=e,n.propertyName=t,n.notifier=s,s.subscribe(this,t),null!==i){if(!this.needsRefresh){let t;o=void 0,t=i.propertySource[i.propertyName],o=this,e===t&&(this.needsRefresh=!0)}i.next=n}this.last=n}handleChange(){this.needsQueue&&(this.needsQueue=!1,s(this))}call(){null!==this.last&&(this.needsQueue=!0,this.notify(this))}records(){let e=this.first;return{next:()=>{const t=e;return void 0===t?{value:void 0,done:!0}:(e=e.next,{value:t,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(e){n=e},getNotifier:r,track(e,t){void 0!==o&&o.watch(e,t)},trackVolatile(){void 0!==o&&(o.needsRefresh=!0)},notify(e,t){r(e).notify(t)},defineProperty(e,t){"string"==typeof t&&(t=new l(t)),a(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get:function(){return t.getValue(this)},set:function(e){t.setValue(this,e)}})},getAccessors:a,binding(e,t,i=this.isVolatileBinding(e)){return new d(e,t,i)},isVolatileBinding:t=>e.test(t.toString())})}));function v(e,t){m.defineProperty(e,t)}const y=i.getById(3,(()=>{let e=null;return{get:()=>e,set(t){e=t}}}));class x{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return y.get()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(e){y.set(e)}}m.defineProperty(x.prototype,"index"),m.defineProperty(x.prototype,"length");const C=Object.seal(new x);class w{constructor(){this.targetIndex=0}}class $ extends w{constructor(){super(...arguments),this.createPlaceholder=c.createInterpolationPlaceholder}}class k extends w{constructor(e,t,i){super(),this.name=e,this.behavior=t,this.options=i}createPlaceholder(e){return c.createCustomAttributePlaceholder(this.name,e)}createBehavior(e){return new this.behavior(e,this.options)}}function T(e,t){this.source=e,this.context=t,null===this.bindingObserver&&(this.bindingObserver=m.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(e,t))}function I(e,t){this.source=e,this.context=t,this.target.addEventListener(this.targetName,this)}function O(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function R(){this.bindingObserver.disconnect(),this.source=null,this.context=null;const e=this.target.$fastView;void 0!==e&&e.isComposed&&(e.unbind(),e.needsBindOnly=!0)}function A(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function S(e){c.setAttribute(this.target,this.targetName,e)}function E(e){c.setBooleanAttribute(this.target,this.targetName,e)}function D(e){if(null==e&&(e=""),e.create){this.target.textContent="";let t=this.target.$fastView;void 0===t?t=e.create():this.target.$fastTemplate!==e&&(t.isComposed&&(t.remove(),t.unbind()),t=e.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=e)}else{const t=this.target.$fastView;void 0!==t&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),this.target.textContent=e}}function P(e){this.target[this.targetName]=e}function B(e){const t=this.classVersions||Object.create(null),i=this.target;let s=this.version||0;if(null!=e&&e.length){const o=e.split(/\s+/);for(let e=0,n=o.length;ec.createHTML(e(t,i))}break;case"?":this.cleanedTargetName=e.substr(1),this.updateTarget=E;break;case"@":this.cleanedTargetName=e.substr(1),this.bind=I,this.unbind=A;break;default:this.cleanedTargetName=e,"class"===e&&(this.updateTarget=B)}}targetAtContent(){this.updateTarget=D,this.unbind=R}createBehavior(e){return new L(e,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}}class L{constructor(e,t,i,s,o,n,r){this.source=null,this.context=null,this.bindingObserver=null,this.target=e,this.binding=t,this.isBindingVolatile=i,this.bind=s,this.unbind=o,this.updateTarget=n,this.targetName=r}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(e){x.setEvent(e);const t=this.binding(this.source,this.context);x.setEvent(null),!0!==t&&e.preventDefault()}}let V=null;class H{addFactory(e){e.targetIndex=this.targetIndex,this.behaviorFactories.push(e)}captureContentBinding(e){e.targetAtContent(),this.addFactory(e)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){V=this}static borrow(e){const t=V||new H;return t.directives=e,t.reset(),V=null,t}}function M(e){if(1===e.length)return e[0];let t;const i=e.length,s=e.map((e=>"string"==typeof e?()=>e:(t=e.targetName||t,e.binding))),o=new F(((e,t)=>{let o="";for(let n=0;na)),d.targetName=r.name):d=M(l),null!==d&&(t.removeAttributeNode(r),o--,n--,e.addFactory(d))}}function _(e,t,i){const s=z(e,t.textContent);if(null!==s){let o=t;for(let n=0,r=s.length;n0}const t=this.fragment.cloneNode(!0),i=this.viewBehaviorFactories,s=new Array(this.behaviorCount),o=c.createTemplateWalker(t);let n=0,r=this.targetOffset,a=o.nextNode();for(let e=i.length;n=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function W(e,...t){const i=[];let s="";for(let o=0,n=e.length-1;oe}if("function"==typeof r&&(r=new F(r)),r instanceof $){const e=G.exec(n);null!==e&&(r.targetName=e[2])}r instanceof w?(s+=r.createPlaceholder(i.length),i.push(r)):s+=r}return s+=e[e.length-1],new K(s,i)}class Q{constructor(){this.targets=new WeakSet,this.behaviors=null}addStylesTo(e){this.targets.add(e)}removeStylesFrom(e){this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=null===this.behaviors?e:this.behaviors.concat(e),this}}function Y(e){return e.map((e=>e instanceof Q?Y(e.styles):[e])).reduce(((e,t)=>e.concat(t)),[])}function X(e){return e.map((e=>e instanceof Q?e.behaviors:null)).reduce(((e,t)=>null===t?e:(null===e&&(e=[]),e.concat(t))),null)}Q.create=(()=>{if(c.supportsAdoptedStyleSheets){const e=new Map;return t=>new J(t,e)}return e=>new ee(e)})();class J extends Q{constructor(e,t){super(),this.styles=e,this.styleSheetCache=t,this._styleSheets=void 0,this.behaviors=X(e)}get styleSheets(){if(void 0===this._styleSheets){const e=this.styles,t=this.styleSheetCache;this._styleSheets=Y(e).map((e=>{if(e instanceof CSSStyleSheet)return e;let i=t.get(e);return void 0===i&&(i=new CSSStyleSheet,i.replaceSync(e),t.set(e,i)),i}))}return this._styleSheets}addStylesTo(e){e.adoptedStyleSheets=[...e.adoptedStyleSheets,...this.styleSheets],super.addStylesTo(e)}removeStylesFrom(e){const t=this.styleSheets;e.adoptedStyleSheets=e.adoptedStyleSheets.filter((e=>-1===t.indexOf(e))),super.removeStylesFrom(e)}}let Z=0;class ee extends Q{constructor(e){super(),this.styles=e,this.behaviors=null,this.behaviors=X(e),this.styleSheets=Y(e),this.styleClass="fast-style-class-"+ ++Z}addStylesTo(e){const t=this.styleSheets,i=this.styleClass;e=this.normalizeTarget(e);for(let s=0;se?"true":"false",fromView:e=>null!=e&&"false"!==e&&!1!==e&&0!==e},ie={toView(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t.toString()},fromView(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}};class se{constructor(e,t,i=t.toLowerCase(),s="reflect",o){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=i,this.mode=s,this.converter=o,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,"boolean"===s&&void 0===o&&(this.converter=te)}setValue(e,t){const i=e[this.fieldName],s=this.converter;void 0!==s&&(t=s.fromView(t)),i!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](i,t),e.$fastController.notify(this.name))}getValue(e){return m.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){const t=this.mode,i=this.guards;i.has(e)||"fromView"===t||c.queueUpdate((()=>{i.add(e);const s=e[this.fieldName];switch(t){case"reflect":const t=this.converter;c.setAttribute(e,this.attribute,void 0!==t?t.toView(s):s);break;case"boolean":c.setBooleanAttribute(e,this.attribute,s)}i.delete(e)}))}static collect(e,...t){const i=[];t.push(e.attributes);for(let s=0,o=t.length;s1&&(i.property=t);const s=e.constructor.attributes||(e.constructor.attributes=[]);s.push(i)}return arguments.length>1?(i={},void s(e,t)):(i=void 0===e?{}:e,s)}const ne={mode:"open"},re={},ae=i.getById(4,(()=>{const e=new Map;return Object.freeze({register:t=>!e.has(t.type)&&(e.set(t.type,t),!0),getByType:t=>e.get(t)})}));class le{constructor(e,t=e.definition){"string"==typeof t&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template;const i=se.collect(e,t.attributes),s=new Array(i.length),o={},n={};for(let e=0,t=i.length;e0){const t=this.boundObservables=Object.create(null);for(let i=0,o=s.length;ipe(e),define:(e,t)=>new le(e,t).define().type});class be{createCSS(){return""}createBehavior(){}}function ge(e,...t){const{styles:i,behaviors:s}=function(e,t){const i=[];let s="";const o=[];for(let n=0,r=e.length-1;n0||i>0;){if(0===t){o.push(2),i--;continue}if(0===i){o.push(3),t--;continue}const n=e[t-1][i-1],r=e[t-1][i],a=e[t][i-1];let l;l=r=0){e.splice(t,1),t--,r-=i.addedCount-i.removed.length,o.addedCount+=i.addedCount-s;const a=o.removed.length+i.removed.length-s;if(o.addedCount||a){let e=i.removed;if(o.indexi.index+i.addedCount){const t=o.removed.slice(i.index+i.addedCount-o.index);ye.apply(e,t)}o.removed=e,i.indexs?i=s-e.addedCount:i<0&&(i=s+e.removed.length+i-e.addedCount),i<0&&(i=0),e.index=i,e}class ke extends b{constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this.call=this.flush,Reflect.defineProperty(e,"$fastController",{value:this,enumerable:!1})}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.needsQueue&&(this.needsQueue=!1,c.queueUpdate(this))}reset(e){this.oldCollection=e,this.needsQueue&&(this.needsQueue=!1,c.queueUpdate(this))}flush(){const e=this.splices,t=this.oldCollection;if(void 0===e&&void 0===t)return;this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0;const i=void 0===t?Ce(this.source,e):ve(this.source,0,this.source.length,t,0,t.length);this.notify(i)}}class Te{constructor(e,t){this.target=e,this.propertyName=t}bind(e){e[this.propertyName]=this.target}unbind(){}}function Ie(e){return new k("fast-ref",Te,e)}function Oe(e,t){const i="function"==typeof t?t:()=>t;return(t,s)=>e(t,s)?i(t,s):null}function Re(e,t,i,s){e.bind(t[i],s)}function Ae(e,t,i,s){const o=Object.create(s);o.index=i,o.length=t.length,e.bind(t[i],o)}Object.freeze({positioning:!1,recycle:!0});class Se{constructor(e,t,i,s,o,n){this.location=e,this.itemsBinding=t,this.templateBinding=s,this.options=n,this.source=null,this.views=[],this.items=null,this.itemsObserver=null,this.originalContext=void 0,this.childContext=void 0,this.bindView=Re,this.itemsBindingObserver=m.binding(t,this,i),this.templateBindingObserver=m.binding(s,this,o),n.positioning&&(this.bindView=Ae)}bind(e,t){this.source=e,this.originalContext=t,this.childContext=Object.create(t),this.childContext.parent=e,this.childContext.parentContext=this.originalContext,this.items=this.itemsBindingObserver.observe(e,this.originalContext),this.template=this.templateBindingObserver.observe(e,this.originalContext),this.observeItems(!0),this.refreshAllViews()}unbind(){this.source=null,this.items=null,null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews(),this.itemsBindingObserver.disconnect(),this.templateBindingObserver.disconnect()}handleChange(e,t){e===this.itemsBinding?(this.items=this.itemsBindingObserver.observe(this.source,this.originalContext),this.observeItems(),this.refreshAllViews()):e===this.templateBinding?(this.template=this.templateBindingObserver.observe(this.source,this.originalContext),this.refreshAllViews(!0)):this.updateViews(t)}observeItems(e=!1){if(!this.items)return void(this.items=s);const t=this.itemsObserver,i=this.itemsObserver=m.getNotifier(this.items),o=t!==i;o&&null!==t&&t.unsubscribe(this),(o||e)&&i.subscribe(this)}updateViews(e){const t=this.childContext,i=this.views,s=[],o=this.bindView;let n=0;for(let t=0,o=e.length;t0?s.shift():a.create();i.splice(d,0,l),o(l,r,d,t),l.insertBefore(n)}}for(let e=0,t=s.length;enew ke(e)));const e=Array.prototype;if(e.$fastPatch)return;Reflect.defineProperty(e,"$fastPatch",{value:1,enumerable:!1});const t=e.pop,i=e.push,s=e.reverse,o=e.shift,n=e.sort,r=e.splice,a=e.unshift;e.pop=function(){const e=this.length>0,i=t.apply(this,arguments),s=this.$fastController;return void 0!==s&&e&&s.addSplice(me(this.length,[i],0)),i},e.push=function(){const e=i.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice($e(me(this.length-arguments.length,[],arguments.length),this)),e},e.reverse=function(){let e;const t=this.$fastController;void 0!==t&&(t.flush(),e=this.slice());const i=s.apply(this,arguments);return void 0!==t&&t.reset(e),i},e.shift=function(){const e=this.length>0,t=o.apply(this,arguments),i=this.$fastController;return void 0!==i&&e&&i.addSplice(me(0,[t],0)),t},e.sort=function(){let e;const t=this.$fastController;void 0!==t&&(t.flush(),e=this.slice());const i=n.apply(this,arguments);return void 0!==t&&t.reset(e),i},e.splice=function(){const e=r.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice($e(me(+arguments[0],e,arguments.length>2?arguments.length-2:0),this)),e},e.unshift=function(){const e=a.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice($e(me(0,[],arguments.length),this)),e}}(),this.isItemsBindingVolatile=m.isVolatileBinding(e),this.isTemplateBindingVolatile=m.isVolatileBinding(t)}createBehavior(e){return new Se(e,this.itemsBinding,this.isItemsBindingVolatile,this.templateBinding,this.isTemplateBindingVolatile,this.options)}}function De(e){return e?function(t,i,s){return 1===t.nodeType&&t.matches(e)}:function(e,t,i){return 1===e.nodeType}}class Pe{constructor(e,t){this.target=e,this.options=t,this.source=null}bind(e){const t=this.options.property;this.shouldUpdate=m.getAccessors(e).some((e=>e.name===t)),this.source=e,this.updateTarget(this.computeNodes()),this.shouldUpdate&&this.observe()}unbind(){this.updateTarget(s),this.source=null,this.shouldUpdate&&this.disconnect()}handleEvent(){this.updateTarget(this.computeNodes())}computeNodes(){let e=this.getNodes();return void 0!==this.options.filter&&(e=e.filter(this.options.filter)),e}updateTarget(e){this.source[this.options.property]=e}}class Be extends Pe{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 Fe(e){return"string"==typeof e&&(e={property:e}),new k("fast-slotted",Be,e)}class Le extends Pe{constructor(e,t){super(e,t),this.observer=null,t.childList=!0}observe(){null===this.observer&&(this.observer=new MutationObserver(this.handleEvent.bind(this))),this.observer.observe(this.target,this.options)}disconnect(){this.observer.disconnect()}getNodes(){return"subtree"in this.options?Array.from(this.target.querySelectorAll(this.options.selector)):Array.from(this.target.childNodes)}}function Ve(e){return"string"==typeof e&&(e={property:e}),new k("fast-children",Le,e)}class He{handleStartContentChange(){this.startContainer.classList.toggle("start",this.start.assignedNodes().length>0)}handleEndContentChange(){this.endContainer.classList.toggle("end",this.end.assignedNodes().length>0)}}const Me=(e,t)=>W`t.end?"end":void 0}>${t.end||""}`,Ne=(e,t)=>W`${t.start||""}`; +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +function ze(e,t,i,s){var o,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(n<3?o(r):n>3?o(t,i,r):o(t,i))||r);return n>3&&r&&Object.defineProperty(t,i,r),r}W``,W``;const je=new Map;"metadata"in Reflect||(Reflect.metadata=function(e,t){return function(i){Reflect.defineMetadata(e,t,i)}},Reflect.defineMetadata=function(e,t,i){let s=je.get(i);void 0===s&&je.set(i,s=new Map),s.set(e,t)},Reflect.getOwnMetadata=function(e,t){const i=je.get(t);if(void 0!==i)return i.get(e)});class _e{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,ht(e))}aliasTo(e){return this.registerResolver(5,e)}registerResolver(e,t){const{container:i,key:s}=this;return this.container=this.key=void 0,i.registerResolver(s,new Ze(s,e,t))}}function qe(e){const t=e.slice(),i=Object.keys(e),s=i.length;let o;for(let n=0;nnew Ze(e,1,e),transient:e=>new Ze(e,2,e)}),Ke=Object.freeze({default:Object.freeze({parentLocator:()=>null,responsibleForOwnerRequests:!1,defaultResolver:Ue.singleton})}),Ge=new Map;function We(e){return t=>Reflect.getOwnMetadata(e,t)}let Qe=null;const Ye=Object.freeze({createContainer:e=>new dt(null,Object.assign({},Ke.default,e)),findResponsibleContainer(e){const t=e.$$container$$;return t&&t.responsibleForOwnerRequests?t:Ye.findParentContainer(e)},findParentContainer(e){const t=new CustomEvent(at,{bubbles:!0,composed:!0,cancelable:!0,detail:{container:void 0}});return e.dispatchEvent(t),t.detail.container||Ye.getOrCreateDOMContainer()},getOrCreateDOMContainer:(e,t)=>e?e.$$container$$||new dt(e,Object.assign({},Ke.default,t,{parentLocator:Ye.findParentContainer})):Qe||(Qe=new dt(null,Object.assign({},Ke.default,t,{parentLocator:()=>null}))),getDesignParamtypes:We("design:paramtypes"),getAnnotationParamtypes:We("di:paramtypes"),getOrCreateAnnotationParamTypes(e){let t=this.getAnnotationParamtypes(e);return void 0===t&&Reflect.defineMetadata("di:paramtypes",t=[],e),t},getDependencies(e){let t=Ge.get(e);if(void 0===t){const i=e.inject;if(void 0===i){const i=Ye.getDesignParamtypes(e),s=Ye.getAnnotationParamtypes(e);if(void 0===i)if(void 0===s){const i=Object.getPrototypeOf(e);t="function"==typeof i&&i!==Function.prototype?qe(Ye.getDependencies(i)):[]}else t=qe(s);else if(void 0===s)t=qe(i);else{t=qe(i);let e,o=s.length;for(let i=0;i{Ye.findResponsibleContainer(this).get(i)!==this[o]&&(this[o]=e,s.notify(t))};s.subscribe({handleChange:n},"isConnected")}}return e}})},createInterface(e,t){const i="function"==typeof e?e:t,s="string"==typeof e?e:e&&"friendlyName"in e&&e.friendlyName||bt,o="string"!=typeof e&&(e&&"respectConnection"in e&&e.respectConnection||!1),n=function(e,t,i){if(null==e||void 0!==new.target)throw new Error(`No registration for interface: '${n.friendlyName}'`);if(t)Ye.defineProperty(e,t,n,o);else{Ye.getOrCreateAnnotationParamTypes(e)[i]=n}};return n.$isInterface=!0,n.friendlyName=null==s?"(anonymous)":s,null!=i&&(n.register=function(e,t){return i(new _e(e,null!=t?t:n))}),n.toString=function(){return`InterfaceSymbol<${n.friendlyName}>`},n},inject:(...e)=>function(t,i,s){if("number"==typeof s){const i=Ye.getOrCreateAnnotationParamTypes(t),o=e[0];void 0!==o&&(i[s]=o)}else if(i)Ye.defineProperty(t,i,e[0]);else{const i=s?Ye.getOrCreateAnnotationParamTypes(s.value):Ye.getOrCreateAnnotationParamTypes(t);let o;for(let t=0;t(e.register=function(t){return ut.transient(e,e).register(t)},e.registerInRequestor=!1,e),singleton:(e,t=Je)=>(e.register=function(t){return ut.singleton(e,e).register(t)},e.registerInRequestor=t.scoped,e)}),Xe=Ye.createInterface("Container");Ye.inject;const Je={scoped:!1};class Ze{constructor(e,t,i){this.key=e,this.strategy=t,this.state=i,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:{const i=e.getFactory(this.state);if(null===i)throw new Error(`Resolver for ${String(this.key)} returned a null factory`);return i.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,i,s;switch(this.strategy){case 1:case 2:return e.getFactory(this.state);case 5:return null!==(s=null===(i=null===(t=e.getResolver(this.state))||void 0===t?void 0:t.getFactory)||void 0===i?void 0:i.call(t,e))&&void 0!==s?s:null;default:return null}}}function et(e){return this.get(e)}function tt(e,t){return t(e)}class it{constructor(e,t){this.Type=e,this.dependencies=t,this.transformers=null}construct(e,t){let i;return i=void 0===t?new this.Type(...this.dependencies.map(et,e)):new this.Type(...this.dependencies.map(et,e),...t),null==this.transformers?i:this.transformers.reduce(tt,i)}registerTransformer(e){(this.transformers||(this.transformers=[])).push(e)}}const st={$isResolver:!0,resolve:(e,t)=>t};function ot(e){return"function"==typeof e.register}function nt(e){return function(e){return ot(e)&&"boolean"==typeof e.registerInRequestor}(e)&&e.registerInRequestor}const rt=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"]),at="__DI_LOCATE_PARENT__",lt=new Map;class dt{constructor(e,t){this.owner=e,this.config=t,this._parent=void 0,this.registerDepth=0,this.context=null,null!==e&&(e.$$container$$=this),this.resolvers=new Map,this.resolvers.set(Xe,st),e instanceof Node&&e.addEventListener(at,(e=>{e.composedPath()[0]!==this.owner&&(e.detail.container=this,e.stopImmediatePropagation())}))}get parent(){return void 0===this._parent&&(this._parent=this.config.parentLocator(this.owner)),this._parent}get depth(){return null===this.parent?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(100==++this.registerDepth)throw new Error("Unable to autoregister dependency");let t,i,s,o,n;const r=this.context;for(let a=0,l=e.length;athis}))}jitRegister(e,t){if("function"!=typeof e)throw new Error(`Attempted to jitRegister something that is not a constructor: '${e}'. Did you forget to register this dependency?`);if(rt.has(e.name))throw new Error(`Attempted to jitRegister an intrinsic type: ${e.name}. Did you forget to add @inject(Key)`);if(ot(e)){const i=e.register(t);if(!(i instanceof Object)||null==i.resolve){const i=t.resolvers.get(e);if(null!=i)return i;throw new Error("A valid resolver was not returned from the static register method")}return i}if(e.$isInterface)throw new Error(`Attempted to jitRegister an interface: ${e.friendlyName}`);{const i=this.config.defaultResolver(e,t);return t.resolvers.set(e,i),i}}}const ct=new WeakMap;function ht(e){return function(t,i,s){if(ct.has(s))return ct.get(s);const o=e(t,i,s);return ct.set(s,o),o}}const ut=Object.freeze({instance:(e,t)=>new Ze(e,0,t),singleton:(e,t)=>new Ze(e,1,t),transient:(e,t)=>new Ze(e,2,t),callback:(e,t)=>new Ze(e,3,t),cachedCallback:(e,t)=>new Ze(e,3,ht(t)),aliasTo:(e,t)=>new Ze(t,5,e)});function pt(e){if(null==e)throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?")}function ft(e,t,i){if(e instanceof Ze&&4===e.strategy){const s=e.state;let o=s.length;const n=new Array(o);for(;o--;)n[o]=s[o].resolve(t,i);return n}return[e.resolve(t,i)]}const bt="(anonymous)";function gt(e){return"object"==typeof e&&null!==e||"function"==typeof e}const mt=function(){const e=new WeakMap;let t=!1,i="",s=0;return function(o){return t=e.get(o),void 0===t&&(i=o.toString(),s=i.length,t=s>=29&&s<=100&&125===i.charCodeAt(s-1)&&i.charCodeAt(s-2)<=32&&93===i.charCodeAt(s-3)&&101===i.charCodeAt(s-4)&&100===i.charCodeAt(s-5)&&111===i.charCodeAt(s-6)&&99===i.charCodeAt(s-7)&&32===i.charCodeAt(s-8)&&101===i.charCodeAt(s-9)&&118===i.charCodeAt(s-10)&&105===i.charCodeAt(s-11)&&116===i.charCodeAt(s-12)&&97===i.charCodeAt(s-13)&&110===i.charCodeAt(s-14)&&88===i.charCodeAt(s-15),e.set(o,t)),t}}(),vt={};function yt(e){switch(typeof e){case"number":return e>=0&&(0|e)===e;case"string":{const t=vt[e];if(void 0!==t)return t;const i=e.length;if(0===i)return vt[e]=!1;let s=0;for(let t=0;t1||s<48||s>57)return vt[e]=!1;return vt[e]=!0}default:return!1}}function xt(e){return`${e.toLowerCase()}:presentation`}const Ct=new Map,wt=Object.freeze({define(e,t,i){const s=xt(e);void 0===Ct.get(s)?Ct.set(s,t):Ct.set(s,!1),i.register(ut.instance(s,t))},forTag(e,t){const i=xt(e),s=Ct.get(i);if(!1===s){return Ye.findResponsibleContainer(t).get(i)}return s||null}});class $t{constructor(e,t){this.template=e||null,this.styles=void 0===t?null:Array.isArray(t)?Q.create(t):t instanceof Q?t:Q.create([t])}applyTo(e){const t=e.$fastController;null===t.template&&(t.template=this.template),null===t.styles&&(t.styles=this.styles)}}class kt extends fe{constructor(){super(...arguments),this._presentation=void 0}get $presentation(){return void 0===this._presentation&&(this._presentation=wt.forTag(this.tagName,this)),this._presentation}templateChanged(){void 0!==this.template&&(this.$fastController.template=this.template)}stylesChanged(){void 0!==this.styles&&(this.$fastController.styles=this.styles)}connectedCallback(){null!==this.$presentation&&this.$presentation.applyTo(this),super.connectedCallback()}static compose(e){return(t={})=>new It(this===kt?class extends kt{}:this,e,t)}}function Tt(e,t,i){return"function"==typeof e?e(t,i):e}ze([v],kt.prototype,"template",void 0),ze([v],kt.prototype,"styles",void 0);class It{constructor(e,t,i){this.type=e,this.elementDefinition=t,this.overrideDefinition=i,this.definition=Object.assign(Object.assign({},this.elementDefinition),this.overrideDefinition)}register(e,t){const i=this.definition,s=this.overrideDefinition,o=`${i.prefix||t.elementPrefix}-${i.baseName}`;t.tryDefineElement({name:o,type:this.type,baseClass:this.elementDefinition.baseClass,callback:e=>{const t=new $t(Tt(i.template,e,i),Tt(i.styles,e,i));e.definePresentation(t);let o=Tt(i.shadowOptions,e,i);e.shadowRootMode&&(o?s.shadowOptions||(o.mode=e.shadowRootMode):null!==o&&(o={mode:e.shadowRootMode})),e.defineElement({elementOptions:Tt(i.elementOptions,e,i),shadowOptions:o,attributes:Tt(i.attributes,e,i)})}})}}function Ot(e,...t){t.forEach((t=>{if(Object.getOwnPropertyNames(t.prototype).forEach((i=>{"constructor"!==i&&Object.defineProperty(e.prototype,i,Object.getOwnPropertyDescriptor(t.prototype,i))})),t.attributes){const i=e.attributes||[];e.attributes=i.concat(t.attributes)}}))}var Rt;let At;!function(e){e.horizontal="horizontal",e.vertical="vertical"}(Rt||(Rt={}));var St;!function(e){e[e.alt=18]="alt",e[e.arrowDown=40]="arrowDown",e[e.arrowLeft=37]="arrowLeft",e[e.arrowRight=39]="arrowRight",e[e.arrowUp=38]="arrowUp",e[e.back=8]="back",e[e.backSlash=220]="backSlash",e[e.break=19]="break",e[e.capsLock=20]="capsLock",e[e.closeBracket=221]="closeBracket",e[e.colon=186]="colon",e[e.colon2=59]="colon2",e[e.comma=188]="comma",e[e.ctrl=17]="ctrl",e[e.delete=46]="delete",e[e.end=35]="end",e[e.enter=13]="enter",e[e.equals=187]="equals",e[e.equals2=61]="equals2",e[e.equals3=107]="equals3",e[e.escape=27]="escape",e[e.forwardSlash=191]="forwardSlash",e[e.function1=112]="function1",e[e.function10=121]="function10",e[e.function11=122]="function11",e[e.function12=123]="function12",e[e.function2=113]="function2",e[e.function3=114]="function3",e[e.function4=115]="function4",e[e.function5=116]="function5",e[e.function6=117]="function6",e[e.function7=118]="function7",e[e.function8=119]="function8",e[e.function9=120]="function9",e[e.home=36]="home",e[e.insert=45]="insert",e[e.menu=93]="menu",e[e.minus=189]="minus",e[e.minus2=109]="minus2",e[e.numLock=144]="numLock",e[e.numPad0=96]="numPad0",e[e.numPad1=97]="numPad1",e[e.numPad2=98]="numPad2",e[e.numPad3=99]="numPad3",e[e.numPad4=100]="numPad4",e[e.numPad5=101]="numPad5",e[e.numPad6=102]="numPad6",e[e.numPad7=103]="numPad7",e[e.numPad8=104]="numPad8",e[e.numPad9=105]="numPad9",e[e.numPadDivide=111]="numPadDivide",e[e.numPadDot=110]="numPadDot",e[e.numPadMinus=109]="numPadMinus",e[e.numPadMultiply=106]="numPadMultiply",e[e.numPadPlus=107]="numPadPlus",e[e.openBracket=219]="openBracket",e[e.pageDown=34]="pageDown",e[e.pageUp=33]="pageUp",e[e.period=190]="period",e[e.print=44]="print",e[e.quote=222]="quote",e[e.scrollLock=145]="scrollLock",e[e.shift=16]="shift",e[e.space=32]="space",e[e.tab=9]="tab",e[e.tilde=192]="tilde",e[e.windowsLeft=91]="windowsLeft",e[e.windowsOpera=219]="windowsOpera",e[e.windowsRight=92]="windowsRight"}(St||(St={}));const Et={ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",ArrowUp:"ArrowUp"};var Dt;!function(e){e.ltr="ltr",e.rtl="rtl"}(Dt||(Dt={}));let Pt=0;function Bt(e=""){return`${e}${Pt++}`}class Ft{}ze([oe({attribute:"aria-atomic",mode:"fromView"})],Ft.prototype,"ariaAtomic",void 0),ze([oe({attribute:"aria-busy",mode:"fromView"})],Ft.prototype,"ariaBusy",void 0),ze([oe({attribute:"aria-controls",mode:"fromView"})],Ft.prototype,"ariaControls",void 0),ze([oe({attribute:"aria-current",mode:"fromView"})],Ft.prototype,"ariaCurrent",void 0),ze([oe({attribute:"aria-describedby",mode:"fromView"})],Ft.prototype,"ariaDescribedby",void 0),ze([oe({attribute:"aria-details",mode:"fromView"})],Ft.prototype,"ariaDetails",void 0),ze([oe({attribute:"aria-disabled",mode:"fromView"})],Ft.prototype,"ariaDisabled",void 0),ze([oe({attribute:"aria-errormessage",mode:"fromView"})],Ft.prototype,"ariaErrormessage",void 0),ze([oe({attribute:"aria-flowto",mode:"fromView"})],Ft.prototype,"ariaFlowto",void 0),ze([oe({attribute:"aria-haspopup",mode:"fromView"})],Ft.prototype,"ariaHaspopup",void 0),ze([oe({attribute:"aria-hidden",mode:"fromView"})],Ft.prototype,"ariaHidden",void 0),ze([oe({attribute:"aria-invalid",mode:"fromView"})],Ft.prototype,"ariaInvalid",void 0),ze([oe({attribute:"aria-keyshortcuts",mode:"fromView"})],Ft.prototype,"ariaKeyshortcuts",void 0),ze([oe({attribute:"aria-label",mode:"fromView"})],Ft.prototype,"ariaLabel",void 0),ze([oe({attribute:"aria-labelledby",mode:"fromView"})],Ft.prototype,"ariaLabelledby",void 0),ze([oe({attribute:"aria-live",mode:"fromView"})],Ft.prototype,"ariaLive",void 0),ze([oe({attribute:"aria-owns",mode:"fromView"})],Ft.prototype,"ariaOwns",void 0),ze([oe({attribute:"aria-relevant",mode:"fromView"})],Ft.prototype,"ariaRelevant",void 0),ze([oe({attribute:"aria-roledescription",mode:"fromView"})],Ft.prototype,"ariaRoledescription",void 0);class Lt extends kt{constructor(){super(...arguments),this.handleUnsupportedDelegatesFocus=()=>{var e;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(null===(e=this.$fastController.definition.shadowOptions)||void 0===e?void 0:e.delegatesFocus)&&(this.focus=()=>{this.control.focus()})}}connectedCallback(){super.connectedCallback(),this.handleUnsupportedDelegatesFocus()}}ze([oe],Lt.prototype,"download",void 0),ze([oe],Lt.prototype,"href",void 0),ze([oe],Lt.prototype,"hreflang",void 0),ze([oe],Lt.prototype,"ping",void 0),ze([oe],Lt.prototype,"referrerpolicy",void 0),ze([oe],Lt.prototype,"rel",void 0),ze([oe],Lt.prototype,"target",void 0),ze([oe],Lt.prototype,"type",void 0),ze([v],Lt.prototype,"defaultSlottedContent",void 0);class Vt{}ze([oe({attribute:"aria-expanded",mode:"fromView"})],Vt.prototype,"ariaExpanded",void 0),Ot(Vt,Ft),Ot(Lt,He,Vt);const Ht=(e,t)=>W``;class Mt extends kt{constructor(){super(...arguments),this.generateBadgeStyle=()=>{if(!this.fill&&!this.color)return;const e=`background-color: var(--badge-fill-${this.fill});`,t=`color: var(--badge-color-${this.color});`;return this.fill&&!this.color?e:this.color&&!this.fill?t:`${t} ${e}`}}}ze([oe({attribute:"fill"})],Mt.prototype,"fill",void 0),ze([oe({attribute:"color"})],Mt.prototype,"color",void 0),ze([oe({mode:"boolean"})],Mt.prototype,"circular",void 0);const Nt="ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype,zt=new WeakMap;function jt(e){const t=class extends e{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 Nt}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){const e=this.proxy.labels,t=Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`)),i=e?t.concat(Array.from(e)):t;return Object.freeze(i)}return s}valueChanged(e,t){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,t){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}disabledChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.disabled=this.disabled),c.queueUpdate((()=>this.classList.toggle("disabled",this.disabled)))}nameChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.name=this.name)}requiredChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.required=this.required),c.queueUpdate((()=>this.classList.toggle("required",this.required))),this.validate()}get elementInternals(){if(!Nt)return null;let e=zt.get(this);return e||(e=this.attachInternals(),zt.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(){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,t,i){this.elementInternals?this.elementInternals.setValidity(e,t,i):"string"==typeof t&&this.proxy.setCustomValidity(t)}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((e=>this.proxy.addEventListener(e,this.stopPropagation))),this.proxy.disabled=this.disabled,this.proxy.required=this.required,"string"==typeof this.name&&(this.proxy.name=this.name),"string"==typeof this.value&&(this.proxy.value=this.value),this.proxy.setAttribute("slot","form-associated-proxy"),this.proxySlot=document.createElement("slot"),this.proxySlot.setAttribute("name","form-associated-proxy")),null===(e=this.shadowRoot)||void 0===e||e.appendChild(this.proxySlot),this.appendChild(this.proxy)}detachProxy(){var e;this.removeChild(this.proxy),null===(e=this.shadowRoot)||void 0===e||e.removeChild(this.proxySlot)}validate(){this.proxy instanceof HTMLElement&&this.setValidity(this.proxy.validity,this.proxy.validationMessage)}setFormValue(e,t){this.elementInternals&&this.elementInternals.setFormValue(e,t||e)}_keypressHandler(e){if("Enter"===e.key)if(this.form instanceof HTMLFormElement){const e=this.form.querySelector("[type=submit]");null==e||e.click()}}stopPropagation(e){e.stopPropagation()}};return oe({mode:"boolean"})(t.prototype,"disabled"),oe({mode:"fromView",attribute:"value"})(t.prototype,"initialValue"),oe({attribute:"current-value"})(t.prototype,"currentValue"),oe(t.prototype,"name"),oe({mode:"boolean"})(t.prototype,"required"),v(t.prototype,"value"),t}function _t(e){class t extends(jt(e)){}class i extends t{constructor(...e){super(e),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(e,t){this.dirtyChecked||(this.dirtyChecked=!0),this.currentChecked=this.checked,this.updateForm(),this.proxy instanceof HTMLInputElement&&(this.proxy.checked=this.checked),void 0!==e&&this.$emit("change"),this.validate()}currentCheckedChanged(e,t){this.checked=this.currentChecked}updateForm(){const e=this.checked?this.value:null;this.setFormValue(e,e)}connectedCallback(){super.connectedCallback(),this.updateForm()}formResetCallback(){super.formResetCallback(),this.checked=!!this.checkedAttribute,this.dirtyChecked=!1}}return oe({attribute:"checked",mode:"boolean"})(i.prototype,"checkedAttribute"),oe({attribute:"current-checked",converter:te})(i.prototype,"currentChecked"),v(i.prototype,"defaultChecked"),v(i.prototype,"checked"),i}class qt extends kt{}class Ut extends(jt(qt)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Kt extends Ut{constructor(){super(...arguments),this.handleClick=e=>{var t;this.disabled&&(null===(t=this.defaultSlottedContent)||void 0===t?void 0:t.length)<=1&&e.stopPropagation()},this.handleSubmission=()=>{if(!this.form)return;const e=this.proxy.isConnected;e||this.attachProxy(),"function"==typeof this.form.requestSubmit?this.form.requestSubmit(this.proxy):this.proxy.click(),e||this.detachProxy()},this.handleFormReset=()=>{var e;null===(e=this.form)||void 0===e||e.reset()},this.handleUnsupportedDelegatesFocus=()=>{var e;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(null===(e=this.$fastController.definition.shadowOptions)||void 0===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),"submit"===t&&this.addEventListener("click",this.handleSubmission),"submit"===e&&this.removeEventListener("click",this.handleSubmission),"reset"===t&&this.addEventListener("click",this.handleFormReset),"reset"===e&&this.removeEventListener("click",this.handleFormReset)}connectedCallback(){var e;super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.handleUnsupportedDelegatesFocus();const t=Array.from(null===(e=this.control)||void 0===e?void 0:e.children);t&&t.forEach((e=>{e.addEventListener("click",this.handleClick)}))}disconnectedCallback(){var e;super.disconnectedCallback();const t=Array.from(null===(e=this.control)||void 0===e?void 0:e.children);t&&t.forEach((e=>{e.removeEventListener("click",this.handleClick)}))}}ze([oe({mode:"boolean"})],Kt.prototype,"autofocus",void 0),ze([oe({attribute:"form"})],Kt.prototype,"formId",void 0),ze([oe],Kt.prototype,"formaction",void 0),ze([oe],Kt.prototype,"formenctype",void 0),ze([oe],Kt.prototype,"formmethod",void 0),ze([oe({mode:"boolean"})],Kt.prototype,"formnovalidate",void 0),ze([oe],Kt.prototype,"formtarget",void 0),ze([oe],Kt.prototype,"type",void 0),ze([v],Kt.prototype,"defaultSlottedContent",void 0);class Gt{}var Wt,Qt,Yt;ze([oe({attribute:"aria-expanded",mode:"fromView"})],Gt.prototype,"ariaExpanded",void 0),ze([oe({attribute:"aria-pressed",mode:"fromView"})],Gt.prototype,"ariaPressed",void 0),Ot(Gt,Ft),Ot(Kt,He,Gt),function(e){e.none="none",e.default="default",e.sticky="sticky"}(Wt||(Wt={})),function(e){e.default="default",e.columnHeader="columnheader",e.rowHeader="rowheader"}(Qt||(Qt={})),function(e){e.default="default",e.header="header",e.stickyHeader="sticky-header"}(Yt||(Yt={}));class Xt extends kt{constructor(){super(...arguments),this.rowType=Yt.default,this.rowData=null,this.columnDefinitions=null,this.isActiveRow=!1,this.cellsRepeatBehavior=null,this.cellsPlaceholder=null,this.focusColumnIndex=0,this.refocusOnLoad=!1,this.updateRowStyle=()=>{this.style.gridTemplateColumns=this.gridTemplateColumns}}gridTemplateColumnsChanged(){this.$fastController.isConnected&&this.updateRowStyle()}rowTypeChanged(){this.$fastController.isConnected&&this.updateItemTemplate()}rowDataChanged(){null!==this.rowData&&this.isActiveRow&&(this.refocusOnLoad=!0)}cellItemTemplateChanged(){this.updateItemTemplate()}headerCellItemTemplateChanged(){this.updateItemTemplate()}connectedCallback(){super.connectedCallback(),null===this.cellsRepeatBehavior&&(this.cellsPlaceholder=document.createComment(""),this.appendChild(this.cellsPlaceholder),this.updateItemTemplate(),this.cellsRepeatBehavior=new Ee((e=>e.columnDefinitions),(e=>e.activeCellItemTemplate),{positioning:!0}).createBehavior(this.cellsPlaceholder),this.$fastController.addBehaviors([this.cellsRepeatBehavior])),this.addEventListener("cell-focused",this.handleCellFocus),this.addEventListener("focusout",this.handleFocusout),this.addEventListener("keydown",this.handleKeydown),this.updateRowStyle(),this.refocusOnLoad&&(this.refocusOnLoad=!1,this.cellElements.length>this.focusColumnIndex&&this.cellElements[this.focusColumnIndex].focus())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("cell-focused",this.handleCellFocus),this.removeEventListener("focusout",this.handleFocusout),this.removeEventListener("keydown",this.handleKeydown)}handleFocusout(e){this.contains(e.target)||(this.isActiveRow=!1,this.focusColumnIndex=0)}handleCellFocus(e){this.isActiveRow=!0,this.focusColumnIndex=this.cellElements.indexOf(e.target),this.$emit("row-focused",this)}handleKeydown(e){if(e.defaultPrevented)return;let t=0;switch(e.key){case"ArrowLeft":t=Math.max(0,this.focusColumnIndex-1),this.cellElements[t].focus(),e.preventDefault();break;case"ArrowRight":t=Math.min(this.cellElements.length-1,this.focusColumnIndex+1),this.cellElements[t].focus(),e.preventDefault();break;case"Home":e.ctrlKey||(this.cellElements[0].focus(),e.preventDefault());break;case"End":e.ctrlKey||(this.cellElements[this.cellElements.length-1].focus(),e.preventDefault())}}updateItemTemplate(){this.activeCellItemTemplate=this.rowType===Yt.default&&void 0!==this.cellItemTemplate?this.cellItemTemplate:this.rowType===Yt.default&&void 0===this.cellItemTemplate?this.defaultCellItemTemplate:void 0!==this.headerCellItemTemplate?this.headerCellItemTemplate:this.defaultHeaderCellItemTemplate}}ze([oe({attribute:"grid-template-columns"})],Xt.prototype,"gridTemplateColumns",void 0),ze([oe({attribute:"row-type"})],Xt.prototype,"rowType",void 0),ze([v],Xt.prototype,"rowData",void 0),ze([v],Xt.prototype,"columnDefinitions",void 0),ze([v],Xt.prototype,"cellItemTemplate",void 0),ze([v],Xt.prototype,"headerCellItemTemplate",void 0),ze([v],Xt.prototype,"rowIndex",void 0),ze([v],Xt.prototype,"isActiveRow",void 0),ze([v],Xt.prototype,"activeCellItemTemplate",void 0),ze([v],Xt.prototype,"defaultCellItemTemplate",void 0),ze([v],Xt.prototype,"defaultHeaderCellItemTemplate",void 0),ze([v],Xt.prototype,"cellElements",void 0);class Jt extends kt{constructor(){super(),this.noTabbing=!1,this.generateHeader=Wt.default,this.rowsData=[],this.columnDefinitions=null,this.focusRowIndex=0,this.focusColumnIndex=0,this.rowsPlaceholder=null,this.generatedHeader=null,this.isUpdatingFocus=!1,this.pendingFocusUpdate=!1,this.rowindexUpdateQueued=!1,this.columnDefinitionsStale=!0,this.generatedGridTemplateColumns="",this.focusOnCell=(e,t,i)=>{if(0===this.rowElements.length)return this.focusRowIndex=0,void(this.focusColumnIndex=0);const s=Math.max(0,Math.min(this.rowElements.length-1,e)),o=this.rowElements[s].querySelectorAll('[role="cell"], [role="gridcell"], [role="columnheader"], [role="rowheader"]'),n=o[Math.max(0,Math.min(o.length-1,t))];i&&this.scrollHeight!==this.clientHeight&&(s0||s>this.focusRowIndex&&this.scrollTop{e&&e.length&&(e.forEach((e=>{e.addedNodes.forEach((e=>{1===e.nodeType&&"row"===e.getAttribute("role")&&(e.columnDefinitions=this.columnDefinitions)}))})),this.queueRowIndexUpdate())},this.queueRowIndexUpdate=()=>{this.rowindexUpdateQueued||(this.rowindexUpdateQueued=!0,c.queueUpdate(this.updateRowIndexes))},this.updateRowIndexes=()=>{let e=this.gridTemplateColumns;if(void 0===e){if(""===this.generatedGridTemplateColumns&&this.rowElements.length>0){const e=this.rowElements[0];this.generatedGridTemplateColumns=new Array(e.cellElements.length).fill("1fr").join(" ")}e=this.generatedGridTemplateColumns}this.rowElements.forEach(((t,i)=>{const s=t;s.rowIndex=i,s.gridTemplateColumns=e,this.columnDefinitionsStale&&(s.columnDefinitions=this.columnDefinitions)})),this.rowindexUpdateQueued=!1,this.columnDefinitionsStale=!1}}static generateTemplateColumns(e){let t="";return e.forEach((e=>{t=`${t}${""===t?"":" "}1fr`})),t}noTabbingChanged(){this.$fastController.isConnected&&(this.noTabbing?this.setAttribute("tabIndex","-1"):this.setAttribute("tabIndex",this.contains(document.activeElement)||this===document.activeElement?"-1":"0"))}generateHeaderChanged(){this.$fastController.isConnected&&this.toggleGeneratedHeader()}gridTemplateColumnsChanged(){this.$fastController.isConnected&&this.updateRowIndexes()}rowsDataChanged(){null===this.columnDefinitions&&this.rowsData.length>0&&(this.columnDefinitions=Jt.generateColumns(this.rowsData[0])),this.$fastController.isConnected&&this.toggleGeneratedHeader()}columnDefinitionsChanged(){null!==this.columnDefinitions?(this.generatedGridTemplateColumns=Jt.generateTemplateColumns(this.columnDefinitions),this.$fastController.isConnected&&(this.columnDefinitionsStale=!0,this.queueRowIndexUpdate())):this.generatedGridTemplateColumns=""}headerCellItemTemplateChanged(){this.$fastController.isConnected&&null!==this.generatedHeader&&(this.generatedHeader.headerCellItemTemplate=this.headerCellItemTemplate)}focusRowIndexChanged(){this.$fastController.isConnected&&this.queueFocusUpdate()}focusColumnIndexChanged(){this.$fastController.isConnected&&this.queueFocusUpdate()}connectedCallback(){super.connectedCallback(),void 0===this.rowItemTemplate&&(this.rowItemTemplate=this.defaultRowItemTemplate),this.rowsPlaceholder=document.createComment(""),this.appendChild(this.rowsPlaceholder),this.toggleGeneratedHeader(),this.rowsRepeatBehavior=new Ee((e=>e.rowsData),(e=>e.rowItemTemplate),{positioning:!0}).createBehavior(this.rowsPlaceholder),this.$fastController.addBehaviors([this.rowsRepeatBehavior]),this.addEventListener("row-focused",this.handleRowFocus),this.addEventListener("focus",this.handleFocus),this.addEventListener("keydown",this.handleKeydown),this.addEventListener("focusout",this.handleFocusOut),this.observer=new MutationObserver(this.onChildListChange),this.observer.observe(this,{childList:!0}),this.noTabbing&&this.setAttribute("tabindex","-1"),c.queueUpdate(this.queueRowIndexUpdate)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("row-focused",this.handleRowFocus),this.removeEventListener("focus",this.handleFocus),this.removeEventListener("keydown",this.handleKeydown),this.removeEventListener("focusout",this.handleFocusOut),this.observer.disconnect(),this.rowsPlaceholder=null,this.generatedHeader=null}handleRowFocus(e){this.isUpdatingFocus=!0;const t=e.target;this.focusRowIndex=this.rowElements.indexOf(t),this.focusColumnIndex=t.focusColumnIndex,this.setAttribute("tabIndex","-1"),this.isUpdatingFocus=!1}handleFocus(e){this.focusOnCell(this.focusRowIndex,this.focusColumnIndex,!0)}handleFocusOut(e){null!==e.relatedTarget&&this.contains(e.relatedTarget)||this.setAttribute("tabIndex",this.noTabbing?"-1":"0")}handleKeydown(e){if(e.defaultPrevented)return;let t;const i=this.rowElements.length-1,s=this.offsetHeight+this.scrollTop,o=this.rowElements[i];switch(e.key){case"ArrowUp":e.preventDefault(),this.focusOnCell(this.focusRowIndex-1,this.focusColumnIndex,!0);break;case"ArrowDown":e.preventDefault(),this.focusOnCell(this.focusRowIndex+1,this.focusColumnIndex,!0);break;case"PageUp":if(e.preventDefault(),0===this.rowElements.length){this.focusOnCell(0,0,!1);break}if(0===this.focusRowIndex)return void this.focusOnCell(0,this.focusColumnIndex,!1);for(t=this.focusRowIndex-1;t>=0;t--){const e=this.rowElements[t];if(e.offsetTop=i||o.offsetTop+o.offsetHeight<=s)return void this.focusOnCell(i,this.focusColumnIndex,!1);for(t=this.focusRowIndex+1;t<=i;t++){const e=this.rowElements[t];if(e.offsetTop+e.offsetHeight>s){let t=0;this.generateHeader===Wt.sticky&&null!==this.generatedHeader&&(t=this.generatedHeader.clientHeight),this.scrollTop=e.offsetTop-t;break}}this.focusOnCell(t,this.focusColumnIndex,!1);break;case"Home":e.ctrlKey&&(e.preventDefault(),this.focusOnCell(0,0,!0));break;case"End":e.ctrlKey&&null!==this.columnDefinitions&&(e.preventDefault(),this.focusOnCell(this.rowElements.length-1,this.columnDefinitions.length-1,!0))}}queueFocusUpdate(){this.isUpdatingFocus&&(this.contains(document.activeElement)||this===document.activeElement)||!1===this.pendingFocusUpdate&&(this.pendingFocusUpdate=!0,c.queueUpdate((()=>this.updateFocus())))}updateFocus(){this.pendingFocusUpdate=!1,this.focusOnCell(this.focusRowIndex,this.focusColumnIndex,!0)}toggleGeneratedHeader(){if(null!==this.generatedHeader&&(this.removeChild(this.generatedHeader),this.generatedHeader=null),this.generateHeader!==Wt.none&&this.rowsData.length>0){const e=document.createElement(this.rowElementTag);return this.generatedHeader=e,this.generatedHeader.columnDefinitions=this.columnDefinitions,this.generatedHeader.gridTemplateColumns=this.gridTemplateColumns,this.generatedHeader.rowType=this.generateHeader===Wt.sticky?Yt.stickyHeader:Yt.header,void(null===this.firstChild&&null===this.rowsPlaceholder||this.insertBefore(e,null!==this.firstChild?this.firstChild:this.rowsPlaceholder))}}}Jt.generateColumns=e=>Object.getOwnPropertyNames(e).map(((e,t)=>({columnDataKey:e,gridColumn:`${t}`}))),ze([oe({attribute:"no-tabbing",mode:"boolean"})],Jt.prototype,"noTabbing",void 0),ze([oe({attribute:"generate-header"})],Jt.prototype,"generateHeader",void 0),ze([oe({attribute:"grid-template-columns"})],Jt.prototype,"gridTemplateColumns",void 0),ze([v],Jt.prototype,"rowsData",void 0),ze([v],Jt.prototype,"columnDefinitions",void 0),ze([v],Jt.prototype,"rowItemTemplate",void 0),ze([v],Jt.prototype,"cellItemTemplate",void 0),ze([v],Jt.prototype,"headerCellItemTemplate",void 0),ze([v],Jt.prototype,"focusRowIndex",void 0),ze([v],Jt.prototype,"focusColumnIndex",void 0),ze([v],Jt.prototype,"defaultRowItemTemplate",void 0),ze([v],Jt.prototype,"rowElementTag",void 0),ze([v],Jt.prototype,"rowElements",void 0);const Zt=W``,ei=W``;class ti extends kt{constructor(){super(...arguments),this.cellType=Qt.default,this.rowData=null,this.columnDefinition=null,this.isActiveCell=!1,this.customCellView=null,this.updateCellStyle=()=>{this.style.gridColumn=this.gridColumn}}cellTypeChanged(){this.$fastController.isConnected&&this.updateCellView()}gridColumnChanged(){this.$fastController.isConnected&&this.updateCellStyle()}columnDefinitionChanged(e,t){this.$fastController.isConnected&&this.updateCellView()}connectedCallback(){var e;super.connectedCallback(),this.addEventListener("focusin",this.handleFocusin),this.addEventListener("focusout",this.handleFocusout),this.addEventListener("keydown",this.handleKeydown),this.style.gridColumn=`${void 0===(null===(e=this.columnDefinition)||void 0===e?void 0:e.gridColumn)?0:this.columnDefinition.gridColumn}`,this.updateCellView(),this.updateCellStyle()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.handleFocusin),this.removeEventListener("focusout",this.handleFocusout),this.removeEventListener("keydown",this.handleKeydown),this.disconnectCellView()}handleFocusin(e){if(!this.isActiveCell){if(this.isActiveCell=!0,this.cellType===Qt.columnHeader){if(null!==this.columnDefinition&&!0!==this.columnDefinition.headerCellInternalFocusQueue&&"function"==typeof this.columnDefinition.headerCellFocusTargetCallback){const e=this.columnDefinition.headerCellFocusTargetCallback(this);null!==e&&e.focus()}}else if(null!==this.columnDefinition&&!0!==this.columnDefinition.cellInternalFocusQueue&&"function"==typeof this.columnDefinition.cellFocusTargetCallback){const e=this.columnDefinition.cellFocusTargetCallback(this);null!==e&&e.focus()}this.$emit("cell-focused",this)}}handleFocusout(e){this===document.activeElement||this.contains(document.activeElement)||(this.isActiveCell=!1)}handleKeydown(e){if(!(e.defaultPrevented||null===this.columnDefinition||this.cellType===Qt.default&&!0!==this.columnDefinition.cellInternalFocusQueue||this.cellType===Qt.columnHeader&&!0!==this.columnDefinition.headerCellInternalFocusQueue))switch(e.key){case"Enter":case"F2":if(this.contains(document.activeElement)&&document.activeElement!==this)return;if(this.cellType===Qt.columnHeader){if(void 0!==this.columnDefinition.headerCellFocusTargetCallback){const t=this.columnDefinition.headerCellFocusTargetCallback(this);null!==t&&t.focus(),e.preventDefault()}}else if(void 0!==this.columnDefinition.cellFocusTargetCallback){const t=this.columnDefinition.cellFocusTargetCallback(this);null!==t&&t.focus(),e.preventDefault()}break;case"Escape":this.contains(document.activeElement)&&document.activeElement!==this&&(this.focus(),e.preventDefault())}}updateCellView(){if(this.disconnectCellView(),null!==this.columnDefinition)switch(this.cellType){case Qt.columnHeader:void 0!==this.columnDefinition.headerCellTemplate?this.customCellView=this.columnDefinition.headerCellTemplate.render(this,this):this.customCellView=ei.render(this,this);break;case void 0:case Qt.rowHeader:case Qt.default:void 0!==this.columnDefinition.cellTemplate?this.customCellView=this.columnDefinition.cellTemplate.render(this,this):this.customCellView=Zt.render(this,this)}}disconnectCellView(){null!==this.customCellView&&(this.customCellView.dispose(),this.customCellView=null)}}ze([oe({attribute:"cell-type"})],ti.prototype,"cellType",void 0),ze([oe({attribute:"grid-column"})],ti.prototype,"gridColumn",void 0),ze([v],ti.prototype,"rowData",void 0),ze([v],ti.prototype,"columnDefinition",void 0);class ii extends kt{}class si extends(_t(ii)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class oi extends si{constructor(){super(),this.initialValue="on",this.indeterminate=!1,this.keypressHandler=e=>{if(" "===e.key)this.checked=!this.checked},this.clickHandler=e=>{this.disabled||this.readOnly||(this.checked=!this.checked)},this.proxy.setAttribute("type","checkbox")}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}}function ni(e){return function(...e){return e.every((e=>e instanceof HTMLElement))}(e)&&("option"===e.getAttribute("role")||e instanceof HTMLOptionElement)}ze([oe({attribute:"readonly",mode:"boolean"})],oi.prototype,"readOnly",void 0),ze([v],oi.prototype,"defaultSlottedNodes",void 0),ze([v],oi.prototype,"indeterminate",void 0);class ri extends kt{constructor(e,t,i,s){super(),this.defaultSelected=!1,this.dirtySelected=!1,this.selected=this.defaultSelected,this.dirtyValue=!1,e&&(this.textContent=e),t&&(this.initialValue=t),i&&(this.defaultSelected=i),s&&(this.selected=s),this.proxy=new Option(`${this.textContent}`,this.initialValue,this.defaultSelected,this.selected),this.proxy.disabled=this.disabled}checkedChanged(e,t){this.ariaChecked="boolean"!=typeof t?void 0:t?"true":"false"}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,t;return null!==(t=null!==(e=this.value)&&void 0!==e?e:this.textContent)&&void 0!==t?t:""}get text(){return this.textContent}set value(e){this._value=e,this.dirtyValue=!0,this.proxy instanceof HTMLElement&&(this.proxy.value=e),m.notify(this,"value")}get value(){var e,t;return m.track(this,"value"),null!==(t=null!==(e=this._value)&&void 0!==e?e:this.textContent)&&void 0!==t?t:""}get form(){return this.proxy?this.proxy.form:null}}ze([v],ri.prototype,"checked",void 0),ze([v],ri.prototype,"defaultSelected",void 0),ze([oe({mode:"boolean"})],ri.prototype,"disabled",void 0),ze([oe({attribute:"selected",mode:"boolean"})],ri.prototype,"selectedAttribute",void 0),ze([v],ri.prototype,"selected",void 0),ze([oe({attribute:"value",mode:"fromView"})],ri.prototype,"initialValue",void 0);class ai{}ze([v],ai.prototype,"ariaChecked",void 0),ze([v],ai.prototype,"ariaPosInSet",void 0),ze([v],ai.prototype,"ariaSelected",void 0),ze([v],ai.prototype,"ariaSetSize",void 0),Ot(ai,Ft),Ot(ri,He,ai);class li extends kt{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 null!==(e=this.selectedOptions[0])&&void 0!==e?e:null}get hasSelectableOptions(){return this.options.length>0&&!this.options.every((e=>e.disabled))}get length(){var e,t;return null!==(t=null===(e=this.options)||void 0===e?void 0:e.length)&&void 0!==t?t:0}get options(){return m.track(this,"options"),this._options}set options(e){this._options=e,m.notify(this,"options")}get typeAheadExpired(){return this.typeaheadExpired}set typeAheadExpired(e){this.typeaheadExpired=e}clickHandler(e){const 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)&&null!==e&&(e.focus(),requestAnimationFrame((()=>{e.scrollIntoView({block:"nearest"})})))}focusinHandler(e){this.shouldSkipFocus||e.target!==e.currentTarget||(this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}getTypeaheadMatches(){const e=this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&"),t=new RegExp(`^${e}`,"gi");return this.options.filter((e=>e.text.trim().match(t)))}getSelectableIndex(e=this.selectedIndex,t){const i=e>t?-1:e!e&&!t.disabled&&i!e&&!t.disabled&&i>s?t:e),o)}return this.options.indexOf(o)}handleChange(e,t){if("selected"===t)li.slottedOptionFilter(e)&&(this.selectedIndex=this.options.indexOf(e)),this.setSelectedOptions()}handleTypeAhead(e){this.typeaheadTimeout&&window.clearTimeout(this.typeaheadTimeout),this.typeaheadTimeout=window.setTimeout((()=>this.typeaheadExpired=!0),li.TYPE_AHEAD_TIMEOUT_MS),e.length>1||(this.typeaheadBuffer=`${this.typeaheadExpired?"":this.typeaheadBuffer}${e}`)}keydownHandler(e){if(this.disabled)return!0;this.shouldSkipFocus=!1;const t=e.key;switch(t){case"Home":e.shiftKey||(e.preventDefault(),this.selectFirstOption());break;case"ArrowDown":e.shiftKey||(e.preventDefault(),this.selectNextOption());break;case"ArrowUp":e.shiftKey||(e.preventDefault(),this.selectPreviousOption());break;case"End":e.preventDefault(),this.selectLastOption();break;case"Tab":return this.focusAndScrollOptionIntoView(),!0;case"Enter":case"Escape":return!0;case" ":if(this.typeaheadExpired)return!0;default:return 1===t.length&&this.handleTypeAhead(`${t}`),!0}}mousedownHandler(e){return this.shouldSkipFocus=!this.contains(document.activeElement),!0}multipleChanged(e,t){this.ariaMultiSelectable=t?"true":void 0}selectedIndexChanged(e,t){var i;if(this.hasSelectableOptions){if((null===(i=this.options[this.selectedIndex])||void 0===i?void 0:i.disabled)&&"number"==typeof e){const i=this.getSelectableIndex(e,t),s=i>-1?i:e;return this.selectedIndex=s,void(t===s&&this.selectedIndexChanged(t,s))}this.setSelectedOptions()}else this.selectedIndex=-1}selectedOptionsChanged(e,t){var i;const s=t.filter(li.slottedOptionFilter);null===(i=this.options)||void 0===i||i.forEach((e=>{const t=m.getNotifier(e);t.unsubscribe(this,"selected"),e.selected=s.includes(e),t.subscribe(this,"selected")}))}selectFirstOption(){var e,t;this.disabled||(this.selectedIndex=null!==(t=null===(e=this.options)||void 0===e?void 0:e.findIndex((e=>!e.disabled)))&&void 0!==t?t:-1)}selectLastOption(){this.disabled||(this.selectedIndex=function(e,t){let i=e.length;for(;i--;)if(t(e[i],i,e))return i;return-1}(this.options,(e=>!e.disabled)))}selectNextOption(){!this.disabled&&this.selectedIndex0&&(this.selectedIndex=this.selectedIndex-1)}setDefaultSelectedOption(){var e,t;this.selectedIndex=null!==(t=null===(e=this.options)||void 0===e?void 0:e.findIndex((e=>e.defaultSelected)))&&void 0!==t?t:-1}setSelectedOptions(){var e,t,i;(null===(e=this.options)||void 0===e?void 0:e.length)&&(this.selectedOptions=[this.options[this.selectedIndex]],this.ariaActiveDescendant=null!==(i=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.id)&&void 0!==i?i:"",this.focusAndScrollOptionIntoView())}slottedOptionsChanged(e,t){this.options=t.reduce(((e,t)=>(ni(t)&&e.push(t),e)),[]);const i=`${this.options.length}`;this.options.forEach(((e,t)=>{e.id||(e.id=Bt("option-")),e.ariaPosInSet=`${t+1}`,e.ariaSetSize=i})),this.$fastController.isConnected&&(this.setSelectedOptions(),this.setDefaultSelectedOption())}typeaheadBufferChanged(e,t){if(this.$fastController.isConnected){const e=this.getTypeaheadMatches();if(e.length){const t=this.options.indexOf(e[0]);t>-1&&(this.selectedIndex=t)}this.typeaheadExpired=!1}}}li.slottedOptionFilter=e=>ni(e)&&!e.disabled&&!e.hidden,li.TYPE_AHEAD_TIMEOUT_MS=1e3,ze([oe({mode:"boolean"})],li.prototype,"disabled",void 0),ze([oe({mode:"boolean"})],li.prototype,"multiple",void 0),ze([v],li.prototype,"selectedIndex",void 0),ze([v],li.prototype,"selectedOptions",void 0),ze([v],li.prototype,"slottedOptions",void 0),ze([v],li.prototype,"typeaheadBuffer",void 0);class di{}var ci;function hi(e){const t=e.parentElement;if(t)return t;{const t=e.getRootNode();if(t.host instanceof HTMLElement)return t.host}return null}ze([v],di.prototype,"ariaActiveDescendant",void 0),ze([v],di.prototype,"ariaDisabled",void 0),ze([v],di.prototype,"ariaExpanded",void 0),ze([v],di.prototype,"ariaMultiSelectable",void 0),Ot(di,Ft),Ot(li,di),function(e){e.above="above",e.below="below"}(ci||(ci={}));function ui(e){return`:host([hidden]){display:none}:host{display:${e}}`}const pi=function(){if("boolean"==typeof At)return At;if("undefined"==typeof window||!window.document||!window.document.createElement)return At=!1,At;const e=document.createElement("style"),t=function(){const e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}();null!==t&&e.setAttribute("nonce",t),document.head.appendChild(e);try{e.sheet.insertRule("foo:focus-visible {color:inherit}",0),At=!0}catch(e){At=!1}finally{document.head.removeChild(e)}return At}()?"focus-visible":"focus";function fi(e,t,i){return e.nodeType!==Node.TEXT_NODE||"string"==typeof e.nodeValue&&!!e.nodeValue.trim().length}const bi=document.createElement("div");class gi{setProperty(e,t){c.queueUpdate((()=>this.target.setProperty(e,t)))}removeProperty(e){c.queueUpdate((()=>this.target.removeProperty(e)))}}class mi extends gi{constructor(){super();const e=new CSSStyleSheet;this.target=e.cssRules[e.insertRule(":root{}")].style,document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}}class vi extends gi{constructor(){super(),this.style=document.createElement("style"),document.head.appendChild(this.style);const{sheet:e}=this.style;if(e){const t=e.insertRule(":root{}",e.cssRules.length);this.target=e.cssRules[t].style}}}class yi{constructor(e){this.store=new Map,this.target=null;const t=e.$fastController;this.style=document.createElement("style"),t.addStyles(this.style),m.getNotifier(t).subscribe(this,"isConnected"),this.handleChange(t,"isConnected")}targetChanged(){if(null!==this.target)for(const[e,t]of this.store.entries())this.target.setProperty(e,t)}setProperty(e,t){this.store.set(e,t),c.queueUpdate((()=>{null!==this.target&&this.target.setProperty(e,t)}))}removeProperty(e){this.store.delete(e),c.queueUpdate((()=>{null!==this.target&&this.target.removeProperty(e)}))}handleChange(e,t){const{sheet:i}=this.style;if(i){const e=i.insertRule(":host{}",i.cssRules.length);this.target=i.cssRules[e].style}else this.target=null}}ze([v],yi.prototype,"target",void 0);class xi{constructor(e){this.target=e.style}setProperty(e,t){c.queueUpdate((()=>this.target.setProperty(e,t)))}removeProperty(e){c.queueUpdate((()=>this.target.removeProperty(e)))}}class Ci{setProperty(e,t){Ci.properties[e]=t;for(const i of Ci.roots.values())ki.getOrCreate(Ci.normalizeRoot(i)).setProperty(e,t)}removeProperty(e){delete Ci.properties[e];for(const t of Ci.roots.values())ki.getOrCreate(Ci.normalizeRoot(t)).removeProperty(e)}static registerRoot(e){const{roots:t}=Ci;if(!t.has(e)){t.add(e);const i=ki.getOrCreate(this.normalizeRoot(e));for(const e in Ci.properties)i.setProperty(e,Ci.properties[e])}}static unregisterRoot(e){const{roots:t}=Ci;if(t.has(e)){t.delete(e);const i=ki.getOrCreate(Ci.normalizeRoot(e));for(const e in Ci.properties)i.removeProperty(e)}}static normalizeRoot(e){return e===bi?document:e}}Ci.roots=new Set,Ci.properties={};const wi=new WeakMap,$i=c.supportsAdoptedStyleSheets?class extends gi{constructor(e){super();const t=new CSSStyleSheet;this.target=t.cssRules[t.insertRule(":host{}")].style,e.$fastController.addStyles(Q.create([t]))}}:yi,ki=Object.freeze({getOrCreate(e){if(wi.has(e))return wi.get(e);let t;return e===bi?t=new Ci:e instanceof Document?t=c.supportsAdoptedStyleSheets?new mi:new vi:t=e instanceof fe?new $i(e):new xi(e),wi.set(e,t),t}});class Ti extends be{constructor(e){super(),this.subscribers=new WeakMap,this._appliedTo=new Set,this.name=e.name,null!==e.cssCustomPropertyName&&(this.cssCustomProperty=`--${e.cssCustomPropertyName}`,this.cssVar=`var(${this.cssCustomProperty})`),this.id=Ti.uniqueId(),Ti.tokensById.set(this.id,this)}get appliedTo(){return[...this._appliedTo]}static from(e){return new Ti({name:"string"==typeof e?e:e.name,cssCustomPropertyName:"string"==typeof e?e:void 0===e.cssCustomPropertyName?e.name:e.cssCustomPropertyName})}static isCSSDesignToken(e){return"string"==typeof e.cssCustomProperty}static isDerivedDesignTokenValue(e){return"function"==typeof e}static getTokenById(e){return Ti.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){const t=Si.getOrCreate(e).get(this);if(void 0!==t)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 Ti&&(t=this.alias(t)),Si.getOrCreate(e).set(this,t),this}deleteValueFor(e){return this._appliedTo.delete(e),Si.existsFor(e)&&Si.getOrCreate(e).delete(this),this}withDefault(e){return this.setValueFor(bi,e),this}subscribe(e,t){const i=this.getOrCreateSubscriberSet(t);t&&!Si.existsFor(t)&&Si.getOrCreate(t),i.has(e)||i.add(e)}unsubscribe(e,t){const i=this.subscribers.get(t||this);i&&i.has(e)&&i.delete(e)}notify(e){const t=Object.freeze({token:this,target:e});this.subscribers.has(this)&&this.subscribers.get(this).forEach((e=>e.handleChange(t))),this.subscribers.has(e)&&this.subscribers.get(e).forEach((e=>e.handleChange(t)))}alias(e){return t=>e.getValueFor(t)}}Ti.uniqueId=(()=>{let e=0;return()=>(e++,e.toString(16))})(),Ti.tokensById=new Map;class Ii{constructor(e,t,i){this.source=e,this.token=t,this.node=i,this.dependencies=new Set,this.observer=m.binding(e,this,!1),this.observer.handleChange=this.observer.call,this.handleChange()}disconnect(){this.observer.disconnect()}handleChange(){this.node.store.set(this.token,this.observer.observe(this.node.target,C))}}class Oi{constructor(){this.values=new Map}set(e,t){this.values.get(e)!==t&&(this.values.set(e,t),m.getNotifier(this).notify(e.id))}get(e){return m.track(this,e.id),this.values.get(e)}delete(e){this.values.delete(e)}all(){return this.values.entries()}}const Ri=new WeakMap,Ai=new WeakMap;class Si{constructor(e){this.target=e,this.store=new Oi,this.children=[],this.assignedValues=new Map,this.reflecting=new Set,this.bindingObservers=new Map,this.tokenValueChangeHandler={handleChange:(e,t)=>{const i=Ti.getTokenById(t);if(i&&(i.notify(this.target),Ti.isCSSDesignToken(i))){const t=this.parent,s=this.isReflecting(i);if(t){const o=t.get(i),n=e.get(i);o===n||s?o===n&&s&&this.stopReflectToCSS(i):this.reflectToCSS(i)}else s||this.reflectToCSS(i)}}},Ri.set(e,this),m.getNotifier(this.store).subscribe(this.tokenValueChangeHandler),e instanceof fe?e.$fastController.addBehaviors([this]):e.isConnected&&this.bind()}static getOrCreate(e){return Ri.get(e)||new Si(e)}static existsFor(e){return Ri.has(e)}static findParent(e){if(bi!==e.target){let t=hi(e.target);for(;null!==t;){if(Ri.has(t))return Ri.get(t);t=hi(t)}return Si.getOrCreate(bi)}return null}static findClosestAssignedNode(e,t){let i=t;do{if(i.has(e))return i;i=i.parent?i.parent:i.target!==bi?Si.getOrCreate(bi):null}while(null!==i);return null}get parent(){return Ai.get(this)||null}has(e){return this.assignedValues.has(e)}get(e){const t=this.store.get(e);if(void 0!==t)return t;const i=this.getRaw(e);return void 0!==i?(this.hydrate(e,i),this.get(e)):void 0}getRaw(e){var t;return this.assignedValues.has(e)?this.assignedValues.get(e):null===(t=Si.findClosestAssignedNode(e,this))||void 0===t?void 0:t.getRaw(e)}set(e,t){Ti.isDerivedDesignTokenValue(this.assignedValues.get(e))&&this.tearDownBindingObserver(e),this.assignedValues.set(e,t),Ti.isDerivedDesignTokenValue(t)?this.setupBindingObserver(e,t):this.store.set(e,t)}delete(e){this.assignedValues.delete(e),this.tearDownBindingObserver(e);const t=this.getRaw(e);t?this.hydrate(e,t):this.store.delete(e)}bind(){const e=Si.findParent(this);e&&e.appendChild(this);for(const e of this.assignedValues.keys())e.notify(this.target)}unbind(){if(this.parent){Ai.get(this).removeChild(this)}}appendChild(e){e.parent&&Ai.get(e).removeChild(e);const t=this.children.filter((t=>e.contains(t)));Ai.set(e,this),this.children.push(e),t.forEach((t=>e.appendChild(t))),m.getNotifier(this.store).subscribe(e);for(const[t,i]of this.store.all())e.hydrate(t,this.bindingObservers.has(t)?this.getRaw(t):i)}removeChild(e){const t=this.children.indexOf(e);return-1!==t&&this.children.splice(t,1),m.getNotifier(this.store).unsubscribe(e),e.parent===this&&Ai.delete(e)}contains(e){return function(e,t){let i=t;for(;null!==i;){if(i===e)return!0;i=hi(i)}return!1}(this.target,e.target)}reflectToCSS(e){this.isReflecting(e)||(this.reflecting.add(e),Si.cssCustomPropertyReflector.startReflection(e,this.target))}stopReflectToCSS(e){this.isReflecting(e)&&(this.reflecting.delete(e),Si.cssCustomPropertyReflector.stopReflection(e,this.target))}isReflecting(e){return this.reflecting.has(e)}handleChange(e,t){const i=Ti.getTokenById(t);i&&this.hydrate(i,this.getRaw(i))}hydrate(e,t){if(!this.has(e)){const i=this.bindingObservers.get(e);Ti.isDerivedDesignTokenValue(t)?i?i.source!==t&&(this.tearDownBindingObserver(e),this.setupBindingObserver(e,t)):this.setupBindingObserver(e,t):(i&&this.tearDownBindingObserver(e),this.store.set(e,t))}}setupBindingObserver(e,t){const i=new Ii(t,e,this);return this.bindingObservers.set(e,i),i}tearDownBindingObserver(e){return!!this.bindingObservers.has(e)&&(this.bindingObservers.get(e).disconnect(),this.bindingObservers.delete(e),!0)}}Si.cssCustomPropertyReflector=new 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){const{token:t,target:i}=e;this.add(t,i)}add(e,t){ki.getOrCreate(t).setProperty(e.cssCustomProperty,this.resolveCSSValue(Si.getOrCreate(t).get(e)))}remove(e,t){ki.getOrCreate(t).removeProperty(e.cssCustomProperty)}resolveCSSValue(e){return e&&"function"==typeof e.createCSS?e.createCSS():e}},ze([v],Si.prototype,"children",void 0);const Ei=Object.freeze({create:function(e){return Ti.from(e)},notifyConnection:e=>!(!e.isConnected||!Si.existsFor(e))&&(Si.getOrCreate(e).bind(),!0),notifyDisconnection:e=>!(e.isConnected||!Si.existsFor(e))&&(Si.getOrCreate(e).unbind(),!0),registerRoot(e=bi){Ci.registerRoot(e)},unregisterRoot(e=bi){Ci.unregisterRoot(e)}}),Di=Object.freeze({definitionCallbackOnly:null,ignoreDuplicate:Symbol()}),Pi=new Map,Bi=new Map;let Fi=null;const Li=Ye.createInterface((e=>e.cachedCallback((e=>(null===Fi&&(Fi=new Hi(null,e)),Fi))))),Vi=Object.freeze({tagFor:e=>Bi.get(e),responsibleFor(e){const t=e.$$designSystem$$;if(t)return t;return Ye.findResponsibleContainer(e).get(Li)},getOrCreate(e){if(!e)return null===Fi&&(Fi=Ye.getOrCreateDOMContainer().get(Li)),Fi;const t=e.$$designSystem$$;if(t)return t;const i=Ye.getOrCreateDOMContainer(e);if(i.has(Li,!1))return i.get(Li);{const t=new Hi(e,i);return i.register(ut.instance(Li,t)),t}}});class Hi{constructor(e,t){this.owner=e,this.container=t,this.designTokensInitialized=!1,this.prefix="fast",this.shadowRootMode=void 0,this.disambiguate=()=>Di.definitionCallbackOnly,null!==e&&(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){const t=this.container,i=[],s=this.disambiguate,o=this.shadowRootMode,n={elementPrefix:this.prefix,tryDefineElement(e,n,r){const a=function(e,t,i){return"string"==typeof e?{name:e,type:t,callback:i}:e}(e,n,r),{name:l,callback:d,baseClass:c}=a;let{type:h}=a,u=l,p=Pi.get(u),f=!0;for(;p;){const e=s(u,h,p);switch(e){case Di.ignoreDuplicate:return;case Di.definitionCallbackOnly:f=!1,p=void 0;break;default:u=e,p=Pi.get(u)}}f&&((Bi.has(h)||h===kt)&&(h=class extends h{}),Pi.set(u,h),Bi.set(h,u),c&&Bi.set(c,u)),i.push(new Mi(t,u,h,o,d,f))}};this.designTokensInitialized||(this.designTokensInitialized=!0,null!==this.designTokenRoot&&Ei.registerRoot(this.designTokenRoot)),t.registerWithContext(n,...e);for(const e of i)e.callback(e),e.willDefine&&null!==e.definition&&e.definition.define();return this}}class Mi{constructor(e,t,i,s,o,n){this.container=e,this.name=t,this.type=i,this.shadowRootMode=s,this.callback=o,this.willDefine=n,this.definition=null}definePresentation(e){wt.define(this.name,e,this.container)}defineElement(e){this.definition=new le(this.type,Object.assign(Object.assign({},e),{name:this.name}))}tagFor(e){return Vi.tagFor(e)}}var Ni;!function(e){e.separator="separator",e.presentation="presentation"}(Ni||(Ni={}));class zi extends kt{constructor(){super(...arguments),this.role=Ni.separator,this.orientation=Rt.horizontal}}ze([oe],zi.prototype,"role",void 0),ze([oe],zi.prototype,"orientation",void 0);class ji extends kt{}class _i extends(jt(ji)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}var qi;!function(e){e.email="email",e.password="password",e.tel="tel",e.text="text",e.url="url"}(qi||(qi={}));class Ui extends _i{constructor(){super(...arguments),this.type=qi.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&&c.queueUpdate((()=>{this.focus()}))}handleTextInput(){this.value=this.control.value}handleChange(){this.$emit("change")}}ze([oe({attribute:"readonly",mode:"boolean"})],Ui.prototype,"readOnly",void 0),ze([oe({mode:"boolean"})],Ui.prototype,"autofocus",void 0),ze([oe],Ui.prototype,"placeholder",void 0),ze([oe],Ui.prototype,"type",void 0),ze([oe],Ui.prototype,"list",void 0),ze([oe({converter:ie})],Ui.prototype,"maxlength",void 0),ze([oe({converter:ie})],Ui.prototype,"minlength",void 0),ze([oe],Ui.prototype,"pattern",void 0),ze([oe({converter:ie})],Ui.prototype,"size",void 0),ze([oe({mode:"boolean"})],Ui.prototype,"spellcheck",void 0),ze([v],Ui.prototype,"defaultSlottedNodes",void 0);class Ki{}Ot(Ki,Ft),Ot(Ui,He,Ki);class Gi extends kt{constructor(){super(...arguments),this.percentComplete=0}valueChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}minChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}maxChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}connectedCallback(){super.connectedCallback(),this.updatePercentComplete()}updatePercentComplete(){const e="number"==typeof this.min?this.min:0,t="number"==typeof this.max?this.max:100,i="number"==typeof this.value?this.value:0,s=t-e;this.percentComplete=0===s?0:Math.fround((i-e)/s*100)}}ze([oe({converter:ie})],Gi.prototype,"value",void 0),ze([oe({converter:ie})],Gi.prototype,"min",void 0),ze([oe({converter:ie})],Gi.prototype,"max",void 0),ze([oe({mode:"boolean"})],Gi.prototype,"paused",void 0),ze([v],Gi.prototype,"percentComplete",void 0);class Wi extends kt{constructor(){super(...arguments),this.orientation=Rt.horizontal,this.radioChangeHandler=e=>{const t=e.target;t.checked&&(this.slottedRadioButtons.forEach((e=>{e!==t&&(e.checked=!1,this.isInsideFoundationToolbar||e.setAttribute("tabindex","-1"))})),this.selectedRadio=t,this.value=t.value,t.setAttribute("tabindex","0"),this.focusedRadio=t),e.stopPropagation()},this.moveToRadioByIndex=(e,t)=>{const i=e[t];this.isInsideToolbar||(i.setAttribute("tabindex","0"),i.readOnly?this.slottedRadioButtons.forEach((e=>{e!==i&&e.setAttribute("tabindex","-1")})):(i.checked=!0,this.selectedRadio=i)),this.focusedRadio=i,i.focus()},this.moveRightOffGroup=()=>{var e;null===(e=this.nextElementSibling)||void 0===e||e.focus()},this.moveLeftOffGroup=()=>{var e;null===(e=this.previousElementSibling)||void 0===e||e.focus()},this.focusOutHandler=e=>{const t=this.slottedRadioButtons,i=e.target,s=null!==i?t.indexOf(i):0,o=this.focusedRadio?t.indexOf(this.focusedRadio):-1;return(0===o&&s===o||o===t.length-1&&o===s)&&(this.selectedRadio?(this.focusedRadio=this.selectedRadio,this.isInsideFoundationToolbar||(this.selectedRadio.setAttribute("tabindex","0"),t.forEach((e=>{e!==this.selectedRadio&&e.setAttribute("tabindex","-1")})))):(this.focusedRadio=t[0],this.focusedRadio.setAttribute("tabindex","0"),t.forEach((e=>{e!==this.focusedRadio&&e.setAttribute("tabindex","-1")})))),!0},this.clickHandler=e=>{const t=e.target;if(t){const e=this.slottedRadioButtons;t.checked||0===e.indexOf(t)?(t.setAttribute("tabindex","0"),this.selectedRadio=t):(t.setAttribute("tabindex","-1"),this.selectedRadio=null),this.focusedRadio=t}e.preventDefault()},this.shouldMoveOffGroupToTheRight=(e,t,i)=>e===t.length&&this.isInsideToolbar&&"ArrowRight"===i,this.shouldMoveOffGroupToTheLeft=(e,t)=>(this.focusedRadio?e.indexOf(this.focusedRadio)-1:0)<0&&this.isInsideToolbar&&"ArrowLeft"===t,this.checkFocusedRadio=()=>{null===this.focusedRadio||this.focusedRadio.readOnly||this.focusedRadio.checked||(this.focusedRadio.checked=!0,this.focusedRadio.setAttribute("tabindex","0"),this.focusedRadio.focus(),this.selectedRadio=this.focusedRadio)},this.moveRight=e=>{const t=this.slottedRadioButtons;let i=0;if(i=this.focusedRadio?t.indexOf(this.focusedRadio)+1:1,this.shouldMoveOffGroupToTheRight(i,t,e.key))this.moveRightOffGroup();else for(i===t.length&&(i=0);i1;){if(!t[i].disabled){this.moveToRadioByIndex(t,i);break}if(this.focusedRadio&&i===t.indexOf(this.focusedRadio))break;if(i+1>=t.length){if(this.isInsideToolbar)break;i=0}else i+=1}},this.moveLeft=e=>{const t=this.slottedRadioButtons;let i=0;if(i=this.focusedRadio?t.indexOf(this.focusedRadio)-1:0,i=i<0?t.length-1:i,this.shouldMoveOffGroupToTheLeft(t,e.key))this.moveLeftOffGroup();else for(;i>=0&&t.length>1;){if(!t[i].disabled){this.moveToRadioByIndex(t,i);break}if(this.focusedRadio&&i===t.indexOf(this.focusedRadio))break;i-1<0?i=t.length-1:i-=1}},this.keydownHandler=e=>{const t=e.key;if(t in Et&&this.isInsideFoundationToolbar)return!0;switch(t){case"Enter":this.checkFocusedRadio();break;case"ArrowRight":case"ArrowDown":this.direction===Dt.ltr?this.moveRight(e):this.moveLeft(e);break;case"ArrowLeft":case"ArrowUp":this.direction===Dt.ltr?this.moveLeft(e):this.moveRight(e);break;default:return!0}}}readOnlyChanged(){void 0!==this.slottedRadioButtons&&this.slottedRadioButtons.forEach((e=>{this.readOnly?e.readOnly=!0:e.readOnly=!1}))}disabledChanged(){void 0!==this.slottedRadioButtons&&this.slottedRadioButtons.forEach((e=>{this.disabled?e.disabled=!0:e.disabled=!1}))}nameChanged(){this.slottedRadioButtons&&this.slottedRadioButtons.forEach((e=>{e.setAttribute("name",this.name)}))}valueChanged(){this.slottedRadioButtons&&this.slottedRadioButtons.forEach((e=>{e.getAttribute("value")===this.value&&(e.checked=!0,this.selectedRadio=e)})),this.$emit("change")}slottedRadioButtonsChanged(e,t){this.slottedRadioButtons&&this.slottedRadioButtons.length>0&&this.setupRadioButtons()}get parentToolbar(){return this.closest('[role="toolbar"]')}get isInsideToolbar(){var e;return null!==(e=this.parentToolbar)&&void 0!==e&&e}get isInsideFoundationToolbar(){var e;return!!(null===(e=this.parentToolbar)||void 0===e?void 0:e.$fastController)}connectedCallback(){super.connectedCallback(),this.direction=(e=>{const t=e.closest("[dir]");return null!==t&&"rtl"===t.dir?Dt.rtl:Dt.ltr})(this),this.setupRadioButtons()}disconnectedCallback(){this.slottedRadioButtons.forEach((e=>{e.removeEventListener("change",this.radioChangeHandler)}))}setupRadioButtons(){const e=this.slottedRadioButtons.filter((e=>e.hasAttribute("checked"))),t=e?e.length:0;if(t>1){e[t-1].checked=!0}let i=!1;if(this.slottedRadioButtons.forEach((e=>{void 0!==this.name&&e.setAttribute("name",this.name),this.disabled&&(e.disabled=!0),this.readOnly&&(e.readOnly=!0),this.value&&this.value===e.value?(this.selectedRadio=e,this.focusedRadio=e,e.checked=!0,e.setAttribute("tabindex","0"),i=!0):(this.isInsideFoundationToolbar||e.setAttribute("tabindex","-1"),e.checked=!1),e.addEventListener("change",this.radioChangeHandler)})),void 0===this.value&&this.slottedRadioButtons.length>0){const e=this.slottedRadioButtons.filter((e=>e.hasAttribute("checked"))),t=null!==e?e.length:0;if(t>0&&!i){const i=e[t-1];i.checked=!0,this.focusedRadio=i,i.setAttribute("tabindex","0")}else this.slottedRadioButtons[0].setAttribute("tabindex","0"),this.focusedRadio=this.slottedRadioButtons[0]}}}ze([oe({attribute:"readonly",mode:"boolean"})],Wi.prototype,"readOnly",void 0),ze([oe({attribute:"disabled",mode:"boolean"})],Wi.prototype,"disabled",void 0),ze([oe],Wi.prototype,"name",void 0),ze([oe],Wi.prototype,"value",void 0),ze([oe],Wi.prototype,"orientation",void 0),ze([v],Wi.prototype,"childItems",void 0),ze([v],Wi.prototype,"slottedRadioButtons",void 0);class Qi extends kt{}class Yi extends(_t(Qi)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Xi extends Yi{constructor(){super(),this.initialValue="on",this.keypressHandler=e=>{if(" "!==e.key)return!0;this.checked||this.readOnly||(this.checked=!0)},this.proxy.setAttribute("type","radio")}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}defaultCheckedChanged(){var e;this.$fastController.isConnected&&!this.dirtyChecked&&(this.isInsideRadioGroup()||(this.checked=null!==(e=this.defaultChecked)&&void 0!==e&&e,this.dirtyChecked=!1))}connectedCallback(){var e,t;super.connectedCallback(),this.validate(),"radiogroup"!==(null===(e=this.parentElement)||void 0===e?void 0:e.getAttribute("role"))&&null===this.getAttribute("tabindex")&&(this.disabled||this.setAttribute("tabindex","0")),this.checkedAttribute&&(this.dirtyChecked||this.isInsideRadioGroup()||(this.checked=null!==(t=this.defaultChecked)&&void 0!==t&&t,this.dirtyChecked=!1))}isInsideRadioGroup(){return null!==this.closest("[role=radiogroup]")}clickHandler(e){this.disabled||this.readOnly||this.checked||(this.checked=!0)}}ze([oe({attribute:"readonly",mode:"boolean"})],Xi.prototype,"readOnly",void 0),ze([v],Xi.prototype,"name",void 0),ze([v],Xi.prototype,"defaultSlottedNodes",void 0);class Ji extends li{}class Zi extends(jt(Ji)){constructor(){super(...arguments),this.proxy=document.createElement("select")}}class es extends Zi{constructor(){super(...arguments),this.open=!1,this.forcedPosition=!1,this.position=ci.below,this.listboxId=Bt("listbox-"),this.maxHeight=0,this.displayValue=""}openChanged(){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,void c.queueUpdate((()=>this.focus()));this.ariaControls="",this.ariaExpanded="false"}get value(){return m.track(this,"value"),this._value}set value(e){var t;const i=`${this._value}`;if(null===(t=this.options)||void 0===t?void 0:t.length){const t=this.options.findIndex((t=>t.value===e)),i=this.options[this.selectedIndex],s=this.options[t],o=i?i.value:null,n=s?s.value:null;-1!==t&&o===n||(e="",this.selectedIndex=t),this.firstSelectedOption&&(e=this.firstSelectedOption.value)}i!==e&&(this._value=e,super.valueChanged(i,e),m.notify(this,"value"))}updateValue(e){this.$fastController.isConnected&&(this.value=this.firstSelectedOption?this.firstSelectedOption.value:"",this.displayValue=this.firstSelectedOption?this.firstSelectedOption.textContent||this.firstSelectedOption.value:this.value),e&&(this.$emit("input"),this.$emit("change",this,{bubbles:!0,composed:void 0}))}selectedIndexChanged(e,t){super.selectedIndexChanged(e,t),this.updateValue()}positionChanged(){this.positionAttribute=this.position,this.setPositioning()}setPositioning(){const e=this.getBoundingClientRect(),t=window.innerHeight-e.bottom;this.position=this.forcedPosition?this.positionAttribute:e.top>t?ci.above:ci.below,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===ci.above?~~e.top:~~t}maxHeightChanged(){this.listbox&&this.listbox.style.setProperty("--max-height",`${this.maxHeight}px`)}disabledChanged(e,t){super.disabledChanged&&super.disabledChanged(e,t),this.ariaDisabled=this.disabled?"true":"false"}formResetCallback(){this.setProxyOptions(),super.setDefaultSelectedOption(),-1===this.selectedIndex&&(this.selectedIndex=0)}clickHandler(e){if(!this.disabled){if(this.open){const t=e.target.closest("option,[role=option]");if(t&&t.disabled)return}return super.clickHandler(e),this.open=!this.open,this.open||this.indexWhenOpened===this.selectedIndex||this.updateValue(!0),!0}}focusoutHandler(e){var t;if(!this.open)return!0;const i=e.relatedTarget;this.isSameNode(i)?this.focus():(null===(t=this.options)||void 0===t?void 0:t.includes(i))||(this.open=!1,this.indexWhenOpened!==this.selectedIndex&&this.updateValue(!0))}slottedOptionsChanged(e,t){super.slottedOptionsChanged(e,t),this.setProxyOptions(),this.updateValue()}setDefaultSelectedOption(){var e;const t=null!==(e=this.options)&&void 0!==e?e:Array.from(this.children).filter(li.slottedOptionFilter),i=null==t?void 0:t.findIndex((e=>e.hasAttribute("selected")||e.selected||e.value===this.value));this.selectedIndex=-1===i?0:i}setProxyOptions(){this.proxy instanceof HTMLSelectElement&&this.options&&(this.proxy.options.length=0,this.options.forEach((e=>{const t=e.proxy||(e instanceof HTMLOptionElement?e.cloneNode():null);t&&this.proxy.appendChild(t)})))}keydownHandler(e){super.keydownHandler(e);switch(e.key||e.key.charCodeAt(0)){case" ":this.typeaheadExpired&&(e.preventDefault(),this.open=!this.open);break;case"Enter":e.preventDefault(),this.open=!this.open;break;case"Escape":this.open&&(e.preventDefault(),this.open=!1);break;case"Tab":if(!this.open)return!0;e.preventDefault(),this.open=!1}return this.open||this.indexWhenOpened===this.selectedIndex||(this.updateValue(!0),this.indexWhenOpened=this.selectedIndex),!0}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute}}ze([oe({attribute:"open",mode:"boolean"})],es.prototype,"open",void 0),ze([oe({attribute:"position"})],es.prototype,"positionAttribute",void 0),ze([v],es.prototype,"position",void 0),ze([v],es.prototype,"maxHeight",void 0),ze([v],es.prototype,"displayValue",void 0);class ts{}ze([v],ts.prototype,"ariaControls",void 0),Ot(ts,di),Ot(es,He,ts);class is extends kt{}class ss extends kt{}ze([oe({mode:"boolean"})],ss.prototype,"disabled",void 0);var os,ns;!function(e){e.vertical="vertical",e.horizontal="horizontal"}(os||(os={}));class rs extends kt{constructor(){super(...arguments),this.orientation=os.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=>"true"===e.getAttribute("aria-disabled"),this.isFocusableElement=e=>!this.isDisabledElement(e),this.setTabs=()=>{const e="gridColumn",t="gridRow",i=this.isHorizontal()?e:t;this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex(),this.showActiveIndicator=!1,this.tabs.forEach(((e,t)=>{if("tab"===e.slot){const i=this.activeTabIndex===t&&this.isFocusableElement(e);this.activeindicator&&this.isFocusableElement(e)&&(this.showActiveIndicator=!0);const s=this.tabIds[t],o=this.tabpanelIds[t];e.setAttribute("id","string"!=typeof s?`tab-${t+1}`:s),e.setAttribute("aria-selected",i?"true":"false"),e.setAttribute("aria-controls","string"!=typeof o?`panel-${t+1}`:o),e.addEventListener("click",this.handleTabClick),e.addEventListener("keydown",this.handleTabKeyDown),e.setAttribute("tabindex",i?"0":"-1"),i&&(this.activetab=e)}e.style.gridColumn="",e.style.gridRow="",e.style[i]=`${t+1}`,this.isHorizontal()?e.classList.remove("vertical"):e.classList.add("vertical")}))},this.setTabPanels=()=>{this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.tabpanels.forEach(((e,t)=>{const i=this.tabIds[t],s=this.tabpanelIds[t];e.setAttribute("id","string"!=typeof s?`panel-${t+1}`:s),e.setAttribute("aria-labelledby","string"!=typeof i?`tab-${t+1}`:i),this.activeTabIndex!==t?e.setAttribute("hidden",""):e.removeAttribute("hidden")}))},this.handleTabClick=e=>{const t=e.currentTarget;1===t.nodeType&&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"ArrowLeft":e.preventDefault(),this.adjustBackward(e);break;case"ArrowRight":e.preventDefault(),this.adjustForward(e)}else switch(e.key){case"ArrowUp":e.preventDefault(),this.adjustBackward(e);break;case"ArrowDown":e.preventDefault(),this.adjustForward(e)}switch(e.key){case"Home":e.preventDefault(),this.adjust(-this.activeTabIndex);break;case"End":e.preventDefault(),this.adjust(this.tabs.length-this.activeTabIndex-1)}},this.adjustForward=e=>{const t=this.tabs;let i=0;for(i=this.activetab?t.indexOf(this.activetab)+1:1,i===t.length&&(i=0);i1;){if(this.isFocusableElement(t[i])){this.moveToTabByIndex(t,i);break}if(this.activetab&&i===t.indexOf(this.activetab))break;i+1>=t.length?i=0:i+=1}},this.adjustBackward=e=>{const t=this.tabs;let i=0;for(i=this.activetab?t.indexOf(this.activetab)-1:0,i=i<0?t.length-1:i;i>=0&&t.length>1;){if(this.isFocusableElement(t[i])){this.moveToTabByIndex(t,i);break}i-1<0?i=t.length-1:i-=1}},this.moveToTabByIndex=(e,t)=>{const i=e[t];this.activetab=i,this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=t,i.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((t=>t.id===e)),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabsChanged(){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}getActiveIndex(){return void 0!==this.activeid?-1===this.tabIds.indexOf(this.activeid)?0:this.tabIds.indexOf(this.activeid):0}getTabIds(){return this.tabs.map((e=>e.getAttribute("id")))}getTabPanelIds(){return this.tabpanels.map((e=>e.getAttribute("id")))}setComponent(){this.activeTabIndex!==this.prevActiveTabIndex&&(this.activeid=this.tabIds[this.activeTabIndex],this.focusTab(),this.change())}isHorizontal(){return this.orientation===os.horizontal}handleActiveIndicatorPosition(){this.showActiveIndicator&&this.activeindicator&&this.activeTabIndex!==this.prevActiveTabIndex&&(this.ticking?this.ticking=!1:(this.ticking=!0,this.animateActiveIndicator()))}animateActiveIndicator(){this.ticking=!0;const e=this.isHorizontal()?"gridColumn":"gridRow",t=this.isHorizontal()?"translateX":"translateY",i=this.isHorizontal()?"offsetLeft":"offsetTop",s=this.activeIndicatorRef[i];this.activeIndicatorRef.style[e]=`${this.activeTabIndex+1}`;const o=this.activeIndicatorRef[i];this.activeIndicatorRef.style[e]=`${this.prevActiveTabIndex+1}`;const n=o-s;this.activeIndicatorRef.style.transform=`${t}(${n}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){var t,i,s;this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=(t=0,i=this.tabs.length-1,(s=this.activeTabIndex+e)i?t:s),this.setComponent()}focusTab(){this.tabs[this.activeTabIndex].focus()}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}}ze([oe],rs.prototype,"orientation",void 0),ze([oe],rs.prototype,"activeid",void 0),ze([v],rs.prototype,"tabs",void 0),ze([v],rs.prototype,"tabpanels",void 0),ze([oe({mode:"boolean"})],rs.prototype,"activeindicator",void 0),ze([v],rs.prototype,"activeIndicatorRef",void 0),ze([v],rs.prototype,"showActiveIndicator",void 0),Ot(rs,He);class as extends kt{}class ls extends(jt(as)){constructor(){super(...arguments),this.proxy=document.createElement("textarea")}}!function(e){e.none="none",e.both="both",e.horizontal="horizontal",e.vertical="vertical"}(ns||(ns={}));class ds extends ls{constructor(){super(...arguments),this.resize=ns.none,this.cols=20,this.handleTextInput=()=>{this.value=this.control.value}}readOnlyChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.readOnly=this.readOnly)}autofocusChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.autofocus=this.autofocus)}listChanged(){this.proxy instanceof HTMLTextAreaElement&&this.proxy.setAttribute("list",this.list)}maxlengthChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.maxLength=this.maxlength)}minlengthChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.minLength=this.minlength)}spellcheckChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.spellcheck=this.spellcheck)}handleChange(){this.$emit("change")}}ze([oe({mode:"boolean"})],ds.prototype,"readOnly",void 0),ze([oe],ds.prototype,"resize",void 0),ze([oe({mode:"boolean"})],ds.prototype,"autofocus",void 0),ze([oe({attribute:"form"})],ds.prototype,"formId",void 0),ze([oe],ds.prototype,"list",void 0),ze([oe({converter:ie})],ds.prototype,"maxlength",void 0),ze([oe({converter:ie})],ds.prototype,"minlength",void 0),ze([oe],ds.prototype,"name",void 0),ze([oe],ds.prototype,"placeholder",void 0),ze([oe({converter:ie,mode:"fromView"})],ds.prototype,"cols",void 0),ze([oe({converter:ie,mode:"fromView"})],ds.prototype,"rows",void 0),ze([oe({mode:"boolean"})],ds.prototype,"spellcheck",void 0),ze([v],ds.prototype,"defaultSlottedNodes",void 0),Ot(ds,Ki);function cs(e){const t=getComputedStyle(document.body),i=document.querySelector("body");if(i){const s=i.getAttribute("data-vscode-theme-kind");for(const[o,n]of e){let e=t.getPropertyValue(o).toString();"vscode-high-contrast"===s?(0===e.length&&n.name.includes("background")&&(e="transparent"),"button-icon-hover-background"===n.name&&(e="transparent")):"contrast-active-border"===n.name&&(e="transparent"),n.setValueFor(i,e)}}}const hs=new Map;let us=!1;function ps(e,t){const i=Ei.create(e);if(t){if(t.includes("--fake-vscode-token")){t=`${t}-${"id"+Math.random().toString(16).slice(2)}`}hs.set(t,i)}return us||(!function(e){window.addEventListener("load",(()=>{new MutationObserver((()=>{cs(e)})).observe(document.body,{attributes:!0,attributeFilter:["class"]}),cs(e)}))}(hs),us=!0),i}const fs=ps("background","--vscode-editor-background").withDefault("#1e1e1e"),bs=ps("border-width").withDefault(1),gs=ps("contrast-active-border","--vscode-contrastActiveBorder").withDefault("#f38518");ps("contrast-border","--vscode-contrastBorder").withDefault("#6fc3df");const ms=ps("corner-radius").withDefault(0),vs=ps("design-unit").withDefault(4),ys=ps("disabled-opacity").withDefault(.4),xs=ps("focus-border","--vscode-focusBorder").withDefault("#007fd4"),Cs=ps("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");ps("font-weight","--vscode-font-weight").withDefault("400");const ws=ps("foreground","--vscode-foreground").withDefault("#cccccc"),$s=ps("input-height").withDefault("26"),ks=ps("input-min-width").withDefault("100px"),Ts=ps("type-ramp-base-font-size","--vscode-font-size").withDefault("13px"),Is=ps("type-ramp-base-line-height").withDefault("normal"),Os=ps("type-ramp-minus1-font-size").withDefault("11px"),Rs=ps("type-ramp-minus1-line-height").withDefault("16px");ps("type-ramp-minus2-font-size").withDefault("9px"),ps("type-ramp-minus2-line-height").withDefault("16px"),ps("type-ramp-plus1-font-size").withDefault("16px"),ps("type-ramp-plus1-line-height").withDefault("24px");const As=ps("scrollbarWidth").withDefault("10px"),Ss=ps("scrollbarHeight").withDefault("10px"),Es=ps("scrollbar-slider-background","--vscode-scrollbarSlider-background").withDefault("#79797966"),Ds=ps("scrollbar-slider-hover-background","--vscode-scrollbarSlider-hoverBackground").withDefault("#646464b3"),Ps=ps("scrollbar-slider-active-background","--vscode-scrollbarSlider-activeBackground").withDefault("#bfbfbf66"),Bs=ps("badge-background","--vscode-badge-background").withDefault("#4d4d4d"),Fs=ps("badge-foreground","--vscode-badge-foreground").withDefault("#ffffff"),Ls=ps("button-border","--vscode-button-border").withDefault("transparent"),Vs=ps("button-icon-background").withDefault("transparent"),Hs=ps("button-icon-corner-radius").withDefault("5px"),Ms=ps("button-icon-outline-offset").withDefault(0),Ns=ps("button-icon-hover-background","--fake-vscode-token").withDefault("rgba(90, 93, 94, 0.31)"),zs=ps("button-icon-padding").withDefault("3px"),js=ps("button-primary-background","--vscode-button-background").withDefault("#0e639c"),_s=ps("button-primary-foreground","--vscode-button-foreground").withDefault("#ffffff"),qs=ps("button-primary-hover-background","--vscode-button-hoverBackground").withDefault("#1177bb"),Us=ps("button-secondary-background","--vscode-button-secondaryBackground").withDefault("#3a3d41"),Ks=ps("button-secondary-foreground","--vscode-button-secondaryForeground").withDefault("#ffffff"),Gs=ps("button-secondary-hover-background","--vscode-button-secondaryHoverBackground").withDefault("#45494e"),Ws=ps("button-padding-horizontal").withDefault("11px"),Qs=ps("button-padding-vertical").withDefault("4px"),Ys=ps("checkbox-background","--vscode-checkbox-background").withDefault("#3c3c3c"),Xs=ps("checkbox-border","--vscode-checkbox-border").withDefault("#3c3c3c"),Js=ps("checkbox-corner-radius").withDefault(3);ps("checkbox-foreground","--vscode-checkbox-foreground").withDefault("#f0f0f0");const Zs=ps("list-active-selection-background","--vscode-list-activeSelectionBackground").withDefault("#094771"),eo=ps("list-active-selection-foreground","--vscode-list-activeSelectionForeground").withDefault("#ffffff"),to=ps("list-hover-background","--vscode-list-hoverBackground").withDefault("#2a2d2e"),io=ps("divider-background","--vscode-settings-dropdownListBorder").withDefault("#454545"),so=ps("dropdown-background","--vscode-dropdown-background").withDefault("#3c3c3c"),oo=ps("dropdown-border","--vscode-dropdown-border").withDefault("#3c3c3c");ps("dropdown-foreground","--vscode-dropdown-foreground").withDefault("#f0f0f0");const no=ps("dropdown-list-max-height").withDefault("200px"),ro=ps("input-background","--vscode-input-background").withDefault("#3c3c3c"),ao=ps("input-foreground","--vscode-input-foreground").withDefault("#cccccc");ps("input-placeholder-foreground","--vscode-input-placeholderForeground").withDefault("#cccccc");const lo=ps("link-active-foreground","--vscode-textLink-activeForeground").withDefault("#3794ff"),co=ps("link-foreground","--vscode-textLink-foreground").withDefault("#3794ff"),ho=ps("progress-background","--vscode-progressBar-background").withDefault("#0e70c0"),uo=ps("panel-tab-active-border","--vscode-panelTitle-activeBorder").withDefault("#e7e7e7"),po=ps("panel-tab-active-foreground","--vscode-panelTitle-activeForeground").withDefault("#e7e7e7"),fo=ps("panel-tab-foreground","--vscode-panelTitle-inactiveForeground").withDefault("#e7e7e799");ps("panel-view-background","--vscode-panel-background").withDefault("#1e1e1e"),ps("panel-view-border","--vscode-panel-border").withDefault("#80808059");const bo=ps("tag-corner-radius").withDefault("2px");class go extends Mt{connectedCallback(){super.connectedCallback(),this.circular||(this.circular=!0)}}const mo=go.compose({baseName:"badge",template:Ht,styles:(e,t)=>ge` ${ui("inline-block")} :host{box-sizing: border-box;font-family: ${Cs};font-size: ${Os};line-height: ${Rs};text-align: center}.control{align-items: center;background-color: ${Bs};border: calc(${bs} * 1px) solid ${Ls};border-radius: 11px;box-sizing: border-box;color: ${Fs};display: flex;height: calc(${vs} * 4px);justify-content: center;min-width: calc(${vs} * 4px + 2px);min-height: calc(${vs} * 4px + 2px);padding: 3px 6px}`}); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */const vo=ge` ${ui("inline-flex")} :host{outline: none;font-family: ${Cs};font-size: ${Ts};line-height: ${Is};color: ${_s};background: ${js};border-radius: calc(${ms} * 1px);fill: currentColor;cursor: pointer}.control{background: transparent;height: inherit;flex-grow: 1;box-sizing: border-box;display: inline-flex;justify-content: center;align-items: center;padding: ${Qs} ${Ws};white-space: wrap;outline: none;text-decoration: none;border: calc(${bs} * 1px) solid ${Ls};color: inherit;border-radius: inherit;fill: inherit;cursor: inherit;font-family: inherit;max-width: 300px}:host(:hover){background: ${qs}}:host(:active){background: ${js}}.control:${pi}{outline: calc(${bs} * 1px) solid ${xs};outline-offset: calc(${bs} * 2px)}.control::-moz-focus-inner{border: 0}:host([disabled]){opacity: ${ys};background: ${js};cursor: ${"not-allowed"}}.content{display: flex}.start{display: flex}::slotted(svg), ::slotted(span){width: calc(${vs} * 4px);height: calc(${vs} * 4px)}.start{margin-inline-end: 8px}`,yo=ge` :host([appearance='primary']){background: ${js};color: ${_s}}:host([appearance='primary']:hover){background: ${qs}}:host([appearance='primary']:active) .control:active{background: ${js}}:host([appearance='primary']) .control:${pi}{outline: calc(${bs} * 1px) solid ${xs};outline-offset: calc(${bs} * 2px)}:host([appearance='primary'][disabled]){background: ${js}}`,xo=ge` :host([appearance='secondary']){background: ${Us};color: ${Ks}}:host([appearance='secondary']:hover){background: ${Gs}}:host([appearance='secondary']:active) .control:active{background: ${Us}}:host([appearance='secondary']) .control:${pi}{outline: calc(${bs} * 1px) solid ${xs};outline-offset: calc(${bs} * 2px)}:host([appearance='secondary'][disabled]){background: ${Us}}`,Co=ge` :host([appearance='icon']){background: ${Vs};border-radius: ${Hs};color: ${ws}}:host([appearance='icon']:hover){background: ${Ns};outline: 1px dotted ${gs};outline-offset: -1px}:host([appearance='icon']) .control{padding: ${zs};border: none}:host([appearance='icon']:active) .control:active{background: ${Ns}}:host([appearance='icon']) .control:${pi}{outline: calc(${bs} * 1px) solid ${xs};outline-offset: ${Ms}}:host([appearance='icon'][disabled]){background: ${Vs}}`;class wo extends Kt{connectedCallback(){if(super.connectedCallback(),!this.appearance){const e=this.getAttribute("appearance");this.appearance=e}}attributeChangedCallback(e,t,i){if("appearance"===e&&"icon"===i){this.getAttribute("aria-label")||(this.ariaLabel="Icon Button")}"aria-label"===e&&(this.ariaLabel=i),"disabled"===e&&(this.disabled=null!==i)}}!function(e,t,i,s){var o,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(n<3?o(r):n>3?o(t,i,r):o(t,i))||r);n>3&&r&&Object.defineProperty(t,i,r)}([oe],wo.prototype,"appearance",void 0);const $o=wo.compose({baseName:"button",template:(e,t)=>W``,styles:(e,t)=>ge` ${vo} ${yo} ${xo} ${Co}`,shadowOptions:{delegatesFocus:!0}});class ko extends oi{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Checkbox")}}const To=ko.compose({baseName:"checkbox",template:(e,t)=>W``,styles:(e,t)=>ge` ${ui("inline-flex")} :host{align-items: center;outline: none;margin: calc(${vs} * 1px) 0;user-select: none;font-size: ${Ts};line-height: ${Is}}.control{position: relative;width: calc(${vs} * 4px + 2px);height: calc(${vs} * 4px + 2px);box-sizing: border-box;border-radius: calc(${Js} * 1px);border: calc(${bs} * 1px) solid ${Xs};background: ${Ys};outline: none;cursor: pointer}.label{font-family: ${Cs};color: ${ws};padding-inline-start: calc(${vs} * 2px + 2px);margin-inline-end: calc(${vs} * 2px + 2px);cursor: pointer}.label__hidden{display: none;visibility: hidden}.checked-indicator{width: 100%;height: 100%;display: block;fill: ${ws};opacity: 0;pointer-events: none}.indeterminate-indicator{border-radius: 2px;background: ${ws};position: absolute;top: 50%;left: 50%;width: 50%;height: 50%;transform: translate(-50%, -50%);opacity: 0}:host(:enabled) .control:hover{background: ${Ys};border-color: ${Xs}}:host(:enabled) .control:active{background: ${Ys};border-color: ${xs}}:host(:${pi}) .control{border: calc(${bs} * 1px) solid ${xs}}:host(.disabled) .label, :host(.readonly) .label, :host(.readonly) .control, :host(.disabled) .control{cursor: ${"not-allowed"}}:host(.checked:not(.indeterminate)) .checked-indicator, :host(.indeterminate) .indeterminate-indicator{opacity: 1}:host(.disabled){opacity: ${ys}}`,checkedIndicator:'\n\t\t\n\t\t\t\n\t\t\n\t',indeterminateIndicator:'\n\t\t
\n\t'});class Io extends Jt{connectedCallback(){super.connectedCallback();this.getAttribute("aria-label")||this.setAttribute("aria-label","Data Grid")}}const Oo=Io.compose({baseName:"data-grid",baseClass:Jt,template:(e,t)=>{const i=function(e){const t=e.tagFor(Xt);return W`<${t} :rowData="${e=>e}" :cellItemTemplate="${(e,t)=>t.parent.cellItemTemplate}" :headerCellItemTemplate="${(e,t)=>t.parent.headerCellItemTemplate}">`}(e),s=e.tagFor(Xt);return W``},styles:(e,t)=>ge` :host{display: flex;position: relative;flex-direction: column;width: 100%}`});class Ro extends Xt{}const Ao=Ro.compose({baseName:"data-grid-row",baseClass:Xt,template:(e,t)=>{const i=function(e){const t=e.tagFor(ti);return W`<${t} cell-type="${e=>e.isRowHeader?"rowheader":void 0}" grid-column="${(e,t)=>t.index+1}" :rowData="${(e,t)=>t.parent.rowData}" :columnDefinition="${e=>e}">`}(e),s=function(e){const t=e.tagFor(ti);return W`<${t} cell-type="columnheader" grid-column="${(e,t)=>t.index+1}" :columnDefinition="${e=>e}">`}(e);return W``},styles:(e,t)=>ge` :host{display: grid;padding: calc((${vs} / 4) * 1px) 0;box-sizing: border-box;width: 100%;background: transparent}:host(.header){}:host(.sticky-header){background: ${fs};position: sticky;top: 0}:host(:hover){background: ${to};outline: 1px dotted ${gs};outline-offset: -1px}`});class So extends ti{}const Eo=So.compose({baseName:"data-grid-cell",baseClass:ti,template:(e,t)=>W``,styles:(e,t)=>ge` :host{padding: calc(${vs} * 1px) calc(${vs} * 3px);color: ${ws};opacity: 1;box-sizing: border-box;font-family: ${Cs};font-size: ${Ts};line-height: ${Is};font-weight: 400;border: solid calc(${bs} * 1px) transparent;border-radius: calc(${ms} * 1px);white-space: wrap;overflow-wrap: anywhere}:host(.column-header){font-weight: 600;overflow-wrap: normal}:host(:${pi}), :host(:focus), :host(:active){background: ${Zs};border: solid calc(${bs} * 1px) ${xs};color: ${eo};outline: none}:host(:${pi}) ::slotted(*), :host(:focus) ::slotted(*), :host(:active) ::slotted(*){color: ${eo} !important}`});class Do extends zi{}const Po=Do.compose({baseName:"divider",template:(e,t)=>W``,styles:(e,t)=>ge` ${ui("block")} :host{border: none;border-top: calc(${bs} * 1px) solid ${io};box-sizing: content-box;height: 0;margin: calc(${vs} * 1px) 0;width: 100%}`});class Bo extends es{}const Fo=Bo.compose({baseName:"dropdown",template:(e,t)=>W``,styles:(e,t)=>ge` ${ui("inline-flex")} :host{background: ${so};box-sizing: border-box;color: ${ws};contain: contents;font-family: ${Cs};height: calc(${$s} * 1px);position: relative;user-select: none;min-width: ${ks};outline: none;vertical-align: top}.control{align-items: center;box-sizing: border-box;border: calc(${bs} * 1px) solid ${oo};border-radius: calc(${ms} * 1px);cursor: pointer;display: flex;font-family: inherit;font-size: ${Ts};line-height: ${Is};min-height: 100%;padding: 2px 6px 2px 8px;width: 100%}.listbox{background: ${so};border: calc(${bs} * 1px) solid ${xs};border-radius: calc(${ms} * 1px);box-sizing: border-box;display: inline-flex;flex-direction: column;left: 0;max-height: ${no};padding: 0 0 calc(${vs} * 1px) 0;overflow-y: auto;position: absolute;width: 100%;z-index: 1}.listbox[hidden]{display: none}:host(:${pi}) .control{border-color: ${xs}}:host(:not([disabled]):hover){background: ${so};border-color: ${oo}}:host(:${pi}) ::slotted([aria-selected="true"][role="option"]:not([disabled])){background: ${Zs};border: calc(${bs} * 1px) solid ${xs};color: ${eo}}:host([disabled]){cursor: ${"not-allowed"};opacity: ${ys}}:host([disabled]) .control{cursor: ${"not-allowed"};user-select: none}:host([disabled]:hover){background: ${so};color: ${ws};fill: currentcolor}:host(:not([disabled])) .control:active{border-color: ${xs}}:host(:empty) .listbox{display: none}:host([open]) .control{border-color: ${xs}}:host([open][position='above']) .listbox, :host([open][position='below']) .control{border-bottom-left-radius: 0;border-bottom-right-radius: 0}:host([open][position='above']) .control, :host([open][position='below']) .listbox{border-top-left-radius: 0;border-top-right-radius: 0}:host([open][position='above']) .listbox{bottom: calc(${$s} * 1px)}:host([open][position='below']) .listbox{top: calc(${$s} * 1px)}.selected-value{flex: 1 1 auto;font-family: inherit;overflow: hidden;text-align: start;text-overflow: ellipsis;white-space: nowrap}.indicator{flex: 0 0 auto;margin-inline-start: 1em}slot[name='listbox']{display: none;width: 100%}:host([open]) slot[name='listbox']{display: flex;position: absolute}.end{margin-inline-start: auto}.start, .end, .indicator, .select-indicator, ::slotted(svg), ::slotted(span){fill: currentcolor;height: 1em;min-height: calc(${vs} * 4px);min-width: calc(${vs} * 4px);width: 1em}::slotted([role='option']), ::slotted(option){flex: 0 0 auto}`,indicator:'\n\t\t\n\t\t\t\n\t\t\n\t'});class Lo extends Lt{}const Vo=Lo.compose({baseName:"link",template:(e,t)=>W`${Ne(0,t)}${Me(0,t)}`,styles:(e,t)=>ge` ${ui("inline-flex")} :host{background: transparent;box-sizing: border-box;color: ${co};cursor: pointer;fill: currentcolor;font-family: ${Cs};font-size: ${Ts};line-height: ${Is};outline: none}.control{background: transparent;border: calc(${bs} * 1px) solid transparent;border-radius: calc(${ms} * 1px);box-sizing: border-box;color: inherit;cursor: inherit;fill: inherit;font-family: inherit;height: inherit;padding: 0;outline: none;text-decoration: none;white-space: nowrap}.control::-moz-focus-inner{border: 0}:host(:hover){color: ${lo}}:host(:hover) .content{text-decoration: underline}:host(:active){background: transparent;color: ${lo}}:host(:${pi}) .control{border: calc(${bs} * 1px) solid ${xs}}`,shadowOptions:{delegatesFocus:!0}});class Ho extends ri{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Option")}}const Mo=Ho.compose({baseName:"option",template:(e,t)=>W``,styles:(e,t)=>ge` ${ui("inline-flex")} :host{font-family: var(--body-font);border-radius: ${ms};border: calc(${bs} * 1px) solid transparent;box-sizing: border-box;color: ${ws};cursor: pointer;fill: currentcolor;font-size: ${Ts};line-height: ${Is};margin: 0;outline: none;overflow: hidden;padding: 0 calc((${vs} / 2) * 1px) calc((${vs} / 4) * 1px);user-select: none;white-space: nowrap}:host(:${pi}){border-color: ${xs};background: ${Zs};color: ${ws}}:host([aria-selected='true']){background: ${Zs};border: calc(${bs} * 1px) solid ${xs};color: ${eo}}:host(:active){background: ${Zs};color: ${eo}}:host(:not([aria-selected='true']):hover){background: ${Zs};border: calc(${bs} * 1px) solid ${xs};color: ${eo}}:host(:not([aria-selected='true']):active){background: ${Zs};color: ${ws}}:host([disabled]){cursor: ${"not-allowed"};opacity: ${ys}}:host([disabled]:hover){background-color: inherit}.content{grid-column-start: 2;justify-self: start;overflow: hidden;text-overflow: ellipsis}`});class No extends rs{connectedCallback(){super.connectedCallback(),this.orientation&&(this.orientation=os.horizontal);this.getAttribute("aria-label")||this.setAttribute("aria-label","Panels")}}const zo=No.compose({baseName:"panels",template:(e,t)=>W``,styles:(e,t)=>ge` ${ui("grid")} :host{box-sizing: border-box;font-family: ${Cs};font-size: ${Ts};line-height: ${Is};color: ${ws};grid-template-columns: auto 1fr auto;grid-template-rows: auto 1fr;overflow-x: auto}.tablist{display: grid;grid-template-rows: auto auto;grid-template-columns: auto;column-gap: calc(${vs} * 8px);position: relative;width: max-content;align-self: end;padding: calc(${vs} * 1px) calc(${vs} * 1px) 0;box-sizing: border-box}.start, .end{align-self: center}.activeIndicator{grid-row: 2;grid-column: 1;width: 100%;height: calc((${vs} / 4) * 1px);justify-self: center;background: ${po};margin: 0;border-radius: calc(${ms} * 1px)}.activeIndicatorTransition{transition: transform 0.01s linear}.tabpanel{grid-row: 2;grid-column-start: 1;grid-column-end: 4;position: relative}`});class jo extends ss{connectedCallback(){super.connectedCallback(),this.disabled&&(this.disabled=!1),this.textContent&&this.setAttribute("aria-label",this.textContent)}}const _o=jo.compose({baseName:"panel-tab",template:(e,t)=>W``,styles:(e,t)=>ge` ${ui("inline-flex")} :host{box-sizing: border-box;font-family: ${Cs};font-size: ${Ts};line-height: ${Is};height: calc(${vs} * 7px);padding: calc(${vs} * 1px) 0;color: ${fo};fill: currentcolor;border-radius: calc(${ms} * 1px);border: solid calc(${bs} * 1px) transparent;align-items: center;justify-content: center;grid-row: 1;cursor: pointer}:host(:hover){color: ${po};fill: currentcolor}:host(:active){color: ${po};fill: currentcolor}:host([aria-selected='true']){background: transparent;color: ${po};fill: currentcolor}:host([aria-selected='true']:hover){background: transparent;color: ${po};fill: currentcolor}:host([aria-selected='true']:active){background: transparent;color: ${po};fill: currentcolor}:host(:${pi}){outline: none;border: solid calc(${bs} * 1px) ${uo}}:host(:focus){outline: none}::slotted(vscode-badge){margin-inline-start: calc(${vs} * 2px)}`});class qo extends is{}const Uo=qo.compose({baseName:"panel-view",template:(e,t)=>W``,styles:(e,t)=>ge` ${ui("flex")} :host{color: inherit;background-color: transparent;border: solid calc(${bs} * 1px) transparent;box-sizing: border-box;font-size: ${Ts};line-height: ${Is};padding: 10px calc((${vs} + 2) * 1px)}`});class Ko extends Gi{connectedCallback(){super.connectedCallback(),this.paused&&(this.paused=!1),this.setAttribute("aria-label","Loading"),this.setAttribute("aria-live","assertive"),this.setAttribute("role","alert")}attributeChangedCallback(e,t,i){"value"===e&&this.removeAttribute("value")}}const Go=Ko.compose({baseName:"progress-ring",template:(e,t)=>W``,styles:(e,t)=>ge` ${ui("flex")} :host{align-items: center;outline: none;height: calc(${vs} * 7px);width: calc(${vs} * 7px);margin: 0}.progress{height: 100%;width: 100%}.background{fill: none;stroke: transparent;stroke-width: calc(${vs} / 2 * 1px)}.indeterminate-indicator-1{fill: none;stroke: ${ho};stroke-width: calc(${vs} / 2 * 1px);stroke-linecap: square;transform-origin: 50% 50%;transform: rotate(-90deg);transition: all 0.2s ease-in-out;animation: spin-infinite 2s linear infinite}@keyframes spin-infinite{0%{stroke-dasharray: 0.01px 43.97px;transform: rotate(0deg)}50%{stroke-dasharray: 21.99px 21.99px;transform: rotate(450deg)}100%{stroke-dasharray: 0.01px 43.97px;transform: rotate(1080deg)}}`,indeterminateIndicator:'\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t'});class Wo extends Wi{connectedCallback(){super.connectedCallback();const e=this.querySelector("label");if(e){const t="radio-group-"+Math.random().toString(16).slice(2);e.setAttribute("id",t),this.setAttribute("aria-labelledby",t)}}}const Qo=Wo.compose({baseName:"radio-group",template:(e,t)=>W``,styles:(e,t)=>ge` ${ui("flex")} :host{align-items: flex-start;margin: calc(${vs} * 1px) 0;flex-direction: column}.positioning-region{display: flex;flex-wrap: wrap}:host([orientation='vertical']) .positioning-region{flex-direction: column}:host([orientation='horizontal']) .positioning-region{flex-direction: row}::slotted([slot='label']){color: ${ws};font-size: ${Ts};margin: calc(${vs} * 1px) 0}`});class Yo extends Xi{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Radio")}}const Xo=Yo.compose({baseName:"radio",template:(e,t)=>W``,styles:(e,t)=>ge` ${ui("inline-flex")} :host{align-items: center;flex-direction: row;font-size: ${Ts};line-height: ${Is};margin: calc(${vs} * 1px) 0;outline: none;position: relative;transition: all 0.2s ease-in-out;user-select: none}.control{background: ${Ys};border-radius: 999px;border: calc(${bs} * 1px) solid ${Xs};box-sizing: border-box;cursor: pointer;height: calc(${vs} * 4px);position: relative;outline: none;width: calc(${vs} * 4px)}.label{color: ${ws};cursor: pointer;font-family: ${Cs};margin-inline-end: calc(${vs} * 2px + 2px);padding-inline-start: calc(${vs} * 2px + 2px)}.label__hidden{display: none;visibility: hidden}.control, .checked-indicator{flex-shrink: 0}.checked-indicator{background: ${ws};border-radius: 999px;display: inline-block;inset: calc(${vs} * 1px);opacity: 0;pointer-events: none;position: absolute}:host(:not([disabled])) .control:hover{background: ${Ys};border-color: ${Xs}}:host(:not([disabled])) .control:active{background: ${Ys};border-color: ${xs}}:host(:${pi}) .control{border: calc(${bs} * 1px) solid ${xs}}:host([aria-checked='true']) .control{background: ${Ys};border: calc(${bs} * 1px) solid ${Xs}}:host([aria-checked='true']:not([disabled])) .control:hover{background: ${Ys};border: calc(${bs} * 1px) solid ${Xs}}:host([aria-checked='true']:not([disabled])) .control:active{background: ${Ys};border: calc(${bs} * 1px) solid ${xs}}:host([aria-checked="true"]:${pi}:not([disabled])) .control{border: calc(${bs} * 1px) solid ${xs}}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control{cursor: ${"not-allowed"}}:host([aria-checked='true']) .checked-indicator{opacity: 1}:host([disabled]){opacity: ${ys}}`,checkedIndicator:'\n\t\t
\n\t'});class Jo extends Mt{connectedCallback(){super.connectedCallback(),this.circular&&(this.circular=!1)}}const Zo=Jo.compose({baseName:"tag",template:Ht,styles:(e,t)=>ge` ${ui("inline-block")} :host{box-sizing: border-box;font-family: ${Cs};font-size: ${Os};line-height: ${Rs}}.control{background-color: ${Bs};border: calc(${bs} * 1px) solid ${Ls};border-radius: ${bo};color: ${Fs};padding: calc(${vs} * 0.5px) calc(${vs} * 1px);text-transform: uppercase}`});class en extends ds{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Text area")}}const tn=en.compose({baseName:"text-area",template:(e,t)=>W``,styles:(e,t)=>ge` ${ui("inline-block")} :host{font-family: ${Cs};outline: none;user-select: none}.control{box-sizing: border-box;position: relative;color: ${ao};background: ${ro};border-radius: calc(${ms} * 1px);border: calc(${bs} * 1px) solid ${oo};font: inherit;font-size: ${Ts};line-height: ${Is};padding: calc(${vs} * 2px + 1px);width: 100%;min-width: ${ks};resize: none}.control:hover:enabled{background: ${ro};border-color: ${oo}}.control:active:enabled{background: ${ro};border-color: ${xs}}.control:hover, .control:${pi}, .control:disabled, .control:active{outline: none}.control::-webkit-scrollbar{width: ${As};height: ${Ss}}.control::-webkit-scrollbar-corner{background: ${ro}}.control::-webkit-scrollbar-thumb{background: ${Es}}.control::-webkit-scrollbar-thumb:hover{background: ${Ds}}.control::-webkit-scrollbar-thumb:active{background: ${Ps}}:host(:focus-within:not([disabled])) .control{border-color: ${xs}}:host([resize='both']) .control{resize: both}:host([resize='horizontal']) .control{resize: horizontal}:host([resize='vertical']) .control{resize: vertical}.label{display: block;color: ${ws};cursor: pointer;font-size: ${Ts};line-height: ${Is};margin-bottom: 2px}.label__hidden{display: none;visibility: hidden}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control{cursor: ${"not-allowed"}}:host([disabled]){opacity: ${ys}}:host([disabled]) .control{border-color: ${oo}}`,shadowOptions:{delegatesFocus:!0}});class sn extends Ui{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Text field")}}const on=sn.compose({baseName:"text-field",template:(e,t)=>W``,styles:(e,t)=>ge` ${ui("inline-block")} :host{font-family: ${Cs};outline: none;user-select: none}.root{box-sizing: border-box;position: relative;display: flex;flex-direction: row;color: ${ao};background: ${ro};border-radius: calc(${ms} * 1px);border: calc(${bs} * 1px) solid ${oo};height: calc(${$s} * 1px);min-width: ${ks}}.control{-webkit-appearance: none;font: inherit;background: transparent;border: 0;color: inherit;height: calc(100% - (${vs} * 1px));width: 100%;margin-top: auto;margin-bottom: auto;border: none;padding: 0 calc(${vs} * 2px + 1px);font-size: ${Ts};line-height: ${Is}}.control:hover, .control:${pi}, .control:disabled, .control:active{outline: none}.label{display: block;color: ${ws};cursor: pointer;font-size: ${Ts};line-height: ${Is};margin-bottom: 2px}.label__hidden{display: none;visibility: hidden}.start, .end{display: flex;margin: auto;fill: currentcolor}::slotted(svg), ::slotted(span){width: calc(${vs} * 4px);height: calc(${vs} * 4px)}.start{margin-inline-start: calc(${vs} * 2px)}.end{margin-inline-end: calc(${vs} * 2px)}:host(:hover:not([disabled])) .root{background: ${ro};border-color: ${oo}}:host(:active:not([disabled])) .root{background: ${ro};border-color: ${xs}}:host(:focus-within:not([disabled])) .root{border-color: ${xs}}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control{cursor: ${"not-allowed"}}:host([disabled]){opacity: ${ys}}:host([disabled]) .control{border-color: ${oo}}`,shadowOptions:{delegatesFocus:!0}}),nn={vsCodeBadge:mo,vsCodeButton:$o,vsCodeCheckbox:To,vsCodeDataGrid:Oo,vsCodeDataGridCell:Eo,vsCodeDataGridRow:Ao,vsCodeDivider:Po,vsCodeDropdown:Fo,vsCodeLink:Vo,vsCodeOption:Mo,vsCodePanels:zo,vsCodePanelTab:_o,vsCodePanelView:Uo,vsCodeProgressRing:Go,vsCodeRadioGroup:Qo,vsCodeRadio:Xo,vsCodeTag:Zo,vsCodeTextArea:tn,vsCodeTextField:on,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};function rn(e){return Vi.getOrCreate(e).withPrefix("vscode")}const an=rn().register(nn);export{go as Badge,wo as Button,ko as Checkbox,Io as DataGrid,So as DataGridCell,Qt as DataGridCellTypes,Ro as DataGridRow,Yt as DataGridRowTypes,Do as Divider,Ni as DividerRole,Bo as Dropdown,ci as DropdownPosition,Wt as GenerateHeaderOptions,Lo as Link,Ho as Option,jo as PanelTab,qo as PanelView,No as Panels,Ko as ProgressRing,Yo as Radio,Wo as RadioGroup,Rt as RadioGroupOrientation,Jo as Tag,en as TextArea,ns as TextAreaResize,sn as TextField,qi as TextFieldType,an as VSCodeDesignSystem,nn as allComponents,rn as provideVSCodeDesignSystem,mo as vsCodeBadge,$o as vsCodeButton,To as vsCodeCheckbox,Oo as vsCodeDataGrid,Eo as vsCodeDataGridCell,Ao as vsCodeDataGridRow,Po as vsCodeDivider,Fo as vsCodeDropdown,Vo as vsCodeLink,Mo as vsCodeOption,_o as vsCodePanelTab,Uo as vsCodePanelView,zo as vsCodePanels,Go as vsCodeProgressRing,Xo as vsCodeRadio,Qo as vsCodeRadioGroup,Zo as vsCodeTag,tn as vsCodeTextArea,on as vsCodeTextField}; diff --git a/src/Components/Fsi.fs b/src/Components/Fsi.fs index 94d8cf3c..d8c53b00 100644 --- a/src/Components/Fsi.fs +++ b/src/Components/Fsi.fs @@ -60,39 +60,28 @@ module Fsi = () module Watcher = + open Webviews let mutable panel: WebviewPanel option = None - let setContent str = - panel - |> Option.iter (fun p -> - let str = - sprintf - """ - - - - - - - %s - - - """ - str - - p.webview.html <- str) + let updateContent + (context: ExtensionContext) + (varsContent: (string * string) option) + (typesContent: (string * string) option) + (funcsContent: (string * string) option) + = + let (vars, varsScript) = defaultArg varsContent ("", "") + let (types, typesScript) = defaultArg typesContent ("", "") + let (funcs, funcsScript) = defaultArg funcsContent ("", "") + + match panel with + | Some panel -> + FsWebview.render ( + context, + panel, + $"{vars}{types}{funcs}", + scripts = [ varsScript; typesScript; funcsScript ] + ) + | None -> () let openPanel () = promise { @@ -113,18 +102,22 @@ module Fsi = match panel with | Some p -> p.reveal (!! -2, true) | None -> - let opts = - createObj - [ "enableCommandUris" ==> true - "enableFindWidget" ==> true - "retainContextWhenHidden" ==> true ] - let viewOpts = createObj [ "preserveFocus" ==> true "viewColumn" ==> -2 ] - let p = window.createWebviewPanel ("fsiWatcher", "FSI Watcher", !!viewOpts, opts) + let p = + FsWebview.create ( + "fsiWatcher", + "FSI Watcher", + !!viewOpts, + enableScripts = true, + enableFindWidget = true, + enableCommandUris = true, + retainContextWhenHidden = true + ) + let onClose () = panel <- None p.onDidDispose.Invoke(!!onClose) |> ignore @@ -140,11 +133,10 @@ module Fsi = path.join (VSCodeExtension.ionidePluginPath (), "watcher", "funcs.txt") - let handler () = - let mutable varsContent = "" - let mutable typesContent = "" - let mutable funcsContent = "" - + let handler (context: ExtensionContext) = + let mutable varsContent = None + let mutable typesContent = None + let mutable funcsContent = None node.fs.readFile ( varsUri, @@ -152,30 +144,33 @@ module Fsi = if not (Utils.isUndefined buf) then let cnt = buf.ToString() - varsContent <- - cnt - |> String.split [| '\n' |] - |> Seq.map (fun row -> - let x = row.Split([| "###IONIDESEP###" |], StringSplitOptions.None) - - sprintf - "%s%s%s%s" - x.[0] - x.[1] - x.[2] - x.[3]) - |> String.concat "\n" - |> sprintf - """

Declared values


%s
NameValueTypeStep
""" - - - setContent ( - varsContent - + "\n\n" - + funcsContent - + "\n\n" - + typesContent - )) + if String.IsNullOrWhiteSpace cnt then + varsContent <- None + else + + let datagridContent = + cnt + |> String.split [| '\n' |] + |> Array.map (fun row -> + let x = row.Split([| "###IONIDESEP###" |], StringSplitOptions.None) + + box + {| name = x[0] + value = x[1] + Type = x[2] + step = x[3] |}) + // ensure column order + let headers = + [| "Name", "name" + "Value", "value" + "Type", "Type" + "Step", "step" |] + + let grid, script = VsHtml.datagrid ("vars-content", datagridContent, headers) + + varsContent <- Some(html $"

Declared values

{grid}", script) + + updateContent context varsContent typesContent funcsContent) ) node.fs.readFile ( @@ -184,30 +179,33 @@ module Fsi = if not (Utils.isUndefined buf) then let cnt = buf.ToString() - funcsContent <- - cnt - |> String.split [| '\n' |] - |> Seq.map (fun row -> - let x = row.Split([| "###IONIDESEP###" |], StringSplitOptions.None) - - sprintf - "%s%s%s%s" - x.[0] - x.[1] - x.[2] - x.[3]) - |> String.concat "\n" - |> sprintf - """

Declared functions


%s
NameParametersReturned typeStep
""" - - - setContent ( - varsContent - + "\n\n" - + funcsContent - + "\n\n" - + typesContent - )) + if String.IsNullOrWhiteSpace cnt then + funcsContent <- None + else + let datagridContent = + cnt + |> String.split [| '\n' |] + |> Array.map (fun row -> + let x = row.Split([| "###IONIDESEP###" |], StringSplitOptions.None) + + box + {| name = x[0] + parameters = x[1] + returnType = x[2] + step = x[3] |}) + + let grid, script = + VsHtml.datagrid ( + "funcs-content", + datagridContent, + [| "Name", "name" + "Parameters", "parameters" + "Return Type", "returnType" |] + ) + + funcsContent <- Some(html $"

Declared functions

{grid}", script) + + updateContent context varsContent typesContent funcsContent) ) node.fs.readFile ( @@ -216,40 +214,39 @@ module Fsi = if not (Utils.isUndefined buf) then let cnt = buf.ToString() - typesContent <- - if String.IsNullOrWhiteSpace cnt then - "" - else + if String.IsNullOrWhiteSpace cnt then + typesContent <- None + else + let extractSignature (str: string) = + if str.Contains "#|#" then + "| " + str.Replace("#|#", "
| ") + else + str + + let datagridContent = cnt |> String.split [| '\n' |] - |> Seq.map (fun row -> + |> Array.map (fun row -> let x = row.Split([| "###IONIDESEP###" |], StringSplitOptions.None) - let signature = - if x.[1].Contains "#|#" then - "| " + x.[1].Replace("#|#", "
| ") - else - x.[1] - - sprintf "%s%s%s" x.[0] signature x.[2]) - |> String.concat "\n" - |> sprintf - """

Declared types


%s
NameSignatureStep
""" - - - setContent ( - varsContent - + "\n\n" - + funcsContent - + "\n\n" - + typesContent - )) + let signature = extractSignature x[1] + + box + {| Name = x[0] + Signature = signature + Step = x[2] |}) + + let grid, script = VsHtml.datagrid ("types-content", datagridContent) + + typesContent <- Some(html $"

Declared types

{grid}", script) + + updateContent context varsContent typesContent funcsContent) ) - let activate dispsables = - fs.watchFile (varsUri, (fun st st2 -> handler ())) - fs.watchFile (typesUri, (fun st st2 -> handler ())) - fs.watchFile (funcUri, (fun st st2 -> handler ())) + let activate context dispsables = + fs.watchFile (varsUri, (fun st st2 -> handler context)) + fs.watchFile (typesUri, (fun st st2 -> handler context)) + fs.watchFile (funcUri, (fun st st2 -> handler context)) let mutable fsiOutput: Terminal option = None let mutable fsiOutputPID: int option = None @@ -635,7 +632,7 @@ module Fsi = } let activate (context: ExtensionContext) = - Watcher.activate (!!context.subscriptions) + Watcher.activate context (!!context.subscriptions) SdkScriptsNotify.activate context window.registerTerminalProfileProvider ("ionide-fsharp.fsi", provider) diff --git a/src/Components/Webview.fs b/src/Components/Webview.fs new file mode 100644 index 00000000..1c238dca --- /dev/null +++ b/src/Components/Webview.fs @@ -0,0 +1,201 @@ +namespace Ionide.VSCode.FSharp + +open Fable.Core +open Fable.Core.JsInterop + +module Webviews = + open Fable.Import.VSCode.Vscode + // These functions are recommended to used in conjunction with + // Highlight HTML/SQL templates in F# + // https://marketplace.visualstudio.com/items?itemName=alfonsogarciacaro.vscode-template-fsharp-highlight + let inline css (content: string) = content + let inline html (content: string) = content + let inline js (content: string) = content + + // string concatenation is super fast for JS and we're very likely merging a lot of strings + // on bigger files, so we'll omit the string builder here + [] + let private addString existing appending : unit = jsNative + + let private mergeStrings (rows: string seq) = + let mutable str = "" + + for row in rows do + addString str $"{row}\n" + + html $"" + + let private mergeScripts (rows: string seq) = + let mutable str = $"" + + for row in rows do + if not (System.String.IsNullOrWhiteSpace row) then + // we'll surround each script with a iife to variable scope issues + // and to ensure we're not polluting other scripts + let row = js $"(() => {{ {row} }})();" + + addString str $"{row}\n" + // we'll surround the scripts with the DOMContentLoaded event + // to ensure all DOM elements already exist when executing these scripts + html + $"""""" + + /// + /// Helper class to render HTML elements from the VSCode UI Toolkit + /// + type VsHtml = + + /// + /// renders a datagrid with the provided data, the data must come in the shape of + /// an array of anonymous records to allow Fable to simply deserialize the data to plain JS objects and arrays + /// + /// + /// The data must be an array of anonymous records, if no custom titles are provided the header will be the name of the property + /// + /// + /// If you want to ensure the order of the headers or custom headers you can provide a ("My Header", "proeprtyName") tuple array. + /// The second value in the tuple must match the property name of the record. + /// + /// the DOM id string that will be used for the datagrid element + /// An anonymous record array with contains the data to render + /// An array of string tuples to ensure header titles and order of colums + /// + /// + /// let values = + /// [| {| name = "Peter"; age = 10 |} + /// {| name = "Frank"; age = 2 |} |] + /// let headers = + /// [| ("User Name", "name") + /// ("User Age", "age") |] + /// let grid, script = VsHtml.datagrid ("user-grid", values, headers) + /// + /// + static member datagrid(id: string, values: obj array, ?customTitles: (string * string) array) = + let content = html $"" + let titles = defaultArg customTitles Array.empty + + let titles = + match titles with + | [||] -> "" + | values -> + let values = + values + |> Array.map (fun (title, headerKey) -> + {| title = title + columnDataKey = headerKey |}) + + js $"grid.columnDefinitions = {JS.JSON.stringify values}" + + let script = + js + $""" + let grid = document.querySelector('#{id}'); + if(grid) {{ + const data = {JS.JSON.stringify values} + grid.rowsData = data; + {titles} + }}; + """ + + content, script + + /// + /// Helper class to work with vscode webviews + /// + type FsWebview = + + /// + /// Creates a new Webview panel with the provided viewType and title + /// + /// the viewType string that will be used to identify the webview + /// the title string that will be used to display the webview + /// Where to place the vscode webview + /// should this webview run javascript content or not + /// + /// allow the webview to access certain resources in the local disk, + /// use an empty array to disallow any access to local resources + /// + /// + /// Commands URIs are links that execute a given command. + /// They can be used as clickable links in hover text, + /// completion item details + /// + /// Controls if the find widget is enabled in the panel. + /// Controls if the webview panel's content (iframe) is kept around even when the panel is no longer visible. + /// the created webview panel + static member create + ( + viewType: string, + title: string, + ?viewOptions, + ?enableScripts: bool, + ?resourceRoots: string array, + ?enableCommandUris: bool, + ?enableFindWidget: bool, + ?retainContextWhenHidden: bool + ) = + let viewOptions = defaultArg viewOptions (unbox ViewColumn.Beside) + + window.createWebviewPanel ( + viewType, + title, + viewOptions, + {| enableScripts = enableScripts + enableCommandUris = enableCommandUris + enableFindWidget = enableFindWidget + resourceRoots = resourceRoots + retainContextWhenHidden = retainContextWhenHidden |} + ) + + /// + /// takes an existing webview panel and sets the html content, it takes a list of styles and scripts + /// that will be added to the webview + /// + /// + /// It uses the extension context to access the extension uri and to set the uri of the vscode ui toolkit + /// + /// + /// Each script will be wrapped in an iife to ensure it's scope is not polluting other scripts + /// and located in a script tag at the end of the body of the webview. + /// These must be JS strings, and should not contain any HTML tags. + /// + /// + /// Each style will be wrapped by a style tag and put in the head of the webview. + /// These must be CSS strings, and should not contain any HTML tags. + /// + /// The Extension context + /// The WebViewPanel to re-assign the HTML content + /// The HTML tags and content to render within the web view + /// The css strings for the styles to add to the webview + /// The js strings for the scripts to add to the webview + static member render + ( + ctx: ExtensionContext, + wbp: WebviewPanel, + content: string, + ?styles: string seq, + ?scripts: string seq + ) = + let styles = defaultArg styles Seq.empty + let scripts = defaultArg scripts Seq.empty + + let vsUIWebkit = + Fable.Import.VSCode.vscode.Uri.joinPath (ctx.extensionUri, "toolkit.min.js") + |> wbp.webview.asWebviewUri + + wbp.webview.html <- + html + $""" + + + + %s{mergeStrings styles} + + + %s{content} + + %s{mergeScripts scripts} + + """ diff --git a/src/Ionide.FSharp.fsproj b/src/Ionide.FSharp.fsproj index f3199c61..84888497 100644 --- a/src/Ionide.FSharp.fsproj +++ b/src/Ionide.FSharp.fsproj @@ -33,6 +33,7 @@ +