UNPKG

iobroker.lovelace

Version:

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

1 lines 17.9 kB
export const __rspack_esm_id=94935;export const __rspack_esm_ids=[94935];export const __webpack_modules__={80785(e,t,a){function o(e){return!!e&&(e instanceof Date&&!isNaN(e.valueOf()))}a.d(t,{A:()=>o})},82591(e,t,a){a.a(e,async function(e,o){try{a.d(t,{E2:()=>_,Z8:()=>p,a3:()=>L,i:()=>d,nR:()=>c});var n=a(74487),r=a(22786),i=a(79791),s=e([n]);n=(s.then?(await s)():s)[0];const l=e=>e<10?`0${e}`:e,c=(e,t)=>{const a=t.days||0,o=t.hours||0,n=t.minutes||0,r=t.seconds||0,i=t.milliseconds||0;return a>0?`${Intl.NumberFormat(e.language,{style:"unit",unit:"day",unitDisplay:"long"}).format(a)} ${o}:${l(n)}:${l(r)}`:o>0?`${o}:${l(n)}:${l(r)}`:n>0?`${n}:${l(r)}`:r>0?Intl.NumberFormat(e.language,{style:"unit",unit:"second",unitDisplay:"long"}).format(r):i>0?Intl.NumberFormat(e.language,{style:"unit",unit:"millisecond",unitDisplay:"long"}).format(i):null},u=(0,r.A)(e=>new Intl.DurationFormat(e.language,{style:"long"})),d=(e,t)=>u(e).format(t),m=(0,r.A)(e=>new Intl.DurationFormat(e.language,{style:"digital",hoursDisplay:"auto"})),_=(e,t)=>m(e).format(t),p=["min","h","d"],f=(0,r.A)(e=>new Intl.DurationFormat(e.language,{style:"narrow",daysDisplay:"always"})),g=(0,r.A)(e=>new Intl.DurationFormat(e.language,{style:"narrow",hoursDisplay:"always"})),h=(0,r.A)(e=>new Intl.DurationFormat(e.language,{style:"narrow",minutesDisplay:"always"})),L=(e,t,a,o)=>{const n=void 0!==o?(0,i.L)(parseFloat(t),o):parseFloat(t);switch(a){case"d":{const t=Math.floor(n),a={days:t,hours:Math.floor(24*(n-t))};return f(e).format(a)}case"h":{const t=Math.floor(n),a={hours:t,minutes:Math.floor(60*(n-t))};return g(e).format(a)}case"min":{const t=Math.floor(n),a={minutes:t,seconds:Math.floor(60*(n-t))};return h(e).format(a)}default:throw new Error("Invalid duration unit")}};o()}catch(e){o(e)}})},15090(e,t,a){a.d(t,{nP:()=>c,vB:()=>s});a(44114),a(18111),a(22489),a(61701),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);var o=a(22675),n=a(52220),r=a(71727),i=a(69093);const s={alarm_control_panel:["armed_away","armed_custom_bypass","armed_home","armed_night","armed_vacation","arming","disarmed","disarming","pending","triggered"],alert:["on","off","idle"],assist_satellite:["idle","listening","responding","processing"],automation:["on","off"],binary_sensor:["on","off"],button:[],calendar:["on","off"],camera:["idle","recording","streaming"],cover:["closed","closing","open","opening"],device_tracker:["home","not_home"],fan:["on","off"],humidifier:["on","off"],infrared:[],input_boolean:["on","off"],input_button:[],lawn_mower:["error","paused","mowing","returning","docked"],light:["on","off"],lock:["jammed","locked","locking","unlocked","unlocking","opening","open"],media_player:["off","on","idle","playing","paused","standby","buffering"],person:["home","not_home"],plant:["ok","problem"],radio_frequency:[],remote:["on","off"],scene:[],schedule:["on","off"],script:["on","off"],siren:["on","off"],sun:["above_horizon","below_horizon"],switch:["on","off"],timer:["active","idle","paused"],update:["on","off"],vacuum:["cleaning","docked","error","idle","paused","returning"],valve:["closed","closing","open","opening"],weather:["clear-night","cloudy","exceptional","fog","hail","lightning-rainy","lightning","partlycloudy","pouring","rainy","snowy-rainy","snowy","sunny","windy-variant","windy"]},l={alarm_control_panel:{code_format:["number","text"]},binary_sensor:{device_class:["battery","battery_charging","co","cold","connectivity","door","garage_door","gas","heat","light","lock","moisture","motion","moving","occupancy","opening","plug","power","presence","problem","running","safety","smoke","sound","tamper","update","vibration","window"]},button:{device_class:["restart","update"]},camera:{frontend_stream_type:["hls","web_rtc"]},climate:{hvac_action:["off","idle","preheating","defrosting","heating","cooling","drying","fan"]},cover:{device_class:["awning","blind","curtain","damper","door","garage","gate","shade","shutter","window"]},device_tracker:{source_type:["bluetooth","bluetooth_le","gps","router"]},fan:{direction:["forward","reverse"]},humidifier:{device_class:["humidifier","dehumidifier"],action:["off","idle","humidifying","drying"]},media_player:{device_class:["tv","speaker","receiver"],media_content_type:["album","app","artist","channel","channels","composer","contributing_artist","episode","game","genre","image","movie","music","playlist","podcast","season","track","tvshow","url","video"],repeat:["off","one","all"]},number:{device_class:["temperature"]},sensor:{device_class:["apparent_power","aqi","battery","carbon_dioxide","carbon_monoxide","current","date","duration","energy","frequency","gas","humidity","illuminance","monetary","nitrogen_dioxide","nitrogen_monoxide","nitrous_oxide","ozone","ph","pm1","pm10","pm25","pm4","power_factor","power","pressure","reactive_power","signal_strength","sulphur_dioxide","temperature","timestamp","uptime","volatile_organic_compounds","volatile_organic_compounds_parts","voltage","volume_flow_rate"],state_class:["measurement","total","total_increasing"]},switch:{device_class:["outlet","switch"]},update:{device_class:["firmware"]},water_heater:{away_mode:["on","off"]}},c=(e,t,a=void 0)=>{const c=(0,i.t)(t),u=[];switch(u.push(...((e,t,a)=>{const i=[];switch(a||i.push(o.Hh,o.HV),!a&&t in s?i.push(...s[t]):a&&t in l&&a in l[t]&&i.push(...l[t][a]),t){case"device_tracker":case"person":a||i.push(...Object.entries(e.states).filter(([e,t])=>"zone"===(0,r.m)(e)&&"zone.home"!==e&&t.attributes.friendly_name).map(([e,t])=>t.attributes.friendly_name).sort((t,a)=>(0,n.xL)(t,a,e.locale.language)))}return i})(e,c,a)),c){case"climate":a?"fan_mode"===a?u.push(...t.attributes.fan_modes):"preset_mode"===a?u.push(...t.attributes.preset_modes):"swing_mode"===a?u.push(...t.attributes.swing_modes):"swing_horizontal_mode"===a&&u.push(...t.attributes.swing_horizontal_modes):u.push(...t.attributes.hvac_modes);break;case"event":"event_type"===a&&u.push(...t.attributes.event_types);break;case"fan":"preset_mode"===a&&u.push(...t.attributes.preset_modes);break;case"humidifier":"mode"===a&&u.push(...t.attributes.available_modes);break;case"input_select":case"select":a||u.push(...t.attributes.options);break;case"light":"effect"===a&&t.attributes.effect_list?u.push(...t.attributes.effect_list):"color_mode"===a&&t.attributes.supported_color_modes&&u.push(...t.attributes.supported_color_modes);break;case"media_player":"sound_mode"===a?u.push(...t.attributes.sound_mode_list):"source"===a&&u.push(...t.attributes.source_list);break;case"remote":"current_activity"===a&&u.push(...t.attributes.activity_list);break;case"sensor":a||"enum"!==t.attributes.device_class||u.push(...t.attributes.options);break;case"vacuum":"fan_speed"===a&&u.push(...t.attributes.fan_speed_list);break;case"water_heater":a&&"operation_mode"!==a||u.push(...t.attributes.operation_list)}return[...new Set(u)]}},47129(e,t,a){a.d(t,{a:()=>r});a(74423);var o=a(22675),n=a(71727);function r(e,t){const a=(0,n.m)(e.entity_id),r=void 0!==t?t:e?.state;if(["button","event","infrared","input_button","radio_frequency","scene"].includes(a))return r!==o.Hh;if(r===o.Hh||r===o.HV)return!1;if("off"===r&&"alert"!==a)return!1;switch(a){case"alarm_control_panel":return"disarmed"!==r;case"alert":return"idle"!==r;case"cover":case"valve":return"closed"!==r;case"device_tracker":case"person":return"not_home"!==r;case"lawn_mower":return!["docked","paused"].includes(r);case"lock":return"locked"!==r;case"media_player":return"standby"!==r;case"vacuum":return!["idle","docked","paused"].includes(r);case"plant":return"problem"===r;case"group":return["on","home","open","locked","problem"].includes(r);case"timer":return"active"===r;case"camera":return"streaming"===r}return!0}},52658(e,t,a){a.d(t,{ZK:()=>m,gf:()=>d,mT:()=>p,Se:()=>u,mg:()=>_});a(44114),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);var o=a(22675),n=a(68287),r=a(86030),i=a(80880);var s=a(71727),l=a(47129);const c=new Set(["alarm_control_panel","alert","automation","binary_sensor","calendar","camera","climate","cover","device_tracker","fan","group","humidifier","input_boolean","lawn_mower","light","lock","media_player","person","plant","remote","schedule","script","siren","sun","switch","timer","update","vacuum","valve","water_heater","weather"]),u=(e,t)=>{if((void 0!==t?t:e?.state)===o.Hh)return"var(--state-unavailable-color)";const a=_(e,t);return a?(0,r.B)(a):void 0},d=(e,t,a)=>{const o=void 0!==a?a:t.state,n=(0,l.a)(t,a);return m(e,t.attributes.device_class,o,n)},m=(e,t,a,o)=>{const n=[],r=(0,i.Y)(a,"_"),s=o?"active":"inactive";return t&&n.push(`--state-${e}-${t}-${r}-color`),n.push(`--state-${e}-${r}-color`,`--state-${e}-${s}-color`,`--state-${s}-color`),n},_=(e,t)=>{const a=void 0!==t?t:e?.state,o=(0,s.m)(e.entity_id),r=e.attributes.device_class;if("sensor"===o&&"battery"===r){const e=(e=>{const t=Number(e);if(!isNaN(t))return t>=70?"--state-sensor-battery-high-color":t>=30?"--state-sensor-battery-medium-color":"--state-sensor-battery-low-color"})(a);if(e)return[e]}if("group"===o){const a=(0,n.z)(e);if(a&&c.has(a))return d(a,e,t)}if(c.has(o))return d(o,e,t)},p=e=>{if(e.attributes.brightness&&"plant"!==(0,s.m)(e.entity_id)){return`brightness(${(e.attributes.brightness+245)/5}%)`}return""}},78649(e,t,a){a.d(t,{n:()=>n});const o=/^(\w+)\.(\w+)$/,n=e=>o.test(e)},79791(e,t,a){a.d(t,{L:()=>o});const o=(e,t=2)=>Math.round(e*10**t)/10**t},67258(e,t,a){a.d(t,{d:()=>o});const o=e=>{switch(e.language){case"cs":case"de":case"fi":case"fr":case"sk":case"sv":return" ";default:return""}}},8549(e,t,a){a.d(t,{A:()=>n});var o=a(67258);const n=(e,t)=>"°"===e?"":t&&"%"===e?(0,o.d)(t):" "},38279(e,t,a){a.d(t,{$2:()=>o,VV:()=>r,on:()=>l,sx:()=>i});var o=function(e){return e[e.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",e[e.TARGET_TEMPERATURE_RANGE=2]="TARGET_TEMPERATURE_RANGE",e[e.TARGET_HUMIDITY=4]="TARGET_HUMIDITY",e[e.FAN_MODE=8]="FAN_MODE",e[e.PRESET_MODE=16]="PRESET_MODE",e[e.SWING_MODE=32]="SWING_MODE",e[e.AUX_HEAT=64]="AUX_HEAT",e[e.TURN_OFF=128]="TURN_OFF",e[e.TURN_ON=256]="TURN_ON",e[e.SWING_HORIZONTAL_MODE=512]="SWING_HORIZONTAL_MODE",e}({});const n=["auto","heat_cool","heat","cool","dry","fan_only","off"].reduce((e,t,a)=>(e[t]=a,e),{}),r=(e,t)=>n[e]-n[t],i={cooling:"cool",defrosting:"heat",drying:"dry",fan:"fan_only",heating:"heat",idle:"off",off:"off",preheating:"heat"},s={cool:"M20.79,13.95L18.46,14.57L16.46,13.44V10.56L18.46,9.43L20.79,10.05L21.31,8.12L19.54,7.65L20,5.88L18.07,5.36L17.45,7.69L15.45,8.82L13,7.38V5.12L14.71,3.41L13.29,2L12,3.29L10.71,2L9.29,3.41L11,5.12V7.38L8.5,8.82L6.5,7.69L5.92,5.36L4,5.88L4.47,7.65L2.7,8.12L3.22,10.05L5.55,9.43L7.55,10.56V13.45L5.55,14.58L3.22,13.96L2.7,15.89L4.47,16.36L4,18.12L5.93,18.64L6.55,16.31L8.55,15.18L11,16.62V18.88L9.29,20.59L10.71,22L12,20.71L13.29,22L14.7,20.59L13,18.88V16.62L15.5,15.17L17.5,16.3L18.12,18.63L20,18.12L19.53,16.35L21.3,15.88L20.79,13.95M9.5,10.56L12,9.11L14.5,10.56V13.44L12,14.89L9.5,13.44V10.56Z",dry:"M12,3.25C12,3.25 6,10 6,14C6,17.32 8.69,20 12,20A6,6 0 0,0 18,14C18,10 12,3.25 12,3.25M14.47,9.97L15.53,11.03L9.53,17.03L8.47,15.97M9.75,10A1.25,1.25 0 0,1 11,11.25A1.25,1.25 0 0,1 9.75,12.5A1.25,1.25 0 0,1 8.5,11.25A1.25,1.25 0 0,1 9.75,10M14.25,14.5A1.25,1.25 0 0,1 15.5,15.75A1.25,1.25 0 0,1 14.25,17A1.25,1.25 0 0,1 13,15.75A1.25,1.25 0 0,1 14.25,14.5Z",fan_only:"M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12.5,2C17,2 17.11,5.57 14.75,6.75C13.76,7.24 13.32,8.29 13.13,9.22C13.61,9.42 14.03,9.73 14.35,10.13C18.05,8.13 22.03,8.92 22.03,12.5C22.03,17 18.46,17.1 17.28,14.73C16.78,13.74 15.72,13.3 14.79,13.11C14.59,13.59 14.28,14 13.88,14.34C15.87,18.03 15.08,22 11.5,22C7,22 6.91,18.42 9.27,17.24C10.25,16.75 10.69,15.71 10.89,14.79C10.4,14.59 9.97,14.27 9.65,13.87C5.96,15.85 2,15.07 2,11.5C2,7 5.56,6.89 6.74,9.26C7.24,10.25 8.29,10.68 9.22,10.87C9.41,10.39 9.73,9.97 10.14,9.65C8.15,5.96 8.94,2 12.5,2Z",auto:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22C12.4 22 12.7 22 13.1 21.9L15.4 15.3L14.8 14.7C15.5 14 16 13 16 11.9C16 11.2 15.8 10.5 15.4 9.9L17.6 7.7C18.5 9 19 10.4 19 12H20C20.3 12 20.6 12.1 20.8 12.2C20.8 12.2 20.9 12.2 20.9 12.3C21.3 12.5 21.7 12.9 21.9 13.4C22 12.9 22 12.5 22 12C22 6.5 17.5 2 12 2M14 8.6C13.4 8.2 12.7 8 12 8C9.8 8 8 9.8 8 12C8 13.1 8.4 14.1 9.2 14.8L7.1 16.9C5.8 15.7 5 13.9 5 12C5 8.1 8.1 5 12 5C13.6 5 15 5.5 16.2 6.4L14 8.6M20 14H18L14.8 23H16.7L17.4 21H20.6L21.3 23H23.2L20 14M17.8 19.7L19 16L20.2 19.7H17.8Z",heat:"M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z",off:"M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13",heat_cool:"M12.92 1.58L11.18 2.58L12.39 4.67L11.8 6.85L9 7.6L7.38 6L7.42 3.59L5.43 3.59L5.43 5.42L3.59 5.42L3.6 7.42L6 7.42L7.65 9.03L6.9 11.82L4.68 12.4L2.59 11.2L1.59 12.93L3.17 13.84L2.26 15.42L4 16.42L5.19 14.33L7.42 13.75L7.92 14.26L9.32 12.86L8.78 12.32L9.53 9.54L12.32 8.78L12.85 9.32L14.26 7.91L13.73 7.37L14.32 5.19L16.41 4L15.41 2.25L13.83 3.16L12.92 1.58M20.72 4L4 20.72L5.27 22L10.16 17.11C10.63 17.43 11.15 17.68 11.71 17.83C14.38 18.55 17.12 16.96 17.83 14.29C18.22 12.86 17.93 11.36 17.11 10.16L22 5.27L20.72 4M18.74 9C19.18 9.63 19.53 10.38 19.75 11.19C19.97 12 20.03 12.81 19.96 13.61L22.65 10.41L18.74 9M19.32 15.95C19 16.67 18.5 17.35 17.93 17.94C17.34 18.53 16.66 19 15.96 19.34L20.05 20.06L19.32 15.95M9 18.71L10.41 22.66L13.59 19.95C12.81 20 12 19.97 11.19 19.76C10.36 19.54 9.62 19.17 9 18.71Z"},l=e=>s[e]||"M16.95,16.95L14.83,14.83C15.55,14.1 16,13.1 16,12C16,11.26 15.79,10.57 15.43,10L17.6,7.81C18.5,9 19,10.43 19,12C19,13.93 18.22,15.68 16.95,16.95M12,5C13.57,5 15,5.5 16.19,6.4L14,8.56C13.43,8.21 12.74,8 12,8A4,4 0 0,0 8,12C8,13.1 8.45,14.1 9.17,14.83L7.05,16.95C5.78,15.68 5,13.93 5,12A7,7 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"},68287(e,t,a){a.d(t,{z:()=>n});a(18111),a(61701),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);var o=a(71727);const n=e=>{const t=e.attributes.entity_id||[],a=[...new Set(t.map(e=>(0,o.m)(e)))];return 1===a.length?a[0]:void 0}},12496(e,t,a){a.d(t,{Q:()=>l});a(18111),a(22489);var o=a(35952),n=a(71730),r=a(65063),i=a(57150),s=a(85633);const l=async(e,t,a,l,c)=>{t.loadFragmentTranslation("lovelace");const u=await(0,n.SJ)(t),d=u.filter(e=>"storage"===e.mode),m=t.panels.lovelace?.config?.mode;if("storage"!==m&&!d.length)return void(0,i.Q)(e,{cardConfig:a,entities:c,yaml:!0});let _,p=null;if("storage"===m)try{_=await(0,o.Dz)(t.connection,null,!1)}catch(e){}if(!_&&d.length)for(const e of d)try{_=await(0,o.Dz)(t.connection,e.url_path,!1),p=e.url_path;break}catch(e){}_?d.length||_.views?.length?d.length||1!==_.views.length?(0,s.X)(e,{lovelaceConfig:_,urlPath:p,allowDashboardChange:!0,actionLabel:t.localize("ui.common.next"),dashboards:u,viewSelectedCallback:(n,r,s)=>{(0,i.Q)(e,{cardConfig:a,sectionConfig:l,lovelaceConfig:r,saveConfig:async e=>{try{await(0,o.ql)(t,n,e)}catch{alert(t.localize("ui.panel.lovelace.add_entities.saving_failed"))}},path:[s],entities:c})}}):(0,i.Q)(e,{cardConfig:a,sectionConfig:l,lovelaceConfig:_,saveConfig:async e=>{try{await(0,o.ql)(t,null,e)}catch(e){alert(t.localize("ui.panel.lovelace.add_entities.saving_failed"))}},path:[0],entities:c}):(0,r.showAlertDialog)(e,{text:"You don't have any Lovelace views, first create a view in Lovelace."}):u.length>d.length?(0,i.Q)(e,{cardConfig:a,sectionConfig:l,entities:c,yaml:!0}):(0,r.showAlertDialog)(e,{text:"You don't seem to be in control of any dashboard, please take control first."})}},57150(e,t,a){a.d(t,{Q:()=>r});var o=a(1087);const n=()=>Promise.all([a.e(92769),a.e(3283),a.e(72130),a.e(85010),a.e(83113),a.e(67218),a.e(58416),a.e(99788),a.e(58303),a.e(21543),a.e(22398),a.e(82134),a.e(46601),a.e(93581),a.e(26092),a.e(19112),a.e(34310),a.e(30002),a.e(59704),a.e(25322),a.e(53480),a.e(90790),a.e(89747),a.e(59532),a.e(55076),a.e(87692),a.e(36332),a.e(77563),a.e(15862),a.e(41344),a.e(97500),a.e(49625),a.e(1945)]).then(a.bind(a,78305)),r=(e,t)=>{(0,o.r)(e,"show-dialog",{dialogTag:"hui-dialog-suggest-card",dialogImport:n,dialogParams:t})}},85633(e,t,a){a.d(t,{X:()=>n});var o=a(1087);const n=(e,t)=>{(0,o.r)(e,"show-dialog",{dialogTag:"hui-dialog-select-view",dialogImport:()=>Promise.all([a.e(44335),a.e(40901)]).then(a.bind(a,54564)),dialogParams:t})}},86030(e,t,a){a.d(t,{B:()=>o,a:()=>n});a(18111),a(18237);function o(e){return Array.isArray(e)?e.reverse().reduce((e,t)=>`var(${t}${e?`, ${e}`:""})`,void 0):`var(${e})`}function n(e,t){if(Array.isArray(e))for(const a of e){const e=n(a,t);if(e)return e}else if(e.endsWith("-color"))return t.getPropertyValue(e).trim()||void 0}},30039(e,t,a){a.d(t,{R:()=>n});a(14603),a(47566),a(98721);var o=a(16869);const n=(e,t="")=>{const a=document.createElement("a");a.target="_blank",a.href=e,a.download=t,a.style.display="none",document.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),document.body.removeChild(a),e.startsWith("blob:")&&(o.B?setTimeout(()=>URL.revokeObjectURL(e),1e4):URL.revokeObjectURL(e))}}};