"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["76023"],{50248:function(t,e,n){n.d(e,{n:function(){return a}});const a=(t=document)=>{var e;return null!==(e=t.activeElement)&&void 0!==e&&null!==(e=e.shadowRoot)&&void 0!==e&&e.activeElement?a(t.activeElement.shadowRoot):t.activeElement}},91926:function(t,e,n){n.d(e,{O:function(){return s},o:function(){return l}});n(3362),n(27495),n(25440);var a=n(22444),r=n(1087),o=n(63091);const i=async t=>{var e;const{history:n}=o.G;if(null===(e=n.state)||void 0===e||!e.dialog||Date.now()-t>=500)return!0;return await(0,a.Jh)()?(await new Promise(t=>{setTimeout(t)}),i(t)):(console.warn("Navigation blocked, because dialog refused to close"),!1)},l=async(t,e)=>{if(!(await i(Date.now())))return!1;const n=(null==e?void 0:e.replace)||!1;var a,l,s;return n?o.G.history.replaceState(null!==(a=o.G.history.state)&&void 0!==a&&a.root?{root:!0}:null!==(l=null==e?void 0:e.data)&&void 0!==l?l:null,"",t):o.G.history.pushState(null!==(s=null==e?void 0:e.data)&&void 0!==s?s:null,"",t),(0,r.r)(o.G,"location-changed",{replace:n}),!0},s=async t=>{if(!(await i(Date.now())))return;const{history:e}=o.G;if(e.length>1)return void e.back();l(t||"/",{replace:!0})}},12587:function(t,e,n){n.d(e,{E:function(){return r},m:function(){return a}});n(3362);const a=t=>{requestAnimationFrame(()=>setTimeout(t,0))},r=()=>new Promise(t=>{a(t)})},2846:function(t,e,n){n.d(e,{G:function(){return u},J:function(){return h}});var a=n(40445),r=n(12415),o=n(82553),i=n(96196),l=n(77845);n(54276);let s,c,d=t=>t;const h=[o.R,(0,i.AH)(s||(s=d`:host{--ha-icon-display:block;--md-sys-color-primary:var(--primary-text-color);--md-sys-color-secondary:var(--secondary-text-color);--md-sys-color-surface:var(--card-background-color);--md-sys-color-on-surface:var(--primary-text-color);--md-sys-color-on-surface-variant:var(--secondary-text-color)}md-item{overflow:var(--md-item-overflow,hidden);align-items:var(--md-item-align-items,center);gap:var(--ha-md-list-item-gap,16px)}`))];class u extends r.n{renderRipple(){return"text"===this.type?i.s6:(0,i.qy)(c||(c=d`<ha-ripple part="ripple" for="item" ?disabled="${0}"></ha-ripple>`),this.disabled&&"link"!==this.type)}}u.styles=h,u=(0,a.Cg)([(0,l.EM)("ha-md-list-item")],u)},54276:function(t,e,n){n(62953);var a=n(40445),r=n(76482),o=n(91382),i=n(96245),l=n(96196),s=n(77845);let c;class d extends o.n{attach(t){super.attach(t),this.attachableTouchController.attach(t)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(t,e){null==t||t.removeEventListener("touchend",this._handleTouchEnd),null==e||e.addEventListener("touchend",this._handleTouchEnd)}constructor(...t){super(...t),this.attachableTouchController=new r.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}d.styles=[i.R,(0,l.AH)(c||(c=(t=>t)`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var(
          --ha-ripple-hover-color,
          var(--ha-ripple-color, var(--secondary-text-color))
        );--md-ripple-pressed-color:var(
          --ha-ripple-pressed-color,
          var(--ha-ripple-color, var(--secondary-text-color))
        )}`))],d=(0,a.Cg)([(0,s.EM)("ha-ripple")],d)},34127:function(t,e,n){n.a(t,async function(t,e){try{n(62953);var a=n(40445),r=n(52630),o=n(96196),i=n(77845),l=t([r]);r=(l.then?(await l)():l)[0];let s,c=t=>t;class d extends r.A{static get styles(){return[r.A.styles,(0,o.AH)(s||(s=c`:host{--wa-tooltip-background-color:var(
            --ha-tooltip-background-color,
            var(--secondary-background-color)
          );--wa-tooltip-content-color:var(
            --ha-tooltip-text-color,
            var(--primary-text-color)
          );--wa-tooltip-font-family:var(
            --ha-tooltip-font-family,
            var(--ha-font-family-body)
          );--wa-tooltip-font-size:var(
            --ha-tooltip-font-size,
            var(--ha-font-size-s)
          );--wa-tooltip-font-weight:var(
            --ha-tooltip-font-weight,
            var(--ha-font-weight-normal)
          );--wa-tooltip-line-height:var(
            --ha-tooltip-line-height,
            var(--ha-line-height-condensed)
          );--wa-tooltip-padding:var(--ha-tooltip-padding, var(--ha-space-2));--wa-tooltip-border-radius:var(
            --ha-tooltip-border-radius,
            var(--ha-border-radius-sm)
          );--wa-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 8px);--wa-tooltip-border-width:0px;--wa-z-index-tooltip:1000}`))]}constructor(...t){super(...t),this.showDelay=150,this.hideDelay=150}}(0,a.Cg)([(0,i.MZ)({attribute:"show-delay",type:Number})],d.prototype,"showDelay",void 0),(0,a.Cg)([(0,i.MZ)({attribute:"hide-delay",type:Number})],d.prototype,"hideDelay",void 0),d=(0,a.Cg)([(0,i.EM)("ha-tooltip")],d),e()}catch(s){e(s)}})},77423:function(t,e,n){n.d(e,{A:function(){return r},Cm:function(){return o},Fs:function(){return y},JW:function(){return m},TC:function(){return s},VN:function(){return c},Vx:function(){return d},XQ:function(){return f},eM:function(){return u},iH:function(){return h},k3:function(){return p},m4:function(){return i},qf:function(){return l},t0:function(){return a},yv:function(){return g}});n(44114),n(18111),n(22489),n(20116),n(7588),n(61701),n(62953);const a=(t,e)=>t.callWS({type:"config_entries/subentries/list",entry_id:e}),r=(t,e,n,a)=>t.callWS(Object.assign({type:"config_entries/subentries/update",entry_id:e,subentry_id:n},a)),o=(t,e,n)=>t.callWS({type:"config_entries/subentries/delete",entry_id:e,subentry_id:n}),i=66649!=n.j?["migration_error","setup_error","setup_retry"]:null,l=66649!=n.j?["not_loaded","loaded","setup_error","setup_retry"]:null,s=(t,e,n)=>{const a={type:"config_entries/subscribe"};return n&&n.type&&(a.type_filter=n.type),t.connection.subscribeMessage(t=>{e(t)},a)},c=(t,e)=>{const n={};return e&&(e.type&&(n.type_filter=e.type),e.domain&&(n.domain=e.domain)),t.callWS(Object.assign({type:"config_entries/get"},n))},d=(t,e)=>t.callWS({type:"config_entries/get_single",entry_id:e}),h=(t,e,n)=>t.callWS(Object.assign({type:"config_entries/update",entry_id:e},n)),u=(t,e)=>t.callApi("DELETE",`config/config_entries/entry/${e}`),g=(t,e)=>t.callApi("POST",`config/config_entries/entry/${e}/reload`),f=(t,e)=>t.callWS({type:"config_entries/disable",entry_id:e,disabled_by:"user"}),p=(t,e)=>t.callWS({type:"config_entries/disable",entry_id:e,disabled_by:null}),m=(t,e)=>{if(!e)return t;const n=t.find(t=>t.entry_id===e);if(!n)return t;return[n,...t.filter(t=>t.entry_id!==e)]};class y{processMessage(t){return t.forEach(t=>{if(null!==t.type&&"added"!==t.type)if("removed"!==t.type){if("updated"===t.type){const e=t.entry;this._entries=this._entries.map(t=>t.entry_id===e.entry_id?e:t)}}else this._entries=this._entries.filter(e=>e.entry_id!==t.entry.entry_id);else this._entries.push(t.entry)}),this._entries}constructor(){this._entries=[]}}},59241:function(t,e,n){n.d(e,{BM:function(){return A},Bz:function(){return E},DW:function(){return p},Er:function(){return f},G3:function(){return v},G_:function(){return b},Ox:function(){return S},P9:function(){return T},RP:function(){return x},bg:function(){return w},fs:function(){return h},jh:function(){return m},n4:function(){return z},oY:function(){return d},v:function(){return y},z0:function(){return u}});n(74423),n(26910),n(18111),n(22489),n(20116),n(62953);var a=n(70570),r=n(22786),o=n(71727),i=n(28978),l=n(52220),s=n(9899);const c=66649!=n.j?["light","cover","valve"]:null,d=t=>c.includes(t),h=t=>null==t||t.length>0,u=t=>null!=t,g=["sensor","binary_sensor"],f=(t,e)=>{const n=e.filter(e=>t.states[e.entity_id]&&"battery"===t.states[e.entity_id].attributes.device_class&&g.includes((0,o.m)(e.entity_id))).sort((t,e)=>g.indexOf((0,o.m)(t.entity_id))-g.indexOf((0,o.m)(e.entity_id)));if(n.length>0)return n[0]},p=(t,e)=>e.find(e=>t.states[e.entity_id]&&"battery_charging"===t.states[e.entity_id].attributes.device_class),m=(t,e)=>{if(e.name)return e.name;const n=t.states[e.entity_id];return n?(0,i.u)(n):e.original_name?e.original_name:e.entity_id},y=(t,e)=>t.callWS({type:"config/entity_registry/get",entity_id:e}),v=(t,e)=>t.callWS({type:"config/entity_registry/get_entries",entity_ids:e}),b=(t,e,n)=>t.callWS(Object.assign({type:"config/entity_registry/update",entity_id:e},n)),w=(t,e)=>t.callWS({type:"config/entity_registry/remove",entity_id:e}),_=t=>t.sendMessagePromise({type:"config/entity_registry/list"}),x=t=>t.sendMessagePromise({type:"config/entity_registry/list_for_display"}),k=(t,e)=>t.subscribeEvents((0,s.s)(()=>_(t).then(t=>e.setState(t,!0)),500,!0),"entity_registry_updated"),E=(t,e)=>(0,a.N)("_entityRegistry",_,k,t,e),z=(t,e)=>t.sort((t,n)=>(0,l.SH)(t.name||"",n.name||"",e)),S=(0,r.A)(t=>{const e={};for(const n of t)e[n.entity_id]=n;return e}),T=(0,r.A)(t=>{const e={};for(const n of t)e[n.id]=n;return e}),A=(t,e)=>t.callWS({type:"config/entity_registry/get_automatic_entity_ids",entity_ids:e})},65063:function(t,e,n){n.d(e,{an:function(){return s},dk:function(){return l},showAlertDialog:function(){return i}});n(3362),n(62953);var a=n(1087);const r=()=>Promise.all([n.e("72850"),n.e("33212"),n.e("46995"),n.e("123"),n.e("25094"),n.e("42310")]).then(n.bind(n,26683)),o=(t,e,n)=>new Promise(o=>{const i=e.cancel,l=e.confirm;(0,a.r)(t,"show-dialog",{dialogTag:"dialog-box",dialogImport:r,dialogParams:{...e,...n,cancel:()=>{o(!(null==n||!n.prompt)&&null),i&&i()},confirm:t=>{o(null==n||!n.prompt||t),l&&l(t)}}})}),i=(t,e)=>o(t,e),l=(t,e)=>o(t,e,{confirmation:!0}),s=(t,e)=>o(t,e,{prompt:!0})},22444:function(t,e,n){n.d(e,{oO:function(){return p},t3:function(){return u},zU:function(){return h},Jh:function(){return g},ui:function(){return d}});n(16280),n(44114),n(3362),n(62953),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698);const a=(t,e,n=true)=>{var r;if(!t||t===document.body)return null;if((t=null!==(r=t.assignedSlot)&&void 0!==r?r:t).parentElement)t=t.parentElement;else{const e=t.getRootNode();t=e instanceof ShadowRoot?e.host:null}return(n?Object.prototype.hasOwnProperty.call(t,e):t&&e in t)?t:a(t,e,n)};if(66649!=n.j)var r=n(50248);var o=n(63091),i=n(12587);const l={},s=[],c=Symbol.for("HA focus target"),d=async(t,e,n,i,h,u=!0)=>{if(!(e in l)){if(!i)return!1;l[e]={element:i().then(()=>{const n=document.createElement(e);return"showDialog"in n&&t.provideHass(n),n.addEventListener("dialog-closed",f),n.addEventListener("dialog-closed",m),n})}}if(u){var g,p;const{history:a}=o.G;if(null!==(g=a.state)&&void 0!==g&&g.dialog&&!s.length)return await new Promise(t=>{setTimeout(t)}),d(t,e,n,i,h,u);const r=s.findIndex(t=>t.dialogTag===e);-1!==r&&s.splice(r,1),s.push({element:t,dialogTag:e,dialogParams:n,dialogImport:i,addHistory:u});const l={dialog:e};null!==(p=a.state)&&void 0!==p&&p.dialog?a.replaceState(l,""):(a.replaceState(Object.assign(Object.assign({},a.state),{},{opensDialog:!0}),""),a.pushState(l,""))}let y;if(l[e].closedFocusTargets=((t,e,n=!0)=>{const r=new Set;for(;t;)r.add(t),t=a(t,e,n);return r})((0,r.n)(),c),l[e]&&null===l[e].element?(y=document.createElement(e),y.addEventListener("dialog-closed",f),y.addEventListener("dialog-closed",m),l[e].element=Promise.resolve(y)):y=await l[e].element,"dialogNext"in y&&y.dialogNext)y.params=n;else{if(!("showDialog"in y))throw new Error("Unknown dialog type loaded");y.showDialog(n)}const v=(h||t).shadowRoot;return y.parentNode!==v&&v.appendChild(y),!0},h=async(t,e)=>{if(!(t in l))return!0;const n=await l[t].element;return!n||!n.closeDialog||!1!==n.closeDialog(e)},u=async t=>{if(s.length){var e;const n=s.pop(),a=await h(n.dialogTag,t);return a?s.length&&null!==(e=o.G.history.state)&&void 0!==e&&e.opensDialog&&o.G.history.pushState({dialog:s[s.length-1].dialogTag},""):s.push(n),a}return!0},g=async()=>{for(let t=s.length-1;t>=0;t--){if(!(!s[t]||await h(s[t].dialogTag)))return!1}return!0},f=t=>{var e;const n=s.findIndex(e=>e.dialogTag===t.detail.dialog);if(-1!==n&&s.splice(n,1),(null===(e=o.G.history.state)||void 0===e?void 0:e.dialog)===t.detail.dialog&&(s.length?o.G.history.replaceState({dialog:s[s.length-1].dialogTag},""):-1!==n&&o.G.history.back()),t.currentTarget&&"params"in t.currentTarget){const e=t.currentTarget;e.removeEventListener("dialog-closed",f),e.removeEventListener("dialog-closed",m),l[t.detail.dialog].element=null}},p=t=>{t.addEventListener("show-dialog",e=>{const{dialogTag:n,dialogImport:a,dialogParams:r,addHistory:o,parentElement:i}=e.detail;d(t,n,r,a,i,o)})},m=async t=>{if(!l[t.detail.dialog])return;const e=l[t.detail.dialog].closedFocusTargets;if(delete l[t.detail.dialog].closedFocusTargets,!e)return;let n=(0,r.n)();n instanceof HTMLElement&&n.blur(),await(0,i.E)();for(const a of e)if(a instanceof HTMLElement&&(a.focus(),n=(0,r.n)(),n&&n!==document.body))return}},69235:function(t,e,n){n.a(t,async function(t,e){try{n(3362),n(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await n.e("71055").then(n.bind(n,52370))).default),e()}catch(a){e(a)}},1)},14503:function(t,e,n){n.d(e,{RF:function(){return u},dp:function(){return p},kO:function(){return f},nA:function(){return g},og:function(){return h}});var a=n(96196);let r,o,i,l,s,c,d=t=>t;const h=(0,a.AH)(r||(r=d`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),u=(0,a.AH)(o||(o=d`:host{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}.header{transition:box-shadow .2s linear,width var(--ha-animation-duration-normal) ease,padding-left var(--ha-animation-duration-normal) ease,padding-right var(--ha-animation-duration-normal) ease}@media (prefers-reduced-motion:reduce){.header{transition:box-shadow .2s linear}}h1{font-family:var(--ha-font-family-heading);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-2xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed)}h2{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-medium);line-height:var(--ha-line-height-normal)}h3{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-l);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}${0} .card-actions a{text-decoration:none}.card-actions .warning{--mdc-theme-primary:var(--error-color)}.layout.horizontal,.layout.vertical{display:flex}.layout.inline{display:inline-flex}.layout.horizontal{flex-direction:row}.layout.vertical{flex-direction:column}.layout.wrap{flex-wrap:wrap}.layout.no-wrap{flex-wrap:nowrap}.layout.center,.layout.center-center{align-items:center}.layout.bottom{align-items:flex-end}.layout.center-center,.layout.center-justified{justify-content:center}.flex{flex:1;flex-basis:0.000000001px}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.layout.justified{justify-content:space-between}`),h),g=(0,a.AH)(i||(i=d`ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between;--dialog-container-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--dialog-surface-padding:0px}ha-adaptive-dialog .form,ha-dialog .form{color:var(--primary-text-color)}a{color:var(--primary-color)}@media all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:100vw;--mdc-dialog-max-width:100vw;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--dialog-container-padding:0px;--dialog-surface-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--vertical-align-dialog:flex-end}ha-dialog{--ha-dialog-border-radius:var(--ha-border-radius-square)}}.error{color:var(--error-color)}`)),f=(0,a.AH)(l||(l=d`ha-adaptive-dialog,ha-dialog{--vertical-align-dialog:flex-start;--dialog-surface-margin-top:var(--ha-space-10);--mdc-dialog-max-height:calc(
      100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    );--mdc-dialog-max-height:calc(
      100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    );--ha-dialog-max-height:calc(
      100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    );--ha-dialog-max-height:calc(
      100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    )}@media all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--dialog-surface-margin-top:0px;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--ha-dialog-max-height:100vh;--ha-dialog-max-height:100svh}}`)),p=(0,a.AH)(s||(s=d`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{border-radius:var(--ha-border-radius-sm);background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`));(0,a.AH)(c||(c=d`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))},44144:function(t,e,n){n.d(e,{Cv:function(){return i},MR:function(){return d},QR:function(){return h},_c:function(){return c},a_:function(){return g},bg:function(){return f},yM:function(){return u}});n(18111),n(22489),n(3362),n(62953),n(3296),n(27208),n(48408),n(14603),n(47566),n(98721);let a,r;const o=66649!=n.j?18e5:null,i=t=>l(t).then(()=>s(t),()=>{}),l=async t=>{const e=await t.callWS({type:"brands/access_token"});a=e.token},s=t=>{c(),r=setInterval(()=>{l(t).catch(()=>{})},o)},c=()=>{r&&(clearInterval(r),r=void 0)},d=(t,e)=>{e=null!=e?e:location.origin;const n=`/api/brands/integration/${t.domain}/${t.darkOptimized?"dark_":""}${t.type}.png`,r=new URL(n,e);return a&&r.searchParams.set("token",a),r.toString()},h=(t,e)=>{e=null!=e?e:location.origin;const n=`/api/brands/hardware/${t.category}/${t.darkOptimized?"dark_":""}${t.manufacturer}${t.model?`_${t.model}`:""}.png`,r=new URL(n,e);return a&&r.searchParams.set("token",a),r.toString()},u=(t,e)=>{if(e=null!=e?e:location.origin,!a)return t;try{const n=new URL(t,e);return n.pathname.startsWith("/api/brands/")?(n.searchParams.set("token",a),n.toString()):t}catch{return t}},g=t=>{var e;const n=new URL(t,location.origin);if(n.pathname.startsWith("/api/brands/"))return n.pathname.split("/")[4];const a=n.pathname.split("/").filter(t=>t.length>0),r=a.indexOf("_");return-1!==r&&r+1<a.length?a[r+1]:null!==(e=a[1])&&void 0!==e?e:""},f=t=>{try{return new URL(t,location.origin).pathname.startsWith("/api/brands/")||t.startsWith("https://brands.home-assistant.io/")}catch{return!1}}}}]);
//# sourceMappingURL=76023.d7817f6287c87a3f.js.map