UNPKG

iobroker.lovelace

Version:

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

6 lines 26.9 kB
/*! For license information please see 72931.a7389e123566ea99.js.LICENSE.txt */ export const __webpack_ids__=["72931"];export const __webpack_modules__={29095:function(e,t,i){i.a(e,(async function(e,t){try{var n=i(44249),o=i(57243),r=i(15093),s=(i(59826),i(17170)),a=(i(37583),e([s]));s=(a.then?(await a)():a)[0];const l="M2.2,16.06L3.88,12L2.2,7.94L6.26,6.26L7.94,2.2L12,3.88L16.06,2.2L17.74,6.26L21.8,7.94L20.12,12L21.8,16.06L17.74,17.74L16.06,21.8L12,20.12L7.94,21.8L6.26,17.74L2.2,16.06M13,17V15H11V17H13M13,13V7H11V13H13Z",d="M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z";(0,n.Z)([(0,r.Mo)("ha-progress-button")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,r.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"progress",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"raised",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"unelevated",value:()=>!1},{kind:"field",decorators:[(0,r.SB)()],key:"_result",value:void 0},{kind:"method",key:"render",value:function(){const e=this._result||this.progress;return o.dy` <ha-button .raised="${this.raised}" .label="${this.label}" .unelevated="${this.unelevated}" .disabled="${this.disabled||this.progress}" class="${this._result||""}"> <slot name="icon" slot="icon"></slot> <slot></slot> </ha-button> ${e?o.dy` <div class="progress"> ${"success"===this._result?o.dy`<ha-svg-icon .path="${d}"></ha-svg-icon>`:"error"===this._result?o.dy`<ha-svg-icon .path="${l}"></ha-svg-icon>`:this.progress?o.dy`<ha-spinner size="small"></ha-spinner>`:o.Ld} </div> `:o.Ld} `}},{kind:"method",key:"actionSuccess",value:function(){this._setResult("success")}},{kind:"method",key:"actionError",value:function(){this._setResult("error")}},{kind:"method",key:"_setResult",value:function(e){this._result=e,setTimeout((()=>{this._result=void 0}),2e3)}},{kind:"field",static:!0,key:"styles",value:()=>o.iv`:host{outline:0;display:inline-block;position:relative;pointer-events:none}ha-button{transition:all 1s;pointer-events:initial}ha-button.success{--mdc-theme-primary:white;background-color:var(--success-color);transition:none;border-radius:4px;pointer-events:none}ha-button[raised].success,ha-button[unelevated].success{--mdc-theme-primary:var(--success-color);--mdc-theme-on-primary:white}ha-button.error{--mdc-theme-primary:white;background-color:var(--error-color);transition:none;border-radius:4px;pointer-events:none}ha-button[raised].error,ha-button[unelevated].error{--mdc-theme-primary:var(--error-color);--mdc-theme-on-primary:white}.progress{bottom:4px;position:absolute;text-align:center;top:4px;width:100%}ha-svg-icon{color:#fff}ha-button.error slot,ha-button.success slot{visibility:hidden}:host([destructive]){--mdc-theme-primary:var(--error-color)}`}]}}),o.oi);t()}catch(e){t(e)}}))},17170:function(e,t,i){i.a(e,(async function(e,n){try{i.r(t),i.d(t,{HaSpinner:()=>h});var o=i(44249),r=i(72621),s=i(97677),a=i(43580),l=i(57243),d=i(15093),c=e([s]);s=(c.then?(await c)():c)[0];let h=(0,o.Z)([(0,d.Mo)("ha-spinner")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,d.Cb)()],key:"size",value:void 0},{kind:"method",key:"updated",value:function(e){if((0,r.Z)(i,"updated",this,3)([e]),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}},{kind:"field",static:!0,key:"styles",value:()=>[a.Z,l.iv`:host{--indicator-color:var( --ha-spinner-indicator-color, var(--primary-color) );--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`]}]}}),s.Z);n()}catch(e){n(e)}}))},52032:function(e,t,i){i.a(e,(async function(e,n){try{i.d(t,{w:()=>u});i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814);var o=i(35729),r=(i(83442),i(92263)),s=i(15367),a=i(56332),l=i(13888),d=(i(9427),i(40249)),c=e([o,r,s,a,l]);[o,r,s,a,l]=c.then?(await c)():c;const h=new Set(["conditional","icon","image","service-button","state-badge","state-icon","state-label"]),u=e=>("action-button"===e.type&&(e={...e,type:"service-button"}),(0,d.Tw)("element",e,h));n()}catch(e){n(e)}}))},38717:function(e,t,i){i.a(e,(async function(e,n){try{i.r(t),i.d(t,{HuiEntityBadgeEditor:()=>k});var o=i(44249),r=(i(92745),i(9359),i(70104),i(57243)),s=i(15093),a=i(27486),l=i(62900),d=i(36522),c=(i(29073),i(88693)),h=i(50357),u=i(30571),m=i(61584),p=i(10991),f=i(71295),g=e([h,f,c]);[h,f,c]=g.then?(await g)():g;const v="M10,9A1,1 0 0,1 11,8A1,1 0 0,1 12,9V13.47L13.21,13.6L18.15,15.79C18.68,16.03 19,16.56 19,17.14V21.5C18.97,22.32 18.32,22.97 17.5,23H11C10.62,23 10.26,22.85 10,22.57L5.1,18.37L5.84,17.6C6.03,17.39 6.3,17.28 6.58,17.28H6.8L10,19V9M11,5A4,4 0 0,1 15,9C15,10.5 14.2,11.77 13,12.46V11.24C13.61,10.69 14,9.89 14,9A3,3 0 0,0 11,6A3,3 0 0,0 8,9C8,9.89 8.39,10.69 9,11.24V12.46C7.8,11.77 7,10.5 7,9A4,4 0 0,1 11,5Z",y="M4,9H20V11H4V9M4,13H14V15H4V13Z",_=(0,l.f0)(m.n,(0,l.Ry)({entity:(0,l.jt)((0,l.Z_)()),display_type:(0,l.jt)((0,l.kE)(c.ak)),name:(0,l.jt)((0,l.Z_)()),icon:(0,l.jt)((0,l.Z_)()),state_content:(0,l.jt)((0,l.G0)([(0,l.Z_)(),(0,l.IX)((0,l.Z_)())])),color:(0,l.jt)((0,l.Z_)()),show_name:(0,l.jt)((0,l.O7)()),show_state:(0,l.jt)((0,l.O7)()),show_icon:(0,l.jt)((0,l.O7)()),show_entity_picture:(0,l.jt)((0,l.O7)()),tap_action:(0,l.jt)(u.fJ),hold_action:(0,l.jt)(u.fJ),double_tap_action:(0,l.jt)(u.fJ),image:(0,l.jt)((0,l.Z_)())}));let k=(0,o.Z)([(0,s.Mo)("hui-entity-badge-editor")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_config",value:void 0},{kind:"method",key:"setConfig",value:function(e){(0,l.hu)(e,_),this._config={...c.g5,...(0,c.fp)(e)}}},{kind:"field",key:"_schema",value:()=>(0,a.Z)((e=>[{name:"entity",selector:{entity:{}}},{name:"content",type:"expandable",flatten:!0,iconPath:y,schema:[{name:"",type:"grid",schema:[{name:"name",selector:{text:{}}},{name:"color",selector:{ui_color:{default_color:"state",include_state:!0}}},{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"show_entity_picture",selector:{boolean:{}}}]},{name:"displayed_elements",selector:{select:{mode:"list",multiple:!0,options:[{value:"name",label:e("ui.panel.lovelace.editor.badge.entity.displayed_elements_options.name")},{value:"state",label:e("ui.panel.lovelace.editor.badge.entity.displayed_elements_options.state")},{value:"icon",label:e("ui.panel.lovelace.editor.badge.entity.displayed_elements_options.icon")}]}}},{name:"state_content",selector:{ui_state_content:{allow_name:!0}},context:{filter_entity:"entity"}}]},{name:"interactions",type:"expandable",flatten:!0,iconPath:v,schema:[{name:"tap_action",selector:{ui_action:{default_action:"more-info"}}},{name:"",type:"optional_actions",flatten:!0,schema:["hold_action","double_tap_action"].map((e=>({name:e,selector:{ui_action:{default_action:"none"}}})))}]}]))},{kind:"field",key:"_displayedElements",value:()=>(0,a.Z)((e=>{const t=[];return e.show_name&&t.push("name"),e.show_state&&t.push("state"),e.show_icon&&t.push("icon"),t}))},{kind:"method",key:"render",value:function(){if(!this.hass||!this._config)return r.Ld;const e=this._schema(this.hass.localize),t={...this._config,displayed_elements:this._displayedElements(this._config)};return r.dy` <ha-form .hass="${this.hass}" .data="${t}" .schema="${e}" .computeLabel="${this._computeLabelCallback}" .computeHelper="${this._computeHelperCallback}" @value-changed="${this._valueChanged}"></ha-form> `}},{kind:"method",key:"_valueChanged",value:function(e){if(e.stopPropagation(),!this._config||!this.hass)return;const t={...e.detail.value};t.state_content||delete t.state_content,t.displayed_elements&&(t.show_name=t.displayed_elements.includes("name"),t.show_state=t.displayed_elements.includes("state"),t.show_icon=t.displayed_elements.includes("icon"),delete t.displayed_elements),(0,d.B)(this,"config-changed",{config:t})}},{kind:"field",key:"_computeLabelCallback",value(){return e=>{switch(e.name){case"color":case"state_content":case"show_entity_picture":case"displayed_elements":return this.hass.localize(`ui.panel.lovelace.editor.badge.entity.${e.name}`);default:return this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)}}}},{kind:"field",key:"_computeHelperCallback",value(){return e=>{if("color"===e.name)return this.hass.localize(`ui.panel.lovelace.editor.badge.entity.${e.name}_helper`)}}},{kind:"get",static:!0,key:"styles",value:function(){return[p.A,r.iv`.container{display:flex;flex-direction:column}ha-form{display:block;margin-bottom:24px}`]}}]}}),r.oi);n()}catch(e){n(e)}}))},32012:function(e,t,i){i.d(t,{e:()=>n});class n extends Error{constructor(e,t,i){super(e),this.warnings=void 0,this.errors=void 0,this.name="GUISupportError",this.warnings=t,this.errors=i}}},43299:function(e,t,i){i.a(e,(async function(e,n){try{i.d(t,{O:()=>g});var o=i(44249),r=i(72621),s=(i(9359),i(31526),i(70104),i(57243)),a=i(15093),l=i(67064),d=i(36522),c=i(22381),h=i(41680),u=i(48045),m=(i(99426),i(17170)),p=(i(64889),i(32012)),f=e([m]);m=(f.then?(await f)():f)[0];let g=(0,o.Z)(null,(function(e,t){class n extends t{constructor(...t){super(...t),e(this)}}return{F:n,d:[{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"lovelace",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"context",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_config",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_configElement",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_subElementEditorConfig",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_guiMode",value:()=>!0},{kind:"field",decorators:[(0,a.SB)()],key:"_errors",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_pendingYamlError",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_yamlError",value:()=>!1},{kind:"field",decorators:[(0,a.SB)()],key:"_warnings",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_guiSupported",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_loading",value:()=>!1},{kind:"field",decorators:[(0,a.IO)("ha-yaml-editor")],key:"_yamlEditor",value:void 0},{kind:"get",key:"value",value:function(){return this._config}},{kind:"set",key:"value",value:function(e){this._config&&(0,u.v)(e,this._config)||(this._config=e,this._errors=void 0,this._setConfig())}},{kind:"method",key:"_setConfig",value:function(){if(!this._errors)try{this._updateConfigElement()}catch(e){this._errors=[e.message]}this.updateComplete.then((()=>{(0,d.B)(this,"config-changed",{config:this.value,error:this._errors?.join(", "),guiModeAvailable:!(this.hasWarning||this.hasError||!1===this._guiSupported)})}))}},{kind:"get",key:"hasWarning",value:function(){return void 0!==this._warnings&&this._warnings.length>0}},{kind:"get",key:"hasError",value:function(){return void 0!==this._errors&&this._errors.length>0}},{kind:"get",key:"GUImode",value:function(){return this._guiMode}},{kind:"set",key:"GUImode",value:function(e){this._guiMode=e,this.updateComplete.then((()=>{(0,d.B)(this,"GUImode-changed",{guiMode:e,guiModeAvailable:!(this.hasWarning||this.hasError||!1===this._guiSupported)})}))}},{kind:"method",key:"toggleMode",value:function(){this.GUImode=!this.GUImode}},{kind:"method",key:"focusYamlEditor",value:function(){this._configElement?.focusYamlEditor&&this._configElement.focusYamlEditor(),this._yamlEditor&&this._yamlEditor.focus()}},{kind:"method",key:"getConfigElement",value:async function(){}},{kind:"method",key:"getConfigForm",value:async function(){}},{kind:"method",key:"renderConfigElement",value:function(){return s.dy`${this._configElement}`}},{kind:"method",key:"_renderSubElement",value:function(){return s.dy` <hui-sub-element-editor .hass="${this.hass}" .config="${this._subElementEditorConfig}" @go-back="${this._goBack}" @config-changed="${this._subElementChanged}"> </hui-sub-element-editor> `}},{kind:"method",key:"_subElementChanged",value:function(e){e.stopPropagation();const t=e.detail.config;this._subElementEditorConfig={...this._subElementEditorConfig,elementConfig:t},this._subElementEditorConfig.saveElementConfig?.(t)}},{kind:"method",key:"_goBack",value:function(e){e.stopPropagation(),this._subElementEditorConfig=void 0}},{kind:"method",key:"_editSubElement",value:async function(e){e.stopPropagation(),await Promise.all([i.e("91552"),i.e("78456"),i.e("56898"),i.e("35671"),i.e("92139"),i.e("32146"),i.e("37602"),i.e("18865"),i.e("88975"),i.e("79931"),i.e("44251"),i.e("65005"),i.e("60487"),i.e("3371"),i.e("38326"),i.e("10745"),i.e("16912"),i.e("92368"),i.e("95444"),i.e("8754"),i.e("54291"),i.e("76986")]).then(i.bind(i,50357)),this._subElementEditorConfig={type:e.detail.type,elementConfig:e.detail.config,context:e.detail.context,saveElementConfig:e.detail.saveConfig}}},{kind:"method",key:"render",value:function(){return s.dy` <div class="wrapper"> ${this.GUImode?s.dy` <div class="gui-editor" @edit-sub-element="${this._editSubElement}"> ${this._loading?s.dy` <ha-spinner class="center margin-bot"></ha-spinner> `:(0,l.F)(this._subElementEditorConfig?this._renderSubElement():this.renderConfigElement())} </div> `:s.dy` <div class="yaml-editor"> <ha-yaml-editor .defaultValue="${this._config}" autofocus .hass="${this.hass}" @value-changed="${this._handleYAMLChanged}" @blur="${this._onBlurYaml}" @keydown="${this._ignoreKeydown}" dir="ltr"></ha-yaml-editor> </div> `} ${!1===this._guiSupported&&!1===this._loading?s.dy` <ha-alert alert-type="info" .title="${this.hass.localize("ui.errors.config.visual_editor_not_supported")}"> ${this.hass.localize("ui.errors.config.visual_editor_not_supported_reason_type")} <br> ${this.hass.localize("ui.errors.config.edit_in_yaml_supported")} </ha-alert> `:s.Ld} ${this.hasError?s.dy` <ha-alert alert-type="error" .title="${this.hass.localize("ui.errors.config.configuration_error")}"> <ul> ${this._errors.map((e=>s.dy`<li>${e}</li>`))} </ul> </ha-alert> `:s.Ld} ${this.hasWarning?s.dy` <ha-alert alert-type="warning" .title="${this.hass.localize("ui.errors.config.visual_editor_not_supported")}"> <ul> ${this._warnings.map((e=>s.dy`<li>${e}</li>`))} </ul> ${this.hass.localize("ui.errors.config.edit_in_yaml_supported")} </ha-alert> `:s.Ld} </div> `}},{kind:"method",key:"updated",value:function(e){(0,r.Z)(n,"updated",this,3)([e]),this._configElement&&e.has("hass")&&(this._configElement.hass=this.hass),this._configElement&&"lovelace"in this._configElement&&e.has("lovelace")&&(this._configElement.lovelace=this.lovelace),this._configElement&&e.has("context")&&(this._configElement.context=this.context)}},{kind:"method",key:"_handleUIConfigChanged",value:function(e){if(e.stopPropagation(),!this.GUImode)return;const t=e.detail.config;Object.keys(t).forEach((e=>{void 0===t[e]&&delete t[e]})),this.value=t}},{kind:"method",key:"_handleYAMLChanged",value:function(e){e.stopPropagation();const t=e.detail.value;e.detail.isValid?(this._config=t,this._errors=void 0,this._pendingYamlError=void 0,this._yamlError=!1,this._debounceYamlError.cancel(),this._setConfig()):this._yamlError?this._errors=[e.detail.errorMsg]:(this._pendingYamlError=e.detail.errorMsg,this._debounceYamlError())}},{kind:"field",key:"_debounceYamlError",value(){return(0,c.D)((()=>{this._pendingYamlError&&(this._yamlError=!0,this._errors=[this._pendingYamlError],this._pendingYamlError=void 0,this._setConfig())}),2e3)}},{kind:"method",key:"_onBlurYaml",value:function(){this._debounceYamlError.cancel(),this._pendingYamlError&&(this._yamlError=!0,this._errors=[this._pendingYamlError],this._pendingYamlError=void 0,this._setConfig())}},{kind:"method",key:"unloadConfigElement",value:async function(){this._configElement=void 0,this._guiSupported=void 0}},{kind:"method",key:"loadConfigElement",value:async function(){if(this._configElement)return;let e=await this.getConfigElement();if(!e){const t=await this.getConfigForm();if(t){await i.e("10106").then(i.bind(i,66374)),e=document.createElement("hui-form-editor");const{schema:n,assertConfig:o,computeLabel:r,computeHelper:s}=t;e.schema=n,r&&(e.computeLabel=r),s&&(e.computeHelper=s),o&&(e.assertConfig=o)}}e?(e.hass=this.hass,"lovelace"in e&&(e.lovelace=this.lovelace),e.context=this.context,e.addEventListener("config-changed",(e=>this._handleUIConfigChanged(e))),this._guiSupported=!0):this._guiSupported=!1,this._configElement=e}},{kind:"method",key:"_updateConfigElement",value:async function(){if(this.value)try{if(this._errors=void 0,this._warnings=void 0,await this.loadConfigElement(),this._configElement)try{this._configElement.setConfig(this.value)}catch(e){const t=(0,h.p)(this.hass,e);throw new p.e("Config is not supported",t.warnings,t.errors)}else this._guiSupported=!1,this.GUImode=!1}catch(e){e instanceof p.e?(this._warnings=e.warnings??[e.message],this._errors=e.errors||void 0):this._errors=[e.message],this.GUImode=!1}finally{this._loading=!1}}},{kind:"method",key:"_ignoreKeydown",value:function(e){e.stopPropagation()}},{kind:"field",static:!0,key:"styles",value:()=>s.iv`:host{display:flex}.wrapper{width:100%}.gui-editor,.yaml-editor{padding:8px 0px}ha-code-editor{--code-mirror-max-height:calc(100vh - 245px)}ha-spinner{display:block;margin:auto}`}]}}),s.oi);n()}catch(e){n(e)}}))},6973:function(e,t,i){i.a(e,(async function(e,n){try{i.d(t,{k:()=>d});var o=i(44249),r=i(72621),s=i(15093),a=i(43299),l=e([a]);a=(l.then?(await l)():l)[0];let d=(0,o.Z)(null,(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,s.SB)()],key:"_configElementType",value:void 0},{kind:"get",key:"configElementType",value:function(){return this.value?this.value.type:void 0}},{kind:"method",key:"loadConfigElement",value:async function(){if(this._configElementType!==this.configElementType){if(this.unloadConfigElement(),!this.configElementType)throw new Error(this.hass.localize("ui.errors.config.no_type_provided"));this._configElementType=this.configElementType}return(0,r.Z)(i,"loadConfigElement",this,3)([])}}]}}),a.O);n()}catch(e){n(e)}}))},61584:function(e,t,i){i.d(t,{n:()=>o});var n=i(62900);const o=(0,n.Ry)({type:(0,n.Z_)(),visibility:(0,n.Yj)()})},48734:function(e,t,i){i.a(e,(async function(e,n){try{i.d(t,{P5:()=>u,Ve:()=>p});var o=i(16485),r=(i(9359),i(70104),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),e([o]));o=(r.then?(await r)():r)[0];const s=new Set,a=new Map;let l,d="ltr",c="en";const h="undefined"!=typeof MutationObserver&&"undefined"!=typeof document&&void 0!==document.documentElement;if(h){const f=new MutationObserver(m);d=document.documentElement.dir||"ltr",c=document.documentElement.lang||navigator.language,f.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function u(...e){e.map((e=>{const t=e.$code.toLowerCase();a.has(t)?a.set(t,Object.assign(Object.assign({},a.get(t)),e)):a.set(t,e),l||(l=e)})),m()}function m(){h&&(d=document.documentElement.dir||"ltr",c=document.documentElement.lang||navigator.language),[...s.keys()].map((e=>{"function"==typeof e.requestUpdate&&e.requestUpdate()}))}class p{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){s.add(this.host)}hostDisconnected(){s.delete(this.host)}dir(){return`${this.host.dir||d}`.toLowerCase()}lang(){return`${this.host.lang||c}`.toLowerCase()}getTranslationData(e){var t,i;const n=new Intl.Locale(e.replace(/_/g,"-")),o=null==n?void 0:n.language.toLowerCase(),r=null!==(i=null===(t=null==n?void 0:n.region)||void 0===t?void 0:t.toLowerCase())&&void 0!==i?i:"";return{locale:n,language:o,region:r,primary:a.get(`${o}-${r}`),secondary:a.get(o)}}exists(e,t){var i;const{primary:n,secondary:o}=this.getTranslationData(null!==(i=t.lang)&&void 0!==i?i:this.lang());return t=Object.assign({includeFallback:!1},t),!!(n&&n[e]||o&&o[e]||t.includeFallback&&l&&l[e])}term(e,...t){const{primary:i,secondary:n}=this.getTranslationData(this.lang());let o;if(i&&i[e])o=i[e];else if(n&&n[e])o=n[e];else{if(!l||!l[e])return console.error(`No translation found for: ${String(e)}`),String(e);o=l[e]}return"function"==typeof o?o(...t):o}date(e,t){return e=new Date(e),new Intl.DateTimeFormat(this.lang(),t).format(e)}number(e,t){return e=Number(e),isNaN(e)?"":new Intl.NumberFormat(this.lang(),t).format(e)}relativeTime(e,t,i){return new Intl.RelativeTimeFormat(this.lang(),i).format(e,t)}}n()}catch(g){n(g)}}))},68783:function(e,t,i){i.a(e,(async function(e,n){try{i.d(t,{A:()=>c});var o=i(64699),r=i(15073),s=i(81048),a=i(31027),l=i(57243),d=e([r]);r=(d.then?(await d)():d)[0];var c=class extends a.P{constructor(){super(...arguments),this.localize=new r.V(this)}render(){return l.dy` <svg part="base" class="spinner" role="progressbar" aria-label="${this.localize.term("loading")}"> <circle class="spinner__track"></circle> <circle class="spinner__indicator"></circle> </svg> `}};c.styles=[s.N,o.D],n()}catch(e){n(e)}}))},31027:function(e,t,i){i.d(t,{P:()=>a});i(9359),i(31526);var n,o=i(52812),r=i(57243),s=i(15093),a=class extends r.oi{constructor(){super(),(0,o.Ko)(this,n,!1),this.initialReflectedProperties=new Map,Object.entries(this.constructor.dependencies).forEach((([e,t])=>{this.constructor.define(e,t)}))}emit(e,t){const i=new CustomEvent(e,(0,o.ih)({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i),i}static define(e,t=this,i={}){const n=customElements.get(e);if(!n){try{customElements.define(e,t,i)}catch(n){customElements.define(e,class extends t{},i)}return}let o=" (unknown version)",r=o;"version"in t&&t.version&&(o=" v"+t.version),"version"in n&&n.version&&(r=" v"+n.version),o&&r&&o===r||console.warn(`Attempted to register <${e}>${o}, but <${e}>${r} has already been registered.`)}attributeChangedCallback(e,t,i){(0,o.ac)(this,n)||(this.constructor.elementProperties.forEach(((e,t)=>{e.reflect&&null!=this[t]&&this.initialReflectedProperties.set(t,this[t])})),(0,o.qx)(this,n,!0)),super.attributeChangedCallback(e,t,i)}willUpdate(e){super.willUpdate(e),this.initialReflectedProperties.forEach(((t,i)=>{e.has(i)&&null==this[i]&&(this[i]=t)}))}};n=new WeakMap,a.version="2.20.1",a.dependencies={},(0,o.u2)([(0,s.Cb)()],a.prototype,"dir",2),(0,o.u2)([(0,s.Cb)()],a.prototype,"lang",2)},15073:function(e,t,i){i.a(e,(async function(e,n){try{i.d(t,{V:()=>a});var o=i(21262),r=i(48734),s=e([r,o]);[r,o]=s.then?(await s)():s;var a=class extends r.Ve{};(0,r.P5)(o.K),n()}catch(e){n(e)}}))},21262:function(e,t,i){i.a(e,(async function(e,n){try{i.d(t,{K:()=>a});var o=i(48734),r=e([o]);o=(r.then?(await r)():r)[0];var s={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(e,t)=>`Go to slide ${e} of ${t}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:e=>0===e?"No options selected":1===e?"1 option selected":`${e} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:e=>`Slide ${e}`,toggleColorFormat:"Toggle color format"};(0,o.P5)(s);var a=s;n()}catch(e){n(e)}}))},64699:function(e,t,i){i.d(t,{D:()=>n});var n=i(57243).iv`:host{--track-width:2px;--track-color:rgb(128 128 128 / 25%);--indicator-color:var(--sl-color-primary-600);--speed:2s;display:inline-flex;width:1em;height:1em;flex:none}.spinner{flex:1 1 auto;height:100%;width:100%}.spinner__indicator,.spinner__track{fill:none;stroke-width:var(--track-width);r:calc(0.5em - var(--track-width)/ 2);cx:0.5em;cy:0.5em;transform-origin:50% 50%}.spinner__track{stroke:var(--track-color);transform-origin:0% 0%}.spinner__indicator{stroke:var(--indicator-color);stroke-linecap:round;stroke-dasharray:150% 75%;animation:spin var(--speed) linear infinite}@keyframes spin{0%{transform:rotate(0deg);stroke-dasharray:0.05em,3em}50%{transform:rotate(450deg);stroke-dasharray:1.375em,1.375em}100%{transform:rotate(1080deg);stroke-dasharray:0.05em,3em}}`},52812:function(e,t,i){i.d(t,{EZ:()=>m,Ko:()=>v,ac:()=>g,ih:()=>u,qx:()=>y,u2:()=>p});var n=Object.defineProperty,o=Object.defineProperties,r=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,c=e=>{throw TypeError(e)},h=(e,t,i)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,u=(e,t)=>{for(var i in t||(t={}))l.call(t,i)&&h(e,i,t[i]);if(a)for(var i of a(t))d.call(t,i)&&h(e,i,t[i]);return e},m=(e,t)=>o(e,s(t)),p=(e,t,i,o)=>{for(var s,a=o>1?void 0:o?r(t,i):t,l=e.length-1;l>=0;l--)(s=e[l])&&(a=(o?s(t,i,a):s(a))||a);return o&&a&&n(t,i,a),a},f=(e,t,i)=>t.has(e)||c("Cannot "+i),g=(e,t,i)=>(f(e,t,"read from private field"),i?i.call(e):t.get(e)),v=(e,t,i)=>t.has(e)?c("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),y=(e,t,i,n)=>(f(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i)},81048:function(e,t,i){i.d(t,{N:()=>n});var n=i(57243).iv`:host{box-sizing:border-box}:host *,:host ::after,:host ::before{box-sizing:inherit}[hidden]{display:none!important}`},97677:function(e,t,i){i.a(e,(async function(e,n){try{i.d(t,{Z:()=>o.A});var o=i(68783),r=(i(64699),i(15073)),s=i(21262),a=(i(81048),i(31027),i(52812),e([r,s,o]));[r,s,o]=a.then?(await a)():a,n()}catch(e){n(e)}}))},43580:function(e,t,i){i.d(t,{Z:()=>n.D});var n=i(64699);i(52812)},67064:function(e,t,i){i.d(t,{F:()=>a});var n=i(2841),o=i(45779),r=i(53232);const s=e=>(0,r.dZ)(e)?e._$litType$.h:e.strings,a=(0,o.XM)(class extends o.Xe{constructor(e){super(e),this.tt=new WeakMap}render(e){return[e]}update(e,[t]){const i=(0,r.hN)(this.et)?s(this.et):null,o=(0,r.hN)(t)?s(t):null;if(null!==i&&(null===o||i!==o)){const t=(0,r.i9)(e).pop();let o=this.tt.get(i);if(void 0===o){const e=document.createDocumentFragment();o=(0,n.sY)(n.Ld,e),o.setConnected(!1),this.tt.set(i,o)}(0,r.hl)(o,[t]),(0,r._Y)(o,void 0,t)}if(null!==o){if(null===i||i!==o){const t=this.tt.get(o);if(void 0!==t){const i=(0,r.i9)(t).pop();(0,r.E_)(e),(0,r._Y)(e,void 0,i),(0,r.hl)(e,[i])}}this.et=t}else this.et=void 0;return this.render(t)}})}}; //# sourceMappingURL=72931.a7389e123566ea99.js.map