iobroker.eos-admin 7.9.36 → 7.9.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/i18n/de.json +7 -3
- package/admin/i18n/en.json +5 -3
- package/admin/i18n/es.json +5 -3
- package/admin/i18n/fr.json +5 -3
- package/admin/i18n/it.json +5 -3
- package/admin/i18n/nl.json +5 -3
- package/admin/i18n/pl.json +5 -3
- package/admin/i18n/pt.json +5 -3
- package/admin/i18n/ru.json +5 -3
- package/admin/i18n/uk.json +5 -3
- package/admin/i18n/zh-cn.json +5 -3
- package/admin/jsonConfig.json5 +8 -7
- package/adminWww/assets/bootstrap-COulQZax.js +1 -1
- package/adminWww/css/eos-branding.css +82 -1
- package/adminWww/index.html +4 -4
- package/adminWww/js/eos-branding.js +169 -6
- package/adminWww/js/eos-runtime-fixes.js +144 -0
- package/adminWww/js/eos-security-ui.js +40 -7
- package/build/i18n/de.json +2 -2
- package/build/i18n/en.json +2 -2
- package/build/main.js +13 -3
- package/docs/NEXOWATT_EOS_UI_V37_STABILITY_DE.md +13 -0
- package/io-package.json +14 -9
- package/package.json +2 -2
- package/tools/nexowatt-validate-package.cjs +3 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Adapters-B5_jQ7DE.js","./DefaultPropsProvider-BiXBMQYQ.js","./_commonjsHelpers-CE1G-McA.js","./iobroker_admin__mf_v__runtimeInit__mf_v__-g2X2zhAf.js","./emotion-serialize.esm-Q4o_CgeF.js","./iobroker_admin__loadShare___mf_0_emotion_mf_1_react__loadShare__-BywLg1Xe.js","./iobroker_admin__loadShare__react__loadShare__-LM7uyL45.js","./iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__-CJO5yP3h.js","./index-BmNcalFW.js","./iconBase-2IlPecPg.js","./sentry-B7YeoTAx.js","./iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-LFZoiUTt.js","./AdapterUpdateDialog-BMg84Hpf.js","./zh-cn-nUtvS7Wc.js","./_commonjs-dynamic-modules-TDtrdbi3.js","./State-qCI8JACH.js","./createTheme-DFX8CY6F.js","./blue-CagzI6CQ.js","./CustomModal-CqDLqryN.js","./amber-D7aVlNg3.js","./ace-DEUjyTIn.js","./iobroker_admin__loadShare___mf_0_iobroker_mf_1_json_mf_2_config__loadShare__-CpA7pnS5.js","./iobroker_admin__loadShare__leaflet__loadShare__-CNUAG3AH.js","./ext-language_tools-ylAoucDh.js","./iobroker_admin__loadShare__react_mf_2_dropzone__loadShare__-CwjnV48g.js","./iobroker_admin__loadShare__react_mf_2_dom__loadShare__-CVeAXnkk.js","./preload-helper-BDBacUwf.js","./sdk-C-e-e2gd.js","./extends-CF3RwP-h.js","./assertThisInitialized-B0aQ9eG_.js","./useTheme-Bl-M1DYp.js","./index-DcK0RDrH.js","./ThemeProvider-BOFFjWAF.js","./emotion-cache.browser.esm-BgJfNZJN.js","./setYear-3ufv5yRD.js","./en-US-DBFJNIH6.js","./Instances-YdaGnS5a.js","./Config-hHK2UzGP.js","./pl-Dib-_u5L.js","./___vite-browser-external_commonjs-proxy-DMh1aSo_.js","./Intro-DkwRiz1n.js","./Logs-CsVPSLJH.js","./Files-Cd2HOzIE.js","./Objects-DPan0bzw.js","./index-8HslT92O.js","./Objects-BwKcXIZw.css","./Users-BgnBRgwU.js","./Fields-CX3rKuWb.js","./user1-BHHH0LIq.js","./user2-BN56rMPt.js","./user3-Mx6XZSLK.js","./user4-DpEs_YiD.js","./user5-CVfrnlXE.js","./user6-C7HkYnq4.js","./user7-VAQcubFn.js","./user8-CwACr_jq.js","./user9-Dk4Mlhcc.js","./user10-Dvmqf8l1.js","./user11-C8ly5pY7.js","./user12-CHtaF3qG.js","./group1-DBYxcyxq.js","./group2-BUQSell7.js","./group3-B0AdMrOp.js","./group4-TeCgDok7.js","./group5-CJ_-VPxg.js","./group6-JW-nEhw_.js","./group7-CWpVuR4T.js","./group8-CRGBxCwd.js","./group9-BXRQchYG.js","./group10-BIcZMfE3.js","./Enums-DbWYxKOo.js","./list-C2A06nPE.js","./CustomTab-B0wqoazH.js","./DeviceManager-BFmQeYQ1.js","./Hosts-Bg8QzW5i.js","./EasyMode-B1d9Vdc4.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{j as jsxRuntimeExports}from"./DefaultPropsProvider-BiXBMQYQ.js";import"./ace-DEUjyTIn.js";import"./iobroker_admin__loadShare___mf_0_emotion_mf_1_react__loadShare__-BywLg1Xe.js";import{i as iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__}from"./iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-LFZoiUTt.js";import{i as iobroker_admin__loadShare___mf_0_iobroker_mf_1_json_mf_2_config__loadShare__}from"./iobroker_admin__loadShare___mf_0_iobroker_mf_1_json_mf_2_config__loadShare__-CpA7pnS5.js";import{g as getDefaultExportFromCjs,c as commonjsGlobal}from"./_commonjsHelpers-CE1G-McA.js";import{a as iobroker_admin__mf_v__runtimeInit__mf_v__}from"./iobroker_admin__mf_v__runtimeInit__mf_v__-g2X2zhAf.js";import{i as iobroker_admin__loadShare__leaflet__loadShare__}from"./iobroker_admin__loadShare__leaflet__loadShare__-CNUAG3AH.js";import{A as AceEditor,i as iobroker_admin__loadShare___mf_0_mui_mf_1_x_mf_2_date_mf_2_pickers__loadShare__}from"./ext-language_tools-ylAoucDh.js";import{D as Dropzone}from"./iobroker_admin__loadShare__react_mf_2_dropzone__loadShare__-CwjnV48g.js";import{i as iobroker_admin__loadShare__react_mf_2_dom__loadShare__}from"./iobroker_admin__loadShare__react_mf_2_dom__loadShare__-CVeAXnkk.js";import{i as iobroker_admin__loadShare__react__loadShare__,a as React}from"./iobroker_admin__loadShare__react__loadShare__-LM7uyL45.js";import{_ as __vitePreload}from"./preload-helper-BDBacUwf.js";import{i as iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__,a as iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__}from"./iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__-CJO5yP3h.js";import{A as AdminConnection,P as PROGRESS,i as init,d as dedupeIntegration}from"./sdk-C-e-e2gd.js";import{_ as _extends$1}from"./extends-CF3RwP-h.js";import{c as _assertThisInitialized,_ as _setPrototypeOf}from"./assertThisInitialized-B0aQ9eG_.js";import{P as PropTypes}from"./index-DcK0RDrH.js";import{T as ThemeProvider,S as StyledEngineProvider}from"./ThemeProvider-BOFFjWAF.js";import{Z as longFormatters,u as parse$1,i as isValid,r as format,X as isEqual,x as isSameYear,w as isSameMonth,c as isSameDay,v as isSameHour,U as isAfter,o as endOfYear,h as endOfDay,V as isBefore,Y as isWithinInterval,n as startOfYear,m as startOfMonth,B as startOfDay,j as endOfMonth,p as endOfWeek,F as addYears,a as addMonths,l as addWeeks,b as addDays,C as addHours,k as addMinutes,E as addSeconds,T as getYear,P as getMonth,t as getDate,K as getHours,O as getMinutes,Q as getSeconds,N as getMilliseconds,a8 as setYear,z as setMonth,$ as setDate,a1 as setHours,a5 as setMinutes,a6 as setSeconds,a4 as setMilliseconds,I as getDaysInMonth,R as getWeek}from"./setYear-3ufv5yRD.js";import{e as enUS,s as startOfWeek}from"./en-US-DBFJNIH6.js";const{initPromise:initPromise$4}=iobroker_admin__mf_v__runtimeInit__mf_v__,res$4=initPromise$4.then(t=>t.loadShare("@iobroker/dm-gui-components",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),exportModule$3=await res$4.then(t=>t());var iobroker_admin__loadShare___mf_0_iobroker_mf_1_dm_mf_2_gui_mf_2_components__loadShare__=exportModule$3;const DeviceList=getDefaultExportFromCjs(iobroker_admin__loadShare___mf_0_iobroker_mf_1_dm_mf_2_gui_mf_2_components__loadShare__),{initPromise:initPromise$3}=iobroker_admin__mf_v__runtimeInit__mf_v__,res$3=initPromise$3.then(t=>t.loadShare("date-fns",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}}));await res$3.then(t=>t());const{initPromise:initPromise$2}=iobroker_admin__mf_v__runtimeInit__mf_v__,res$2=initPromise$2.then(t=>t.loadShare("date-fns/locale",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),exportModule$2=await res$2.then(t=>t());var iobroker_admin__loadShare__date_mf_2_fns_mf_1_locale__loadShare__=exportModule$2;const{initPromise:initPromise$1}=iobroker_admin__mf_v__runtimeInit__mf_v__,res$1=initPromise$1.then(t=>t.loadShare("leaflet-geosearch",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),exportModule$1=await res$1.then(t=>t());var iobroker_admin__loadShare__leaflet_mf_2_geosearch__loadShare__=exportModule$1;const{initPromise}=iobroker_admin__mf_v__runtimeInit__mf_v__,res=initPromise.then(t=>t.loadShare("semver",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),exportModule=await res.then(t=>t());var iobroker_admin__loadShare__semver__loadShare__=exportModule;const semver=getDefaultExportFromCjs(iobroker_admin__loadShare__semver__loadShare__);var createRoot,m=iobroker_admin__loadShare__react_mf_2_dom__loadShare__;createRoot=m.createRoot,m.hydrateRoot;const formatTokenMap={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyy:{sectionType:"year",contentType:"digit",maxLength:4},yyyy:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMMM:{sectionType:"month",contentType:"letter"},MMM:{sectionType:"month",contentType:"letter"},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"letter"},EE:{sectionType:"weekDay",contentType:"letter"},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},EEEEE:{sectionType:"weekDay",contentType:"letter"},i:{sectionType:"weekDay",contentType:"digit",maxLength:1},ii:"weekDay",iii:{sectionType:"weekDay",contentType:"letter"},iiii:{sectionType:"weekDay",contentType:"letter"},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},ee:"weekDay",eee:{sectionType:"weekDay",contentType:"letter"},eeee:{sectionType:"weekDay",contentType:"letter"},eeeee:{sectionType:"weekDay",contentType:"letter"},eeeeee:{sectionType:"weekDay",contentType:"letter"},c:{sectionType:"weekDay",contentType:"digit",maxLength:1},cc:"weekDay",ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},ccccc:{sectionType:"weekDay",contentType:"letter"},cccccc:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",aa:"meridiem",aaa:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},defaultFormats={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"do",weekday:"EEEE",weekdayShort:"EEEEEE",hours24h:"HH",hours12h:"hh",meridiem:"aa",minutes:"mm",seconds:"ss",fullDate:"PP",keyboardDate:"P",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"p",fullTime12h:"hh:mm aa",fullTime24h:"HH:mm",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aa",keyboardDateTime24h:"P HH:mm"};class AdapterDateFnsBase{constructor(e){this.isMUIAdapter=!0,this.isTimezoneCompatible=!1,this.lib=void 0,this.locale=void 0,this.formats=void 0,this.formatTokenMap=formatTokenMap,this.escapedCharacters={start:"'",end:"'"},this.longFormatters=void 0,this.date=r=>typeof r>"u"?new Date:r===null?null:new Date(r),this.getInvalidDate=()=>new Date("Invalid Date"),this.getTimezone=()=>"default",this.setTimezone=r=>r,this.toJsDate=r=>r,this.getCurrentLocaleCode=()=>this.locale.code,this.is12HourCycleInCurrentLocale=()=>/a/.test(this.locale.formatLong.time({width:"short"})),this.expandFormat=r=>{const l=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;return r.match(l).map(h=>{const d=h[0];if(d==="p"||d==="P"){const p=this.longFormatters[d];return p(h,this.locale.formatLong)}return h}).join("")},this.formatNumber=r=>r,this.getDayOfWeek=r=>r.getDay()+1;const{locale:a,formats:n,longFormatters:i,lib:o}=e;this.locale=a,this.formats=_extends$1({},defaultFormats,n),this.longFormatters=i,this.lib=o||"date-fns"}}class AdapterDateFns extends AdapterDateFnsBase{constructor({locale:e,formats:a}={}){super({locale:e??enUS,formats:a,longFormatters}),this.parse=(n,i)=>n===""?null:parse$1(n,i,new Date,{locale:this.locale}),this.isValid=n=>n==null?!1:isValid(n),this.format=(n,i)=>this.formatByString(n,this.formats[i]),this.formatByString=(n,i)=>format(n,i,{locale:this.locale}),this.isEqual=(n,i)=>n===null&&i===null?!0:n===null||i===null?!1:isEqual(n,i),this.isSameYear=(n,i)=>isSameYear(n,i),this.isSameMonth=(n,i)=>isSameMonth(n,i),this.isSameDay=(n,i)=>isSameDay(n,i),this.isSameHour=(n,i)=>isSameHour(n,i),this.isAfter=(n,i)=>isAfter(n,i),this.isAfterYear=(n,i)=>isAfter(n,endOfYear(i)),this.isAfterDay=(n,i)=>isAfter(n,endOfDay(i)),this.isBefore=(n,i)=>isBefore(n,i),this.isBeforeYear=(n,i)=>isBefore(n,this.startOfYear(i)),this.isBeforeDay=(n,i)=>isBefore(n,this.startOfDay(i)),this.isWithinRange=(n,[i,o])=>isWithinInterval(n,{start:i,end:o}),this.startOfYear=n=>startOfYear(n),this.startOfMonth=n=>startOfMonth(n),this.startOfWeek=n=>startOfWeek(n,{locale:this.locale}),this.startOfDay=n=>startOfDay(n),this.endOfYear=n=>endOfYear(n),this.endOfMonth=n=>endOfMonth(n),this.endOfWeek=n=>endOfWeek(n,{locale:this.locale}),this.endOfDay=n=>endOfDay(n),this.addYears=(n,i)=>addYears(n,i),this.addMonths=(n,i)=>addMonths(n,i),this.addWeeks=(n,i)=>addWeeks(n,i),this.addDays=(n,i)=>addDays(n,i),this.addHours=(n,i)=>addHours(n,i),this.addMinutes=(n,i)=>addMinutes(n,i),this.addSeconds=(n,i)=>addSeconds(n,i),this.getYear=n=>getYear(n),this.getMonth=n=>getMonth(n),this.getDate=n=>getDate(n),this.getHours=n=>getHours(n),this.getMinutes=n=>getMinutes(n),this.getSeconds=n=>getSeconds(n),this.getMilliseconds=n=>getMilliseconds(n),this.setYear=(n,i)=>setYear(n,i),this.setMonth=(n,i)=>setMonth(n,i),this.setDate=(n,i)=>setDate(n,i),this.setHours=(n,i)=>setHours(n,i),this.setMinutes=(n,i)=>setMinutes(n,i),this.setSeconds=(n,i)=>setSeconds(n,i),this.setMilliseconds=(n,i)=>setMilliseconds(n,i),this.getDaysInMonth=n=>getDaysInMonth(n),this.getWeekArray=n=>{const i=this.startOfWeek(this.startOfMonth(n)),o=this.endOfWeek(this.endOfMonth(n));let r=0,l=i;const h=[];for(;this.isBefore(l,o);){const d=Math.floor(r/7);h[d]=h[d]||[],h[d].push(l),l=this.addDays(l,1),r+=1}return h},this.getWeekNumber=n=>getWeek(n,{locale:this.locale}),this.getYearRange=([n,i])=>{const o=this.startOfYear(n),r=this.endOfYear(i),l=[];let h=o;for(;this.isBefore(h,r);)l.push(h),h=this.addYears(h,1);return l}}}const version$b="7.0.25",version$c={version:version$b},CONTROLLER_CHANGELOG_URL="https://github.com/ioBroker/ioBroker.js-controller/blob/master/CHANGELOG.md",AUTO_UPGRADE_SETTINGS=["none","patch","minor","major"],AUTO_UPGRADE_OPTIONS_MAPPING={none:"none",patch:"patch",minor:"patch & minor",major:"patch, minor & major"};function ip2int(t){return t.split(".").reduce((e,a)=>(e<<8)+parseInt(a,10),0)>>>0}function findNetworkAddressOfHost(t,e){var i,o;const a=(o=(i=t==null?void 0:t.native)==null?void 0:i.hardware)==null?void 0:o.networkInterfaces;if(!a)return null;let n=null;for(const r of Object.values(a))if(r)for(let l=0;l<r.length;l++){const h=r[l];h.internal||e.includes(":")&&h.family!=="IPv6"||e.includes(".")&&!e.match(/[^.\d]/)&&h.family!=="IPv4"||(e==="127.0.0.0"||e==="localhost"||e.match(/[^.\d]/)||h.family==="IPv4"&&e.includes(".")&&(ip2int(e)&ip2int(h.netmask))===(ip2int(h.address)&ip2int(h.netmask)))&&(n=h.address)}if(!n){for(const r of Object.values(a))if(r)for(let l=0;l<r.length;l++){const h=r[l];h.internal||e.includes(":")&&h.family!=="IPv6"||e.includes(".")&&!e.match(/[^.\d]/)&&h.family!=="IPv4"||(e==="127.0.0.0"||e==="localhost"||e.match(/[^.\d]/))&&(n=h.address)}}if(!n){for(const r of Object.values(a))if(r)for(let l=0;l<r.length;l++){const h=r[l];h.internal||(n=h.address)}}return n}function getHostname(t,e,a,n,i){var l,h;if(!(t!=null&&t.common))return null;let o;const r=(h=(l=e[`system.adapter.${i}`])==null?void 0:l.common)==null?void 0:h.host;if(t.common.host!==r){const d=a[`system.host.${t.common.host}`];if(d){const p=findNetworkAddressOfHost(d,n);if(p)o=p;else return console.warn(`Cannot find suitable IP in host ${t.common.host} for ${t._id}`),null}else return console.warn(`Cannot find host ${t.common.host} for ${t._id}`),null}else o=n;return o}function _replaceLink(t,e,a,n,i,o,r,l){n==="protocol"&&(n="secure");try{const h=e[`system.adapter.${a}`];if(t&&h)if(n==="secure")t=t.replace(`%${i}%`,h.native[n]?"https":"http");else{let d=h.native[n];if((n==="webinterfacePort"||n==="port")&&(!d||d==="0")&&(h.native.secure===!0?d=443:d=80),n==="bind"||n==="ip"){let p=h.native.bind||h.native.ip;p==="0.0.0.0"&&(p=getHostname(h,e,o,r,l)),t.includes(`%${i}%`)?t=t.replace(`%${i}%`,p||""):t=t.replace(`%native_${i}%`,p||"")}else t.includes(`%${i}%`)?t=t.replace(`%${i}%`,d):t=t.replace(`%native_${i}%`,d)}else console.log(`Cannot get link ${n}`),t=t.replace(`%${i}%`,"")}catch(h){console.log(h)}return t}function replaceLink(t,e,a,n){var r,l,h,d,p,u,s,b;const i=[];let o;if(t){const w=n.instances[`system.adapter.${e}.${a}`],k=(w==null?void 0:w.native)||{},x=t.match(/%(\w+)%/g);if(x)for(let I=0;I<x.length;I++){let N=x[I];if(N==="%ip%"){let O=k.bind||k.ip;(!O||O==="0.0.0.0")&&(O=getHostname(w,n.instances,n.hosts,n.hostname,n.adminInstance)),i.length?i.forEach(G=>G.url=G.url.replace("%ip%",O||"")):t=t.replace("%ip%",O||"")}else if(N==="%protocol%"){const O=k.secure===void 0?k.protocol:k.secure;let G;O===!0||O==="true"?G="https":O===!1||O==="false"||!O?G="http":G=O.toString().replace(/:$/,""),i.length?i.forEach(g=>g.url=g.url.replace("%protocol%",G)):t=t.replace("%protocol%",G)}else if(N==="%s%"){const O=k.secure===void 0?k.protocol:k.secure;let G;O===!0||O==="true"?G="s":O===!1||O==="false"||!O?G="":G=O.toString().replace(/:$/,""),i.length?i.forEach(g=>g.url=g.url.replace("%s%",G)):t=t.replace("%s%",G)}else if(N==="%instance%")t=t.replace("%instance%",a.toString()),i.length?i.forEach(O=>O.url=O.url.replace("%instance%",a.toString())):t=t.replace("%instance%",a.toString());else if(N=N.replace(/%/g,""),N.startsWith("native_")&&(N=N.substring(7)),N.includes("_")){const[O,G]=N.split("_");if(O.match(/\.[0-9]+$/))t=_replaceLink(t,n.instances,O,G,N,n.hosts,n.hostname,n.adminInstance),o=(b=(s=n.instances[`system.adapter.${O}`])==null?void 0:s.native)==null?void 0:b.port;else{let g;e===O?g=[`${e}.${a}`]:(g=Object.keys(n.instances).filter(v=>v.startsWith(`system.adapter.${O}.`)&&n.instances[v].common.enabled).map(v=>v.substring(15)),g.length||(g=Object.keys(n.instances).filter(v=>v.startsWith(`system.adapter.${O}.`)).map(v=>v.substring(15))));for(const v of g)if(i.length){const y=i.find(S=>S.instance===v);if(y)y.url=_replaceLink(y.url,n.instances,v,G,N,n.hosts,n.hostname,n.adminInstance);else{const S=_replaceLink(t,n.instances,v,G,N,n.hosts,n.hostname,n.adminInstance),z=(d=(h=n.instances[`system.adapter.${v}`])==null?void 0:h.native)==null?void 0:d.port;i.push({url:S,port:z,instance:v})}}else{const y=_replaceLink(t,n.instances,v,G,N,n.hosts,n.hostname,n.adminInstance),S=(u=(p=n.instances[`system.adapter.${v}`])==null?void 0:p.native)==null?void 0:u.port;i.push({url:y,port:S,instance:v})}}}else{const O=`${e}.${a}`;i.length?i.forEach(G=>G.url=_replaceLink(G.url,n.instances,O,N,N,n.hosts,n.hostname,n.adminInstance)):(t=_replaceLink(t,n.instances,O,N,N,n.hosts,n.hostname,n.adminInstance),o=(l=(r=n.instances[`system.adapter.${O}`])==null?void 0:r.native)==null?void 0:l.port)}}}return i.length?i:[{url:t,port:o}]}function applyReverseProxyToLink(t,e,a,n){return!t||!n||n.paths.forEach(i=>{var o;if(i.instance===e)t=i.path;else if(i.instance.startsWith("web.")){const r=a[`system.adapter.${i.instance}`];if((o=r==null?void 0:r.native)!=null&&o.port&&t.includes(`:${r.native.port}`)){const l=new RegExp(`^.*:${r.native.port}/`);t=t.replace(l,i.path)}}}),t}const ANSI_RESET=0,ANSI_RESET_COLOR=39,ANSI_RESET_BG_COLOR=49,ANSI_BOLD=1,ANSI_RESET_BOLD=22,STYLES={30:{color:"black"},31:{color:"red"},32:{color:"green"},33:{color:"yellow"},34:{color:"blue"},35:{color:"purple"},36:{color:"cyan"},37:{color:"white"},90:{color:"grey"},91:{color:"lightred"},92:{color:"lightgreen"},93:{color:"lightyellow"},94:{color:"lightblue"},95:{color:"lightpurple"},96:{color:"lightcyan"},97:{color:"white"},40:{backgroundColor:"black"},41:{backgroundColor:"red"},42:{backgroundColor:"green"},43:{backgroundColor:"yellow"},44:{backgroundColor:"blue"},45:{backgroundColor:"purple"},46:{backgroundColor:"cyan"},47:{backgroundColor:"white"},100:{backgroundColor:"grey"},101:{backgroundColor:"lightred"},102:{backgroundColor:"lightgreen"},103:{backgroundColor:"lightyellow"},104:{backgroundColor:"lightblue"},105:{backgroundColor:"lightpurple"},106:{backgroundColor:"lightcyan"},107:{backgroundColor:"white"}};class AdminUtils{static deepClone(e){return JSON.parse(JSON.stringify(e))}static formatRam(e){const a=Math.floor(e/1073741824*10)/10;e%=1024*1024*1024;const n=Math.floor(e/(1024*1024)*10)/10;let i="";return a>1?i+=`${a} GB`:i+=`${n} MB`,i}static isTouchDevice(){return"ontouchstart"in window||window.navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0}static formatSpeed(e){return`${e} MHz`}static formatBytes(e){if(Math.abs(e)<1024)return`${e} B`;const a=["KB","MB","GB"];let n=-1;do e/=1024,++n;while(Math.abs(e)>=1024&&n<a.length-1);return`${e.toFixed(1)} ${a[n]}`}static getFileExtension(e){const a=e.lastIndexOf(".");return a!==-1?e.substring(a+1).toLowerCase():null}static invertColor(e,a){if(e==null||e===""||typeof e!="string")return"";if(e.indexOf("#")===0&&(e=e.slice(1)),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e.length!==6)throw new Error("Invalid HEX color.");const n=parseInt(e.slice(0,2),16),i=parseInt(e.slice(2,4),16),o=parseInt(e.slice(4,6),16);if(a)return n*.299+i*.587+o*.114>186?"#000000":"#FFFFFF";const r=(255-n).toString(16),l=(255-i).toString(16),h=(255-o).toString(16);return`#${r.padStart(2,"0")}${l.padStart(2,"0")}${h.padStart(2,"0")}`}static formatSeconds(e,a){const n=Math.floor(e/86400);let i,o,r;e%=3600*24;const l=Math.floor(e/3600);l<10?r=`0${l}`:r=l.toString(),e%=3600;const h=Math.floor(e/60);h<10?i=`0${h}`:i=h.toString(),e%=60,e=Math.floor(e),e<10?o=`0${e}`:o=e.toString();let d="";return n&&(d+=`${n} ${a("daysShortText")} `),d+=`${r}:${i}:${o}`,d}static objectMap(e,a){const n=[];for(const i in e)n.push(a(e[i],i));return n}static fixAdminUI(e){if(e!=null&&e.common)if(!e.common.adminUI)e.common.noConfig?(e.common.adminUI||={},e.common.adminUI.config="none"):e.common.jsonConfig?(e.common.adminUI||={},e.common.adminUI.config="json"):e.common.materialize?(e.common.adminUI||={},e.common.adminUI.config="materialize"):(e.common.adminUI||={},e.common.adminUI.config="html"),e.common.jsonCustom?(e.common.adminUI||={},e.common.adminUI.custom="json"):e.common.supportCustoms&&(e.common.adminUI||={},e.common.adminUI.custom="json"),e.common.materializeTab&&e.common.adminTab?(e.common.adminUI||={},e.common.adminUI.tab="materialize"):e.common.adminTab&&(e.common.adminUI||={},e.common.adminUI.tab="html"),e.common.adminUI&&console.warn(`Please add to "${e._id.replace(/\.\d+$/,"")}" common.adminUI=${JSON.stringify(e.common.adminUI)}`);else{let a=!1;e.common.materializeTab&&e.common.adminTab?e.common.adminUI.tab!=="materialize"&&(e.common.adminUI.tab="materialize",a=!0):e.common.adminTab&&e.common.adminUI.tab!=="html"&&e.common.adminUI.tab!=="materialize"&&(e.common.adminUI.tab="html",a=!0),(e.common.jsonCustom||e.common.supportCustoms)&&e.common.adminUI.custom!=="json"&&(e.common.adminUI.custom="json",a=!0),e.common.noConfig?e.common.adminUI.config!=="none"&&(e.common.adminUI.config="none",a=!0):e.common.jsonConfig?(e.common.adminUI.config!=="json"&&(e.common.adminUI.config="json",a=!0),e.common.adminUI.config="json"):e.common.materialize?e.common.adminUI.config!=="materialize"&&(e.common.adminUI.config||(e.common.adminUI.config="materialize",a=!0)):e.common.adminUI.config||(e.common.adminUI.config="html",a=!0),a&&console.warn(`Please modify "${e._id.replace(/\.\d+$/,"")}" common.adminUI=${JSON.stringify(e.common.adminUI)}`)}}static parseColorMessage(e){if(e&&(e.includes("\x1B[")||e.includes("\x1B["))){let a=e.match(/\u001b\[\d+m/gi);if(a){const n=e,i=[];let o={};for(let r=0;r<a.length;r++){const l=e.indexOf(a[r]);l&&i.push({text:e.substring(0,l),style:{...o}});const h=parseInt(a[r].substring(2),10);STYLES[h]?Object.assign(o,STYLES[h]):ANSI_RESET_COLOR===h?delete o.color:ANSI_RESET_BG_COLOR===h?delete o.backgroundColor:ANSI_RESET_BOLD===h?delete o.fontWeight:ANSI_BOLD===h?o.fontWeight="bold":ANSI_RESET===h&&(o={}),e=e.substring(a[r].length+l)}return e&&i.push({text:e,style:{...o}}),{original:n,parts:i}}return e}return e}static PASSWORD_ERROR_LENGTH="Password must be at least 8 characters long and have numbers, upper and lower case letters";static PASSWORD_ERROR_NOT_EQUAL="Repeat password is not equal with password";static PASSWORD_ERROR_EMPTY="Empty password is not allowed";static PASSWORD_SET="***********";static SUPPORTED_DOC_LANGUAGES=["en","de","ru","zh-cn"];static checkPassword(e,a){return e||="",a||="",e&&a&&e!==AdminUtils.PASSWORD_SET&&a!==AdminUtils.PASSWORD_SET?e.length<8||!e.match(/\d/)||!e.match(/[a-z]/)||!e.match(/[A-Z]/)?AdminUtils.PASSWORD_ERROR_LENGTH:e!==a?AdminUtils.PASSWORD_ERROR_NOT_EQUAL:!1:e&&e!==AdminUtils.PASSWORD_SET?e.length<8||!e.match(/\d/)||!e.match(/[a-z]/)||!e.match(/[A-Z]/)?AdminUtils.PASSWORD_ERROR_LENGTH:!1:a&&a!==AdminUtils.PASSWORD_SET?a.length<8||!a.match(/\d/)||!a.match(/[a-z]/)||!a.match(/[A-Z]/)?AdminUtils.PASSWORD_ERROR_LENGTH:!1:e===AdminUtils.PASSWORD_SET||a===AdminUtils.PASSWORD_SET?!1:AdminUtils.PASSWORD_ERROR_EMPTY}static getDocsLinkForAdapter(e){const{adapterName:a}=e;let{lang:n}=e;return AdminUtils.SUPPORTED_DOC_LANGUAGES.includes(n)||(n="en"),`https://www.iobroker.net/#${n}/adapters/adapterref/iobroker.${a}/README.md`}static updateAvailable(e,a){try{return semver.gt(a,e)===!0}catch{return console.warn(`[ADAPTERS] Cannot compare "${a}" and "${e}"`),!1}}static getText(e,a){return typeof e=="object"?e?(e[a]||e.en||"").toString():"":e?e.toString():""}static clone(e){return JSON.parse(JSON.stringify(e))}static async getHref(e,a,n,i,o,r){var b,w,k;const l=await e.getObjects();let h=a.replace(/^tab-/,"");const d=h.match(/-(\d+)$/),p=d?parseInt(d[1],10):null;let u;if(l)if(p!==null){h=h.replace(/-(\d+)$/,"");const x=`system.adapter.${h}.${p}`;u=Object.keys(l).find(I=>I===x)}else{const x=`system.adapter.${h}.`;u=l&&Object.keys(l).find(I=>I.startsWith(x))}if(u=l==null?void 0:l[u],AdminUtils.fixAdminUI(u),!((b=u==null?void 0:u.common)!=null&&b.adminTab))return console.error(`Cannot find instance ${a}`),{href:"",adapterName:h,instanceNumber:p};let s=u.common.adminTab.link;if(s||(((w=u.common.adminUI)==null?void 0:w.tab)==="materialize"?s=`adapter/${h}/tab_m.html${p!=null?`?${p}`:""}`:s=`adapter/${h}/tab.html${p!=null?`?${p}`:""}`),!u.common.adminTab.singleton&&p!==null&&p!==void 0&&(s+=`${s.includes("?")?"&":"?"}instance=${p}`),s.includes("%")){let x;p===null?x=parseInt(u._id.split(".").pop(),10):x=p;const I=replaceLink(s,h,x,{hostname:n,instances:l,hosts:i,adminInstance:o});s=I?(k=I[0])==null?void 0:k.url:""}return s+=`${s.includes("?")?"&":"?"}newReact=true${p!=null?`&${p}`:""}&react=${r}`,{href:s,adapterName:h,instanceNumber:p}}}const ContextWrapper=iobroker_admin__loadShare__react__loadShare__.createContext({hostsUpdate:0,adaptersUpdate:0,hosts:null,repository:null,installed:null});function ContextWrapperProvider({children:t}){const[e,a]=iobroker_admin__loadShare__react__loadShare__.useState({hostsUpdate:0,adaptersUpdate:0,hosts:null,repository:null,installed:null}),n=iobroker_admin__loadShare__react__loadShare__.useMemo(()=>i=>{a(o=>Object.keys(o).length===Object.keys(i).length?{...i}:{...o,...i})},[a]);return iobroker_admin__loadShare__react__loadShare__.useEffect(()=>{if(e.hosts){const i=e.repository["js-controller"].version;let o=0;e.hosts.forEach(r=>{AdminUtils.updateAvailable(r.common.installedVersion,i)&&o++}),n({hostsUpdate:o})}if(e.installed){let i=0;Object.keys(e.installed).forEach(o=>{const r=e.installed[o],l=e.repository[o];o!=="js-controller"&&o!=="hosts"&&(r!=null&&r.version)&&(l!=null&&l.version)&&r.ignoreVersion!==l.version&&AdminUtils.updateAvailable(r.version,l.version)&&i++}),n({adaptersUpdate:i})}},[n,e.hosts,e.installed,e.repository]),jsxRuntimeExports.jsx(ContextWrapper.Provider,{value:e,children:t})}const DndContext=iobroker_admin__loadShare__react__loadShare__.createContext({dragDropManager:void 0});function _typeof(t){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(t)}function toPrimitive(t,e){if(_typeof(t)!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var n=a.call(t,e);if(_typeof(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function toPropertyKey(t){var e=toPrimitive(t,"string");return _typeof(e)=="symbol"?e:e+""}function _defineProperty$5(t,e,a){return(e=toPropertyKey(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function formatProdErrorMessage(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var $$observable=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),randomString=function(){return Math.random().toString(36).substring(7).split("").join(".")},ActionTypes={INIT:"@@redux/INIT"+randomString(),REPLACE:"@@redux/REPLACE"+randomString()};function isPlainObject$2(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function createStore(t,e,a){var n;if(typeof e=="function"&&typeof a=="function"||typeof a=="function"&&typeof arguments[3]=="function")throw new Error(formatProdErrorMessage(0));if(typeof e=="function"&&typeof a>"u"&&(a=e,e=void 0),typeof a<"u"){if(typeof a!="function")throw new Error(formatProdErrorMessage(1));return a(createStore)(t,e)}if(typeof t!="function")throw new Error(formatProdErrorMessage(2));var i=t,o=e,r=[],l=r,h=!1;function d(){l===r&&(l=r.slice())}function p(){if(h)throw new Error(formatProdErrorMessage(3));return o}function u(k){if(typeof k!="function")throw new Error(formatProdErrorMessage(4));if(h)throw new Error(formatProdErrorMessage(5));var x=!0;return d(),l.push(k),function(){if(x){if(h)throw new Error(formatProdErrorMessage(6));x=!1,d();var N=l.indexOf(k);l.splice(N,1),r=null}}}function s(k){if(!isPlainObject$2(k))throw new Error(formatProdErrorMessage(7));if(typeof k.type>"u")throw new Error(formatProdErrorMessage(8));if(h)throw new Error(formatProdErrorMessage(9));try{h=!0,o=i(o,k)}finally{h=!1}for(var x=r=l,I=0;I<x.length;I++){var N=x[I];N()}return k}function b(k){if(typeof k!="function")throw new Error(formatProdErrorMessage(10));i=k,s({type:ActionTypes.REPLACE})}function w(){var k,x=u;return k={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(formatProdErrorMessage(11));function O(){N.next&&N.next(p())}O();var G=x(O);return{unsubscribe:G}}},k[$$observable]=function(){return this},k}return s({type:ActionTypes.INIT}),n={dispatch:s,subscribe:u,getState:p,replaceReducer:b},n[$$observable]=w,n}function invariant$2(t,e,...a){if(isProduction()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let n;if(e===void 0)n=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;n=new Error(e.replace(/%s/g,function(){return a[i++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function isProduction(){return typeof process<"u"&&!0}function get(t,e,a){return e.split(".").reduce((n,i)=>n&&n[i]?n[i]:a||null,t)}function without$1(t,e){return t.filter(a=>a!==e)}function isObject(t){return typeof t=="object"}function xor(t,e){const a=new Map,n=o=>{a.set(o,a.has(o)?a.get(o)+1:1)};t.forEach(n),e.forEach(n);const i=[];return a.forEach((o,r)=>{o===1&&i.push(r)}),i}function intersection(t,e){return t.filter(a=>e.indexOf(a)>-1)}const INIT_COORDS="dnd-core/INIT_COORDS",BEGIN_DRAG="dnd-core/BEGIN_DRAG",PUBLISH_DRAG_SOURCE="dnd-core/PUBLISH_DRAG_SOURCE",HOVER="dnd-core/HOVER",DROP="dnd-core/DROP",END_DRAG="dnd-core/END_DRAG";function setClientOffset(t,e){return{type:INIT_COORDS,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const ResetCoordinatesAction={type:INIT_COORDS,payload:{clientOffset:null,sourceClientOffset:null}};function createBeginDrag(t){return function(a=[],n={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:r}=n,l=t.getMonitor(),h=t.getRegistry();t.dispatch(setClientOffset(o)),verifyInvariants$1(a,l,h);const d=getDraggableSource(a,l);if(d==null){t.dispatch(ResetCoordinatesAction);return}let p=null;if(o){if(!r)throw new Error("getSourceClientOffset must be defined");verifyGetSourceClientOffsetIsFunction(r),p=r(d)}t.dispatch(setClientOffset(o,p));const s=h.getSource(d).beginDrag(l,d);if(s==null)return;verifyItemIsObject(s),h.pinSource(d);const b=h.getSourceType(d);return{type:BEGIN_DRAG,payload:{itemType:b,item:s,sourceId:d,clientOffset:o||null,sourceClientOffset:p||null,isSourcePublic:!!i}}}}function verifyInvariants$1(t,e,a){invariant$2(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(n){invariant$2(a.getSource(n),"Expected sourceIds to be registered.")})}function verifyGetSourceClientOffsetIsFunction(t){invariant$2(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function verifyItemIsObject(t){invariant$2(isObject(t),"Item must be an object.")}function getDraggableSource(t,e){let a=null;for(let n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){a=t[n];break}return a}function _defineProperty$4(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function _objectSpread$5(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{},n=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(a).filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable}))),n.forEach(function(i){_defineProperty$4(t,i,a[i])})}return t}function createDrop(t){return function(a={}){const n=t.getMonitor(),i=t.getRegistry();verifyInvariants(n),getDroppableTargets(n).forEach((r,l)=>{const h=determineDropResult(r,l,i,n),d={type:DROP,payload:{dropResult:_objectSpread$5({},a,h)}};t.dispatch(d)})}}function verifyInvariants(t){invariant$2(t.isDragging(),"Cannot call drop while not dragging."),invariant$2(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function determineDropResult(t,e,a,n){const i=a.getTarget(t);let o=i?i.drop(n,t):void 0;return verifyDropResultType(o),typeof o>"u"&&(o=e===0?{}:n.getDropResult()),o}function verifyDropResultType(t){invariant$2(typeof t>"u"||isObject(t),"Drop result must either be an object or undefined.")}function getDroppableTargets(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function createEndDrag(t){return function(){const a=t.getMonitor(),n=t.getRegistry();verifyIsDragging(a);const i=a.getSourceId();return i!=null&&(n.getSource(i,!0).endDrag(a,i),n.unpinSource()),{type:END_DRAG}}}function verifyIsDragging(t){invariant$2(t.isDragging(),"Cannot call endDrag while not dragging.")}function matchesType(t,e){return e===null?t===null:Array.isArray(t)?t.some(a=>a===e):t===e}function createHover(t){return function(a,{clientOffset:n}={}){verifyTargetIdsIsArray(a);const i=a.slice(0),o=t.getMonitor(),r=t.getRegistry(),l=o.getItemType();return removeNonMatchingTargetIds(i,r,l),checkInvariants(i,o,r),hoverAllTargets(i,o,r),{type:HOVER,payload:{targetIds:i,clientOffset:n||null}}}}function verifyTargetIdsIsArray(t){invariant$2(Array.isArray(t),"Expected targetIds to be an array.")}function checkInvariants(t,e,a){invariant$2(e.isDragging(),"Cannot call hover while not dragging."),invariant$2(!e.didDrop(),"Cannot call hover after drop.");for(let n=0;n<t.length;n++){const i=t[n];invariant$2(t.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array.");const o=a.getTarget(i);invariant$2(o,"Expected targetIds to be registered.")}}function removeNonMatchingTargetIds(t,e,a){for(let n=t.length-1;n>=0;n--){const i=t[n],o=e.getTargetType(i);matchesType(o,a)||t.splice(n,1)}}function hoverAllTargets(t,e,a){t.forEach(function(n){a.getTarget(n).hover(e,n)})}function createPublishDragSource(t){return function(){if(t.getMonitor().isDragging())return{type:PUBLISH_DRAG_SOURCE}}}function createDragDropActions(t){return{beginDrag:createBeginDrag(t),publishDragSource:createPublishDragSource(t),hover:createHover(t),drop:createDrop(t),endDrag:createEndDrag(t)}}class DragDropManagerImpl{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:a}=this.store;function n(o){return(...r)=>{const l=o.apply(e,r);typeof l<"u"&&a(l)}}const i=createDragDropActions(this);return Object.keys(i).reduce((o,r)=>{const l=i[r];return o[r]=n(l),o},{})}dispatch(e){this.store.dispatch(e)}constructor(e,a){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=a,e.subscribe(this.handleRefCountChange)}}function add$b(t,e){return{x:t.x+e.x,y:t.y+e.y}}function subtract(t,e){return{x:t.x-e.x,y:t.y-e.y}}function getSourceClientOffset(t){const{clientOffset:e,initialClientOffset:a,initialSourceClientOffset:n}=t;return!e||!a||!n?null:subtract(add$b(e,n),a)}function getDifferenceFromInitialOffset(t){const{clientOffset:e,initialClientOffset:a}=t;return!e||!a?null:subtract(e,a)}const NONE=[],ALL=[];NONE.__IS_NONE__=!0;ALL.__IS_ALL__=!0;function areDirty(t,e){return t===NONE?!1:t===ALL||typeof e>"u"?!0:intersection(e,t).length>0}class DragDropMonitorImpl{subscribeToStateChange(e,a={}){const{handlerIds:n}=a;invariant$2(typeof e=="function","listener must be a function."),invariant$2(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const o=()=>{const r=this.store.getState(),l=r.stateId;try{l===i||l===i+1&&!areDirty(r.dirtyHandlerIds,n)||e()}finally{i=l}};return this.store.subscribe(o)}subscribeToOffsetChange(e){invariant$2(typeof e=="function","listener must be a function.");let a=this.store.getState().dragOffset;const n=()=>{const i=this.store.getState().dragOffset;i!==a&&(a=i,e())};return this.store.subscribe(n)}canDragSource(e){if(!e)return!1;const a=this.registry.getSource(e);return invariant$2(a,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:a.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const a=this.registry.getTarget(e);if(invariant$2(a,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(e),i=this.getItemType();return matchesType(n,i)&&a.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const a=this.registry.getSource(e,!0);if(invariant$2(a,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(e),i=this.getItemType();return n!==i?!1:a.isDragging(this,e)}isOverTarget(e,a={shallow:!1}){if(!e)return!1;const{shallow:n}=a;if(!this.isDragging())return!1;const i=this.registry.getTargetType(e),o=this.getItemType();if(o&&!matchesType(i,o))return!1;const r=this.getTargetIds();if(!r.length)return!1;const l=r.indexOf(e);return n?l===r.length-1:l>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return getSourceClientOffset(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return getDifferenceFromInitialOffset(this.store.getState().dragOffset)}constructor(e,a){this.store=e,this.registry=a}}const scope=typeof global<"u"?global:self,BrowserMutationObserver=scope.MutationObserver||scope.WebKitMutationObserver;function makeRequestCallFromTimer(t){return function(){const a=setTimeout(i,0),n=setInterval(i,50);function i(){clearTimeout(a),clearInterval(n),t()}}}function makeRequestCallFromMutationObserver(t){let e=1;const a=new BrowserMutationObserver(t),n=document.createTextNode("");return a.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}const makeRequestCall=typeof BrowserMutationObserver=="function"?makeRequestCallFromMutationObserver:makeRequestCallFromTimer;class AsapQueue{enqueueTask(e){const{queue:a,requestFlush:n}=this;a.length||(n(),this.flushing=!0),a[a.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const a=this.index;if(this.index++,e[a].call(),this.index>this.capacity){for(let n=0,i=e.length-this.index;n<i;n++)e[n]=e[n+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=makeRequestCall(this.flush),this.requestErrorThrow=makeRequestCallFromTimer(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class RawTask{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,a){this.onError=e,this.release=a,this.task=null}}class TaskFactory{create(e){const a=this.freeTasks,n=a.length?a.pop():new RawTask(this.onError,i=>a[a.length]=i);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}const asapQueue=new AsapQueue,taskFactory=new TaskFactory(asapQueue.registerPendingError);function asap(t){asapQueue.enqueueTask(taskFactory.create(t))}const ADD_SOURCE="dnd-core/ADD_SOURCE",ADD_TARGET="dnd-core/ADD_TARGET",REMOVE_SOURCE="dnd-core/REMOVE_SOURCE",REMOVE_TARGET="dnd-core/REMOVE_TARGET";function addSource(t){return{type:ADD_SOURCE,payload:{sourceId:t}}}function addTarget(t){return{type:ADD_TARGET,payload:{targetId:t}}}function removeSource(t){return{type:REMOVE_SOURCE,payload:{sourceId:t}}}function removeTarget(t){return{type:REMOVE_TARGET,payload:{targetId:t}}}function validateSourceContract(t){invariant$2(typeof t.canDrag=="function","Expected canDrag to be a function."),invariant$2(typeof t.beginDrag=="function","Expected beginDrag to be a function."),invariant$2(typeof t.endDrag=="function","Expected endDrag to be a function.")}function validateTargetContract(t){invariant$2(typeof t.canDrop=="function","Expected canDrop to be a function."),invariant$2(typeof t.hover=="function","Expected hover to be a function."),invariant$2(typeof t.drop=="function","Expected beginDrag to be a function.")}function validateType(t,e){if(e&&Array.isArray(t)){t.forEach(a=>validateType(a,!1));return}invariant$2(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var HandlerRole;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(HandlerRole||(HandlerRole={}));let nextUniqueId=0;function getNextUniqueId(){return nextUniqueId++}function getNextHandlerId(t){const e=getNextUniqueId().toString();switch(t){case HandlerRole.SOURCE:return`S${e}`;case HandlerRole.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function parseRoleFromHandlerId(t){switch(t[0]){case"S":return HandlerRole.SOURCE;case"T":return HandlerRole.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function mapContainsValue(t,e){const a=t.entries();let n=!1;do{const{done:i,value:[,o]}=a.next();if(o===e)return!0;n=!!i}while(!n);return!1}class HandlerRegistryImpl{addSource(e,a){validateType(e),validateSourceContract(a);const n=this.addHandler(HandlerRole.SOURCE,e,a);return this.store.dispatch(addSource(n)),n}addTarget(e,a){validateType(e,!0),validateTargetContract(a);const n=this.addHandler(HandlerRole.TARGET,e,a);return this.store.dispatch(addTarget(n)),n}containsHandler(e){return mapContainsValue(this.dragSources,e)||mapContainsValue(this.dropTargets,e)}getSource(e,a=!1){return invariant$2(this.isSourceId(e),"Expected a valid source ID."),a&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return invariant$2(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return invariant$2(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return invariant$2(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return parseRoleFromHandlerId(e)===HandlerRole.SOURCE}isTargetId(e){return parseRoleFromHandlerId(e)===HandlerRole.TARGET}removeSource(e){invariant$2(this.getSource(e),"Expected an existing source."),this.store.dispatch(removeSource(e)),asap(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){invariant$2(this.getTarget(e),"Expected an existing target."),this.store.dispatch(removeTarget(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const a=this.getSource(e);invariant$2(a,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=a}unpinSource(){invariant$2(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,a,n){const i=getNextHandlerId(e);return this.types.set(i,a),e===HandlerRole.SOURCE?this.dragSources.set(i,n):e===HandlerRole.TARGET&&this.dropTargets.set(i,n),i}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const strictEquality=(t,e)=>t===e;function areCoordsEqual(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function areArraysEqual(t,e,a=strictEquality){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!a(t[n],e[n]))return!1;return!0}function reduce$5(t=NONE,e){switch(e.type){case HOVER:break;case ADD_SOURCE:case ADD_TARGET:case REMOVE_TARGET:case REMOVE_SOURCE:return NONE;case BEGIN_DRAG:case PUBLISH_DRAG_SOURCE:case END_DRAG:case DROP:default:return ALL}const{targetIds:a=[],prevTargetIds:n=[]}=e.payload,i=xor(a,n);if(!(i.length>0||!areArraysEqual(a,n)))return NONE;const r=n[n.length-1],l=a[a.length-1];return r!==l&&(r&&i.push(r),l&&i.push(l)),i}function _defineProperty$3(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function _objectSpread$4(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{},n=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(a).filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable}))),n.forEach(function(i){_defineProperty$3(t,i,a[i])})}return t}const initialState$1={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function reduce$4(t=initialState$1,e){const{payload:a}=e;switch(e.type){case INIT_COORDS:case BEGIN_DRAG:return{initialSourceClientOffset:a.sourceClientOffset,initialClientOffset:a.clientOffset,clientOffset:a.clientOffset};case HOVER:return areCoordsEqual(t.clientOffset,a.clientOffset)?t:_objectSpread$4({},t,{clientOffset:a.clientOffset});case END_DRAG:case DROP:return initialState$1;default:return t}}function _defineProperty$2(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function _objectSpread$3(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{},n=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(a).filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable}))),n.forEach(function(i){_defineProperty$2(t,i,a[i])})}return t}const initialState={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function reduce$3(t=initialState,e){const{payload:a}=e;switch(e.type){case BEGIN_DRAG:return _objectSpread$3({},t,{itemType:a.itemType,item:a.item,sourceId:a.sourceId,isSourcePublic:a.isSourcePublic,dropResult:null,didDrop:!1});case PUBLISH_DRAG_SOURCE:return _objectSpread$3({},t,{isSourcePublic:!0});case HOVER:return _objectSpread$3({},t,{targetIds:a.targetIds});case REMOVE_TARGET:return t.targetIds.indexOf(a.targetId)===-1?t:_objectSpread$3({},t,{targetIds:without$1(t.targetIds,a.targetId)});case DROP:return _objectSpread$3({},t,{dropResult:a.dropResult,didDrop:!0,targetIds:[]});case END_DRAG:return _objectSpread$3({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function reduce$2(t=0,e){switch(e.type){case ADD_SOURCE:case ADD_TARGET:return t+1;case REMOVE_SOURCE:case REMOVE_TARGET:return t-1;default:return t}}function reduce$1(t=0){return t+1}function _defineProperty$1(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function _objectSpread$2(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{},n=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(a).filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable}))),n.forEach(function(i){_defineProperty$1(t,i,a[i])})}return t}function reduce(t={},e){return{dirtyHandlerIds:reduce$5(t.dirtyHandlerIds,{type:e.type,payload:_objectSpread$2({},e.payload,{prevTargetIds:get(t,"dragOperation.targetIds",[])})}),dragOffset:reduce$4(t.dragOffset,e),refCount:reduce$2(t.refCount,e),dragOperation:reduce$3(t.dragOperation,e),stateId:reduce$1(t.stateId)}}function createDragDropManager(t,e=void 0,a={},n=!1){const i=makeStoreInstance(n),o=new DragDropMonitorImpl(i,new HandlerRegistryImpl(i)),r=new DragDropManagerImpl(i,o),l=t(r,e,a);return r.receiveBackend(l),r}function makeStoreInstance(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return createStore(reduce,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function _objectWithoutProperties(t,e){if(t==null)return{};var a=_objectWithoutPropertiesLoose(t,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}function _objectWithoutPropertiesLoose(t,e){if(t==null)return{};var a={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(a[i]=t[i]);return a}let refCount=0;const INSTANCE_SYM=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var DndProvider=iobroker_admin__loadShare__react__loadShare__.memo(function(e){var{children:a}=e,n=_objectWithoutProperties(e,["children"]);const[i,o]=getDndContextValue(n);return iobroker_admin__loadShare__react__loadShare__.useEffect(()=>{if(o){const r=getGlobalContext();return++refCount,()=>{--refCount===0&&(r[INSTANCE_SYM]=null)}}},[]),jsxRuntimeExports.jsx(DndContext.Provider,{value:i,children:a})});function getDndContextValue(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=createSingletonDndContext(t.backend,t.context,t.options,t.debugMode),a=!t.context;return[e,a]}function createSingletonDndContext(t,e=getGlobalContext(),a,n){const i=e;return i[INSTANCE_SYM]||(i[INSTANCE_SYM]={dragDropManager:createDragDropManager(t,e,a,n)}),i[INSTANCE_SYM]}function getGlobalContext(){return typeof global<"u"?global:window}var fastDeepEqual=function t(e,a){if(e===a)return!0;if(e&&a&&typeof e=="object"&&typeof a=="object"){if(e.constructor!==a.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=a.length)return!1;for(i=n;i--!==0;)if(!t(e[i],a[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===a.source&&e.flags===a.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===a.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===a.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(a).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(a,o[i]))return!1;for(i=n;i--!==0;){var r=o[i];if(!t(e[r],a[r]))return!1}return!0}return e!==e&&a!==a};const equal=getDefaultExportFromCjs(fastDeepEqual),useIsomorphicLayoutEffect=typeof window<"u"?iobroker_admin__loadShare__react__loadShare__.useLayoutEffect:iobroker_admin__loadShare__react__loadShare__.useEffect;function useCollector(t,e,a){const[n,i]=iobroker_admin__loadShare__react__loadShare__.useState(()=>e(t)),o=iobroker_admin__loadShare__react__loadShare__.useCallback(()=>{const r=e(t);equal(n,r)||(i(r),a&&a())},[n,t,a]);return useIsomorphicLayoutEffect(o),[n,o]}function useMonitorOutput(t,e,a){const[n,i]=useCollector(t,e,a);return useIsomorphicLayoutEffect(function(){const r=t.getHandlerId();if(r!=null)return t.subscribeToStateChange(i,{handlerIds:[r]})},[t,i]),n}function useCollectedProps(t,e,a){return useMonitorOutput(e,t||(()=>({})),()=>a.reconnect())}function useOptionalFactory(t,e){const a=[...e||[]];return e==null&&typeof t!="function"&&a.push(t),iobroker_admin__loadShare__react__loadShare__.useMemo(()=>typeof t=="function"?t():t,a)}function useConnectDragSource(t){return iobroker_admin__loadShare__react__loadShare__.useMemo(()=>t.hooks.dragSource(),[t])}function useConnectDragPreview(t){return iobroker_admin__loadShare__react__loadShare__.useMemo(()=>t.hooks.dragPreview(),[t])}let isCallingCanDrag=!1,isCallingIsDragging=!1;class DragSourceMonitorImpl{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){invariant$2(!isCallingCanDrag,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return isCallingCanDrag=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{isCallingCanDrag=!1}}isDragging(){if(!this.sourceId)return!1;invariant$2(!isCallingIsDragging,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return isCallingIsDragging=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{isCallingIsDragging=!1}}subscribeToStateChange(e,a){return this.internalMonitor.subscribeToStateChange(e,a)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,a){return this.internalMonitor.isOverTarget(e,a)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let isCallingCanDrop=!1;class DropTargetMonitorImpl{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,a){return this.internalMonitor.subscribeToStateChange(e,a)}canDrop(){if(!this.targetId)return!1;invariant$2(!isCallingCanDrop,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return isCallingCanDrop=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{isCallingCanDrop=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function registerTarget(t,e,a){const n=a.getRegistry(),i=n.addTarget(t,e);return[i,()=>n.removeTarget(i)]}function registerSource(t,e,a){const n=a.getRegistry(),i=n.addSource(t,e);return[i,()=>n.removeSource(i)]}function shallowEqual(t,e,a,n){let i;if(i!==void 0)return!!i;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const o=Object.keys(t),r=Object.keys(e);if(o.length!==r.length)return!1;const l=Object.prototype.hasOwnProperty.bind(e);for(let h=0;h<o.length;h++){const d=o[h];if(!l(d))return!1;const p=t[d],u=e[d];if(i=void 0,i===!1||i===void 0&&p!==u)return!1}return!0}function isRef(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function throwIfCompositeComponentElement(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function wrapHookToRecognizeElement(t){return(e=null,a=null)=>{if(!iobroker_admin__loadShare__react__loadShare__.isValidElement(e)){const o=e;return t(o,a),o}const n=e;return throwIfCompositeComponentElement(n),cloneWithRef(n,a?o=>t(o,a):t)}}function wrapConnectorHooks(t){const e={};return Object.keys(t).forEach(a=>{const n=t[a];if(a.endsWith("Ref"))e[a]=t[a];else{const i=wrapHookToRecognizeElement(n);e[a]=()=>i}}),e}function setRef(t,e){typeof t=="function"?t(e):t.current=e}function cloneWithRef(t,e){const a=t.ref;return invariant$2(typeof a!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),a?iobroker_admin__loadShare__react__loadShare__.cloneElement(t,{ref:n=>{setRef(a,n),setRef(e,n)}}):iobroker_admin__loadShare__react__loadShare__.cloneElement(t,{ref:e})}class SourceConnector{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,a=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return a&&this.disconnectDragSource(),this.handlerId?e?(a&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),a):(this.lastConnectedDragSource=e,a):a}reconnectDragPreview(e=!1){const a=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),!!this.handlerId){if(!a){this.lastConnectedDragPreview=a;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=a,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,a,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!shallowEqual(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!shallowEqual(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=wrapConnectorHooks({dragSource:(a,n)=>{this.clearDragSource(),this.dragSourceOptions=n||null,isRef(a)?this.dragSourceRef=a:this.dragSourceNode=a,this.reconnectDragSource()},dragPreview:(a,n)=>{this.clearDragPreview(),this.dragPreviewOptions=n||null,isRef(a)?this.dragPreviewRef=a:this.dragPreviewNode=a,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class TargetConnector{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const a=this.dropTarget;if(this.handlerId){if(!a){this.lastConnectedDropTarget=a;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=a,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,a,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!shallowEqual(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=wrapConnectorHooks({dropTarget:(a,n)=>{this.clearDropTarget(),this.dropTargetOptions=n,isRef(a)?this.dropTargetRef=a:this.dropTargetNode=a,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function useDragDropManager(){const{dragDropManager:t}=iobroker_admin__loadShare__react__loadShare__.useContext(DndContext);return invariant$2(t!=null,"Expected drag drop context"),t}function useDragSourceConnector(t,e){const a=useDragDropManager(),n=iobroker_admin__loadShare__react__loadShare__.useMemo(()=>new SourceConnector(a.getBackend()),[a]);return useIsomorphicLayoutEffect(()=>(n.dragSourceOptions=t||null,n.reconnect(),()=>n.disconnectDragSource()),[n,t]),useIsomorphicLayoutEffect(()=>(n.dragPreviewOptions=e||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,e]),n}function useDragSourceMonitor(){const t=useDragDropManager();return iobroker_admin__loadShare__react__loadShare__.useMemo(()=>new DragSourceMonitorImpl(t),[t])}class DragSourceImpl{beginDrag(){const e=this.spec,a=this.monitor;let n=null;return typeof e.item=="object"?n=e.item:typeof e.item=="function"?n=e.item(a):n={},n??null}canDrag(){const e=this.spec,a=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(a):!0}isDragging(e,a){const n=this.spec,i=this.monitor,{isDragging:o}=n;return o?o(i):a===e.getSourceId()}endDrag(){const e=this.spec,a=this.monitor,n=this.connector,{end:i}=e;i&&i(a.getItem(),a),n.reconnect()}constructor(e,a,n){this.spec=e,this.monitor=a,this.connector=n}}function useDragSource(t,e,a){const n=iobroker_admin__loadShare__react__loadShare__.useMemo(()=>new DragSourceImpl(t,e,a),[e,a]);return iobroker_admin__loadShare__react__loadShare__.useEffect(()=>{n.spec=t},[t]),n}function useDragType(t){return iobroker_admin__loadShare__react__loadShare__.useMemo(()=>{const e=t.type;return invariant$2(e!=null,"spec.type must be defined"),e},[t])}function useRegisteredDragSource(t,e,a){const n=useDragDropManager(),i=useDragSource(t,e,a),o=useDragType(t);useIsomorphicLayoutEffect(function(){if(o!=null){const[l,h]=registerSource(o,i,n);return e.receiveHandlerId(l),a.receiveHandlerId(l),h}},[n,e,a,i,o])}function useDrag(t,e){const a=useOptionalFactory(t,e);invariant$2(!a.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const n=useDragSourceMonitor(),i=useDragSourceConnector(a.options,a.previewOptions);return useRegisteredDragSource(a,n,i),[useCollectedProps(a.collect,n,i),useConnectDragSource(i),useConnectDragPreview(i)]}function useDragLayer(t){const a=useDragDropManager().getMonitor(),[n,i]=useCollector(a,t);return iobroker_admin__loadShare__react__loadShare__.useEffect(()=>a.subscribeToOffsetChange(i)),iobroker_admin__loadShare__react__loadShare__.useEffect(()=>a.subscribeToStateChange(i)),n}function useConnectDropTarget(t){return iobroker_admin__loadShare__react__loadShare__.useMemo(()=>t.hooks.dropTarget(),[t])}function useDropTargetConnector(t){const e=useDragDropManager(),a=iobroker_admin__loadShare__react__loadShare__.useMemo(()=>new TargetConnector(e.getBackend()),[e]);return useIsomorphicLayoutEffect(()=>(a.dropTargetOptions=t||null,a.reconnect(),()=>a.disconnectDropTarget()),[t]),a}function useDropTargetMonitor(){const t=useDragDropManager();return iobroker_admin__loadShare__react__loadShare__.useMemo(()=>new DropTargetMonitorImpl(t),[t])}function useAccept(t){const{accept:e}=t;return iobroker_admin__loadShare__react__loadShare__.useMemo(()=>(invariant$2(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class DropTargetImpl{canDrop(){const e=this.spec,a=this.monitor;return e.canDrop?e.canDrop(a.getItem(),a):!0}hover(){const e=this.spec,a=this.monitor;e.hover&&e.hover(a.getItem(),a)}drop(){const e=this.spec,a=this.monitor;if(e.drop)return e.drop(a.getItem(),a)}constructor(e,a){this.spec=e,this.monitor=a}}function useDropTarget(t,e){const a=iobroker_admin__loadShare__react__loadShare__.useMemo(()=>new DropTargetImpl(t,e),[e]);return iobroker_admin__loadShare__react__loadShare__.useEffect(()=>{a.spec=t},[t]),a}function useRegisteredDropTarget(t,e,a){const n=useDragDropManager(),i=useDropTarget(t,e),o=useAccept(t);useIsomorphicLayoutEffect(function(){const[l,h]=registerTarget(o,i,n);return e.receiveHandlerId(l),a.receiveHandlerId(l),h},[n,e,i,a,o.map(r=>r.toString()).join("|")])}function useDrop(t,e){const a=useOptionalFactory(t,e),n=useDropTargetMonitor(),i=useDropTargetConnector(a.options);return useRegisteredDropTarget(a,n,i),[useCollectedProps(a.collect,n,i),useConnectDropTarget(i)]}function memoize(t){let e=null;return()=>(e==null&&(e=t()),e)}function without(t,e){return t.filter(a=>a!==e)}function union(t,e){const a=new Set,n=o=>a.add(o);t.forEach(n),e.forEach(n);const i=[];return a.forEach(o=>i.push(o)),i}class EnterLeaveCounter{enter(e){const a=this.entered.length,n=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(e));return this.entered=union(this.entered.filter(n),[e]),a===0&&this.entered.length>0}leave(e){const a=this.entered.length;return this.entered=without(this.entered.filter(this.isNodeInDocument),e),a>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class NativeDragSource{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const a={};Object.keys(this.config.exposeProperties).forEach(n=>{const i=this.config.exposeProperties[n];i!=null&&(a[n]={value:i(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,a)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,a){return a===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const FILE="__NATIVE_FILE__",URL$c="__NATIVE_URL__",TEXT="__NATIVE_TEXT__",HTML="__NATIVE_HTML__",NativeTypes=Object.freeze(Object.defineProperty({__proto__:null,FILE,HTML,TEXT,URL:URL$c},Symbol.toStringTag,{value:"Module"}));function getDataFromDataTransfer(t,e,a){const n=e.reduce((i,o)=>i||t.getData(o),"");return n??a}const nativeTypesConfig={[FILE]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[HTML]:{exposeProperties:{html:(t,e)=>getDataFromDataTransfer(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[URL$c]:{exposeProperties:{urls:(t,e)=>getDataFromDataTransfer(t,e,"").split(`
|
|
3
|
-
`),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[TEXT]:{exposeProperties:{text:(t,e)=>getDataFromDataTransfer(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function createNativeDragSource(t,e){const a=nativeTypesConfig[t];if(!a)throw new Error(`native type ${t} has no configuration`);const n=new NativeDragSource(a);return n.loadDataTransfer(e),n}function matchNativeItemType(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(nativeTypesConfig).filter(a=>{const n=nativeTypesConfig[a];return n!=null&&n.matchesTypes?n.matchesTypes.some(i=>e.indexOf(i)>-1):!1})[0]||null}const isFirefox=memoize(()=>/firefox/i.test(navigator.userAgent)),isSafari=memoize(()=>!!window.safari);class MonotonicInterpolant{interpolate(e){const{xs:a,ys:n,c1s:i,c2s:o,c3s:r}=this;let l=a.length-1;if(e===a[l])return n[l];let h=0,d=r.length-1,p;for(;h<=d;){p=Math.floor(.5*(h+d));const b=a[p];if(b<e)h=p+1;else if(b>e)d=p-1;else return n[p]}l=Math.max(0,d);const u=e-a[l],s=u*u;return n[l]+i[l]*u+o[l]*s+r[l]*u*s}constructor(e,a){const{length:n}=e,i=[];for(let b=0;b<n;b++)i.push(b);i.sort((b,w)=>e[b]<e[w]?-1:1);const o=[],r=[];let l,h;for(let b=0;b<n-1;b++)l=e[b+1]-e[b],h=a[b+1]-a[b],o.push(l),r.push(h/l);const d=[r[0]];for(let b=0;b<o.length-1;b++){const w=r[b],k=r[b+1];if(w*k<=0)d.push(0);else{l=o[b];const x=o[b+1],I=l+x;d.push(3*I/((I+x)/w+(I+l)/k))}}d.push(r[r.length-1]);const p=[],u=[];let s;for(let b=0;b<d.length-1;b++){s=r[b];const w=d[b],k=1/o[b],x=w+d[b+1]-s-s;p.push((s-w-x)*k),u.push(x*k*k)}this.xs=e,this.ys=a,this.c1s=d,this.c2s=p,this.c3s=u}}const ELEMENT_NODE$1=1;function getNodeClientOffset$1(t){const e=t.nodeType===ELEMENT_NODE$1?t:t.parentElement;if(!e)return null;const{top:a,left:n}=e.getBoundingClientRect();return{x:n,y:a}}function getEventClientOffset$1(t){return{x:t.clientX,y:t.clientY}}function isImageNode(t){var e;return t.nodeName==="IMG"&&(isFirefox()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function getDragPreviewSize(t,e,a,n){let i=t?e.width:a,o=t?e.height:n;return isSafari()&&t&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}function getDragPreviewOffset(t,e,a,n,i){const o=isImageNode(e),l=getNodeClientOffset$1(o?t:e),h={x:a.x-l.x,y:a.y-l.y},{offsetWidth:d,offsetHeight:p}=t,{anchorX:u,anchorY:s}=n,{dragPreviewWidth:b,dragPreviewHeight:w}=getDragPreviewSize(o,e,d,p),k=()=>{let v=new MonotonicInterpolant([0,.5,1],[h.y,h.y/p*w,h.y+w-p]).interpolate(s);return isSafari()&&o&&(v+=(window.devicePixelRatio-1)*w),v},x=()=>new MonotonicInterpolant([0,.5,1],[h.x,h.x/d*b,h.x+b-d]).interpolate(u),{offsetX:I,offsetY:N}=i,O=I===0||I,G=N===0||N;return{x:O?I:x(),y:G?N:k()}}let OptionsReader$1=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,a){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=a}};function _defineProperty(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function _objectSpread$1(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{},n=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(a).filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable}))),n.forEach(function(i){_defineProperty(t,i,a[i])})}return t}class HTML5BackendImpl{profile(){var e,a;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((a=this.dragOverTargetIds)===null||a===void 0?void 0:a.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var a;(a=this.window)===null||a===void 0||a.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,a,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,a),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,a,n){this.sourceNodes.set(e,a),this.sourceNodeOptions.set(e,n);const i=r=>this.handleDragStart(r,e),o=r=>this.handleSelectStart(r);return a.setAttribute("draggable","true"),a.addEventListener("dragstart",i),a.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),a.removeEventListener("dragstart",i),a.removeEventListener("selectstart",o),a.setAttribute("draggable","false")}}connectDropTarget(e,a){const n=r=>this.handleDragEnter(r,e),i=r=>this.handleDragOver(r,e),o=r=>this.handleDrop(r,e);return a.addEventListener("dragenter",n),a.addEventListener("dragover",i),a.addEventListener("drop",o),()=>{a.removeEventListener("dragenter",n),a.removeEventListener("dragover",i),a.removeEventListener("drop",o)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),a=this.sourceNodeOptions.get(e);return _objectSpread$1({dropEffect:this.altKeyPressed?"copy":"move"},a||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),a=this.sourcePreviewNodeOptions.get(e);return _objectSpread$1({anchorX:.5,anchorY:.5,captureDraggingState:!1},a||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(NativeTypes).some(a=>NativeTypes[a]===e)}beginDragNativeItem(e,a){this.clearCurrentDragSourceNode(),this.currentNativeSource=createNativeDragSource(e,a),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const a=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var n;return(n=this.rootElement)===null||n===void 0?void 0:n.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},a)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,a){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(a))}handleDragEnter(e,a){this.dragEnterTargetIds.unshift(a)}handleDragOver(e,a){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(a)}handleDrop(e,a){this.dropTargetIds.unshift(a)}constructor(e,a,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&getNodeClientOffset$1(o)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:o}=this;this.dragStartSourceIds=null;const r=getEventClientOffset$1(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:l}=i,h=matchNativeItemType(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const p=this.monitor.getSourceId(),u=this.sourceNodes.get(p),s=this.sourcePreviewNodes.get(p)||u;if(s){const{anchorX:b,anchorY:w,offsetX:k,offsetY:x}=this.getCurrentSourcePreviewNodeOptions(),O=getDragPreviewOffset(u,s,r,{anchorX:b,anchorY:w},{offsetX:k,offsetY:x});l.setDragImage(s,O.x,O.y)}}try{l==null||l.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:d}=this.getCurrentSourcePreviewNodeOptions();d?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(h)this.beginDragNativeItem(h);else{if(l&&!l.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:l}=i,h=matchNativeItemType(l);h&&this.beginDragNativeItem(h,l)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:o}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,o.length>0&&this.actions.hover(o,{clientOffset:getEventClientOffset$1(i)}),o.some(l=>this.monitor.canDropOnTarget(l))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:o}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=getEventClientOffset$1(i),this.scheduleHover(o),(o||[]).some(l=>this.monitor.canDropOnTarget(l))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var o;i.preventDefault(),(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}else matchNativeItemType(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:o}=this;this.dropTargetIds=[],this.actions.hover(o,{clientOffset:getEventClientOffset$1(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const o=i.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(i.preventDefault(),o.dragDrop()))},this.options=new OptionsReader$1(a,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new EnterLeaveCounter(this.isNodeInDocument)}}let emptyImage;function getEmptyImage(){return emptyImage||(emptyImage=new Image,emptyImage.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),emptyImage}const HTML5Backend=function(e,a,n){return new HTML5BackendImpl(e,a,n)};var ListenerType;(function(t){t.mouse="mouse",t.touch="touch",t.keyboard="keyboard"})(ListenerType||(ListenerType={}));class OptionsReader{get delay(){var e;return(e=this.args.delay)!==null&&e!==void 0?e:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var e;return(e=this.args.ignoreContextMenu)!==null&&e!==void 0?e:!1}get enableHoverOutsideTarget(){var e;return(e=this.args.enableHoverOutsideTarget)!==null&&e!==void 0?e:!1}get enableKeyboardEvents(){var e;return(e=this.args.enableKeyboardEvents)!==null&&e!==void 0?e:!1}get enableMouseEvents(){var e;return(e=this.args.enableMouseEvents)!==null&&e!==void 0?e:!1}get enableTouchEvents(){var e;return(e=this.args.enableTouchEvents)!==null&&e!==void 0?e:!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var e,a,n,i;return(i=(n=(e=this.args)===null||e===void 0?void 0:e.delayTouchStart)!==null&&n!==void 0?n:(a=this.args)===null||a===void 0?void 0:a.delay)!==null&&i!==void 0?i:0}get delayMouseStart(){var e,a,n,i;return(i=(n=(e=this.args)===null||e===void 0?void 0:e.delayMouseStart)!==null&&n!==void 0?n:(a=this.args)===null||a===void 0?void 0:a.delay)!==null&&i!==void 0?i:0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<"u")return window}get document(){var e;if(!((e=this.context)===null||e===void 0)&&e.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var e;return((e=this.args)===null||e===void 0?void 0:e.rootElement)||this.document}constructor(e,a){this.args=e,this.context=a}}function distance(t,e,a,n){return Math.sqrt(Math.pow(Math.abs(a-t),2)+Math.pow(Math.abs(n-e),2))}function inAngleRanges(t,e,a,n,i){if(!i)return!1;const o=Math.atan2(n-e,a-t)*180/Math.PI+180;for(let r=0;r<i.length;++r){const l=i[r];if(l&&(l.start==null||o>=l.start)&&(l.end==null||o<=l.end))return!0}return!1}const MouseButtons={Left:1},MouseButton={Left:0};function eventShouldStartDrag(t){return t.button===void 0||t.button===MouseButton.Left}function eventShouldEndDrag(t){return t.buttons===void 0||(t.buttons&MouseButtons.Left)===0}function isTouchEvent$1(t){return!!t.targetTouches}const ELEMENT_NODE=1;function getNodeClientOffset(t){const e=t.nodeType===ELEMENT_NODE?t:t.parentElement;if(!e)return;const{top:a,left:n}=e.getBoundingClientRect();return{x:n,y:a}}function getEventClientTouchOffset(t,e){if(t.targetTouches.length===1)return getEventClientOffset(t.targetTouches[0]);if(e&&t.touches.length===1&&t.touches[0].target===e.target)return getEventClientOffset(t.touches[0])}function getEventClientOffset(t,e){return isTouchEvent$1(t)?getEventClientTouchOffset(t,e):{x:t.clientX,y:t.clientY}}const supportsPassive=(()=>{let t=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get(){return t=!0,!0}}))}catch{}return t})(),eventNames={[ListenerType.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[ListenerType.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[ListenerType.keyboard]:{keydown:"keydown"}};class TouchBackendImpl{profile(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((e=this.dragOverTargetIds)===null||e===void 0?void 0:e.length)||0}}get document(){return this.options.document}setup(){const e=this.options.rootElement;e&&(invariant$2(!TouchBackendImpl.isSetUp,"Cannot have two Touch backends at the same time."),TouchBackendImpl.isSetUp=!0,this.addEventListener(e,"start",this.getTopMoveStartHandler()),this.addEventListener(e,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(e,"move",this.handleTopMove),this.addEventListener(e,"move",this.handleTopMoveCapture,!0),this.addEventListener(e,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(e,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(e,"keydown",this.handleCancelOnEscape,!0))}teardown(){const e=this.options.rootElement;e&&(TouchBackendImpl.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(e,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(e,"start",this.handleTopMoveStart),this.removeEventListener(e,"move",this.handleTopMoveCapture,!0),this.removeEventListener(e,"move",this.handleTopMove),this.removeEventListener(e,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(e,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(e,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(e,a,n,i=!1){const o=supportsPassive?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(r){const l=eventNames[r][a];l&&e.addEventListener(l,n,o)})}removeEventListener(e,a,n,i=!1){const o=supportsPassive?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(r){const l=eventNames[r][a];l&&e.removeEventListener(l,n,o)})}connectDragSource(e,a){const n=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,a),this.addEventListener(a,"start",n),()=>{this.sourceNodes.delete(e),this.removeEventListener(a,"start",n)}}connectDragPreview(e,a,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,a),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDropTarget(e,a){const n=this.options.rootElement;if(!this.document||!n)return()=>{};const i=o=>{if(!this.document||!n||!this.monitor.isDragging())return;let r;switch(o.type){case eventNames.mouse.move:r={x:o.clientX,y:o.clientY};break;case eventNames.touch.move:var l,h;r={x:((l=o.touches[0])===null||l===void 0?void 0:l.clientX)||0,y:((h=o.touches[0])===null||h===void 0?void 0:h.clientY)||0};break}const d=r!=null?this.document.elementFromPoint(r.x,r.y):void 0,p=d&&a.contains(d);if(d===a||p)return this.handleMove(o,e)};return this.addEventListener(this.document.body,"move",i),this.targetNodes.set(e,a),()=>{this.document&&(this.targetNodes.delete(e),this.removeEventListener(this.document.body,"move",i))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(e){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{e&&!e.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),!(!e||!e.parentElement)&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(e,a,n){this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&getNodeClientOffset(o)},this.handleTopMoveStartCapture=i=>{eventShouldStartDrag(i)&&(this.moveStartSourceIds=[])},this.handleMoveStart=i=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(i)},this.handleTopMoveStart=i=>{if(!eventShouldStartDrag(i))return;const o=getEventClientOffset(i);o&&(isTouchEvent$1(i)&&(this.lastTargetTouchFallback=i.targetTouches[0]),this._mouseClientOffset=o),this.waitingForDelay=!1},this.handleTopMoveStartDelay=i=>{if(!eventShouldStartDrag(i))return;const o=i.type===eventNames.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,i),o),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(i,o)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(o)},this.handleTopMove=i=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:o,dragOverTargetIds:r}=this,l=this.options.enableHoverOutsideTarget,h=getEventClientOffset(i,this.lastTargetTouchFallback);if(!h)return;if(this._isScrolling||!this.monitor.isDragging()&&inAngleRanges(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,h.x,h.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&o&&distance(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,h.x,h.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(o,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const d=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(d),this.actions.publishDragSource(),i.cancelable&&i.preventDefault();const p=(r||[]).map(w=>this.targetNodes.get(w)).filter(w=>!!w),u=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(h.x,h.y,p):this.document.elementsFromPoint(h.x,h.y),s=[];for(const w in u){if(!u.hasOwnProperty(w))continue;let k=u[w];for(k!=null&&s.push(k);k;)k=k.parentElement,k&&s.indexOf(k)===-1&&s.push(k)}const b=s.filter(w=>p.indexOf(w)>-1).map(w=>this._getDropTargetId(w)).filter(w=>!!w).filter((w,k,x)=>x.indexOf(w)===k);if(l)for(const w in this.targetNodes){const k=this.targetNodes.get(w);if(d&&k&&k.contains(d)&&b.indexOf(w)===-1){b.unshift(w);break}}b.reverse(),this.actions.hover(b,{clientOffset:h})},this._getDropTargetId=i=>{const o=this.targetNodes.keys();let r=o.next();for(;r.done===!1;){const l=r.value;if(i===this.targetNodes.get(l))return l;r=o.next()}},this.handleTopMoveEndCapture=i=>{if(this._isScrolling=!1,this.lastTargetTouchFallback=void 0,!!eventShouldEndDrag(i)){if(!this.monitor.isDragging()||this.monitor.didDrop()){this.moveStartSourceIds=void 0;return}i.cancelable&&i.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()}},this.handleCancelOnEscape=i=>{i.key==="Escape"&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new OptionsReader(n,a),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(ListenerType.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(ListenerType.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(ListenerType.keyboard)}}const TouchBackend=function(e,a={},n={}){return new TouchBackendImpl(e,a,n)},styles$x={message:{position:"relative",display:"block",width:"100%"},offline:{position:"relative",justifyContent:"space-between",display:"flex",width:"100%",alignItems:"center",opacity:.7,"@media screen and (max-width: 550px)":{flexWrap:"wrap"}},timestamp:{color:"text.secondary",position:"absolute",top:5,right:25,"@media screen and (max-width: 550px)":{fontSize:"2.9vw"}},simpleMessage:{fontFamily:"monospace",fontSize:14,ml:"20px",mb:"10px",width:"100%",display:"block",whiteSpace:"pre-wrap","@media screen and (max-width: 550px)":{fontSize:"2.9vw",ml:0}}};class NotificationMessage extends iobroker_admin__loadShare__react__loadShare__.Component{lastAlive=0;constructor(e){super(e),this.state={alive:!1,data:{},schema:null,updateData:0}}async componentDidMount(){var e,a;if((a=(e=this.props.message.contextData)==null?void 0:e.admin)!=null&&a.notification){const n=await this.props.socket.getState(`${this.props.instanceId}.alive`);this.lastAlive=n!=null&&n.val?Date.now():0,this.setState({alive:!!(n!=null&&n.val)},()=>this.getGui()),await this.props.socket.subscribeState(`${this.props.instanceId}.alive`,this.onAliveChanged)}}getGui(){var e,a,n,i;if(this.state.alive&&((a=(e=this.props.message.contextData)==null?void 0:e.admin)!=null&&a.notification)){const o=JSON.parse(JSON.stringify((i=(n=this.props.message.contextData)==null?void 0:n.admin)==null?void 0:i.notification));o.offlineMessage&&delete o.offlineMessage,this.props.socket.sendTo(this.props.instanceId.replace("system.adapter.",""),"admin:getNotificationSchema",o).then(r=>{r&&this.setState({schema:r.schema,data:r.data||this.state.data,updateData:this.state.updateData+1})})}}onAliveChanged=(e,a)=>{if(e===`${this.props.instanceId}.alive`&&a&&this.state.alive!==!!a.val){if(a.val){if(this.lastAlive&&Date.now()-this.lastAlive<500)return;this.lastAlive=Date.now()}this.setState({alive:!!a.val},()=>this.getGui())}};renderCustomGui(){var n,i;if(!this.state.schema||!this.state.data||!this.state.alive){const o=(i=(n=this.props.message.contextData)==null?void 0:n.admin)==null?void 0:i.notification;if(o){if(!this.state.alive){const r=o.offlineMessage;if(r){const l=typeof r=="string"?r:r[this.props.socket.systemLang]||r.en;return jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{sx:styles$x.offline,children:iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.Utils.renderTextWithA(l)})}return jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Typography,{children:iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.t("Instance is not alive")})}return jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.LinearProgress,{})}return null}const[,,e,a]=this.props.instanceId.split(".");return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[this.state.error&&jsxRuntimeExports.jsx("div",{style:{color:"red"},children:this.state.error}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_iobroker_mf_1_json_mf_2_config__loadShare__.JsonConfigComponent,{style:{width:"100%"},updateData:this.state.updateData,socket:this.props.socket,adapterName:e,instance:parseInt(a,10),schema:this.state.schema,data:this.state.data,onError:o=>this.setState({error:o}),onChange:o=>this.setState({data:o}),onBackEndCommand:o=>{o.schema&&this.setState({schema:o.schema,data:o.data||this.state.data}),(o.command==="refresh"||o.refresh)&&this.getGui(),o.command==="link"&&this.props.onLink(o)},embedded:!0,themeName:this.props.themeName,themeType:this.props.themeType,theme:this.props.theme,isFloatComma:this.props.isFloatComma,dateFormat:this.props.dateFormat})]})}renderSimpleMessage(){return this.props.message.message?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{sx:styles$x.simpleMessage,children:iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.Utils.renderTextWithA(this.props.message.message)}):null}render(){return jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Typography,{component:"div",sx:styles$x.message,children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{sx:styles$x.timestamp,children:new Date(this.props.message.ts).toLocaleString()}),this.renderSimpleMessage(),this.renderCustomGui()]})}}const styles$w={root:t=>({backgroundColor:t.palette.background.paper,width:"100%",height:"auto",display:"flex",borderRadius:"4px",flexDirection:"column"}),paper:{maxWidth:1e3,width:"100%"},flex:{display:"flex"},overflowHidden:{overflow:"hidden"},overflowAuto:{overflowY:"auto"},column:{flexDirection:"column"},headerText:t=>({fontWeight:"bold",fontSize:20,color:t.palette.mode==="dark"?"#DDD":"#111"}),descriptionHeaderText:t=>({margin:"18px 0",color:t.palette.mode==="dark"?"#CCC":"#222"}),img2:{width:25,height:25,margin:"auto 0",mr:"10px",position:"relative","&:after":{content:'""',position:"absolute",zIndex:2,top:0,left:0,width:"100%",height:"100%",background:'url("img/no-image.svg") 100% 100% no-repeat',backgroundSize:"cover",backgroundColor:"#fff"}},heading:{display:"flex",alignItems:"center",overflow:"hidden",width:"100%"},headingTop:{display:"flex",alignItems:"center"},classNameBox:{p:"8px","@media screen and (max-width: 550px)":{p:"4px"}},textStyle:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","@media screen and (max-width: 550px)":{fontSize:"2.9vw"}},content:{overflow:"hidden"},buttonStyle:{m:"3px","@media screen and (max-width: 550px)":{fontSize:"2.9vw"}}};function Status$d({severity:t,isDark:e,...a}){return t==="notify"?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Notifications,{color:e?"primary":"secondary",...a}):t==="info"?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Info,{color:"info",...a}):jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Warning,{style:{color:"#ffca00"},...a})}function a11yProps$1(t){return{id:`scrollable-force-tab-${t}`,"aria-controls":`scrollable-force-tabpanel-${t}`}}const TabPanel$3=({children:t,index:e,sxBox:a,style:n})=>jsxRuntimeExports.jsx("div",{role:"tabpanel",id:`scrollable-force-tabpanel-${e}`,"aria-labelledby":`scrollable-force-tab-${e}`,style:n,children:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{sx:a,children:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Typography,{component:"div",children:t})})});function onLink(t,e,a){let n,i="";t.url?t.url.toString().startsWith("#")||t.url.toString().startsWith("/")?(n=t.target||"_self",i=t.url):t.url.startsWith("http://")||t.url.startsWith("https://")?(n=t.target||"_blank",i=t.url):(i=`#tab-instances/config/${e}/${t.url}`,n=t.target||"_self"):(i=`#tab-instances/config/${e}`,n=t.target||"_self"),n==="_self"?(setTimeout(o=>{o.startsWith("#")?window.location.hash=o:o.startsWith("/")?i=`${window.location.protocol}:${window.location.host}${i}`:(o.startsWith("http://")||o.startsWith("https://"))&&(window.location.href=o)},100,i),t.close&&typeof a=="function"&&a()):(i.startsWith("#")?i=`${window.location.protocol}:${window.location.host}${window.location.pathname}${i}`:i.startsWith("/")&&(i=`${window.location.protocol}:${window.location.host}${i}`),window.open(i,n))}const NotificationsDialog=({notifications:t,onClose:e,ackCallback:a,dateFormat:n,themeType:i,instances:o,themeName:r,theme:l,isFloatComma:h,socket:d})=>{const[p,u]=iobroker_admin__loadShare__react__loadShare__.useState(""),[s,b]=iobroker_admin__loadShare__react__loadShare__.useState([]),[w,k]=iobroker_admin__loadShare__react__loadShare__.useState(""),[x,I]=iobroker_admin__loadShare__react__loadShare__.useState(!0),[N,O]=iobroker_admin__loadShare__react__loadShare__.useState({}),G=(B,R)=>{I(!0),u(R),k("")},g=B=>(R,se)=>k(se?B:""),v=i==="dark",y=!!Object.values(o).find(B=>B.common.name==="notification-manager");iobroker_admin__loadShare__react__loadShare__.useEffect(()=>{const B={};let R="";for(const[se,ie]of Object.entries(t))for(const[he,Ce]of Object.entries(ie.result))if(he!=="system")for(const[ke,Q]of Object.entries(Ce.categories))B[he]=B[he]||{},B[he][ke]={...Q,host:se};if(Object.keys(B).map(se=>Object.keys(B[se]).map(ie=>R=R||`${se}--${ie}`)),p){const[se,ie]=p.split("--");if(!B[se])u(R);else if(!B[se][ie]){const he=Object.keys(B[se])[0];u(he?`${se}--${he}`:R)}}else u(R);O(B)},[o,t,p]);const[S,z]=p.split("--"),H=S&&z?N[S][z]:null;return jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Dialog,{onClose:()=>e(),open:!0,sx:{"& .MuiDialog-paper":styles$w.paper},children:[jsxRuntimeExports.jsxs("h2",{style:styles$w.headingTop,children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Notifications,{sx:{color:"primary.main"},style:{fontSize:36,marginLeft:25,marginRight:10}}),iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.t("Notifications"),y?null:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Tooltip,{sx:{position:"absolute",right:24,color:"text.primary"},title:iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.t('Tip: Use the "notification-manager" adapter to receive notifications automatically via messaging adapters.'),slotProps:{popper:{sx:{pointerEvents:"none"}}},children:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Info,{})})]}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.DialogContent,{style:{...styles$w.flex,...styles$w.overflowHidden},dividers:!0,children:jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{component:"div",sx:styles$w.root,children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.AppBar,{position:"static",color:"default",children:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Tabs,{value:p,onChange:G,variant:"scrollable",scrollButtons:!0,indicatorColor:v?"primary":"secondary",textColor:v?"primary":"secondary",children:Object.keys(N).map(B=>Object.keys(N[B]).map((R,se)=>{const ie=N[B][R],he=`${B}--${R}`;return jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Tab,{disabled:s.includes(he),value:he,label:`${ie.name[iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.getLanguage()]}`,icon:jsxRuntimeExports.jsx(Status$d,{severity:ie.severity,isDark:v}),...a11yProps$1(se)},he)}))})}),H?jsxRuntimeExports.jsxs(TabPanel$3,{sxBox:styles$w.classNameBox,style:{...styles$w.overflowAuto,color:v?"black":void 0},index:p,children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{component:"div",sx:styles$w.headerText,style:{fontWeight:"bold"},children:H.name[iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.getLanguage()]}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{component:"div",sx:styles$w.descriptionHeaderText,children:H.description[iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.getLanguage()]}),jsxRuntimeExports.jsx("div",{children:H.instances?Object.keys(H.instances).map(B=>{var he,Ce;const R=`${p}--${B}`;x&&(g(R)("",!0),I(!1));const se=o&&o[B];let ie="img/no-image.svg";return(he=se==null?void 0:se.common)!=null&&he.icon&&((Ce=se==null?void 0:se.common)!=null&&Ce.name)&&(ie=`adapter/${se.common.name}/${se.common.icon}`),jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Accordion,{style:v?void 0:{backgroundColor:"#c0c0c052"},expanded:w===R,onChange:g(R),children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.AccordionSummary,{expandIcon:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.ExpandMore,{}),sx:{"& .MuiAccordionSummary-content":styles$w.content},"aria-controls":"panel1bh-content",id:"panel1bh-header",children:jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Typography,{style:styles$w.heading,children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.CardMedia,{sx:styles$w.img2,component:"img",image:ie}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{component:"div",sx:styles$w.textStyle,children:B.replace(/^system\.adapter\./,"")})]})}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.AccordionDetails,{style:styles$w.column,children:H.instances[B].messages.map((ke,Q)=>jsxRuntimeExports.jsx(NotificationMessage,{message:ke,dateFormat:n,instanceId:B,socket:d,themeType:i,themeName:r,theme:l,isFloatComma:h,onLink:ae=>onLink(ae,B,e)},Q))})]},R)}):null})]},`tabPanel-${z}`):null]})}),jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.DialogActions,{children:[S&&z?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Button,{variant:"contained",autoFocus:Object.keys(N[S]).length!==1,disabled:s.includes(z),style:s.includes(z)?{backgroundColor:"silver"}:void 0,sx:styles$w.buttonStyle,onClick:()=>{a(N[S][z].host,z),b([...s,z])},color:Object.keys(N[S]).length!==1?"primary":"grey",startIcon:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Check,{}),children:iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.t("Acknowledge")}):null,S&&z&&Object.keys(N[S]).length===1&&jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Button,{variant:"contained",disabled:s.includes(z),sx:styles$w.buttonStyle,style:s.includes(z)?{backgroundColor:"silver"}:void 0,onClick:()=>{b([...s,z]),a(N[S][z].host,z),e()},startIcon:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Check,{}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Close,{})]}),color:"primary",children:iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.t("Acknowledge & close")}),jsxRuntimeExports.jsx("div",{style:{flexGrow:1}}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Button,{id:"notifications-dialog-close",variant:"contained",onClick:()=>e(),startIcon:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Close,{}),color:"grey",children:iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.t("Close")})]})]})},styles$v={log:{height:400,width:860,padding:8,overflowY:"auto"},logNoSpacing:{height:"100%",width:"calc(100% - 8px)",marginLeft:8,padding:8,overflowY:"auto"},error:{color:"#f44336"},info:{color:"#2196f3"},warn:{color:"#ffc107"}};let Command$b=class ql extends iobroker_admin__loadShare__react__loadShare__.Component{logRef;static pattern=["error","warn","info"];regExp;constructor(e){super(e),this.state={log:[`$ iobroker ${e.cmd||""}`],init:!1,max:null,value:null,moreChecked:!0,stopped:!1},this.logRef=React.createRef(),this.regExp=new RegExp(ql.pattern.join("|"),"i")}componentDidMount(){this.props.ready&&this.props.cmd&&(console.log(`STARTED: ${this.props.cmd}`),this.executeCommand())}componentDidUpdate(){var e;!this.state.init&&this.props.ready&&this.props.cmd&&this.executeCommand(),this.props.logsRead&&JSON.stringify(this.props.logsRead)!==JSON.stringify(this.state.log)&&this.setState({log:this.props.logsRead}),(e=this.logRef.current)==null||e.scrollIntoView()}executeCommand(){var i;this.setState({init:!0},()=>this.props.onSetCommandRunning&&this.props.onSetCommandRunning(!0)),this.props.socket.registerCmdStdoutHandler(this.cmdStdoutHandler.bind(this)),this.props.socket.registerCmdStderrHandler(this.cmdStderrHandler.bind(this)),this.props.socket.registerCmdExitHandler(this.cmdExitHandler.bind(this));const e=Math.floor(Math.random()*268435454)+1;this.setState({activeCmdId:e});const a=this.props.host.startsWith("system.host.")?this.props.host:`system.host.${this.props.host}`;this.props.socket.cmdExec.bind(this.props.socket)(a,this.props.cmd,e,void 0,(i=this.props.files)!=null&&i.length?this.props.files:void 0).catch(o=>console.log(o))}cmdStdoutHandler(e,a){if(this.state.activeCmdId&&this.state.activeCmdId===e){const n=this.state.log.slice();n.push(a);const i=a.match(/^upload \[(\d+)]/),o=i?null:a.match(/^got [-_:/\\.\w\d]+\/admin$/),r=o?null:a.match(/^got [-_:/\\.\w\d]+\/www$/);let l=this.state.max,h=null;i?(l=l||parseInt(i[1],10),h=parseInt(i[1],10)):(o||r)&&(l=null),this.setState({log:n,max:l,value:h}),console.log("cmdStdout")}}cmdStderrHandler(e,a){if(this.state.activeCmdId&&this.state.activeCmdId===e){const n=this.state.log.slice();n.push(a),this.setState({log:n}),console.log("cmdStderr"),console.log(e),console.log(a)}}cmdExitHandler(e,a){if(this.state.activeCmdId&&this.state.activeCmdId===e){const n=this.state.log.slice();if(!window.document.hidden&&a===0&&n.length&&n[n.length-1].endsWith("created")&&this.props.callback){const o=n[n.length-1].split(" ").find(r=>r.startsWith("system"));o&&setTimeout(r=>{this.props.socket.getObject(r).then(l=>{var h,d;AdminUtils.fixAdminUI(l),l&&((d=(h=l.common)==null?void 0:h.adminUI)==null?void 0:d.config)!=="none"&&iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.Router.doNavigate("tab-instances","config",r)})},1e3,o)}n.push(`${a!==0?"ERROR: ":""}Process exited with code ${a}`),this.setState({log:n,stopped:!0},()=>{this.props.onSetCommandRunning&&this.props.onSetCommandRunning(!1),a!==0||this.state.log[this.state.log.length-1].toLowerCase().includes("error")?this.props.errorFunc&&this.props.errorFunc(a,this.state.log):(this.props.performed&&this.props.performed(),this.props.onFinished(a,this.state.log)),console.log("cmdExit"),console.log(e),console.log(a),typeof this.props.callback=="function"&&this.props.callback(a)})}}colorize(e,a){if(a&&(e=e.substring(0,a)),e.search(this.regExp)!==-1){const n=[];for(;e.search(this.regExp)>=0;){const[i]=e.match(this.regExp),o=e.search(this.regExp);if(o>0){const l=e.substring(0,o),h=AdminUtils.parseColorMessage(l);n.push(jsxRuntimeExports.jsx("span",{children:typeof h=="object"?h.parts.map((d,p)=>jsxRuntimeExports.jsx("span",{style:d.style,children:d.text},p)):h},n.length)),e=e.replace(l,"")}const r=e.substring(0,i.length);if(r){const l=AdminUtils.parseColorMessage(r);n.push(jsxRuntimeExports.jsx("span",{style:styles$v[i.toLowerCase()],children:typeof l=="object"?l.parts.map((h,d)=>jsxRuntimeExports.jsx("span",{style:h.style,children:h.text},d)):l},n.length)),e=e.replace(r,"")}}if(e){const i=AdminUtils.parseColorMessage(e);n.push(jsxRuntimeExports.jsx("span",{children:typeof i=="object"?i.parts.map((o,r)=>jsxRuntimeExports.jsx("span",{style:o.style,children:o.text},r)):i},n.length))}return n}return e}getLog(){return this.state.log.map((e,a)=>jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Typography,{ref:a===this.state.log.length-1?this.logRef:void 0,component:"p",variant:"body2",children:this.colorize(e)},a))}render(){return jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Grid2,{style:this.props.noSpacing?{height:"100%",width:"100%"}:{},container:!0,direction:"column",spacing:this.props.noSpacing?0:2,children:[this.props.showElement===void 0||this.props.showElement===!0?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Grid2,{children:!this.state.stopped&&jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.LinearProgress,{style:this.props.commandError?{backgroundColor:"#f44336"}:null,variant:this.props.inBackground?"determinate":"indeterminate",value:this.state.max&&this.state.value?100-Math.round(this.state.value/this.state.max*100):this.props.commandError?0:100})}):null,jsxRuntimeExports.jsxs("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:this.props.inBackground?"space-between":"flex-end"},children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Typography,{style:this.props.inBackground?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{display:"none"},component:"div",children:this.colorize(this.state.log[this.state.log.length-1])}),this.props.showElement===void 0||this.props.showElement===!0?jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"end",gap:8,flexWrap:"nowrap"},children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{style:{whiteSpace:"nowrap"},sx:{"@media (max-width: 600px)":{display:"none"}},children:this.props.t("less output")}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Switch,{checked:this.state.moreChecked,onChange:e=>this.setState({moreChecked:e.target.checked}),color:"primary"}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{style:{whiteSpace:"nowrap"},sx:{"@media (max-width: 600px)":{display:"none"}},children:this.props.t("more output")})]}):null]}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Grid2,{style:this.props.noSpacing?{height:"calc(100% - 45px)",width:"100%"}:{},children:this.state.moreChecked&&jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Paper,{style:this.props.noSpacing?styles$v.logNoSpacing:styles$v.log,children:this.getLog()})})]})}};const styles$u={closeButton:t=>({position:"absolute",right:8,top:8,color:t.palette.grey[500]}),hiddenDialog:{display:"none"},dialogRoot:{height:"calc(100% - 64px)"}};class CommandDialog extends iobroker_admin__loadShare__react__loadShare__.Component{paperRef=React.createRef();constructor(e){super(e),this.state={progressText:"",isError:!1,closeOnReady:(window._localStorage||window.localStorage).getItem("CommandDialog.closeOnReady")==="true",dialogWidth:0}}componentDidMount(){window.addEventListener("resize",this.handleResize)}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}handleResize=()=>{this.paperRef.current&&(this.paperRef.current.offsetWidth||0)!==this.state.dialogWidth&&this.setState({dialogWidth:this.paperRef.current.offsetWidth||0})};componentDidUpdate(){var e,a;this.state.dialogWidth!==(((e=this.paperRef.current)==null?void 0:e.offsetWidth)||0)&&this.setState({dialogWidth:((a=this.paperRef.current)==null?void 0:a.offsetWidth)||0})}render(){return jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Dialog,{scroll:"paper",fullWidth:!0,sx:{"&.MuiDialog-root":this.props.visible?void 0:styles$u.hiddenDialog,"& .MuiDialog-paper":styles$u.dialogRoot},onClose:this.props.inBackground?this.props.onClose:this.props.onInBackground,open:!0,maxWidth:"md",ref:this.paperRef,children:[jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.DialogTitle,{children:[this.state.progressText||this.props.t("Running command"),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.IconButton,{size:"large",sx:styles$u.closeButton,onClick:this.props.onClose,disabled:this.props.inBackground,children:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Close,{})})]}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.DialogContent,{dividers:!0,style:{height:"100%"},children:jsxRuntimeExports.jsx(Command$b,{noSpacing:!0,ready:this.props.ready,host:this.props.host,socket:this.props.socket,t:this.props.t,inBackground:this.props.inBackground,commandError:this.props.commandError,errorFunc:()=>{this.setState({isError:!0}),this.props.errorFunc()},performed:this.props.performed,callback:this.props.callback,cmd:this.props.cmd,files:this.props.files,onFinished:()=>this.state.closeOnReady&&this.props.onClose(),onSetCommandRunning:e=>this.props.onSetCommandRunning(e)},"command")}),jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.DialogActions,{style:{justifyContent:"space-between",gap:8},children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.FormControlLabel,{style:{marginLeft:16},control:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Checkbox,{disabled:this.props.inBackground,checked:this.state.closeOnReady,onChange:e=>{this.setState({closeOnReady:e.target.checked}),(window._localStorage||window.localStorage).setItem("CommandDialog.closeOnReady",e.target.checked?"true":"false")}}),label:this.props.t("close on ready")}),jsxRuntimeExports.jsx("div",{style:{flexGrow:1}}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Button,{variant:"contained",autoFocus:!0,title:this.props.confirmText||this.props.t("In background"),disabled:this.props.inBackground,onClick:this.props.onInBackground,startIcon:this.state.dialogWidth>600?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.OpenInBrowser,{}):null,color:"primary",children:this.state.dialogWidth<=600?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.OpenInBrowser,{}):this.props.confirmText||this.props.t("In background")}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Button,{variant:"contained",disabled:!this.props.inBackground,onClick:this.props.onClose,color:"grey",style:{backgroundColor:this.state.isError?"#834141":void 0,color:this.state.isError?"#fff":void 0},startIcon:this.state.dialogWidth>600?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Close,{}):null,children:this.state.dialogWidth<=600?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Close,{}):this.props.t("Close")})]})]})}}var lodash$1={exports:{}};var lodash=lodash$1.exports;(function(t,e){(function(){var a,n="4.17.23",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",r="Expected a function",l="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",d=500,p="__lodash_placeholder__",u=1,s=2,b=4,w=1,k=2,x=1,I=2,N=4,O=8,G=16,g=32,v=64,y=128,S=256,z=512,H=30,B="...",R=800,se=16,ie=1,he=2,Ce=3,ke=1/0,Q=9007199254740991,ae=17976931348623157e292,A=NaN,de=4294967295,Ie=de-1,U=de>>>1,J=[["ary",y],["bind",x],["bindKey",I],["curry",O],["curryRight",G],["flip",z],["partial",g],["partialRight",v],["rearg",S]],W="[object Arguments]",me="[object Array]",we="[object AsyncFunction]",De="[object Boolean]",Ee="[object Date]",ge="[object DOMException]",Te="[object Error]",Ue="[object Function]",qe="[object GeneratorFunction]",ut="[object Map]",Je="[object Number]",Ze="[object Null]",at="[object Object]",yt="[object Promise]",nt="[object Proxy]",mt="[object RegExp]",st="[object Set]",la="[object String]",ea="[object Symbol]",K="[object Undefined]",te="[object WeakMap]",X="[object WeakSet]",pe="[object ArrayBuffer]",ze="[object DataView]",Ye="[object Float32Array]",lt="[object Float64Array]",rt="[object Int8Array]",Wt="[object Int16Array]",jt="[object Int32Array]",qt="[object Uint8Array]",ta="[object Uint8ClampedArray]",Pt="[object Uint16Array]",It="[object Uint32Array]",Vt=/\b__p \+= '';/g,$a=/\b(__p \+=) '' \+/g,wa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Aa=/&(?:amp|lt|gt|quot|#39);/g,Da=/[&<>"']/g,ya=RegExp(Aa.source),j=RegExp(Da.source),ne=/<%-([\s\S]+?)%>/g,L=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,ca=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qt=/^\w*$/,ua=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ve=/[\\^$.*+?()[\]{}|]/g,He=RegExp(Ve.source),Fe=/^\s+/,dt=/\s/,Rt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,gt=/\{\n\/\* \[wrapped with (.+)\] \*/,Za=/,? & /,Sa=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ua=/[()=,{}\[\]\/\s]/,sn=/\\(\\)?/g,An=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ta=/\w*$/,Ln=/^[-+]0x[0-9a-f]+$/i,Tn=/^0b[01]+$/i,Yt=/^\[object .+?Constructor\]$/,ht=/^0o[0-7]+$/i,gn=/^(?:0|[1-9]\d*)$/,bn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,yn=/($^)/,vn=/['\n\r\u2028\u2029\\]/g,Qa="\\ud800-\\udfff",jn="\\u0300-\\u036f",Xa="\\ufe20-\\ufe2f",en="\\u20d0-\\u20ff",Ot=jn+Xa+en,Ma="\\u2700-\\u27bf",ma="a-z\\xdf-\\xf6\\xf8-\\xff",La="\\xac\\xb1\\xd7\\xf7",Ha="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",bt="\\u2000-\\u206f",$n=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ga="A-Z\\xc0-\\xd6\\xd8-\\xde",ka="\\ufe0e\\ufe0f",Dt=La+Ha+bt+$n,Wa="['’]",ln="["+Qa+"]",xa="["+Dt+"]",ja="["+Ot+"]",Nn="\\d+",co="["+Ma+"]",tn="["+ma+"]",Pn="[^"+Qa+Dt+Nn+Ma+ma+Ga+"]",Na="\\ud83c[\\udffb-\\udfff]",On="(?:"+ja+"|"+Na+")",In="[^"+Qa+"]",pa="(?:\\ud83c[\\udde6-\\uddff]){2}",C="[\\ud800-\\udbff][\\udc00-\\udfff]",T="["+Ga+"]",D="\\u200d",Z="(?:"+tn+"|"+Pn+")",ue="(?:"+T+"|"+Pn+")",fe="(?:"+Wa+"(?:d|ll|m|re|s|t|ve))?",Se="(?:"+Wa+"(?:D|LL|M|RE|S|T|VE))?",je=On+"?",Be="["+ka+"]?",Ge="(?:"+D+"(?:"+[In,pa,C].join("|")+")"+Be+je+")*",vt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Qe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ct=Be+je+Ge,Nt="(?:"+[co,pa,C].join("|")+")"+ct,Ft="(?:"+[In+ja+"?",ja,pa,C,ln].join("|")+")",We=RegExp(Wa,"g"),$t=RegExp(ja,"g"),Kt=RegExp(Na+"(?="+Na+")|"+Ft+ct,"g"),ha=RegExp([T+"?"+tn+"+"+fe+"(?="+[xa,T,"$"].join("|")+")",ue+"+"+Se+"(?="+[xa,T+Z,"$"].join("|")+")",T+"?"+Z+"+"+fe,T+"+"+Se,Qe,vt,Nn,Nt].join("|"),"g"),uo=RegExp("["+D+Qa+Ot+ka+"]"),Zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Oo=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bo=-1,Ut={};Ut[Ye]=Ut[lt]=Ut[rt]=Ut[Wt]=Ut[jt]=Ut[qt]=Ut[ta]=Ut[Pt]=Ut[It]=!0,Ut[W]=Ut[me]=Ut[pe]=Ut[De]=Ut[ze]=Ut[Ee]=Ut[Te]=Ut[Ue]=Ut[ut]=Ut[Je]=Ut[at]=Ut[mt]=Ut[st]=Ut[la]=Ut[te]=!1;var wt={};wt[W]=wt[me]=wt[pe]=wt[ze]=wt[De]=wt[Ee]=wt[Ye]=wt[lt]=wt[rt]=wt[Wt]=wt[jt]=wt[ut]=wt[Je]=wt[at]=wt[mt]=wt[st]=wt[la]=wt[ea]=wt[qt]=wt[ta]=wt[Pt]=wt[It]=!0,wt[Te]=wt[Ue]=wt[te]=!1;var mo={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Qn={"&":"&","<":"<",">":">",'"':""","'":"'"},cn={"&":"&","<":"<",">":">",""":'"',"'":"'"},Bn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},So=parseFloat,ee=parseInt,xe=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,Ne=typeof self=="object"&&self&&self.Object===Object&&self,Xe=xe||Ne||Function("return this")(),aa=e&&!e.nodeType&&e,Xt=aa&&!0&&t&&!t.nodeType&&t,qa=Xt&&Xt.exports===aa,ra=qa&&xe.process,da=(function(){try{var be=Xt&&Xt.require&&Xt.require("util").types;return be||ra&&ra.binding&&ra.binding("util")}catch{}})(),wn=da&&da.isArrayBuffer,Sn=da&&da.isDate,Xn=da&&da.isMap,po=da&&da.isRegExp,eo=da&&da.isSet,Fn=da&&da.isTypedArray;function Pa(be,Re,Ae){switch(Ae.length){case 0:return be.call(Re);case 1:return be.call(Re,Ae[0]);case 2:return be.call(Re,Ae[0],Ae[1]);case 3:return be.call(Re,Ae[0],Ae[1],Ae[2])}return be.apply(Re,Ae)}function Qr(be,Re,Ae,ot){for(var St=-1,Bt=be==null?0:be.length;++St<Bt;){var ga=be[St];Re(ot,ga,Ae(ga),be)}return ot}function _a(be,Re){for(var Ae=-1,ot=be==null?0:be.length;++Ae<ot&&Re(be[Ae],Ae,be)!==!1;);return be}function cr(be,Re){for(var Ae=be==null?0:be.length;Ae--&&Re(be[Ae],Ae,be)!==!1;);return be}function Ia(be,Re){for(var Ae=-1,ot=be==null?0:be.length;++Ae<ot;)if(!Re(be[Ae],Ae,be))return!1;return!0}function Rn(be,Re){for(var Ae=-1,ot=be==null?0:be.length,St=0,Bt=[];++Ae<ot;){var ga=be[Ae];Re(ga,Ae,be)&&(Bt[St++]=ga)}return Bt}function ho(be,Re){var Ae=be==null?0:be.length;return!!Ae&&to(be,Re,0)>-1}function Fo(be,Re,Ae){for(var ot=-1,St=be==null?0:be.length;++ot<St;)if(Ae(Re,be[ot]))return!0;return!1}function Zt(be,Re){for(var Ae=-1,ot=be==null?0:be.length,St=Array(ot);++Ae<ot;)St[Ae]=Re(be[Ae],Ae,be);return St}function un(be,Re){for(var Ae=-1,ot=Re.length,St=be.length;++Ae<ot;)be[St+Ae]=Re[Ae];return be}function ko(be,Re,Ae,ot){var St=-1,Bt=be==null?0:be.length;for(ot&&Bt&&(Ae=be[++St]);++St<Bt;)Ae=Re(Ae,be[St],St,be);return Ae}function ur(be,Re,Ae,ot){var St=be==null?0:be.length;for(ot&&St&&(Ae=be[--St]);St--;)Ae=Re(Ae,be[St],St,be);return Ae}function Uo(be,Re){for(var Ae=-1,ot=be==null?0:be.length;++Ae<ot;)if(Re(be[Ae],Ae,be))return!0;return!1}var Ho=Wo("length");function dr(be){return be.split("")}function Xr(be){return be.match(Sa)||[]}function mr(be,Re,Ae){var ot;return Ae(be,function(St,Bt,ga){if(Re(St,Bt,ga))return ot=Bt,!1}),ot}function xo(be,Re,Ae,ot){for(var St=be.length,Bt=Ae+(ot?1:-1);ot?Bt--:++Bt<St;)if(Re(be[Bt],Bt,be))return Bt;return-1}function to(be,Re,Ae){return Re===Re?Kl(be,Re,Ae):xo(be,pr,Ae)}function ei(be,Re,Ae,ot){for(var St=Ae-1,Bt=be.length;++St<Bt;)if(ot(be[St],Re))return St;return-1}function pr(be){return be!==be}function Go(be,Re){var Ae=be==null?0:be.length;return Ae?qo(be,Re)/Ae:A}function Wo(be){return function(Re){return Re==null?a:Re[be]}}function Eo(be){return function(Re){return be==null?a:be[Re]}}function hr(be,Re,Ae,ot,St){return St(be,function(Bt,ga,Jt){Ae=ot?(ot=!1,Bt):Re(Ae,Bt,ga,Jt)}),Ae}function ti(be,Re){var Ae=be.length;for(be.sort(Re);Ae--;)be[Ae]=be[Ae].value;return be}function qo(be,Re){for(var Ae,ot=-1,St=be.length;++ot<St;){var Bt=Re(be[ot]);Bt!==a&&(Ae=Ae===a?Bt:Ae+Bt)}return Ae}function Vo(be,Re){for(var Ae=-1,ot=Array(be);++Ae<be;)ot[Ae]=Re(Ae);return ot}function Jo(be,Re){return Zt(Re,function(Ae){return[Ae,be[Ae]]})}function M(be){return be&&be.slice(0,Xi(be)+1).replace(Fe,"")}function F(be){return function(Re){return be(Re)}}function oe(be,Re){return Zt(Re,function(Ae){return be[Ae]})}function ce(be,Re){return be.has(Re)}function ye(be,Re){for(var Ae=-1,ot=be.length;++Ae<ot&&to(Re,be[Ae],0)>-1;);return Ae}function ve(be,Re){for(var Ae=be.length;Ae--&&to(Re,be[Ae],0)>-1;);return Ae}function Me(be,Re){for(var Ae=be.length,ot=0;Ae--;)be[Ae]===Re&&++ot;return ot}var Ke=Eo(mo),xt=Eo(Qn);function Ct(be){return"\\"+Bn[be]}function Ea(be,Re){return be==null?a:be[Re]}function fa(be){return uo.test(be)}function Vl(be){return Zn.test(be)}function Jl(be){for(var Re,Ae=[];!(Re=be.next()).done;)Ae.push(Re.value);return Ae}function ai(be){var Re=-1,Ae=Array(be.size);return be.forEach(function(ot,St){Ae[++Re]=[St,ot]}),Ae}function Qi(be,Re){return function(Ae){return be(Re(Ae))}}function ao(be,Re){for(var Ae=-1,ot=be.length,St=0,Bt=[];++Ae<ot;){var ga=be[Ae];(ga===Re||ga===p)&&(be[Ae]=p,Bt[St++]=Ae)}return Bt}function _r(be){var Re=-1,Ae=Array(be.size);return be.forEach(function(ot){Ae[++Re]=ot}),Ae}function Yl(be){var Re=-1,Ae=Array(be.size);return be.forEach(function(ot){Ae[++Re]=[ot,ot]}),Ae}function Kl(be,Re,Ae){for(var ot=Ae-1,St=be.length;++ot<St;)if(be[ot]===Re)return ot;return-1}function Zl(be,Re,Ae){for(var ot=Ae+1;ot--;)if(be[ot]===Re)return ot;return ot}function Co(be){return fa(be)?Xl(be):Ho(be)}function kn(be){return fa(be)?ec(be):dr(be)}function Xi(be){for(var Re=be.length;Re--&&dt.test(be.charAt(Re)););return Re}var Ql=Eo(cn);function Xl(be){for(var Re=Kt.lastIndex=0;Kt.test(be);)++Re;return Re}function ec(be){return be.match(Kt)||[]}function tc(be){return be.match(ha)||[]}var ac=(function be(Re){Re=Re==null?Xe:Ao.defaults(Xe.Object(),Re,Ao.pick(Xe,Oo));var Ae=Re.Array,ot=Re.Date,St=Re.Error,Bt=Re.Function,ga=Re.Math,Jt=Re.Object,ni=Re.RegExp,nc=Re.String,dn=Re.TypeError,fr=Ae.prototype,oc=Bt.prototype,jo=Jt.prototype,gr=Re["__core-js_shared__"],br=oc.toString,Ht=jo.hasOwnProperty,rc=0,es=(function(){var c=/[^.]+$/.exec(gr&&gr.keys&&gr.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""})(),yr=jo.toString,ic=br.call(Jt),sc=Xe._,cc=ni("^"+br.call(Ht).replace(Ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vr=qa?Re.Buffer:a,no=Re.Symbol,$r=Re.Uint8Array,as=vr?vr.allocUnsafe:a,wr=Qi(Jt.getPrototypeOf,Jt),ns=Jt.create,rs=jo.propertyIsEnumerable,Sr=fr.splice,is=no?no.isConcatSpreadable:a,Yo=no?no.iterator:a,_o=no?no.toStringTag:a,kr=(function(){try{var c=vo(Jt,"defineProperty");return c({},"",{}),c}catch{}})(),uc=Re.clearTimeout!==Xe.clearTimeout&&Re.clearTimeout,dc=ot&&ot.now!==Xe.Date.now&&ot.now,mc=Re.setTimeout!==Xe.setTimeout&&Re.setTimeout,xr=ga.ceil,Er=ga.floor,oi=Jt.getOwnPropertySymbols,pc=vr?vr.isBuffer:a,ss=Re.isFinite,hc=fr.join,_c=Qi(Jt.keys,Jt),ba=ga.max,Ra=ga.min,fc=ot.now,gc=Re.parseInt,ls=ga.random,bc=fr.reverse,ri=vo(Re,"DataView"),Ko=vo(Re,"Map"),ii=vo(Re,"Promise"),Io=vo(Re,"Set"),Zo=vo(Re,"WeakMap"),Qo=vo(Jt,"create"),Cr=Zo&&new Zo,Ro={},yc=$o(ri),vc=$o(Ko),$c=$o(ii),wc=$o(Io),Sc=$o(Zo),Ar=no?no.prototype:a,Xo=Ar?Ar.valueOf:a,cs=Ar?Ar.toString:a;function q(c){if(oa(c)&&!kt(c)&&!(c instanceof Mt)){if(c instanceof mn)return c;if(Ht.call(c,"__wrapped__"))return dl(c)}return new mn(c)}var zo=(function(){function c(){}return function(f){if(!na(f))return{};if(ns)return ns(f);c.prototype=f;var $=new c;return c.prototype=a,$}})();function Tr(){}function mn(c,f){this.__wrapped__=c,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=a}q.templateSettings={escape:ne,evaluate:L,interpolate:et,variable:"",imports:{_:q}},q.prototype=Tr.prototype,q.prototype.constructor=q,mn.prototype=zo(Tr.prototype),mn.prototype.constructor=mn;function Mt(c){this.__wrapped__=c,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=de,this.__views__=[]}function kc(){var c=new Mt(this.__wrapped__);return c.__actions__=Va(this.__actions__),c.__dir__=this.__dir__,c.__filtered__=this.__filtered__,c.__iteratees__=Va(this.__iteratees__),c.__takeCount__=this.__takeCount__,c.__views__=Va(this.__views__),c}function xc(){if(this.__filtered__){var c=new Mt(this);c.__dir__=-1,c.__filtered__=!0}else c=this.clone(),c.__dir__*=-1;return c}function Ec(){var c=this.__wrapped__.value(),f=this.__dir__,$=kt(c),E=f<0,P=$?c.length:0,Y=Pu(0,P,this.__views__),le=Y.start,_e=Y.end,$e=_e-le,Le=E?_e:le-1,Pe=this.__iteratees__,Oe=Pe.length,tt=0,it=Ra($e,this.__takeCount__);if(!$||!E&&P==$e&&it==$e)return Ds(c,this.__actions__);var _t=[];e:for(;$e--&&tt<it;){Le+=f;for(var At=-1,ft=c[Le];++At<Oe;){var zt=Pe[At],Lt=zt.iteratee,on=zt.type,Fa=Lt(ft);if(on==he)ft=Fa;else if(!Fa){if(on==ie)continue e;break e}}_t[tt++]=ft}return _t}Mt.prototype=zo(Tr.prototype),Mt.prototype.constructor=Mt;function fo(c){var f=-1,$=c==null?0:c.length;for(this.clear();++f<$;){var E=c[f];this.set(E[0],E[1])}}function Cc(){this.__data__=Qo?Qo(null):{},this.size=0}function Ac(c){var f=this.has(c)&&delete this.__data__[c];return this.size-=f?1:0,f}function Tc(c){var f=this.__data__;if(Qo){var $=f[c];return $===h?a:$}return Ht.call(f,c)?f[c]:a}function jc(c){var f=this.__data__;return Qo?f[c]!==a:Ht.call(f,c)}function Ic(c,f){var $=this.__data__;return this.size+=this.has(c)?0:1,$[c]=Qo&&f===a?h:f,this}fo.prototype.clear=Cc,fo.prototype.delete=Ac,fo.prototype.get=Tc,fo.prototype.has=jc,fo.prototype.set=Ic;function Un(c){var f=-1,$=c==null?0:c.length;for(this.clear();++f<$;){var E=c[f];this.set(E[0],E[1])}}function Rc(){this.__data__=[],this.size=0}function zc(c){var f=this.__data__,$=jr(f,c);if($<0)return!1;var E=f.length-1;return $==E?f.pop():Sr.call(f,$,1),--this.size,!0}function Dc(c){var f=this.__data__,$=jr(f,c);return $<0?a:f[$][1]}function Mc(c){return jr(this.__data__,c)>-1}function Lc(c,f){var $=this.__data__,E=jr($,c);return E<0?(++this.size,$.push([c,f])):$[E][1]=f,this}Un.prototype.clear=Rc,Un.prototype.delete=zc,Un.prototype.get=Dc,Un.prototype.has=Mc,Un.prototype.set=Lc;function Hn(c){var f=-1,$=c==null?0:c.length;for(this.clear();++f<$;){var E=c[f];this.set(E[0],E[1])}}function Nc(){this.size=0,this.__data__={hash:new fo,map:new(Ko||Un),string:new fo}}function Pc(c){var f=Ur(this,c).delete(c);return this.size-=f?1:0,f}function Oc(c){return Ur(this,c).get(c)}function Bc(c){return Ur(this,c).has(c)}function Fc(c,f){var $=Ur(this,c),E=$.size;return $.set(c,f),this.size+=$.size==E?0:1,this}Hn.prototype.clear=Nc,Hn.prototype.delete=Pc,Hn.prototype.get=Oc,Hn.prototype.has=Bc,Hn.prototype.set=Fc;function go(c){var f=-1,$=c==null?0:c.length;for(this.__data__=new Hn;++f<$;)this.add(c[f])}function Uc(c){return this.__data__.set(c,h),this}function Hc(c){return this.__data__.has(c)}go.prototype.add=go.prototype.push=Uc,go.prototype.has=Hc;function xn(c){var f=this.__data__=new Un(c);this.size=f.size}function Gc(){this.__data__=new Un,this.size=0}function Wc(c){var f=this.__data__,$=f.delete(c);return this.size=f.size,$}function qc(c){return this.__data__.get(c)}function Vc(c){return this.__data__.has(c)}function Jc(c,f){var $=this.__data__;if($ instanceof Un){var E=$.__data__;if(!Ko||E.length<i-1)return E.push([c,f]),this.size=++$.size,this;$=this.__data__=new Hn(E)}return $.set(c,f),this.size=$.size,this}xn.prototype.clear=Gc,xn.prototype.delete=Wc,xn.prototype.get=qc,xn.prototype.has=Vc,xn.prototype.set=Jc;function us(c,f){var $=kt(c),E=!$&&wo(c),P=!$&&!E&&lo(c),Y=!$&&!E&&!P&&No(c),le=$||E||P||Y,_e=le?Vo(c.length,nc):[],$e=_e.length;for(var Le in c)(f||Ht.call(c,Le))&&!(le&&(Le=="length"||P&&(Le=="offset"||Le=="parent")||Y&&(Le=="buffer"||Le=="byteLength"||Le=="byteOffset")||Vn(Le,$e)))&&_e.push(Le);return _e}function ds(c){var f=c.length;return f?c[gi(0,f-1)]:a}function Yc(c,f){return Hr(Va(c),bo(f,0,c.length))}function Kc(c){return Hr(Va(c))}function si(c,f,$){($!==a&&!En(c[f],$)||$===a&&!(f in c))&&Gn(c,f,$)}function er(c,f,$){var E=c[f];(!(Ht.call(c,f)&&En(E,$))||$===a&&!(f in c))&&Gn(c,f,$)}function jr(c,f){for(var $=c.length;$--;)if(En(c[$][0],f))return $;return-1}function Zc(c,f,$,E){return oo(c,function(P,Y,le){f(E,P,$(P),le)}),E}function ps(c,f){return c&&Dn(f,va(f),c)}function Qc(c,f){return c&&Dn(f,Ya(f),c)}function Gn(c,f,$){f=="__proto__"&&kr?kr(c,f,{configurable:!0,enumerable:!0,value:$,writable:!0}):c[f]=$}function li(c,f){for(var $=-1,E=f.length,P=Ae(E),Y=c==null;++$<E;)P[$]=Y?a:Ui(c,f[$]);return P}function bo(c,f,$){return c===c&&($!==a&&(c=c<=$?c:$),f!==a&&(c=c>=f?c:f)),c}function pn(c,f,$,E,P,Y){var le,_e=f&u,$e=f&s,Le=f&b;if($&&(le=P?$(c,E,P,Y):$(c)),le!==a)return le;if(!na(c))return c;var Pe=kt(c);if(Pe){if(le=Bu(c),!_e)return Va(c,le)}else{var Oe=za(c),tt=Oe==Ue||Oe==qe;if(lo(c))return Ns(c,_e);if(Oe==at||Oe==W||tt&&!P){if(le=$e||tt?{}:al(c),!_e)return $e?Tu(c,Qc(le,c)):Au(c,ps(le,c))}else{if(!wt[Oe])return P?c:{};le=Fu(c,Oe,_e)}}Y||(Y=new xn);var it=Y.get(c);if(it)return it;Y.set(c,le),Il(c)?c.forEach(function(ft){le.add(pn(ft,f,$,ft,c,Y))}):Tl(c)&&c.forEach(function(ft,zt){le.set(zt,pn(ft,f,$,zt,c,Y))});var _t=Le?$e?Ai:Ci:$e?Ya:va,At=Pe?a:_t(c);return _a(At||c,function(ft,zt){At&&(zt=ft,ft=c[zt]),er(le,zt,pn(ft,f,$,zt,c,Y))}),le}function Xc(c){var f=va(c);return function($){return hs($,c,f)}}function hs(c,f,$){var E=$.length;if(c==null)return!E;for(c=Jt(c);E--;){var P=$[E],Y=f[P],le=c[P];if(le===a&&!(P in c)||!Y(le))return!1}return!0}function _s(c,f,$){if(typeof c!="function")throw new dn(r);return sr(function(){c.apply(a,$)},f)}function tr(c,f,$,E){var P=-1,Y=ho,le=!0,_e=c.length,$e=[],Le=f.length;if(!_e)return $e;$&&(f=Zt(f,F($))),E?(Y=Fo,le=!1):f.length>=i&&(Y=ce,le=!1,f=new go(f));e:for(;++P<_e;){var Pe=c[P],Oe=$==null?Pe:$(Pe);if(Pe=E||Pe!==0?Pe:0,le&&Oe===Oe){for(var tt=Le;tt--;)if(f[tt]===Oe)continue e;$e.push(Pe)}else Y(f,Oe,E)||$e.push(Pe)}return $e}var oo=Us(zn),fs=Us(ui,!0);function eu(c,f){var $=!0;return oo(c,function(E,P,Y){return $=!!f(E,P,Y),$}),$}function Ir(c,f,$){for(var E=-1,P=c.length;++E<P;){var Y=c[E],le=f(Y);if(le!=null&&(_e===a?le===le&&!nn(le):$(le,_e)))var _e=le,$e=Y}return $e}function tu(c,f,$,E){var P=c.length;for($=Et($),$<0&&($=-$>P?0:P+$),E=E===a||E>P?P:Et(E),E<0&&(E+=P),E=$>E?0:zl(E);$<E;)c[$++]=f;return c}function gs(c,f){var $=[];return oo(c,function(E,P,Y){f(E,P,Y)&&$.push(E)}),$}function Ca(c,f,$,E,P){var Y=-1,le=c.length;for($||($=Hu),P||(P=[]);++Y<le;){var _e=c[Y];f>0&&$(_e)?f>1?Ca(_e,f-1,$,E,P):un(P,_e):E||(P[P.length]=_e)}return P}var ci=Hs(),bs=Hs(!0);function zn(c,f){return c&&ci(c,f,va)}function ui(c,f){return c&&bs(c,f,va)}function Rr(c,f){return Rn(f,function($){return Jn(c[$])})}function yo(c,f){f=io(f,c);for(var $=0,E=f.length;c!=null&&$<E;)c=c[Mn(f[$++])];return $&&$==E?c:a}function ys(c,f,$){var E=f(c);return kt(c)?E:un(E,$(c))}function Oa(c){return c==null?c===a?K:Ze:_o&&_o in Jt(c)?Nu(c):Ku(c)}function di(c,f){return c>f}function au(c,f){return c!=null&&Ht.call(c,f)}function nu(c,f){return c!=null&&f in Jt(c)}function ou(c,f,$){return c>=Ra(f,$)&&c<ba(f,$)}function mi(c,f,$){for(var E=$?Fo:ho,P=c[0].length,Y=c.length,le=Y,_e=Ae(Y),$e=1/0,Le=[];le--;){var Pe=c[le];le&&f&&(Pe=Zt(Pe,F(f))),$e=Ra(Pe.length,$e),_e[le]=!$&&(f||P>=120&&Pe.length>=120)?new go(le&&Pe):a}Pe=c[0];var Oe=-1,tt=_e[0];e:for(;++Oe<P&&Le.length<$e;){var it=Pe[Oe],_t=f?f(it):it;if(it=$||it!==0?it:0,!(tt?ce(tt,_t):E(Le,_t,$))){for(le=Y;--le;){var At=_e[le];if(!(At?ce(At,_t):E(c[le],_t,$)))continue e}tt&&tt.push(_t),Le.push(it)}}return Le}function ru(c,f,$,E){return zn(c,function(P,Y,le){f(E,$(P),Y,le)}),E}function ar(c,f,$){f=io(f,c),c=il(c,f);var E=c==null?c:c[Mn(_n(f))];return E==null?a:Pa(E,c,$)}function vs(c){return oa(c)&&Oa(c)==W}function iu(c){return oa(c)&&Oa(c)==pe}function su(c){return oa(c)&&Oa(c)==Ee}function nr(c,f,$,E,P){return c===f?!0:c==null||f==null||!oa(c)&&!oa(f)?c!==c&&f!==f:lu(c,f,$,E,nr,P)}function lu(c,f,$,E,P,Y){var le=kt(c),_e=kt(f),$e=le?me:za(c),Le=_e?me:za(f);$e=$e==W?at:$e,Le=Le==W?at:Le;var Pe=$e==at,Oe=Le==at,tt=$e==Le;if(tt&&lo(c)){if(!lo(f))return!1;le=!0,Pe=!1}if(tt&&!Pe)return Y||(Y=new xn),le||No(c)?Xs(c,f,$,E,P,Y):Mu(c,f,$e,$,E,P,Y);if(!($&w)){var it=Pe&&Ht.call(c,"__wrapped__"),_t=Oe&&Ht.call(f,"__wrapped__");if(it||_t){var At=it?c.value():c,ft=_t?f.value():f;return Y||(Y=new xn),P(At,ft,$,E,Y)}}return tt?(Y||(Y=new xn),Lu(c,f,$,E,P,Y)):!1}function cu(c){return oa(c)&&za(c)==ut}function pi(c,f,$,E){var P=$.length,Y=P,le=!E;if(c==null)return!Y;for(c=Jt(c);P--;){var _e=$[P];if(le&&_e[2]?_e[1]!==c[_e[0]]:!(_e[0]in c))return!1}for(;++P<Y;){_e=$[P];var $e=_e[0],Le=c[$e],Pe=_e[1];if(le&&_e[2]){if(Le===a&&!($e in c))return!1}else{var Oe=new xn;if(E)var tt=E(Le,Pe,$e,c,f,Oe);if(!(tt===a?nr(Pe,Le,w|k,E,Oe):tt))return!1}}return!0}function $s(c){if(!na(c)||Wu(c))return!1;var f=Jn(c)?cc:Yt;return f.test($o(c))}function uu(c){return oa(c)&&Oa(c)==mt}function du(c){return oa(c)&&za(c)==st}function mu(c){return oa(c)&&Yr(c.length)&&!!Ut[Oa(c)]}function ws(c){return typeof c=="function"?c:c==null?Ka:typeof c=="object"?kt(c)?xs(c[0],c[1]):ks(c):Gl(c)}function hi(c){if(!ir(c))return _c(c);var f=[];for(var $ in Jt(c))Ht.call(c,$)&&$!="constructor"&&f.push($);return f}function pu(c){if(!na(c))return Yu(c);var f=ir(c),$=[];for(var E in c)E=="constructor"&&(f||!Ht.call(c,E))||$.push(E);return $}function _i(c,f){return c<f}function Ss(c,f){var $=-1,E=Ja(c)?Ae(c.length):[];return oo(c,function(P,Y,le){E[++$]=f(P,Y,le)}),E}function ks(c){var f=ji(c);return f.length==1&&f[0][2]?ol(f[0][0],f[0][1]):function($){return $===c||pi($,c,f)}}function xs(c,f){return Ri(c)&&nl(f)?ol(Mn(c),f):function($){var E=Ui($,c);return E===a&&E===f?Hi($,c):nr(f,E,w|k)}}function zr(c,f,$,E,P){c!==f&&ci(f,function(Y,le){if(P||(P=new xn),na(Y))hu(c,f,le,$,zr,E,P);else{var _e=E?E(Di(c,le),Y,le+"",c,f,P):a;_e===a&&(_e=Y),si(c,le,_e)}},Ya)}function hu(c,f,$,E,P,Y,le){var _e=Di(c,$),$e=Di(f,$),Le=le.get($e);if(Le){si(c,$,Le);return}var Pe=Y?Y(_e,$e,$+"",c,f,le):a,Oe=Pe===a;if(Oe){var tt=kt($e),it=!tt&&lo($e),_t=!tt&&!it&&No($e);Pe=$e,tt||it||_t?kt(_e)?Pe=_e:ia(_e)?Pe=Va(_e):it?(Oe=!1,Pe=Ns($e,!0)):_t?(Oe=!1,Pe=Ps($e,!0)):Pe=[]:lr($e)||wo($e)?(Pe=_e,wo(_e)?Pe=Dl(_e):(!na(_e)||Jn(_e))&&(Pe=al($e))):Oe=!1}Oe&&(le.set($e,Pe),P(Pe,$e,E,Y,le),le.delete($e)),si(c,$,Pe)}function Es(c,f){var $=c.length;if($)return f+=f<0?$:0,Vn(f,$)?c[f]:a}function Cs(c,f,$){f.length?f=Zt(f,function(Y){return kt(Y)?function(le){return yo(le,Y.length===1?Y[0]:Y)}:Y}):f=[Ka];var E=-1;f=Zt(f,F(pt()));var P=Ss(c,function(Y,le,_e){var $e=Zt(f,function(Le){return Le(Y)});return{criteria:$e,index:++E,value:Y}});return ti(P,function(Y,le){return Cu(Y,le,$)})}function _u(c,f){return As(c,f,function($,E){return Hi(c,E)})}function As(c,f,$){for(var E=-1,P=f.length,Y={};++E<P;){var le=f[E],_e=yo(c,le);$(_e,le)&&or(Y,io(le,c),_e)}return Y}function fu(c){return function(f){return yo(f,c)}}function fi(c,f,$,E){var P=E?ei:to,Y=-1,le=f.length,_e=c;for(c===f&&(f=Va(f)),$&&(_e=Zt(c,F($)));++Y<le;)for(var $e=0,Le=f[Y],Pe=$?$(Le):Le;($e=P(_e,Pe,$e,E))>-1;)_e!==c&&Sr.call(_e,$e,1),Sr.call(c,$e,1);return c}function Ts(c,f){for(var $=c?f.length:0,E=$-1;$--;){var P=f[$];if($==E||P!==Y){var Y=P;Vn(P)?Sr.call(c,P,1):vi(c,P)}}return c}function gi(c,f){return c+Er(ls()*(f-c+1))}function gu(c,f,$,E){for(var P=-1,Y=ba(xr((f-c)/($||1)),0),le=Ae(Y);Y--;)le[E?Y:++P]=c,c+=$;return le}function bi(c,f){var $="";if(!c||f<1||f>Q)return $;do f%2&&($+=c),f=Er(f/2),f&&(c+=c);while(f);return $}function Tt(c,f){return Mi(rl(c,f,Ka),c+"")}function bu(c){return ds(Po(c))}function yu(c,f){var $=Po(c);return Hr($,bo(f,0,$.length))}function or(c,f,$,E){if(!na(c))return c;f=io(f,c);for(var P=-1,Y=f.length,le=Y-1,_e=c;_e!=null&&++P<Y;){var $e=Mn(f[P]),Le=$;if($e==="__proto__"||$e==="constructor"||$e==="prototype")return c;if(P!=le){var Pe=_e[$e];Le=E?E(Pe,$e,_e):a,Le===a&&(Le=na(Pe)?Pe:Vn(f[P+1])?[]:{})}er(_e,$e,Le),_e=_e[$e]}return c}var js=Cr?function(c,f){return Cr.set(c,f),c}:Ka,vu=kr?function(c,f){return kr(c,"toString",{configurable:!0,enumerable:!1,value:Wi(f),writable:!0})}:Ka;function $u(c){return Hr(Po(c))}function hn(c,f,$){var E=-1,P=c.length;f<0&&(f=-f>P?0:P+f),$=$>P?P:$,$<0&&($+=P),P=f>$?0:$-f>>>0,f>>>=0;for(var Y=Ae(P);++E<P;)Y[E]=c[E+f];return Y}function wu(c,f){var $;return oo(c,function(E,P,Y){return $=f(E,P,Y),!$}),!!$}function Dr(c,f,$){var E=0,P=c==null?E:c.length;if(typeof f=="number"&&f===f&&P<=U){for(;E<P;){var Y=E+P>>>1,le=c[Y];le!==null&&!nn(le)&&($?le<=f:le<f)?E=Y+1:P=Y}return P}return yi(c,f,Ka,$)}function yi(c,f,$,E){var P=0,Y=c==null?0:c.length;if(Y===0)return 0;f=$(f);for(var le=f!==f,_e=f===null,$e=nn(f),Le=f===a;P<Y;){var Pe=Er((P+Y)/2),Oe=$(c[Pe]),tt=Oe!==a,it=Oe===null,_t=Oe===Oe,At=nn(Oe);if(le)var ft=E||_t;else Le?ft=_t&&(E||tt):_e?ft=_t&&tt&&(E||!it):$e?ft=_t&&tt&&!it&&(E||!At):it||At?ft=!1:ft=E?Oe<=f:Oe<f;ft?P=Pe+1:Y=Pe}return Ra(Y,Ie)}function Is(c,f){for(var $=-1,E=c.length,P=0,Y=[];++$<E;){var le=c[$],_e=f?f(le):le;if(!$||!En(_e,$e)){var $e=_e;Y[P++]=le===0?0:le}}return Y}function Rs(c){return typeof c=="number"?c:nn(c)?A:+c}function an(c){if(typeof c=="string")return c;if(kt(c))return Zt(c,an)+"";if(nn(c))return cs?cs.call(c):"";var f=c+"";return f=="0"&&1/c==-ke?"-0":f}function ro(c,f,$){var E=-1,P=ho,Y=c.length,le=!0,_e=[],$e=_e;if($)le=!1,P=Fo;else if(Y>=i){var Le=f?null:zu(c);if(Le)return _r(Le);le=!1,P=ce,$e=new go}else $e=f?[]:_e;e:for(;++E<Y;){var Pe=c[E],Oe=f?f(Pe):Pe;if(Pe=$||Pe!==0?Pe:0,le&&Oe===Oe){for(var tt=$e.length;tt--;)if($e[tt]===Oe)continue e;f&&$e.push(Oe),_e.push(Pe)}else P($e,Oe,$)||($e!==_e&&$e.push(Oe),_e.push(Pe))}return _e}function vi(c,f){f=io(f,c);var $=-1,E=f.length;if(!E)return!0;for(var P=c==null||typeof c!="object"&&typeof c!="function";++$<E;){var Y=f[$];if(typeof Y=="string"){if(Y==="__proto__"&&!Ht.call(c,"__proto__"))return!1;if(Y==="constructor"&&$+1<E&&typeof f[$+1]=="string"&&f[$+1]==="prototype"){if(P&&$===0)continue;return!1}}}var le=il(c,f);return le==null||delete le[Mn(_n(f))]}function zs(c,f,$,E){return or(c,f,$(yo(c,f)),E)}function Mr(c,f,$,E){for(var P=c.length,Y=E?P:-1;(E?Y--:++Y<P)&&f(c[Y],Y,c););return $?hn(c,E?0:Y,E?Y+1:P):hn(c,E?Y+1:0,E?P:Y)}function Ds(c,f){var $=c;return $ instanceof Mt&&($=$.value()),ko(f,function(E,P){return P.func.apply(P.thisArg,un([E],P.args))},$)}function $i(c,f,$){var E=c.length;if(E<2)return E?ro(c[0]):[];for(var P=-1,Y=Ae(E);++P<E;)for(var le=c[P],_e=-1;++_e<E;)_e!=P&&(Y[P]=tr(Y[P]||le,c[_e],f,$));return ro(Ca(Y,1),f,$)}function Ms(c,f,$){for(var E=-1,P=c.length,Y=f.length,le={};++E<P;){var _e=E<Y?f[E]:a;$(le,c[E],_e)}return le}function wi(c){return ia(c)?c:[]}function Si(c){return typeof c=="function"?c:Ka}function io(c,f){return kt(c)?c:Ri(c,f)?[c]:ul(Gt(c))}var Su=Tt;function so(c,f,$){var E=c.length;return $=$===a?E:$,!f&&$>=E?c:hn(c,f,$)}var Ls=uc||function(c){return Xe.clearTimeout(c)};function Ns(c,f){if(f)return c.slice();var $=c.length,E=as?as($):new c.constructor($);return c.copy(E),E}function ki(c){var f=new c.constructor(c.byteLength);return new $r(f).set(new $r(c)),f}function ku(c,f){var $=f?ki(c.buffer):c.buffer;return new c.constructor($,c.byteOffset,c.byteLength)}function xu(c){var f=new c.constructor(c.source,Ta.exec(c));return f.lastIndex=c.lastIndex,f}function Eu(c){return Xo?Jt(Xo.call(c)):{}}function Ps(c,f){var $=f?ki(c.buffer):c.buffer;return new c.constructor($,c.byteOffset,c.length)}function Os(c,f){if(c!==f){var $=c!==a,E=c===null,P=c===c,Y=nn(c),le=f!==a,_e=f===null,$e=f===f,Le=nn(f);if(!_e&&!Le&&!Y&&c>f||Y&&le&&$e&&!_e&&!Le||E&&le&&$e||!$&&$e||!P)return 1;if(!E&&!Y&&!Le&&c<f||Le&&$&&P&&!E&&!Y||_e&&$&&P||!le&&P||!$e)return-1}return 0}function Cu(c,f,$){for(var E=-1,P=c.criteria,Y=f.criteria,le=P.length,_e=$.length;++E<le;){var $e=Os(P[E],Y[E]);if($e){if(E>=_e)return $e;var Le=$[E];return $e*(Le=="desc"?-1:1)}}return c.index-f.index}function Bs(c,f,$,E){for(var P=-1,Y=c.length,le=$.length,_e=-1,$e=f.length,Le=ba(Y-le,0),Pe=Ae($e+Le),Oe=!E;++_e<$e;)Pe[_e]=f[_e];for(;++P<le;)(Oe||P<Y)&&(Pe[$[P]]=c[P]);for(;Le--;)Pe[_e++]=c[P++];return Pe}function Fs(c,f,$,E){for(var P=-1,Y=c.length,le=-1,_e=$.length,$e=-1,Le=f.length,Pe=ba(Y-_e,0),Oe=Ae(Pe+Le),tt=!E;++P<Pe;)Oe[P]=c[P];for(var it=P;++$e<Le;)Oe[it+$e]=f[$e];for(;++le<_e;)(tt||P<Y)&&(Oe[it+$[le]]=c[P++]);return Oe}function Va(c,f){var $=-1,E=c.length;for(f||(f=Ae(E));++$<E;)f[$]=c[$];return f}function Dn(c,f,$,E){var P=!$;$||($={});for(var Y=-1,le=f.length;++Y<le;){var _e=f[Y],$e=E?E($[_e],c[_e],_e,$,c):a;$e===a&&($e=c[_e]),P?Gn($,_e,$e):er($,_e,$e)}return $}function Au(c,f){return Dn(c,Ii(c),f)}function Tu(c,f){return Dn(c,el(c),f)}function Lr(c,f){return function($,E){var P=kt($)?Qr:Zc,Y=f?f():{};return P($,c,pt(E,2),Y)}}function Do(c){return Tt(function(f,$){var E=-1,P=$.length,Y=P>1?$[P-1]:a,le=P>2?$[2]:a;for(Y=c.length>3&&typeof Y=="function"?(P--,Y):a,le&&Ba($[0],$[1],le)&&(Y=P<3?a:Y,P=1),f=Jt(f);++E<P;){var _e=$[E];_e&&c(f,_e,E,Y)}return f})}function Us(c,f){return function($,E){if($==null)return $;if(!Ja($))return c($,E);for(var P=$.length,Y=f?P:-1,le=Jt($);(f?Y--:++Y<P)&&E(le[Y],Y,le)!==!1;);return $}}function Hs(c){return function(f,$,E){for(var P=-1,Y=Jt(f),le=E(f),_e=le.length;_e--;){var $e=le[c?_e:++P];if($(Y[$e],$e,Y)===!1)break}return f}}function ju(c,f,$){var E=f&x,P=rr(c);function Y(){var le=this&&this!==Xe&&this instanceof Y?P:c;return le.apply(E?$:this,arguments)}return Y}function Gs(c){return function(f){f=Gt(f);var $=fa(f)?kn(f):a,E=$?$[0]:f.charAt(0),P=$?so($,1).join(""):f.slice(1);return E[c]()+P}}function Mo(c){return function(f){return ko(Ul(Fl(f).replace(We,"")),c,"")}}function rr(c){return function(){var f=arguments;switch(f.length){case 0:return new c;case 1:return new c(f[0]);case 2:return new c(f[0],f[1]);case 3:return new c(f[0],f[1],f[2]);case 4:return new c(f[0],f[1],f[2],f[3]);case 5:return new c(f[0],f[1],f[2],f[3],f[4]);case 6:return new c(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new c(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var $=zo(c.prototype),E=c.apply($,f);return na(E)?E:$}}function Iu(c,f,$){var E=rr(c);function P(){for(var Y=arguments.length,le=Ae(Y),_e=Y,$e=Lo(P);_e--;)le[_e]=arguments[_e];var Le=Y<3&&le[0]!==$e&&le[Y-1]!==$e?[]:ao(le,$e);if(Y-=Le.length,Y<$)return Ys(c,f,Nr,P.placeholder,a,le,Le,a,a,$-Y);var Pe=this&&this!==Xe&&this instanceof P?E:c;return Pa(Pe,this,le)}return P}function Ws(c){return function(f,$,E){var P=Jt(f);if(!Ja(f)){var Y=pt($,3);f=va(f),$=function(_e){return Y(P[_e],_e,P)}}var le=c(f,$,E);return le>-1?P[Y?f[le]:le]:a}}function qs(c){return qn(function(f){var $=f.length,E=$,P=mn.prototype.thru;for(c&&f.reverse();E--;){var Y=f[E];if(typeof Y!="function")throw new dn(r);if(P&&!le&&Fr(Y)=="wrapper")var le=new mn([],!0)}for(E=le?E:$;++E<$;){Y=f[E];var _e=Fr(Y),$e=_e=="wrapper"?Ti(Y):a;$e&&zi($e[0])&&$e[1]==(y|O|g|S)&&!$e[4].length&&$e[9]==1?le=le[Fr($e[0])].apply(le,$e[3]):le=Y.length==1&&zi(Y)?le[_e]():le.thru(Y)}return function(){var Le=arguments,Pe=Le[0];if(le&&Le.length==1&&kt(Pe))return le.plant(Pe).value();for(var Oe=0,tt=$?f[Oe].apply(this,Le):Pe;++Oe<$;)tt=f[Oe].call(this,tt);return tt}})}function Nr(c,f,$,E,P,Y,le,_e,$e,Le){var Pe=f&y,Oe=f&x,tt=f&I,it=f&(O|G),_t=f&z,At=tt?a:rr(c);function ft(){for(var zt=arguments.length,Lt=Ae(zt),on=zt;on--;)Lt[on]=arguments[on];if(it)var Fa=Lo(ft),rn=Me(Lt,Fa);if(E&&(Lt=Bs(Lt,E,P,it)),Y&&(Lt=Fs(Lt,Y,le,it)),zt-=rn,it&&zt<Le){var sa=ao(Lt,Fa);return Ys(c,f,Nr,ft.placeholder,$,Lt,sa,_e,$e,Le-zt)}var Cn=Oe?$:this,Kn=tt?Cn[c]:c;return zt=Lt.length,_e?Lt=Zu(Lt,_e):_t&&zt>1&&Lt.reverse(),Pe&&$e<zt&&(Lt.length=$e),this&&this!==Xe&&this instanceof ft&&(Kn=At||rr(Kn)),Kn.apply(Cn,Lt)}return ft}function Vs(c,f){return function($,E){return ru($,c,f(E),{})}}function Pr(c,f){return function($,E){var P;if($===a&&E===a)return f;if($!==a&&(P=$),E!==a){if(P===a)return E;typeof $=="string"||typeof E=="string"?($=an($),E=an(E)):($=Rs($),E=Rs(E)),P=c($,E)}return P}}function xi(c){return qn(function(f){return f=Zt(f,F(pt())),Tt(function($){var E=this;return c(f,function(P){return Pa(P,E,$)})})})}function Or(c,f){f=f===a?" ":an(f);var $=f.length;if($<2)return $?bi(f,c):f;var E=bi(f,xr(c/Co(f)));return fa(f)?so(kn(E),0,c).join(""):E.slice(0,c)}function Ru(c,f,$,E){var P=f&x,Y=rr(c);function le(){for(var _e=-1,$e=arguments.length,Le=-1,Pe=E.length,Oe=Ae(Pe+$e),tt=this&&this!==Xe&&this instanceof le?Y:c;++Le<Pe;)Oe[Le]=E[Le];for(;$e--;)Oe[Le++]=arguments[++_e];return Pa(tt,P?$:this,Oe)}return le}function Js(c){return function(f,$,E){return E&&typeof E!="number"&&Ba(f,$,E)&&($=E=a),f=Yn(f),$===a?($=f,f=0):$=Yn($),E=E===a?f<$?1:-1:Yn(E),gu(f,$,E,c)}}function Br(c){return function(f,$){return typeof f=="string"&&typeof $=="string"||(f=fn(f),$=fn($)),c(f,$)}}function Ys(c,f,$,E,P,Y,le,_e,$e,Le){var Pe=f&O,Oe=Pe?le:a,tt=Pe?a:le,it=Pe?Y:a,_t=Pe?a:Y;f|=Pe?g:v,f&=~(Pe?v:g),f&N||(f&=-4);var At=[c,f,P,it,Oe,_t,tt,_e,$e,Le],ft=$.apply(a,At);return zi(c)&&sl(ft,At),ft.placeholder=E,ll(ft,c,f)}function Ei(c){var f=ga[c];return function($,E){if($=fn($),E=E==null?0:Ra(Et(E),292),E&&ss($)){var P=(Gt($)+"e").split("e"),Y=f(P[0]+"e"+(+P[1]+E));return P=(Gt(Y)+"e").split("e"),+(P[0]+"e"+(+P[1]-E))}return f($)}}var zu=Io&&1/_r(new Io([,-0]))[1]==ke?function(c){return new Io(c)}:Ji;function Ks(c){return function(f){var $=za(f);return $==ut?ai(f):$==st?Yl(f):Jo(f,c(f))}}function Wn(c,f,$,E,P,Y,le,_e){var $e=f&I;if(!$e&&typeof c!="function")throw new dn(r);var Le=E?E.length:0;if(Le||(f&=-97,E=P=a),le=le===a?le:ba(Et(le),0),_e=_e===a?_e:Et(_e),Le-=P?P.length:0,f&v){var Pe=E,Oe=P;E=P=a}var tt=$e?a:Ti(c),it=[c,f,$,E,P,Pe,Oe,Y,le,_e];if(tt&&Ju(it,tt),c=it[0],f=it[1],$=it[2],E=it[3],P=it[4],_e=it[9]=it[9]===a?$e?0:c.length:ba(it[9]-Le,0),!_e&&f&(O|G)&&(f&=-25),!f||f==x)var _t=ju(c,f,$);else f==O||f==G?_t=Iu(c,f,_e):(f==g||f==(x|g))&&!P.length?_t=Ru(c,f,$,E):_t=Nr.apply(a,it);var At=tt?js:sl;return ll(At(_t,it),c,f)}function Zs(c,f,$,E){return c===a||En(c,jo[$])&&!Ht.call(E,$)?f:c}function Qs(c,f,$,E,P,Y){return na(c)&&na(f)&&(Y.set(f,c),zr(c,f,a,Qs,Y),Y.delete(f)),c}function Du(c){return lr(c)?a:c}function Xs(c,f,$,E,P,Y){var le=$&w,_e=c.length,$e=f.length;if(_e!=$e&&!(le&&$e>_e))return!1;var Le=Y.get(c),Pe=Y.get(f);if(Le&&Pe)return Le==f&&Pe==c;var Oe=-1,tt=!0,it=$&k?new go:a;for(Y.set(c,f),Y.set(f,c);++Oe<_e;){var _t=c[Oe],At=f[Oe];if(E)var ft=le?E(At,_t,Oe,f,c,Y):E(_t,At,Oe,c,f,Y);if(ft!==a){if(ft)continue;tt=!1;break}if(it){if(!Uo(f,function(zt,Lt){if(!ce(it,Lt)&&(_t===zt||P(_t,zt,$,E,Y)))return it.push(Lt)})){tt=!1;break}}else if(!(_t===At||P(_t,At,$,E,Y))){tt=!1;break}}return Y.delete(c),Y.delete(f),tt}function Mu(c,f,$,E,P,Y,le){switch($){case ze:if(c.byteLength!=f.byteLength||c.byteOffset!=f.byteOffset)return!1;c=c.buffer,f=f.buffer;case pe:return!(c.byteLength!=f.byteLength||!Y(new $r(c),new $r(f)));case De:case Ee:case Je:return En(+c,+f);case Te:return c.name==f.name&&c.message==f.message;case mt:case la:return c==f+"";case ut:var _e=ai;case st:var $e=E&w;if(_e||(_e=_r),c.size!=f.size&&!$e)return!1;var Le=le.get(c);if(Le)return Le==f;E|=k,le.set(c,f);var Pe=Xs(_e(c),_e(f),E,P,Y,le);return le.delete(c),Pe;case ea:if(Xo)return Xo.call(c)==Xo.call(f)}return!1}function Lu(c,f,$,E,P,Y){var le=$&w,_e=Ci(c),$e=_e.length,Le=Ci(f),Pe=Le.length;if($e!=Pe&&!le)return!1;for(var Oe=$e;Oe--;){var tt=_e[Oe];if(!(le?tt in f:Ht.call(f,tt)))return!1}var it=Y.get(c),_t=Y.get(f);if(it&&_t)return it==f&&_t==c;var At=!0;Y.set(c,f),Y.set(f,c);for(var ft=le;++Oe<$e;){tt=_e[Oe];var zt=c[tt],Lt=f[tt];if(E)var on=le?E(Lt,zt,tt,f,c,Y):E(zt,Lt,tt,c,f,Y);if(!(on===a?zt===Lt||P(zt,Lt,$,E,Y):on)){At=!1;break}ft||(ft=tt=="constructor")}if(At&&!ft){var Fa=c.constructor,rn=f.constructor;Fa!=rn&&"constructor"in c&&"constructor"in f&&!(typeof Fa=="function"&&Fa instanceof Fa&&typeof rn=="function"&&rn instanceof rn)&&(At=!1)}return Y.delete(c),Y.delete(f),At}function qn(c){return Mi(rl(c,a,hl),c+"")}function Ci(c){return ys(c,va,Ii)}function Ai(c){return ys(c,Ya,el)}var Ti=Cr?function(c){return Cr.get(c)}:Ji;function Fr(c){for(var f=c.name+"",$=Ro[f],E=Ht.call(Ro,f)?$.length:0;E--;){var P=$[E],Y=P.func;if(Y==null||Y==c)return P.name}return f}function Lo(c){var f=Ht.call(q,"placeholder")?q:c;return f.placeholder}function pt(){var c=q.iteratee||qi;return c=c===qi?ws:c,arguments.length?c(arguments[0],arguments[1]):c}function Ur(c,f){var $=c.__data__;return Gu(f)?$[typeof f=="string"?"string":"hash"]:$.map}function ji(c){for(var f=va(c),$=f.length;$--;){var E=f[$],P=c[E];f[$]=[E,P,nl(P)]}return f}function vo(c,f){var $=Ea(c,f);return $s($)?$:a}function Nu(c){var f=Ht.call(c,_o),$=c[_o];try{c[_o]=a;var E=!0}catch{}var P=yr.call(c);return E&&(f?c[_o]=$:delete c[_o]),P}var Ii=oi?function(c){return c==null?[]:(c=Jt(c),Rn(oi(c),function(f){return rs.call(c,f)}))}:Yi,el=oi?function(c){for(var f=[];c;)un(f,Ii(c)),c=wr(c);return f}:Yi,za=Oa;(ri&&za(new ri(new ArrayBuffer(1)))!=ze||Ko&&za(new Ko)!=ut||ii&&za(ii.resolve())!=yt||Io&&za(new Io)!=st||Zo&&za(new Zo)!=te)&&(za=function(c){var f=Oa(c),$=f==at?c.constructor:a,E=$?$o($):"";if(E)switch(E){case yc:return ze;case vc:return ut;case $c:return yt;case wc:return st;case Sc:return te}return f});function Pu(c,f,$){for(var E=-1,P=$.length;++E<P;){var Y=$[E],le=Y.size;switch(Y.type){case"drop":c+=le;break;case"dropRight":f-=le;break;case"take":f=Ra(f,c+le);break;case"takeRight":c=ba(c,f-le);break}}return{start:c,end:f}}function Ou(c){var f=c.match(gt);return f?f[1].split(Za):[]}function tl(c,f,$){f=io(f,c);for(var E=-1,P=f.length,Y=!1;++E<P;){var le=Mn(f[E]);if(!(Y=c!=null&&$(c,le)))break;c=c[le]}return Y||++E!=P?Y:(P=c==null?0:c.length,!!P&&Yr(P)&&Vn(le,P)&&(kt(c)||wo(c)))}function Bu(c){var f=c.length,$=new c.constructor(f);return f&&typeof c[0]=="string"&&Ht.call(c,"index")&&($.index=c.index,$.input=c.input),$}function al(c){return typeof c.constructor=="function"&&!ir(c)?zo(wr(c)):{}}function Fu(c,f,$){var E=c.constructor;switch(f){case pe:return ki(c);case De:case Ee:return new E(+c);case ze:return ku(c,$);case Ye:case lt:case rt:case Wt:case jt:case qt:case ta:case Pt:case It:return Ps(c,$);case ut:return new E;case Je:case la:return new E(c);case mt:return xu(c);case st:return new E;case ea:return Eu(c)}}function Uu(c,f){var $=f.length;if(!$)return c;var E=$-1;return f[E]=($>1?"& ":"")+f[E],f=f.join($>2?", ":" "),c.replace(Rt,`{
|
|
3
|
+
`),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[TEXT]:{exposeProperties:{text:(t,e)=>getDataFromDataTransfer(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function createNativeDragSource(t,e){const a=nativeTypesConfig[t];if(!a)throw new Error(`native type ${t} has no configuration`);const n=new NativeDragSource(a);return n.loadDataTransfer(e),n}function matchNativeItemType(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(nativeTypesConfig).filter(a=>{const n=nativeTypesConfig[a];return n!=null&&n.matchesTypes?n.matchesTypes.some(i=>e.indexOf(i)>-1):!1})[0]||null}const isFirefox=memoize(()=>/firefox/i.test(navigator.userAgent)),isSafari=memoize(()=>!!window.safari);class MonotonicInterpolant{interpolate(e){const{xs:a,ys:n,c1s:i,c2s:o,c3s:r}=this;let l=a.length-1;if(e===a[l])return n[l];let h=0,d=r.length-1,p;for(;h<=d;){p=Math.floor(.5*(h+d));const b=a[p];if(b<e)h=p+1;else if(b>e)d=p-1;else return n[p]}l=Math.max(0,d);const u=e-a[l],s=u*u;return n[l]+i[l]*u+o[l]*s+r[l]*u*s}constructor(e,a){const{length:n}=e,i=[];for(let b=0;b<n;b++)i.push(b);i.sort((b,w)=>e[b]<e[w]?-1:1);const o=[],r=[];let l,h;for(let b=0;b<n-1;b++)l=e[b+1]-e[b],h=a[b+1]-a[b],o.push(l),r.push(h/l);const d=[r[0]];for(let b=0;b<o.length-1;b++){const w=r[b],k=r[b+1];if(w*k<=0)d.push(0);else{l=o[b];const x=o[b+1],I=l+x;d.push(3*I/((I+x)/w+(I+l)/k))}}d.push(r[r.length-1]);const p=[],u=[];let s;for(let b=0;b<d.length-1;b++){s=r[b];const w=d[b],k=1/o[b],x=w+d[b+1]-s-s;p.push((s-w-x)*k),u.push(x*k*k)}this.xs=e,this.ys=a,this.c1s=d,this.c2s=p,this.c3s=u}}const ELEMENT_NODE$1=1;function getNodeClientOffset$1(t){const e=t.nodeType===ELEMENT_NODE$1?t:t.parentElement;if(!e)return null;const{top:a,left:n}=e.getBoundingClientRect();return{x:n,y:a}}function getEventClientOffset$1(t){return{x:t.clientX,y:t.clientY}}function isImageNode(t){var e;return t.nodeName==="IMG"&&(isFirefox()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function getDragPreviewSize(t,e,a,n){let i=t?e.width:a,o=t?e.height:n;return isSafari()&&t&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}function getDragPreviewOffset(t,e,a,n,i){const o=isImageNode(e),l=getNodeClientOffset$1(o?t:e),h={x:a.x-l.x,y:a.y-l.y},{offsetWidth:d,offsetHeight:p}=t,{anchorX:u,anchorY:s}=n,{dragPreviewWidth:b,dragPreviewHeight:w}=getDragPreviewSize(o,e,d,p),k=()=>{let v=new MonotonicInterpolant([0,.5,1],[h.y,h.y/p*w,h.y+w-p]).interpolate(s);return isSafari()&&o&&(v+=(window.devicePixelRatio-1)*w),v},x=()=>new MonotonicInterpolant([0,.5,1],[h.x,h.x/d*b,h.x+b-d]).interpolate(u),{offsetX:I,offsetY:N}=i,O=I===0||I,G=N===0||N;return{x:O?I:x(),y:G?N:k()}}let OptionsReader$1=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,a){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=a}};function _defineProperty(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function _objectSpread$1(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{},n=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(a).filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable}))),n.forEach(function(i){_defineProperty(t,i,a[i])})}return t}class HTML5BackendImpl{profile(){var e,a;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((a=this.dragOverTargetIds)===null||a===void 0?void 0:a.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var a;(a=this.window)===null||a===void 0||a.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,a,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,a),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,a,n){this.sourceNodes.set(e,a),this.sourceNodeOptions.set(e,n);const i=r=>this.handleDragStart(r,e),o=r=>this.handleSelectStart(r);return a.setAttribute("draggable","true"),a.addEventListener("dragstart",i),a.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),a.removeEventListener("dragstart",i),a.removeEventListener("selectstart",o),a.setAttribute("draggable","false")}}connectDropTarget(e,a){const n=r=>this.handleDragEnter(r,e),i=r=>this.handleDragOver(r,e),o=r=>this.handleDrop(r,e);return a.addEventListener("dragenter",n),a.addEventListener("dragover",i),a.addEventListener("drop",o),()=>{a.removeEventListener("dragenter",n),a.removeEventListener("dragover",i),a.removeEventListener("drop",o)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),a=this.sourceNodeOptions.get(e);return _objectSpread$1({dropEffect:this.altKeyPressed?"copy":"move"},a||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),a=this.sourcePreviewNodeOptions.get(e);return _objectSpread$1({anchorX:.5,anchorY:.5,captureDraggingState:!1},a||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(NativeTypes).some(a=>NativeTypes[a]===e)}beginDragNativeItem(e,a){this.clearCurrentDragSourceNode(),this.currentNativeSource=createNativeDragSource(e,a),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const a=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var n;return(n=this.rootElement)===null||n===void 0?void 0:n.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},a)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,a){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(a))}handleDragEnter(e,a){this.dragEnterTargetIds.unshift(a)}handleDragOver(e,a){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(a)}handleDrop(e,a){this.dropTargetIds.unshift(a)}constructor(e,a,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&getNodeClientOffset$1(o)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:o}=this;this.dragStartSourceIds=null;const r=getEventClientOffset$1(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:l}=i,h=matchNativeItemType(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const p=this.monitor.getSourceId(),u=this.sourceNodes.get(p),s=this.sourcePreviewNodes.get(p)||u;if(s){const{anchorX:b,anchorY:w,offsetX:k,offsetY:x}=this.getCurrentSourcePreviewNodeOptions(),O=getDragPreviewOffset(u,s,r,{anchorX:b,anchorY:w},{offsetX:k,offsetY:x});l.setDragImage(s,O.x,O.y)}}try{l==null||l.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:d}=this.getCurrentSourcePreviewNodeOptions();d?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(h)this.beginDragNativeItem(h);else{if(l&&!l.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:l}=i,h=matchNativeItemType(l);h&&this.beginDragNativeItem(h,l)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:o}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,o.length>0&&this.actions.hover(o,{clientOffset:getEventClientOffset$1(i)}),o.some(l=>this.monitor.canDropOnTarget(l))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:o}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=getEventClientOffset$1(i),this.scheduleHover(o),(o||[]).some(l=>this.monitor.canDropOnTarget(l))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var o;i.preventDefault(),(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}else matchNativeItemType(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:o}=this;this.dropTargetIds=[],this.actions.hover(o,{clientOffset:getEventClientOffset$1(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const o=i.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(i.preventDefault(),o.dragDrop()))},this.options=new OptionsReader$1(a,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new EnterLeaveCounter(this.isNodeInDocument)}}let emptyImage;function getEmptyImage(){return emptyImage||(emptyImage=new Image,emptyImage.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),emptyImage}const HTML5Backend=function(e,a,n){return new HTML5BackendImpl(e,a,n)};var ListenerType;(function(t){t.mouse="mouse",t.touch="touch",t.keyboard="keyboard"})(ListenerType||(ListenerType={}));class OptionsReader{get delay(){var e;return(e=this.args.delay)!==null&&e!==void 0?e:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var e;return(e=this.args.ignoreContextMenu)!==null&&e!==void 0?e:!1}get enableHoverOutsideTarget(){var e;return(e=this.args.enableHoverOutsideTarget)!==null&&e!==void 0?e:!1}get enableKeyboardEvents(){var e;return(e=this.args.enableKeyboardEvents)!==null&&e!==void 0?e:!1}get enableMouseEvents(){var e;return(e=this.args.enableMouseEvents)!==null&&e!==void 0?e:!1}get enableTouchEvents(){var e;return(e=this.args.enableTouchEvents)!==null&&e!==void 0?e:!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var e,a,n,i;return(i=(n=(e=this.args)===null||e===void 0?void 0:e.delayTouchStart)!==null&&n!==void 0?n:(a=this.args)===null||a===void 0?void 0:a.delay)!==null&&i!==void 0?i:0}get delayMouseStart(){var e,a,n,i;return(i=(n=(e=this.args)===null||e===void 0?void 0:e.delayMouseStart)!==null&&n!==void 0?n:(a=this.args)===null||a===void 0?void 0:a.delay)!==null&&i!==void 0?i:0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<"u")return window}get document(){var e;if(!((e=this.context)===null||e===void 0)&&e.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var e;return((e=this.args)===null||e===void 0?void 0:e.rootElement)||this.document}constructor(e,a){this.args=e,this.context=a}}function distance(t,e,a,n){return Math.sqrt(Math.pow(Math.abs(a-t),2)+Math.pow(Math.abs(n-e),2))}function inAngleRanges(t,e,a,n,i){if(!i)return!1;const o=Math.atan2(n-e,a-t)*180/Math.PI+180;for(let r=0;r<i.length;++r){const l=i[r];if(l&&(l.start==null||o>=l.start)&&(l.end==null||o<=l.end))return!0}return!1}const MouseButtons={Left:1},MouseButton={Left:0};function eventShouldStartDrag(t){return t.button===void 0||t.button===MouseButton.Left}function eventShouldEndDrag(t){return t.buttons===void 0||(t.buttons&MouseButtons.Left)===0}function isTouchEvent$1(t){return!!t.targetTouches}const ELEMENT_NODE=1;function getNodeClientOffset(t){const e=t.nodeType===ELEMENT_NODE?t:t.parentElement;if(!e)return;const{top:a,left:n}=e.getBoundingClientRect();return{x:n,y:a}}function getEventClientTouchOffset(t,e){if(t.targetTouches.length===1)return getEventClientOffset(t.targetTouches[0]);if(e&&t.touches.length===1&&t.touches[0].target===e.target)return getEventClientOffset(t.touches[0])}function getEventClientOffset(t,e){return isTouchEvent$1(t)?getEventClientTouchOffset(t,e):{x:t.clientX,y:t.clientY}}const supportsPassive=(()=>{let t=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get(){return t=!0,!0}}))}catch{}return t})(),eventNames={[ListenerType.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[ListenerType.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[ListenerType.keyboard]:{keydown:"keydown"}};class TouchBackendImpl{profile(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((e=this.dragOverTargetIds)===null||e===void 0?void 0:e.length)||0}}get document(){return this.options.document}setup(){const e=this.options.rootElement;e&&(invariant$2(!TouchBackendImpl.isSetUp,"Cannot have two Touch backends at the same time."),TouchBackendImpl.isSetUp=!0,this.addEventListener(e,"start",this.getTopMoveStartHandler()),this.addEventListener(e,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(e,"move",this.handleTopMove),this.addEventListener(e,"move",this.handleTopMoveCapture,!0),this.addEventListener(e,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(e,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(e,"keydown",this.handleCancelOnEscape,!0))}teardown(){const e=this.options.rootElement;e&&(TouchBackendImpl.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(e,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(e,"start",this.handleTopMoveStart),this.removeEventListener(e,"move",this.handleTopMoveCapture,!0),this.removeEventListener(e,"move",this.handleTopMove),this.removeEventListener(e,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(e,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(e,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(e,a,n,i=!1){const o=supportsPassive?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(r){const l=eventNames[r][a];l&&e.addEventListener(l,n,o)})}removeEventListener(e,a,n,i=!1){const o=supportsPassive?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(r){const l=eventNames[r][a];l&&e.removeEventListener(l,n,o)})}connectDragSource(e,a){const n=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,a),this.addEventListener(a,"start",n),()=>{this.sourceNodes.delete(e),this.removeEventListener(a,"start",n)}}connectDragPreview(e,a,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,a),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDropTarget(e,a){const n=this.options.rootElement;if(!this.document||!n)return()=>{};const i=o=>{if(!this.document||!n||!this.monitor.isDragging())return;let r;switch(o.type){case eventNames.mouse.move:r={x:o.clientX,y:o.clientY};break;case eventNames.touch.move:var l,h;r={x:((l=o.touches[0])===null||l===void 0?void 0:l.clientX)||0,y:((h=o.touches[0])===null||h===void 0?void 0:h.clientY)||0};break}const d=r!=null?this.document.elementFromPoint(r.x,r.y):void 0,p=d&&a.contains(d);if(d===a||p)return this.handleMove(o,e)};return this.addEventListener(this.document.body,"move",i),this.targetNodes.set(e,a),()=>{this.document&&(this.targetNodes.delete(e),this.removeEventListener(this.document.body,"move",i))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(e){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{e&&!e.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),!(!e||!e.parentElement)&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(e,a,n){this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&getNodeClientOffset(o)},this.handleTopMoveStartCapture=i=>{eventShouldStartDrag(i)&&(this.moveStartSourceIds=[])},this.handleMoveStart=i=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(i)},this.handleTopMoveStart=i=>{if(!eventShouldStartDrag(i))return;const o=getEventClientOffset(i);o&&(isTouchEvent$1(i)&&(this.lastTargetTouchFallback=i.targetTouches[0]),this._mouseClientOffset=o),this.waitingForDelay=!1},this.handleTopMoveStartDelay=i=>{if(!eventShouldStartDrag(i))return;const o=i.type===eventNames.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,i),o),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(i,o)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(o)},this.handleTopMove=i=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:o,dragOverTargetIds:r}=this,l=this.options.enableHoverOutsideTarget,h=getEventClientOffset(i,this.lastTargetTouchFallback);if(!h)return;if(this._isScrolling||!this.monitor.isDragging()&&inAngleRanges(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,h.x,h.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&o&&distance(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,h.x,h.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(o,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const d=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(d),this.actions.publishDragSource(),i.cancelable&&i.preventDefault();const p=(r||[]).map(w=>this.targetNodes.get(w)).filter(w=>!!w),u=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(h.x,h.y,p):this.document.elementsFromPoint(h.x,h.y),s=[];for(const w in u){if(!u.hasOwnProperty(w))continue;let k=u[w];for(k!=null&&s.push(k);k;)k=k.parentElement,k&&s.indexOf(k)===-1&&s.push(k)}const b=s.filter(w=>p.indexOf(w)>-1).map(w=>this._getDropTargetId(w)).filter(w=>!!w).filter((w,k,x)=>x.indexOf(w)===k);if(l)for(const w in this.targetNodes){const k=this.targetNodes.get(w);if(d&&k&&k.contains(d)&&b.indexOf(w)===-1){b.unshift(w);break}}b.reverse(),this.actions.hover(b,{clientOffset:h})},this._getDropTargetId=i=>{const o=this.targetNodes.keys();let r=o.next();for(;r.done===!1;){const l=r.value;if(i===this.targetNodes.get(l))return l;r=o.next()}},this.handleTopMoveEndCapture=i=>{if(this._isScrolling=!1,this.lastTargetTouchFallback=void 0,!!eventShouldEndDrag(i)){if(!this.monitor.isDragging()||this.monitor.didDrop()){this.moveStartSourceIds=void 0;return}i.cancelable&&i.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()}},this.handleCancelOnEscape=i=>{i.key==="Escape"&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new OptionsReader(n,a),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(ListenerType.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(ListenerType.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(ListenerType.keyboard)}}const TouchBackend=function(e,a={},n={}){return new TouchBackendImpl(e,a,n)},styles$x={message:{position:"relative",display:"block",width:"100%"},offline:{position:"relative",justifyContent:"space-between",display:"flex",width:"100%",alignItems:"center",opacity:.7,"@media screen and (max-width: 550px)":{flexWrap:"wrap"}},timestamp:{color:"text.secondary",position:"absolute",top:5,right:25,"@media screen and (max-width: 550px)":{fontSize:"2.9vw"}},simpleMessage:{fontFamily:"monospace",fontSize:14,ml:"20px",mb:"10px",width:"100%",display:"block",whiteSpace:"pre-wrap","@media screen and (max-width: 550px)":{fontSize:"2.9vw",ml:0}}};class NotificationMessage extends iobroker_admin__loadShare__react__loadShare__.Component{lastAlive=0;constructor(e){super(e),this.state={alive:!1,data:{},schema:null,updateData:0}}async componentDidMount(){var e,a;if((a=(e=this.props.message.contextData)==null?void 0:e.admin)!=null&&a.notification){const n=await this.props.socket.getState(`${this.props.instanceId}.alive`);this.lastAlive=n!=null&&n.val?Date.now():0,this.setState({alive:!!(n!=null&&n.val)},()=>this.getGui()),await this.props.socket.subscribeState(`${this.props.instanceId}.alive`,this.onAliveChanged)}}getGui(){var e,a,n,i;if(this.state.alive&&((a=(e=this.props.message.contextData)==null?void 0:e.admin)!=null&&a.notification)){const o=JSON.parse(JSON.stringify((i=(n=this.props.message.contextData)==null?void 0:n.admin)==null?void 0:i.notification));o.offlineMessage&&delete o.offlineMessage,this.props.socket.sendTo(this.props.instanceId.replace("system.adapter.",""),"admin:getNotificationSchema",o).then(r=>{r&&this.setState({schema:r.schema,data:r.data||this.state.data,updateData:this.state.updateData+1})})}}onAliveChanged=(e,a)=>{if(e===`${this.props.instanceId}.alive`&&a&&this.state.alive!==!!a.val){if(a.val){if(this.lastAlive&&Date.now()-this.lastAlive<500)return;this.lastAlive=Date.now()}this.setState({alive:!!a.val},()=>this.getGui())}};renderCustomGui(){var n,i;if(!this.state.schema||!this.state.data||!this.state.alive){const o=(i=(n=this.props.message.contextData)==null?void 0:n.admin)==null?void 0:i.notification;if(o){if(!this.state.alive){const r=o.offlineMessage;if(r){const l=typeof r=="string"?r:r[this.props.socket.systemLang]||r.en;return jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{sx:styles$x.offline,children:iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.Utils.renderTextWithA(l)})}return jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Typography,{children:iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.t("Instance is not alive")})}return jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.LinearProgress,{})}return null}const[,,e,a]=this.props.instanceId.split(".");return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[this.state.error&&jsxRuntimeExports.jsx("div",{style:{color:"red"},children:this.state.error}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_iobroker_mf_1_json_mf_2_config__loadShare__.JsonConfigComponent,{style:{width:"100%"},updateData:this.state.updateData,socket:this.props.socket,adapterName:e,instance:parseInt(a,10),schema:this.state.schema,data:this.state.data,onError:o=>this.setState({error:o}),onChange:o=>this.setState({data:o}),onBackEndCommand:o=>{o.schema&&this.setState({schema:o.schema,data:o.data||this.state.data}),(o.command==="refresh"||o.refresh)&&this.getGui(),o.command==="link"&&this.props.onLink(o)},embedded:!0,themeName:this.props.themeName,themeType:this.props.themeType,theme:this.props.theme,isFloatComma:this.props.isFloatComma,dateFormat:this.props.dateFormat})]})}renderSimpleMessage(){return this.props.message.message?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{sx:styles$x.simpleMessage,children:iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.Utils.renderTextWithA(this.props.message.message)}):null}render(){return jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Typography,{component:"div",sx:styles$x.message,children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{sx:styles$x.timestamp,children:new Date(this.props.message.ts).toLocaleString()}),this.renderSimpleMessage(),this.renderCustomGui()]})}}const styles$w={root:t=>({backgroundColor:t.palette.background.paper,width:"100%",height:"auto",display:"flex",borderRadius:"4px",flexDirection:"column"}),paper:{maxWidth:1e3,width:"100%"},flex:{display:"flex"},overflowHidden:{overflow:"hidden"},overflowAuto:{overflowY:"auto"},column:{flexDirection:"column"},headerText:t=>({fontWeight:"bold",fontSize:20,color:t.palette.mode==="dark"?"#DDD":"#111"}),descriptionHeaderText:t=>({margin:"18px 0",color:t.palette.mode==="dark"?"#CCC":"#222"}),img2:{width:25,height:25,margin:"auto 0",mr:"10px",position:"relative","&:after":{content:'""',position:"absolute",zIndex:2,top:0,left:0,width:"100%",height:"100%",background:'url("img/no-image.svg") 100% 100% no-repeat',backgroundSize:"cover",backgroundColor:"#fff"}},heading:{display:"flex",alignItems:"center",overflow:"hidden",width:"100%"},headingTop:{display:"flex",alignItems:"center"},classNameBox:{p:"8px","@media screen and (max-width: 550px)":{p:"4px"}},textStyle:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","@media screen and (max-width: 550px)":{fontSize:"2.9vw"}},content:{overflow:"hidden"},buttonStyle:{m:"3px","@media screen and (max-width: 550px)":{fontSize:"2.9vw"}}};function Status$d({severity:t,isDark:e,...a}){return t==="notify"?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Notifications,{color:e?"primary":"secondary",...a}):t==="info"?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Info,{color:"info",...a}):jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Warning,{style:{color:"#ffca00"},...a})}function a11yProps$1(t){return{id:`scrollable-force-tab-${t}`,"aria-controls":`scrollable-force-tabpanel-${t}`}}const TabPanel$3=({children:t,index:e,sxBox:a,style:n})=>jsxRuntimeExports.jsx("div",{role:"tabpanel",id:`scrollable-force-tabpanel-${e}`,"aria-labelledby":`scrollable-force-tab-${e}`,style:n,children:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{sx:a,children:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Typography,{component:"div",children:t})})});function onLink(t,e,a){let n,i="";t.url?t.url.toString().startsWith("#")||t.url.toString().startsWith("/")?(n=t.target||"_self",i=t.url):t.url.startsWith("http://")||t.url.startsWith("https://")?(n=t.target||"_blank",i=t.url):(i=`#tab-instances/config/${e}/${t.url}`,n=t.target||"_self"):(i=`#tab-instances/config/${e}`,n=t.target||"_self"),n==="_self"?(setTimeout(o=>{o.startsWith("#")?window.location.hash=o:o.startsWith("/")?i=`${window.location.protocol}:${window.location.host}${i}`:(o.startsWith("http://")||o.startsWith("https://"))&&(window.location.href=o)},100,i),t.close&&typeof a=="function"&&a()):(i.startsWith("#")?i=`${window.location.protocol}:${window.location.host}${window.location.pathname}${i}`:i.startsWith("/")&&(i=`${window.location.protocol}:${window.location.host}${i}`),window.open(i,n))}const NotificationsDialog=({notifications:t,onClose:e,ackCallback:a,dateFormat:n,themeType:i,instances:o,themeName:r,theme:l,isFloatComma:h,socket:d})=>{const[p,u]=iobroker_admin__loadShare__react__loadShare__.useState(""),[s,b]=iobroker_admin__loadShare__react__loadShare__.useState([]),[w,k]=iobroker_admin__loadShare__react__loadShare__.useState(""),[x,I]=iobroker_admin__loadShare__react__loadShare__.useState(!0),[N,O]=iobroker_admin__loadShare__react__loadShare__.useState({}),G=(B,R)=>{I(!0),u(R),k("")},g=B=>(R,se)=>k(se?B:""),v=i==="dark",y=!!Object.values(o).find(B=>B.common.name==="notification-manager");iobroker_admin__loadShare__react__loadShare__.useEffect(()=>{const B={};let R="";for(const[se,ie]of Object.entries(t))for(const[he,Ce]of Object.entries(ie.result))if(he!=="system")for(const[ke,Q]of Object.entries(Ce.categories))B[he]=B[he]||{},B[he][ke]={...Q,host:se};if(Object.keys(B).map(se=>Object.keys(B[se]).map(ie=>R=R||`${se}--${ie}`)),p){const[se,ie]=p.split("--");if(!B[se])u(R);else if(!B[se][ie]){const he=Object.keys(B[se])[0];u(he?`${se}--${he}`:R)}}else u(R);O(B)},[o,t,p]);const[S,z]=p.split("--"),H=S&&z?N[S][z]:null;return jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Dialog,{onClose:()=>e(),open:!0,sx:{"& .MuiDialog-paper":styles$w.paper},children:[jsxRuntimeExports.jsxs("h2",{style:styles$w.headingTop,children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Notifications,{sx:{color:"primary.main"},style:{fontSize:36,marginLeft:25,marginRight:10}}),iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.t("Notifications"),y?null:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Tooltip,{sx:{position:"absolute",right:24,color:"text.primary"},title:iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.t('Tip: Use the "notification-manager" adapter to receive notifications automatically via messaging adapters.'),slotProps:{popper:{sx:{pointerEvents:"none"}}},children:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Info,{})})]}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.DialogContent,{style:{...styles$w.flex,...styles$w.overflowHidden},dividers:!0,children:jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{component:"div",sx:styles$w.root,children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.AppBar,{position:"static",color:"default",children:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Tabs,{value:p,onChange:G,variant:"scrollable",scrollButtons:!0,indicatorColor:v?"primary":"secondary",textColor:v?"primary":"secondary",children:Object.keys(N).map(B=>Object.keys(N[B]).map((R,se)=>{const ie=N[B][R],he=`${B}--${R}`;return jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Tab,{disabled:s.includes(he),value:he,label:`${ie.name[iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.getLanguage()]}`,icon:jsxRuntimeExports.jsx(Status$d,{severity:ie.severity,isDark:v}),...a11yProps$1(se)},he)}))})}),H?jsxRuntimeExports.jsxs(TabPanel$3,{sxBox:styles$w.classNameBox,style:{...styles$w.overflowAuto,color:v?"black":void 0},index:p,children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{component:"div",sx:styles$w.headerText,style:{fontWeight:"bold"},children:H.name[iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.getLanguage()]}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{component:"div",sx:styles$w.descriptionHeaderText,children:H.description[iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.getLanguage()]}),jsxRuntimeExports.jsx("div",{children:H.instances?Object.keys(H.instances).map(B=>{var he,Ce;const R=`${p}--${B}`;x&&(g(R)("",!0),I(!1));const se=o&&o[B];let ie="img/no-image.svg";return(he=se==null?void 0:se.common)!=null&&he.icon&&((Ce=se==null?void 0:se.common)!=null&&Ce.name)&&(ie=`adapter/${se.common.name}/${se.common.icon}`),jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Accordion,{style:v?void 0:{backgroundColor:"#c0c0c052"},expanded:w===R,onChange:g(R),children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.AccordionSummary,{expandIcon:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.ExpandMore,{}),sx:{"& .MuiAccordionSummary-content":styles$w.content},"aria-controls":"panel1bh-content",id:"panel1bh-header",children:jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Typography,{style:styles$w.heading,children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.CardMedia,{sx:styles$w.img2,component:"img",image:ie}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{component:"div",sx:styles$w.textStyle,children:B.replace(/^system\.adapter\./,"")})]})}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.AccordionDetails,{style:styles$w.column,children:H.instances[B].messages.map((ke,Q)=>jsxRuntimeExports.jsx(NotificationMessage,{message:ke,dateFormat:n,instanceId:B,socket:d,themeType:i,themeName:r,theme:l,isFloatComma:h,onLink:ae=>onLink(ae,B,e)},Q))})]},R)}):null})]},`tabPanel-${z}`):null]})}),jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.DialogActions,{children:[S&&z?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Button,{variant:"contained",autoFocus:Object.keys(N[S]).length!==1,disabled:s.includes(`${S}--${z}`),style:s.includes(`${S}--${z}`)?{backgroundColor:"silver"}:void 0,sx:styles$w.buttonStyle,onClick:ee=>{ee&&ee.stopPropagation&&ee.stopPropagation(),a(N[S][z].host,z),b([...s,`${S}--${z}`])},color:Object.keys(N[S]).length!==1?"primary":"grey",startIcon:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Check,{}),children:iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.t("Acknowledge")}):null,S&&z&&Object.keys(N[S]).length===1&&jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Button,{variant:"contained",disabled:s.includes(`${S}--${z}`),sx:styles$w.buttonStyle,style:s.includes(`${S}--${z}`)?{backgroundColor:"silver"}:void 0,onClick:ee=>{ee&&ee.stopPropagation&&ee.stopPropagation(),b([...s,`${S}--${z}`]),a(N[S][z].host,z),e()},startIcon:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Check,{}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Close,{})]}),color:"primary",children:iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.t("Acknowledge & close")}),jsxRuntimeExports.jsx("div",{style:{flexGrow:1}}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Button,{id:"notifications-dialog-close",variant:"contained",onClick:ee=>{ee&&ee.stopPropagation&&ee.stopPropagation(),e()},startIcon:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Close,{}),color:"grey",children:iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.I18n.t("Close")})]})]})},styles$v={log:{height:400,width:860,padding:8,overflowY:"auto"},logNoSpacing:{height:"100%",width:"calc(100% - 8px)",marginLeft:8,padding:8,overflowY:"auto"},error:{color:"#f44336"},info:{color:"#2196f3"},warn:{color:"#ffc107"}};let Command$b=class ql extends iobroker_admin__loadShare__react__loadShare__.Component{logRef;static pattern=["error","warn","info"];regExp;constructor(e){super(e),this.state={log:[`$ iobroker ${e.cmd||""}`],init:!1,max:null,value:null,moreChecked:!0,stopped:!1},this.logRef=React.createRef(),this.regExp=new RegExp(ql.pattern.join("|"),"i")}componentDidMount(){this.props.ready&&this.props.cmd&&(console.log(`STARTED: ${this.props.cmd}`),this.executeCommand())}componentDidUpdate(){var e;!this.state.init&&this.props.ready&&this.props.cmd&&this.executeCommand(),this.props.logsRead&&JSON.stringify(this.props.logsRead)!==JSON.stringify(this.state.log)&&this.setState({log:this.props.logsRead}),(e=this.logRef.current)==null||e.scrollIntoView()}executeCommand(){var i;this.setState({init:!0},()=>this.props.onSetCommandRunning&&this.props.onSetCommandRunning(!0)),this.props.socket.registerCmdStdoutHandler(this.cmdStdoutHandler.bind(this)),this.props.socket.registerCmdStderrHandler(this.cmdStderrHandler.bind(this)),this.props.socket.registerCmdExitHandler(this.cmdExitHandler.bind(this));const e=Math.floor(Math.random()*268435454)+1;this.setState({activeCmdId:e});const a=this.props.host.startsWith("system.host.")?this.props.host:`system.host.${this.props.host}`;this.props.socket.cmdExec.bind(this.props.socket)(a,this.props.cmd,e,void 0,(i=this.props.files)!=null&&i.length?this.props.files:void 0).catch(o=>console.log(o))}cmdStdoutHandler(e,a){if(this.state.activeCmdId&&this.state.activeCmdId===e){const n=this.state.log.slice();n.push(a);const i=a.match(/^upload \[(\d+)]/),o=i?null:a.match(/^got [-_:/\\.\w\d]+\/admin$/),r=o?null:a.match(/^got [-_:/\\.\w\d]+\/www$/);let l=this.state.max,h=null;i?(l=l||parseInt(i[1],10),h=parseInt(i[1],10)):(o||r)&&(l=null),this.setState({log:n,max:l,value:h}),console.log("cmdStdout")}}cmdStderrHandler(e,a){if(this.state.activeCmdId&&this.state.activeCmdId===e){const n=this.state.log.slice();n.push(a),this.setState({log:n}),console.log("cmdStderr"),console.log(e),console.log(a)}}cmdExitHandler(e,a){if(this.state.activeCmdId&&this.state.activeCmdId===e){const n=this.state.log.slice();if(!window.document.hidden&&a===0&&n.length&&n[n.length-1].endsWith("created")&&this.props.callback){const o=n[n.length-1].split(" ").find(r=>r.startsWith("system"));o&&setTimeout(r=>{this.props.socket.getObject(r).then(l=>{var h,d;AdminUtils.fixAdminUI(l),l&&((d=(h=l.common)==null?void 0:h.adminUI)==null?void 0:d.config)!=="none"&&iobroker_admin__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.Router.doNavigate("tab-instances","config",r)})},1e3,o)}n.push(`${a!==0?"ERROR: ":""}Process exited with code ${a}`),this.setState({log:n,stopped:!0},()=>{this.props.onSetCommandRunning&&this.props.onSetCommandRunning(!1),a!==0||this.state.log[this.state.log.length-1].toLowerCase().includes("error")?this.props.errorFunc&&this.props.errorFunc(a,this.state.log):(this.props.performed&&this.props.performed(),this.props.onFinished(a,this.state.log)),console.log("cmdExit"),console.log(e),console.log(a),typeof this.props.callback=="function"&&this.props.callback(a)})}}colorize(e,a){if(a&&(e=e.substring(0,a)),e.search(this.regExp)!==-1){const n=[];for(;e.search(this.regExp)>=0;){const[i]=e.match(this.regExp),o=e.search(this.regExp);if(o>0){const l=e.substring(0,o),h=AdminUtils.parseColorMessage(l);n.push(jsxRuntimeExports.jsx("span",{children:typeof h=="object"?h.parts.map((d,p)=>jsxRuntimeExports.jsx("span",{style:d.style,children:d.text},p)):h},n.length)),e=e.replace(l,"")}const r=e.substring(0,i.length);if(r){const l=AdminUtils.parseColorMessage(r);n.push(jsxRuntimeExports.jsx("span",{style:styles$v[i.toLowerCase()],children:typeof l=="object"?l.parts.map((h,d)=>jsxRuntimeExports.jsx("span",{style:h.style,children:h.text},d)):l},n.length)),e=e.replace(r,"")}}if(e){const i=AdminUtils.parseColorMessage(e);n.push(jsxRuntimeExports.jsx("span",{children:typeof i=="object"?i.parts.map((o,r)=>jsxRuntimeExports.jsx("span",{style:o.style,children:o.text},r)):i},n.length))}return n}return e}getLog(){return this.state.log.map((e,a)=>jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Typography,{ref:a===this.state.log.length-1?this.logRef:void 0,component:"p",variant:"body2",children:this.colorize(e)},a))}render(){return jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Grid2,{style:this.props.noSpacing?{height:"100%",width:"100%"}:{},container:!0,direction:"column",spacing:this.props.noSpacing?0:2,children:[this.props.showElement===void 0||this.props.showElement===!0?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Grid2,{children:!this.state.stopped&&jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.LinearProgress,{style:this.props.commandError?{backgroundColor:"#f44336"}:null,variant:this.props.inBackground?"determinate":"indeterminate",value:this.state.max&&this.state.value?100-Math.round(this.state.value/this.state.max*100):this.props.commandError?0:100})}):null,jsxRuntimeExports.jsxs("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:this.props.inBackground?"space-between":"flex-end"},children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Typography,{style:this.props.inBackground?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{display:"none"},component:"div",children:this.colorize(this.state.log[this.state.log.length-1])}),this.props.showElement===void 0||this.props.showElement===!0?jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"end",gap:8,flexWrap:"nowrap"},children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{style:{whiteSpace:"nowrap"},sx:{"@media (max-width: 600px)":{display:"none"}},children:this.props.t("less output")}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Switch,{checked:this.state.moreChecked,onChange:e=>this.setState({moreChecked:e.target.checked}),color:"primary"}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Box,{style:{whiteSpace:"nowrap"},sx:{"@media (max-width: 600px)":{display:"none"}},children:this.props.t("more output")})]}):null]}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Grid2,{style:this.props.noSpacing?{height:"calc(100% - 45px)",width:"100%"}:{},children:this.state.moreChecked&&jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Paper,{style:this.props.noSpacing?styles$v.logNoSpacing:styles$v.log,children:this.getLog()})})]})}};const styles$u={closeButton:t=>({position:"absolute",right:8,top:8,color:t.palette.grey[500]}),hiddenDialog:{display:"none"},dialogRoot:{height:"calc(100% - 64px)"}};class CommandDialog extends iobroker_admin__loadShare__react__loadShare__.Component{paperRef=React.createRef();constructor(e){super(e),this.state={progressText:"",isError:!1,closeOnReady:(window._localStorage||window.localStorage).getItem("CommandDialog.closeOnReady")==="true",dialogWidth:0}}componentDidMount(){window.addEventListener("resize",this.handleResize)}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}handleResize=()=>{this.paperRef.current&&(this.paperRef.current.offsetWidth||0)!==this.state.dialogWidth&&this.setState({dialogWidth:this.paperRef.current.offsetWidth||0})};componentDidUpdate(){var e,a;this.state.dialogWidth!==(((e=this.paperRef.current)==null?void 0:e.offsetWidth)||0)&&this.setState({dialogWidth:((a=this.paperRef.current)==null?void 0:a.offsetWidth)||0})}render(){return jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Dialog,{scroll:"paper",fullWidth:!0,sx:{"&.MuiDialog-root":this.props.visible?void 0:styles$u.hiddenDialog,"& .MuiDialog-paper":styles$u.dialogRoot},onClose:this.props.inBackground?this.props.onClose:this.props.onInBackground,open:!0,maxWidth:"md",ref:this.paperRef,children:[jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.DialogTitle,{children:[this.state.progressText||this.props.t("Running command"),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.IconButton,{size:"large",sx:styles$u.closeButton,onClick:this.props.onClose,disabled:this.props.inBackground,children:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Close,{})})]}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.DialogContent,{dividers:!0,style:{height:"100%"},children:jsxRuntimeExports.jsx(Command$b,{noSpacing:!0,ready:this.props.ready,host:this.props.host,socket:this.props.socket,t:this.props.t,inBackground:this.props.inBackground,commandError:this.props.commandError,errorFunc:()=>{this.setState({isError:!0}),this.props.errorFunc()},performed:this.props.performed,callback:this.props.callback,cmd:this.props.cmd,files:this.props.files,onFinished:()=>this.state.closeOnReady&&this.props.onClose(),onSetCommandRunning:e=>this.props.onSetCommandRunning(e)},"command")}),jsxRuntimeExports.jsxs(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.DialogActions,{style:{justifyContent:"space-between",gap:8},children:[jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.FormControlLabel,{style:{marginLeft:16},control:jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Checkbox,{disabled:this.props.inBackground,checked:this.state.closeOnReady,onChange:e=>{this.setState({closeOnReady:e.target.checked}),(window._localStorage||window.localStorage).setItem("CommandDialog.closeOnReady",e.target.checked?"true":"false")}}),label:this.props.t("close on ready")}),jsxRuntimeExports.jsx("div",{style:{flexGrow:1}}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Button,{variant:"contained",autoFocus:!0,title:this.props.confirmText||this.props.t("In background"),disabled:this.props.inBackground,onClick:this.props.onInBackground,startIcon:this.state.dialogWidth>600?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.OpenInBrowser,{}):null,color:"primary",children:this.state.dialogWidth<=600?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.OpenInBrowser,{}):this.props.confirmText||this.props.t("In background")}),jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_material__loadShare__.Button,{variant:"contained",disabled:!this.props.inBackground,onClick:this.props.onClose,color:"grey",style:{backgroundColor:this.state.isError?"#834141":void 0,color:this.state.isError?"#fff":void 0},startIcon:this.state.dialogWidth>600?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Close,{}):null,children:this.state.dialogWidth<=600?jsxRuntimeExports.jsx(iobroker_admin__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.Close,{}):this.props.t("Close")})]})]})}}var lodash$1={exports:{}};var lodash=lodash$1.exports;(function(t,e){(function(){var a,n="4.17.23",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",r="Expected a function",l="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",d=500,p="__lodash_placeholder__",u=1,s=2,b=4,w=1,k=2,x=1,I=2,N=4,O=8,G=16,g=32,v=64,y=128,S=256,z=512,H=30,B="...",R=800,se=16,ie=1,he=2,Ce=3,ke=1/0,Q=9007199254740991,ae=17976931348623157e292,A=NaN,de=4294967295,Ie=de-1,U=de>>>1,J=[["ary",y],["bind",x],["bindKey",I],["curry",O],["curryRight",G],["flip",z],["partial",g],["partialRight",v],["rearg",S]],W="[object Arguments]",me="[object Array]",we="[object AsyncFunction]",De="[object Boolean]",Ee="[object Date]",ge="[object DOMException]",Te="[object Error]",Ue="[object Function]",qe="[object GeneratorFunction]",ut="[object Map]",Je="[object Number]",Ze="[object Null]",at="[object Object]",yt="[object Promise]",nt="[object Proxy]",mt="[object RegExp]",st="[object Set]",la="[object String]",ea="[object Symbol]",K="[object Undefined]",te="[object WeakMap]",X="[object WeakSet]",pe="[object ArrayBuffer]",ze="[object DataView]",Ye="[object Float32Array]",lt="[object Float64Array]",rt="[object Int8Array]",Wt="[object Int16Array]",jt="[object Int32Array]",qt="[object Uint8Array]",ta="[object Uint8ClampedArray]",Pt="[object Uint16Array]",It="[object Uint32Array]",Vt=/\b__p \+= '';/g,$a=/\b(__p \+=) '' \+/g,wa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Aa=/&(?:amp|lt|gt|quot|#39);/g,Da=/[&<>"']/g,ya=RegExp(Aa.source),j=RegExp(Da.source),ne=/<%-([\s\S]+?)%>/g,L=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,ca=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qt=/^\w*$/,ua=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ve=/[\\^$.*+?()[\]{}|]/g,He=RegExp(Ve.source),Fe=/^\s+/,dt=/\s/,Rt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,gt=/\{\n\/\* \[wrapped with (.+)\] \*/,Za=/,? & /,Sa=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ua=/[()=,{}\[\]\/\s]/,sn=/\\(\\)?/g,An=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ta=/\w*$/,Ln=/^[-+]0x[0-9a-f]+$/i,Tn=/^0b[01]+$/i,Yt=/^\[object .+?Constructor\]$/,ht=/^0o[0-7]+$/i,gn=/^(?:0|[1-9]\d*)$/,bn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,yn=/($^)/,vn=/['\n\r\u2028\u2029\\]/g,Qa="\\ud800-\\udfff",jn="\\u0300-\\u036f",Xa="\\ufe20-\\ufe2f",en="\\u20d0-\\u20ff",Ot=jn+Xa+en,Ma="\\u2700-\\u27bf",ma="a-z\\xdf-\\xf6\\xf8-\\xff",La="\\xac\\xb1\\xd7\\xf7",Ha="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",bt="\\u2000-\\u206f",$n=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ga="A-Z\\xc0-\\xd6\\xd8-\\xde",ka="\\ufe0e\\ufe0f",Dt=La+Ha+bt+$n,Wa="['’]",ln="["+Qa+"]",xa="["+Dt+"]",ja="["+Ot+"]",Nn="\\d+",co="["+Ma+"]",tn="["+ma+"]",Pn="[^"+Qa+Dt+Nn+Ma+ma+Ga+"]",Na="\\ud83c[\\udffb-\\udfff]",On="(?:"+ja+"|"+Na+")",In="[^"+Qa+"]",pa="(?:\\ud83c[\\udde6-\\uddff]){2}",C="[\\ud800-\\udbff][\\udc00-\\udfff]",T="["+Ga+"]",D="\\u200d",Z="(?:"+tn+"|"+Pn+")",ue="(?:"+T+"|"+Pn+")",fe="(?:"+Wa+"(?:d|ll|m|re|s|t|ve))?",Se="(?:"+Wa+"(?:D|LL|M|RE|S|T|VE))?",je=On+"?",Be="["+ka+"]?",Ge="(?:"+D+"(?:"+[In,pa,C].join("|")+")"+Be+je+")*",vt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Qe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ct=Be+je+Ge,Nt="(?:"+[co,pa,C].join("|")+")"+ct,Ft="(?:"+[In+ja+"?",ja,pa,C,ln].join("|")+")",We=RegExp(Wa,"g"),$t=RegExp(ja,"g"),Kt=RegExp(Na+"(?="+Na+")|"+Ft+ct,"g"),ha=RegExp([T+"?"+tn+"+"+fe+"(?="+[xa,T,"$"].join("|")+")",ue+"+"+Se+"(?="+[xa,T+Z,"$"].join("|")+")",T+"?"+Z+"+"+fe,T+"+"+Se,Qe,vt,Nn,Nt].join("|"),"g"),uo=RegExp("["+D+Qa+Ot+ka+"]"),Zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Oo=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bo=-1,Ut={};Ut[Ye]=Ut[lt]=Ut[rt]=Ut[Wt]=Ut[jt]=Ut[qt]=Ut[ta]=Ut[Pt]=Ut[It]=!0,Ut[W]=Ut[me]=Ut[pe]=Ut[De]=Ut[ze]=Ut[Ee]=Ut[Te]=Ut[Ue]=Ut[ut]=Ut[Je]=Ut[at]=Ut[mt]=Ut[st]=Ut[la]=Ut[te]=!1;var wt={};wt[W]=wt[me]=wt[pe]=wt[ze]=wt[De]=wt[Ee]=wt[Ye]=wt[lt]=wt[rt]=wt[Wt]=wt[jt]=wt[ut]=wt[Je]=wt[at]=wt[mt]=wt[st]=wt[la]=wt[ea]=wt[qt]=wt[ta]=wt[Pt]=wt[It]=!0,wt[Te]=wt[Ue]=wt[te]=!1;var mo={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Qn={"&":"&","<":"<",">":">",'"':""","'":"'"},cn={"&":"&","<":"<",">":">",""":'"',"'":"'"},Bn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},So=parseFloat,ee=parseInt,xe=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,Ne=typeof self=="object"&&self&&self.Object===Object&&self,Xe=xe||Ne||Function("return this")(),aa=e&&!e.nodeType&&e,Xt=aa&&!0&&t&&!t.nodeType&&t,qa=Xt&&Xt.exports===aa,ra=qa&&xe.process,da=(function(){try{var be=Xt&&Xt.require&&Xt.require("util").types;return be||ra&&ra.binding&&ra.binding("util")}catch{}})(),wn=da&&da.isArrayBuffer,Sn=da&&da.isDate,Xn=da&&da.isMap,po=da&&da.isRegExp,eo=da&&da.isSet,Fn=da&&da.isTypedArray;function Pa(be,Re,Ae){switch(Ae.length){case 0:return be.call(Re);case 1:return be.call(Re,Ae[0]);case 2:return be.call(Re,Ae[0],Ae[1]);case 3:return be.call(Re,Ae[0],Ae[1],Ae[2])}return be.apply(Re,Ae)}function Qr(be,Re,Ae,ot){for(var St=-1,Bt=be==null?0:be.length;++St<Bt;){var ga=be[St];Re(ot,ga,Ae(ga),be)}return ot}function _a(be,Re){for(var Ae=-1,ot=be==null?0:be.length;++Ae<ot&&Re(be[Ae],Ae,be)!==!1;);return be}function cr(be,Re){for(var Ae=be==null?0:be.length;Ae--&&Re(be[Ae],Ae,be)!==!1;);return be}function Ia(be,Re){for(var Ae=-1,ot=be==null?0:be.length;++Ae<ot;)if(!Re(be[Ae],Ae,be))return!1;return!0}function Rn(be,Re){for(var Ae=-1,ot=be==null?0:be.length,St=0,Bt=[];++Ae<ot;){var ga=be[Ae];Re(ga,Ae,be)&&(Bt[St++]=ga)}return Bt}function ho(be,Re){var Ae=be==null?0:be.length;return!!Ae&&to(be,Re,0)>-1}function Fo(be,Re,Ae){for(var ot=-1,St=be==null?0:be.length;++ot<St;)if(Ae(Re,be[ot]))return!0;return!1}function Zt(be,Re){for(var Ae=-1,ot=be==null?0:be.length,St=Array(ot);++Ae<ot;)St[Ae]=Re(be[Ae],Ae,be);return St}function un(be,Re){for(var Ae=-1,ot=Re.length,St=be.length;++Ae<ot;)be[St+Ae]=Re[Ae];return be}function ko(be,Re,Ae,ot){var St=-1,Bt=be==null?0:be.length;for(ot&&Bt&&(Ae=be[++St]);++St<Bt;)Ae=Re(Ae,be[St],St,be);return Ae}function ur(be,Re,Ae,ot){var St=be==null?0:be.length;for(ot&&St&&(Ae=be[--St]);St--;)Ae=Re(Ae,be[St],St,be);return Ae}function Uo(be,Re){for(var Ae=-1,ot=be==null?0:be.length;++Ae<ot;)if(Re(be[Ae],Ae,be))return!0;return!1}var Ho=Wo("length");function dr(be){return be.split("")}function Xr(be){return be.match(Sa)||[]}function mr(be,Re,Ae){var ot;return Ae(be,function(St,Bt,ga){if(Re(St,Bt,ga))return ot=Bt,!1}),ot}function xo(be,Re,Ae,ot){for(var St=be.length,Bt=Ae+(ot?1:-1);ot?Bt--:++Bt<St;)if(Re(be[Bt],Bt,be))return Bt;return-1}function to(be,Re,Ae){return Re===Re?Kl(be,Re,Ae):xo(be,pr,Ae)}function ei(be,Re,Ae,ot){for(var St=Ae-1,Bt=be.length;++St<Bt;)if(ot(be[St],Re))return St;return-1}function pr(be){return be!==be}function Go(be,Re){var Ae=be==null?0:be.length;return Ae?qo(be,Re)/Ae:A}function Wo(be){return function(Re){return Re==null?a:Re[be]}}function Eo(be){return function(Re){return be==null?a:be[Re]}}function hr(be,Re,Ae,ot,St){return St(be,function(Bt,ga,Jt){Ae=ot?(ot=!1,Bt):Re(Ae,Bt,ga,Jt)}),Ae}function ti(be,Re){var Ae=be.length;for(be.sort(Re);Ae--;)be[Ae]=be[Ae].value;return be}function qo(be,Re){for(var Ae,ot=-1,St=be.length;++ot<St;){var Bt=Re(be[ot]);Bt!==a&&(Ae=Ae===a?Bt:Ae+Bt)}return Ae}function Vo(be,Re){for(var Ae=-1,ot=Array(be);++Ae<be;)ot[Ae]=Re(Ae);return ot}function Jo(be,Re){return Zt(Re,function(Ae){return[Ae,be[Ae]]})}function M(be){return be&&be.slice(0,Xi(be)+1).replace(Fe,"")}function F(be){return function(Re){return be(Re)}}function oe(be,Re){return Zt(Re,function(Ae){return be[Ae]})}function ce(be,Re){return be.has(Re)}function ye(be,Re){for(var Ae=-1,ot=be.length;++Ae<ot&&to(Re,be[Ae],0)>-1;);return Ae}function ve(be,Re){for(var Ae=be.length;Ae--&&to(Re,be[Ae],0)>-1;);return Ae}function Me(be,Re){for(var Ae=be.length,ot=0;Ae--;)be[Ae]===Re&&++ot;return ot}var Ke=Eo(mo),xt=Eo(Qn);function Ct(be){return"\\"+Bn[be]}function Ea(be,Re){return be==null?a:be[Re]}function fa(be){return uo.test(be)}function Vl(be){return Zn.test(be)}function Jl(be){for(var Re,Ae=[];!(Re=be.next()).done;)Ae.push(Re.value);return Ae}function ai(be){var Re=-1,Ae=Array(be.size);return be.forEach(function(ot,St){Ae[++Re]=[St,ot]}),Ae}function Qi(be,Re){return function(Ae){return be(Re(Ae))}}function ao(be,Re){for(var Ae=-1,ot=be.length,St=0,Bt=[];++Ae<ot;){var ga=be[Ae];(ga===Re||ga===p)&&(be[Ae]=p,Bt[St++]=Ae)}return Bt}function _r(be){var Re=-1,Ae=Array(be.size);return be.forEach(function(ot){Ae[++Re]=ot}),Ae}function Yl(be){var Re=-1,Ae=Array(be.size);return be.forEach(function(ot){Ae[++Re]=[ot,ot]}),Ae}function Kl(be,Re,Ae){for(var ot=Ae-1,St=be.length;++ot<St;)if(be[ot]===Re)return ot;return-1}function Zl(be,Re,Ae){for(var ot=Ae+1;ot--;)if(be[ot]===Re)return ot;return ot}function Co(be){return fa(be)?Xl(be):Ho(be)}function kn(be){return fa(be)?ec(be):dr(be)}function Xi(be){for(var Re=be.length;Re--&&dt.test(be.charAt(Re)););return Re}var Ql=Eo(cn);function Xl(be){for(var Re=Kt.lastIndex=0;Kt.test(be);)++Re;return Re}function ec(be){return be.match(Kt)||[]}function tc(be){return be.match(ha)||[]}var ac=(function be(Re){Re=Re==null?Xe:Ao.defaults(Xe.Object(),Re,Ao.pick(Xe,Oo));var Ae=Re.Array,ot=Re.Date,St=Re.Error,Bt=Re.Function,ga=Re.Math,Jt=Re.Object,ni=Re.RegExp,nc=Re.String,dn=Re.TypeError,fr=Ae.prototype,oc=Bt.prototype,jo=Jt.prototype,gr=Re["__core-js_shared__"],br=oc.toString,Ht=jo.hasOwnProperty,rc=0,es=(function(){var c=/[^.]+$/.exec(gr&&gr.keys&&gr.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""})(),yr=jo.toString,ic=br.call(Jt),sc=Xe._,cc=ni("^"+br.call(Ht).replace(Ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vr=qa?Re.Buffer:a,no=Re.Symbol,$r=Re.Uint8Array,as=vr?vr.allocUnsafe:a,wr=Qi(Jt.getPrototypeOf,Jt),ns=Jt.create,rs=jo.propertyIsEnumerable,Sr=fr.splice,is=no?no.isConcatSpreadable:a,Yo=no?no.iterator:a,_o=no?no.toStringTag:a,kr=(function(){try{var c=vo(Jt,"defineProperty");return c({},"",{}),c}catch{}})(),uc=Re.clearTimeout!==Xe.clearTimeout&&Re.clearTimeout,dc=ot&&ot.now!==Xe.Date.now&&ot.now,mc=Re.setTimeout!==Xe.setTimeout&&Re.setTimeout,xr=ga.ceil,Er=ga.floor,oi=Jt.getOwnPropertySymbols,pc=vr?vr.isBuffer:a,ss=Re.isFinite,hc=fr.join,_c=Qi(Jt.keys,Jt),ba=ga.max,Ra=ga.min,fc=ot.now,gc=Re.parseInt,ls=ga.random,bc=fr.reverse,ri=vo(Re,"DataView"),Ko=vo(Re,"Map"),ii=vo(Re,"Promise"),Io=vo(Re,"Set"),Zo=vo(Re,"WeakMap"),Qo=vo(Jt,"create"),Cr=Zo&&new Zo,Ro={},yc=$o(ri),vc=$o(Ko),$c=$o(ii),wc=$o(Io),Sc=$o(Zo),Ar=no?no.prototype:a,Xo=Ar?Ar.valueOf:a,cs=Ar?Ar.toString:a;function q(c){if(oa(c)&&!kt(c)&&!(c instanceof Mt)){if(c instanceof mn)return c;if(Ht.call(c,"__wrapped__"))return dl(c)}return new mn(c)}var zo=(function(){function c(){}return function(f){if(!na(f))return{};if(ns)return ns(f);c.prototype=f;var $=new c;return c.prototype=a,$}})();function Tr(){}function mn(c,f){this.__wrapped__=c,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=a}q.templateSettings={escape:ne,evaluate:L,interpolate:et,variable:"",imports:{_:q}},q.prototype=Tr.prototype,q.prototype.constructor=q,mn.prototype=zo(Tr.prototype),mn.prototype.constructor=mn;function Mt(c){this.__wrapped__=c,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=de,this.__views__=[]}function kc(){var c=new Mt(this.__wrapped__);return c.__actions__=Va(this.__actions__),c.__dir__=this.__dir__,c.__filtered__=this.__filtered__,c.__iteratees__=Va(this.__iteratees__),c.__takeCount__=this.__takeCount__,c.__views__=Va(this.__views__),c}function xc(){if(this.__filtered__){var c=new Mt(this);c.__dir__=-1,c.__filtered__=!0}else c=this.clone(),c.__dir__*=-1;return c}function Ec(){var c=this.__wrapped__.value(),f=this.__dir__,$=kt(c),E=f<0,P=$?c.length:0,Y=Pu(0,P,this.__views__),le=Y.start,_e=Y.end,$e=_e-le,Le=E?_e:le-1,Pe=this.__iteratees__,Oe=Pe.length,tt=0,it=Ra($e,this.__takeCount__);if(!$||!E&&P==$e&&it==$e)return Ds(c,this.__actions__);var _t=[];e:for(;$e--&&tt<it;){Le+=f;for(var At=-1,ft=c[Le];++At<Oe;){var zt=Pe[At],Lt=zt.iteratee,on=zt.type,Fa=Lt(ft);if(on==he)ft=Fa;else if(!Fa){if(on==ie)continue e;break e}}_t[tt++]=ft}return _t}Mt.prototype=zo(Tr.prototype),Mt.prototype.constructor=Mt;function fo(c){var f=-1,$=c==null?0:c.length;for(this.clear();++f<$;){var E=c[f];this.set(E[0],E[1])}}function Cc(){this.__data__=Qo?Qo(null):{},this.size=0}function Ac(c){var f=this.has(c)&&delete this.__data__[c];return this.size-=f?1:0,f}function Tc(c){var f=this.__data__;if(Qo){var $=f[c];return $===h?a:$}return Ht.call(f,c)?f[c]:a}function jc(c){var f=this.__data__;return Qo?f[c]!==a:Ht.call(f,c)}function Ic(c,f){var $=this.__data__;return this.size+=this.has(c)?0:1,$[c]=Qo&&f===a?h:f,this}fo.prototype.clear=Cc,fo.prototype.delete=Ac,fo.prototype.get=Tc,fo.prototype.has=jc,fo.prototype.set=Ic;function Un(c){var f=-1,$=c==null?0:c.length;for(this.clear();++f<$;){var E=c[f];this.set(E[0],E[1])}}function Rc(){this.__data__=[],this.size=0}function zc(c){var f=this.__data__,$=jr(f,c);if($<0)return!1;var E=f.length-1;return $==E?f.pop():Sr.call(f,$,1),--this.size,!0}function Dc(c){var f=this.__data__,$=jr(f,c);return $<0?a:f[$][1]}function Mc(c){return jr(this.__data__,c)>-1}function Lc(c,f){var $=this.__data__,E=jr($,c);return E<0?(++this.size,$.push([c,f])):$[E][1]=f,this}Un.prototype.clear=Rc,Un.prototype.delete=zc,Un.prototype.get=Dc,Un.prototype.has=Mc,Un.prototype.set=Lc;function Hn(c){var f=-1,$=c==null?0:c.length;for(this.clear();++f<$;){var E=c[f];this.set(E[0],E[1])}}function Nc(){this.size=0,this.__data__={hash:new fo,map:new(Ko||Un),string:new fo}}function Pc(c){var f=Ur(this,c).delete(c);return this.size-=f?1:0,f}function Oc(c){return Ur(this,c).get(c)}function Bc(c){return Ur(this,c).has(c)}function Fc(c,f){var $=Ur(this,c),E=$.size;return $.set(c,f),this.size+=$.size==E?0:1,this}Hn.prototype.clear=Nc,Hn.prototype.delete=Pc,Hn.prototype.get=Oc,Hn.prototype.has=Bc,Hn.prototype.set=Fc;function go(c){var f=-1,$=c==null?0:c.length;for(this.__data__=new Hn;++f<$;)this.add(c[f])}function Uc(c){return this.__data__.set(c,h),this}function Hc(c){return this.__data__.has(c)}go.prototype.add=go.prototype.push=Uc,go.prototype.has=Hc;function xn(c){var f=this.__data__=new Un(c);this.size=f.size}function Gc(){this.__data__=new Un,this.size=0}function Wc(c){var f=this.__data__,$=f.delete(c);return this.size=f.size,$}function qc(c){return this.__data__.get(c)}function Vc(c){return this.__data__.has(c)}function Jc(c,f){var $=this.__data__;if($ instanceof Un){var E=$.__data__;if(!Ko||E.length<i-1)return E.push([c,f]),this.size=++$.size,this;$=this.__data__=new Hn(E)}return $.set(c,f),this.size=$.size,this}xn.prototype.clear=Gc,xn.prototype.delete=Wc,xn.prototype.get=qc,xn.prototype.has=Vc,xn.prototype.set=Jc;function us(c,f){var $=kt(c),E=!$&&wo(c),P=!$&&!E&&lo(c),Y=!$&&!E&&!P&&No(c),le=$||E||P||Y,_e=le?Vo(c.length,nc):[],$e=_e.length;for(var Le in c)(f||Ht.call(c,Le))&&!(le&&(Le=="length"||P&&(Le=="offset"||Le=="parent")||Y&&(Le=="buffer"||Le=="byteLength"||Le=="byteOffset")||Vn(Le,$e)))&&_e.push(Le);return _e}function ds(c){var f=c.length;return f?c[gi(0,f-1)]:a}function Yc(c,f){return Hr(Va(c),bo(f,0,c.length))}function Kc(c){return Hr(Va(c))}function si(c,f,$){($!==a&&!En(c[f],$)||$===a&&!(f in c))&&Gn(c,f,$)}function er(c,f,$){var E=c[f];(!(Ht.call(c,f)&&En(E,$))||$===a&&!(f in c))&&Gn(c,f,$)}function jr(c,f){for(var $=c.length;$--;)if(En(c[$][0],f))return $;return-1}function Zc(c,f,$,E){return oo(c,function(P,Y,le){f(E,P,$(P),le)}),E}function ps(c,f){return c&&Dn(f,va(f),c)}function Qc(c,f){return c&&Dn(f,Ya(f),c)}function Gn(c,f,$){f=="__proto__"&&kr?kr(c,f,{configurable:!0,enumerable:!0,value:$,writable:!0}):c[f]=$}function li(c,f){for(var $=-1,E=f.length,P=Ae(E),Y=c==null;++$<E;)P[$]=Y?a:Ui(c,f[$]);return P}function bo(c,f,$){return c===c&&($!==a&&(c=c<=$?c:$),f!==a&&(c=c>=f?c:f)),c}function pn(c,f,$,E,P,Y){var le,_e=f&u,$e=f&s,Le=f&b;if($&&(le=P?$(c,E,P,Y):$(c)),le!==a)return le;if(!na(c))return c;var Pe=kt(c);if(Pe){if(le=Bu(c),!_e)return Va(c,le)}else{var Oe=za(c),tt=Oe==Ue||Oe==qe;if(lo(c))return Ns(c,_e);if(Oe==at||Oe==W||tt&&!P){if(le=$e||tt?{}:al(c),!_e)return $e?Tu(c,Qc(le,c)):Au(c,ps(le,c))}else{if(!wt[Oe])return P?c:{};le=Fu(c,Oe,_e)}}Y||(Y=new xn);var it=Y.get(c);if(it)return it;Y.set(c,le),Il(c)?c.forEach(function(ft){le.add(pn(ft,f,$,ft,c,Y))}):Tl(c)&&c.forEach(function(ft,zt){le.set(zt,pn(ft,f,$,zt,c,Y))});var _t=Le?$e?Ai:Ci:$e?Ya:va,At=Pe?a:_t(c);return _a(At||c,function(ft,zt){At&&(zt=ft,ft=c[zt]),er(le,zt,pn(ft,f,$,zt,c,Y))}),le}function Xc(c){var f=va(c);return function($){return hs($,c,f)}}function hs(c,f,$){var E=$.length;if(c==null)return!E;for(c=Jt(c);E--;){var P=$[E],Y=f[P],le=c[P];if(le===a&&!(P in c)||!Y(le))return!1}return!0}function _s(c,f,$){if(typeof c!="function")throw new dn(r);return sr(function(){c.apply(a,$)},f)}function tr(c,f,$,E){var P=-1,Y=ho,le=!0,_e=c.length,$e=[],Le=f.length;if(!_e)return $e;$&&(f=Zt(f,F($))),E?(Y=Fo,le=!1):f.length>=i&&(Y=ce,le=!1,f=new go(f));e:for(;++P<_e;){var Pe=c[P],Oe=$==null?Pe:$(Pe);if(Pe=E||Pe!==0?Pe:0,le&&Oe===Oe){for(var tt=Le;tt--;)if(f[tt]===Oe)continue e;$e.push(Pe)}else Y(f,Oe,E)||$e.push(Pe)}return $e}var oo=Us(zn),fs=Us(ui,!0);function eu(c,f){var $=!0;return oo(c,function(E,P,Y){return $=!!f(E,P,Y),$}),$}function Ir(c,f,$){for(var E=-1,P=c.length;++E<P;){var Y=c[E],le=f(Y);if(le!=null&&(_e===a?le===le&&!nn(le):$(le,_e)))var _e=le,$e=Y}return $e}function tu(c,f,$,E){var P=c.length;for($=Et($),$<0&&($=-$>P?0:P+$),E=E===a||E>P?P:Et(E),E<0&&(E+=P),E=$>E?0:zl(E);$<E;)c[$++]=f;return c}function gs(c,f){var $=[];return oo(c,function(E,P,Y){f(E,P,Y)&&$.push(E)}),$}function Ca(c,f,$,E,P){var Y=-1,le=c.length;for($||($=Hu),P||(P=[]);++Y<le;){var _e=c[Y];f>0&&$(_e)?f>1?Ca(_e,f-1,$,E,P):un(P,_e):E||(P[P.length]=_e)}return P}var ci=Hs(),bs=Hs(!0);function zn(c,f){return c&&ci(c,f,va)}function ui(c,f){return c&&bs(c,f,va)}function Rr(c,f){return Rn(f,function($){return Jn(c[$])})}function yo(c,f){f=io(f,c);for(var $=0,E=f.length;c!=null&&$<E;)c=c[Mn(f[$++])];return $&&$==E?c:a}function ys(c,f,$){var E=f(c);return kt(c)?E:un(E,$(c))}function Oa(c){return c==null?c===a?K:Ze:_o&&_o in Jt(c)?Nu(c):Ku(c)}function di(c,f){return c>f}function au(c,f){return c!=null&&Ht.call(c,f)}function nu(c,f){return c!=null&&f in Jt(c)}function ou(c,f,$){return c>=Ra(f,$)&&c<ba(f,$)}function mi(c,f,$){for(var E=$?Fo:ho,P=c[0].length,Y=c.length,le=Y,_e=Ae(Y),$e=1/0,Le=[];le--;){var Pe=c[le];le&&f&&(Pe=Zt(Pe,F(f))),$e=Ra(Pe.length,$e),_e[le]=!$&&(f||P>=120&&Pe.length>=120)?new go(le&&Pe):a}Pe=c[0];var Oe=-1,tt=_e[0];e:for(;++Oe<P&&Le.length<$e;){var it=Pe[Oe],_t=f?f(it):it;if(it=$||it!==0?it:0,!(tt?ce(tt,_t):E(Le,_t,$))){for(le=Y;--le;){var At=_e[le];if(!(At?ce(At,_t):E(c[le],_t,$)))continue e}tt&&tt.push(_t),Le.push(it)}}return Le}function ru(c,f,$,E){return zn(c,function(P,Y,le){f(E,$(P),Y,le)}),E}function ar(c,f,$){f=io(f,c),c=il(c,f);var E=c==null?c:c[Mn(_n(f))];return E==null?a:Pa(E,c,$)}function vs(c){return oa(c)&&Oa(c)==W}function iu(c){return oa(c)&&Oa(c)==pe}function su(c){return oa(c)&&Oa(c)==Ee}function nr(c,f,$,E,P){return c===f?!0:c==null||f==null||!oa(c)&&!oa(f)?c!==c&&f!==f:lu(c,f,$,E,nr,P)}function lu(c,f,$,E,P,Y){var le=kt(c),_e=kt(f),$e=le?me:za(c),Le=_e?me:za(f);$e=$e==W?at:$e,Le=Le==W?at:Le;var Pe=$e==at,Oe=Le==at,tt=$e==Le;if(tt&&lo(c)){if(!lo(f))return!1;le=!0,Pe=!1}if(tt&&!Pe)return Y||(Y=new xn),le||No(c)?Xs(c,f,$,E,P,Y):Mu(c,f,$e,$,E,P,Y);if(!($&w)){var it=Pe&&Ht.call(c,"__wrapped__"),_t=Oe&&Ht.call(f,"__wrapped__");if(it||_t){var At=it?c.value():c,ft=_t?f.value():f;return Y||(Y=new xn),P(At,ft,$,E,Y)}}return tt?(Y||(Y=new xn),Lu(c,f,$,E,P,Y)):!1}function cu(c){return oa(c)&&za(c)==ut}function pi(c,f,$,E){var P=$.length,Y=P,le=!E;if(c==null)return!Y;for(c=Jt(c);P--;){var _e=$[P];if(le&&_e[2]?_e[1]!==c[_e[0]]:!(_e[0]in c))return!1}for(;++P<Y;){_e=$[P];var $e=_e[0],Le=c[$e],Pe=_e[1];if(le&&_e[2]){if(Le===a&&!($e in c))return!1}else{var Oe=new xn;if(E)var tt=E(Le,Pe,$e,c,f,Oe);if(!(tt===a?nr(Pe,Le,w|k,E,Oe):tt))return!1}}return!0}function $s(c){if(!na(c)||Wu(c))return!1;var f=Jn(c)?cc:Yt;return f.test($o(c))}function uu(c){return oa(c)&&Oa(c)==mt}function du(c){return oa(c)&&za(c)==st}function mu(c){return oa(c)&&Yr(c.length)&&!!Ut[Oa(c)]}function ws(c){return typeof c=="function"?c:c==null?Ka:typeof c=="object"?kt(c)?xs(c[0],c[1]):ks(c):Gl(c)}function hi(c){if(!ir(c))return _c(c);var f=[];for(var $ in Jt(c))Ht.call(c,$)&&$!="constructor"&&f.push($);return f}function pu(c){if(!na(c))return Yu(c);var f=ir(c),$=[];for(var E in c)E=="constructor"&&(f||!Ht.call(c,E))||$.push(E);return $}function _i(c,f){return c<f}function Ss(c,f){var $=-1,E=Ja(c)?Ae(c.length):[];return oo(c,function(P,Y,le){E[++$]=f(P,Y,le)}),E}function ks(c){var f=ji(c);return f.length==1&&f[0][2]?ol(f[0][0],f[0][1]):function($){return $===c||pi($,c,f)}}function xs(c,f){return Ri(c)&&nl(f)?ol(Mn(c),f):function($){var E=Ui($,c);return E===a&&E===f?Hi($,c):nr(f,E,w|k)}}function zr(c,f,$,E,P){c!==f&&ci(f,function(Y,le){if(P||(P=new xn),na(Y))hu(c,f,le,$,zr,E,P);else{var _e=E?E(Di(c,le),Y,le+"",c,f,P):a;_e===a&&(_e=Y),si(c,le,_e)}},Ya)}function hu(c,f,$,E,P,Y,le){var _e=Di(c,$),$e=Di(f,$),Le=le.get($e);if(Le){si(c,$,Le);return}var Pe=Y?Y(_e,$e,$+"",c,f,le):a,Oe=Pe===a;if(Oe){var tt=kt($e),it=!tt&&lo($e),_t=!tt&&!it&&No($e);Pe=$e,tt||it||_t?kt(_e)?Pe=_e:ia(_e)?Pe=Va(_e):it?(Oe=!1,Pe=Ns($e,!0)):_t?(Oe=!1,Pe=Ps($e,!0)):Pe=[]:lr($e)||wo($e)?(Pe=_e,wo(_e)?Pe=Dl(_e):(!na(_e)||Jn(_e))&&(Pe=al($e))):Oe=!1}Oe&&(le.set($e,Pe),P(Pe,$e,E,Y,le),le.delete($e)),si(c,$,Pe)}function Es(c,f){var $=c.length;if($)return f+=f<0?$:0,Vn(f,$)?c[f]:a}function Cs(c,f,$){f.length?f=Zt(f,function(Y){return kt(Y)?function(le){return yo(le,Y.length===1?Y[0]:Y)}:Y}):f=[Ka];var E=-1;f=Zt(f,F(pt()));var P=Ss(c,function(Y,le,_e){var $e=Zt(f,function(Le){return Le(Y)});return{criteria:$e,index:++E,value:Y}});return ti(P,function(Y,le){return Cu(Y,le,$)})}function _u(c,f){return As(c,f,function($,E){return Hi(c,E)})}function As(c,f,$){for(var E=-1,P=f.length,Y={};++E<P;){var le=f[E],_e=yo(c,le);$(_e,le)&&or(Y,io(le,c),_e)}return Y}function fu(c){return function(f){return yo(f,c)}}function fi(c,f,$,E){var P=E?ei:to,Y=-1,le=f.length,_e=c;for(c===f&&(f=Va(f)),$&&(_e=Zt(c,F($)));++Y<le;)for(var $e=0,Le=f[Y],Pe=$?$(Le):Le;($e=P(_e,Pe,$e,E))>-1;)_e!==c&&Sr.call(_e,$e,1),Sr.call(c,$e,1);return c}function Ts(c,f){for(var $=c?f.length:0,E=$-1;$--;){var P=f[$];if($==E||P!==Y){var Y=P;Vn(P)?Sr.call(c,P,1):vi(c,P)}}return c}function gi(c,f){return c+Er(ls()*(f-c+1))}function gu(c,f,$,E){for(var P=-1,Y=ba(xr((f-c)/($||1)),0),le=Ae(Y);Y--;)le[E?Y:++P]=c,c+=$;return le}function bi(c,f){var $="";if(!c||f<1||f>Q)return $;do f%2&&($+=c),f=Er(f/2),f&&(c+=c);while(f);return $}function Tt(c,f){return Mi(rl(c,f,Ka),c+"")}function bu(c){return ds(Po(c))}function yu(c,f){var $=Po(c);return Hr($,bo(f,0,$.length))}function or(c,f,$,E){if(!na(c))return c;f=io(f,c);for(var P=-1,Y=f.length,le=Y-1,_e=c;_e!=null&&++P<Y;){var $e=Mn(f[P]),Le=$;if($e==="__proto__"||$e==="constructor"||$e==="prototype")return c;if(P!=le){var Pe=_e[$e];Le=E?E(Pe,$e,_e):a,Le===a&&(Le=na(Pe)?Pe:Vn(f[P+1])?[]:{})}er(_e,$e,Le),_e=_e[$e]}return c}var js=Cr?function(c,f){return Cr.set(c,f),c}:Ka,vu=kr?function(c,f){return kr(c,"toString",{configurable:!0,enumerable:!1,value:Wi(f),writable:!0})}:Ka;function $u(c){return Hr(Po(c))}function hn(c,f,$){var E=-1,P=c.length;f<0&&(f=-f>P?0:P+f),$=$>P?P:$,$<0&&($+=P),P=f>$?0:$-f>>>0,f>>>=0;for(var Y=Ae(P);++E<P;)Y[E]=c[E+f];return Y}function wu(c,f){var $;return oo(c,function(E,P,Y){return $=f(E,P,Y),!$}),!!$}function Dr(c,f,$){var E=0,P=c==null?E:c.length;if(typeof f=="number"&&f===f&&P<=U){for(;E<P;){var Y=E+P>>>1,le=c[Y];le!==null&&!nn(le)&&($?le<=f:le<f)?E=Y+1:P=Y}return P}return yi(c,f,Ka,$)}function yi(c,f,$,E){var P=0,Y=c==null?0:c.length;if(Y===0)return 0;f=$(f);for(var le=f!==f,_e=f===null,$e=nn(f),Le=f===a;P<Y;){var Pe=Er((P+Y)/2),Oe=$(c[Pe]),tt=Oe!==a,it=Oe===null,_t=Oe===Oe,At=nn(Oe);if(le)var ft=E||_t;else Le?ft=_t&&(E||tt):_e?ft=_t&&tt&&(E||!it):$e?ft=_t&&tt&&!it&&(E||!At):it||At?ft=!1:ft=E?Oe<=f:Oe<f;ft?P=Pe+1:Y=Pe}return Ra(Y,Ie)}function Is(c,f){for(var $=-1,E=c.length,P=0,Y=[];++$<E;){var le=c[$],_e=f?f(le):le;if(!$||!En(_e,$e)){var $e=_e;Y[P++]=le===0?0:le}}return Y}function Rs(c){return typeof c=="number"?c:nn(c)?A:+c}function an(c){if(typeof c=="string")return c;if(kt(c))return Zt(c,an)+"";if(nn(c))return cs?cs.call(c):"";var f=c+"";return f=="0"&&1/c==-ke?"-0":f}function ro(c,f,$){var E=-1,P=ho,Y=c.length,le=!0,_e=[],$e=_e;if($)le=!1,P=Fo;else if(Y>=i){var Le=f?null:zu(c);if(Le)return _r(Le);le=!1,P=ce,$e=new go}else $e=f?[]:_e;e:for(;++E<Y;){var Pe=c[E],Oe=f?f(Pe):Pe;if(Pe=$||Pe!==0?Pe:0,le&&Oe===Oe){for(var tt=$e.length;tt--;)if($e[tt]===Oe)continue e;f&&$e.push(Oe),_e.push(Pe)}else P($e,Oe,$)||($e!==_e&&$e.push(Oe),_e.push(Pe))}return _e}function vi(c,f){f=io(f,c);var $=-1,E=f.length;if(!E)return!0;for(var P=c==null||typeof c!="object"&&typeof c!="function";++$<E;){var Y=f[$];if(typeof Y=="string"){if(Y==="__proto__"&&!Ht.call(c,"__proto__"))return!1;if(Y==="constructor"&&$+1<E&&typeof f[$+1]=="string"&&f[$+1]==="prototype"){if(P&&$===0)continue;return!1}}}var le=il(c,f);return le==null||delete le[Mn(_n(f))]}function zs(c,f,$,E){return or(c,f,$(yo(c,f)),E)}function Mr(c,f,$,E){for(var P=c.length,Y=E?P:-1;(E?Y--:++Y<P)&&f(c[Y],Y,c););return $?hn(c,E?0:Y,E?Y+1:P):hn(c,E?Y+1:0,E?P:Y)}function Ds(c,f){var $=c;return $ instanceof Mt&&($=$.value()),ko(f,function(E,P){return P.func.apply(P.thisArg,un([E],P.args))},$)}function $i(c,f,$){var E=c.length;if(E<2)return E?ro(c[0]):[];for(var P=-1,Y=Ae(E);++P<E;)for(var le=c[P],_e=-1;++_e<E;)_e!=P&&(Y[P]=tr(Y[P]||le,c[_e],f,$));return ro(Ca(Y,1),f,$)}function Ms(c,f,$){for(var E=-1,P=c.length,Y=f.length,le={};++E<P;){var _e=E<Y?f[E]:a;$(le,c[E],_e)}return le}function wi(c){return ia(c)?c:[]}function Si(c){return typeof c=="function"?c:Ka}function io(c,f){return kt(c)?c:Ri(c,f)?[c]:ul(Gt(c))}var Su=Tt;function so(c,f,$){var E=c.length;return $=$===a?E:$,!f&&$>=E?c:hn(c,f,$)}var Ls=uc||function(c){return Xe.clearTimeout(c)};function Ns(c,f){if(f)return c.slice();var $=c.length,E=as?as($):new c.constructor($);return c.copy(E),E}function ki(c){var f=new c.constructor(c.byteLength);return new $r(f).set(new $r(c)),f}function ku(c,f){var $=f?ki(c.buffer):c.buffer;return new c.constructor($,c.byteOffset,c.byteLength)}function xu(c){var f=new c.constructor(c.source,Ta.exec(c));return f.lastIndex=c.lastIndex,f}function Eu(c){return Xo?Jt(Xo.call(c)):{}}function Ps(c,f){var $=f?ki(c.buffer):c.buffer;return new c.constructor($,c.byteOffset,c.length)}function Os(c,f){if(c!==f){var $=c!==a,E=c===null,P=c===c,Y=nn(c),le=f!==a,_e=f===null,$e=f===f,Le=nn(f);if(!_e&&!Le&&!Y&&c>f||Y&&le&&$e&&!_e&&!Le||E&&le&&$e||!$&&$e||!P)return 1;if(!E&&!Y&&!Le&&c<f||Le&&$&&P&&!E&&!Y||_e&&$&&P||!le&&P||!$e)return-1}return 0}function Cu(c,f,$){for(var E=-1,P=c.criteria,Y=f.criteria,le=P.length,_e=$.length;++E<le;){var $e=Os(P[E],Y[E]);if($e){if(E>=_e)return $e;var Le=$[E];return $e*(Le=="desc"?-1:1)}}return c.index-f.index}function Bs(c,f,$,E){for(var P=-1,Y=c.length,le=$.length,_e=-1,$e=f.length,Le=ba(Y-le,0),Pe=Ae($e+Le),Oe=!E;++_e<$e;)Pe[_e]=f[_e];for(;++P<le;)(Oe||P<Y)&&(Pe[$[P]]=c[P]);for(;Le--;)Pe[_e++]=c[P++];return Pe}function Fs(c,f,$,E){for(var P=-1,Y=c.length,le=-1,_e=$.length,$e=-1,Le=f.length,Pe=ba(Y-_e,0),Oe=Ae(Pe+Le),tt=!E;++P<Pe;)Oe[P]=c[P];for(var it=P;++$e<Le;)Oe[it+$e]=f[$e];for(;++le<_e;)(tt||P<Y)&&(Oe[it+$[le]]=c[P++]);return Oe}function Va(c,f){var $=-1,E=c.length;for(f||(f=Ae(E));++$<E;)f[$]=c[$];return f}function Dn(c,f,$,E){var P=!$;$||($={});for(var Y=-1,le=f.length;++Y<le;){var _e=f[Y],$e=E?E($[_e],c[_e],_e,$,c):a;$e===a&&($e=c[_e]),P?Gn($,_e,$e):er($,_e,$e)}return $}function Au(c,f){return Dn(c,Ii(c),f)}function Tu(c,f){return Dn(c,el(c),f)}function Lr(c,f){return function($,E){var P=kt($)?Qr:Zc,Y=f?f():{};return P($,c,pt(E,2),Y)}}function Do(c){return Tt(function(f,$){var E=-1,P=$.length,Y=P>1?$[P-1]:a,le=P>2?$[2]:a;for(Y=c.length>3&&typeof Y=="function"?(P--,Y):a,le&&Ba($[0],$[1],le)&&(Y=P<3?a:Y,P=1),f=Jt(f);++E<P;){var _e=$[E];_e&&c(f,_e,E,Y)}return f})}function Us(c,f){return function($,E){if($==null)return $;if(!Ja($))return c($,E);for(var P=$.length,Y=f?P:-1,le=Jt($);(f?Y--:++Y<P)&&E(le[Y],Y,le)!==!1;);return $}}function Hs(c){return function(f,$,E){for(var P=-1,Y=Jt(f),le=E(f),_e=le.length;_e--;){var $e=le[c?_e:++P];if($(Y[$e],$e,Y)===!1)break}return f}}function ju(c,f,$){var E=f&x,P=rr(c);function Y(){var le=this&&this!==Xe&&this instanceof Y?P:c;return le.apply(E?$:this,arguments)}return Y}function Gs(c){return function(f){f=Gt(f);var $=fa(f)?kn(f):a,E=$?$[0]:f.charAt(0),P=$?so($,1).join(""):f.slice(1);return E[c]()+P}}function Mo(c){return function(f){return ko(Ul(Fl(f).replace(We,"")),c,"")}}function rr(c){return function(){var f=arguments;switch(f.length){case 0:return new c;case 1:return new c(f[0]);case 2:return new c(f[0],f[1]);case 3:return new c(f[0],f[1],f[2]);case 4:return new c(f[0],f[1],f[2],f[3]);case 5:return new c(f[0],f[1],f[2],f[3],f[4]);case 6:return new c(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new c(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var $=zo(c.prototype),E=c.apply($,f);return na(E)?E:$}}function Iu(c,f,$){var E=rr(c);function P(){for(var Y=arguments.length,le=Ae(Y),_e=Y,$e=Lo(P);_e--;)le[_e]=arguments[_e];var Le=Y<3&&le[0]!==$e&&le[Y-1]!==$e?[]:ao(le,$e);if(Y-=Le.length,Y<$)return Ys(c,f,Nr,P.placeholder,a,le,Le,a,a,$-Y);var Pe=this&&this!==Xe&&this instanceof P?E:c;return Pa(Pe,this,le)}return P}function Ws(c){return function(f,$,E){var P=Jt(f);if(!Ja(f)){var Y=pt($,3);f=va(f),$=function(_e){return Y(P[_e],_e,P)}}var le=c(f,$,E);return le>-1?P[Y?f[le]:le]:a}}function qs(c){return qn(function(f){var $=f.length,E=$,P=mn.prototype.thru;for(c&&f.reverse();E--;){var Y=f[E];if(typeof Y!="function")throw new dn(r);if(P&&!le&&Fr(Y)=="wrapper")var le=new mn([],!0)}for(E=le?E:$;++E<$;){Y=f[E];var _e=Fr(Y),$e=_e=="wrapper"?Ti(Y):a;$e&&zi($e[0])&&$e[1]==(y|O|g|S)&&!$e[4].length&&$e[9]==1?le=le[Fr($e[0])].apply(le,$e[3]):le=Y.length==1&&zi(Y)?le[_e]():le.thru(Y)}return function(){var Le=arguments,Pe=Le[0];if(le&&Le.length==1&&kt(Pe))return le.plant(Pe).value();for(var Oe=0,tt=$?f[Oe].apply(this,Le):Pe;++Oe<$;)tt=f[Oe].call(this,tt);return tt}})}function Nr(c,f,$,E,P,Y,le,_e,$e,Le){var Pe=f&y,Oe=f&x,tt=f&I,it=f&(O|G),_t=f&z,At=tt?a:rr(c);function ft(){for(var zt=arguments.length,Lt=Ae(zt),on=zt;on--;)Lt[on]=arguments[on];if(it)var Fa=Lo(ft),rn=Me(Lt,Fa);if(E&&(Lt=Bs(Lt,E,P,it)),Y&&(Lt=Fs(Lt,Y,le,it)),zt-=rn,it&&zt<Le){var sa=ao(Lt,Fa);return Ys(c,f,Nr,ft.placeholder,$,Lt,sa,_e,$e,Le-zt)}var Cn=Oe?$:this,Kn=tt?Cn[c]:c;return zt=Lt.length,_e?Lt=Zu(Lt,_e):_t&&zt>1&&Lt.reverse(),Pe&&$e<zt&&(Lt.length=$e),this&&this!==Xe&&this instanceof ft&&(Kn=At||rr(Kn)),Kn.apply(Cn,Lt)}return ft}function Vs(c,f){return function($,E){return ru($,c,f(E),{})}}function Pr(c,f){return function($,E){var P;if($===a&&E===a)return f;if($!==a&&(P=$),E!==a){if(P===a)return E;typeof $=="string"||typeof E=="string"?($=an($),E=an(E)):($=Rs($),E=Rs(E)),P=c($,E)}return P}}function xi(c){return qn(function(f){return f=Zt(f,F(pt())),Tt(function($){var E=this;return c(f,function(P){return Pa(P,E,$)})})})}function Or(c,f){f=f===a?" ":an(f);var $=f.length;if($<2)return $?bi(f,c):f;var E=bi(f,xr(c/Co(f)));return fa(f)?so(kn(E),0,c).join(""):E.slice(0,c)}function Ru(c,f,$,E){var P=f&x,Y=rr(c);function le(){for(var _e=-1,$e=arguments.length,Le=-1,Pe=E.length,Oe=Ae(Pe+$e),tt=this&&this!==Xe&&this instanceof le?Y:c;++Le<Pe;)Oe[Le]=E[Le];for(;$e--;)Oe[Le++]=arguments[++_e];return Pa(tt,P?$:this,Oe)}return le}function Js(c){return function(f,$,E){return E&&typeof E!="number"&&Ba(f,$,E)&&($=E=a),f=Yn(f),$===a?($=f,f=0):$=Yn($),E=E===a?f<$?1:-1:Yn(E),gu(f,$,E,c)}}function Br(c){return function(f,$){return typeof f=="string"&&typeof $=="string"||(f=fn(f),$=fn($)),c(f,$)}}function Ys(c,f,$,E,P,Y,le,_e,$e,Le){var Pe=f&O,Oe=Pe?le:a,tt=Pe?a:le,it=Pe?Y:a,_t=Pe?a:Y;f|=Pe?g:v,f&=~(Pe?v:g),f&N||(f&=-4);var At=[c,f,P,it,Oe,_t,tt,_e,$e,Le],ft=$.apply(a,At);return zi(c)&&sl(ft,At),ft.placeholder=E,ll(ft,c,f)}function Ei(c){var f=ga[c];return function($,E){if($=fn($),E=E==null?0:Ra(Et(E),292),E&&ss($)){var P=(Gt($)+"e").split("e"),Y=f(P[0]+"e"+(+P[1]+E));return P=(Gt(Y)+"e").split("e"),+(P[0]+"e"+(+P[1]-E))}return f($)}}var zu=Io&&1/_r(new Io([,-0]))[1]==ke?function(c){return new Io(c)}:Ji;function Ks(c){return function(f){var $=za(f);return $==ut?ai(f):$==st?Yl(f):Jo(f,c(f))}}function Wn(c,f,$,E,P,Y,le,_e){var $e=f&I;if(!$e&&typeof c!="function")throw new dn(r);var Le=E?E.length:0;if(Le||(f&=-97,E=P=a),le=le===a?le:ba(Et(le),0),_e=_e===a?_e:Et(_e),Le-=P?P.length:0,f&v){var Pe=E,Oe=P;E=P=a}var tt=$e?a:Ti(c),it=[c,f,$,E,P,Pe,Oe,Y,le,_e];if(tt&&Ju(it,tt),c=it[0],f=it[1],$=it[2],E=it[3],P=it[4],_e=it[9]=it[9]===a?$e?0:c.length:ba(it[9]-Le,0),!_e&&f&(O|G)&&(f&=-25),!f||f==x)var _t=ju(c,f,$);else f==O||f==G?_t=Iu(c,f,_e):(f==g||f==(x|g))&&!P.length?_t=Ru(c,f,$,E):_t=Nr.apply(a,it);var At=tt?js:sl;return ll(At(_t,it),c,f)}function Zs(c,f,$,E){return c===a||En(c,jo[$])&&!Ht.call(E,$)?f:c}function Qs(c,f,$,E,P,Y){return na(c)&&na(f)&&(Y.set(f,c),zr(c,f,a,Qs,Y),Y.delete(f)),c}function Du(c){return lr(c)?a:c}function Xs(c,f,$,E,P,Y){var le=$&w,_e=c.length,$e=f.length;if(_e!=$e&&!(le&&$e>_e))return!1;var Le=Y.get(c),Pe=Y.get(f);if(Le&&Pe)return Le==f&&Pe==c;var Oe=-1,tt=!0,it=$&k?new go:a;for(Y.set(c,f),Y.set(f,c);++Oe<_e;){var _t=c[Oe],At=f[Oe];if(E)var ft=le?E(At,_t,Oe,f,c,Y):E(_t,At,Oe,c,f,Y);if(ft!==a){if(ft)continue;tt=!1;break}if(it){if(!Uo(f,function(zt,Lt){if(!ce(it,Lt)&&(_t===zt||P(_t,zt,$,E,Y)))return it.push(Lt)})){tt=!1;break}}else if(!(_t===At||P(_t,At,$,E,Y))){tt=!1;break}}return Y.delete(c),Y.delete(f),tt}function Mu(c,f,$,E,P,Y,le){switch($){case ze:if(c.byteLength!=f.byteLength||c.byteOffset!=f.byteOffset)return!1;c=c.buffer,f=f.buffer;case pe:return!(c.byteLength!=f.byteLength||!Y(new $r(c),new $r(f)));case De:case Ee:case Je:return En(+c,+f);case Te:return c.name==f.name&&c.message==f.message;case mt:case la:return c==f+"";case ut:var _e=ai;case st:var $e=E&w;if(_e||(_e=_r),c.size!=f.size&&!$e)return!1;var Le=le.get(c);if(Le)return Le==f;E|=k,le.set(c,f);var Pe=Xs(_e(c),_e(f),E,P,Y,le);return le.delete(c),Pe;case ea:if(Xo)return Xo.call(c)==Xo.call(f)}return!1}function Lu(c,f,$,E,P,Y){var le=$&w,_e=Ci(c),$e=_e.length,Le=Ci(f),Pe=Le.length;if($e!=Pe&&!le)return!1;for(var Oe=$e;Oe--;){var tt=_e[Oe];if(!(le?tt in f:Ht.call(f,tt)))return!1}var it=Y.get(c),_t=Y.get(f);if(it&&_t)return it==f&&_t==c;var At=!0;Y.set(c,f),Y.set(f,c);for(var ft=le;++Oe<$e;){tt=_e[Oe];var zt=c[tt],Lt=f[tt];if(E)var on=le?E(Lt,zt,tt,f,c,Y):E(zt,Lt,tt,c,f,Y);if(!(on===a?zt===Lt||P(zt,Lt,$,E,Y):on)){At=!1;break}ft||(ft=tt=="constructor")}if(At&&!ft){var Fa=c.constructor,rn=f.constructor;Fa!=rn&&"constructor"in c&&"constructor"in f&&!(typeof Fa=="function"&&Fa instanceof Fa&&typeof rn=="function"&&rn instanceof rn)&&(At=!1)}return Y.delete(c),Y.delete(f),At}function qn(c){return Mi(rl(c,a,hl),c+"")}function Ci(c){return ys(c,va,Ii)}function Ai(c){return ys(c,Ya,el)}var Ti=Cr?function(c){return Cr.get(c)}:Ji;function Fr(c){for(var f=c.name+"",$=Ro[f],E=Ht.call(Ro,f)?$.length:0;E--;){var P=$[E],Y=P.func;if(Y==null||Y==c)return P.name}return f}function Lo(c){var f=Ht.call(q,"placeholder")?q:c;return f.placeholder}function pt(){var c=q.iteratee||qi;return c=c===qi?ws:c,arguments.length?c(arguments[0],arguments[1]):c}function Ur(c,f){var $=c.__data__;return Gu(f)?$[typeof f=="string"?"string":"hash"]:$.map}function ji(c){for(var f=va(c),$=f.length;$--;){var E=f[$],P=c[E];f[$]=[E,P,nl(P)]}return f}function vo(c,f){var $=Ea(c,f);return $s($)?$:a}function Nu(c){var f=Ht.call(c,_o),$=c[_o];try{c[_o]=a;var E=!0}catch{}var P=yr.call(c);return E&&(f?c[_o]=$:delete c[_o]),P}var Ii=oi?function(c){return c==null?[]:(c=Jt(c),Rn(oi(c),function(f){return rs.call(c,f)}))}:Yi,el=oi?function(c){for(var f=[];c;)un(f,Ii(c)),c=wr(c);return f}:Yi,za=Oa;(ri&&za(new ri(new ArrayBuffer(1)))!=ze||Ko&&za(new Ko)!=ut||ii&&za(ii.resolve())!=yt||Io&&za(new Io)!=st||Zo&&za(new Zo)!=te)&&(za=function(c){var f=Oa(c),$=f==at?c.constructor:a,E=$?$o($):"";if(E)switch(E){case yc:return ze;case vc:return ut;case $c:return yt;case wc:return st;case Sc:return te}return f});function Pu(c,f,$){for(var E=-1,P=$.length;++E<P;){var Y=$[E],le=Y.size;switch(Y.type){case"drop":c+=le;break;case"dropRight":f-=le;break;case"take":f=Ra(f,c+le);break;case"takeRight":c=ba(c,f-le);break}}return{start:c,end:f}}function Ou(c){var f=c.match(gt);return f?f[1].split(Za):[]}function tl(c,f,$){f=io(f,c);for(var E=-1,P=f.length,Y=!1;++E<P;){var le=Mn(f[E]);if(!(Y=c!=null&&$(c,le)))break;c=c[le]}return Y||++E!=P?Y:(P=c==null?0:c.length,!!P&&Yr(P)&&Vn(le,P)&&(kt(c)||wo(c)))}function Bu(c){var f=c.length,$=new c.constructor(f);return f&&typeof c[0]=="string"&&Ht.call(c,"index")&&($.index=c.index,$.input=c.input),$}function al(c){return typeof c.constructor=="function"&&!ir(c)?zo(wr(c)):{}}function Fu(c,f,$){var E=c.constructor;switch(f){case pe:return ki(c);case De:case Ee:return new E(+c);case ze:return ku(c,$);case Ye:case lt:case rt:case Wt:case jt:case qt:case ta:case Pt:case It:return Ps(c,$);case ut:return new E;case Je:case la:return new E(c);case mt:return xu(c);case st:return new E;case ea:return Eu(c)}}function Uu(c,f){var $=f.length;if(!$)return c;var E=$-1;return f[E]=($>1?"& ":"")+f[E],f=f.join($>2?", ":" "),c.replace(Rt,`{
|
|
4
4
|
/* [wrapped with `+f+`] */
|
|
5
5
|
`)}function Hu(c){return kt(c)||wo(c)||!!(is&&c&&c[is])}function Vn(c,f){var $=typeof c;return f=f??Q,!!f&&($=="number"||$!="symbol"&&gn.test(c))&&c>-1&&c%1==0&&c<f}function Ba(c,f,$){if(!na($))return!1;var E=typeof f;return(E=="number"?Ja($)&&Vn(f,$.length):E=="string"&&f in $)?En($[f],c):!1}function Ri(c,f){if(kt(c))return!1;var $=typeof c;return $=="number"||$=="symbol"||$=="boolean"||c==null||nn(c)?!0:Qt.test(c)||!ca.test(c)||f!=null&&c in Jt(f)}function Gu(c){var f=typeof c;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?c!=="__proto__":c===null}function zi(c){var f=Fr(c),$=q[f];if(typeof $!="function"||!(f in Mt.prototype))return!1;if(c===$)return!0;var E=Ti($);return!!E&&c===E[0]}function Wu(c){return!!es&&es in c}var qu=gr?Jn:Ki;function ir(c){var f=c&&c.constructor,$=typeof f=="function"&&f.prototype||jo;return c===$}function nl(c){return c===c&&!na(c)}function ol(c,f){return function($){return $==null?!1:$[c]===f&&(f!==a||c in Jt($))}}function Vu(c){var f=Vr(c,function(E){return $.size===d&&$.clear(),E}),$=f.cache;return f}function Ju(c,f){var $=c[1],E=f[1],P=$|E,Y=P<(x|I|y),le=E==y&&$==O||E==y&&$==S&&c[7].length<=f[8]||E==(y|S)&&f[7].length<=f[8]&&$==O;if(!(Y||le))return c;E&x&&(c[2]=f[2],P|=$&x?0:N);var _e=f[3];if(_e){var $e=c[3];c[3]=$e?Bs($e,_e,f[4]):_e,c[4]=$e?ao(c[3],p):f[4]}return _e=f[5],_e&&($e=c[5],c[5]=$e?Fs($e,_e,f[6]):_e,c[6]=$e?ao(c[5],p):f[6]),_e=f[7],_e&&(c[7]=_e),E&y&&(c[8]=c[8]==null?f[8]:Ra(c[8],f[8])),c[9]==null&&(c[9]=f[9]),c[0]=f[0],c[1]=P,c}function Yu(c){var f=[];if(c!=null)for(var $ in Jt(c))f.push($);return f}function Ku(c){return yr.call(c)}function rl(c,f,$){return f=ba(f===a?c.length-1:f,0),function(){for(var E=arguments,P=-1,Y=ba(E.length-f,0),le=Ae(Y);++P<Y;)le[P]=E[f+P];P=-1;for(var _e=Ae(f+1);++P<f;)_e[P]=E[P];return _e[f]=$(le),Pa(c,this,_e)}}function il(c,f){return f.length<2?c:yo(c,hn(f,0,-1))}function Zu(c,f){for(var $=c.length,E=Ra(f.length,$),P=Va(c);E--;){var Y=f[E];c[E]=Vn(Y,$)?P[Y]:a}return c}function Di(c,f){if(!(f==="constructor"&&typeof c[f]=="function")&&f!="__proto__")return c[f]}var sl=cl(js),sr=mc||function(c,f){return Xe.setTimeout(c,f)},Mi=cl(vu);function ll(c,f,$){var E=f+"";return Mi(c,Uu(E,Qu(Ou(E),$)))}function cl(c){var f=0,$=0;return function(){var E=fc(),P=se-(E-$);if($=E,P>0){if(++f>=R)return arguments[0]}else f=0;return c.apply(a,arguments)}}function Hr(c,f){var $=-1,E=c.length,P=E-1;for(f=f===a?E:f;++$<f;){var Y=gi($,P),le=c[Y];c[Y]=c[$],c[$]=le}return c.length=f,c}var ul=Vu(function(c){var f=[];return c.charCodeAt(0)===46&&f.push(""),c.replace(ua,function($,E,P,Y){f.push(P?Y.replace(sn,"$1"):E||$)}),f});function Mn(c){if(typeof c=="string"||nn(c))return c;var f=c+"";return f=="0"&&1/c==-ke?"-0":f}function $o(c){if(c!=null){try{return br.call(c)}catch{}try{return c+""}catch{}}return""}function Qu(c,f){return _a(J,function($){var E="_."+$[0];f&$[1]&&!ho(c,E)&&c.push(E)}),c.sort()}function dl(c){if(c instanceof Mt)return c.clone();var f=new mn(c.__wrapped__,c.__chain__);return f.__actions__=Va(c.__actions__),f.__index__=c.__index__,f.__values__=c.__values__,f}function Xu(c,f,$){($?Ba(c,f,$):f===a)?f=1:f=ba(Et(f),0);var E=c==null?0:c.length;if(!E||f<1)return[];for(var P=0,Y=0,le=Ae(xr(E/f));P<E;)le[Y++]=hn(c,P,P+=f);return le}function ed(c){for(var f=-1,$=c==null?0:c.length,E=0,P=[];++f<$;){var Y=c[f];Y&&(P[E++]=Y)}return P}function td(){var c=arguments.length;if(!c)return[];for(var f=Ae(c-1),$=arguments[0],E=c;E--;)f[E-1]=arguments[E];return un(kt($)?Va($):[$],Ca(f,1))}var ad=Tt(function(c,f){return ia(c)?tr(c,Ca(f,1,ia,!0)):[]}),nd=Tt(function(c,f){var $=_n(f);return ia($)&&($=a),ia(c)?tr(c,Ca(f,1,ia,!0),pt($,2)):[]}),od=Tt(function(c,f){var $=_n(f);return ia($)&&($=a),ia(c)?tr(c,Ca(f,1,ia,!0),a,$):[]});function rd(c,f,$){var E=c==null?0:c.length;return E?(f=$||f===a?1:Et(f),hn(c,f<0?0:f,E)):[]}function sd(c,f,$){var E=c==null?0:c.length;return E?(f=$||f===a?1:Et(f),f=E-f,hn(c,0,f<0?0:f)):[]}function ld(c,f){return c&&c.length?Mr(c,pt(f,3),!0,!0):[]}function cd(c,f){return c&&c.length?Mr(c,pt(f,3),!0):[]}function ud(c,f,$,E){var P=c==null?0:c.length;return P?($&&typeof $!="number"&&Ba(c,f,$)&&($=0,E=P),tu(c,f,$,E)):[]}function ml(c,f,$){var E=c==null?0:c.length;if(!E)return-1;var P=$==null?0:Et($);return P<0&&(P=ba(E+P,0)),xo(c,pt(f,3),P)}function pl(c,f,$){var E=c==null?0:c.length;if(!E)return-1;var P=E-1;return $!==a&&(P=Et($),P=$<0?ba(E+P,0):Ra(P,E-1)),xo(c,pt(f,3),P,!0)}function hl(c){var f=c==null?0:c.length;return f?Ca(c,1):[]}function dd(c){var f=c==null?0:c.length;return f?Ca(c,ke):[]}function md(c,f){var $=c==null?0:c.length;return $?(f=f===a?1:Et(f),Ca(c,f)):[]}function pd(c){for(var f=-1,$=c==null?0:c.length,E={};++f<$;){var P=c[f];E[P[0]]=P[1]}return E}function _l(c){return c&&c.length?c[0]:a}function hd(c,f,$){var E=c==null?0:c.length;if(!E)return-1;var P=$==null?0:Et($);return P<0&&(P=ba(E+P,0)),to(c,f,P)}function _d(c){var f=c==null?0:c.length;return f?hn(c,0,-1):[]}var fd=Tt(function(c){var f=Zt(c,wi);return f.length&&f[0]===c[0]?mi(f):[]}),gd=Tt(function(c){var f=_n(c),$=Zt(c,wi);return f===_n($)?f=a:$.pop(),$.length&&$[0]===c[0]?mi($,pt(f,2)):[]}),bd=Tt(function(c){var f=_n(c),$=Zt(c,wi);return f=typeof f=="function"?f:a,f&&$.pop(),$.length&&$[0]===c[0]?mi($,a,f):[]});function yd(c,f){return c==null?"":hc.call(c,f)}function _n(c){var f=c==null?0:c.length;return f?c[f-1]:a}function vd(c,f,$){var E=c==null?0:c.length;if(!E)return-1;var P=E;return $!==a&&(P=Et($),P=P<0?ba(E+P,0):Ra(P,E-1)),f===f?Zl(c,f,P):xo(c,pr,P,!0)}function $d(c,f){return c&&c.length?Es(c,Et(f)):a}var wd=Tt(fl);function fl(c,f){return c&&c.length&&f&&f.length?fi(c,f):c}function Sd(c,f,$){return c&&c.length&&f&&f.length?fi(c,f,pt($,2)):c}function kd(c,f,$){return c&&c.length&&f&&f.length?fi(c,f,a,$):c}var xd=qn(function(c,f){var $=c==null?0:c.length,E=li(c,f);return Ts(c,Zt(f,function(P){return Vn(P,$)?+P:P}).sort(Os)),E});function Ed(c,f){var $=[];if(!(c&&c.length))return $;var E=-1,P=[],Y=c.length;for(f=pt(f,3);++E<Y;){var le=c[E];f(le,E,c)&&($.push(le),P.push(E))}return Ts(c,P),$}function Li(c){return c==null?c:bc.call(c)}function Cd(c,f,$){var E=c==null?0:c.length;return E?($&&typeof $!="number"&&Ba(c,f,$)?(f=0,$=E):(f=f==null?0:Et(f),$=$===a?E:Et($)),hn(c,f,$)):[]}function Ad(c,f){return Dr(c,f)}function Td(c,f,$){return yi(c,f,pt($,2))}function jd(c,f){var $=c==null?0:c.length;if($){var E=Dr(c,f);if(E<$&&En(c[E],f))return E}return-1}function Id(c,f){return Dr(c,f,!0)}function Rd(c,f,$){return yi(c,f,pt($,2),!0)}function zd(c,f){var $=c==null?0:c.length;if($){var E=Dr(c,f,!0)-1;if(En(c[E],f))return E}return-1}function Dd(c){return c&&c.length?Is(c):[]}function Md(c,f){return c&&c.length?Is(c,pt(f,2)):[]}function Ld(c){var f=c==null?0:c.length;return f?hn(c,1,f):[]}function Nd(c,f,$){return c&&c.length?(f=$||f===a?1:Et(f),hn(c,0,f<0?0:f)):[]}function Pd(c,f,$){var E=c==null?0:c.length;return E?(f=$||f===a?1:Et(f),f=E-f,hn(c,f<0?0:f,E)):[]}function Od(c,f){return c&&c.length?Mr(c,pt(f,3),!1,!0):[]}function Bd(c,f){return c&&c.length?Mr(c,pt(f,3)):[]}var Fd=Tt(function(c){return ro(Ca(c,1,ia,!0))}),Ud=Tt(function(c){var f=_n(c);return ia(f)&&(f=a),ro(Ca(c,1,ia,!0),pt(f,2))}),Hd=Tt(function(c){var f=_n(c);return f=typeof f=="function"?f:a,ro(Ca(c,1,ia,!0),a,f)});function Gd(c){return c&&c.length?ro(c):[]}function Wd(c,f){return c&&c.length?ro(c,pt(f,2)):[]}function qd(c,f){return f=typeof f=="function"?f:a,c&&c.length?ro(c,a,f):[]}function Ni(c){if(!(c&&c.length))return[];var f=0;return c=Rn(c,function($){if(ia($))return f=ba($.length,f),!0}),Vo(f,function($){return Zt(c,Wo($))})}function gl(c,f){if(!(c&&c.length))return[];var $=Ni(c);return f==null?$:Zt($,function(E){return Pa(f,a,E)})}var Vd=Tt(function(c,f){return ia(c)?tr(c,f):[]}),Jd=Tt(function(c){return $i(Rn(c,ia))}),Yd=Tt(function(c){var f=_n(c);return ia(f)&&(f=a),$i(Rn(c,ia),pt(f,2))}),Kd=Tt(function(c){var f=_n(c);return f=typeof f=="function"?f:a,$i(Rn(c,ia),a,f)}),Zd=Tt(Ni);function Qd(c,f){return Ms(c||[],f||[],er)}function Xd(c,f){return Ms(c||[],f||[],or)}var em=Tt(function(c){var f=c.length,$=f>1?c[f-1]:a;return $=typeof $=="function"?(c.pop(),$):a,gl(c,$)});function bl(c){var f=q(c);return f.__chain__=!0,f}function tm(c,f){return f(c),c}function Gr(c,f){return f(c)}var am=qn(function(c){var f=c.length,$=f?c[0]:0,E=this.__wrapped__,P=function(Y){return li(Y,c)};return f>1||this.__actions__.length||!(E instanceof Mt)||!Vn($)?this.thru(P):(E=E.slice($,+$+(f?1:0)),E.__actions__.push({func:Gr,args:[P],thisArg:a}),new mn(E,this.__chain__).thru(function(Y){return f&&!Y.length&&Y.push(a),Y}))});function nm(){return bl(this)}function om(){return new mn(this.value(),this.__chain__)}function rm(){this.__values__===a&&(this.__values__=Rl(this.value()));var c=this.__index__>=this.__values__.length,f=c?a:this.__values__[this.__index__++];return{done:c,value:f}}function im(){return this}function sm(c){for(var f,$=this;$ instanceof Tr;){var E=dl($);E.__index__=0,E.__values__=a,f?P.__wrapped__=E:f=E;var P=E;$=$.__wrapped__}return P.__wrapped__=c,f}function lm(){var c=this.__wrapped__;if(c instanceof Mt){var f=c;return this.__actions__.length&&(f=new Mt(this)),f=f.reverse(),f.__actions__.push({func:Gr,args:[Li],thisArg:a}),new mn(f,this.__chain__)}return this.thru(Li)}function cm(){return Ds(this.__wrapped__,this.__actions__)}var um=Lr(function(c,f,$){Ht.call(c,$)?++c[$]:Gn(c,$,1)});function dm(c,f,$){var E=kt(c)?Ia:eu;return $&&Ba(c,f,$)&&(f=a),E(c,pt(f,3))}function mm(c,f){var $=kt(c)?Rn:gs;return $(c,pt(f,3))}var pm=Ws(ml),hm=Ws(pl);function _m(c,f){return Ca(Wr(c,f),1)}function fm(c,f){return Ca(Wr(c,f),ke)}function gm(c,f,$){return $=$===a?1:Et($),Ca(Wr(c,f),$)}function yl(c,f){var $=kt(c)?_a:oo;return $(c,pt(f,3))}function vl(c,f){var $=kt(c)?cr:fs;return $(c,pt(f,3))}var bm=Lr(function(c,f,$){Ht.call(c,$)?c[$].push(f):Gn(c,$,[f])});function ym(c,f,$,E){c=Ja(c)?c:Po(c),$=$&&!E?Et($):0;var P=c.length;return $<0&&($=ba(P+$,0)),Kr(c)?$<=P&&c.indexOf(f,$)>-1:!!P&&to(c,f,$)>-1}var vm=Tt(function(c,f,$){var E=-1,P=typeof f=="function",Y=Ja(c)?Ae(c.length):[];return oo(c,function(le){Y[++E]=P?Pa(f,le,$):ar(le,f,$)}),Y}),$m=Lr(function(c,f,$){Gn(c,$,f)});function Wr(c,f){var $=kt(c)?Zt:Ss;return $(c,pt(f,3))}function wm(c,f,$,E){return c==null?[]:(kt(f)||(f=f==null?[]:[f]),$=E?a:$,kt($)||($=$==null?[]:[$]),Cs(c,f,$))}var Sm=Lr(function(c,f,$){c[$?0:1].push(f)},function(){return[[],[]]});function km(c,f,$){var E=kt(c)?ko:hr,P=arguments.length<3;return E(c,pt(f,4),$,P,oo)}function xm(c,f,$){var E=kt(c)?ur:hr,P=arguments.length<3;return E(c,pt(f,4),$,P,fs)}function Em(c,f){var $=kt(c)?Rn:gs;return $(c,Jr(pt(f,3)))}function Cm(c){var f=kt(c)?ds:bu;return f(c)}function Am(c,f,$){($?Ba(c,f,$):f===a)?f=1:f=Et(f);var E=kt(c)?Yc:yu;return E(c,f)}function Tm(c){var f=kt(c)?Kc:$u;return f(c)}function jm(c){if(c==null)return 0;if(Ja(c))return Kr(c)?Co(c):c.length;var f=za(c);return f==ut||f==st?c.size:hi(c).length}function Im(c,f,$){var E=kt(c)?Uo:wu;return $&&Ba(c,f,$)&&(f=a),E(c,pt(f,3))}var Rm=Tt(function(c,f){if(c==null)return[];var $=f.length;return $>1&&Ba(c,f[0],f[1])?f=[]:$>2&&Ba(f[0],f[1],f[2])&&(f=[f[0]]),Cs(c,Ca(f,1),[])}),qr=dc||function(){return Xe.Date.now()};function zm(c,f){if(typeof f!="function")throw new dn(r);return c=Et(c),function(){if(--c<1)return f.apply(this,arguments)}}function $l(c,f,$){return f=$?a:f,f=c&&f==null?c.length:f,Wn(c,y,a,a,a,a,f)}function wl(c,f){var $;if(typeof f!="function")throw new dn(r);return c=Et(c),function(){return--c>0&&($=f.apply(this,arguments)),c<=1&&(f=a),$}}var Pi=Tt(function(c,f,$){var E=x;if($.length){var P=ao($,Lo(Pi));E|=g}return Wn(c,E,f,$,P)}),Sl=Tt(function(c,f,$){var E=x|I;if($.length){var P=ao($,Lo(Sl));E|=g}return Wn(f,E,c,$,P)});function kl(c,f,$){f=$?a:f;var E=Wn(c,O,a,a,a,a,a,f);return E.placeholder=kl.placeholder,E}function xl(c,f,$){f=$?a:f;var E=Wn(c,G,a,a,a,a,a,f);return E.placeholder=xl.placeholder,E}function El(c,f,$){var E,P,Y,le,_e,$e,Le=0,Pe=!1,Oe=!1,tt=!0;if(typeof c!="function")throw new dn(r);f=fn(f)||0,na($)&&(Pe=!!$.leading,Oe="maxWait"in $,Y=Oe?ba(fn($.maxWait)||0,f):Y,tt="trailing"in $?!!$.trailing:tt);function it(sa){var Cn=E,Kn=P;return E=P=a,Le=sa,le=c.apply(Kn,Cn),le}function _t(sa){return Le=sa,_e=sr(zt,f),Pe?it(sa):le}function At(sa){var Cn=sa-$e,Kn=sa-Le,Wl=f-Cn;return Oe?Ra(Wl,Y-Kn):Wl}function ft(sa){var Cn=sa-$e,Kn=sa-Le;return $e===a||Cn>=f||Cn<0||Oe&&Kn>=Y}function zt(){var sa=qr();if(ft(sa))return Lt(sa);_e=sr(zt,At(sa))}function Lt(sa){return _e=a,tt&&E?it(sa):(E=P=a,le)}function on(){_e!==a&&Ls(_e),Le=0,E=$e=P=_e=a}function Fa(){return _e===a?le:Lt(qr())}function rn(){var sa=qr(),Cn=ft(sa);if(E=arguments,P=this,$e=sa,Cn){if(_e===a)return _t($e);if(Oe)return Ls(_e),_e=sr(zt,f),it($e)}return _e===a&&(_e=sr(zt,f)),le}return rn.cancel=on,rn.flush=Fa,rn}var Dm=Tt(function(c,f){return _s(c,1,f)}),Mm=Tt(function(c,f,$){return _s(c,fn(f)||0,$)});function Lm(c){return Wn(c,z)}function Vr(c,f){if(typeof c!="function"||f!=null&&typeof f!="function")throw new dn(r);var $=function(){var E=arguments,P=f?f.apply(this,E):E[0],Y=$.cache;if(Y.has(P))return Y.get(P);var le=c.apply(this,E);return $.cache=Y.set(P,le)||Y,le};return $.cache=new(Vr.Cache||Hn),$}Vr.Cache=Hn;function Jr(c){if(typeof c!="function")throw new dn(r);return function(){var f=arguments;switch(f.length){case 0:return!c.call(this);case 1:return!c.call(this,f[0]);case 2:return!c.call(this,f[0],f[1]);case 3:return!c.call(this,f[0],f[1],f[2])}return!c.apply(this,f)}}function Nm(c){return wl(2,c)}var Pm=Su(function(c,f){f=f.length==1&&kt(f[0])?Zt(f[0],F(pt())):Zt(Ca(f,1),F(pt()));var $=f.length;return Tt(function(E){for(var P=-1,Y=Ra(E.length,$);++P<Y;)E[P]=f[P].call(this,E[P]);return Pa(c,this,E)})}),Oi=Tt(function(c,f){var $=ao(f,Lo(Oi));return Wn(c,g,a,f,$)}),Cl=Tt(function(c,f){var $=ao(f,Lo(Cl));return Wn(c,v,a,f,$)}),Om=qn(function(c,f){return Wn(c,S,a,a,a,f)});function Bm(c,f){if(typeof c!="function")throw new dn(r);return f=f===a?f:Et(f),Tt(c,f)}function Fm(c,f){if(typeof c!="function")throw new dn(r);return f=f==null?0:ba(Et(f),0),Tt(function($){var E=$[f],P=so($,0,f);return E&&un(P,E),Pa(c,this,P)})}function Um(c,f,$){var E=!0,P=!0;if(typeof c!="function")throw new dn(r);return na($)&&(E="leading"in $?!!$.leading:E,P="trailing"in $?!!$.trailing:P),El(c,f,{leading:E,maxWait:f,trailing:P})}function Hm(c){return $l(c,1)}function Gm(c,f){return Oi(Si(f),c)}function Wm(){if(!arguments.length)return[];var c=arguments[0];return kt(c)?c:[c]}function qm(c){return pn(c,b)}function Vm(c,f){return f=typeof f=="function"?f:a,pn(c,b,f)}function Jm(c){return pn(c,u|b)}function Ym(c,f){return f=typeof f=="function"?f:a,pn(c,u|b,f)}function Km(c,f){return f==null||hs(c,f,va(f))}function En(c,f){return c===f||c!==c&&f!==f}var Zm=Br(di),Qm=Br(function(c,f){return c>=f}),wo=vs((function(){return arguments})())?vs:function(c){return oa(c)&&Ht.call(c,"callee")&&!rs.call(c,"callee")},kt=Ae.isArray,Xm=wn?F(wn):iu;function Ja(c){return c!=null&&Yr(c.length)&&!Jn(c)}function ia(c){return oa(c)&&Ja(c)}function ep(c){return c===!0||c===!1||oa(c)&&Oa(c)==De}var lo=pc||Ki,tp=Sn?F(Sn):su;function ap(c){return oa(c)&&c.nodeType===1&&!lr(c)}function np(c){if(c==null)return!0;if(Ja(c)&&(kt(c)||typeof c=="string"||typeof c.splice=="function"||lo(c)||No(c)||wo(c)))return!c.length;var f=za(c);if(f==ut||f==st)return!c.size;if(ir(c))return!hi(c).length;for(var $ in c)if(Ht.call(c,$))return!1;return!0}function op(c,f){return nr(c,f)}function rp(c,f,$){$=typeof $=="function"?$:a;var E=$?$(c,f):a;return E===a?nr(c,f,a,$):!!E}function Bi(c){if(!oa(c))return!1;var f=Oa(c);return f==Te||f==ge||typeof c.message=="string"&&typeof c.name=="string"&&!lr(c)}function ip(c){return typeof c=="number"&&ss(c)}function Jn(c){if(!na(c))return!1;var f=Oa(c);return f==Ue||f==qe||f==we||f==nt}function Al(c){return typeof c=="number"&&c==Et(c)}function Yr(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=Q}function na(c){var f=typeof c;return c!=null&&(f=="object"||f=="function")}function oa(c){return c!=null&&typeof c=="object"}var Tl=Xn?F(Xn):cu;function sp(c,f){return c===f||pi(c,f,ji(f))}function lp(c,f,$){return $=typeof $=="function"?$:a,pi(c,f,ji(f),$)}function cp(c){return jl(c)&&c!=+c}function up(c){if(qu(c))throw new St(o);return $s(c)}function dp(c){return c===null}function mp(c){return c==null}function jl(c){return typeof c=="number"||oa(c)&&Oa(c)==Je}function lr(c){if(!oa(c)||Oa(c)!=at)return!1;var f=wr(c);if(f===null)return!0;var $=Ht.call(f,"constructor")&&f.constructor;return typeof $=="function"&&$ instanceof $&&br.call($)==ic}var Fi=po?F(po):uu;function pp(c){return Al(c)&&c>=-Q&&c<=Q}var Il=eo?F(eo):du;function Kr(c){return typeof c=="string"||!kt(c)&&oa(c)&&Oa(c)==la}function nn(c){return typeof c=="symbol"||oa(c)&&Oa(c)==ea}var No=Fn?F(Fn):mu;function hp(c){return c===a}function _p(c){return oa(c)&&za(c)==te}function fp(c){return oa(c)&&Oa(c)==X}var gp=Br(_i),bp=Br(function(c,f){return c<=f});function Rl(c){if(!c)return[];if(Ja(c))return Kr(c)?kn(c):Va(c);if(Yo&&c[Yo])return Jl(c[Yo]());var f=za(c),$=f==ut?ai:f==st?_r:Po;return $(c)}function Yn(c){if(!c)return c===0?c:0;if(c=fn(c),c===ke||c===-ke){var f=c<0?-1:1;return f*ae}return c===c?c:0}function Et(c){var f=Yn(c),$=f%1;return f===f?$?f-$:f:0}function zl(c){return c?bo(Et(c),0,de):0}function fn(c){if(typeof c=="number")return c;if(nn(c))return A;if(na(c)){var f=typeof c.valueOf=="function"?c.valueOf():c;c=na(f)?f+"":f}if(typeof c!="string")return c===0?c:+c;c=M(c);var $=Tn.test(c);return $||ht.test(c)?ee(c.slice(2),$?2:8):Ln.test(c)?A:+c}function Dl(c){return Dn(c,Ya(c))}function yp(c){return c?bo(Et(c),-Q,Q):c===0?c:0}function Gt(c){return c==null?"":an(c)}var vp=Do(function(c,f){if(ir(f)||Ja(f)){Dn(f,va(f),c);return}for(var $ in f)Ht.call(f,$)&&er(c,$,f[$])}),Ml=Do(function(c,f){Dn(f,Ya(f),c)}),Zr=Do(function(c,f,$,E){Dn(f,Ya(f),c,E)}),$p=Do(function(c,f,$,E){Dn(f,va(f),c,E)}),wp=qn(li);function Sp(c,f){var $=zo(c);return f==null?$:ps($,f)}var kp=Tt(function(c,f){c=Jt(c);var $=-1,E=f.length,P=E>2?f[2]:a;for(P&&Ba(f[0],f[1],P)&&(E=1);++$<E;)for(var Y=f[$],le=Ya(Y),_e=-1,$e=le.length;++_e<$e;){var Le=le[_e],Pe=c[Le];(Pe===a||En(Pe,jo[Le])&&!Ht.call(c,Le))&&(c[Le]=Y[Le])}return c}),xp=Tt(function(c){return c.push(a,Qs),Pa(Ll,a,c)});function Ep(c,f){return mr(c,pt(f,3),zn)}function Cp(c,f){return mr(c,pt(f,3),ui)}function Ap(c,f){return c==null?c:ci(c,pt(f,3),Ya)}function Tp(c,f){return c==null?c:bs(c,pt(f,3),Ya)}function jp(c,f){return c&&zn(c,pt(f,3))}function Ip(c,f){return c&&ui(c,pt(f,3))}function Rp(c){return c==null?[]:Rr(c,va(c))}function zp(c){return c==null?[]:Rr(c,Ya(c))}function Ui(c,f,$){var E=c==null?a:yo(c,f);return E===a?$:E}function Dp(c,f){return c!=null&&tl(c,f,au)}function Hi(c,f){return c!=null&&tl(c,f,nu)}var Mp=Vs(function(c,f,$){f!=null&&typeof f.toString!="function"&&(f=yr.call(f)),c[f]=$},Wi(Ka)),Lp=Vs(function(c,f,$){f!=null&&typeof f.toString!="function"&&(f=yr.call(f)),Ht.call(c,f)?c[f].push($):c[f]=[$]},pt),Np=Tt(ar);function va(c){return Ja(c)?us(c):hi(c)}function Ya(c){return Ja(c)?us(c,!0):pu(c)}function Pp(c,f){var $={};return f=pt(f,3),zn(c,function(E,P,Y){Gn($,f(E,P,Y),E)}),$}function Op(c,f){var $={};return f=pt(f,3),zn(c,function(E,P,Y){Gn($,P,f(E,P,Y))}),$}var Bp=Do(function(c,f,$){zr(c,f,$)}),Ll=Do(function(c,f,$,E){zr(c,f,$,E)}),Fp=qn(function(c,f){var $={};if(c==null)return $;var E=!1;f=Zt(f,function(Y){return Y=io(Y,c),E||(E=Y.length>1),Y}),Dn(c,Ai(c),$),E&&($=pn($,u|s|b,Du));for(var P=f.length;P--;)vi($,f[P]);return $});function Up(c,f){return Nl(c,Jr(pt(f)))}var Hp=qn(function(c,f){return c==null?{}:_u(c,f)});function Nl(c,f){if(c==null)return{};var $=Zt(Ai(c),function(E){return[E]});return f=pt(f),As(c,$,function(E,P){return f(E,P[0])})}function Gp(c,f,$){f=io(f,c);var E=-1,P=f.length;for(P||(P=1,c=a);++E<P;){var Y=c==null?a:c[Mn(f[E])];Y===a&&(E=P,Y=$),c=Jn(Y)?Y.call(c):Y}return c}function Wp(c,f,$){return c==null?c:or(c,f,$)}function qp(c,f,$,E){return E=typeof E=="function"?E:a,c==null?c:or(c,f,$,E)}var Pl=Ks(va),Ol=Ks(Ya);function Vp(c,f,$){var E=kt(c),P=E||lo(c)||No(c);if(f=pt(f,4),$==null){var Y=c&&c.constructor;P?$=E?new Y:[]:na(c)?$=Jn(Y)?zo(wr(c)):{}:$={}}return(P?_a:zn)(c,function(le,_e,$e){return f($,le,_e,$e)}),$}function Jp(c,f){return c==null?!0:vi(c,f)}function Yp(c,f,$){return c==null?c:zs(c,f,Si($))}function Kp(c,f,$,E){return E=typeof E=="function"?E:a,c==null?c:zs(c,f,Si($),E)}function Po(c){return c==null?[]:oe(c,va(c))}function Zp(c){return c==null?[]:oe(c,Ya(c))}function Qp(c,f,$){return $===a&&($=f,f=a),$!==a&&($=fn($),$=$===$?$:0),f!==a&&(f=fn(f),f=f===f?f:0),bo(fn(c),f,$)}function Xp(c,f,$){return f=Yn(f),$===a?($=f,f=0):$=Yn($),c=fn(c),ou(c,f,$)}function e2(c,f,$){if($&&typeof $!="boolean"&&Ba(c,f,$)&&(f=$=a),$===a&&(typeof f=="boolean"?($=f,f=a):typeof c=="boolean"&&($=c,c=a)),c===a&&f===a?(c=0,f=1):(c=Yn(c),f===a?(f=c,c=0):f=Yn(f)),c>f){var E=c;c=f,f=E}if($||c%1||f%1){var P=ls();return Ra(c+P*(f-c+So("1e-"+((P+"").length-1))),f)}return gi(c,f)}var t2=Mo(function(c,f,$){return f=f.toLowerCase(),c+($?Bl(f):f)});function Bl(c){return Gi(Gt(c).toLowerCase())}function Fl(c){return c=Gt(c),c&&c.replace(bn,Ke).replace($t,"")}function a2(c,f,$){c=Gt(c),f=an(f);var E=c.length;$=$===a?E:bo(Et($),0,E);var P=$;return $-=f.length,$>=0&&c.slice($,P)==f}function n2(c){return c=Gt(c),c&&j.test(c)?c.replace(Da,xt):c}function o2(c){return c=Gt(c),c&&He.test(c)?c.replace(Ve,"\\$&"):c}var r2=Mo(function(c,f,$){return c+($?"-":"")+f.toLowerCase()}),i2=Mo(function(c,f,$){return c+($?" ":"")+f.toLowerCase()}),s2=Gs("toLowerCase");function l2(c,f,$){c=Gt(c),f=Et(f);var E=f?Co(c):0;if(!f||E>=f)return c;var P=(f-E)/2;return Or(Er(P),$)+c+Or(xr(P),$)}function c2(c,f,$){c=Gt(c),f=Et(f);var E=f?Co(c):0;return f&&E<f?c+Or(f-E,$):c}function u2(c,f,$){c=Gt(c),f=Et(f);var E=f?Co(c):0;return f&&E<f?Or(f-E,$)+c:c}function d2(c,f,$){return $||f==null?f=0:f&&(f=+f),gc(Gt(c).replace(Fe,""),f||0)}function m2(c,f,$){return($?Ba(c,f,$):f===a)?f=1:f=Et(f),bi(Gt(c),f)}function p2(){var c=arguments,f=Gt(c[0]);return c.length<3?f:f.replace(c[1],c[2])}var h2=Mo(function(c,f,$){return c+($?"_":"")+f.toLowerCase()});function _2(c,f,$){return $&&typeof $!="number"&&Ba(c,f,$)&&(f=$=a),$=$===a?de:$>>>0,$?(c=Gt(c),c&&(typeof f=="string"||f!=null&&!Fi(f))&&(f=an(f),!f&&fa(c))?so(kn(c),0,$):c.split(f,$)):[]}var f2=Mo(function(c,f,$){return c+($?" ":"")+Gi(f)});function g2(c,f,$){return c=Gt(c),$=$==null?0:bo(Et($),0,c.length),f=an(f),c.slice($,$+f.length)==f}function b2(c,f,$){var E=q.templateSettings;$&&Ba(c,f,$)&&(f=a),c=Gt(c),f=Zr({},f,E,Zs);var P=Zr({},f.imports,E.imports,Zs),Y=va(P),le=oe(P,Y),_e,$e,Le=0,Pe=f.interpolate||yn,Oe="__p += '",tt=ni((f.escape||yn).source+"|"+Pe.source+"|"+(Pe===et?An:yn).source+"|"+(f.evaluate||yn).source+"|$","g"),it="//# sourceURL="+(Ht.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bo+"]")+`
|
|
6
6
|
`;c.replace(tt,function(ft,zt,Lt,on,Fa,rn){return Lt||(Lt=on),Oe+=c.slice(Le,rn).replace(vn,Ct),zt&&(_e=!0,Oe+=`' +
|