export const id=9015;export const ids=[9015];export const modules={85763:(e,t,o)=>{o.d(t,{Q2:()=>a,ou:()=>i});var r=o(67684);const a=()=>{const e={},t=new URLSearchParams(r.E.location.search);for(const[o,r]of t.entries())e[o]=r;return e},i=e=>{const t=new URLSearchParams;return Object.entries(e).forEach((([e,o])=>{t.append(e,o)})),t.toString()}},50057:(e,t,o)=>{var r=o(309),a=(o(34131),o(18846)),i=o(95260);(0,r.Z)([(0,i.Mo)("ha-chip-set")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[]}}),a.l)},68336:(e,t,o)=>{var r=o(309),a=o(5095),i=o(95260);(0,r.Z)([(0,i.Mo)("ha-card")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,i.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,i.Cb)({type:Boolean,reflect:!0})],key:"raised",value:()=>!1},{kind:"get",static:!0,key:"styles",value:function(){return a.iv`:host{background:var(--ha-card-background,var(--card-background-color,#fff));box-shadow:var(--ha-card-box-shadow,none);box-sizing:border-box;border-radius:var(--ha-card-border-radius,12px);border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,--primary-text-color);font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, 24px);letter-spacing:-.012em;line-height:48px;padding:12px 16px 16px;display:block;margin-block-start:0px;margin-block-end:0px;font-weight:400}:host ::slotted(.card-content:not(:first-child)),slot:not(:first-child)::slotted(.card-content){padding-top:0px;margin-top:-8px}:host ::slotted(.card-content){padding:16px}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:5px 16px}`}},{kind:"method",key:"render",value:function(){return a.dy` ${this.header?a.dy`

${this.header}

`:a.Ld} `}}]}}),a.oi)},7006:(e,t,o)=>{var r=o(309),a=o(34541),i=o(47838),s=(o(34131),o(22129)),n=o(5095),l=o(95260);(0,r.Z)([(0,l.Mo)("ha-circular-progress")],(function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,l.Cb)({attribute:"aria-label",type:String})],key:"ariaLabel",value:()=>"Loading"},{kind:"field",decorators:[(0,l.Cb)()],key:"size",value:()=>"medium"},{kind:"method",key:"updated",value:function(e){if((0,a.Z)((0,i.Z)(o.prototype),"updated",this).call(this,e),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--md-circular-progress-size","16px");break;case"small":this.style.setProperty("--md-circular-progress-size","28px");break;case"medium":this.style.setProperty("--md-circular-progress-size","48px");break;case"large":this.style.setProperty("--md-circular-progress-size","68px")}}},{kind:"get",static:!0,key:"styles",value:function(){return[...(0,a.Z)((0,i.Z)(o),"styles",this),n.iv`:host{--md-sys-color-primary:var(--primary-color);--md-circular-progress-size:48px}`]}}]}}),s.B)},84776:(e,t,o)=>{o.r(t);var r=o(309),a=o(5095),i=o(95260),s=(o(7006),o(33358),o(73957),o(29950));(0,r.Z)([(0,i.Mo)("hass-loading-screen")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,i.Cb)({type:Boolean,attribute:"no-toolbar"})],key:"noToolbar",value:()=>!1},{kind:"field",decorators:[(0,i.Cb)({type:Boolean})],key:"rootnav",value:()=>!1},{kind:"field",decorators:[(0,i.Cb)({type:Boolean})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,i.Cb)()],key:"message",value:void 0},{kind:"method",key:"render",value:function(){var e;return a.dy` ${this.noToolbar?"":a.dy`
${this.rootnav||null!==(e=history.state)&&void 0!==e&&e.root?a.dy` `:a.dy` `}
`}
${this.message?a.dy`
${this.message}
`:a.Ld}
`}},{kind:"method",key:"_handleBack",value:function(){history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return[s.Qx,a.iv`:host{display:block;height:100%;background-color:var(--primary-background-color)}.toolbar{display:flex;align-items:center;font-size:20px;height:var(--header-height);padding:8px 12px;pointer-events:none;background-color:var(--app-header-background-color);font-weight:400;color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box}@media (max-width:599px){.toolbar{padding:4px}}ha-icon-button-arrow-prev,ha-menu-button{pointer-events:auto}.content{height:calc(100% - var(--header-height));display:flex;flex-direction:column;align-items:center;justify-content:center}#loading-text{max-width:350px;margin-top:16px}`]}}]}}),a.oi)},49015:(e,t,o)=>{o.r(t),o.d(t,{HacsRepositoryDashboard:()=>w});var r=o(309),a=o(34541),i=o(47838),s=o(5095),n=o(95260),l=o(14516),c=o(67684),d=o(85763),h=(o(68336),o(50057),o(34131),o(10996));(0,r.Z)([(0,n.Mo)("ha-assist-chip")],(function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"filled",value:()=>!1},{kind:"field",static:!0,key:"styles",value(){return[...(0,a.Z)((0,i.Z)(o),"styles",this),s.iv`:host{--md-sys-color-primary:var(--primary-text-color);--md-sys-color-on-surface:var(--primary-text-color);--md-assist-chip-container-shape:16px;--md-assist-chip-outline-color:var(--outline-color);--md-assist-chip-label-text-weight:400;--ha-assist-chip-filled-container-color:rgba( var(--rgb-primary-text-color), 0.15 )}.filled{display:flex;pointer-events:none;border-radius:inherit;inset:0;position:absolute;background-color:var(--ha-assist-chip-filled-container-color)}::slotted([slot=icon]){display:flex;--mdc-icon-size:var(--md-input-chip-icon-size, 18px)}`]}},{kind:"method",key:"renderOutline",value:function(){return this.filled?s.dy``:(0,a.Z)((0,i.Z)(o.prototype),"renderOutline",this).call(this)}}]}}),h.X);o(99040),o(62082),o(21162);var p=o(11285),u=(o(11908),o(84776),o(47715));var y=o(51750),b=(o(33358),o(73957),o(29950));(0,r.Z)([(0,n.Mo)("hass-subpage")],(function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,attribute:"main-page"})],key:"mainPage",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:String,attribute:"back-path"})],key:"backPath",value:void 0},{kind:"field",decorators:[(0,n.Cb)()],key:"backCallback",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"supervisor",value:()=>!1},{kind:"field",decorators:[(0,u.i)(".content")],key:"_savedScrollPos",value:void 0},{kind:"method",key:"willUpdate",value:function(e){if((0,a.Z)((0,i.Z)(o.prototype),"willUpdate",this).call(this,e),!e.has("hass"))return;const t=e.get("hass");var r,s,n;t&&t.locale===this.hass.locale||(r=this,s="rtl",void 0!==(n=(0,y.HE)(this.hass))&&(n=!!n),r.hasAttribute(s)?n||r.removeAttribute(s):!1!==n&&r.setAttribute(s,""))}},{kind:"method",key:"render",value:function(){var e;return s.dy`
${this.mainPage||null!==(e=history.state)&&void 0!==e&&e.root?s.dy` `:this.backPath?s.dy` `:s.dy` `}
${this.header}
`}},{kind:"method",decorators:[(0,n.hO)({passive:!0})],key:"_saveScrollPos",value:function(e){this._savedScrollPos=e.target.scrollTop}},{kind:"method",key:"_backTapped",value:function(){this.backCallback?this.backCallback():history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return[b.$c,s.iv`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{display:flex;align-items:center;font-size:20px;height:var(--header-height);padding:8px 12px;background-color:var(--app-header-background-color);font-weight:400;color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box}@media (max-width:599px){.toolbar{padding:4px}}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin:0 0 0 24px;line-height:20px;flex-grow:1}.content{position:relative;width:100%;height:calc(100% - 1px - var(--header-height));overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}#fab{position:absolute;right:calc(16px + env(safe-area-inset-right));bottom:calc(16px + env(safe-area-inset-bottom));z-index:1}:host([narrow]) #fab.tabs{bottom:calc(84px + env(safe-area-inset-bottom))}#fab[is-wide]{bottom:24px;right:24px}:host([rtl]) #fab{right:auto;left:calc(16px + env(safe-area-inset-left))}:host([rtl][is-wide]) #fab{bottom:24px;left:24px;right:auto}`]}}]}}),s.oi);var v=o(33367),f=o(90012),g=o(8179),m=o(46797),k=o(61422);const x=e=>e.toLowerCase().includes(".md")||e.toLowerCase().includes(".markdown");let w=(0,r.Z)([(0,n.Mo)("hacs-repository-dashboard")],(function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hacs",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"narrow",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"isWide",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"route",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_repository",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_error",value:void 0},{kind:"method",key:"connectedCallback",value:function(){(0,a.Z)((0,i.Z)(o.prototype),"connectedCallback",this).call(this),document.body.addEventListener("keydown",this._generateMyLink)}},{kind:"method",key:"disconnectedCallback",value:function(){(0,a.Z)((0,i.Z)(o.prototype),"disconnectedCallback",this).call(this),document.body.removeEventListener("keydown",this._generateMyLink)}},{kind:"field",key:"_generateMyLink",value(){return e=>{if(!(e.ctrlKey||e.shiftKey||e.metaKey||e.altKey)&&"m"===e.key&&c.E.location.pathname.startsWith("/hacs/repository/")){if(!this._repository)return;const e=new URLSearchParams({redirect:"hacs_repository",owner:this._repository.full_name.split("/")[0],repository:this._repository.full_name.split("/")[1],category:this._repository.category});window.open(`https://my.home-assistant.io/create-link/?${e.toString()}`,"_blank")}}}},{kind:"method",key:"firstUpdated",value:async function(e){(0,a.Z)((0,i.Z)(o.prototype),"firstUpdated",this).call(this,e);const t=(0,d.Q2)();if(Object.entries(t).length){let e;const o=`${t.owner}/${t.repository}`;if(e=this.hacs.repositories.find((e=>e.full_name.toLocaleLowerCase()===o.toLocaleLowerCase())),!e&&t.category){if(!await(0,p.g7)(this,{title:this.hacs.localize("my.add_repository_title"),text:this.hacs.localize("my.add_repository_description",{repository:o}),confirmText:this.hacs.localize("common.add"),dismissText:this.hacs.localize("common.cancel")}))return void(this._error=this.hacs.localize("my.repository_not_found",{repository:o}));try{await(0,m.NA)(this.hass,o,t.category),this.hacs.repositories=await(0,m.ER)(this.hass),e=this.hacs.repositories.find((e=>e.full_name.toLocaleLowerCase()===o.toLocaleLowerCase()))}catch(e){return void(this._error=e)}}e?this._fetchRepository(String(e.id)):this._error=this.hacs.localize("my.repository_not_found",{repository:o})}else{const e=this.route.path.indexOf("/",1),t=this.route.path.substr(e+1);if(!t)return void(this._error="Missing repositoryId from route");this._fetchRepository(t)}}},{kind:"method",key:"updated",value:function(e){(0,a.Z)((0,i.Z)(o.prototype),"updated",this).call(this,e),e.has("repositories")&&this._repository&&this._fetchRepository()}},{kind:"method",key:"_fetchRepository",value:async function(e){try{this._repository=await(0,g.nj)(this.hass,e||String(this._repository.id))}catch(e){this._error=null==e?void 0:e.message}}},{kind:"field",key:"_getAuthors",value:()=>(0,l.Z)((e=>{const t=[];if(!e.authors)return t;if(e.authors.forEach((e=>t.push(e.replace("@","")))),0===t.length){const o=e.full_name.split("/")[0];if(["custom-cards","custom-components","home-assistant-community-themes"].includes(o))return t;t.push(o)}return t}))},{kind:"method",key:"render",value:function(){if(this._error)return s.dy``;if(!this._repository)return s.dy``;const e=this._getAuthors(this._repository);return s.dy`
${this._repository.installed?s.dy` `:""} ${e?e.map((e=>s.dy` @${e} `)):""} ${this._repository.downloads?s.dy` `:""} ${this._repository.stars} ${this._repository.issues} {const o=e.replace(/^#/,`${t.full_name}#`),[r,a]=o.split("#");return`[${e}](https://github.com/${r}/issues/${a})`}))),e.replace(/[^(]https:\/\/github\.com\/\S*\/commit\/([0-9a-f]{40})/g,((e,t)=>`[\`${t.substr(0,7)}\`](${e})`))))(this._repository.additional_info,this._repository)||this.hacs.localize("dialog_info.no_info")}">
${this._repository.installed_version?"":s.dy` `}
`}},{kind:"method",key:"_downloadRepositoryDialog",value:function(){(0,v.px)(this,{hacs:this.hacs,repositoryId:this._repository.id,repository:this._repository})}},{kind:"get",static:!0,key:"styles",value:function(){return[k.w,s.iv`hass-loading-screen{--app-header-background-color:var(--sidebar-background-color);--app-header-text-color:var(--sidebar-text-color);height:100vh}hass-subpage{position:absolute;width:100vw}ha-svg-icon{color:var(--hcv-text-color-on-background)}ha-fab{position:fixed;float:right;right:calc(18px + env(safe-area-inset-right));bottom:calc(16px + env(safe-area-inset-bottom));z-index:1}ha-fab.rtl{float:left;right:auto;left:calc(18px + env(safe-area-inset-left))}ha-card{display:block;padding:16px}.content{margin:auto;padding:8px;max-width:1536px}ha-chip-set{padding-bottom:8px}@media all and (max-width:500px){.content{margin:8px 4px 64px;max-width:none}}`]}}]}}),s.oi)},8179:(e,t,o)=>{o.d(t,{hZ:()=>a,nj:()=>r,zD:()=>i});const r=async(e,t)=>e.connection.sendMessagePromise({type:"hacs/repository/info",repository_id:t}),a=async(e,t,o)=>e.connection.sendMessagePromise({type:"hacs/repository/download",repository:t,version:o}),i=async(e,t,o)=>e.connection.sendMessagePromise({type:"hacs/repository/version",repository:t,version:o})}}; //# sourceMappingURL=9015.9F46dbqUmvU.js.map