export const id=7948;export const ids=[7948];export const modules={60015:(r,e,t)=>{t.d(e,{KH:()=>i,px:()=>s});t(253),t(54846),t(74860),t(71011),t(71174);var o=t(61582);const s=()=>{const r={},e=new URLSearchParams(o.G.location.search);for(const[t,o]of e.entries())r[t]=o;return r},i=r=>{const e=new URLSearchParams;return Object.entries(r).forEach((([r,t])=>{e.append(r,t)})),e.toString()}},97948:(r,e,t)=>{t.r(e),t.d(e,{REDIRECTS:()=>c});var o=t(36312),s=t(66360),i=t(29818),a=t(83443),n=t(60015);t(51969);const c={hacs_repository:{redirect:"/hacs/repository",params:{owner:"string",repository:"string",category:"string?"}}};(0,o.A)([(0,i.EM)("hacs-my-redirect")],(function(r,e){return{F:class extends e{constructor(...e){super(...e),r(this)}},d:[{kind:"field",decorators:[(0,i.MZ)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,i.MZ)({attribute:!1})],key:"hacs",value:void 0},{kind:"field",decorators:[(0,i.MZ)({attribute:!1})],key:"route",value:void 0},{kind:"field",decorators:[(0,i.wk)()],key:"_error",value:void 0},{kind:"method",key:"firstUpdated",value:function(r){const e=this.route.path.indexOf("/",1),t=this.route.path.substr(e+1),o=c[t];if(!o)return void(this._error=this.hacs.localize("my.not_supported",{link:s.qy`<a target="_blank" rel="noreferrer noopener" href="https://my.home-assistant.io/faq.html#supported-pages"> ${this.hacs.localize("my.faq_link")} </a>`}));let i;try{i=this._createRedirectUrl(o)}catch(r){return void(this._error=this.hacs.localize("my.error"))}(0,a.o)(i,{replace:!0})}},{kind:"method",key:"render",value:function(){return this._error?s.qy`<hass-error-screen .error="${this._error}"></hass-error-screen>`:s.s6}},{kind:"method",key:"_createRedirectUrl",value:function(r){const e=this._createRedirectParams(r);return`${r.redirect}${e}`}},{kind:"method",key:"_createRedirectParams",value:function(r){const e=(0,n.px)();if(!r.params&&!Object.keys(e).length)return"";const t={};for(const[o,s]of Object.entries(r.params||{}))if(e[o]||!s.endsWith("?")){if(!e[o]||!this._checkParamType(s,e[o]))throw Error();t[o]=e[o]}return`?${(0,n.KH)(t)}`}},{kind:"method",key:"_checkParamType",value:function(r,e){return"string"===r||"string?"===r}}]}}),s.WF)}};
//# sourceMappingURL=7948.fLVzV2r24is.js.map