iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
5 lines • 35.3 kB
JavaScript
/*! For license information please see 56704.ee0fdf2c07ffe55b.js.LICENSE.txt */
;(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[56704],{12451:function(t,e,i){i.d(e,{O:function(){return n},i:function(){return o.is}});var s=i(5124),o=i(12130);class n extends s.WF{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}}},12130:function(t,e,i){i.d(e,{SE:function(){return l},U9:function(){return h},hP:function(){return s},is:function(){return o}});i(44114);const s=t=>t.nodeType===Node.ELEMENT_NODE;function o(t){return{addClass:e=>{t.classList.add(e)},removeClass:e=>{t.classList.remove(e)},hasClass:e=>t.classList.contains(e)}}let n=!1;const r=()=>{},a={get passive(){return n=!0,!1}};document.addEventListener("x",r,a),document.removeEventListener("x",r);const h=(t=window.document)=>{let e=t.activeElement;const i=[];if(!e)return i;for(;e&&(i.push(e),e.shadowRoot);)e=e.shadowRoot.activeElement;return i},l=t=>{const e=h();if(!e.length)return!1;const i=e[e.length-1],s=new Event("check-if-focused",{bubbles:!0,composed:!0});let o=[];const n=t=>{o=t.composedPath()};return document.body.addEventListener("check-if-focused",n),i.dispatchEvent(s),document.body.removeEventListener("check-if-focused",n),-1!==o.indexOf(t)}},77957:function(t,e,i){var s=i(76080),o=i(79504),n=i(47055),r=i(48981),a=i(56969),h=i(26198),l=i(2360),c=i(35370),d=Array,p=o([].push);t.exports=function(t,e,i,o){for(var u,f,m,g=r(t),v=n(g),_=s(e,i),w=l(null),b=h(v),y=0;b>y;y++)m=v[y],(f=a(_(m,y,g)))in w?p(w[f],m):w[f]=[m];if(o&&(u=o(g))!==d)for(f in w)w[f]=c(u,w[f]);return w}},48646:function(t,e,i){var s=i(69565),o=i(28551),n=i(1767),r=i(50851);t.exports=function(t,e){e&&"string"==typeof t||o(t);var i=r(t);return n(o(void 0!==i?s(i,t):t))}},78350:function(t,e,i){var s=i(46518),o=i(70259),n=i(79306),r=i(48981),a=i(26198),h=i(1469);s({target:"Array",proto:!0},{flatMap:function(t){var e,i=r(this),s=a(i);return n(t),e=h(i,0),o(e,i,i,s,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},30237:function(t,e,i){i(6469)("flatMap")},30531:function(t,e,i){var s=i(46518),o=i(69565),n=i(79306),r=i(28551),a=i(1767),h=i(48646),l=i(19462),c=i(9539),d=i(96395),p=i(30684),u=i(84549);var f=!d&&!p("flatMap",function(){}),m=!d&&!f&&u("flatMap",TypeError),g=d||f||m||function(){try{var t=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(t){return t});t.next(),t.return()}catch(e){return!0}}(),v=l(function(){for(var t,e,i=this.iterator,s=this.mapper;;){if(e=this.inner)try{if(!(t=r(o(e.next,e.iterator))).done)return t.value;this.inner=null}catch(n){c(i,"throw",n)}if(t=r(o(this.next,i)),this.done=!!t.done)return;try{this.inner=h(s(t.value,this.counter++),!1)}catch(n){c(i,"throw",n)}}});s({target:"Iterator",proto:!0,real:!0,forced:g},{flatMap:function(t){r(this);try{n(t)}catch(e){c(this,"throw",e)}return m?o(m,this,t):new v(a(this),{mapper:t,inner:null})}})},46058:function(t,e,i){var s=i(46518),o=i(77957),n=i(6469);s({target:"Array",proto:!0},{group:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n("group")},61366:function(t,e,i){i.a(t,async function(t,e){try{i(74423),i(3362),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);var s=i(5124),o=i(67576),n=i(6412),r=i(63672),a=i(17051),h=i(42462),l=i(28438),c=i(98779),d=i(27259),p=i(25877),u=i(984),f=i(95010),m=i(9395),g=i(717),v=i(40158),_=i(10416),w=t([v]);v=(w.then?(await w)():w)[0];let x,S=t=>t;var b=Object.defineProperty,y=Object.getOwnPropertyDescriptor,z=(t,e,i,s)=>{for(var o,n=s>1?void 0:s?y(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(n=(s?o(e,i,n):o(n))||n);return s&&n&&b(e,i,n),n};const k=new Set;let M=class extends g.A{connectedCallback(){super.connectedCallback(),this.id||(this.id=(0,f.N)("wa-popover-")),this.eventController.signal.aborted&&(this.eventController=new AbortController),this.for&&this.anchor&&(this.anchor=null,this.handleForChange())}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleDocumentKeyDown),(0,p.Fw)(this),this.eventController.abort()}firstUpdated(){this.open&&this.handleOpenChange()}updated(t){t.has("open")&&this.customStates.set("open",this.open)}async handleOpenChange(){if(this.open){const t=new c.k;if(this.dispatchEvent(t),t.defaultPrevented)return void(this.open=!1);k.forEach(t=>t.open=!1),document.addEventListener("keydown",this.handleDocumentKeyDown,{signal:this.eventController.signal}),document.addEventListener("click",this.handleDocumentClick,{signal:this.eventController.signal}),this.trapFocus?this.dialog.showModal():this.dialog.show(),this.popup.active=!0,k.add(this),(0,p.AZ)(this),requestAnimationFrame(()=>{const t=this.querySelector("[autofocus]");t&&"function"==typeof t.focus?t.focus():this.dialog.focus()}),this.popup.popup||await this.popup.updateComplete,await(0,d.Ud)(this.popup.popup,"show-with-scale"),this.popup.reposition(),this.dispatchEvent(new h.q)}else{const t=new l.L;if(this.dispatchEvent(t),t.defaultPrevented)return void(this.open=!0);document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("click",this.handleDocumentClick),k.delete(this),(0,p.Fw)(this),await(0,d.Ud)(this.popup.popup,"hide-with-scale"),this.popup.active=!1,this.dialog.close(),this.dispatchEvent(new a.Z)}}handleForChange(){const t=this.getRootNode();if(!t)return;const e=this.for?t.getElementById(this.for):null,i=this.anchor;if(e===i)return;const{signal:s}=this.eventController;e&&e.addEventListener("click",this.handleAnchorClick,{signal:s}),i&&i.removeEventListener("click",this.handleAnchorClick),this.anchor=e,this.for&&!e&&console.warn(`A popover was assigned to an element with an ID of "${this.for}" but the element could not be found.`,this)}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}async show(){if(!this.open)return this.open=!0,(0,u.l)(this,"wa-after-show")}async hide(){if(this.open)return this.open=!1,(0,u.l)(this,"wa-after-hide")}handleDialogCancel(t){t.preventDefault(),this.dialog.classList.contains("hide")||(this.open=!1)}render(){return(0,s.qy)(x||(x=S` <dialog aria-labelledby="${0}" aria-describedby="${0}" part="dialog" class="dialog" @cancel="${0}"> <wa-popup part="popup" exportparts="
popup:popup__popup,
arrow:popup__arrow
" class="${0}" placement="${0}" distance="${0}" skidding="${0}" flip shift ?arrow="${0}" .anchor="${0}" .autoSize="${0}" .autoSizePadding="${0}"> <div part="body" class="body" @click="${0}"> <slot></slot> </div> </wa-popup> </dialog> `),(0,r.J)(this.ariaLabelledby),(0,r.J)(this.ariaDescribedby),this.handleDialogCancel,(0,n.H)({popover:!0,"popover-open":this.open}),this.placement,this.distance,this.skidding,!this.withoutArrow,this.anchor,this.autoSize,this.autoSizePadding,this.handleBodyClick)}constructor(){super(...arguments),this.anchor=null,this.placement="top",this.open=!1,this.distance=8,this.skidding=0,this.for=null,this.withoutArrow=!1,this.autoSizePadding=0,this.trapFocus=!1,this.eventController=new AbortController,this.handleAnchorClick=()=>{this.open=!this.open},this.handleBodyClick=t=>{t.stopPropagation();t.target.closest('[data-popover="close"]')&&(this.open=!1)},this.handleDocumentKeyDown=t=>{"Escape"===t.key&&this.open&&(0,p.a0)(this)&&(t.preventDefault(),t.stopPropagation(),this.open=!1,this.anchor&&"function"==typeof this.anchor.focus&&this.anchor.focus())},this.handleDocumentClick=t=>{this.anchor&&t.composedPath().includes(this.anchor)||t.composedPath().includes(this)||(this.open=!1)}}};M.css=_.A,M.dependencies={"wa-popup":v.A},z([(0,o.P)("dialog")],M.prototype,"dialog",2),z([(0,o.P)(".body")],M.prototype,"body",2),z([(0,o.P)("wa-popup")],M.prototype,"popup",2),z([(0,o.wk)()],M.prototype,"anchor",2),z([(0,o.MZ)()],M.prototype,"placement",2),z([(0,o.MZ)({type:Boolean,reflect:!0})],M.prototype,"open",2),z([(0,o.MZ)({type:Number})],M.prototype,"distance",2),z([(0,o.MZ)({type:Number})],M.prototype,"skidding",2),z([(0,o.MZ)()],M.prototype,"for",2),z([(0,o.MZ)({attribute:"without-arrow",type:Boolean,reflect:!0})],M.prototype,"withoutArrow",2),z([(0,o.MZ)({attribute:"auto-size"})],M.prototype,"autoSize",2),z([(0,o.MZ)({attribute:"auto-size-padding",type:Number})],M.prototype,"autoSizePadding",2),z([(0,o.MZ)({attribute:"trap-focus",type:Boolean})],M.prototype,"trapFocus",2),z([(0,o.MZ)({attribute:"aria-labelledby"})],M.prototype,"ariaLabelledby",2),z([(0,o.MZ)({attribute:"aria-describedby"})],M.prototype,"ariaDescribedby",2),z([(0,m.w)("open",{waitUntilFirstUpdate:!0})],M.prototype,"handleOpenChange",1),z([(0,m.w)("for")],M.prototype,"handleForChange",1),z([(0,m.w)(["distance","placement","skidding"])],M.prototype,"handleOptionsChange",1),M=z([(0,o.EM)("wa-popover")],M),e()}catch(x){e(x)}})},10416:function(t,e,i){i.d(e,{A:function(){return o}});let s;var o=(0,i(5124).AH)(s||(s=(t=>t)`:host{--arrow-size:0.375rem;--max-width:25rem;--show-duration:100ms;--hide-duration:100ms;display:contents;font-size:var(--wa-font-size-m);line-height:var(--wa-line-height-normal);text-align:start;white-space:normal}.dialog{display:none;position:fixed;inset:0;width:100%;height:100%;margin:0;padding:0;border:none;background:0 0;overflow:visible;pointer-events:none}.dialog:focus{outline:0}.dialog[open]{display:block}.popover{--arrow-size:inherit;--popup-border-width:var(--wa-panel-border-width);--show-duration:inherit;--hide-duration:inherit;pointer-events:auto}.popover::part(arrow){background-color:var(--wa-color-surface-default);border-top:none;border-left:none;border-bottom:solid var(--wa-panel-border-width) var(--wa-color-surface-border);border-right:solid var(--wa-panel-border-width) var(--wa-color-surface-border);box-shadow:none}.popover[placement^=top]::part(popup){transform-origin:bottom}.popover[placement^=bottom]::part(popup){transform-origin:top}.popover[placement^=left]::part(popup){transform-origin:right}.popover[placement^=right]::part(popup){transform-origin:left}.body{display:flex;flex-direction:column;width:auto;max-width:min(var(--max-width),100vw);padding:var(--wa-space-l);background-color:var(--wa-color-surface-default);border:var(--wa-panel-border-width) solid var(--wa-color-surface-border);border-radius:var(--wa-panel-border-radius);border-style:var(--wa-panel-border-style);box-shadow:var(--wa-shadow-l);color:var(--wa-color-text-normal);user-select:none;-webkit-user-select:none}.popover[data-current-placement^=bottom] .body,.popover[data-current-placement^=top] .body{max-width:min(var(--max-width),100vw - (var(--wa-space-m) * 2));margin-inline:var(--wa-space-m)}.popover[data-current-placement^=left] .body,.popover[data-current-placement^=right] .body{max-height:calc(100vh - (var(--wa-space-m) * 2));margin-block:var(--wa-space-m)}`))},99324:function(t,e,i){i.a(t,async function(t,e){try{var s=i(69235),o=(i(3362),i(27495),i(62953),i(5124)),n=i(67576),r=i(6412),a=i(63672),h=i(34514),l=i(40991),c=i(92070),d=i(41268),p=i(9395),u=i(62676),f=i(15477),m=i(31896),g=i(32565),v=i(17060),_=i(9054),w=t([s,v]);[s,v]=w.then?(await w)():w;let x,S,k,M,C=t=>t;var b=Object.defineProperty,y=Object.getOwnPropertyDescriptor,z=(t,e,i,s)=>{for(var o,n=s>1?void 0:s?y(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(n=(s?o(e,i,n):o(n))||n);return s&&n&&b(e,i,n),n};let D=class extends u.q{static get validators(){return[...super.validators,(0,d.i)()]}get value(){var t;return this.valueHasChanged?this._value:null!==(t=this._value)&&void 0!==t?t:this.defaultValue}set value(t){this._value!==t&&(this.valueHasChanged=!0,this._value=t)}handleSizeChange(){(0,l.b)(this.localName,this.size)}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{if(this.setTextareaDimensions(),this.updateResizeObserver(),this.didSSR&&this.input&&this.value!==this.input.value){const t=this.input.value;this.value=t}})}disconnectedCallback(){var t;super.disconnectedCallback(),clearTimeout(this.countAnnounceTimeout),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.resizeObserver=void 0}updateResizeObserver(){const t="none"!==this.resize;this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0),t&&this.input&&("auto"===this.resize?(this.resizeObserver=new ResizeObserver(t=>{var e,i;const s=null!==(e=null===(i=t[0])||void 0===i?void 0:i.contentRect.width)&&void 0!==e?e:0;s!==this.lastObservedWidth&&(this.lastObservedWidth=s,requestAnimationFrame(()=>this.setTextareaDimensions()))}),this.resizeObserver.observe(this)):(this.resizeObserver=new ResizeObserver(()=>this.setTextareaDimensions()),this.resizeObserver.observe(this.input)))}handleBlur(){this.checkValidity()}handleChange(t){this.valueHasChanged=!0,this.value=this.input.value,this.setTextareaDimensions(),this.checkValidity(),this.relayNativeEvent(t,{bubbles:!0,composed:!0})}handleInput(t){this.valueHasChanged=!0,this.value=this.input.value,this.relayNativeEvent(t,{bubbles:!0,composed:!0}),this.scheduleCountAnnouncement()}scheduleCountAnnouncement(){clearTimeout(this.countAnnounceTimeout),this.countAnnounceTimeout=setTimeout(()=>{var t;const e=(null!==(t=this.value)&&void 0!==t?t:"").length;this.announcedCountText=null!=this.maxlength?this.localize.term("numCharactersRemaining",this.maxlength-e):this.localize.term("numCharacters",e)},1e3)}setTextareaDimensions(){if("none"===this.resize)return this.base.style.width="",void(this.base.style.height="");if("auto"===this.resize){this.sizeAdjuster.style.height=`${this.input.clientHeight}px`,this.input.style.height="auto";const t=this.input.scrollHeight;return this.input.style.height=`${t}px`,this.sizeAdjuster.style.height=`${t}px`,this.base.style.width="",void(this.base.style.height="")}if(this.input.style.width){const t=Number(this.input.style.width.split(/px/)[0])+2;this.base.style.width=`${t}px`}if(this.input.style.height){const t=Number(this.input.style.height.split(/px/)[0])+2;this.base.style.height=`${t}px`}}handleRowsChange(){this.setTextareaDimensions()}async handleValueChange(){await this.updateComplete,this.checkValidity(),this.setTextareaDimensions()}updated(t){t.has("resize")&&(this.setTextareaDimensions(),this.updateResizeObserver()),super.updated(t),t.has("value")&&this.customStates.set("blank",!this.value)}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}scrollPosition(t){return t?("number"==typeof t.top&&(this.input.scrollTop=t.top),void("number"==typeof t.left&&(this.input.scrollLeft=t.left))):{top:this.input.scrollTop,left:this.input.scrollTop}}setSelectionRange(t,e,i="none"){this.input.setSelectionRange(t,e,i)}setRangeText(t,e,i,s="preserve"){const o=null!=e?e:this.input.selectionStart,n=null!=i?i:this.input.selectionEnd;this.input.setRangeText(t,o,n,s),this.value!==this.input.value&&(this.value=this.input.value,this.setTextareaDimensions())}formResetCallback(){this._value=null,this.input&&(this.input.value=this.value||""),super.formResetCallback()}render(){var t;const e=this.hasUpdated?this.hasSlotController.test("label"):this.withLabel,i=this.hasUpdated?this.hasSlotController.test("hint"):this.withHint,s=!!this.label||!!e,n=!!this.hint||!!i,l=(null!==(t=this.value)&&void 0!==t?t:"").length,c=null!=this.maxlength?this.localize.term("numCharactersRemaining",this.maxlength-l):this.localize.term("numCharacters",l);return(0,o.qy)(x||(x=C` <label part="form-control-label label" class="${0}" for="input" aria-hidden="${0}"> <slot name="label">${0}</slot> </label> <div part="base" class="textarea"> <textarea part="textarea" id="input" class="control" title="${0}" name="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" ?required="${0}" placeholder="${0}" rows="${0}" minlength="${0}" maxlength="${0}" autocapitalize="${0}" autocorrect="${0}" ?autofocus="${0}" spellcheck="${0}" enterkeyhint="${0}" inputmode="${0}" aria-describedby="hint" @change="${0}" @input="${0}" @blur="${0}"></textarea> <div part="textarea-adjuster" class="size-adjuster" ?hidden="${0}"></div> </div> <div class="${0}"> <slot id="hint" name="hint" part="hint" aria-hidden="${0}" class="${0}">${0}</slot> ${0} </div> `),(0,r.H)({label:!0,"has-label":s}),s?"false":"true",this.label,this.title,(0,a.J)(this.name),(0,h.V)(this.value),this.disabled,this.readonly,this.required,(0,a.J)(this.placeholder),(0,a.J)(this.rows),(0,a.J)(this.minlength),(0,a.J)(this.maxlength),(0,a.J)(this.autocapitalize),(0,a.J)(this.autocorrect),this.autofocus,(0,a.J)(this.spellcheck),(0,a.J)(this.enterkeyhint),(0,a.J)(this.inputmode),this.handleChange,this.handleInput,this.handleBlur,"auto"!==this.resize,(0,r.H)({footer:!0,"has-count":this.withCount}),n?"false":"true",(0,r.H)({"has-slotted":n}),this.hint,this.withCount?(0,o.qy)(S||(S=C` <div part="count" class="count" aria-hidden="true">${0}</div> <div class="wa-visually-hidden-force" aria-live="polite">${0}</div> `),c,this.announcedCountText):"")}constructor(){var t;super(...arguments),this.assumeInteractionOn=["blur","input"],this.hasSlotController=new c.X(this,"hint","label"),this.localize=new v.c(this),this.announcedCountText="",this.title="",this.name=null,this._value=null,this.defaultValue=null!==(t=this.getAttribute("value"))&&void 0!==t?t:"",this.size="m",this.appearance="outlined",this.label="",this.hint="",this.placeholder="",this.rows=4,this.resize="vertical",this.disabled=!1,this.readonly=!1,this.required=!1,this.spellcheck=!0,this.withLabel=!1,this.withHint=!1,this.withCount=!1,this.lastObservedWidth=0}};D.css=[_.A,f.A,m.A,g.A],z([(0,n.wk)()],D.prototype,"announcedCountText",2),z([(0,n.P)(".control")],D.prototype,"input",2),z([(0,n.P)('[part~="base"]')],D.prototype,"base",2),z([(0,n.P)(".size-adjuster")],D.prototype,"sizeAdjuster",2),z([(0,n.MZ)()],D.prototype,"title",2),z([(0,n.MZ)({reflect:!0})],D.prototype,"name",2),z([(0,n.wk)()],D.prototype,"value",1),z([(0,n.MZ)({attribute:"value",reflect:!0})],D.prototype,"defaultValue",2),z([(0,n.MZ)({reflect:!0})],D.prototype,"size",2),z([(0,p.w)("size")],D.prototype,"handleSizeChange",1),z([(0,n.MZ)({reflect:!0})],D.prototype,"appearance",2),z([(0,n.MZ)()],D.prototype,"label",2),z([(0,n.MZ)({attribute:"hint"})],D.prototype,"hint",2),z([(0,n.MZ)()],D.prototype,"placeholder",2),z([(0,n.MZ)({type:Number})],D.prototype,"rows",2),z([(0,n.MZ)({reflect:!0})],D.prototype,"resize",2),z([(0,n.MZ)({type:Boolean})],D.prototype,"disabled",2),z([(0,n.MZ)({type:Boolean,reflect:!0})],D.prototype,"readonly",2),z([(0,n.MZ)({type:Boolean,reflect:!0})],D.prototype,"required",2),z([(0,n.MZ)({type:Number})],D.prototype,"minlength",2),z([(0,n.MZ)({type:Number})],D.prototype,"maxlength",2),z([(0,n.MZ)()],D.prototype,"autocapitalize",2),z([(0,n.MZ)({type:Boolean,converter:{fromAttribute:t=>!(!t||"off"===t),toAttribute:t=>t?"on":"off"}})],D.prototype,"autocorrect",2),z([(0,n.MZ)()],D.prototype,"autocomplete",2),z([(0,n.MZ)({type:Boolean})],D.prototype,"autofocus",2),z([(0,n.MZ)()],D.prototype,"enterkeyhint",2),z([(0,n.MZ)({type:Boolean,converter:{fromAttribute:t=>!(!t||"false"===t),toAttribute:t=>t?"true":"false"}})],D.prototype,"spellcheck",2),z([(0,n.MZ)()],D.prototype,"inputmode",2),z([(0,n.MZ)({attribute:"with-label",type:Boolean})],D.prototype,"withLabel",2),z([(0,n.MZ)({attribute:"with-hint",type:Boolean})],D.prototype,"withHint",2),z([(0,n.MZ)({attribute:"with-count",type:Boolean,reflect:!0})],D.prototype,"withCount",2),z([(0,p.w)("rows",{waitUntilFirstUpdate:!0})],D.prototype,"handleRowsChange",1),z([(0,p.w)("value",{waitUntilFirstUpdate:!0})],D.prototype,"handleValueChange",1),D=z([(0,n.EM)("wa-textarea")],D),null===(k=(M=D).disableWarning)||void 0===k||k.call(M,"change-in-update"),e()}catch(x){e(x)}})},9054:function(t,e,i){i.d(e,{A:function(){return o}});let s;var o=(0,i(5124).AH)(s||(s=(t=>t)`:host{border-width:0}.textarea{display:grid;align-items:center;margin:0;border:none;outline:0;cursor:inherit;font:inherit;background-color:var(--wa-form-control-background-color);border-color:var(--wa-form-control-border-color);border-radius:var(--wa-form-control-border-radius);border-style:var(--wa-form-control-border-style);border-width:var(--wa-form-control-border-width);-webkit-appearance:none;outline:var(--wa-focus-ring-style) var(--wa-focus-ring-width) transparent;outline-offset:var(--wa-focus-ring-offset)}.textarea:focus-within{outline-color:var(--wa-color-focus)}:host([appearance=outlined]) .textarea{background-color:var(--wa-form-control-background-color);border-color:var(--wa-form-control-border-color)}:host([appearance=filled]) .textarea{background-color:var(--wa-color-neutral-fill-quiet);border-color:var(--wa-color-neutral-fill-quiet)}:host([appearance=filled-outlined]) .textarea{background-color:var(--wa-color-neutral-fill-quiet);border-color:var(--wa-form-control-border-color)}textarea{display:block;width:100%;border:none;background:0 0;font:inherit;color:inherit;padding:calc(var(--wa-form-control-padding-block) - ((1lh - 1em)/ 2)) var(--wa-form-control-padding-inline);min-height:calc(var(--wa-form-control-height) - var(--border-width) * 2);box-shadow:none;margin:0}textarea::placeholder{color:var(--wa-form-control-placeholder-color);user-select:none;-webkit-user-select:none}textarea:autofill,textarea:autofill:active,textarea:autofill:focus,textarea:autofill:hover{box-shadow:none;caret-color:var(--wa-form-control-value-color)}textarea:focus{outline:0}.control,.size-adjuster{grid-area:1/1/2/2}.size-adjuster{visibility:hidden;pointer-events:none;opacity:0;padding:0}textarea::-webkit-search-cancel-button,textarea::-webkit-search-decoration,textarea::-webkit-search-results-button,textarea::-webkit-search-results-decoration{-webkit-appearance:none}:host([resize=none]) textarea{resize:none}:host([resize=vertical]) textarea,textarea{resize:vertical}:host([resize=horizontal]) textarea{resize:horizontal}:host([resize=both]) textarea{resize:both}:host([resize=auto]) textarea{height:auto;resize:none;overflow-y:hidden}.footer{display:flex;align-items:baseline;gap:1em}.footer.has-count [part=hint]{flex:1 1 auto;min-width:0}.count{flex:0 0 auto;color:var(--wa-form-control-hint-color);font-weight:var(--wa-form-control-hint-font-weight);line-height:var(--wa-form-control-hint-line-height);margin-block-start:0.5em;font-size:var(--wa-font-size-smaller);margin-inline-start:auto}`))},32565:function(t,e,i){i.d(e,{A:function(){return o}});let s;var o=(0,i(5124).AH)(s||(s=(t=>t)`.wa-visually-hidden-force,.wa-visually-hidden-hint::part(hint),.wa-visually-hidden-label::part(form-control-label),.wa-visually-hidden-label::part(label),.wa-visually-hidden:not(:focus-within){position:absolute!important;width:1px!important;height:1px!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;border:none!important;overflow:hidden!important;white-space:nowrap!important;padding:0!important}`))},17568:function(t,e,i){i.d(e,{V:function(){return a}});var s=i(38826);i(16280),i(74423),i(44114),i(62953),i(18111),i(61701);function o(t){return"horizontal"===t?"row":"column"}class n extends s.YS{_getDefaultConfig(){return Object.assign({},super._getDefaultConfig(),{itemSize:{width:"300px",height:"300px"},gap:"8px",padding:"match-gap"})}get _gap(){return this._gaps.row}get _idealSize(){return this._itemSize[(0,s.oV)(this.direction)]}get _idealSize1(){return this._itemSize[(0,s.oV)(this.direction)]}get _idealSize2(){return this._itemSize[(0,s.vD)(this.direction)]}get _gap1(){return this._gaps[t=this.direction,"horizontal"===t?"column":"row"];var t}get _gap2(){return this._gaps[o(this.direction)]}get _padding1(){const t=this._padding,[e,i]="horizontal"===this.direction?["left","right"]:["top","bottom"];return[t[e],t[i]]}get _padding2(){const t=this._padding,[e,i]="horizontal"===this.direction?["top","bottom"]:["left","right"];return[t[e],t[i]]}set itemSize(t){const e=this._itemSize;"string"==typeof t&&(t={width:t,height:t});const i=parseInt(t.width),s=parseInt(t.height);i!==e.width&&(e.width=i,this._triggerReflow()),s!==e.height&&(e.height=s,this._triggerReflow())}set gap(t){this._setGap(t)}_setGap(t){const e=t.split(" ").map(t=>function(t){return"auto"===t?1/0:parseInt(t)}(t)),i=this._gaps;e[0]!==i.row&&(i.row=e[0],this._triggerReflow()),void 0===e[1]?e[0]!==i.column&&(i.column=e[0],this._triggerReflow()):e[1]!==i.column&&(i.column=e[1],this._triggerReflow())}set padding(t){const e=this._padding,i=t.split(" ").map(t=>function(t){return"match-gap"===t?1/0:parseInt(t)}(t));1===i.length?(e.top=e.right=e.bottom=e.left=i[0],this._triggerReflow()):2===i.length?(e.top=e.bottom=i[0],e.right=e.left=i[1],this._triggerReflow()):3===i.length?(e.top=i[0],e.right=e.left=i[1],e.bottom=i[2],this._triggerReflow()):4===i.length&&(["top","right","bottom","left"].forEach((t,s)=>e[t]=i[s]),this._triggerReflow())}constructor(){super(...arguments),this._itemSize={},this._gaps={},this._padding={}}}class r extends n{_getDefaultConfig(){return Object.assign({},super._getDefaultConfig(),{flex:!1,justify:"start"})}set gap(t){super._setGap(t)}_updateLayout(){const t=this.justify,[e,i]=this._padding1,[n,r]=this._padding2;["_gap1","_gap2"].forEach(e=>{const i=this[e];if(i===1/0&&!["space-between","space-around","space-evenly"].includes(t))throw new Error("grid layout: gap can only be set to 'auto' when justify is set to 'space-between', 'space-around' or 'space-evenly'");if(i===1/0&&"_gap2"===e)throw new Error(`grid layout: ${o(this.direction)}-gap cannot be set to 'auto' when direction is set to ${this.direction}`)});const a=this.flex||["start","center","end"].includes(t),h={rolumns:-1,itemSize1:-1,itemSize2:-1,gap1:this._gap1===1/0?-1:this._gap1,gap2:a?this._gap2:0,padding1:{start:e===1/0?this._gap1:e,end:i===1/0?this._gap1:i},padding2:a?{start:n===1/0?this._gap2:n,end:r===1/0?this._gap2:r}:{start:0,end:0},positions:[]},l=this._viewDim2-h.padding2.start-h.padding2.end;if(l<=0)h.rolumns=0;else{const o=a?h.gap2:0;let n,r=0,c=0;if(l>=this._idealSize2&&(r=Math.floor((l-this._idealSize2)/(this._idealSize2+o))+1,c=r*this._idealSize2+(r-1)*o),this.flex){(l-c)/(this._idealSize2+o)>=.5&&(r+=1),h.rolumns=r,h.itemSize2=Math.round((l-o*(r-1))/r);switch(!0===this.flex?"area":this.flex.preserve){case"aspect-ratio":h.itemSize1=Math.round(this._idealSize1/this._idealSize2*h.itemSize2);break;case(0,s.oV)(this.direction):h.itemSize1=Math.round(this._idealSize1);break;default:h.itemSize1=Math.round(this._idealSize1*this._idealSize2/h.itemSize2)}}else h.itemSize1=this._idealSize1,h.itemSize2=this._idealSize2,h.rolumns=r;if(a){const e=h.rolumns*h.itemSize2+(h.rolumns-1)*h.gap2;n=this.flex||"start"===t?h.padding2.start:"end"===t?this._viewDim2-h.padding2.end-e:Math.round(this._viewDim2/2-e/2)}else{const s=l-h.rolumns*h.itemSize2;"space-between"===t?(h.gap2=Math.round(s/(h.rolumns-1)),n=0):"space-around"===t?(h.gap2=Math.round(s/h.rolumns),n=Math.round(h.gap2/2)):(h.gap2=Math.round(s/(h.rolumns+1)),n=h.gap2),this._gap1===1/0&&(h.gap1=h.gap2,e===1/0&&(h.padding1.start=n),i===1/0&&(h.padding1.end=n))}for(let t=0;t<h.rolumns;t++)h.positions.push(n),n+=h.itemSize2+h.gap2}this._metrics=h}constructor(){super(...arguments),this._metrics=null,this.flex=null,this.justify=null}}const a=t=>Object.assign({type:h},t);class h extends r{get _delta(){return this._metrics.itemSize1+this._metrics.gap1}_getItemSize(t){return{[this._sizeDim]:this._metrics.itemSize1,[this._secondarySizeDim]:this._metrics.itemSize2}}_getActiveItems(){const t=this._metrics,{rolumns:e}=t;if(0===e)this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;else{const{padding1:i}=t,s=Math.max(0,this._scrollPosition-this._overhang),o=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang),n=Math.max(0,Math.floor((s-i.start)/this._delta)),r=Math.max(0,Math.ceil((o-i.start)/this._delta));this._first=n*e,this._last=Math.min(r*e-1,this.items.length-1),this._physicalMin=i.start+this._delta*n,this._physicalMax=i.start+this._delta*r}}_getItemPosition(t){const{rolumns:e,padding1:i,positions:o,itemSize1:n,itemSize2:r}=this._metrics;return{[this._positionDim]:i.start+Math.floor(t/e)*this._delta,[this._secondaryPositionDim]:o[t%e],[(0,s.oV)(this.direction)]:n,[(0,s.vD)(this.direction)]:r}}_updateScrollSize(){const{rolumns:t,gap1:e,padding1:i,itemSize1:s}=this._metrics;let o=1;if(t>0){const n=Math.ceil(this.items.length/t);o=i.start+n*s+(n-1)*e+i.end}this._scrollSize=o}}},38826:function(t,e,i){i.d(e,{YS:function(){return n},oV:function(){return s},vD:function(){return o}});i(45367),i(92731),i(3362),i(62953);function s(t){return"horizontal"===t?"width":"height"}function o(t){return"horizontal"===t?"height":"width"}class n{_getDefaultConfig(){return{direction:"vertical"}}set config(t){Object.assign(this,Object.assign({},this._getDefaultConfig(),t))}get config(){return{direction:this.direction}}get items(){return this._items}set items(t){this._setItems(t)}_setItems(t){t!==this._items&&(this._items=t,this._scheduleReflow())}get direction(){return this._direction}set direction(t){(t="horizontal"===t?t:"vertical")!==this._direction&&(this._direction=t,this._sizeDim="horizontal"===t?"width":"height",this._secondarySizeDim="horizontal"===t?"height":"width",this._positionDim="horizontal"===t?"left":"top",this._secondaryPositionDim="horizontal"===t?"top":"left",this._triggerReflow())}get viewportSize(){return this._viewportSize}set viewportSize(t){const{_viewDim1:e,_viewDim2:i}=this;Object.assign(this._viewportSize,t),i!==this._viewDim2?this._scheduleLayoutUpdate():e!==this._viewDim1&&this._checkThresholds()}get viewportScroll(){return this._latestCoords}set viewportScroll(t){Object.assign(this._latestCoords,t);const e=this._scrollPosition;this._scrollPosition=this._latestCoords[this._positionDim];Math.abs(e-this._scrollPosition)>=1&&this._checkThresholds()}reflowIfNeeded(t=!1){(t||this._pendingReflow)&&(this._pendingReflow=!1,this._reflow())}set pin(t){this._pin=t,this._triggerReflow()}get pin(){if(null!==this._pin){const{index:t,block:e}=this._pin;return{index:Math.max(0,Math.min(t,this.items.length-1)),block:e}}return null}_clampScrollPosition(t){return Math.max(-this.offsetWithinScroller[this._positionDim],Math.min(t,this.totalScrollSize[s(this.direction)]-this._viewDim1))}unpin(){null!==this._pin&&(this._sendUnpinnedMessage(),this._pin=null)}_updateLayout(){}get _viewDim1(){return this._viewportSize[this._sizeDim]}get _viewDim2(){return this._viewportSize[this._secondarySizeDim]}_scheduleReflow(){this._pendingReflow=!0}_scheduleLayoutUpdate(){this._pendingLayoutUpdate=!0,this._scheduleReflow()}_triggerReflow(){this._scheduleLayoutUpdate(),Promise.resolve().then(()=>this.reflowIfNeeded())}_reflow(){this._pendingLayoutUpdate&&(this._updateLayout(),this._pendingLayoutUpdate=!1),this._updateScrollSize(),this._setPositionFromPin(),this._getActiveItems(),this._updateVisibleIndices(),this._sendStateChangedMessage()}_setPositionFromPin(){if(null!==this.pin){const t=this._scrollPosition,{index:e,block:i}=this.pin;this._scrollPosition=this._calculateScrollIntoViewPosition({index:e,block:i||"start"})-this.offsetWithinScroller[this._positionDim],this._scrollError=t-this._scrollPosition}}_calculateScrollIntoViewPosition(t){const{block:e}=t,i=Math.min(this.items.length,Math.max(0,t.index)),s=this._getItemPosition(i)[this._positionDim];let o=s;if("start"!==e){const t=this._getItemSize(i)[this._sizeDim];if("center"===e)o=s-.5*this._viewDim1+.5*t;else{const i=s-this._viewDim1+t;if("end"===e)o=i;else{const t=this._scrollPosition;o=Math.abs(t-s)<Math.abs(t-i)?s:i}}}return o+=this.offsetWithinScroller[this._positionDim],this._clampScrollPosition(o)}getScrollIntoViewCoordinates(t){return{[this._positionDim]:this._calculateScrollIntoViewPosition(t)}}_sendUnpinnedMessage(){this._hostSink({type:"unpinned"})}_sendVisibilityChangedMessage(){this._hostSink({type:"visibilityChanged",firstVisible:this._firstVisible,lastVisible:this._lastVisible})}_sendStateChangedMessage(){const t=new Map;if(-1!==this._first&&-1!==this._last)for(let i=this._first;i<=this._last;i++)t.set(i,this._getItemPosition(i));const e={type:"stateChanged",scrollSize:{[this._sizeDim]:this._scrollSize,[this._secondarySizeDim]:null},range:{first:this._first,last:this._last,firstVisible:this._firstVisible,lastVisible:this._lastVisible},childPositions:t};this._scrollError&&(e.scrollError={[this._positionDim]:this._scrollError,[this._secondaryPositionDim]:0},this._scrollError=0),this._hostSink(e)}get _num(){return-1===this._first||-1===this._last?0:this._last-this._first+1}_checkThresholds(){if(0===this._viewDim1&&this._num>0||null!==this._pin)this._scheduleReflow();else{const t=Math.max(0,this._scrollPosition-this._overhang),e=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang);this._physicalMin>t||this._physicalMax<e?this._scheduleReflow():this._updateVisibleIndices({emit:!0})}}_updateVisibleIndices(t){if(-1===this._first||-1===this._last)return;let e=this._first;for(;e<this._last&&Math.round(this._getItemPosition(e)[this._positionDim]+this._getItemSize(e)[this._sizeDim])<=Math.round(this._scrollPosition);)e++;let i=this._last;for(;i>this._first&&Math.round(this._getItemPosition(i)[this._positionDim])>=Math.round(this._scrollPosition+this._viewDim1);)i--;e===this._firstVisible&&i===this._lastVisible||(this._firstVisible=e,this._lastVisible=i,t&&t.emit&&this._sendVisibilityChangedMessage())}constructor(t,e){this._latestCoords={left:0,top:0},this._direction=null,this._viewportSize={width:0,height:0},this.totalScrollSize={width:0,height:0},this.offsetWithinScroller={left:0,top:0},this._pendingReflow=!1,this._pendingLayoutUpdate=!1,this._pin=null,this._firstVisible=0,this._lastVisible=0,this._physicalMin=0,this._physicalMax=0,this._first=-1,this._last=-1,this._sizeDim="height",this._secondarySizeDim="width",this._positionDim="top",this._secondaryPositionDim="left",this._scrollPosition=0,this._scrollError=0,this._items=[],this._scrollSize=1,this._overhang=1e3,this._hostSink=t,Promise.resolve().then(()=>this.config=e||this._getDefaultConfig())}}},54495:function(t,e,i){i.d(e,{OA:function(){return s.OA},WL:function(){return s.WL},u$:function(){return s.u$}});var s=i(42017)},89784:function(t,e,i){i.d(e,{W:function(){return a}});i(16280),i(74423),i(72712),i(18111),i(18237),i(27495),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(25440),i(62953);var s=i(5055),o=i(42017);const n="important",r=" !"+n,a=(0,o.u$)(class extends o.WL{render(t){return Object.keys(t).reduce((e,i)=>{const s=t[i];return null==s?e:e+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`},"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const s of this.ft)null==e[s]&&(this.ft.delete(s),s.includes("-")?i.removeProperty(s):i[s]=null);for(const s in e){const t=e[s];if(null!=t){this.ft.add(s);const e="string"==typeof t&&t.endsWith(r);s.includes("-")||e?i.setProperty(s,e?t.slice(0,-11):t,e?n:""):i[s]=t}}return s.c0}constructor(t){var e;if(super(t),t.type!==o.OA.ATTRIBUTE||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}})}}]);