UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

2 lines 22.8 kB
/*! For license information please see 13390.798a43d1c051f61c.js.LICENSE.txt */ export const __rspack_esm_id=13390;export const __rspack_esm_ids=[13390];export const __webpack_modules__={97577(t,e,i){i.d(e,{A:()=>w});var s=i(5124),o=i(22441),a=i(6412),n=i(63672),r=i(34514),l=i(40991),h=i(92070),d=i(49546),c=i(9395),p=i(62676),u=i(15477),f=i(31896),g=(i(38625),s.AH`:host{--checked-icon-color:var(--wa-color-brand-on-loud);--checked-icon-scale:0.8;display:inline-flex;color:var(--wa-form-control-value-color);font-family:inherit;font-weight:var(--wa-form-control-value-font-weight);line-height:var(--wa-form-control-value-line-height);user-select:none;-webkit-user-select:none}[part~=control]{display:inline-flex;flex:0 0 auto;position:relative;align-items:center;justify-content:center;width:var(--wa-form-control-toggle-size);height:var(--wa-form-control-toggle-size);border-color:var(--wa-form-control-border-color);border-radius:min(calc(var(--wa-form-control-toggle-size) * .375),var(--wa-border-radius-s));border-style:var(--wa-border-style);border-width:var(--wa-form-control-border-width);background-color:var(--wa-form-control-background-color);transition:background var(--wa-transition-normal),border-color var(--wa-transition-fast),box-shadow var(--wa-transition-fast),color var(--wa-transition-fast);transition-timing-function:var(--wa-transition-easing);margin-inline-end:.5em}[part~=base]{display:flex;align-items:flex-start;position:relative;color:currentColor;vertical-align:middle;cursor:pointer}[part~=label]{display:inline}[part~=control]:has(:checked,:indeterminate){color:var(--checked-icon-color);border-color:var(--wa-form-control-activated-color);background-color:var(--wa-form-control-activated-color)}[part~=control]:has(> input:focus-visible:not(:disabled)){outline:var(--wa-focus-ring);outline-offset:var(--wa-focus-ring-offset)}:host [part~=base]:has(input:disabled){opacity:.5;cursor:not-allowed}input{position:absolute;padding:0;margin:0;height:100%;width:100%;opacity:0;pointer-events:none}[part~=icon]{display:flex;scale:var(--checked-icon-scale)}[part~=icon]::part(svg){translate:0.0009765625em}input:not(:checked,:indeterminate)+[part~=icon]{visibility:hidden}:host([required]) [part~=label]::after{content:var(--wa-form-control-required-content);color:var(--wa-form-control-required-content-color);margin-inline-start:var(--wa-form-control-required-content-offset)}`),m=Object.defineProperty,v=Object.getOwnPropertyDescriptor,b=(t,e,i,s)=>{for(var o,a=s>1?void 0:s?v(e,i):e,n=t.length-1;n>=0;n--)(o=t[n])&&(a=(s?o(e,i,a):o(a))||a);return s&&a&&m(e,i,a),a};let w=class extends p.q{static get validators(){const t=s.S$?[]:[(0,d.Y)({validationProperty:"checked",validationElement:Object.assign(document.createElement("input"),{type:"checkbox",required:!0})})];return[...super.validators,...t]}get value(){return this._value??"on"}set value(t){this._value=t}handleSizeChange(){(0,l.b)(this.localName,this.size)}get checked(){return this.valueHasChanged?Boolean(this._checked):this._checked??this.defaultChecked}set checked(t){this._checked=Boolean(t),this.valueHasChanged=!0}handleClick(){this.hasInteracted=!0,this.checked=!this.checked,this.indeterminate=!1,this.updateComplete.then(()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))})}connectedCallback(){super.connectedCallback(),this.handleDefaultCheckedChange()}handleDefaultCheckedChange(){this.handleValueOrCheckedChange()}handleValueOrCheckedChange(){this.setValue(this.checked?this.value:null,this._value),this.updateValidity()}handleStateChange(){this.hasUpdated&&(this.input.checked=this.checked,this.input.indeterminate=this.indeterminate),this.customStates.set("checked",this.checked),this.customStates.set("indeterminate",this.indeterminate),this.updateValidity()}handleDisabledChange(){this.customStates.set("disabled",this.disabled)}willUpdate(t){super.willUpdate(t),(t.has("value")||t.has("checked")||t.has("defaultChecked"))&&this.handleValueOrCheckedChange()}formResetCallback(){this._checked=null,super.formResetCallback(),this.handleValueOrCheckedChange()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}render(){const t=!!s.S$||this.hasSlotController.test("hint"),e=!!this.hint||!!t,i=!this.checked&&this.indeterminate,o=i?"indeterminate":"check",l=i?"indeterminate":"check";return s.qy` <label part="base"> <span part="control"> <input class="input" type="checkbox" title="${this.title}" name="${(0,n.J)(this.name)}" value="${(0,n.J)(this._value)}" .indeterminate="${(0,r.V)(this.indeterminate)}" .checked="${(0,r.V)(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked?"true":"false"}" aria-describedby="hint" @click="${this.handleClick}"> <wa-icon part="${l}-icon icon" library="system" name="${o}"></wa-icon> </span> <slot part="label"></slot> </label> <slot id="hint" part="hint" name="hint" aria-hidden="${e?"false":"true"}" class="${(0,a.H)({"has-slotted":e})}"> ${this.hint} </slot> `}constructor(){super(...arguments),this.hasSlotController=new h.X(this,"hint"),this.title="",this.name=null,this._value=this.getAttribute("value")??null,this.size="m",this.disabled=!1,this.indeterminate=!1,this._checked=null,this.defaultChecked=this.hasAttribute("checked"),this.required=!1,this.hint=""}};w.css=[u.A,f.A,g],w.shadowRootOptions={...p.q.shadowRootOptions,delegatesFocus:!0},b([(0,o.P)('input[type="checkbox"]')],w.prototype,"input",2),b([(0,o.MZ)()],w.prototype,"title",2),b([(0,o.MZ)({reflect:!0})],w.prototype,"name",2),b([(0,o.MZ)({reflect:!0})],w.prototype,"value",1),b([(0,o.MZ)({reflect:!0})],w.prototype,"size",2),b([(0,c.w)("size")],w.prototype,"handleSizeChange",1),b([(0,o.MZ)({type:Boolean})],w.prototype,"disabled",2),b([(0,o.MZ)({type:Boolean,reflect:!0})],w.prototype,"indeterminate",2),b([(0,o.MZ)({type:Boolean,attribute:!1})],w.prototype,"checked",1),b([(0,o.MZ)({type:Boolean,reflect:!0,attribute:"checked"})],w.prototype,"defaultChecked",2),b([(0,o.MZ)({type:Boolean,reflect:!0})],w.prototype,"required",2),b([(0,o.MZ)()],w.prototype,"hint",2),b([(0,c.w)(["checked","defaultChecked"])],w.prototype,"handleDefaultCheckedChange",1),b([(0,c.w)(["checked","indeterminate"])],w.prototype,"handleStateChange",1),b([(0,c.w)("disabled")],w.prototype,"handleDisabledChange",1),w=b([(0,o.EM)("wa-checkbox")],w),w.disableWarning?.("change-in-update")},93900(t,e,i){i.a(t,async function(t,e){try{var s=i(5124),o=i(22441),a=i(6412),n=i(63672),r=i(17051),l=i(42462),h=i(28438),d=i(98779),c=i(27259),p=i(25877),u=i(31247),f=i(4444),g=i(92070),m=i(9395),v=i(717),b=i(17060),w=i(88496),y=i(91470),k=t([w,b]);[w,b]=k.then?(await k)():k;var C=Object.defineProperty,x=Object.getOwnPropertyDescriptor,O=(t,e,i,s)=>{for(var o,a=s>1?void 0:s?x(e,i):e,n=t.length-1;n>=0;n--)(o=t[n])&&(a=(s?o(e,i,a):o(a))||a);return s&&a&&C(e,i,a),a};let A=class extends v.A{firstUpdated(){this.open&&(this.addOpenListeners(),this.dialog.showModal(),(0,f.JG)(this))}disconnectedCallback(){super.disconnectedCallback(),(0,f.I7)(this),this.removeOpenListeners()}async requestClose(t){const e=new h.L({source:t});if(this.dispatchEvent(e),e.defaultPrevented)return this.open=!0,void(0,c.Ud)(this.dialog,"pulse");this.removeOpenListeners(),await(0,c.Ud)(this.dialog,"hide"),this.open=!1,this.dialog.close(),(0,f.I7)(this);const i=this.originalTrigger;"function"==typeof i?.focus&&setTimeout(()=>i.focus()),this.dispatchEvent(new r.Z)}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown),(0,p.AZ)(this)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown),(0,p.Fw)(this)}handleDialogCancel(t){t.preventDefault(),!this.dialog.classList.contains("hide")&&t.target===this.dialog&&(0,p.a0)(this)&&this.requestClose(this.dialog)}handleDialogClick(t){const e=t.target.closest('[data-dialog="close"]');e&&(t.stopPropagation(),this.requestClose(e))}async handleDialogPointerDown(t){t.target===this.dialog&&(this.lightDismiss?this.requestClose(this.dialog):await(0,c.Ud)(this.dialog,"pulse"))}handleOpenChange(){this.open&&!this.dialog.open?this.show():!this.open&&this.dialog.open&&(this.open=!0,this.requestClose(this.dialog))}async show(){const t=new d.k;this.dispatchEvent(t),t.defaultPrevented?this.open=!1:(this.addOpenListeners(),this.originalTrigger=document.activeElement,this.open=!0,this.dialog.showModal(),(0,f.JG)(this),requestAnimationFrame(()=>{const t=this.querySelector("[autofocus]");t&&"function"==typeof t.focus?t.focus():this.dialog.focus()}),await(0,c.Ud)(this.dialog,"show"),this.dispatchEvent(new l.q))}render(){const t=!this.withoutHeader,e=this.hasUpdated?this.hasSlotController.test("footer"):this.withFooter;return s.qy` <dialog aria-labelledby="${this.ariaLabelledby??"title"}" aria-describedby="${(0,n.J)(this.ariaDescribedby)}" part="dialog" class="${(0,a.H)({dialog:!0,open:this.open})}" @cancel="${this.handleDialogCancel}" @click="${this.handleDialogClick}" @pointerdown="${this.handleDialogPointerDown}"> ${t?s.qy` <header part="header" class="header"> <h2 part="title" class="title" id="title"> <slot name="label"> ${this.label.length>0?this.label:String.fromCharCode(8203)} </slot> </h2> <div part="header-actions" class="header-actions"> <slot name="header-actions"></slot> <wa-button part="close-button" exportparts="base:close-button__base" class="close" appearance="plain" @click="${t=>this.requestClose(t.target)}"> <wa-icon name="xmark" label="${this.localize.term("close")}" library="system" variant="solid"></wa-icon> </wa-button> </div> </header> `:""} <div part="body" class="body"><slot></slot></div> ${e?s.qy` <footer part="footer" class="footer"> <slot name="footer"></slot> </footer> `:""} </dialog> `}constructor(){super(...arguments),this.localize=new b.c(this),this.hasSlotController=new g.X(this,"footer","header-actions","label"),this.open=!1,this.label="",this.withoutHeader=!1,this.lightDismiss=!1,this.withFooter=!1,this.handleDocumentKeyDown=t=>{"Escape"===t.key&&this.open&&(0,p.a0)(this)&&(t.preventDefault(),t.stopPropagation(),this.requestClose(this.dialog))}}};A.css=y.A,O([(0,o.P)(".dialog")],A.prototype,"dialog",2),O([(0,o.MZ)({type:Boolean,reflect:!0})],A.prototype,"open",2),O([(0,o.MZ)({reflect:!0})],A.prototype,"label",2),O([(0,o.MZ)({attribute:"without-header",type:Boolean,reflect:!0})],A.prototype,"withoutHeader",2),O([(0,o.MZ)({attribute:"light-dismiss",type:Boolean})],A.prototype,"lightDismiss",2),O([(0,o.MZ)({attribute:"aria-labelledby"})],A.prototype,"ariaLabelledby",2),O([(0,o.MZ)({attribute:"aria-describedby"})],A.prototype,"ariaDescribedby",2),O([(0,o.MZ)({attribute:"with-footer",type:Boolean})],A.prototype,"withFooter",2),O([(0,m.w)("open",{waitUntilFirstUpdate:!0})],A.prototype,"handleOpenChange",1),A=O([(0,o.EM)("wa-dialog")],A),s.S$||(document.addEventListener("click",t=>{const e=t.target.closest("[data-dialog]");if(e instanceof Element){const[t,i]=(0,u.v)(e.getAttribute("data-dialog")||"");if("open"===t&&i?.length){const t=e.getRootNode().getElementById(i);"wa-dialog"===t?.localName?t.open=!0:console.warn(`A dialog with an ID of "${i}" could not be found in this document.`)}}}),document.addEventListener("pointerdown",()=>{})),e()}catch(t){e(t)}})},91470(t,e,i){i.d(e,{A:()=>s});var s=i(5124).AH`:host{--width:31rem;--spacing:var(--wa-space-l);--backdrop-filter:none;--show-duration:200ms;--hide-duration:200ms;display:none}:host([open]){display:block}.dialog{display:flex;flex-direction:column;top:0;right:0;bottom:0;left:0;width:var(--width);max-width:calc(100% - var(--wa-space-2xl));max-height:calc(100% - var(--wa-space-2xl));color:inherit;background-color:var(--wa-color-surface-raised);border-radius:var(--wa-panel-border-radius);border:none;box-shadow:var(--wa-shadow-l);padding:0;margin:auto}.dialog.show{animation:show-dialog var(--show-duration) ease}.dialog.show::backdrop{animation:show-backdrop var(--show-duration,200ms) ease}.dialog.hide{animation:show-dialog var(--hide-duration) ease reverse}.dialog.hide::backdrop{animation:show-backdrop var(--hide-duration,200ms) ease reverse}.dialog.pulse{animation:pulse 250ms ease}.dialog:focus{outline:0}@media screen and (max-width:420px){.dialog{max-height:80vh}}.open{display:flex;opacity:1}.header{flex:0 0 auto;display:flex;flex-wrap:nowrap;padding-inline-start:var(--spacing);padding-block-end:0;padding-inline-end:calc(var(--spacing) - var(--wa-form-control-padding-block));padding-block-start:calc(var(--spacing) - var(--wa-form-control-padding-block))}.title{align-self:center;flex:1 1 auto;font-family:inherit;font-size:var(--wa-font-size-l);font-weight:var(--wa-font-weight-heading);line-height:var(--wa-line-height-condensed);margin:0}.header-actions{align-self:start;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:end;gap:var(--wa-space-2xs);padding-inline-start:var(--spacing)}.header-actions ::slotted(wa-button),.header-actions wa-button{flex:0 0 auto;display:flex;align-items:center}.body{flex:1 1 auto;display:block;padding:var(--spacing);overflow:auto;-webkit-overflow-scrolling:touch}.body:focus{outline:0}.body:focus-visible{outline:var(--wa-focus-ring);outline-offset:var(--wa-focus-ring-offset)}.footer{flex:0 0 auto;display:flex;flex-wrap:wrap;gap:var(--wa-space-xs);justify-content:end;padding:var(--spacing);padding-block-start:0}.footer ::slotted(wa-button:not(:first-of-type)){margin-inline-start:var(--wa-spacing-xs)}.dialog::backdrop{background-color:var(--wa-color-overlay-modal,rgb(0 0 0 / .25));-webkit-backdrop-filter:var(--backdrop-filter);backdrop-filter:var(--backdrop-filter)}@keyframes pulse{0%{scale:1}50%{scale:1.02}100%{scale:1}}@keyframes show-dialog{from{opacity:0;scale:0.8}to{opacity:1;scale:1}}@keyframes show-backdrop{from{opacity:0}to{opacity:1}}@media (forced-colors:active){.dialog{border:solid 1px #fff}}`},49546(t,e,i){i.d(e,{Y:()=>s});i(44114);const s=(t={})=>{let{validationElement:e,validationProperty:i}=t;e||(e=Object.assign(document.createElement("input"),{required:!0})),i||(i="value");const s={observedAttributes:["required"],message:e.validationMessage,checkValidity(t){const e={message:"",isValid:!0,invalidKeys:[]};if(!(t.required??t.hasAttribute("required")))return e;return!t[i]&&(e.message="function"==typeof s.message?s.message(t):s.message||"",e.isValid=!1,e.invalidKeys.push("valueMissing")),e}};return s}},7364(t,e,i){i.d(e,{i0:()=>b});i(44114),i(18111),i(81148),i(22489),i(7588),i(61701),i(45367),i(92731),i(88454),i(29452);var s=i(5055),o=i(42017),a=i(40054);i(13579),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);const n=new WeakMap;let r=0;const l=new Map,h=new WeakSet,d=()=>new Promise(t=>requestAnimationFrame(t)),c=(t,e)=>{const i=t-e;return 0===i?void 0:i},p=(t,e)=>{const i=t/e;return 1===i?void 0:i},u={left:(t,e)=>{const i=c(t,e);return{value:i,transform:null==i||isNaN(i)?void 0:`translateX(${i}px)`}},top:(t,e)=>{const i=c(t,e);return{value:i,transform:null==i||isNaN(i)?void 0:`translateY(${i}px)`}},width:(t,e)=>{let i;0===e&&(e=1,i={width:"1px"});const s=p(t,e);return{value:s,overrideFrom:i,transform:null==s||isNaN(s)?void 0:`scaleX(${s})`}},height:(t,e)=>{let i;0===e&&(e=1,i={height:"1px"});const s=p(t,e);return{value:s,overrideFrom:i,transform:null==s||isNaN(s)?void 0:`scaleY(${s})`}}},f={duration:333,easing:"ease-in-out"},g=["left","top","width","height","opacity","color","background"],m=new WeakMap;class v extends a.Kq{createFinished(){this.resolveFinished?.(),this.finished=new Promise(t=>{this.l=t})}async resolveFinished(){this.l?.(),this.l=void 0}render(t){return s.s6}getController(){return n.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(t,[e]){const i=void 0===this.u;return i&&(this.u=t.options?.host,this.u.addController(this),this.u.updateComplete.then(t=>this.t=!0),this.element=t.element,m.set(this.element,this)),this.optionsOrCallback=e,(i||"function"!=typeof e)&&this.m(e),this.render(e)}m(t){t=t??{};const e=this.getController();void 0!==e&&((t={...e.defaultOptions,...t}).keyframeOptions={...e.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??=g,this.options=t}p(){const t={},e=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach(s=>{const o=e[s]??(u[s]?void 0:i[s]),a=Number(o);t[s]=isNaN(a)?o+"":a}),t}v(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((t,e)=>{if(Array.isArray(t)){if(Array.isArray(e)&&e.length===t.length&&t.every((t,i)=>t===e[i]))return!1}else if(e===t)return!1;return!0})(t,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.h&&(this._=Array.isArray(t)?Array.from(t):t),this.h}hostUpdate(){"function"==typeof this.optionsOrCallback&&this.m(this.optionsOrCallback()),this.v()&&(this.A=this.p(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await d;const e=this.P(),i=this.V(this.options.keyframeOptions,e),s=this.p();if(void 0!==this.A){const{from:i,to:o}=this.O(this.A,s,e);this.log("measured",[this.A,s,i,o]),t=this.calculateKeyframes(i,o)}else{const i=l.get(this.options.inId);if(i){l.delete(this.options.inId);const{from:o,to:a}=this.O(i,s,e);t=this.calculateKeyframes(o,a),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,r++,t.forEach(t=>t.zIndex=r)}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,i)}resetStyles(){void 0!==this.j&&(this.element.setAttribute("style",this.j??""),this.j=void 0)}commitStyles(){this.j=this.element.getAttribute("style"),this.webAnimation?.commitStyles(),this.webAnimation?.cancel()}reconnected(){}async disconnected(){if(!this.h)return;if(void 0!==this.options.id&&l.set(this.options.id,this.A),void 0===this.options.out)return;if(this.prepare(),await d(),this.i?.isConnected){const t=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.p();this.log("stabilizing out");const e=this.A.left-t.left,i=this.A.top-t.top;!("static"===getComputedStyle(this.element).position)||0===e&&0===i||(this.element.style.position="relative"),0!==e&&(this.element.style.left=e+"px"),0!==i&&(this.element.style.top=i+"px")}}const t=this.V(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){this.options.onStart?.(this)}didFinish(t){t&&this.options.onComplete?.(this),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}P(){const t=[];for(let e=this.element.parentNode;e;e=e?.parentNode){const i=m.get(e);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=h.has(this.u);return t||this.u.updateComplete.then(()=>{h.add(this.u)}),t}V(t,e=this.P()){const i={...f};return e.forEach(t=>Object.assign(i,t.options.keyframeOptions)),Object.assign(i,t),i}O(t,e,i){t={...t},e={...e};const s=i.map(t=>t.animatingProperties).filter(t=>void 0!==t);let o=1,a=1;return s.length>0&&(s.forEach(t=>{t.width&&(o/=t.width),t.height&&(a/=t.height)}),void 0!==t.left&&void 0!==e.left&&(t.left=o*t.left,e.left=o*e.left),void 0!==t.top&&void 0!==e.top&&(t.top=a*t.top,e.top=a*e.top)),{from:t,to:e}}calculateKeyframes(t,e,i=!1){const s={},o={};let a=!1;const n={};for(const i in e){const r=t[i],l=e[i];if(i in u){const t=u[i];if(void 0===r||void 0===l)continue;const e=t(r,l);void 0!==e.transform&&(n[i]=e.value,a=!0,s.transform=`${s.transform??""} ${e.transform}`,void 0!==e.overrideFrom&&Object.assign(s,e.overrideFrom))}else r!==l&&void 0!==r&&void 0!==l&&(a=!0,s[i]=r,o[i]=l)}return s.transformOrigin=o.transformOrigin=i?"center center":"top left",this.animatingProperties=n,a?[s,o]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let i=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,e]),i=!0,this.webAnimation=this.element.animate(t,e);const s=this.getController();s?.add(this);try{await this.webAnimation.finished}catch(t){}s?.remove(this)}return this.didFinish(i),i}isAnimating(){return"running"===this.webAnimation?.playState||this.webAnimation?.pending}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}constructor(t){if(super(t),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,t.type===o.OA.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}}const b=(0,o.u$)(v);i(74423);const w=["top","right","bottom","left"];class y extends a.Kq{render(t,e){return s.s6}update(t,[e,i]){return void 0===this.u&&(this.u=t.options?.host,this.u.addController(this)),this.C=t.element,this.N=e,this.S=i??["left","top","width","height"],this.render(e,i)}hostUpdated(){this.F()}F(){const t="function"==typeof this.N?this.N():this.N?.value,e=t.offsetParent;if(void 0===t||!e)return;const i=t.getBoundingClientRect(),s=e.getBoundingClientRect();this.S?.forEach(t=>{const e=w.includes(t)?i[t]-s[t]:i[t];this.C.style[t]=e+"px"})}constructor(t){if(super(t),t.type!==o.OA.ELEMENT)throw Error("The `position` directive must be used in attribute position.")}}(0,o.u$)(y)},40054(t,e,i){i.d(e,{Kq:()=>s.Kq});var s=i(37540)},75751(t,e,i){i.d(e,{u:()=>r});i(45367),i(92731);var s=i(5055),o=i(42017),a=i(63937);const n=(t,e,i)=>{const s=new Map;for(let o=e;o<=i;o++)s.set(t[o],o);return s},r=(0,o.u$)(class extends o.WL{dt(t,e,i){let s;void 0===i?i=e:void 0!==e&&(s=e);const o=[],a=[];let n=0;for(const e of t)o[n]=s?s(e,n):n,a[n]=i(e,n),n++;return{values:a,keys:o}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,o]){const r=(0,a.cN)(t),{values:l,keys:h}=this.dt(e,i,o);if(!Array.isArray(r))return this.ut=h,l;const d=this.ut??=[],c=[];let p,u,f=0,g=r.length-1,m=0,v=l.length-1;for(;f<=g&&m<=v;)if(null===r[f])f++;else if(null===r[g])g--;else if(d[f]===h[m])c[m]=(0,a.lx)(r[f],l[m]),f++,m++;else if(d[g]===h[v])c[v]=(0,a.lx)(r[g],l[v]),g--,v--;else if(d[f]===h[v])c[v]=(0,a.lx)(r[f],l[v]),(0,a.Dx)(t,c[v+1],r[f]),f++,v--;else if(d[g]===h[m])c[m]=(0,a.lx)(r[g],l[m]),(0,a.Dx)(t,r[f],r[g]),g--,m++;else if(void 0===p&&(p=n(h,m,v),u=n(d,f,g)),p.has(d[f]))if(p.has(d[g])){const e=u.get(h[m]),i=void 0!==e?r[e]:null;if(null===i){const e=(0,a.Dx)(t,r[f]);(0,a.lx)(e,l[m]),c[m]=e}else c[m]=(0,a.lx)(i,l[m]),(0,a.Dx)(t,r[f],i),r[e]=null;m++}else(0,a.KO)(r[g]),g--;else(0,a.KO)(r[f]),f++;for(;m<=v;){const e=(0,a.Dx)(t,c[v+1]);(0,a.lx)(e,l[m]),c[m++]=e}for(;f<=g;){const t=r[f++];null!==t&&(0,a.KO)(t)}return this.ut=h,(0,a.mY)(t,c),s.c0}constructor(t){if(super(t),t.type!==o.OA.CHILD)throw Error("repeat() can only be used in text expressions")}})}};