Files
2026-01-30 23:31:00 -06:00

3 lines
22 KiB
JavaScript

/*! For license information please see 9375.d94a026f9fb042c9.js.LICENSE.txt */
export const ids=["9375"];export const modules={45294:function(t,e,i){function s(t){const e=t.language||"en";return t.translationMetadata.translations[e]&&t.translationMetadata.translations[e].isRTL||!1}function n(t){return o(s(t))}function o(t){return t?"rtl":"ltr"}i.d(e,{HE:function(){return s},Zu:function(){return n}})},20095:function(t,e,i){var s=i(44249),n=i(31622),o=i(57243),a=i(50778),r=i(22344);(0,s.Z)([(0,a.Mo)("ha-button")],(function(t,e){return{F:class extends e{constructor(...e){super(...e),t(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>[r.W,o.iv`::slotted([slot=icon]){margin-inline-start:0px;margin-inline-end:8px;direction:var(--direction);display:block}.mdc-button{height:var(--button-height,36px)}.trailing-icon{display:flex}.slot-container{overflow:var(--button-slot-container-overflow,visible)}`]}]}}),n.z)},28368:function(t,e,i){var s=i(44249),n=i(72621),o=i(57243),a=i(93958),r=i(97536),l=i(46289),h=i(50778),d=i(11297);(0,s.Z)([(0,h.Mo)("ha-check-list-item")],(function(t,e){class i extends e{constructor(...e){super(...e),t(this)}}return{F:i,d:[{kind:"method",key:"onChange",value:async function(t){(0,n.Z)(i,"onChange",this,3)([t]),(0,d.B)(this,t.type)}},{kind:"field",static:!0,key:"styles",value:()=>[l.W,r.W,o.iv`:host{--mdc-theme-secondary:var(--primary-color)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic{margin-inline-end:var(--mdc-list-item-graphic-margin,16px);margin-inline-start:0px;direction:var(--direction)}.mdc-deprecated-list-item__meta{flex-shrink:0;direction:var(--direction);margin-inline-start:auto;margin-inline-end:0}.mdc-deprecated-list-item__graphic{margin-top:var(--check-list-item-graphic-margin-top)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{margin-inline-start:0;margin-inline-end:var(--mdc-list-item-graphic-margin,32px)}`]}]}}),a.F)},77182:function(t,e,i){var s=i(44249),n=i(57243),o=i(50778);i(10508);(0,s.Z)([(0,o.Mo)("ha-tip")],(function(t,e){return{F:class extends e{constructor(...e){super(...e),t(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"method",key:"render",value:function(){return this.hass?n.dy` <ha-svg-icon .path="${"M12,2A7,7 0 0,1 19,9C19,11.38 17.81,13.47 16,14.74V17A1,1 0 0,1 15,18H9A1,1 0 0,1 8,17V14.74C6.19,13.47 5,11.38 5,9A7,7 0 0,1 12,2M9,21V20H15V21A1,1 0 0,1 14,22H10A1,1 0 0,1 9,21M12,4A5,5 0 0,0 7,9C7,11.05 8.23,12.81 10,13.58V16H14V13.58C15.77,12.81 17,11.05 17,9A5,5 0 0,0 12,4Z"}"></ha-svg-icon> <span class="prefix">${this.hass.localize("ui.panel.config.tips.tip")}</span> <span class="text"><slot></slot></span> `:n.Ld}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`:host{display:block;text-align:center}.text{direction:var(--direction);margin-left:2px;margin-inline-start:2px;margin-inline-end:initial;color:var(--secondary-text-color)}.prefix{font-weight:500}`}]}}),n.oi)},12206:function(t,e,i){i.a(t,(async function(t,s){try{i.r(e);var n=i(44249),o=(i(92745),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(39527),i(99790),i(41360),i(15108)),a=(i(2060),i(87319),i(57243)),r=i(50778),l=i(91583),h=i(11297),d=i(45294),c=i(98773),u=i(42883),p=i(18727),m=i(4557),g=i(66193),f=(i(20095),i(28368),i(90977),i(44118),i(28906),i(10508),i(77182),i(80359)),v=(i(18875),i(49672)),_=t([f]);f=(_.then?(await _)():_)[0];const y="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",k="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z";(0,n.Z)([(0,r.Mo)("dialog-media-manage")],(function(t,e){return{F:class extends e{constructor(...e){super(...e),t(this)}},d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_currentItem",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_params",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_uploading",value:()=>!1},{kind:"field",decorators:[(0,r.SB)()],key:"_deleting",value:()=>!1},{kind:"field",decorators:[(0,r.SB)()],key:"_selected",value:()=>new Set},{kind:"field",key:"_filesChanged",value:()=>!1},{kind:"method",key:"showDialog",value:function(t){this._params=t,this._refreshMedia()}},{kind:"method",key:"closeDialog",value:function(){this._filesChanged&&this._params.onClose&&this._params.onClose(),this._params=void 0,this._currentItem=void 0,this._uploading=!1,this._deleting=!1,this._filesChanged=!1,(0,h.B)(this,"dialog-closed",{dialog:this.localName})}},{kind:"method",key:"render",value:function(){if(!this._params)return a.Ld;const t=this._currentItem?.children?.filter((t=>!t.can_expand))||[];let e=0;return a.dy` <ha-dialog open scrimClickAction escapeKeyAction hideActions flexContent .heading="${this._params.currentItem.title}" @closed="${this.closeDialog}"> <ha-dialog-header slot="heading"> ${0===this._selected.size?a.dy` <span slot="title"> ${this.hass.localize("ui.components.media-browser.file_management.title")} </span> <ha-media-upload-button .disabled="${this._deleting}" .hass="${this.hass}" .currentItem="${this._params.currentItem}" @uploading="${this._startUploading}" @media-refresh="${this._doneUploading}" slot="actionItems"></ha-media-upload-button> ${this._uploading?"":a.dy` <ha-icon-button .label="${this.hass.localize("ui.dialogs.generic.close")}" .path="${y}" dialogAction="close" slot="navigationIcon" dir="${(0,d.Zu)(this.hass)}"></ha-icon-button> `} `:a.dy` <ha-button class="danger" slot="navigationIcon" .disabled="${this._deleting}" .label="${this.hass.localize("ui.components.media-browser.file_management."+(this._deleting?"deleting":"delete"),{count:this._selected.size})}" @click="${this._handleDelete}"> <ha-svg-icon .path="${k}" slot="icon"></ha-svg-icon> </ha-button> ${this._deleting?"":a.dy` <ha-button slot="actionItems" .label="${"Deselect all"}" @click="${this._handleDeselectAll}"> <ha-svg-icon .path="${y}" slot="icon"></ha-svg-icon> </ha-button> `} `} </ha-dialog-header> ${this._currentItem?t.length?a.dy` <mwc-list multi @selected="${this._handleSelected}"> ${(0,l.r)(t,(t=>t.media_content_id),(t=>{const i=a.dy` <ha-svg-icon slot="graphic" .path="${c.Fn["directory"===t.media_class&&t.children_media_class||t.media_class].icon}"></ha-svg-icon> `;return a.dy` <ha-check-list-item ${(0,o.jt)({id:t.media_content_id,skipInitial:!0})} graphic="icon" .disabled="${this._uploading||this._deleting}" .selected="${this._selected.has(e++)}" .item="${t}"> ${i} ${t.title} </ha-check-list-item> `}))} </mwc-list> `:a.dy`<div class="no-items"> <p> ${this.hass.localize("ui.components.media-browser.file_management.no_items")} </p> ${this._currentItem?.children?.length?a.dy`<span class="folders">${this.hass.localize("ui.components.media-browser.file_management.folders_not_supported")}</span>`:""} </div>`:a.dy` <div class="refresh"> <ha-circular-progress indeterminate></ha-circular-progress> </div> `} ${(0,v.p)(this.hass,"hassio")?a.dy`<ha-tip .hass="${this.hass}"> ${this.hass.localize("ui.components.media-browser.file_management.tip_media_storage",{storage:a.dy`<a href="/config/storage" @click="${this.closeDialog}"> ${this.hass.localize("ui.components.media-browser.file_management.tip_storage_panel")}</a>`})} </ha-tip>`:a.Ld} </ha-dialog> `}},{kind:"method",key:"_handleSelected",value:function(t){this._selected=t.detail.index}},{kind:"method",key:"_startUploading",value:function(){this._uploading=!0,this._filesChanged=!0}},{kind:"method",key:"_doneUploading",value:function(){this._uploading=!1,this._refreshMedia()}},{kind:"method",key:"_handleDeselectAll",value:function(){this._selected.size&&(this._selected=new Set)}},{kind:"method",key:"_handleDelete",value:async function(){if(!await(0,m.g7)(this,{text:this.hass.localize("ui.components.media-browser.file_management.confirm_delete",{count:this._selected.size}),warning:!0}))return;this._filesChanged=!0,this._deleting=!0;const t=[];let e=0;this._currentItem.children.forEach((i=>{i.can_expand||this._selected.has(e++)&&t.push(i)}));try{await Promise.all(t.map((async t=>{if((0,u.aV)(t.media_content_id))await(0,u.Qr)(this.hass,t.media_content_id);else if((0,u.IB)(t.media_content_id)){const e=(0,p.TT)(t.media_content_id);e&&await(0,p.ao)(this.hass,e)}this._currentItem={...this._currentItem,children:this._currentItem.children.filter((e=>e!==t))}})))}finally{this._deleting=!1,this._selected=new Set}}},{kind:"method",key:"_refreshMedia",value:async function(){this._selected=new Set,this._currentItem=void 0,this._currentItem=await(0,u.b)(this.hass,this._params.currentItem.media_content_id)}},{kind:"get",static:!0,key:"styles",value:function(){return[g.yu,a.iv`ha-dialog{--dialog-z-index:9;--dialog-content-padding:0}@media (min-width:800px){ha-dialog{--mdc-dialog-max-width:800px;--dialog-surface-position:fixed;--dialog-surface-top:40px;--mdc-dialog-max-height:calc(100vh - 72px)}}ha-dialog-header ha-button,ha-dialog-header ha-media-upload-button{--mdc-theme-primary:var(--primary-text-color);margin:6px;display:block}.danger{--mdc-theme-primary:var(--error-color)}ha-svg-icon[slot=icon]{vertical-align:middle}ha-tip{margin:16px}ha-svg-icon[slot=icon]{margin-inline-start:0px!important;margin-inline-end:8px!important;direction:var(--direction)}.refresh{display:flex;height:200px;justify-content:center;align-items:center}.no-items{text-align:center;padding:16px}.folders{color:var(--secondary-text-color);font-style:italic}`]}}]}}),a.oi);s()}catch(t){s(t)}}))},18875:function(t,e,i){var s=i(44249),n=(i(31622),i(57243)),o=i(50778),a=i(11297),r=i(42883),l=i(4557);i(90977),i(10508);(0,s.Z)([(0,o.Mo)("ha-media-upload-button")],(function(t,e){return{F:class extends e{constructor(...e){super(...e),t(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"currentItem",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_uploading",value:()=>0},{kind:"method",key:"render",value:function(){return this.currentItem&&(0,r.aV)(this.currentItem.media_content_id||"")?n.dy` <mwc-button .label="${this._uploading>0?this.hass.localize("ui.components.media-browser.file_management.uploading",{count:this._uploading}):this.hass.localize("ui.components.media-browser.file_management.add_media")}" .disabled="${this._uploading>0}" @click="${this._startUpload}"> ${this._uploading>0?n.dy` <ha-circular-progress size="small" indeterminate area-label="Uploading" slot="icon"></ha-circular-progress> `:n.dy` <ha-svg-icon .path="${"M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z"}" slot="icon"></ha-svg-icon> `} </mwc-button> `:n.Ld}},{kind:"method",key:"_startUpload",value:async function(){if(this._uploading>0)return;const t=document.createElement("input");t.type="file",t.accept="audio/*,video/*,image/*",t.multiple=!0,t.addEventListener("change",(async()=>{(0,a.B)(this,"uploading");const e=t.files;document.body.removeChild(t);const i=this.currentItem.media_content_id;for(let t=0;t<e.length;t++){this._uploading=e.length-t;try{await(0,r.oE)(this.hass,i,e[t])}catch(t){(0,l.Ys)(this,{text:this.hass.localize("ui.components.media-browser.file_management.upload_failed",{reason:t.message||t})});break}}this._uploading=0,(0,a.B)(this,"media-refresh")}),{once:!0}),t.style.display="none",document.body.append(t),t.click()}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`mwc-button{--mdc-button-disabled-ink-color:--mdc-theme-primary}ha-circular-progress[slot=icon],ha-svg-icon[slot=icon]{vertical-align:middle}ha-svg-icon[slot=icon]{margin-inline-start:0px;margin-inline-end:8px;direction:var(--direction)}`}]}}),n.oi)},18727:function(t,e,i){i.d(e,{Bi:function(){return r},JS:function(){return s},TT:function(){return o},ao:function(){return l},dg:function(){return n},n$:function(){return h},p6:function(){return a}});const s="/api/image/serve/",n="media-source://image_upload",o=t=>{let e;if(t.startsWith(s)){e=t.substring(s.length);const i=e.indexOf("/");i>=0&&(e=e.substring(0,i))}else t.startsWith(n)&&(e=t.substring(n.length+1));return e},a=(t,e,i=!1)=>{if(!i&&!e)throw new Error("Size must be provided if original is false");return i?`/api/image/serve/${t}/original`:`/api/image/serve/${t}/${e}x${e}`},r=async(t,e)=>{const i=new FormData;i.append("file",e);const s=await t.fetchWithAuth("/api/image/upload",{method:"POST",body:i});if(413===s.status)throw new Error(`Uploaded image is too large (${e.name})`);if(200!==s.status)throw new Error("Unknown error");return s.json()},l=(t,e)=>t.callWS({type:"image/delete",image_id:e}),h=async t=>{const e=await fetch(t);if(!e.ok)throw new Error(`Failed to fetch image: ${e.statusText?e.statusText:e.status}`);return e.blob()}},93958:function(t,e,i){i.d(e,{F:()=>c});var s=i("9065"),n=i("50778"),o=i("92444"),a=i("76688");let r=class extends o.A{};r.styles=[a.W],r=(0,s.gn)([(0,n.Mo)("mwc-checkbox")],r);var l=i("57243"),h=i("35359"),d=i("65703");class c extends d.K{constructor(){super(...arguments),this.left=!1,this.graphic="control"}render(){const t={"mdc-deprecated-list-item__graphic":this.left,"mdc-deprecated-list-item__meta":!this.left},e=this.renderText(),i=this.graphic&&"control"!==this.graphic&&!this.left?this.renderGraphic():l.dy``,s=this.hasMeta&&this.left?this.renderMeta():l.dy``,n=this.renderRipple();return l.dy` ${n} ${i} ${this.left?"":e} <span class="${(0,h.$)(t)}"> <mwc-checkbox reducedTouchTarget tabindex="${this.tabindex}" .checked="${this.selected}" ?disabled="${this.disabled}" @change="${this.onChange}"> </mwc-checkbox> </span> ${this.left?e:""} ${s}`}async onChange(t){const e=t.target;this.selected===e.checked||(this._skipPropRequest=!0,this.selected=e.checked,await this.updateComplete,this._skipPropRequest=!1)}}(0,s.gn)([(0,n.IO)("slot")],c.prototype,"slotElement",void 0),(0,s.gn)([(0,n.IO)("mwc-checkbox")],c.prototype,"checkboxElement",void 0),(0,s.gn)([(0,n.Cb)({type:Boolean})],c.prototype,"left",void 0),(0,s.gn)([(0,n.Cb)({type:String,reflect:!0})],c.prototype,"graphic",void 0)},97536:function(t,e,i){i.d(e,{W:function(){return s}});const s=i(57243).iv`:host(:not([twoline])){height:56px}:host(:not([left])) .mdc-deprecated-list-item__meta{height:40px;width:40px}`},15108:function(t,e,i){i.d(e,{jt:()=>_});i("92745"),i("39527"),i("92181"),i("99790"),i("41360"),i("13334");var s=i("2841"),n=i("45779"),o=i("67753");i("92519"),i("42179"),i("89256"),i("24931"),i("88463"),i("57449"),i("19814"),i("36993");const a=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},u=(t,e)=>{const i=t/e;return 1===i?void 0:i},p={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=u(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=u(t,e);return{value:s,overrideFrom:i,transform:null==s||isNaN(s)?void 0:`scaleY(${s})`}}},m={duration:333,easing:"ease-in-out"},g=["left","top","width","height","opacity","color","background"],f=new WeakMap;class v extends o.sR{constructor(t){if(super(t),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,t.type===n.pX.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){this.resolveFinished?.(),this.finished=new Promise((t=>{this.l=t}))}async resolveFinished(){this.l?.(),this.l=void 0}render(t){return s.Ld}getController(){return a.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,f.set(this.element,this)),this.optionsOrCallback=e,(i||"function"!=typeof e)&&this.p(e),this.render(e)}p(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}m(){const t={},e=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach((s=>{const n=e[s]??(p[s]?void 0:i[s]),o=Number(n);t[s]=isNaN(o)?n+"":o})),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.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),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.O(),i=this.j(this.options.keyframeOptions,e),s=this.m();if(void 0!==this.A){const{from:i,to:n}=this.N(this.A,s,e);this.log("measured",[this.A,s,i,n]),t=this.calculateKeyframes(i,n)}else{const i=l.get(this.options.inId);if(i){l.delete(this.options.inId);const{from:n,to:o}=this.N(i,s,e);t=this.calculateKeyframes(n,o),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.P&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){this.P=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.m();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.j(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()}O(){const t=[];for(let e=this.element.parentNode;e;e=e?.parentNode){const i=f.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}j(t,e=this.O()){const i={...m};return e.forEach((t=>Object.assign(i,t.options.keyframeOptions))),Object.assign(i,t),i}N(t,e,i){t={...t},e={...e};const s=i.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let n=1,o=1;return s.length>0&&(s.forEach((t=>{t.width&&(n/=t.width),t.height&&(o/=t.height)})),void 0!==t.left&&void 0!==e.left&&(t.left=n*t.left,e.left=n*e.left),void 0!==t.top&&void 0!==e.top&&(t.top=o*t.top,e.top=o*e.top)),{from:t,to:e}}calculateKeyframes(t,e,i=!1){const s={},n={};let o=!1;const a={};for(const i in e){const r=t[i],l=e[i];if(i in p){const t=p[i];if(void 0===r||void 0===l)continue;const e=t(r,l);void 0!==e.transform&&(a[i]=e.value,o=!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&&(o=!0,s[i]=r,n[i]=l)}return s.transformOrigin=n.transformOrigin=i?"center center":"top left",this.animatingProperties=a,o?[s,n]: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)}}const _=(0,n.XM)(v),y=["top","right","bottom","left"];class k extends o.sR{constructor(t){if(super(t),t.type!==n.pX.ELEMENT)throw Error("The `position` directive must be used in attribute position.")}render(t,e){return s.Ld}update(t,[e,i]){return void 0===this.u&&(this.u=t.options?.host,this.u.addController(this)),this.S=t.element,this.C=e,this.F=i??["left","top","width","height"],this.render(e,i)}hostUpdated(){this.$()}$(){const t="function"==typeof this.C?this.C():this.C?.value,e=t.offsetParent;if(void 0===t||!e)return;const i=t.getBoundingClientRect(),s=e.getBoundingClientRect();this.F?.forEach((t=>{const e=y.includes(t)?i[t]-s[t]:i[t];this.S.style[t]=e+"px"}))}}(0,n.XM)(k)},91583:function(t,e,i){i.d(e,{r:()=>r});var s=i("2841"),n=i("45779"),o=i("53232");const a=(t,e,i)=>{const s=new Map;for(let n=e;n<=i;n++)s.set(t[n],n);return s},r=(0,n.XM)(class extends n.Xe{constructor(t){if(super(t),t.type!==n.pX.CHILD)throw Error("repeat() can only be used in text expressions")}ct(t,e,i){let s;void 0===i?i=e:void 0!==e&&(s=e);const n=[],o=[];let a=0;for(const e of t)n[a]=s?s(e,a):a,o[a]=i(e,a),a++;return{values:o,keys:n}}render(t,e,i){return this.ct(t,e,i).values}update(t,[e,i,n]){var r;const l=(0,o.i9)(t),{values:h,keys:d}=this.ct(e,i,n);if(!Array.isArray(l))return this.ut=d,h;const c=null!==(r=this.ut)&&void 0!==r?r:this.ut=[],u=[];let p,m,g=0,f=l.length-1,v=0,_=h.length-1;for(;g<=f&&v<=_;)if(null===l[g])g++;else if(null===l[f])f--;else if(c[g]===d[v])u[v]=(0,o.fk)(l[g],h[v]),g++,v++;else if(c[f]===d[_])u[_]=(0,o.fk)(l[f],h[_]),f--,_--;else if(c[g]===d[_])u[_]=(0,o.fk)(l[g],h[_]),(0,o._Y)(t,u[_+1],l[g]),g++,_--;else if(c[f]===d[v])u[v]=(0,o.fk)(l[f],h[v]),(0,o._Y)(t,l[g],l[f]),f--,v++;else if(void 0===p&&(p=a(d,v,_),m=a(c,g,f)),p.has(c[g]))if(p.has(c[f])){const e=m.get(d[v]),i=void 0!==e?l[e]:null;if(null===i){const e=(0,o._Y)(t,l[g]);(0,o.fk)(e,h[v]),u[v]=e}else u[v]=(0,o.fk)(i,h[v]),(0,o._Y)(t,l[g],i),l[e]=null;v++}else(0,o.ws)(l[f]),f--;else(0,o.ws)(l[g]),g++;for(;v<=_;){const e=(0,o._Y)(t,u[_+1]);(0,o.fk)(e,h[v]),u[v++]=e}for(;g<=f;){const t=l[g++];null!==t&&(0,o.ws)(t)}return this.ut=d,(0,o.hl)(t,u),s.Jb}})}};
//# sourceMappingURL=9375.d94a026f9fb042c9.js.map